From a092406543210adc33abb1e3eb33556f8aa56dd6 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 11 Nov 2020 11:23:16 -0500 Subject: [PATCH] Use the exported count in the manifest for the node count, if present. --- awx/main/utils/licensing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awx/main/utils/licensing.py b/awx/main/utils/licensing.py index d838e37e69..efefcf6944 100644 --- a/awx/main/utils/licensing.py +++ b/awx/main/utils/licensing.py @@ -134,7 +134,10 @@ class Licenser(object): # Parse output for subscription metadata to build config license = dict() license['sku'] = manifest['pool']['productId'] - license['instance_count'] = manifest['pool']['quantity'] + try: + license['instance_count'] = manifest['pool']['exported'] + except KeyError: + license['instance_count'] = manifest['pool']['quantity'] license['subscription_name'] = manifest['pool']['productName'] license['pool_id'] = manifest['pool']['id'] license['license_date'] = parse_date(manifest['endDate']).strftime('%s')