Skip to content

Create a get_utilization() method on the RIR model #4961

@jeremystretch

Description

@jeremystretch

Proposed Changes

Create a get_utilization() method on the RIR model to return the total utilization of all assigned aggregates, similar to what exists on the Prefix model.

Justification

RIR utilization is currently calculated by manipulating the queryset used in the list view. This is both inefficient and inflexible, because no convenient method exists for determining the utilization of a particular RIR. Moving this logic into a method is cleaner and allows us to remove the alter_queryset() method on ObjectListView.

Metadata

Metadata

Assignees

Labels

type: housekeepingChanges to the application which do not directly impact the end user

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions