FIELD_CHOICES for dcim.PowerFeed.type #8624

Closed
opened 2025-12-29 20:39:02 +01:00 by adam · 2 comments
Owner

Originally created by @krasotinpa on GitHub (Sep 15, 2023).

NetBox version

v3.6.1

Feature type

Change to existing functionality

Proposed functionality

Hi

Let's add configurable choices to the dcim.PowerFeed.type field.
I've made appropriate changes to netbox/dcim/choices.py on our Netbox installation.
Now configuration.py accepts this config, for example:

FIELD_CHOICES = {
    'dcim.PowerFeed.type': (
        ('primary', 'Primary', 'blue'),
        ('redundant','Redundant', 'red'),
    ),
}

I'm ready to make pull

Use case

Power cables in our DC center have different colors for primary and backup power supply.
I think it's good practice to have these colors match the NETBOX.

Database changes

No response

External dependencies

No response

Originally created by @krasotinpa on GitHub (Sep 15, 2023). ### NetBox version v3.6.1 ### Feature type Change to existing functionality ### Proposed functionality Hi Let's add configurable choices to the dcim.PowerFeed.type field. I've made appropriate changes to netbox/dcim/choices.py on our Netbox installation. Now configuration.py accepts this config, for example: ``` FIELD_CHOICES = { 'dcim.PowerFeed.type': ( ('primary', 'Primary', 'blue'), ('redundant','Redundant', 'red'), ), } ``` I'm ready to make pull ### Use case Power cables in our DC center have different colors for primary and backup power supply. I think it's good practice to have these colors match the NETBOX. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 20:39:02 +01:00
adam closed this issue 2025-12-29 20:39:02 +01:00
Author
Owner

@jeremystretch commented on GitHub (Sep 15, 2023):

I appreciate the use case for adding colors, but we could do that internally without extending the choices. I don't see a use case for altering or extending the feed types themselves, and allowing that may preclude future functionality that relies on known values.

@jeremystretch commented on GitHub (Sep 15, 2023): I appreciate the use case for adding colors, but we could do that internally without extending the choices. I don't see a use case for altering or extending the feed types themselves, and allowing that may preclude future functionality that relies on known values.
Author
Owner

@krasotinpa commented on GitHub (Sep 15, 2023):

OK, Jeremy.
Closing it

@krasotinpa commented on GitHub (Sep 15, 2023): OK, Jeremy. Closing it
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8624