mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-30 03:41:50 -05:00
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:
@@ -31,6 +31,7 @@ from django.core.cache import cache
|
||||
# AWX
|
||||
from awx.main.constants import CLOUD_PROVIDERS
|
||||
from awx.main.fields import AutoOneToOneField
|
||||
from awx.main.managers import HostManager
|
||||
from awx.main.models.base import *
|
||||
from awx.main.models.jobs import Job
|
||||
from awx.main.models.unified_jobs import *
|
||||
@@ -387,6 +388,8 @@ class Host(CommonModelNameNotUnique):
|
||||
help_text=_('Inventory source(s) that created or modified this host.'),
|
||||
)
|
||||
|
||||
objects = HostManager()
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user