mirror of
https://github.com/ansible/awx.git
synced 2026-04-10 04:29:21 -02:30
Fix the way we are passing the awxkit base path to resources (#14862)
This commit is contained in:
committed by
GitHub
parent
f9a23a5645
commit
068e6acbd5
@@ -284,13 +284,10 @@ class Resources(object):
|
|||||||
_workflow_job_workflow_nodes = r'workflow_jobs/\d+/workflow_nodes/'
|
_workflow_job_workflow_nodes = r'workflow_jobs/\d+/workflow_nodes/'
|
||||||
_subscriptions = 'config/subscriptions/'
|
_subscriptions = 'config/subscriptions/'
|
||||||
_workflow_jobs = 'workflow_jobs/'
|
_workflow_jobs = 'workflow_jobs/'
|
||||||
api = '/api/'
|
api = str(config.api_base_path)
|
||||||
common = api + r'v\d+/'
|
common = api + r'v\d+/'
|
||||||
v2 = api + 'v2/'
|
v2 = api + 'v2/'
|
||||||
|
|
||||||
def __init__(self, api):
|
|
||||||
self.api = api
|
|
||||||
|
|
||||||
def __getattr__(self, resource):
|
def __getattr__(self, resource):
|
||||||
if resource[:3] == '___':
|
if resource[:3] == '___':
|
||||||
raise AttributeError('No existing resource: {}'.format(resource))
|
raise AttributeError('No existing resource: {}'.format(resource))
|
||||||
@@ -305,4 +302,4 @@ class Resources(object):
|
|||||||
return '{0}{1}'.format(getattr(self, prefix), getattr(self, resource))
|
return '{0}{1}'.format(getattr(self, prefix), getattr(self, resource))
|
||||||
|
|
||||||
|
|
||||||
resources = Resources(api=config.api_base_path)
|
resources = Resources()
|
||||||
|
|||||||
Reference in New Issue
Block a user