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

Device Type Clones #4065

Closed
agrrajag opened this issue Jan 31, 2020 · 4 comments
Closed

Device Type Clones #4065

agrrajag opened this issue Jan 31, 2020 · 4 comments
Labels
type: feature Introduction of new functionality to the application

Comments

@agrrajag
Copy link
Contributor

Environment

  • Python version: 3.6.9
  • NetBox version: 2.7.3

Steps to Reproduce

  1. Create a Device Type with information: Manufacturer, Model, Slug, Height
  2. After creation, go into the device type and add all necessary interfaces
  3. After interfaces are created, select the Clone button to clone the device type

Expected Behavior

When a device profile is cloned, it was expected that all the properties of that device type would clone, including interfaces.

Observed Behavior

The only thing that cloned was the Manufacturer name.

References

#33 and #3938

@kobayashi kobayashi added the type: feature Introduction of new functionality to the application label Feb 14, 2020
@kobayashi
Copy link
Contributor

I think this is expected behavior, so set enhancement label for this

@jeremystretch
Copy link
Member

Cloning merely pre-populates the form fields when creating a new object, based on the properties of the current object; it doesn't consider related objects at all. This behavior is global for all clonable objects in NetBox. For example, when you clone a VLAN, it doesn't replicate all the assigned VLANs.

Implementing this would require an entirely new view class. I don't really see it being worth development effort, particularly because a) device types typically don't have the same exact set of components, so you'll usually need to do some manual work anyway, and b) device types can be exported and imported in YAML format very quickly and easily.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Feb 14, 2020
@agrrajag
Copy link
Contributor Author

It would be nice if you were able to have interfaces/power ports/etc. added to the clone as well. It would take almost no time to recreate the values under the current behavior, but would save minutes per device if we were able to clone interfacing options as well. What has taken us the most time to document is setting up device types to populate the rack elevations, and this change of behavior would drastically reduce that time as most of our switches and servers are very similar and would only require minor tweaks after a clone.

If you did a YAML export, it looks like it exported all device types in a single file instead of just a selected object. When you import, would you import a single device type, or would you have to re-import the entire list?

@jeremystretch
Copy link
Member

I don't have anything to add beyond my comment above, and it looks like no one else does either, so I'm going to close this out.

When you import, would you import a single device type, or would you have to re-import the entire list?

Import is currently a single device type at a time. This is likely to change in the near future.

@jeremystretch jeremystretch removed the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Jul 24, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants