1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fix #11478 - Add vc_interfaces flag to control selection of VC interfaces (#13296)

* Add `vc_interfaces` flag to control interface queryset

* Fix test failure

* Add new filters instead of using undocumented query params

* Cleanup filterset, add test

* Rename filter and re-introduce virtual_chassis filtering method (required)

* Fix test

* Adjust tests to more accurately provide coverage

* Add breaking change note

* Misc cleanup

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
Daniel Sheppard
2023-08-30 08:33:02 -05:00
committed by GitHub
parent aebf3288d1
commit 1854a6b76b
4 changed files with 96 additions and 52 deletions

View File

@ -1111,7 +1111,7 @@ class InterfaceForm(InterfaceCommonForm, ModularDeviceComponentForm):
required=False,
label=_('Parent interface'),
query_params={
'device_id': '$device',
'virtual_chassis_member_id': '$device',
}
)
bridge = DynamicModelChoiceField(
@ -1119,7 +1119,7 @@ class InterfaceForm(InterfaceCommonForm, ModularDeviceComponentForm):
required=False,
label=_('Bridged interface'),
query_params={
'device_id': '$device',
'virtual_chassis_member_id': '$device',
}
)
lag = DynamicModelChoiceField(
@ -1127,7 +1127,7 @@ class InterfaceForm(InterfaceCommonForm, ModularDeviceComponentForm):
required=False,
label=_('LAG interface'),
query_params={
'device_id': '$device',
'virtual_chassis_member_id': '$device',
'type': 'lag',
}
)