mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -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:
commit
8e46166313
@ -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