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

Enable CSV export for organizational objects (device roles, VLAN groups, etc.) #1714

Closed
cimnine opened this issue Nov 15, 2017 · 9 comments
Closed
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@cimnine
Copy link
Contributor

cimnine commented Nov 15, 2017

Issue type

[X] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.4
  • NetBox version: 2.2.5

Description

It'd be nice to export/import device roles the same way as device types.

@jeremystretch
Copy link
Member

Support for CSV import of device roles was introduced in NetBox v2.2.0. Device roles can be exported via the API; I don't think there's much value in adding CSV export for them.

@cimnine
Copy link
Contributor Author

cimnine commented Nov 15, 2017

I'd use it for migrating easily between staging/production.

On another note, the CSV import button is only present in the menu, but not on the /dcim/device-roles/ page. That's why I didn't even realise there's the option for CSV import.

@Senetus
Copy link

Senetus commented Nov 15, 2017

To migrate between servers easiest would be to just dump and restore the database instead of one by one export and import. But that's of course only the way I see it.

@jeremystretch
Copy link
Member

I'd use it for migrating easily between staging/production.

Just so I understand, are you running separate instances of NetBox for staging and production? Or what do you mean?

On another note, the CSV import button is only present in the menu, but not on the /dcim/device-roles/ page.

Yeah we should add those. I'll open a separate bug for that.

@cimnine
Copy link
Contributor Author

cimnine commented Nov 15, 2017

easiest would be to just dump and restore the database

@esajo I don't want to overwrite any (other) data that is already on the production instance.

Just so I understand, are you running separate instances of NetBox for staging and production? Or what do you mean?

Yes. Two instances. Plus devs usually spin up a local Docker-based instance for developing integrations.

@jeremystretch jeremystretch added the type: feature Introduction of new functionality to the application label Nov 15, 2017
@jeremystretch jeremystretch changed the title Export/Import of Device Roles CSV export for device roles Nov 15, 2017
@bdlamprecht
Copy link
Contributor

I'd like to see this feature as well.

I'm doing the same thing as @cimnine is, my development boxes are based off of docker, which get thrown away frequently, so allowing a mass export would be very beneficial instead.

I was able to use the API to export the device_roles from my dev box and use an online JSON to CSV converter in the interim until this is implemented.

@jeremystretch
Copy link
Member

So, this FR is really more for CSV-based export of all organizational objects, not just device roles, right?

@jeremystretch jeremystretch changed the title CSV export for device roles Enable CSV export for organizational objects (device roles, VLAN groups, etc.) Jan 26, 2018
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Jan 26, 2018
@cimnine
Copy link
Contributor Author

cimnine commented Feb 4, 2018

Thanks!

@jeremystretch
Copy link
Member

Did a lot of cleanup around CSV import/export. Still want to add some tests specifically for it.

This was referenced Feb 21, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

4 participants