Enable the device to which a module is assigned to be changed #8620

Closed
opened 2025-12-29 20:38:59 +01:00 by adam · 6 comments
Owner

Originally created by @francesco-noc on GitHub (Sep 15, 2023).

NetBox version

v3.6.1

Feature type

Change to existing functionality

Proposed functionality

Enable the device to which the module is assigned to be changed, as for inventory items.
This is not really a functionality, but more of an adaptation.
In the ModuleForm class, change self.fields['device'].disabled from True to False.

Use case

It may happen that a module (as well as an inventory item) is moved from one device to another and it would be useful not to have to delete and recreate it.

Database changes

No response

External dependencies

No response

Originally created by @francesco-noc on GitHub (Sep 15, 2023). ### NetBox version v3.6.1 ### Feature type Change to existing functionality ### Proposed functionality Enable the device to which the module is assigned to be changed, as for inventory items. This is not really a functionality, but more of an adaptation. In the ModuleForm class, change self.fields['device'].disabled from True to False. ### Use case It may happen that a module (as well as an inventory item) is moved from one device to another and it would be useful not to have to delete and recreate it. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurestatus: duplicate labels 2025-12-29 20:38:59 +01:00
adam closed this issue 2025-12-29 20:38:59 +01:00
Author
Owner

@BackblazeJeremy commented on GitHub (Nov 9, 2023):

Moving inventory items from one device to another is a common occurrence for us. We often move NICs and storage drives between hosts as hardware is repaired, decommissioned, or repurposed. Having the ability to re-assign inventory items would be immensely useful to keep track of things more easily.

@BackblazeJeremy commented on GitHub (Nov 9, 2023): Moving inventory items from one device to another is a common occurrence for us. We often move NICs and storage drives between hosts as hardware is repaired, decommissioned, or repurposed. Having the ability to re-assign inventory items would be immensely useful to keep track of things more easily.
Author
Owner

@francesco-noc commented on GitHub (Nov 10, 2023):

Exactly. We have about a thousand network devices and it is a common occurrence for modules as well.

@francesco-noc commented on GitHub (Nov 10, 2023): Exactly. We have about a thousand network devices and it is a common occurrence for modules as well.
Author
Owner

@github-actions[bot] commented on GitHub (Feb 9, 2024):

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.

@github-actions[bot] commented on GitHub (Feb 9, 2024): 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](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Mar 12, 2024):

A note for anyone who would like to tackle this implementation: Bear in mind that any components assigned to the module will need to be updated as well, as will the component counts of the former and new device.

@jeremystretch commented on GitHub (Mar 12, 2024): A note for anyone who would like to tackle this implementation: Bear in mind that any components assigned to the module will need to be updated as well, as will the component counts of the former and new device.
Author
Owner

@francesco-noc commented on GitHub (Mar 12, 2024):

Hi @jeremystretch , as you suggested I did a more detailed feature request and I'm sorry, maybe this issue could be closed.
Anyway I proposed an implementation that destroy and recreate components when the module is edited.

@francesco-noc commented on GitHub (Mar 12, 2024): Hi @jeremystretch , as you suggested I did a [more detailed feature request](https://github.com/netbox-community/netbox/issues/15289) and I'm sorry, maybe this issue could be closed. Anyway I proposed [an implementation](https://github.com/netbox-community/netbox/compare/develop...francesco-noc:netbox:13779-change-device-to-module) that destroy and recreate components when the module is edited.
Author
Owner

@jeremystretch commented on GitHub (Mar 12, 2024):

Ok, thanks. I'm going to close this one as a duplicate of #15289.

@jeremystretch commented on GitHub (Mar 12, 2024): Ok, thanks. I'm going to close this one as a duplicate of #15289.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8620