Browse Source

Added VRF to IPAddressFilter

Jeremy Stretch 9 years ago
parent
commit
6b2ac57309
1 changed files with 7 additions and 0 deletions
  1. 7 0
      netbox/ipam/forms.py

+ 7 - 0
netbox/ipam/forms.py

@@ -335,8 +335,15 @@ def ipaddress_family_choices():
     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):
     family = forms.ChoiceField(required=False, choices=ipaddress_family_choices, label='Address Family')
+    vrf = forms.ChoiceField(required=False, choices=ipaddress_vrf_choices, label='VRF')
 
 
 #