|
5 | 5 | from dcim.models import Device, DeviceRole, Location, Platform, Region, Site, SiteGroup
|
6 | 6 | from extras.forms import LocalConfigContextFilterForm
|
7 | 7 | from extras.models import ConfigTemplate
|
8 |
| -from ipam.models import VRF |
| 8 | +from ipam.models import VRF, VLANTranslationPolicy |
9 | 9 | from netbox.forms import NetBoxModelFilterSetForm
|
10 | 10 | from tenancy.forms import ContactModelFilterForm, TenancyFilterForm
|
11 | 11 | from utilities.forms import BOOLEAN_WITH_BLANK_CHOICES
|
@@ -202,7 +202,7 @@ class VMInterfaceFilterForm(NetBoxModelFilterSetForm):
|
202 | 202 | FieldSet('q', 'filter_id', 'tag'),
|
203 | 203 | FieldSet('cluster_id', 'virtual_machine_id', name=_('Virtual Machine')),
|
204 | 204 | FieldSet('enabled', 'mac_address', 'vrf_id', 'l2vpn_id', name=_('Attributes')),
|
205 |
| - FieldSet('mode', name=_('802.1Q Switching')), |
| 205 | + FieldSet('mode', 'vlan_translation_policy_id', name=_('802.1Q Switching')), |
206 | 206 | )
|
207 | 207 | selector_fields = ('filter_id', 'q', 'virtual_machine_id')
|
208 | 208 | cluster_id = DynamicModelMultipleChoiceField(
|
@@ -244,6 +244,11 @@ class VMInterfaceFilterForm(NetBoxModelFilterSetForm):
|
244 | 244 | required=False,
|
245 | 245 | label=_('802.1Q mode')
|
246 | 246 | )
|
| 247 | + vlan_translation_policy_id = DynamicModelMultipleChoiceField( |
| 248 | + queryset=VLANTranslationPolicy.objects.all(), |
| 249 | + required=False, |
| 250 | + label=_('VLAN Translation Policy') |
| 251 | + ) |
247 | 252 | tag = TagFilterField(model)
|
248 | 253 |
|
249 | 254 |
|
|
0 commit comments