Adding support for downloading a job binary
Fixes: bug 1250972 Change-Id: I26ddb7741e8d72db305845cc55b7e61b57840d66
This commit is contained in:
1
AUTHORS
1
AUTHORS
@@ -1,5 +1,6 @@
|
||||
Alexander Ignatov <aignatov@mirantis.com>
|
||||
Alexander Kuznetsov <akuznetsov@mirantis.com>
|
||||
Chad Roberts <croberts@redhat.com>
|
||||
Jeremy Stanley <fungi@yuggoth.org>
|
||||
Nikita Konovalov <nkonovalov@mirantis.com>
|
||||
Nikolay Mahotkin <nmakhotkin@mirantis.com>
|
||||
|
||||
@@ -41,3 +41,10 @@ class JobBinariesManager(base.ResourceManager):
|
||||
|
||||
def delete(self, job_binary_id):
|
||||
self._delete('/job-binaries/%s' % job_binary_id)
|
||||
|
||||
def get_file(self, job_binary_id):
|
||||
resp = self.api.client.get('/job-binaries/%s/data' % job_binary_id)
|
||||
|
||||
if resp.status_code != 200:
|
||||
self._raise_api_exception(resp)
|
||||
return resp.content
|
||||
|
||||
Reference in New Issue
Block a user