acex-devkit 1.14.0__tar.gz → 1.15.0__tar.gz

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.
Files changed (30) hide show
  1. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/PKG-INFO +1 -1
  2. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/pyproject.toml +1 -1
  3. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/acl_model.py +4 -4
  4. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/composed_configuration.py +50 -40
  5. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/logging.py +7 -3
  6. acex_devkit-1.15.0/src/acex_devkit/models/reference.py +37 -0
  7. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/README.md +0 -0
  8. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/__init__.py +0 -0
  9. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/configdiffer/__init__.py +0 -0
  10. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/configdiffer/command.py +0 -0
  11. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/configdiffer/configdiffer.py +0 -0
  12. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/configdiffer/diff.py +0 -0
  13. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/configdiffer/old_configdiffer.py +0 -0
  14. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/configdiffer/old_diff.py +0 -0
  15. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/drivers/__init__.py +0 -0
  16. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/drivers/base.py +0 -0
  17. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/drivers/base_driver.py +0 -0
  18. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/exceptions/__init__.py +0 -0
  19. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/__init__.py +0 -0
  20. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/attribute_value.py +0 -0
  21. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/container_entry.py +0 -0
  22. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/external_value.py +0 -0
  23. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/management_connection.py +0 -0
  24. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/ned.py +0 -0
  25. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/node_response.py +0 -0
  26. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/models/spanning_tree.py +0 -0
  27. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/normalizer/__init__.py +0 -0
  28. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/normalizer/base.py +0 -0
  29. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/normalizer/engine.py +0 -0
  30. {acex_devkit-1.14.0 → acex_devkit-1.15.0}/src/acex_devkit/types/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: acex-devkit
3
- Version: 1.14.0
3
+ Version: 1.15.0
4
4
  Summary: ACE-X DevKit - Development kit for building ACE-X drivers and plugins
5
5
  License: AGPL-3.0
6
6
  Keywords: automation,devkit,sdk,drivers,plugins
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "acex-devkit"
3
- version = "1.14.0"
3
+ version = "1.15.0"
4
4
  description = "ACE-X DevKit - Development kit for building ACE-X drivers and plugins"
5
5
  authors = ["Johan Lahti <johan.lahti@acebit.se>"]
6
6
  readme = "README.md"
@@ -70,14 +70,14 @@ class Ipv4AclAttributes(ContainerEntry, BaseModel):
70
70
  identity_fields: ClassVar[tuple[str, ...]] = ("name",)
71
71
  name: AttributeValue[str]
72
72
  type: AttributeValue[str] = "ipv4_acl"
73
- acl_entries: Optional[Dict[str, Ipv4AclEntryAttributes]] = None
73
+ acl_entries: Optional[Dict[str, Ipv4AclEntryAttributes]] = {}
74
74
 
75
75
  class Ipv6AclAttributes(ContainerEntry, BaseModel):
76
76
  identity_fields: ClassVar[tuple[str, ...]] = ("name",)
77
77
  name: AttributeValue[str]
78
78
  type: AttributeValue[str] = "ipv6_acl"
79
- acl_entries: Optional[Dict[str, Ipv6AclEntryAttributes]] = None
79
+ acl_entries: Optional[Dict[str, Ipv6AclEntryAttributes]] = {}
80
80
 
81
81
  class Acl(BaseModel):
82
- ipv4_acls: Optional[Dict[str, Ipv4AclAttributes]] = None
83
- ipv6_acls: Optional[Dict[str, Ipv6AclAttributes]] = None
82
+ ipv4_acls: Optional[Dict[str, Ipv4AclAttributes]] = {}
83
+ ipv6_acls: Optional[Dict[str, Ipv6AclAttributes]] = {}
@@ -16,32 +16,7 @@ from acex_devkit.models.logging import (
16
16
  )
17
17
  from acex_devkit.models.spanning_tree import SpanningTree
18
18
  from acex_devkit.models.acl_model import Acl
19
-
20
- class MetadataValueType(str, Enum):
21
- CONCRETE = "concrete"
22
- EXTERNALVALUE = "externalValue"
23
- REFERENCE = "reference"
24
-
25
- class Metadata(BaseModel):
26
- type: Optional[str] = "str"
27
- value_source: MetadataValueType = MetadataValueType.CONCRETE
28
-
29
- class Reference(ContainerEntry, BaseModel):
30
- identity_fields: ClassVar[tuple[str, ...]] = ("pointer",)
31
- pointer: str
32
- metadata: Metadata = Metadata(type="str", value_source="reference")
33
-
34
- class ReferenceTo(Reference):
35
- pointer: str
36
- metadata: Optional[Dict] = {}
37
-
38
- class ReferenceFrom(Reference):
39
- pointer: str
40
- metadata: Optional[Dict] = {}
41
-
42
- class RenderedReference(BaseModel):
43
- from_ptr: str
44
- to_ptr: str
19
+ from acex_devkit.models.reference import MetadataValueType, Metadata, Reference, ReferenceTo, ReferenceFrom, RenderedReference
45
20
 
46
21
  class SystemConfig(BaseModel):
47
22
  contact: Optional[AttributeValue[str]] = None
@@ -389,7 +364,24 @@ class NetworkInstance(ContainerEntry, BaseModel):
389
364
  class LacpConfig(BaseModel):
390
365
  system_priority: Optional[AttributeValue[int]] = None
391
366
  system_id_mac: Optional[AttributeValue[str]] = None
392
- load_balance_algorithm: Optional[AttributeValue[list[Literal["src-mac", "dst-mac", "src-dst-mac", "src-ip", "dst-ip", "src-dst-ip", "src-port", "dst-port", "src-dst-port"]]]] = None
367
+ load_balance_algorithm: Optional[
368
+ AttributeValue[
369
+ list[
370
+ Literal[
371
+ "src-mac",
372
+ "dst-mac",
373
+ "src-dst-mac",
374
+ "src-ip",
375
+ "dst-ip",
376
+ "src-dst-ip",
377
+ "src-port",
378
+ "dst-port",
379
+ "src-dst-port",
380
+ ]
381
+ ]
382
+ ]
383
+ ] = None
384
+
393
385
 
394
386
  class Lacp(BaseModel):
395
387
  config: Optional[LacpConfig] = LacpConfig()
@@ -812,9 +804,12 @@ class NetflowFormat(str, Enum):
812
804
  NETFLOW_V9 = "NetFlow v9"
813
805
  NETFLOW_V5 = "NetFlow v5"
814
806
 
815
- class NetflowRecordIpv4Match(BaseModel):
807
+
808
+ class NetflowRecordIpv4Match(ContainerEntry, BaseModel):
809
+ identity_fields: ClassVar[tuple[str, ...]] = ("name",)
810
+ name: AttributeValue[str]
816
811
  # Leaf-level ipv4 matches (Cisco style "match ipv4 <field>"). True = match this field, False = No. None = Ignore the field
817
- netflow_record: Optional[AttributeValue[str]] = None # Reference to parent record, used for easier access in config component
812
+ netflow_record: Optional[AttributeValue[str]] = None # Reference to parent record, used for easier access in config component
818
813
  dscp: Optional[AttributeValue[bool]] = None
819
814
  fragmentation: Optional[AttributeValue[bool]] = None
820
815
  header_length: Optional[AttributeValue[bool]] = None
@@ -829,35 +824,46 @@ class NetflowRecordIpv4Match(BaseModel):
829
824
  ttl: Optional[AttributeValue[bool]] = None
830
825
  version: Optional[AttributeValue[bool]] = None
831
826
 
832
- class NetflowRecordAttributes(BaseModel): # Cisco flow record
827
+
828
+ class NetflowRecordAttributes(ContainerEntry, BaseModel): # Cisco flow record
829
+ identity_fields: ClassVar[tuple[str, ...]] = ("name",)
830
+ name: AttributeValue[str]
833
831
  match_ipv4: Optional[NetflowRecordIpv4Match] = None
834
- #match_ipv4: Optional[Dict[str, NetflowRecordIpv4Match]] = {}
832
+ # match_ipv4: Optional[Dict[str, NetflowRecordIpv4Match]] = {}
835
833
  application_name: Optional[AttributeValue[bool]] = None
836
834
 
837
835
  # Escape hatch for vendor-specific match knobs not yet modeled
838
- match_vendor_specific: Optional[AttributeValue[Dict[str, Any]]] = None # keeping a flexible option if needed. Not advertised to users.
836
+ match_vendor_specific: Optional[AttributeValue[Dict[str, Any]]] = None # keeping a flexible option if needed. Not advertised to users.
839
837
 
840
838
  collect_timestamp_absolute_first: Optional[AttributeValue[bool]] = None
841
839
  collect_timestamp_absolute_last: Optional[AttributeValue[bool]] = None
842
840
 
843
- class NetflowCollectorAttributes(BaseModel): # Cisco flow monitor
844
- netflow_record: Optional[AttributeValue[str]] = None # Reference to record, used for easier access in config component
845
- netflow_exporter: Optional[AttributeValue[str]] = None # Reference to exporter, used for easier access in config component
841
+
842
+ class NetflowCollectorAttributes(ContainerEntry, BaseModel): # Cisco flow monitor
843
+ identity_fields: ClassVar[tuple[str, ...]] = ("name",)
844
+ name: AttributeValue[str]
845
+ records: Optional[Dict[str, Reference]] = {} # References to records, used for easier access in config component
846
+ exporters: Optional[Dict[str, Reference]] = {} # References to exporters, used for easier access in config component
846
847
  cache_inactive: Optional[AttributeValue[int]] = None
847
848
  cache_active: Optional[AttributeValue[int]] = None
848
849
  interfaces: Optional[Dict[str, Reference]] = {} # allow for disabling netflow on specific interfaces
849
850
 
850
- class NetflowExporterOptions(BaseModel):
851
+
852
+ class NetflowExporterOptions(ContainerEntry, BaseModel):
851
853
  # Mostly timeouts atm
854
+ identity_fields: ClassVar[tuple[str, ...]] = ("name",)
855
+ name: AttributeValue[str]
852
856
  interface_table_timeout: Optional[AttributeValue[int]] = None
853
857
  vrf_table_timeout: Optional[AttributeValue[int]] = None
854
858
  sampler_table: Optional[AttributeValue[bool]] = None
855
859
  application_table_timeout: Optional[AttributeValue[int]] = None
856
860
  application_attributes_timeout: Optional[AttributeValue[int]] = None
857
- netflow_exporter: Optional[AttributeValue[str]] = None # Reference to parent exporter, used for easier access in config component
861
+ netflow_exporter: Optional[AttributeValue[str]] = None # Reference to parent exporter, used for easier access in config component
858
862
 
859
- class NetflowExporterAttributes(ContainerEntry, BaseModel): # Cisco flow exporter
860
- identity_fields: ClassVar[tuple[str, ...]] = ("address",)
863
+
864
+ class NetflowExporterAttributes(ContainerEntry, BaseModel): # Cisco flow exporter
865
+ identity_fields: ClassVar[tuple[str, ...]] = ("name",)
866
+ name: AttributeValue[str]
861
867
  address: Optional[AttributeValue[str]] = None
862
868
  port: Optional[AttributeValue[int]] = None
863
869
  netflow_format: Optional[AttributeValue[str]] = None
@@ -865,10 +871,14 @@ class NetflowExporterAttributes(ContainerEntry, BaseModel): # Cisco flow exporte
865
871
  network_instance: Optional[AttributeValue[str]] = None
866
872
  options: Optional[NetflowExporterOptions] = None
867
873
 
868
- class NetflowGlobalConfigAttributes(BaseModel):
874
+
875
+ class NetflowGlobalConfigAttributes(ContainerEntry, BaseModel):
876
+ identity_fields: ClassVar[tuple[str, ...]] = ("name",)
877
+ name: AttributeValue[str]
869
878
  enabled: Optional[AttributeValue[bool]] = None
870
879
  version: Optional[AttributeValue[int]] = None
871
880
 
881
+
872
882
  class Netflow(BaseModel):
873
883
  config: Optional[NetflowGlobalConfigAttributes] = None
874
884
  records: Optional[Dict[str, NetflowRecordAttributes]] = {}
@@ -1,6 +1,7 @@
1
1
  from pydantic import BaseModel
2
2
  from acex_devkit.models.attribute_value import AttributeValue
3
3
  from acex_devkit.models.container_entry import ContainerEntry
4
+ from acex_devkit.models.reference import Reference
4
5
  from enum import Enum
5
6
  from typing import ClassVar, Optional, Dict
6
7
 
@@ -35,8 +36,6 @@ class LoggingFacility(str, Enum):
35
36
  CHANGELOG = "CHANGELOG"
36
37
  INTERACTIVE_COMMANDS = "INTERACTIVE_COMMANDS"
37
38
 
38
- class Reference(BaseModel): ...
39
-
40
39
  class LoggingConfig(BaseModel):
41
40
  rate_limit: Optional[AttributeValue[int]] = None
42
41
  severity: Optional[AttributeValue[LoggingSeverity]] = None
@@ -64,6 +63,10 @@ class VtyLine(ContainerEntry, BaseModel):
64
63
  line_number: Optional[AttributeValue[int]] = None
65
64
  logging_synchronous: Optional[AttributeValue[bool]] = None
66
65
  transport_input: Optional[AttributeValue[str]] = None # default is SSH. Mostly used by Cisco.
66
+ ipv4acl: Optional[Reference] = None # reference to an ACL object. Only used by Cisco.
67
+ ipv6acl: Optional[Reference] = None # reference to an ACL object. Only used by Cisco.
68
+ acl_direction: Optional[AttributeValue[str]] = None # direction of ACL, either 'in' or 'out'
69
+ acl_network_instance: Optional[AttributeValue[str]] = None # network instance where ACL is
67
70
 
68
71
  class FileLogging(ContainerEntry, BaseModel):
69
72
  identity_fields: ClassVar[tuple[str, ...]] = ("filename",)
@@ -81,4 +84,5 @@ class LoggingEvent(BaseModel):
81
84
 
82
85
 
83
86
  class LoggingEvents(BaseModel):
84
- events: Optional[Dict[str, LoggingEvent]] = None
87
+ events: Optional[Dict[str, LoggingEvent]] = None
88
+
@@ -0,0 +1,37 @@
1
+ from pydantic import BaseModel
2
+ from typing import Optional, Dict, ClassVar
3
+ from enum import Enum
4
+
5
+ from acex_devkit.models.container_entry import ContainerEntry
6
+
7
+
8
+ class MetadataValueType(str, Enum):
9
+ CONCRETE = "concrete"
10
+ EXTERNALVALUE = "externalValue"
11
+ REFERENCE = "reference"
12
+
13
+
14
+ class Metadata(BaseModel):
15
+ type: Optional[str] = "str"
16
+ value_source: MetadataValueType = MetadataValueType.CONCRETE
17
+
18
+
19
+ class Reference(ContainerEntry, BaseModel):
20
+ identity_fields: ClassVar[tuple[str, ...]] = ("pointer",)
21
+ pointer: str
22
+ metadata: Metadata = Metadata(type="str", value_source="reference")
23
+
24
+
25
+ class ReferenceTo(Reference):
26
+ pointer: str
27
+ metadata: Optional[Dict] = {}
28
+
29
+
30
+ class ReferenceFrom(Reference):
31
+ pointer: str
32
+ metadata: Optional[Dict] = {}
33
+
34
+
35
+ class RenderedReference(BaseModel):
36
+ from_ptr: str
37
+ to_ptr: str
File without changes