Set VRF for available IPs to same VRF as parent prefix #4505

Closed
opened 2025-12-29 18:36:49 +01:00 by adam · 3 comments
Owner

Originally created by @gstorme on GitHub (Jan 27, 2021).

Originally assigned to: @nkeulen on GitHub.

Environment

  • Python version: 3.7.3
  • NetBox version: 2.10.1

Steps to Reproduce

  1. Create prefix in VRF Global
  2. Change VRF of the prefix to a specific VRF
  3. Go to /ipam/prefixes/{prefix-id}/ip-addresses/

Expected Behavior

The available IP's are preset to the VRF of the parent prefix.
When clicking the "x available IPs" button, it will create an IP with the VRF of the parent prefix.

When using the button "+ add an ip address", the VRF is set correctly since it's redirecting to /ipam/ip-addresses/add/?address=172.16.20.6/24&vrf=4&tenant_group=&tenant=

Observed Behavior

The available IP's are still linked to VRF Global.
When clicking the "x available IPs" button, it will create an IP with VRF Global.

image

Originally created by @gstorme on GitHub (Jan 27, 2021). Originally assigned to: @nkeulen on GitHub. <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reporting reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, please start a discussion instead: https://github.com/netbox-community/netbox/discussions Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.7.3 * NetBox version: 2.10.1 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Create prefix in VRF Global 2. Change VRF of the prefix to a specific VRF 3. Go to /ipam/prefixes/{prefix-id}/ip-addresses/ <!-- What did you expect to happen? --> ### Expected Behavior The available IP's are preset to the VRF of the parent prefix. When clicking the "x available IPs" button, it will create an IP with the VRF of the parent prefix. When using the button "+ add an ip address", the VRF is set correctly since it's redirecting to `/ipam/ip-addresses/add/?address=172.16.20.6/24&vrf=4&tenant_group=&tenant=` <!-- What happened instead? --> ### Observed Behavior The available IP's are still linked to VRF Global. When clicking the "x available IPs" button, it will create an IP with VRF Global. ![image](https://user-images.githubusercontent.com/3859276/105998755-43eac480-60ad-11eb-9b13-fadc94a38583.png)
adam added the status: acceptedtype: feature labels 2025-12-29 18:36:49 +01:00
adam closed this issue 2025-12-29 18:36:49 +01:00
Author
Owner

@ljb2of3 commented on GitHub (Feb 12, 2021):

@DanSheps I'd call this a bug, not a feature. As I get more non-networking folks using netbox to self-assign IPs this is going to cause significant confusion.

@ljb2of3 commented on GitHub (Feb 12, 2021): @DanSheps I'd call this a bug, not a feature. As I get more non-networking folks using netbox to self-assign IPs this is going to cause significant confusion.
Author
Owner

@DanSheps commented on GitHub (Feb 12, 2021):

I understand where you are coming from, but this isn't exactly a bug.

@DanSheps commented on GitHub (Feb 12, 2021): I understand where you are coming from, but this isn't exactly a bug.
Author
Owner

@nkeulen commented on GitHub (Feb 27, 2021):

This problem annoyed me too, I've fixed it in my local version.
I can put in a pull request for this one if someone can assign the issue to me.

I actually do think it is a bug by the way.
Some jinja template lines from netbox/ipam/tables.py are not getting included because some stuff got renamed I think.

Anyhow if someone can assign this issue to me, I'll add a pull request for it.

@nkeulen commented on GitHub (Feb 27, 2021): This problem annoyed me too, I've fixed it in my local version. I can put in a pull request for this one if someone can assign the issue to me. I actually do think it is a bug by the way. Some jinja template lines from netbox/ipam/tables.py are not getting included because some stuff got renamed I think. Anyhow if someone can assign this issue to me, I'll add a pull request for it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4505