Device Type Specific Modules #6341

Closed
opened 2025-12-29 19:39:37 +01:00 by adam · 6 comments
Owner

Originally created by @shatt79 on GitHub (Apr 10, 2022).

NetBox version

3.2.0

Feature type

Change to existing functionality

Proposed functionality

Create functionality to specify the device-type that a particular module-type is a child of. As it stands, I can install an Adtran XGS-PON card into a Cisco ASR9K. That should not be allowed. Would be nice too if certain modules were only allowed in certain slots and device types. Eg, an Adtran module should not be allowed to be installed in a Cisco chassis. And I shouldn't be able to install an RSP/SUP into a line card slot.

If we were forced to choose the "parent" device-type that a "child" module-type was associated with, that should help with issue 1. Once the parent/child relationship is created/enforced, then one should be able to determine which of the parent module bays a specific module-type can be inserted into.

Use case

This would prevent incorrect module types from being installed in devices. Would allow for better inventory tracking and more accurate connection records.

Database changes

No response

External dependencies

No response

Originally created by @shatt79 on GitHub (Apr 10, 2022). ### NetBox version 3.2.0 ### Feature type Change to existing functionality ### Proposed functionality Create functionality to specify the device-type that a particular module-type is a child of. As it stands, I can install an Adtran XGS-PON card into a Cisco ASR9K. That should not be allowed. Would be nice too if certain modules were only allowed in certain slots and device types. Eg, an Adtran module should not be allowed to be installed in a Cisco chassis. And I shouldn't be able to install an RSP/SUP into a line card slot. If we were forced to choose the "parent" device-type that a "child" module-type was associated with, that should help with issue 1. Once the parent/child relationship is created/enforced, then one should be able to determine which of the parent module bays a specific module-type can be inserted into. ### Use case This would prevent incorrect module types from being installed in devices. Would allow for better inventory tracking and more accurate connection records. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurepending closure labels 2025-12-29 19:39:37 +01:00
adam closed this issue 2025-12-29 19:39:37 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 11, 2022):

If we were forced to choose the "parent" device-type that a "child" module-type was associated with, that should help with issue 1. Once the parent/child relationship is created/enforced, then one should be able to determine which of the parent module bays a specific module-type can be inserted into.

Frankly, this is probably going to be trouble than it's worth. For starters, you can't assume that any particular module is limited to a single device type (consider chassis-based switch of multiple sizes, for example). So you would need to map the set of allowed device types, as well as which module bays within each device, somehow. Have you thought about how you would model this in the database? I can think of several approaches, but they all seem unduly burdensome and error-prone.

@jeremystretch commented on GitHub (Apr 11, 2022): > If we were forced to choose the "parent" device-type that a "child" module-type was associated with, that should help with issue 1. Once the parent/child relationship is created/enforced, then one should be able to determine which of the parent module bays a specific module-type can be inserted into. Frankly, this is probably going to be trouble than it's worth. For starters, you can't assume that any particular module is limited to a single device type (consider chassis-based switch of multiple sizes, for example). So you would need to map the set of allowed device types, as well as which module bays within each device, somehow. Have you thought about how you would model this in the database? I can think of several approaches, but they all seem unduly burdensome and error-prone.
Author
Owner

@sleepinggenius2 commented on GitHub (Apr 11, 2022):

This sounds like something that Custom Validation might be able to be used for when saving the change, but I wonder if that might be able to be extended to also allow filtering of autocomplete responses? I can think of a number of places where this could be useful, like only showing interfaces of a compatible type when creating cables.

@sleepinggenius2 commented on GitHub (Apr 11, 2022): This sounds like something that Custom Validation might be able to be used for when saving the change, but I wonder if that might be able to be extended to also allow filtering of autocomplete responses? I can think of a number of places where this could be useful, like only showing interfaces of a compatible type when creating cables.
Author
Owner

@tsettle commented on GitHub (Apr 16, 2022):

This could be useful. In the case of the Calix E7, there are two separate and incompatible hardware platforms that use the same chassis. For planning purposes, it would be nice to eliminate human error so that nobody tries to install an incompatible card in a shelf, only to find out that we needed to send a new shelf with the installer in order to accommodate the new card.

@tsettle commented on GitHub (Apr 16, 2022): This could be useful. In the case of the Calix E7, there are two separate and incompatible hardware platforms that use the same chassis. For planning purposes, it would be nice to eliminate human error so that nobody tries to install an incompatible card in a shelf, only to find out that we needed to send a new shelf with the installer in order to accommodate the new card.
Author
Owner

@guipoletto commented on GitHub (Apr 21, 2022):

I agree with that
basically all devices i modeled so far, have this problem (GPON OLT's, Modular PSU shelfs, Chassis-based routers...)

A table in the chassis/("device type") definition that states allowed compatible modules, and slot ranges would cover 90% of my needs

@guipoletto commented on GitHub (Apr 21, 2022): I agree with that basically all devices i modeled so far, have this problem (GPON OLT's, Modular PSU shelfs, Chassis-based routers...) A table in the chassis/("device type") definition that states allowed compatible modules, and slot ranges would cover 90% of my needs
Author
Owner

@github-actions[bot] commented on GitHub (Jun 21, 2022):

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 (Jun 21, 2022): 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

@github-actions[bot] commented on GitHub (Jul 21, 2022):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Jul 21, 2022): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6341