annet 0.16.31__tar.gz → 0.16.33__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.
Potentially problematic release.
This version of annet might be problematic. Click here for more details.
- {annet-0.16.31/annet.egg-info → annet-0.16.33}/PKG-INFO +1 -1
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/common/models.py +1 -1
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/common/status_client.py +1 -1
- {annet-0.16.31 → annet-0.16.33}/annet/bgp_models.py +8 -2
- {annet-0.16.31 → annet-0.16.33}/annet/mesh/device_models.py +4 -0
- {annet-0.16.31 → annet-0.16.33}/annet/mesh/peer_models.py +3 -3
- {annet-0.16.31 → annet-0.16.33}/annet/rpl_generators/cumulus_frr.py +10 -5
- {annet-0.16.31 → annet-0.16.33}/annet/rpl_generators/prefix_lists.py +2 -2
- {annet-0.16.31 → annet-0.16.33/annet.egg-info}/PKG-INFO +1 -1
- {annet-0.16.31 → annet-0.16.33}/AUTHORS +0 -0
- {annet-0.16.31 → annet-0.16.33}/LICENSE +0 -0
- {annet-0.16.31 → annet-0.16.33}/MANIFEST.in +0 -0
- {annet-0.16.31 → annet-0.16.33}/README.md +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/fetchers/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/fetchers/stub/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/fetchers/stub/fetcher.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/file/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/file/provider.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/common/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/common/client.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/common/manufacturer.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/common/query.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/common/storage_opts.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/provider.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/v24/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/v24/storage.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/v37/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/adapters/netbox/v37/storage.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annet.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/command.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/diff.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/errors.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/filter_acl.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/jsontools.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/lib.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/netdev/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/netdev/db.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/netdev/devdb/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/netdev/devdb/data/devdb.json +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/netdev/views/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/netdev/views/dump.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/netdev/views/hardware.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/output.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/patching.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/rbparser/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/rbparser/acl.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/rbparser/deploying.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/rbparser/ordering.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/rbparser/platform.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/rbparser/syntax.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/rulebook/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/rulebook/common.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/tabparser.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/annlib/types.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/api/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/argparse.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/cli.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/cli_args.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/configs/context.yml +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/configs/logging.yaml +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/connectors.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/deploy.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/diff.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/executor.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/filtering.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/gen.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/base.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/common/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/common/initial.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/entire.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/exceptions.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/jsonfragment.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/partial.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/perf.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/ref.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/generators/result.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/hardware.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/implicit.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/lib.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/mesh/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/mesh/basemodel.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/mesh/executor.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/mesh/match_args.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/mesh/models_converter.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/mesh/port_processor.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/mesh/registry.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/output.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/parallel.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/patching.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/reference.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl/action.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl/condition.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl/match_builder.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl/policy.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl/result.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl/routemap.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl/statement_builder.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl_generators/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl_generators/aspath.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl_generators/community.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl_generators/entities.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl_generators/execute.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl_generators/policy.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rpl_generators/rd.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/arista/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/arista/iface.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/aruba/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/aruba/ap_env.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/aruba/misc.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/b4com/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/b4com/file.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/cisco/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/cisco/iface.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/cisco/misc.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/cisco/vlandb.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/common.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/deploying.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/huawei/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/huawei/aaa.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/huawei/bgp.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/huawei/iface.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/huawei/misc.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/huawei/vlandb.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/juniper/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/nexus/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/nexus/iface.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/patching.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/ribbon/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/routeros/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/routeros/file.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/arista.deploy +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/arista.order +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/arista.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/aruba.deploy +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/aruba.order +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/aruba.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/b4com.deploy +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/b4com.order +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/b4com.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/cisco.deploy +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/cisco.order +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/cisco.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/huawei.deploy +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/huawei.order +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/huawei.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/juniper.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/nexus.deploy +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/nexus.order +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/nexus.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/nokia.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/optixtrans.deploy +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/optixtrans.order +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/optixtrans.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/pc.deploy +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/pc.order +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/pc.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/ribbon.deploy +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/ribbon.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/routeros.order +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/rulebook/texts/routeros.rul +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/storage.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/tabparser.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/text_term_format.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/tracing.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet/types.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet.egg-info/SOURCES.txt +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet.egg-info/dependency_links.txt +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet.egg-info/entry_points.txt +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet.egg-info/requires.txt +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet.egg-info/top_level.txt +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/example/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/example/lldp.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/mesh_example/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/mesh_example/bgp.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/mesh_example/mesh_logic.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/rpl_example/__init__.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/rpl_example/generator.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/rpl_example/items.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/rpl_example/mesh.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/annet_generators/rpl_example/route_policy.py +0 -0
- {annet-0.16.31 → annet-0.16.33}/requirements.txt +0 -0
- {annet-0.16.31 → annet-0.16.33}/setup.cfg +0 -0
- {annet-0.16.31 → annet-0.16.33}/setup.py +0 -0
|
@@ -214,7 +214,7 @@ class NetboxDevice(Entity):
|
|
|
214
214
|
return type(self) is type(other) and self.url == other.url
|
|
215
215
|
|
|
216
216
|
def is_pc(self) -> bool:
|
|
217
|
-
return self.device_type.manufacturer.name in ("Mellanox", "Moxa") or self.breed == "pc"
|
|
217
|
+
return self.device_type.manufacturer.name in ("Mellanox", "NVIDIA", "Moxa") or self.breed == "pc"
|
|
218
218
|
|
|
219
219
|
def _make_interface(self, name: str, type: InterfaceType) -> Interface:
|
|
220
220
|
return Interface(
|
|
@@ -68,7 +68,7 @@ class BFDTimers:
|
|
|
68
68
|
multiplier: int = 4
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
Family = Literal["ipv4_unicast", "ipv6_unicast", "ipv4_labeled_unicast", "ipv6_labeled_unicast"]
|
|
71
|
+
Family = Literal["ipv4_unicast", "ipv6_unicast", "ipv4_labeled_unicast", "ipv6_labeled_unicast", "l2vpn_evpn"]
|
|
72
72
|
|
|
73
73
|
|
|
74
74
|
@dataclass(frozen=True)
|
|
@@ -207,7 +207,7 @@ class PeerGroup:
|
|
|
207
207
|
auth_key: bool = False
|
|
208
208
|
add_path: bool = False
|
|
209
209
|
multipath: bool = False
|
|
210
|
-
multihop:
|
|
210
|
+
multihop: Optional[int] = None
|
|
211
211
|
multihop_no_nexthop_change: bool = False
|
|
212
212
|
af_no_install: bool = False
|
|
213
213
|
bfd: bool = False
|
|
@@ -243,8 +243,10 @@ class VrfOptions:
|
|
|
243
243
|
ipv6_unicast: FamilyOptions
|
|
244
244
|
ipv4_labeled_unicast: FamilyOptions
|
|
245
245
|
ipv6_labeled_unicast: FamilyOptions
|
|
246
|
+
l2vpn_evpn: FamilyOptions
|
|
246
247
|
|
|
247
248
|
vrf_name_global: Optional[str] = None
|
|
249
|
+
l3vni: Optional[int] = None
|
|
248
250
|
as_path_relax: bool = False
|
|
249
251
|
rt_import: list[str] = field(default_factory=list)
|
|
250
252
|
rt_export: list[str] = field(default_factory=list)
|
|
@@ -262,6 +264,7 @@ class GlobalOptions:
|
|
|
262
264
|
ipv6_unicast: FamilyOptions
|
|
263
265
|
ipv4_labeled_unicast: FamilyOptions
|
|
264
266
|
ipv6_labeled_unicast: FamilyOptions
|
|
267
|
+
l2vpn_evpn: FamilyOptions
|
|
265
268
|
|
|
266
269
|
as_path_relax: bool = False
|
|
267
270
|
local_as: ASN = ASN(None)
|
|
@@ -299,6 +302,9 @@ def _used_redistribute_policies(opts: Union[GlobalOptions, VrfOptions]) -> Itera
|
|
|
299
302
|
for red in opts.ipv6_labeled_unicast.redistributes:
|
|
300
303
|
if red.policy:
|
|
301
304
|
yield red.policy
|
|
305
|
+
for red in opts.l2vpn_evpn.redistributes:
|
|
306
|
+
if red.policy:
|
|
307
|
+
yield red.policy
|
|
302
308
|
|
|
303
309
|
|
|
304
310
|
def extract_policies(config: BgpConfig) -> Sequence[str]:
|
|
@@ -43,11 +43,13 @@ class _FamiliesMixin:
|
|
|
43
43
|
kwargs.setdefault("ipv6_unicast", FamilyOptions(family="ipv6_unicast"))
|
|
44
44
|
kwargs.setdefault("ipv4_labeled_unicast", FamilyOptions(family="ipv4_labeled_unicast"))
|
|
45
45
|
kwargs.setdefault("ipv6_labeled_unicast", FamilyOptions(family="ipv6_labeled_unicast"))
|
|
46
|
+
kwargs.setdefault("l2vpn_evpn", FamilyOptions(family="l2vpn_evpn"))
|
|
46
47
|
super().__init__(**kwargs)
|
|
47
48
|
ipv4_unicast: Annotated[FamilyOptions, Merge()]
|
|
48
49
|
ipv6_unicast: Annotated[FamilyOptions, Merge()]
|
|
49
50
|
ipv4_labeled_unicast: Annotated[FamilyOptions, Merge()]
|
|
50
51
|
ipv6_labeled_unicast: Annotated[FamilyOptions, Merge()]
|
|
52
|
+
l2vpn_evpn: Annotated[FamilyOptions, Merge()]
|
|
51
53
|
|
|
52
54
|
|
|
53
55
|
class VrfOptions(_FamiliesMixin, BaseMeshModel):
|
|
@@ -56,6 +58,7 @@ class VrfOptions(_FamiliesMixin, BaseMeshModel):
|
|
|
56
58
|
kwargs.setdefault("ipv6_unicast", FamilyOptions(family="ipv6_unicast", vrf_name=vrf_name))
|
|
57
59
|
kwargs.setdefault("ipv4_labeled_unicast", FamilyOptions(family="ipv4_labeled_unicast", vrf_name=vrf_name))
|
|
58
60
|
kwargs.setdefault("ipv6_labeled_unicast", FamilyOptions(family="ipv6_labeled_unicast", vrf_name=vrf_name))
|
|
61
|
+
kwargs.setdefault("l2vpn_evpn", FamilyOptions(family="l2vpn_evpn", vrf_name=vrf_name))
|
|
59
62
|
kwargs.setdefault("groups", KeyDefaultDict(lambda x: MeshPeerGroup(name=x)))
|
|
60
63
|
super().__init__(vrf_name=vrf_name, **kwargs)
|
|
61
64
|
|
|
@@ -64,6 +67,7 @@ class VrfOptions(_FamiliesMixin, BaseMeshModel):
|
|
|
64
67
|
as_path_relax: bool
|
|
65
68
|
import_policy: Optional[str]
|
|
66
69
|
export_policy: Optional[str]
|
|
70
|
+
l3vni: Optional[int]
|
|
67
71
|
rt_import: Annotated[tuple[str, ...], Concat()]
|
|
68
72
|
rt_export: Annotated[tuple[str, ...], Concat()]
|
|
69
73
|
rt_import_v4: Annotated[tuple[str, ...], Concat()]
|
|
@@ -3,7 +3,7 @@ from typing import Literal, Annotated, Union, Optional
|
|
|
3
3
|
from .basemodel import BaseMeshModel, Concat, Unite
|
|
4
4
|
from ..bgp_models import BFDTimers
|
|
5
5
|
|
|
6
|
-
FamilyName = Literal["ipv4_unicast", "ipv6_unicast", "ipv4_labeled_unicast", "ipv6_labeled_unicast"]
|
|
6
|
+
FamilyName = Literal["ipv4_unicast", "ipv6_unicast", "ipv4_labeled_unicast", "ipv6_labeled_unicast", "l2vpn_evpn"]
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class _SharedOptionsDTO(BaseMeshModel):
|
|
@@ -53,7 +53,7 @@ class _OptionsDTO(_SharedOptionsDTO):
|
|
|
53
53
|
advertise_bgp_static: bool
|
|
54
54
|
allowas_in: bool
|
|
55
55
|
auth_key: bool
|
|
56
|
-
multihop:
|
|
56
|
+
multihop: Optional[int]
|
|
57
57
|
multihop_no_nexthop_change: bool
|
|
58
58
|
af_no_install: bool
|
|
59
59
|
rib: bool
|
|
@@ -101,7 +101,7 @@ class IndirectPeerDTO(MeshSession, _OptionsDTO):
|
|
|
101
101
|
|
|
102
102
|
|
|
103
103
|
class VirtualLocalDTO(_OptionsDTO):
|
|
104
|
-
asnum: int
|
|
104
|
+
asnum: Union[int, str]
|
|
105
105
|
pod: int
|
|
106
106
|
addr: str
|
|
107
107
|
description: str
|
|
@@ -100,7 +100,7 @@ class CumulusPolicyGenerator(ABC):
|
|
|
100
100
|
ip_type,
|
|
101
101
|
"prefix-list",
|
|
102
102
|
name,
|
|
103
|
-
f"seq {i *
|
|
103
|
+
f"seq {i * 5 + 5}",
|
|
104
104
|
"permit", f"{addr_mask.ip}/{addr_mask.network.prefixlen}",
|
|
105
105
|
) + (
|
|
106
106
|
("ge", str(match.greater_equal)) if match.greater_equal is not None else ()
|
|
@@ -151,13 +151,14 @@ class CumulusPolicyGenerator(ABC):
|
|
|
151
151
|
return get_used_united_community_lists(communities=communities.values(), policies=policies)
|
|
152
152
|
|
|
153
153
|
def _cumulus_community(
|
|
154
|
-
self, name: str, cmd: str, member: str, use_regex: bool,
|
|
154
|
+
self, name: str, cmd: str, member: str, use_regex: bool, seq: int,
|
|
155
155
|
) -> Iterable[Sequence[str]]:
|
|
156
156
|
if use_regex:
|
|
157
157
|
yield (
|
|
158
158
|
cmd,
|
|
159
159
|
"expanded",
|
|
160
160
|
name,
|
|
161
|
+
f"seq {seq}",
|
|
161
162
|
"permit",
|
|
162
163
|
member,
|
|
163
164
|
)
|
|
@@ -166,6 +167,7 @@ class CumulusPolicyGenerator(ABC):
|
|
|
166
167
|
cmd,
|
|
167
168
|
"standard",
|
|
168
169
|
name,
|
|
170
|
+
f"seq {seq}",
|
|
169
171
|
"permit",
|
|
170
172
|
member,
|
|
171
173
|
)
|
|
@@ -182,6 +184,7 @@ class CumulusPolicyGenerator(ABC):
|
|
|
182
184
|
return
|
|
183
185
|
for community_list_union in community_unions:
|
|
184
186
|
name = mangle_united_community_list_name([c.name for c in community_list_union])
|
|
187
|
+
comm_number = 0
|
|
185
188
|
|
|
186
189
|
for clist in community_list_union:
|
|
187
190
|
if clist.type is CommunityType.BASIC:
|
|
@@ -207,13 +210,15 @@ class CumulusPolicyGenerator(ABC):
|
|
|
207
210
|
else:
|
|
208
211
|
member = " ".join(f"{member_prefix}{m}" for m in clist.members)
|
|
209
212
|
yield from self._cumulus_community(
|
|
210
|
-
name=name, cmd=cmd, member=member, use_regex=clist.use_regex,
|
|
213
|
+
name=name, cmd=cmd, member=member, use_regex=clist.use_regex, seq=(comm_number + 1) * 10,
|
|
211
214
|
)
|
|
212
215
|
else:
|
|
213
|
-
for member_value in clist.members:
|
|
216
|
+
for comm_number, member_value in enumerate(clist.members, start=comm_number):
|
|
214
217
|
yield from self._cumulus_community(
|
|
215
218
|
name=name, cmd=cmd, member=member_prefix + member_value, use_regex=clist.use_regex,
|
|
219
|
+
seq=(comm_number + 1) * 10,
|
|
216
220
|
)
|
|
221
|
+
comm_number += 1
|
|
217
222
|
yield "!"
|
|
218
223
|
|
|
219
224
|
def _get_match_community_names(self, condition: SingleCondition[Sequence[str]]) -> Sequence[str]:
|
|
@@ -278,7 +283,7 @@ class CumulusPolicyGenerator(ABC):
|
|
|
278
283
|
action: SingleAction[CommunityActionValue],
|
|
279
284
|
) -> Iterator[Sequence[str]]:
|
|
280
285
|
if action.value.replaced is not None:
|
|
281
|
-
if action.value.added or action.value.
|
|
286
|
+
if action.value.added or action.value.removed:
|
|
282
287
|
raise NotImplementedError(
|
|
283
288
|
"Cannot set community together with add/replace on cumulus",
|
|
284
289
|
)
|
|
@@ -65,7 +65,7 @@ class PrefixListFilterGenerator(PartialGenerator, ABC):
|
|
|
65
65
|
"ip",
|
|
66
66
|
prefix_type,
|
|
67
67
|
name,
|
|
68
|
-
f"index {i *
|
|
68
|
+
f"index {i * 5 + 5}",
|
|
69
69
|
"permit",
|
|
70
70
|
str(addr_mask.ip).upper(),
|
|
71
71
|
str(addr_mask.network.prefixlen),
|
|
@@ -126,7 +126,7 @@ class PrefixListFilterGenerator(PartialGenerator, ABC):
|
|
|
126
126
|
prefix_type,
|
|
127
127
|
"prefix-list",
|
|
128
128
|
name,
|
|
129
|
-
f"seq {i *
|
|
129
|
+
f"seq {i * 5 + 5}",
|
|
130
130
|
"permit",
|
|
131
131
|
str(addr_mask.ip).upper(),
|
|
132
132
|
str(addr_mask.network.prefixlen),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|