mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 02:48:38 -06:00
Formating updates
This commit is contained in:
parent
b6adfa1a17
commit
3b79b7e44c
@ -308,7 +308,6 @@ class Aggregate(ChangeLoggedModel, CustomFieldModel):
|
||||
return self.prefix.version
|
||||
return None
|
||||
|
||||
|
||||
def get_percent_utilized(self):
|
||||
"""Gets the percentage utilized from the get_utilization method.
|
||||
|
||||
@ -318,7 +317,6 @@ class Aggregate(ChangeLoggedModel, CustomFieldModel):
|
||||
utilization = self.get_utilization()
|
||||
return int(utilization.numerator / float(utilization.denominator) * 100)
|
||||
|
||||
|
||||
def get_utilization(self):
|
||||
"""Gets the numerator and denominator for calculating utilization of an Aggregrate.
|
||||
Returns:
|
||||
|
@ -327,5 +327,6 @@ def copy_safe_request(request):
|
||||
'id': getattr(request, 'id', None), # UUID assigned by middleware
|
||||
})
|
||||
|
||||
|
||||
# Setup UtilizationData named tuple for use by multiple methods
|
||||
UtilizationData = namedtuple("UtilizationData", ["numerator", "denominator"])
|
Loading…
Reference in New Issue
Block a user