mirror of
https://github.com/ansible/awx.git
synced 2026-08-01 18:39:54 -02:30
Add common code for determining active (licensed) hosts with unique names, update licensing code and inventory import to use it. Implements https://trello.com/c/2Q9Mosks
This commit is contained in:
@@ -1125,7 +1125,7 @@ class Command(NoArgsCommand):
|
||||
available_instances = license_info.get('available_instances', 0)
|
||||
free_instances = license_info.get('free_instances', 0)
|
||||
time_remaining = license_info.get('time_remaining', 0)
|
||||
new_count = Host.objects.filter(active=True).count()
|
||||
new_count = Host.objects.active_count()
|
||||
if time_remaining <= 0 and not license_info.get('demo', False):
|
||||
self.logger.error('License has expired')
|
||||
raise CommandError("License has expired!")
|
||||
|
||||
Reference in New Issue
Block a user