illumio-pylo 0.3.12__py3-none-any.whl → 0.3.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- illumio_pylo/API/APIConnector.py +61 -14
- illumio_pylo/API/CredentialsManager.py +130 -3
- illumio_pylo/API/Explorer.py +619 -14
- illumio_pylo/API/JsonPayloadTypes.py +64 -4
- illumio_pylo/FilterQuery.py +892 -0
- illumio_pylo/LabelCommon.py +13 -3
- illumio_pylo/LabelDimension.py +109 -0
- illumio_pylo/LabelStore.py +97 -38
- illumio_pylo/WorkloadStore.py +58 -0
- illumio_pylo/__init__.py +9 -3
- illumio_pylo/cli/__init__.py +5 -2
- illumio_pylo/cli/commands/__init__.py +1 -0
- illumio_pylo/cli/commands/credential_manager.py +176 -0
- illumio_pylo/cli/commands/traffic_export.py +358 -0
- illumio_pylo/cli/commands/ui/credential_manager_ui/app.js +191 -2
- illumio_pylo/cli/commands/ui/credential_manager_ui/index.html +50 -1
- illumio_pylo/cli/commands/ui/credential_manager_ui/styles.css +179 -28
- illumio_pylo/cli/commands/update_pce_objects_cache.py +1 -2
- illumio_pylo/cli/commands/workload_export.py +29 -0
- {illumio_pylo-0.3.12.dist-info → illumio_pylo-0.3.13.dist-info}/METADATA +1 -1
- {illumio_pylo-0.3.12.dist-info → illumio_pylo-0.3.13.dist-info}/RECORD +24 -22
- illumio_pylo/Query.py +0 -331
- {illumio_pylo-0.3.12.dist-info → illumio_pylo-0.3.13.dist-info}/WHEEL +0 -0
- {illumio_pylo-0.3.12.dist-info → illumio_pylo-0.3.13.dist-info}/licenses/LICENSE +0 -0
- {illumio_pylo-0.3.12.dist-info → illumio_pylo-0.3.13.dist-info}/top_level.txt +0 -0
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
"""This module contains the JSON payload types for the PCE API."""
|
|
2
2
|
|
|
3
|
-
from typing import List, Optional, TypedDict, NotRequired, Union, Literal
|
|
3
|
+
from typing import List, Optional, TypedDict, NotRequired, Union, Literal, Dict
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class HrefReference(TypedDict):
|
|
7
7
|
href: str
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
class HrefReferenceWithName(TypedDict):
|
|
10
11
|
href: str
|
|
11
12
|
name: str
|
|
12
13
|
|
|
14
|
+
|
|
13
15
|
class LabelHrefRef(TypedDict):
|
|
14
16
|
label: HrefReference
|
|
15
17
|
|
|
18
|
+
|
|
16
19
|
class WorkloadHrefRef(TypedDict):
|
|
17
20
|
workload: HrefReference
|
|
18
21
|
|
|
22
|
+
|
|
19
23
|
class IPListHrefRef(TypedDict):
|
|
20
24
|
ip_list: HrefReference
|
|
21
25
|
|
|
26
|
+
|
|
22
27
|
class ServiceHrefRef(TypedDict):
|
|
23
28
|
service: HrefReference
|
|
24
29
|
|
|
30
|
+
|
|
25
31
|
class VirtualServiceHrefRef(TypedDict):
|
|
26
32
|
virtual_service: HrefReference
|
|
27
33
|
|
|
@@ -45,6 +51,7 @@ class LabelObjectUsageJsonStructure(TypedDict):
|
|
|
45
51
|
label_mapping_rule: bool
|
|
46
52
|
virtual_service: bool
|
|
47
53
|
|
|
54
|
+
|
|
48
55
|
class LabelObjectJsonStructure(TypedDict):
|
|
49
56
|
created_at: str
|
|
50
57
|
created_by: Optional[HrefReferenceWithName]
|
|
@@ -62,6 +69,12 @@ class LabelObjectCreationJsonStructure(TypedDict):
|
|
|
62
69
|
key: str
|
|
63
70
|
|
|
64
71
|
|
|
72
|
+
class LabelObjectShortReferenceJsonStructure(TypedDict):
|
|
73
|
+
value: str
|
|
74
|
+
key: str
|
|
75
|
+
href: str
|
|
76
|
+
|
|
77
|
+
|
|
65
78
|
class LabelObjectUpdateJsonStructure(TypedDict):
|
|
66
79
|
value: str
|
|
67
80
|
|
|
@@ -82,6 +95,7 @@ class LabelGroupObjectUpdateJsonStructure(TypedDict):
|
|
|
82
95
|
labels: NotRequired[List[HrefReference]]
|
|
83
96
|
name: NotRequired[str]
|
|
84
97
|
|
|
98
|
+
|
|
85
99
|
class IPListObjectJsonStructure(TypedDict):
|
|
86
100
|
created_at: str
|
|
87
101
|
created_by: Optional[HrefReferenceWithName]
|
|
@@ -92,6 +106,7 @@ class IPListObjectJsonStructure(TypedDict):
|
|
|
92
106
|
updated_at: str
|
|
93
107
|
updated_by: Optional[HrefReferenceWithName]
|
|
94
108
|
|
|
109
|
+
|
|
95
110
|
class IPListObjectCreationJsonStructure(TypedDict):
|
|
96
111
|
description: str
|
|
97
112
|
ip_ranges: List[TypedDict('record', {'from_ip': str, 'to_ip': str, 'exclusion': bool})]
|
|
@@ -122,7 +137,7 @@ class WorkloadObjectCreateJsonStructure(TypedDict):
|
|
|
122
137
|
"""
|
|
123
138
|
This is the structure of the JSON payload for creating a workload.
|
|
124
139
|
"""
|
|
125
|
-
description:NotRequired[str]
|
|
140
|
+
description: NotRequired[str]
|
|
126
141
|
hostname: NotRequired[str]
|
|
127
142
|
interfaces: NotRequired[List[WorkloadInterfaceObjectJsonStructure]]
|
|
128
143
|
labels: NotRequired[List[HrefReference]]
|
|
@@ -204,7 +219,7 @@ class RuleObjectJsonStructure(TypedDict):
|
|
|
204
219
|
created_by: Optional[HrefReferenceWithName]
|
|
205
220
|
description: str
|
|
206
221
|
href: str
|
|
207
|
-
ingress_services: List[RuleDirectServiceReferenceObjectJsonStructure|RuleServiceReferenceObjectJsonStructure]
|
|
222
|
+
ingress_services: List[RuleDirectServiceReferenceObjectJsonStructure | RuleServiceReferenceObjectJsonStructure]
|
|
208
223
|
updated_at: str
|
|
209
224
|
updated_by: Optional[HrefReferenceWithName]
|
|
210
225
|
|
|
@@ -320,7 +335,8 @@ class RuleCoverageQueryEntryJsonStructure(TypedDict):
|
|
|
320
335
|
|
|
321
336
|
WorkloadsGetQueryLabelFilterJsonStructure = List[List[str]]
|
|
322
337
|
|
|
323
|
-
AuditLogApiEventType = Literal[
|
|
338
|
+
AuditLogApiEventType = Literal[
|
|
339
|
+
'agent.clone_detected', 'workloads.update', 'workload.update', 'workload_interfaces.update']
|
|
324
340
|
|
|
325
341
|
|
|
326
342
|
class AuditLogEntryJsonStructure(TypedDict):
|
|
@@ -335,3 +351,47 @@ class AuditLogApiRequestPayloadStructure(TypedDict):
|
|
|
335
351
|
class AuditLogApiReplyEventJsonStructure(TypedDict):
|
|
336
352
|
pass
|
|
337
353
|
|
|
354
|
+
|
|
355
|
+
class ExplorerTrafficRecordActorWorkloadJsonStructure(TypedDict):
|
|
356
|
+
enforcement_mode: Literal['enforced', 'visibility_only', 'idle', 'selective_enforcement']
|
|
357
|
+
hostname: str
|
|
358
|
+
href: str
|
|
359
|
+
labels: List[LabelObjectShortReferenceJsonStructure]
|
|
360
|
+
managed: bool
|
|
361
|
+
os_type: str
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
class ExplorerTrafficRecordActorJsonStructure(TypedDict):
|
|
365
|
+
ip: str
|
|
366
|
+
fqdn: NotRequired[str]
|
|
367
|
+
ip_lists: NotRequired[List[HrefReferenceWithName]]
|
|
368
|
+
workload: NotRequired[ExplorerTrafficRecordActorWorkloadJsonStructure]
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
class ExplorerTrafficRecordTimestampRangeJsonStructure(TypedDict):
|
|
372
|
+
first_detected: str # ISO 8601 format UTC timestamp
|
|
373
|
+
last_detected: str # ISO 8601 format UTC timestamp
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
class ExplorerTrafficRecordJsonStructure(TypedDict):
|
|
377
|
+
boundary_decision: NotRequired[Literal['blocked', 'allowed']]
|
|
378
|
+
src: ExplorerTrafficRecordActorJsonStructure
|
|
379
|
+
dst: ExplorerTrafficRecordActorJsonStructure
|
|
380
|
+
caps: List[str]
|
|
381
|
+
client_type: Literal['server', 'endpoint']
|
|
382
|
+
flow_direction: Literal['inbound', 'outbound']
|
|
383
|
+
network: HrefReferenceWithName
|
|
384
|
+
num_connections: int
|
|
385
|
+
policy_decision: Literal['allowed', 'potentially_blocked', 'blocked']
|
|
386
|
+
service: Dict
|
|
387
|
+
state: str
|
|
388
|
+
origin: str
|
|
389
|
+
draft_policy_decision: Literal[
|
|
390
|
+
'allowed', 'allowed_across_boundaries', 'denied', '', 'potentially_blocked', 'potentially_blocked_by_boundary']
|
|
391
|
+
timestamp_range: ExplorerTrafficRecordTimestampRangeJsonStructure
|
|
392
|
+
rules: List[HrefReference]
|
|
393
|
+
deny_rules: List[HrefReference]
|
|
394
|
+
override_deny_rules: List[HrefReference]
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
ExplorerTrafficRecordsApiReplyPayloadJsonStructure = List[ExplorerTrafficRecordJsonStructure]
|