netbox
netbox copied to clipboard
Prevent the deletion of device components with a cable attached
NetBox version
v3.3-beta1
Feature type
Change to existing functionality
Proposed functionality
Prevent the deletion of a device component (e.g. interface, console port, etc.) or other object to which a cable is terminated. The cable must be disconnected before the object can be deleted.
Use case
This behavior was originally proposed in #5418 but never acted upon. However, it deserves to be revisited in v3.3 because the cabling model has changed. Previously, deleting a terminating object (e.g. an interface) forced the deletion of an attached cable, because each cable must have both its A and B terminations defined. However, in v3.3 and later, this is no longer a strict requirement: It's possible to have a cable with only end terminated.
Requiring the user to first disconnect any attached cable prior to deleting the terminating object introduces a new step in the workflow, but with the benefits of guarding against inadvertent deletions and preventing "orphaned" cables.
Related: #9778
Database changes
No response
External dependencies
No response
One possible behavior is: If deleting interface with cable attached.
- remove that particular endpoint from the cable
-
- if no more endpoints exist for the cable, delete the cable
- delete the interface This for me, would be the 'expected' result.
But having it be a manual step is also consistent with the rest of the Netbox experience.
With this new workflow, there is a possibility to treat cables as a new type of physical asset (not sure if it can "live" without any connection though). This makes sense for "expensive" cables such highspeed AOC or DAC, and for splitter cables of course. It would probably require new attributes such "serial number" and "asset id", but these can already be implemented as custom fields.
With that in mind I think the proposed workflow (i.e. explicit disconnect before delete) is better than implicit delete because it allows to use netbox to track cable items if needed.
In my experience, cables have the following characteristics:
- Most have manufacturers and model numbers; Not always useful to track, but could be nice to have this information documented where applicable. We could also introduce the "CableTemplate" model to automatically populate cable color/length/etc.
- Most have serial numbers (could be useful to track them in netbox to inventory those that have a serial number, and find them in netbox by their serial)
- They are often left in place in the datacenter environment and forgotten... Leaving an unterminated cable in netbox could be useful to track them down and either re-use them or task someone to remove them.
Obviously 1. and 2. above would probably benefit from their own feature request. Only 3. applies to this issue.
I think this is an important conversation. From an optical network engineer's perspective, each cable has specific and important characteristics that are specified in the design, tested in the installation, and updated during operation/maintenance.
To me, cables should be first class objects, as in reality they are a critical part of Layer 1 and warrant that level of treatment as part of the system. The recent changes to 3.3 that allows the editing of cables is an important step in that direction, and tracking link state and protecting against either devices or cables that are attached as part of the link makes sense.
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. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
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.