From b3d2808561dc6dba24b85ce17a69ddb41570ac5c Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Fri, 6 Oct 2023 12:16:42 +0200 Subject: [PATCH] VLAN groups now support tags, remove convention extra-vlan adding Since netbox now supports tagging of VLAN groups, we can tag these groups and thus not have to rely on some lose convention if and when a VLAN group should considered to be always an extra vlan. --- networking_ccloud/tools/netbox_config_gen.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/networking_ccloud/tools/netbox_config_gen.py b/networking_ccloud/tools/netbox_config_gen.py index 848bf947..3f2b4ecb 100644 --- a/networking_ccloud/tools/netbox_config_gen.py +++ b/networking_ccloud/tools/netbox_config_gen.py @@ -382,15 +382,6 @@ def make_infra_networks_and_extra_vlans(self, iface: NbRecord, svis: Dict[NbReco extra_vlans.add(vlan.vid) continue - # by convention we ignore certain VLAN groups member VLANs, once we upgrade to netbox 3.x we shall remove - # this as VLAN groups will then support tags - if vlan.group and ( - (vlan.group.slug.startswith(self.region) and vlan.group.slug.endswith('cp')) - or vlan.group.slug == f'{self.region}-regional' - or vlan.group.slug == 'global-cc-core-transit'): - extra_vlans.add(vlan.vid) - continue - mandatory_attrs = ('vid', 'tenant') for attr in mandatory_attrs: if not getattr(vlan, attr, None):