v3.2.0-beta1: Removing a module from a module bay deletes the module and its interfaces #6118

Closed
opened 2025-12-29 19:36:58 +01:00 by adam · 4 comments
Owner

Originally created by @mmfreitas on GitHub (Feb 18, 2022).

NetBox version

v3.2.0-beta1

Python version

3.9

Steps to Reproduce

  1. Create a device that has module bays
  2. Install a module onto a module bay.
  3. Attempt to "remove module"

Expected Behavior

I expected this to function like a device bay, when you remove a child device from the device bay, the child device still exists, its just not installed on a device.

Since there are fields on a module such as Asset Tag and Serial Number I feel like the module should be kept aswell. (maybe delete its interfaces and recreate them when installing onto another device?)

Observed Behavior

When removing a module from a module bay it deletes the module and all of its interfaces.

Originally created by @mmfreitas on GitHub (Feb 18, 2022). ### NetBox version v3.2.0-beta1 ### Python version 3.9 ### Steps to Reproduce 1. Create a device that has module bays 2. Install a module onto a module bay. 3. Attempt to "remove module" ### Expected Behavior I expected this to function like a device bay, when you remove a child device from the device bay, the child device still exists, its just not installed on a device. Since there are fields on a module such as Asset Tag and Serial Number I feel like the module should be kept aswell. (maybe delete its interfaces and recreate them when installing onto another device?) ### Observed Behavior When removing a module from a module bay it deletes the module and all of its interfaces.
adam added the beta label 2025-12-29 19:36:58 +01:00
adam closed this issue 2025-12-29 19:36:58 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 18, 2022):

When removing a module from a module bay it deletes the module and all of its interfaces.

This is intended behavior. It doesn't make sense to me to model line cards without associating them with a parent device.

I expected this to function like a device bay, when you remove a child device from the device bay, the child device still exists, its just not installed on a device.

Devices can exist independently of a parent device; modules cannot.

@jeremystretch commented on GitHub (Feb 18, 2022): > When removing a module from a module bay it deletes the module and all of its interfaces. This is intended behavior. It doesn't make sense to me to model line cards without associating them with a parent device. > I expected this to function like a device bay, when you remove a child device from the device bay, the child device still exists, its just not installed on a device. Devices can exist independently of a parent device; modules cannot.
Author
Owner

@mmfreitas commented on GitHub (Feb 18, 2022):

This is intended behavior. It doesn't make sense to me to model line cards without associating them with a parent device.

Ok, let's say I have a module (card) with 20 interfaces installed on a device, and I need that module to be moved to another device. I delete the module (which has the information of the asset_tag and serial_number and lose that info) and then I have to create another module of the same type and fill the same information for the asset_tag and serial_number.
If the module is deleted what difference does it make it having information associated to it?

Devices can exist independently of a parent device; modules cannot.

IMO both can exist, because when I remove a module from a device I am left with the module either to be reinstalled, or to keep as spare/inventory. Being this the reason that I was expecting the module to be kept on the database.

@mmfreitas commented on GitHub (Feb 18, 2022): > This is intended behavior. It doesn't make sense to me to model line cards without associating them with a parent device. Ok, let's say I have a module (card) with 20 interfaces installed on a device, and I need that module to be moved to another device. I delete the module (which has the information of the asset_tag and serial_number and lose that info) and then I have to create another module of the same type and fill the same information for the asset_tag and serial_number. If the module is deleted what difference does it make it having information associated to it? > Devices can exist independently of a parent device; modules cannot. IMO both can exist, because when I remove a module from a device I am left with the module either to be reinstalled, or to keep as spare/inventory. Being this the reason that I was expecting the module to be kept on the database.
Author
Owner

@jeremystretch commented on GitHub (Feb 18, 2022):

If the module is deleted what difference does it make it having information associated to it?

I don't follow your question. What you described is exactly what you're expected to do. The alternative would be to store unused modules in NetBox, often with no unique identifier. That information would be useless.

We've long held the position that NetBox is not an inventory management system. If a piece of hardware isn't in use, it should not be modeled.

@jeremystretch commented on GitHub (Feb 18, 2022): > If the module is deleted what difference does it make it having information associated to it? I don't follow your question. What you described is exactly what you're expected to do. The alternative would be to store unused modules in NetBox, often with no unique identifier. That information would be useless. We've long held the position that NetBox is not an inventory management system. If a piece of hardware isn't in use, it should not be modeled.
Author
Owner

@jeremystretch commented on GitHub (Feb 18, 2022):

At any rate, this is intended behavior as I mentioned. You're welcome to open a feature request to propose the behavior you describe, but you'll need to provide a very compelling use case.

@jeremystretch commented on GitHub (Feb 18, 2022): At any rate, this is intended behavior as I mentioned. You're welcome to open a feature request to propose the behavior you describe, but you'll need to provide a very compelling use case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6118