mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-23 12:08:43 -06:00
* feat(dcim): Add VLAN mode filter to CommonInterface Introduces a new FilterSet for VLAN mode in CommonInterfaceFilterSet. This allows filtering interfaces based on their VLAN mode using defined choices. * feat(dcim): Add VLAN mode filter to Interface FilterForm Add a field to InterfaceFilterSet to filter interfaces by 802.1Q VLAN mode. * feat(virtualization): Add VLAN mode filter to VMInterface Add a field to VMInterfaceFilterSet to filter interfaces by 802.1Q VLAN mode. * fix(dcim): Correct mode filter parameter type in tests Updates the `mode` filter parameter to accept a list instead of a single value in `test_filtersets.py`. Ensures proper count assertion for accurate test behavior. * feat(virtualization): Add tests for VLAN mode filtering Introduces tests to validate filtering by `mode` for VMInterface. Ensures correct filtering for 802.1Q VLAN mode. * refactor(virtualization): Reorganize FieldSets in FilterSets Splits the 'Attributes' FieldSet into two distinct FieldSets for better clarity: 'Attributes' and 'Addressing'. This improves form organization and makes it more intuitive for users.
This commit is contained in:
@@ -4153,7 +4153,7 @@ class InterfaceTestCase(TestCase, DeviceComponentFilterSetTests, ChangeLoggedFil
|
||||
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 4)
|
||||
|
||||
def test_mode(self):
|
||||
params = {'mode': InterfaceModeChoices.MODE_ACCESS}
|
||||
params = {'mode': [InterfaceModeChoices.MODE_ACCESS]}
|
||||
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 1)
|
||||
|
||||
def test_description(self):
|
||||
|
||||
Reference in New Issue
Block a user