Device type "All Data" export #6058

Closed
opened 2025-12-29 19:36:11 +01:00 by adam · 4 comments
Owner

Originally created by @AndMrzv on GitHub (Feb 7, 2022).

NetBox version

v3.0.11

Feature type

Change to existing functionality

Proposed functionality

It is more about "observed behavior" rather than "proposed functionality" but classifying this as bug didn't seem quite fitting.
Having export/import for Device Types working the same proper way as it does for any other object would be nice, including multi-record import.

Use case

For some reason Device Type export/import differs from every other, see pictures attached. It is the same in v3.1.7.
Exporting Device Types using "All data" option now produces YAML file not containing any custom fields data making it effectively useless for further importing (more so if any of omitted custom fields are set as required).
Снимок экрана от 2022-02-04 18-31-34
Снимок экрана от 2022-02-04 18-32-06

Database changes

No response

External dependencies

No response

Originally created by @AndMrzv on GitHub (Feb 7, 2022). ### NetBox version v3.0.11 ### Feature type Change to existing functionality ### Proposed functionality It is more about "observed behavior" rather than "proposed functionality" but classifying this as bug didn't seem quite fitting. Having export/import for Device Types working the same proper way as it does for any other object would be nice, including multi-record import. ### Use case For some reason Device Type export/import differs from every other, see pictures attached. It is the same in v3.1.7. Exporting Device Types using "All data" option now produces YAML file not containing any custom fields data making it effectively useless for further importing (more so if any of omitted custom fields are set as required). ![Снимок экрана от 2022-02-04 18-31-34](https://user-images.githubusercontent.com/99031446/152793202-44130147-33f1-46ed-a2a5-d37c96ecbb48.png) ![Снимок экрана от 2022-02-04 18-32-06](https://user-images.githubusercontent.com/99031446/152793576-c514636b-7bf1-4e1f-a475-0b0fcc113e7a.png) ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurepending closure labels 2025-12-29 19:36:11 +01:00
adam closed this issue 2025-12-29 19:36:12 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 7, 2022):

For some reason Device Type export/import differs from every other

And it's a very good reason: Device type import supports the inclusion of component templates as well, which would not be possible using CSV import.

Exporting Device Types using "All data" option now produces YAML file not containing any custom fields data making it effectively useless for further importing (more so if any of omitted custom fields are set as required).

There's an argument to be made that custom fields should be included, but it wouldn't make sense to export this data directly back into NetBox.

@jeremystretch commented on GitHub (Feb 7, 2022): > For some reason Device Type export/import differs from every other And it's a very good reason: Device type import supports the inclusion of component templates as well, which would not be possible using CSV import. > Exporting Device Types using "All data" option now produces YAML file not containing any custom fields data making it effectively useless for further importing (more so if any of omitted custom fields are set as required). There's an argument to be made that custom fields should be included, but it wouldn't make sense to export this data directly back into NetBox.
Author
Owner

@AndMrzv commented on GitHub (Feb 7, 2022):

I believe "All Data" export should dump all data, custom fields included (at least this could be an option). I can work around that by creating a new Export Template and then editing the output to YAML but the import for a Device Type seems to not be allowing any custom fields no matter how I try to format them. Is there a way to import custom fields for Device Types?

There are cases for example when we need to add a bunch of Device Types similar to existent and (since "Clone" button would only clone basic fields) I was planning to export, edit a number of values in the file with a script and import the edited file back creating new Device Types. Can you suggest a better workflow I am not aware of without performing directly on the database?

@AndMrzv commented on GitHub (Feb 7, 2022): I believe "All Data" export should dump all data, custom fields included (at least this could be an option). I can work around that by creating a new Export Template and then editing the output to YAML but the import for a Device Type seems to not be allowing any custom fields no matter how I try to format them. Is there a way to import custom fields for Device Types? There are cases for example when we need to add a bunch of Device Types similar to existent and (since "Clone" button would only clone basic fields) I was planning to export, edit a number of values in the file with a script and import the edited file back creating new Device Types. Can you suggest a better workflow I am not aware of without performing directly on the database?
Author
Owner

@github-actions[bot] commented on GitHub (Apr 9, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Apr 9, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (May 9, 2022):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (May 9, 2022): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6058