mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 12:41:19 -03:30
Aggregate quantity per sub allocation, not exported
* The exported field shows total quantity exported to a manifest for a given sub. We want to sum the quantities of each sub allocation in a manifest instead.
This commit is contained in:
parent
5e51dd2ff7
commit
b81f082a18
@ -183,10 +183,7 @@ class Licenser(object):
|
||||
currentEndDate = datetime.fromtimestamp(int(currentEndDateStr), timezone.utc)
|
||||
if endDate < currentEndDate:
|
||||
license['license_date'] = endDate.strftime('%s')
|
||||
try:
|
||||
instances = sub['pool']['exported']
|
||||
except KeyError:
|
||||
instances = sub['pool']['quantity']
|
||||
instances = sub['quantity']
|
||||
license['instance_count'] = license.get('instance_count', 0) + instances
|
||||
license['subscription_name'] = re.sub(r'[\d]* Managed Nodes', '%d Managed Nodes' % license['instance_count'], license['subscription_name'])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user