Prefix export fails when importing back in due to VRF name instead of RD #3026

Closed
opened 2025-12-29 18:24:53 +01:00 by adam · 1 comment
Owner

Originally created by @nomad-cyanide on GitHub (Nov 22, 2019).

Environment

  • Python version: 2.7.5 - python3 = 3.6.8
  • NetBox version: 2.6.7

Steps to Reproduce

  1. Make sure you have prefixes defined in a VRF other than Global and those VRF's have both name and RD defined
  2. Open /ipam/prefixes/
  3. Click Export to export all prefixes defined. Save file locally
  4. Take a clean install of Netbox (I have a test instance) where VRF's are already defined. (also imported the same way from prod)
  5. Open /ipam/prefixes/
  6. Click Import and paste the contents of the export from step 3 into the import box
  7. Watch it complain that VRF is not found. Because RD is not exported and Import-function expects RD to be defined.

To be able to export prefixes and import it into a clean Netbox installation for testing purposes.

Prefixes attached to other VRF's than Global could not be imported, because RD is not defined in the exported output. RD need to be included in the prefix-export output, rather than the VRF-name.

Originally created by @nomad-cyanide on GitHub (Nov 22, 2019). <!-- NOTE: This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss 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. --> ### Environment * Python version: 2.7.5 - python3 = 3.6.8 * NetBox version: 2.6.7 ### Steps to Reproduce 1. Make sure you have prefixes defined in a VRF other than Global and those VRF's have both name and RD defined 2. Open /ipam/prefixes/ 3. Click Export to export all prefixes defined. Save file locally 4. Take a clean install of Netbox (I have a test instance) where VRF's are already defined. (also imported the same way from prod) 5. Open /ipam/prefixes/ 6. Click Import and paste the contents of the export from step 3 into the import box 7. Watch it complain that VRF is not found. Because RD is not exported and Import-function expects RD to be defined. <!-- What did you expect to happen? --> To be able to export prefixes and import it into a clean Netbox installation for testing purposes. <!-- What happened instead? --> Prefixes attached to other VRF's than Global could not be imported, because RD is not defined in the exported output. RD need to be included in the prefix-export output, rather than the VRF-name.
adam added the status: duplicate label 2025-12-29 18:24:53 +01:00
adam closed this issue 2025-12-29 18:24:53 +01:00
Author
Owner

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

This is addressed by #3676

@jeremystretch commented on GitHub (Nov 22, 2019): This is addressed by #3676
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3026