Reject Device removal if interface connection exists #2128

Closed
opened 2025-12-29 17:22:31 +01:00 by adam · 2 comments
Owner

Originally created by @berahtlv on GitHub (Nov 18, 2018).

Environment

  • Python version: 3.5 - onwards
  • NetBox version: 2.4.7 - onwards

Proposed Functionality

Reject removal of Device if interface connection exists.

Use Case

As interface connections of not discoverable devices are manually entered, mistaken deletion of device can lead to loss of valuable information.

Database Changes

None.
As I understand, some back-end method that checks connection existence before deletion will be needed.

External Dependencies

No additional.

Originally created by @berahtlv on GitHub (Nov 18, 2018). ### Environment * Python version: 3.5 - onwards * NetBox version: 2.4.7 - onwards ### Proposed Functionality Reject removal of Device if interface connection exists. ### Use Case As interface connections of not discoverable devices are manually entered, mistaken deletion of device can lead to loss of valuable information. ### Database Changes None. As I understand, some back-end method that checks connection existence before deletion will be needed. ### External Dependencies No additional.
adam closed this issue 2025-12-29 17:22:31 +01:00
Author
Owner

@DanSheps commented on GitHub (Nov 18, 2018):

Personally, I don't see a use for this. You get promoted a "are you sure" already.

Looking at a stacked cat 9300 for example, you could have around 500 connections that need to be disconnected.

I could see adding a check for whether or not there are active connections and have a glaring "this has active connections, are you really sure you want to delete this device?

I don't believe there is a bulk disconnect option, which would also need to be added in order to sanely support this.

thinking back on this I think there is a bulk disconnect but I still think this is a little unfeasible.

Just my view though

@DanSheps commented on GitHub (Nov 18, 2018): Personally, I don't see a use for this. You get promoted a "are you sure" already. Looking at a stacked cat 9300 for example, you could have around 500 connections that need to be disconnected. I could see adding a check for whether or not there are active connections and have a glaring "this has active connections, are you really sure you want to delete this device? ~~I don't believe there is a bulk disconnect option, which would also need to be added in order to sanely support this.~~ thinking back on this I think there is a bulk disconnect but I still think this is a little unfeasible. Just my view though
Author
Owner

@jeremystretch commented on GitHub (Nov 19, 2018):

I'd rather not force users to manually disconnect every connection to a device before they remove it. I think the current implementation of the warning page is sufficient. Ultimately the user is still responsible for paying attention to what they're doing.

@jeremystretch commented on GitHub (Nov 19, 2018): I'd rather not force users to manually disconnect every connection to a device before they remove it. I think the current implementation of the warning page is sufficient. Ultimately the user is still responsible for paying attention to what they're doing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2128