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

@@ -438,10 +438,17 @@ class VLANGroupImportForm(NetBoxModelImportForm):
vid_ranges = NumericRangeArrayField(
required=False
)
tenant = CSVModelChoiceField(
label=_('Tenant'),
queryset=Tenant.objects.all(),
required=False,
to_field_name='name',
help_text=_('Assigned tenant')
)
class Meta:
model = VLANGroup
fields = ('name', 'slug', 'scope_type', 'scope_id', 'vid_ranges', 'description', 'tags')
fields = ('name', 'slug', 'scope_type', 'scope_id', 'vid_ranges', 'tenant', 'description', 'tags')
labels = {
'scope_id': 'Scope ID',
}