mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Separate page object for config/attach endpoint
This commit is contained in:
parent
422c7308fd
commit
aae0b29008
@ -36,4 +36,11 @@ class Config(base.Base):
|
||||
return [k for k, v in self.license_info.get('features', {}).items() if v]
|
||||
|
||||
|
||||
class ConfigAttach(page.Page):
|
||||
|
||||
def attach(self, **kwargs):
|
||||
return self.post(json=kwargs).json
|
||||
|
||||
|
||||
page.register_page(resources.config, Config)
|
||||
page.register_page(resources.config_attach, ConfigAttach)
|
||||
|
||||
@ -7,8 +7,5 @@ class Subscriptions(page.Page):
|
||||
def get_possible_licenses(self, **kwargs):
|
||||
return self.post(json=kwargs).json
|
||||
|
||||
def attach(self, **kwargs):
|
||||
return self.connection.post(resources.subscriptions_attach, json=kwargs).json
|
||||
|
||||
|
||||
page.register_page(resources.subscriptions, Subscriptions)
|
||||
|
||||
@ -16,6 +16,7 @@ class Resources(object):
|
||||
_auth = 'auth/'
|
||||
_authtoken = 'authtoken/'
|
||||
_config = 'config/'
|
||||
_config_attach = 'config/attach/'
|
||||
_credential = r'credentials/\d+/'
|
||||
_credential_access_list = r'credentials/\d+/access_list/'
|
||||
_credential_copy = r'credentials/\d+/copy/'
|
||||
@ -267,7 +268,6 @@ class Resources(object):
|
||||
_workflow_job_templates = 'workflow_job_templates/'
|
||||
_workflow_job_workflow_nodes = r'workflow_jobs/\d+/workflow_nodes/'
|
||||
_subscriptions = 'config/subscriptions/'
|
||||
_subscriptions_attach = 'config/attach/'
|
||||
_workflow_jobs = 'workflow_jobs/'
|
||||
api = '/api/'
|
||||
common = api + r'v\d+/'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user