18296 Add Tenancy to VLAN Groups (#18690)

* 18296 add tenant to vlan groups

* 18296 add tenant to vlan groups

* 18296 add tenant to vlan groups

* 18296 add tenant to vlan groups

* 18296 review changes
This commit is contained in:
Arthur Hanson
2025-02-25 06:13:30 -08:00
committed by GitHub
parent ef89fc1264
commit 08b2fc424a
12 changed files with 105 additions and 12 deletions

View File

@@ -598,7 +598,7 @@ class FHRPGroupAssignmentForm(forms.ModelForm):
return group
class VLANGroupForm(NetBoxModelForm):
class VLANGroupForm(TenancyForm, NetBoxModelForm):
slug = SlugField()
vid_ranges = NumericRangeArrayField(
label=_('VLAN IDs')
@@ -621,12 +621,13 @@ class VLANGroupForm(NetBoxModelForm):
FieldSet('name', 'slug', 'description', 'tags', name=_('VLAN Group')),
FieldSet('vid_ranges', name=_('Child VLANs')),
FieldSet('scope_type', 'scope', name=_('Scope')),
FieldSet('tenant_group', 'tenant', name=_('Tenancy')),
)
class Meta:
model = VLANGroup
fields = [
'name', 'slug', 'description', 'vid_ranges', 'scope_type', 'tags',
'name', 'slug', 'description', 'vid_ranges', 'scope_type', 'tenant_group', 'tenant', 'tags',
]
def __init__(self, *args, **kwargs):