summaryrefslogtreecommitdiffstats
path: root/awxkit
diff options
context:
space:
mode:
authorRyan Petrello <rpetrell@redhat.com>2020-10-22 16:56:26 +0200
committerRyan Petrello <rpetrell@redhat.com>2020-10-30 21:39:57 +0100
commit4445d096f575b6985b9bf32a5db7de59ae271b4c (patch)
treed19f19a312f3b7ff96921da05a8409cb89c1ee65 /awxkit
parentEnable source vars for all inventory types (diff)
downloadawx-4445d096f575b6985b9bf32a5db7de59ae271b4c.tar.xz
awx-4445d096f575b6985b9bf32a5db7de59ae271b4c.zip
reimplement licensing to work with RHSM and entitlement uploads
Co-authored-by: Christian Adams <chadams@redhat.com>
Diffstat (limited to 'awxkit')
-rw-r--r--awxkit/awxkit/api/pages/subscriptions.py3
-rw-r--r--awxkit/awxkit/api/resources.py1
2 files changed, 4 insertions, 0 deletions
diff --git a/awxkit/awxkit/api/pages/subscriptions.py b/awxkit/awxkit/api/pages/subscriptions.py
index 749776c000..ad0cded9bb 100644
--- a/awxkit/awxkit/api/pages/subscriptions.py
+++ b/awxkit/awxkit/api/pages/subscriptions.py
@@ -7,5 +7,8 @@ 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)
diff --git a/awxkit/awxkit/api/resources.py b/awxkit/awxkit/api/resources.py
index 25995188f9..ee48399b0c 100644
--- a/awxkit/awxkit/api/resources.py
+++ b/awxkit/awxkit/api/resources.py
@@ -267,6 +267,7 @@ 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+/'