Closes #18045: Enable adding a new MAC to an interface via quick add (#18200)

* Closes #18045: Enable adding a new MAC to an interface via quick add

* Misc cleanup
This commit is contained in:
Jeremy Stretch
2024-12-16 10:57:09 -05:00
committed by GitHub
parent 39ca3ce571
commit aa56b99566
6 changed files with 46 additions and 17 deletions

View File

@@ -1410,6 +1410,13 @@ class InterfaceForm(InterfaceCommonForm, ModularDeviceComponentForm):
required=False,
label=_('VRF')
)
primary_mac_address = DynamicModelChoiceField(
queryset=MACAddress.objects.all(),
label=_('Primary MAC address'),
required=False,
quick_add=True,
quick_add_params={'interface': '$pk'}
)
wwn = forms.CharField(
empty_value=None,
required=False,