1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-26 07:55:24 +03:00
This commit is contained in:
Neev Geffen 2024-10-25 16:33:10 -04:00 committed by GitHub
commit 1e93115514
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 3 deletions

View File

@ -27,10 +27,21 @@ EXPORTABLE_RESOURCES = [
'execution_environments',
'applications',
'schedules',
'credential_input_sources',
]
EXPORTABLE_RELATIONS = ['Roles', 'NotificationTemplates', 'WorkflowJobTemplateNodes', 'Credentials', 'Hosts', 'Groups', 'ExecutionEnvironments', 'Schedules']
EXPORTABLE_RELATIONS = [
'Roles',
'NotificationTemplates',
'WorkflowJobTemplateNodes',
'Credentials',
'Hosts',
'Groups',
'ExecutionEnvironments',
'Schedules',
'CredentialInputSource',
]
# These are special-case related objects, where we want only in this
@ -48,6 +59,7 @@ DEPENDENT_EXPORT = [
('Inventory', 'Host'),
('Inventory', 'Label'),
('WorkflowJobTemplateNode', 'WorkflowApprovalTemplate'),
('Credential', 'CredentialInputSource'),
]

View File

@ -1,10 +1,13 @@
from awxkit.api.resources import resources
from awxkit.api.pages import Credential
from awxkit.api.mixins import HasCreate
from . import base
from . import page
class CredentialInputSource(base.Base):
pass
class CredentialInputSource(HasCreate, base.Base):
dependencies = [Credential]
NATURAL_KEY = ('target_credential', 'input_field_name')
page.register_page(resources.credential_input_source, CredentialInputSource)