cable duplicate label ; or Feature Request? #2257

Closed
opened 2025-12-29 17:24:11 +01:00 by adam · 4 comments
Owner

Originally created by @ak4443 on GitHub (Jan 4, 2019).

Environment

  • Python version:
  • NetBox version:

It is possible to provide cables with the same label.

As an an example:

At the switch 1 port 1 the cable with the label NET0001 is connected.
It is now possible to connect to port 2 a cable with the same label NET0001.

At this point, from my point of view, would have to be checked if there is a duplicate label.

Originally created by @ak4443 on GitHub (Jan 4, 2019). ### Environment * Python version: <!-- Example: 3.6.7 --> * NetBox version: <!-- Example: 2.5.2 --> It is possible to provide cables with the same label. As an an example: At the switch 1 port 1 the cable with the label NET0001 is connected. It is now possible to connect to port 2 a cable with the same label NET0001. At this point, from my point of view, would have to be checked if there is a duplicate label.
adam closed this issue 2025-12-29 17:24:11 +01:00
Author
Owner

@jbakklund commented on GitHub (Jan 4, 2019):

A label should ideally only have to be unique within the perimeters of a given site, allowing you to use e.g. label 'NET0001' in both London and Paris.

@jbakklund commented on GitHub (Jan 4, 2019): A label should ideally only have to be unique within the perimeters of a given site, allowing you to use e.g. label 'NET0001' in both London and Paris.
Author
Owner

@ak4443 commented on GitHub (Jan 4, 2019):

That's true.

Then at least below a site would have to be checked for duplicates.

@ak4443 commented on GitHub (Jan 4, 2019): That's true. Then at least below a site would have to be checked for duplicates.
Author
Owner

@jeremystretch commented on GitHub (Jan 4, 2019):

Cabling labels are entirely arbitrary and every organization uses whatever system works for them. It would be inappropriate for NetBox to assume any particular uniqueness requirement. If you need to check for duplicate labels, I suggest writing a validation report, which allows complete flexibility.

@jeremystretch commented on GitHub (Jan 4, 2019): Cabling labels are entirely arbitrary and every organization uses whatever system works for them. It would be inappropriate for NetBox to assume any particular uniqueness requirement. If you need to check for duplicate labels, I suggest writing a validation report, which allows complete flexibility.
Author
Owner

@ak4443 commented on GitHub (Jan 4, 2019):

Thanks ....

my workaround are in postgres DB:

create unique index unique_label on dcim_calbe(label) ;

Thus, a label can only be created once and Postgres reports a readable error.

@ak4443 commented on GitHub (Jan 4, 2019): Thanks .... my workaround are in postgres DB: create unique index unique_label on dcim_calbe(label) ; Thus, a label can only be created once and Postgres reports a readable error.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2257