|
6 | 6 | from dcim.models import * |
7 | 7 | from extras.forms import LocalConfigContextFilterForm |
8 | 8 | from extras.models import ConfigTemplate |
9 | | -from ipam.models import ASN, VRF |
| 9 | +from ipam.models import ASN, VRF, VLANTranslationPolicy |
10 | 10 | from netbox.choices import * |
11 | 11 | from netbox.forms import NetBoxModelFilterSetForm |
12 | 12 | from tenancy.forms import ContactModelFilterForm, TenancyFilterForm |
@@ -1332,7 +1332,7 @@ class InterfaceFilterForm(PathEndpointFilterForm, DeviceComponentFilterForm): |
1332 | 1332 | FieldSet('name', 'label', 'kind', 'type', 'speed', 'duplex', 'enabled', 'mgmt_only', name=_('Attributes')), |
1333 | 1333 | FieldSet('vrf_id', 'l2vpn_id', 'mac_address', 'wwn', name=_('Addressing')), |
1334 | 1334 | FieldSet('poe_mode', 'poe_type', name=_('PoE')), |
1335 | | - FieldSet('mode', name=_('802.1Q Switching')), |
| 1335 | + FieldSet('mode', 'vlan_translation_policy_id', name=_('802.1Q Switching')), |
1336 | 1336 | FieldSet('rf_role', 'rf_channel', 'rf_channel_width', 'tx_power', name=_('Wireless')), |
1337 | 1337 | FieldSet('region_id', 'site_group_id', 'site_id', 'location_id', 'rack_id', name=_('Location')), |
1338 | 1338 | FieldSet( |
@@ -1409,6 +1409,11 @@ class InterfaceFilterForm(PathEndpointFilterForm, DeviceComponentFilterForm): |
1409 | 1409 | required=False, |
1410 | 1410 | label=_('802.1Q mode') |
1411 | 1411 | ) |
| 1412 | + vlan_translation_policy_id = DynamicModelMultipleChoiceField( |
| 1413 | + queryset=VLANTranslationPolicy.objects.all(), |
| 1414 | + required=False, |
| 1415 | + label=_('VLAN Translation Policy') |
| 1416 | + ) |
1412 | 1417 | rf_role = forms.MultipleChoiceField( |
1413 | 1418 | choices=WirelessRoleChoices, |
1414 | 1419 | required=False, |
|
0 commit comments