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

VlanGroup - ArrayField rather than a start/end range #9627

Closed
PieterL75 opened this issue Jun 29, 2022 · 6 comments
Closed

VlanGroup - ArrayField rather than a start/end range #9627

PieterL75 opened this issue Jun 29, 2022 · 6 comments
Assignees
Labels
complexity: medium Requires a substantial but not unusual amount of effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@PieterL75
Copy link
Contributor

NetBox version

v3.2.5

Feature type

Change to existing functionality

Proposed functionality

a VLAN Group has the option to limit the vlans that can be used in that group.
This FR is to make the vlan-member a comma-separated value and allow more that one range or separate vlans in a vlan group.

Use case

We have use cases where one group consists of 2 different ranges (1000-1099, 2500-2599 for example).
Currently we have to create a second group, or extend the vlangroup with vlans that should not be used in that group.

Database changes

  • Remove the min_vid, max_vid values
  • Replace with a ArrayField of Vlan/VlanRanges ?

External dependencies

No response

@PieterL75 PieterL75 added the type: feature Introduction of new functionality to the application label Jun 29, 2022
@PieterL75 PieterL75 changed the title VlanGroup - commaseparated list rather than a start/end range VlanGroup - ArrayField rather than a start/end range Jun 29, 2022
@jeremystretch
Copy link
Member

#9083 proposed something similar, but the transition to a single ArrayField seems more efficient.

@jeremystretch jeremystretch added the needs milestone Awaiting prioritization for inclusion with a future NetBox release label Jul 1, 2022
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed needs milestone Awaiting prioritization for inclusion with a future NetBox release labels Jul 1, 2022
@jeremystretch jeremystretch self-assigned this Jul 1, 2022
@jeremystretch jeremystretch added this to the v3.3 milestone Jul 1, 2022
@jeremystretch jeremystretch removed their assignment Jul 6, 2022
@jeremystretch jeremystretch added needs milestone Awaiting prioritization for inclusion with a future NetBox release and removed status: accepted This issue has been accepted for implementation labels Jul 6, 2022
@jeremystretch jeremystretch removed this from the v3.3 milestone Jul 6, 2022
@jeremystretch
Copy link
Member

Need to put a bit more thought into how best to implement this. We do something similar with rack reservation units, however in that case we're actually storing a discrete integer for each rack unit to which the reservation applies. This doesn't scale well to ~4K VLAN IDs. We may be able to leverage an array of PostgreSQL range fields, but further research is needed.

While I would have liked to pursue this in v3.3, we're running a bit behind with this release as it is.

@jcralbino
Copy link

Hello Jeremy,
I wanted to know if this scenarios can be supported in this next iteration this range functionality. :

  1. Creation of several vlan ranges, that can be assigned to the a vlan pool.
  2. Each vlan range, can be defined with a separate status field to be configurable ( active, reserved.. )
  3. A vlan pool, can include several different ranges

I would say that the vlan range can be a separate model itself where additional information can also be added to this object, like comments, or even the change log to monitor changes in the range definition.

@abhi1693
Copy link
Member

Is it possible to take this up in v3.5?

@jeremystretch jeremystretch added status: backlog Awaiting selection for work complexity: medium Requires a substantial but not unusual amount of effort to implement labels May 21, 2024
@jeffgdotorg jeffgdotorg added this to the v4.1 milestone May 31, 2024
@jeremystretch
Copy link
Member

It might be possible to employ an ArrayField of RangeFields.

@jeffgdotorg jeffgdotorg removed the needs milestone Awaiting prioritization for inclusion with a future NetBox release label Jun 7, 2024
@arthanson arthanson self-assigned this Jun 11, 2024
@jeremystretch
Copy link
Member

jeremystretch commented Jul 9, 2024

Just noting for posterity: PostgreSQL 14 introduces native multirange types, which would be ideal. However, we would need to drop support for PostgreSQL 12 and 13 to utilize these. Additionally, these types appear unlikely to be supported by Django, so we would need to devise our own implementation for the ORM.

@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Jul 31, 2024
@jeremystretch jeremystretch removed the status: backlog Awaiting selection for work label Jul 31, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
complexity: medium Requires a substantial but not unusual amount of effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

6 participants