Change IP/Prefix Import to use VRF Name instead of VRF RD #3001

Closed
opened 2025-12-29 18:24:38 +01:00 by adam · 5 comments
Owner

Originally created by @Wally1169 on GitHub (Nov 6, 2019).

Environment

  • Python version: 3.6.7
  • NetBox version: 2.6.6

Proposed Functionality

IP Prefix Import, VRF field currently only imports based on the RD assigned to the VRF. Per Jeremy Stretch, this is because RD used to be a required field, but is no longer. With Name now being the only required field on VRF, it might make more sense to import the VRF field of the IP Prefix using the VRF Name instead of the RD.

Use Case

Simplified import for users using VRFs not for a situation involving RDs (i.e. MPLS) but instead using it to just group IP Prefixes into a logical grouping

Database Changes

None known

External Dependencies

None known

Originally created by @Wally1169 on GitHub (Nov 6, 2019). ### Environment * Python version: 3.6.7 * NetBox version: 2.6.6 ### Proposed Functionality IP Prefix Import, VRF field currently only imports based on the RD assigned to the VRF. Per Jeremy Stretch, this is because RD used to be a required field, but is no longer. With Name now being the only required field on VRF, it might make more sense to import the VRF field of the IP Prefix using the VRF Name instead of the RD. ### Use Case Simplified import for users using VRFs not for a situation involving RDs (i.e. MPLS) but instead using it to just group IP Prefixes into a logical grouping ### Database Changes None known ### External Dependencies None known
adam added the status: acceptedtype: feature labels 2025-12-29 18:24:38 +01:00
adam closed this issue 2025-12-29 18:24:38 +01:00
Author
Owner

@Wally1169 commented on GitHub (Nov 6, 2019):

Addendum: this would also theoretically apply to the IP Address Import as well

@Wally1169 commented on GitHub (Nov 6, 2019): Addendum: this would also theoretically apply to the IP Address Import as well
Author
Owner

@jeremystretch commented on GitHub (Nov 6, 2019):

One issue here is that the VRF name is not unique, whereas the RD (if present) is.

@jeremystretch commented on GitHub (Nov 6, 2019): One issue here is that the VRF name is not unique, whereas the RD (if present) is.
Author
Owner

@Wally1169 commented on GitHub (Nov 6, 2019):

That's an viable and excellent point

@Wally1169 commented on GitHub (Nov 6, 2019): That's an viable and excellent point
Author
Owner

@jeremystretch commented on GitHub (Nov 6, 2019):

This really hits on a recurring theme, where it would be nice to have control over the field through which we reference a related object. Maybe something like

vrf.name,prefix,status
FooBarVRF,192.0.2.0/24,Active

for importing by VRF name, and

vrf.rd,prefix,status
65000:123,192.0.2.0/24,Active

for importing by VRF RD. I'm not sure how complicated that would get as far as the CSV import form goes though. We'd also still need a default behavior for the field.

@jeremystretch commented on GitHub (Nov 6, 2019): This really hits on a recurring theme, where it would be nice to have control over the field through which we reference a related object. Maybe something like ``` vrf.name,prefix,status FooBarVRF,192.0.2.0/24,Active ``` for importing by VRF name, and ``` vrf.rd,prefix,status 65000:123,192.0.2.0/24,Active ``` for importing by VRF RD. I'm not sure how complicated that would get as far as the CSV import form goes though. We'd also still need a default behavior for the field.
Author
Owner

@Wally1169 commented on GitHub (Nov 6, 2019):

That's a really cool idea. Hope you're able to implement it

@Wally1169 commented on GitHub (Nov 6, 2019): That's a really cool idea. Hope you're able to implement it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3001