-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow non-unique VLAN names within a VLAN group #1823
Comments
I can see use cases both for and against the unique constraint imposed on the VLAN name. Leaving this open for feedback. |
I have come across this before myself. Really it comes down to use case. As @jeremystretch has pointed out, it is easy to see it both ways but the current constraint does make NetBox opinionated as to the intended use case. That being said, I worked around it in other ways (not related to the use case explained above). The only danger I see is if two vlans are created without assigning a prefix, it would be hard to differentiate them in the UI. |
True it would be difficult if there were named the same and the same vlan id. The only difference would be the group name as a difference which works. In my example there are two different vlan ids with the same name. Each exists without any group without conflict. Only when adding to same group. They are still forced unique by the vlan id per group. Not every vlan would have a prefix as some could be layer 2 only between sites or devices etc |
This doesn't seem to have gotten any traction, and I think the constraint we have in place now is the less-surprising approach. |
Hey guys, I ran into this issue as well when porting an existing VLAN administration from mediawiki (yeah, I know) to netbox. A large number of VLANs have a reservation status and a generic name. So lots of duplicates. I could potentially include the VLAN ID in the name but it feels a bit clunky. I'm running netbox v2.4.8. @jeremystretch Could you please consider re-opening this case? |
Issue type
[x] Feature request
[ ] Bug report
[ ] Documentation
Environment
Description
It would be nice to have multiple vlans in a particular vlan group with the same name. Currently you can have the same name on multiple vlans as long as they are either not assigned to a vlan group or different groups. This would be good for the same customer and application who have multiple vlans on different IP segments.
Taking two vlans named the same, assigning to the same vlan group gives the following message about unique ids
Duplicate key value violates unique constraint "ipam_vlan_group_id_name__uniq"
Detail: Key (group_id, name) = (5, vlan-name) already exists
Can this relationship be tied to the vlan itself since there is already a constraint on one per vlan number per group?
The text was updated successfully, but these errors were encountered: