mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Expose execution environments in awxkit and awx-cli
This commit is contained in:
parent
cc429f9741
commit
c05e4e07ee
@ -14,6 +14,7 @@ from .teams import * # NOQA
|
||||
from .credentials import * # NOQA
|
||||
from .unified_jobs import * # NOQA
|
||||
from .unified_job_templates import * # NOQA
|
||||
from .execution_environments import * # NOQA
|
||||
from .projects import * # NOQA
|
||||
from .inventory import * # NOQA
|
||||
from .system_job_templates import * # NOQA
|
||||
|
||||
@ -23,6 +23,7 @@ EXPORTABLE_RESOURCES = [
|
||||
'inventory_sources',
|
||||
'job_templates',
|
||||
'workflow_job_templates',
|
||||
'execution_environments',
|
||||
]
|
||||
|
||||
|
||||
@ -33,6 +34,7 @@ EXPORTABLE_RELATIONS = [
|
||||
'Credentials',
|
||||
'Hosts',
|
||||
'Groups',
|
||||
'ExecutionEnvironments',
|
||||
]
|
||||
|
||||
|
||||
|
||||
33
awxkit/awxkit/api/pages/execution_environments.py
Normal file
33
awxkit/awxkit/api/pages/execution_environments.py
Normal file
@ -0,0 +1,33 @@
|
||||
import logging
|
||||
|
||||
from awxkit.api.mixins import HasCreate
|
||||
from awxkit.api.pages import (
|
||||
Credential,
|
||||
Organization,
|
||||
)
|
||||
from awxkit.api.resources import resources
|
||||
|
||||
from . import base
|
||||
from . import page
|
||||
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ExecutionEnvironment(HasCreate, base.Base):
|
||||
|
||||
dependencies = [Organization, Credential]
|
||||
NATURAL_KEY = ('organization', 'image')
|
||||
|
||||
|
||||
page.register_page([resources.execution_environment,
|
||||
(resources.execution_environments, 'post'),
|
||||
(resources.organization_execution_environments, 'post')], ExecutionEnvironment)
|
||||
|
||||
|
||||
class ExecutionEnvironments(page.PageList, ExecutionEnvironment):
|
||||
pass
|
||||
|
||||
|
||||
page.register_page([resources.execution_environments,
|
||||
resources.organization_execution_environments], ExecutionEnvironments)
|
||||
@ -28,6 +28,8 @@ class Resources(object):
|
||||
_credential_types = 'credential_types/'
|
||||
_credentials = 'credentials/'
|
||||
_dashboard = 'dashboard/'
|
||||
_execution_environment = r'execution_environments/\d+/'
|
||||
_execution_environments = 'execution_environments/'
|
||||
_fact_view = r'hosts/\d+/fact_view/'
|
||||
_group = r'groups/\d+/'
|
||||
_group_access_list = r'groups/\d+/access_list/'
|
||||
@ -141,6 +143,7 @@ class Resources(object):
|
||||
_organization_access_list = r'organizations/\d+/access_list/'
|
||||
_organization_admins = r'organizations/\d+/admins/'
|
||||
_organization_applications = r'organizations/\d+/applications/'
|
||||
_organization_execution_environments = r'organizations/\d+/execution_environments/'
|
||||
_organization_inventories = r'organizations/\d+/inventories/'
|
||||
_organization_users = r'organizations/\d+/users/'
|
||||
_organizations = 'organizations/'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user