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

Add capability to clone items #33

Closed
bellwood opened this issue Jun 27, 2016 · 7 comments
Closed

Add capability to clone items #33

bellwood opened this issue Jun 27, 2016 · 7 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation
Milestone

Comments

@bellwood
Copy link
Contributor

It would be nice to be able to duplicate items where in only the name or other small bit of information is different.

Use case, I have a few different 0U PDU's all with 24 ports, being able to dupe them would be nice

@bellwood bellwood changed the title Item duplication - Enhancement request Item duplication Jun 28, 2016
@bellwood bellwood changed the title Item duplication [Feature] Item duplication Jun 29, 2016
@mdlayher mdlayher changed the title [Feature] Item duplication Add capability to duplicate items Jun 30, 2016
@jeremystretch jeremystretch changed the title Add capability to duplicate items Add capability to clone items Dec 5, 2016
@Armadill0
Copy link

I would also appreciate such a feature. My colleagues have to create several devices per week which are almost the same. This would massively enhance the speed of creating new devices.

@ghost
Copy link

ghost commented Feb 8, 2017

Following along

@33Fraise33
Copy link

Are there any plans on implementing this feature? Even though it's a "minor feature" it speeds up the process of documenting big installations with equal products of which only the serial number and name are different.

@bdlamprecht
Copy link
Contributor

bdlamprecht commented Oct 4, 2018

Just for informational purposes, I'm adding my comments from NTC Slack concerning this FR:

Yeah, if [this] FR could be extended to include ConfigContexts that would be great!

@lampwins lampwins reopened this Nov 13, 2018
@DanSheps
Copy link
Member

If someone could extend this to include what they would like to see cloned on the individual models (Ex: Device, do we want: Interfaces, Front Ports, Rear Ports, Console, Power? What about IP Addresses? What about VLANs?)

@33Fraise33
Copy link

My idea is the following:

user clicks clone:
The create device form opens with all items filled in from the previous device. That way the most items can be unchanged but the things needed can be changed.

@candlerb
Copy link
Contributor

candlerb commented Apr 3, 2019

@DanSheps:

If someone could extend this to include what they would like to see cloned on the individual models (Ex: Device, do we want: Interfaces, Front Ports, Rear Ports, Console, Power? What about IP Addresses? What about VLANs?)

When you clone a Device, I would say the simplest approach is to give it fresh ports from the Device Type template.

For example: you definitely don't want to copy interface MAC addresses from the original device. It's very unlikely you want to duplicate linked IP addresses, which result in conflicts. I suppose sometimes you might want interface descriptions copied, but other times not (e.g. if description gives specific use case or customer reference)

So having a clean set of components would be fine IMO.

@33Fraise33:

user clicks clone:
The create device form opens with all items filled in from the previous device.

That's a fine suggestion. However the form for creating a device does not include Interfaces (or other components like power ports), and if it did, the Interfaces wouldn't include IP Addresses. This would require the device creation form to be a nested form - which would be a nice feature, but is a separate issue.

Creating the set of components from the Device Type template is (I think) the least surprising behaviour, since this is what a normal Device create does, and indeed is built into the model in Device.save


There is a related issue: in the case of a Virtual Machine, there is no equivalent to Device Type (#1492). Cloning a virtual machine could copy the named set of interfaces from the source, but clean them up (remove MAC/description). If the same logic were implemented for Device I'd be fine with that too.

This could be done by including a hidden field containing either a reference to the source device/VM, or a list of interfaces to create; and probably some text showing what interfaces are going to be created.

(Aside: VMs would particularly benefit from having a nested form, allowing you to create one or more interfaces at the time of creating a VM. A VM with no interfaces is useless, and it's painful to have to go through three different steps: create VM, add interface, add IP address. But that's a point for #1492)

@jeremystretch jeremystretch modified the milestone: v2.7 Jun 24, 2019
@netbox-community netbox-community deleted a comment from luisfer12 Dec 6, 2019
@jeremystretch jeremystretch self-assigned this Dec 6, 2019
jeremystretch added a commit that referenced this issue Dec 6, 2019
@jeremystretch jeremystretch added this to the v2.7 milestone Dec 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants