Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to bulk import multiple objects #15875

Closed
dmulyalin opened this issue Apr 27, 2024 · 2 comments
Closed

Support to bulk import multiple objects #15875

dmulyalin opened this issue Apr 27, 2024 · 2 comments
Labels
type: feature Introduction of new functionality to the application

Comments

@dmulyalin
Copy link

dmulyalin commented Apr 27, 2024

NetBox version

v3.7.6

Feature type

New functionality

Proposed functionality

Add support to import multiple objects into Netbox using YAML/JSON files of this structure:

dcim:
  sites:
    - <list of sites data>
  racks:
    - <list of racks data>
  devices:
    - <list of devices data>
ipam:
  prefixes:
    - <list of prefixes data>
  ip_addresses:
    - <list of IP addresses data>
<...>

Import dictionary structure follows Netbox API endpoints.

Use case

Currently to model single site need to use this list of import CSV spreadsheets (or more in some cases):

  • site_data.csv
  • rack_data.csv
  • devices_data.csv
  • modules_data.csv
  • inventory_items_data.csv
  • interfaces_data.csv
  • cables_data.csv
  • vlans_data.csv
  • bgp_asn_data.csv
  • prefixes_data.csv
  • ip_addresses_data.csv
  • circuits_data.csv

which is fine for initial import of many locations for example during brown field network onboarding into Netbox. However, modifying 10+ spreadsheets for addition of each new site is tedious especially if only few parameters changing such as site ID and IP addresses.

Being able to put a single YAML/JSON file to import all site data would simplify the process of onboarding new sites significantly. Moreover, this would allow to templatize entire portions of the network for importing into Netbox.

For example, DC-1 was imported into Netbox using YAML/JSON bulk import file, next DC-2 being built, import of entire new data center would be a mater of modifying DC-1 file to adjust few changing parameters.

Another use case could be, brown field network onboarding - organization can develop a script that will be producing bulk import data files, out of network discovery data (SNMP, device configurations, Netconf etc) allowing Engineers to review the file before import prior to uploading it into Netbox.

For many organization (from my past and current experience) it would be a game changing functionality, if they have to onboard hundreds of nearly identical sites into Netbox on frequent basis or build multiple nearly identical network segments (i.e. data centers, office campuses etc.).

Database changes

None

External dependencies

None

@dmulyalin dmulyalin added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Apr 27, 2024
@dmulyalin
Copy link
Author

Possible WEB UI location for this functionality could be Operations -> Integrations -> Bulk Import

@jeremystretch
Copy link
Member

We've considered this in the past, but there's simply too much complexity involved with importing multiple types of objects simultaneously to handle validation in a performant and user-friendly manner. For instances where you need to import many objects, we recommend either automatically consuming the REST API or writing a purpose-built custom script to ensure all operations occur in the anticipated sequence.

@jeremystretch jeremystretch closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
@jeremystretch jeremystretch removed their assignment Apr 29, 2024
@jeremystretch jeremystretch removed the status: needs triage This issue is awaiting triage by a maintainer label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants