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

Cloning a DeviceType should include all components #16711

Open
llamafilm opened this issue Jun 24, 2024 · 4 comments
Open

Cloning a DeviceType should include all components #16711

llamafilm opened this issue Jun 24, 2024 · 4 comments
Assignees
Labels
status: revisions needed This issue requires additional information to be actionable type: feature Introduction of new functionality to the application

Comments

@llamafilm
Copy link

llamafilm commented Jun 24, 2024

NetBox version

v4.0.5

Feature type

Change to existing functionality

Proposed functionality

When cloning a Device Type, the clone should include all components (Interfaces, Power Ports, Power Outlets, Console/Front/Rear Ports, Module/Device Bays, and Inventory Items).

Use case

Today, cloning only includes manufacturer, default platform, height, full-depth, parent/child, and weight. But the word "clone" implies that the new object should match the original as closely as possible.

Every time I clone a Device Type, it takes extra time to recreate all these components. Most of the time the components are identical. Even if not identical, they should be very similar, so it's faster to modify them instead of recreating. If the components are so different that this behavior is not desirable, then I think cloning doesn't really make sense and it would be better to create a new device from scratch.

Examples:

  • Cloning an Arista CCS-720XP-24Y6-F to make a CCS-720XP-24ZY4-F. This requires recreating 30 interfaces, a console port, and 2 module bays. Ideally, after cloning you would just have to bulk-edit the interfaces to change 1G to 2.5G.

  • Cloning a Supermicro 7048GP to a 7049GP. This requires recreating 2 power ports and 3 interfaces. I'd also like to model PCIe slots as module bays in the future, and cloning those components would help there too.

  • Cloning a Mac Studio 2022 to a Mac Studio 2023. This requires cloning 2 interfaces and a power port.

Database changes

I don't think so

External dependencies

No response

@llamafilm llamafilm added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Jun 24, 2024
@jeremystretch jeremystretch removed their assignment Jun 25, 2024
@jeremystretch
Copy link
Member

Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our contributing guide, a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.

@jeremystretch jeremystretch added status: revisions needed This issue requires additional information to be actionable and removed status: needs triage This issue is awaiting triage by a maintainer labels Jun 25, 2024
@jeremystretch jeremystretch self-assigned this Jun 25, 2024
@sleepinggenius2
Copy link
Contributor

Cloning a device type can be accomplished by exporting it as YAML, making the necessary changes to the YAML file, then re-importing it. Unfortunately, there are some fields that are currently missing from the YAML export, like description, custom fields, and tags, so it's a little frustrating, but it does get you all the components at least. It would be nice to see the missing fields from the YAML be addressed. Maybe that would be sufficient to get what you're looking for in this issue?

@llamafilm
Copy link
Author

@sleepinggenius2 thanks, that's a good idea. If custom fields were included, that would a good workaround, although I would prefer doing it in the GUI.

@llamafilm llamafilm changed the title Cloning a DeviceType should include all components and custom fields Cloning a DeviceType should include all components Jun 26, 2024
@llamafilm
Copy link
Author

I just realized there is already an is_cloneable boolean on custom fields so I edited the request to be only about components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: revisions needed This issue requires additional information to be actionable type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants