summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCesar Francisco San Nicolas Martinez <csannico@redhat.com>2024-02-09 15:31:52 +0100
committerGitHub <noreply@github.com>2024-02-09 15:31:52 +0100
commit068e6acbd512a2bf0ecf4eee3941bc824d811f6c (patch)
treec7d82a099815a09f1c0989efb19fe1b55d859000
parentRemove enable button for hop nodes (#14861) (diff)
downloadawx-068e6acbd512a2bf0ecf4eee3941bc824d811f6c.tar.xz
awx-068e6acbd512a2bf0ecf4eee3941bc824d811f6c.zip
Fix the way we are passing the awxkit base path to resources (#14862)
-rw-r--r--awxkit/awxkit/api/resources.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/awxkit/awxkit/api/resources.py b/awxkit/awxkit/api/resources.py
index 17397e9c66..4ffb70a9b5 100644
--- a/awxkit/awxkit/api/resources.py
+++ b/awxkit/awxkit/api/resources.py
@@ -284,13 +284,10 @@ class Resources(object):
_workflow_job_workflow_nodes = r'workflow_jobs/\d+/workflow_nodes/'
_subscriptions = 'config/subscriptions/'
_workflow_jobs = 'workflow_jobs/'
- api = '/api/'
+ api = str(config.api_base_path)
common = api + r'v\d+/'
v2 = api + 'v2/'
- def __init__(self, api):
- self.api = api
-
def __getattr__(self, resource):
if resource[:3] == '___':
raise AttributeError('No existing resource: {}'.format(resource))
@@ -305,4 +302,4 @@ class Resources(object):
return '{0}{1}'.format(getattr(self, prefix), getattr(self, resource))
-resources = Resources(api=config.api_base_path)
+resources = Resources()