Skip to content
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

Closed
CoolSilver opened this issue Jan 17, 2018 · 5 comments
Closed

Allow non-unique VLAN names within a VLAN group #1823

CoolSilver opened this issue Jan 17, 2018 · 5 comments

Comments

@CoolSilver
Copy link

Issue type

[x] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.1.3
  • NetBox version: 2.2.8

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?

@jeremystretch jeremystretch changed the title Non-unique vlan names assigned to van group Allow non-unique VLAN names within a VLAN group Jan 30, 2018
@jeremystretch
Copy link
Member

I can see use cases both for and against the unique constraint imposed on the VLAN name. Leaving this open for feedback.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Jan 30, 2018
@lampwins
Copy link
Contributor

lampwins commented Feb 5, 2018

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.

@CoolSilver
Copy link
Author

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

@jeremystretch
Copy link
Member

This doesn't seem to have gotten any traction, and I think the constraint we have in place now is the less-surprising approach.

@jeremystretch jeremystretch added status: rejected and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Apr 3, 2018
@swerveshot
Copy link

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?

@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants