Deleting an Interface tied to an Inventory Item deletes the Inventory Item #9412

Closed
opened 2025-12-29 20:49:29 +01:00 by adam · 4 comments
Owner

Originally created by @chadhpaine on GitHub (Mar 29, 2024).

Deployment Type

Self-hosted

NetBox Version

v3.7.4

Python Version

3.9

Steps to Reproduce

  1. Create a device.
  2. Create an interface on the device created in step 1.
  3. Create an inventory item on the device created in step 1.
    3a. Assign the inventory item to the interface created in step 2.
  4. Delete the interface created in step 2.

Expected Behavior

The inventory-item is retained but unlinked from the interface to which it was associated.

Observed Behavior

The inventory-item is deleted along with the interface to which it was associated.
Reproduces with any type of component (interface, power-/console-port).

Originally created by @chadhpaine on GitHub (Mar 29, 2024). ### Deployment Type Self-hosted ### NetBox Version v3.7.4 ### Python Version 3.9 ### Steps to Reproduce 1. Create a device. 2. Create an interface on the device created in step 1. 3. Create an inventory item on the device created in step 1. 3a. Assign the inventory item to the interface created in step 2. 4. Delete the interface created in step 2. ### Expected Behavior The inventory-item is retained but unlinked from the interface to which it was associated. ### Observed Behavior The inventory-item is deleted along with the interface to which it was associated. Reproduces with any type of component (interface, power-/console-port).
adam added the type: bugstatus: revisions needed labels 2025-12-29 20:49:29 +01:00
adam closed this issue 2025-12-29 20:49:29 +01:00
Author
Owner

@alehaa commented on GitHub (Mar 30, 2024):

The inventory-item is deleted along with the interface to which it was associated.

I don't think this is a bug. Deleting a module from its slot also deletes all associated interfaces, ports, etc. I mean, that's essentially the real world: If you remove a module from a switch, those interfaces are no longer available.

Perhaps you seek for a new feature like "remove inventory item / module, but keep associated ports"?

@alehaa commented on GitHub (Mar 30, 2024): > The inventory-item is deleted along with the interface to which it was associated. I don't think this is a bug. Deleting a module from its slot also deletes all associated interfaces, ports, etc. I mean, that's essentially the real world: If you remove a module from a switch, those interfaces are no longer available. Perhaps you seek for a new feature like "remove inventory item / module, but keep associated ports"?
Author
Owner

@chadhpaine commented on GitHub (Apr 1, 2024):

Perhaps you seek for a new feature like "remove inventory item / module, but keep associated ports"?

Unlike modules, deleting an inventory item associated with another component does not delete the other component. I agree with your sentiment that deleting a module should cause the deletion of components it associates to its parent, but I do not know how deletion of modules corresponds to deletion of inventory items when components associated with those inventory items are the primary targets of deletion rather than the inventory item itself.

@chadhpaine commented on GitHub (Apr 1, 2024): > Perhaps you seek for a new feature like "remove inventory item / module, but keep associated ports"? Unlike modules, deleting an inventory item associated with another component does not delete the other component. I agree with your sentiment that deleting a module should cause the deletion of components it associates to its parent, but I do not know how deletion of modules corresponds to deletion of inventory items when components associated with those inventory items are the primary targets of deletion rather than the inventory item itself.
Author
Owner

@jeffgdotorg commented on GitHub (Apr 1, 2024):

Thank you for opening a bug report. It seems that the described functionality is intended behavior, though admittedly this one is a somewhat subjective call which a compelling argument could sway.

If you meant to open a feature request instead, please close this issue and open a new one using the feature request template. Otherwise, please revise your post above to elaborate on why you believe the observed behavior is flawed.

@jeffgdotorg commented on GitHub (Apr 1, 2024): Thank you for opening a bug report. It seems that the described functionality is intended behavior, though admittedly this one is a somewhat subjective call which a compelling argument could sway. If you meant to open a feature request instead, please close this issue and open a new one using the [feature request template](https://github.com/netbox-community/netbox/issues/new?template=feature_request.yaml). Otherwise, please revise your post above to elaborate on why you believe the observed behavior is flawed.
Author
Owner

@jeremystretch commented on GitHub (Apr 8, 2024):

I can confirm that this is intended behavior. Closing this out as no further information has been offered to justify a bug report.

@jeremystretch commented on GitHub (Apr 8, 2024): I can confirm that this is intended behavior. Closing this out as no further information has been offered to justify a bug report.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9412