mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 04:45:03 -02:30
Fix trial status and host limit with sub (#14237)
Co-authored-by: Lucas Benedito <lbenedit@redhat.com>
This commit is contained in:
@@ -366,7 +366,7 @@ class BaseAccess(object):
|
|||||||
report_violation = lambda message: None
|
report_violation = lambda message: None
|
||||||
else:
|
else:
|
||||||
report_violation = lambda message: logger.warning(message)
|
report_violation = lambda message: logger.warning(message)
|
||||||
if validation_info.get('trial', False) is True or validation_info['instance_count'] == 10: # basic 10 license
|
if validation_info.get('trial', False) is True:
|
||||||
|
|
||||||
def report_violation(message): # noqa
|
def report_violation(message): # noqa
|
||||||
raise PermissionDenied(message)
|
raise PermissionDenied(message)
|
||||||
|
|||||||
@@ -175,7 +175,12 @@ class Licenser(object):
|
|||||||
license.setdefault('pool_id', sub['pool']['id'])
|
license.setdefault('pool_id', sub['pool']['id'])
|
||||||
license.setdefault('product_name', sub['pool']['productName'])
|
license.setdefault('product_name', sub['pool']['productName'])
|
||||||
license.setdefault('valid_key', True)
|
license.setdefault('valid_key', True)
|
||||||
license.setdefault('license_type', 'enterprise')
|
if sub['pool']['productId'].startswith('S'):
|
||||||
|
license.setdefault('trial', True)
|
||||||
|
license.setdefault('license_type', 'trial')
|
||||||
|
else:
|
||||||
|
license.setdefault('trial', False)
|
||||||
|
license.setdefault('license_type', 'enterprise')
|
||||||
license.setdefault('satellite', False)
|
license.setdefault('satellite', False)
|
||||||
# Use the nearest end date
|
# Use the nearest end date
|
||||||
endDate = parse_date(sub['endDate'])
|
endDate = parse_date(sub['endDate'])
|
||||||
|
|||||||
Reference in New Issue
Block a user