Specify different power cable types #2368

Closed
opened 2025-12-29 17:25:22 +01:00 by adam · 1 comment
Owner

Originally created by @skoef on GitHub (Feb 12, 2019).

Environment

  • Python version: 3.6.7
  • NetBox version: Example: 2.5.6

Proposed Functionality

Specify multiple types of power cables. While there is a variety of network cables available to choose from in netbox, there is only 1 generic type for power cables. I'd suggest splitting this up into more specific types. I can think of C13-C14, C13-C20, C19-C20, C13-Schuko etc,

This might imply the type of power outlet and port as well: for instance, my PDU might have 16 C14 outlets and a couple of C20's as well. If netbox would allow to specify the type of power outlet or power port, perhaps specifying the cable to connect both would be redundant.

Use Case

In our datacenter we use a mixture of C13-C14 and C13-C20 cables to connect our servers to PDU's while we also have some C13-Schuko cables to PDU's. I would like to have these differences visible in netbox

Database Changes

I've tested locally with updating dcim/constants.py by
creating some additional types and as long as we keep the generic type around as well, I would say this requires no database change. If we need to convert the generic type to one of the specific types, then we probably need a migration step.

The addition I did was:

CABLE_TYPE_POWER_C13C20 = 5132
CABLE_TYPE_POWER_C13C14 = 5134
CABLE_TYPE_POWER_C19C20 = 5192
...
    (
        'Power', (
            (CABLE_TYPE_POWER_C13C14, 'C13 to C14'),
            (CABLE_TYPE_POWER_C13C20, 'C13 to C20'),
            (CABLE_TYPE_POWER_C19C20, 'C19 to C20'),
        ),
    )

I'm operating from Europe where these connectors are common, perhaps US DCs use completely different connectors that might be of use here as well.

External Dependencies

none

Originally created by @skoef on GitHub (Feb 12, 2019). <!-- NOTE: This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.6.7 * NetBox version: Example: 2.5.6 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Specify multiple types of power cables. While there is a variety of network cables available to choose from in netbox, there is only 1 generic type for power cables. I'd suggest splitting this up into more specific types. I can think of C13-C14, C13-C20, C19-C20, C13-Schuko etc, This might imply the type of power outlet and port as well: for instance, my PDU might have 16 C14 outlets and a couple of C20's as well. If netbox would allow to specify the type of power outlet or power port, perhaps specifying the cable to connect both would be redundant. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case In our datacenter we use a mixture of C13-C14 and C13-C20 cables to connect our servers to PDU's while we also have some C13-Schuko cables to PDU's. I would like to have these differences visible in netbox <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes I've tested locally with updating `dcim/constants.py` by creating some additional types and as long as we keep the generic type around as well, I would say this requires no database change. If we need to convert the generic type to one of the specific types, then we probably need a migration step. The addition I did was: ```python CABLE_TYPE_POWER_C13C20 = 5132 CABLE_TYPE_POWER_C13C14 = 5134 CABLE_TYPE_POWER_C19C20 = 5192 ... ( 'Power', ( (CABLE_TYPE_POWER_C13C14, 'C13 to C14'), (CABLE_TYPE_POWER_C13C20, 'C13 to C20'), (CABLE_TYPE_POWER_C19C20, 'C19 to C20'), ), ) ``` I'm operating from Europe where these connectors are common, perhaps US DCs use completely different connectors that might be of use here as well. <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies none
adam closed this issue 2025-12-29 17:25:22 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 12, 2019):

The cable mdeium does not inform the termination form factors. This will be covered under #792.

@jeremystretch commented on GitHub (Feb 12, 2019): The cable mdeium does not inform the termination form factors. This will be covered under #792.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2368