Adding support for downloading a job binary

Fixes: bug 1250972

Change-Id: I26ddb7741e8d72db305845cc55b7e61b57840d66
This commit is contained in:
Chad Roberts
2013-11-12 14:36:41 -05:00
parent 14aa3eb0af
commit 6ee810c49e
2 changed files with 8 additions and 0 deletions

View File

@@ -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>

View File

@@ -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