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

Add API calls for VLAN groups available-vlans functionality #1378

Closed
jasonjuenger opened this issue Feb 15, 2022 · 8 comments
Closed

Add API calls for VLAN groups available-vlans functionality #1378

jasonjuenger opened this issue Feb 15, 2022 · 8 comments
Labels
type: feature Introduction of substantial new functionality to the application

Comments

@jasonjuenger
Copy link

Environment

  • Python version: 3.8.8
  • Nautobot version: 1.2.5

Proposed Functionality

The VLAN Groups page show the available VLANs within a specific VLAN group.
Clicking on the "# VLANs available" link brings the user to a new page to
reserve the next available VLAN from that range. This functionality should be
exposed via API to allow for automated VLAN assignment.

This functionality has been implemented in Netbox #2658 with an additional
enhancement to add scoping for min/max VLAN IDs in #8168.

Use Case

As a Nautobot user, I would like to programmatically assign VLANs to new
tenant buildouts using a single API call so that I can avoid race conditions
querying then reserving VLANs when multiple workflows are reserving
VLANs at the same time.

Database Changes

New method is required in VLANGroup model to get available VLANs. To implement
the min/max VLAN ID scoping two new fields are required in the VLANGroup model,
min_vid and max_vid.

External Dependencies

None

@glennmatthews glennmatthews added group: automation type: feature Introduction of substantial new functionality to the application labels Feb 16, 2022
@jathanism
Copy link
Contributor

Thanks for the submission. The NetBox feature solves the problem, however we would likely do it in a slightly different way by implementing the nested endpoint as a viewset method (e.g. VLANGroupViewSet.available_vlans) so that we can reduce code duplication.

@joaopsys
Copy link
Contributor

This would be a great feature to have, a min/max VLAN ID, so we can programmatically get the next available VLAN ID

@foxx
Copy link

foxx commented Aug 20, 2022

Is this on the roadmap for any upcoming releases? Would love to see this feature, I'd happily pay a bounty if that would help?

@Senetus
Copy link

Senetus commented Dec 30, 2022

I would also love this feature to be able to automate vlan assignments!

@martijn-gr
Copy link

The company I work for could use this feature very much. It is one of the points of debate about choosing Nautobot VS Netbox.
Being able to limit the available vlans in a group without actually reserving all vlans would be useful.

In our case we have several vlan groups within a layer 2 domain. All groups together on a "site" form all vlans in the l2 domain (if that makes sense). (in our case that is, a site equals a routing edge for us.)

@glennmatthews
Copy link
Contributor

FYI @mzbroch

@mzbroch
Copy link
Contributor

mzbroch commented Oct 3, 2024

@jasonjuenger @joaopsys @foxx @Senetus @martijn-gr

This has been implemented under #6273 and released in Nautobot 2.3.6 https://github.com/nautobot/nautobot/releases/tag/v2.3.6

You can check out our Docs at https://docs.nautobot.com/projects/core/en/stable/user-guide/core-data-model/ipam/vlangroup/?h=vlangroup

@mzbroch mzbroch closed this as completed Oct 3, 2024
@martijn-gr
Copy link

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature Introduction of substantial new functionality to the application
Projects
No open projects
Status: Todo
Development

No branches or pull requests

9 participants