From 6b2ac5730974286f24c361b1022a44f4769036d2 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 4 Mar 2016 11:41:48 -0500 Subject: [PATCH] Added VRF to IPAddressFilter --- netbox/ipam/forms.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/netbox/ipam/forms.py b/netbox/ipam/forms.py index f0952debf..baf0cbd2e 100644 --- a/netbox/ipam/forms.py +++ b/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') #