mirror of
https://github.com/ansible/awx.git
synced 2026-07-30 17:39:57 -02:30
Clean-up intiail commit for Host filter / DynamicInventory
This commit is contained in:
@@ -20,7 +20,11 @@ from django.utils.timezone import now
|
||||
# AWX
|
||||
from awx.api.versioning import reverse
|
||||
from awx.main.constants import CLOUD_PROVIDERS
|
||||
from awx.main.fields import ImplicitRoleField, JSONBField
|
||||
from awx.main.fields import (
|
||||
ImplicitRoleField,
|
||||
JSONBField,
|
||||
DynamicFilterField,
|
||||
)
|
||||
from awx.main.managers import HostManager
|
||||
from awx.main.models.base import * # noqa
|
||||
from awx.main.models.unified_jobs import * # noqa
|
||||
@@ -99,6 +103,13 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin):
|
||||
editable=False,
|
||||
help_text=_('Number of external inventory sources in this inventory with failures.'),
|
||||
)
|
||||
host_filter = DynamicFilterField(
|
||||
blank=True,
|
||||
null=True,
|
||||
default=None,
|
||||
help_text=_('Filter that will be applied to the hosts of this inventory.'),
|
||||
)
|
||||
|
||||
admin_role = ImplicitRoleField(
|
||||
parent_role='organization.admin_role',
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user