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

Provide utilization on vlan groups #11738

Closed
abhi1693 opened this issue Feb 12, 2023 · 2 comments · Fixed by #13108
Closed

Provide utilization on vlan groups #11738

abhi1693 opened this issue Feb 12, 2023 · 2 comments · Fixed by #13108
Assignees
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@abhi1693
Copy link
Member

NetBox version

v3.4.4

Feature type

New functionality

Proposed functionality

Add utlization property which adds to the following views

  • Object view
  • Table column
  • API

This similar to prefixes and aggregates functionality.

Use case

As an engineer, I'd like to see at a glance how many VLANs are utilized in a group. Using this information via the API, I'd also like to perform certain maintenance tasks in my automation workflow.

Database changes

No response

External dependencies

No response

@abhi1693 abhi1693 added the type: feature Introduction of new functionality to the application label Feb 12, 2023
@jeremystretch
Copy link
Member

Seems like a good idea. Related to (but not necessarily blocked by) #9627.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Feb 12, 2023
@abhi1693
Copy link
Member Author

If you want, I can provide a PR for this which in the current form should be good for develop branch

@abhi1693 abhi1693 changed the title Provide utlization on vlan groups Provide utilization on vlan groups Feb 12, 2023
@DanSheps DanSheps added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Apr 17, 2023
jeremystretch added a commit that referenced this issue Jul 6, 2023
* Update serializers.py

* Update vlans.py

* Update vlans.py

* Update vlangroup.html

* Update vlans.py

* Update vlans.py

* Update serializers.py

* adds db annotation to calculate utilization

* optimize queries

* merge fix

* adds round function for utilization to limit decimal

* fixed object view annotation

* consolidated queryset for utilization

* lint fixes

* Renamed manager method to annotate_utilization() for consistency with other managers

---------

Co-authored-by: Abhimanyu Saharan <desk.abhimanyu@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
3 participants