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

Added VRF to IPAddressFilter

This commit is contained in:
Jeremy Stretch
2016-03-04 11:41:48 -05:00
parent c036db2677
commit 6b2ac57309

View File

@ -335,8 +335,15 @@ def ipaddress_family_choices():
return [('', 'All'), (4, 'IPv4'), (6, 'IPv6')] return [('', 'All'), (4, 'IPv4'), (6, 'IPv6')]
def ipaddress_vrf_choices():
vrf_choices = [('', 'All'), (0, 'Global')]
vrf_choices += [(v.pk, v.name) for v in VRF.objects.all()]
return vrf_choices
class IPAddressFilterForm(forms.Form, BootstrapMixin): class IPAddressFilterForm(forms.Form, BootstrapMixin):
family = forms.ChoiceField(required=False, choices=ipaddress_family_choices, label='Address Family') family = forms.ChoiceField(required=False, choices=ipaddress_family_choices, label='Address Family')
vrf = forms.ChoiceField(required=False, choices=ipaddress_vrf_choices, label='VRF')
# #