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 'utilization' field to IPRangeSerializer #15442

Open
icovada opened this issue Mar 15, 2024 · 2 comments
Open

Add 'utilization' field to IPRangeSerializer #15442

icovada opened this issue Mar 15, 2024 · 2 comments
Labels
complexity: medium Requires a substantial but not unusual amount of effort to implement netbox status: backlog Awaiting selection for work type: feature Introduction of new functionality to the application

Comments

@icovada
Copy link

icovada commented Mar 15, 2024

NetBox version

v3.7.4

Feature type

Change to existing functionality

Proposed functionality

Show the "utilization" field in the API response for IPRange

Use case

Allowing users to keep track of IP Range utilization via API

Database changes

None

External dependencies

None

@icovada icovada added the type: feature Introduction of new functionality to the application label Mar 15, 2024
@icovada
Copy link
Author

icovada commented Mar 15, 2024

Code already existing at 6f4e16d

Waiting to be assigned this issue to create a PR

@jeremystretch jeremystretch added the status: needs triage This issue is awaiting triage by a maintainer label Mar 26, 2024
@jeremystretch jeremystretch added status: under review Further discussion is needed to determine this issue's scope and/or implementation and removed status: needs triage This issue is awaiting triage by a maintainer labels Apr 3, 2024
@jeremystretch
Copy link
Member

It is not sufficient to merely add the utilization field to the serializer, or this would have already been done. As it stands, your change would effect a new database query to fetch all the IP addresses for each individual IP range returned in an API response. (Take a look at the utilization property defined on the IPRange mode.) This would substantially degrade performance.

This is somewhat similar to #7845, but might be doable by annotating the count of IP addresses for each range on the queryset. @icovada would you like to own that work?

@jeremystretch jeremystretch added status: backlog Awaiting selection for work complexity: medium Requires a substantial but not unusual amount of effort to implement and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels May 21, 2024
@jeremystretch jeremystretch added the netbox label Nov 1, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: medium Requires a substantial but not unusual amount of effort to implement netbox status: backlog Awaiting selection for work type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants