Skip to content

Commit

Permalink
VLAN groups now support tags, remove convention extra-vlan adding
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
swagner-de committed Nov 3, 2023
1 parent 433bec8 commit b3d2808
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions networking_ccloud/tools/netbox_config_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit b3d2808

Please sign in to comment.