mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	Fixes #3978: VRF filtering for NAT IP search
This commit is contained in:
		@@ -5,6 +5,7 @@
 | 
			
		||||
* [#3310](https://github.com/netbox-community/netbox/issues/3310) - Pre-select site/rack for B side when creating a new cable
 | 
			
		||||
* [#3338](https://github.com/netbox-community/netbox/issues/3338) - Include circuit terminations in API representation of circuits
 | 
			
		||||
* [#3509](https://github.com/netbox-community/netbox/issues/3509) - Add IP address variables for custom scripts
 | 
			
		||||
* [#3978](https://github.com/netbox-community/netbox/issues/3978) - Add VRF filtering to search NAT IP
 | 
			
		||||
* [#4005](https://github.com/netbox-community/netbox/issues/4005) - Include timezone context in webhook timestamps
 | 
			
		||||
 | 
			
		||||
## Bug Fixes
 | 
			
		||||
 
 | 
			
		||||
@@ -635,6 +635,17 @@ class IPAddressForm(BootstrapMixin, TenancyForm, ReturnURLForm, CustomFieldForm)
 | 
			
		||||
            }
 | 
			
		||||
        )
 | 
			
		||||
    )
 | 
			
		||||
    nat_vrf = forms.ModelChoiceField(
 | 
			
		||||
        queryset=VRF.objects.all(),
 | 
			
		||||
        required=False,
 | 
			
		||||
        label='VRF',
 | 
			
		||||
        widget=APISelect(
 | 
			
		||||
            api_url="/api/ipam/vrfs/",
 | 
			
		||||
            filter_for={
 | 
			
		||||
                'nat_inside': 'vrf_id'
 | 
			
		||||
            }
 | 
			
		||||
        )
 | 
			
		||||
    )
 | 
			
		||||
    nat_inside = ChainedModelChoiceField(
 | 
			
		||||
        queryset=IPAddress.objects.all(),
 | 
			
		||||
        chains=(
 | 
			
		||||
 
 | 
			
		||||
@@ -61,7 +61,7 @@
 | 
			
		||||
                    {% render_field form.nat_device %}
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="tab-pane" id="search">
 | 
			
		||||
                     
 | 
			
		||||
                  {% render_field form.nat_vrf %}
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
            {% render_field form.nat_inside %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user