Allow adding power port templates to modules #1105
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue
No issue, context described below.
New Behavior
NetBox allows adding components (like power ports) to module types, not only to device types. This PR will address this.
Some users want to use module bays, hosting power supplies. This power supplies have a module type, which has power port templates. E.g: https://www.netbox.net/dcim/module-types/1/power-ports/
Contrast to Current Behavior
This PR adds
module_type
, which allows adding a power port to an existing module type in NetBox. Therefor one ofdevice_type
ormodule_type
is required.Discussion: Benefits and Drawbacks
This PR adds a feature that is already implemented in the NetBox GUI, but missing in the Ansible collection/module. For example, the device library uses module types for PSU's: https://github.com/netbox-community/devicetype-library/blob/a7718d8d4b0a9d2f196166f5cbc4831bfb6be490/device-types/HPE/ProLiant-DL580-Gen10.yaml#L13 and we can add modules with a module type to this slot. With the power port assigned to the module type, there will be a power port created with the module assignment. No further need to create additional power ports in an extra step.
Changes to the Documentation
All needed changes to the docs are included in the code.
Proposed Release Note Entry
Add the ability to create power ports for module types.
Double Check
devel
branch.