mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Wrap up other places where the old license access method is used
This commit is contained in:
parent
296ca52b0f
commit
769fe18724
@ -28,7 +28,7 @@ class Command(BaseCommand):
|
||||
def handle(self, *args, **kwargs):
|
||||
# Get the license data.
|
||||
license_reader = TaskSerializer()
|
||||
license_data = license_reader.from_file()
|
||||
license_data = license_reader.from_database()
|
||||
|
||||
# Does the license have features, at all?
|
||||
# If there is no license yet, then all features are clearly off.
|
||||
|
||||
@ -148,7 +148,7 @@ class BaseAccess(object):
|
||||
|
||||
def check_license(self, add_host=False, feature=None, check_expiration=True):
|
||||
reader = TaskSerializer()
|
||||
validation_info = reader.from_file()
|
||||
validation_info = reader.from_database()
|
||||
if ('test' in sys.argv or 'jenkins' in sys.argv) and not os.environ.get('SKIP_LICENSE_FIXUP_FOR_TEST', ''):
|
||||
validation_info['free_instances'] = 99999999
|
||||
validation_info['time_remaining'] = 99999999
|
||||
|
||||
@ -1180,7 +1180,7 @@ class Command(NoArgsCommand):
|
||||
|
||||
def check_license(self):
|
||||
reader = LicenseReader()
|
||||
license_info = reader.from_file()
|
||||
license_info = reader.from_database()
|
||||
if not license_info or len(license_info) == 0:
|
||||
self.logger.error(LICENSE_NON_EXISTANT_MESSAGE)
|
||||
raise CommandError('No Tower license found!')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user