Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable adding/removing module assignments for components in bulk #9003

Closed
mmfreitas opened this issue Mar 31, 2022 · 3 comments
Closed

Enable adding/removing module assignments for components in bulk #9003

mmfreitas opened this issue Mar 31, 2022 · 3 comments
Assignees
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@mmfreitas
Copy link

NetBox version

v3.2.0-beta2

Feature type

Change to existing functionality

Proposed functionality

When a module is installed in a module bay, it creates the interfaces, when the modules is removed, it deletes the interfaces. Suppose that I have installed a module but the device on which it was installed already had the interfaces with the same name and when the module was installed I had to untick the replicate components.

The interfaces would still exist with the name that was intended for the module to create, what currently happens is that when you remove the module, the interfaces still remain on the device, because they were created prior to the module.

Even though the interfaces exist prior to the module, as the module can already be installed without replicating components, I propose that when a module is removed, the interfaces that still exist in the position that the module was removed should be deleted.

I am giving the example of interfaces, but this would be the same for other components such as power outlets, power ports, console ports etc. etc.

Use case

I will upgrade netbox to version 3.2 when it's stable.
I want to populate my data with the new module funcionality, so I will add the modules to the devices, the interfaces which the modules would create already exist in my database so I won't be replicating components. Problem is that when I need to remove a module, as currently happens in the beta, the interfaces would remain on the device, these should be deleted if the module is removed.

Database changes

None.

External dependencies

None.

@mmfreitas mmfreitas added the type: feature Introduction of new functionality to the application label Mar 31, 2022
@jeremystretch jeremystretch changed the title [v3.2.0-beta2]: Removing Module doesn't delete interfaces that already existed Removing Module doesn't delete interfaces that already existed Mar 31, 2022
@jeremystretch jeremystretch added the beta Concerns a bug/feature in a beta release label Mar 31, 2022
@jeremystretch
Copy link
Member

Problem is that when I need to remove a module, as currently happens in the beta, the interfaces would remain on the device, these should be deleted if the module is removed.

The interfaces are not automatically removed when the module is deleted because they have never been associated with the module. The module field of each interface needs to be set to reference the module. Otherwise, NetBox has absolutely no indication that they're related.

The most prudent approach would be to allow assigning/removing a module to components in the bulk edit view. This would allow users to easily associate pre-existing components with newly installed modules.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Mar 31, 2022
@mmfreitas
Copy link
Author

The most prudent approach would be to allow assigning/removing a module to components in the bulk edit view. This would allow users to easily associate pre-existing components with newly installed modules.

Yes, I think this would be a good solution for this.

@jeremystretch
Copy link
Member

Cool; I'm going to tweak the focus of this issue to enable bulk adding/removing module assignments for components.

@jeremystretch jeremystretch changed the title Removing Module doesn't delete interfaces that already existed Enable adding/removing module assignments for components in bulk Mar 31, 2022
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Mar 31, 2022
@jeremystretch jeremystretch self-assigned this Mar 31, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants