mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 23:46:05 -03:30
Merge pull request #8790 from rooftopcellist/quantity_not_exported
Aggregate quantity per sub allocation, not exported Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -183,10 +183,7 @@ class Licenser(object):
|
|||||||
currentEndDate = datetime.fromtimestamp(int(currentEndDateStr), timezone.utc)
|
currentEndDate = datetime.fromtimestamp(int(currentEndDateStr), timezone.utc)
|
||||||
if endDate < currentEndDate:
|
if endDate < currentEndDate:
|
||||||
license['license_date'] = endDate.strftime('%s')
|
license['license_date'] = endDate.strftime('%s')
|
||||||
try:
|
instances = sub['quantity']
|
||||||
instances = sub['pool']['exported']
|
|
||||||
except KeyError:
|
|
||||||
instances = sub['pool']['quantity']
|
|
||||||
license['instance_count'] = license.get('instance_count', 0) + instances
|
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'])
|
license['subscription_name'] = re.sub(r'[\d]* Managed Nodes', '%d Managed Nodes' % license['instance_count'], license['subscription_name'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user