Allow LinkStatusChoices to be customised via FIELD_CHOICES #10870

Closed
opened 2025-12-29 21:37:02 +01:00 by adam · 3 comments
Owner

Originally created by @cruse1977 on GitHub (Mar 11, 2025).

NetBox version

v4.2.5

Feature type

New functionality

Proposed functionality

Many NetBox choices are permitted to be modified via FIELD_CHOICES config parameters, however Link Status is not, adding a key (eg: Link.status) to this would allow users to add or change values.

Use case

Examples I've seen of custom status fields include 'missing' and 'damaged'

Database changes

n/a

External dependencies

n/a

Originally created by @cruse1977 on GitHub (Mar 11, 2025). ### NetBox version v4.2.5 ### Feature type New functionality ### Proposed functionality Many NetBox choices are permitted to be modified via FIELD_CHOICES config parameters, however Link Status is not, adding a key (eg: Link.status) to this would allow users to add or change values. ### Use case Examples I've seen of custom status fields include 'missing' and 'damaged' ### Database changes n/a ### External dependencies n/a
adam added the type: feature label 2025-12-29 21:37:02 +01:00
adam closed this issue 2025-12-29 21:37:02 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 14, 2025):

Link status choices are not customizable because these values have significance in cable path calculations. For instance, a cable path is considered complete only if the status of each cable within the path is connected:

f286449284/netbox/dcim/models/cables.py (L599-L602)

If a user were to remove or rename this status, the entire cable tracing system would break.

@jeremystretch commented on GitHub (Mar 14, 2025): Link status choices are not customizable because these values have significance in cable path calculations. For instance, a cable path is considered complete only if the status of each cable within the path is `connected`: https://github.com/netbox-community/netbox/blob/f2864492844b6825de84e0b50679a6b29cd5b285/netbox/dcim/models/cables.py#L599-L602 If a user were to remove or rename this status, the entire cable tracing system would break.
Author
Owner

@cruse1977 commented on GitHub (Mar 14, 2025):

Thanks Jeremy, I had a quick look through and obvious missed this one - appreciate the explainer.

@cruse1977 commented on GitHub (Mar 14, 2025): Thanks Jeremy, I had a quick look through and obvious missed this one - appreciate the explainer.
Author
Owner

@jeremystretch commented on GitHub (Mar 14, 2025):

FWIW we could add additional statuses, such as those you list above, as built-in choices.

@jeremystretch commented on GitHub (Mar 14, 2025): FWIW we could add additional statuses, such as those you list above, as built-in choices.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10870