diff options
author | Alan Rominger <arominge@redhat.com> | 2023-02-17 15:39:39 +0100 |
---|---|---|
committer | Elijah DeLee <kdelee@redhat.com> | 2023-03-08 18:58:12 +0100 |
commit | 7cb16ef91d2ef30909c42bbccd8c388e89a87dcc (patch) | |
tree | 5be764be60b62d76d1ee72c085f49ab86f7505ce /awxkit | |
parent | remove char_prompts and survey password from bulk job (diff) | |
download | awx-7cb16ef91d2ef30909c42bbccd8c388e89a87dcc.tar.xz awx-7cb16ef91d2ef30909c42bbccd8c388e89a87dcc.zip |
Make the bulk endpoint templates work in API browser
Various fixes
- Don't skip checking resource RBAC permissions for admins
Necessary to handle bad input, e.g. providing a
unified_job_template id that doesn't exit
- In awxkit, only "walk" if we get 'url' in the result
- Bulk host create should return url pointing to inventory,
not inventory/hosts
dont do org check for superuser
Diffstat (limited to 'awxkit')
-rw-r--r-- | awxkit/awxkit/api/pages/bulk.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/awxkit/awxkit/api/pages/bulk.py b/awxkit/awxkit/api/pages/bulk.py index b7342cab45..cd4af6458d 100644 --- a/awxkit/awxkit/api/pages/bulk.py +++ b/awxkit/awxkit/api/pages/bulk.py @@ -15,7 +15,10 @@ page.register_page([resources.bulk, (resources.bulk, 'get')], Bulk) class BulkJobLaunch(base.Base): def post(self, payload={}): result = self.connection.post(self.endpoint, payload) - return self.walk(result.json()['url']) + if 'url' in result.json(): + return self.walk(result.json()['url']) + else: + return self.page_identity(result, request_json={}) page.register_page(resources.bulk_job_launch, BulkJobLaunch) |