mirror of
https://github.com/ansible/awx.git
synced 2026-01-22 15:08:03 -03:30
Remove the Instance.objects.active_count() method
Literally nothing uses it. The similar Host.objects.active_count() method seems to be what is actually important for licensing.
This commit is contained in:
parent
6dda5f477e
commit
bb14a95076
@ -186,10 +186,6 @@ class InstanceManager(models.Manager):
|
||||
else:
|
||||
return (False, self.me())
|
||||
|
||||
def active_count(self):
|
||||
"""Return count of active Tower nodes for licensing."""
|
||||
return self.exclude(node_type='hop').count()
|
||||
|
||||
|
||||
class InstanceGroupManager(models.Manager):
|
||||
"""A custom manager class for the Instance model.
|
||||
|
||||
@ -77,7 +77,7 @@ def test_instance_dup(org_admin, organization, project, instance_factory, instan
|
||||
ig_all = instance_group_factory("all", instances=[i1, i2, i3])
|
||||
ig_dup = instance_group_factory("duplicates", instances=[i1])
|
||||
project.organization.instance_groups.add(ig_all, ig_dup)
|
||||
actual_num_instances = Instance.objects.active_count()
|
||||
actual_num_instances = Instance.objects.count()
|
||||
list_response = get(reverse('api:instance_list'), user=system_auditor)
|
||||
api_num_instances_auditor = list(list_response.data.items())[0][1]
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user