From 6ee810c49edf9ac115c3f80110ee7b7858459acf Mon Sep 17 00:00:00 2001 From: Chad Roberts Date: Tue, 12 Nov 2013 14:36:41 -0500 Subject: [PATCH] Adding support for downloading a job binary Fixes: bug 1250972 Change-Id: I26ddb7741e8d72db305845cc55b7e61b57840d66 --- AUTHORS | 1 + savannaclient/api/job_binaries.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/AUTHORS b/AUTHORS index 12a44f0e..3f315316 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,6 @@ Alexander Ignatov Alexander Kuznetsov +Chad Roberts Jeremy Stanley Nikita Konovalov Nikolay Mahotkin diff --git a/savannaclient/api/job_binaries.py b/savannaclient/api/job_binaries.py index 673af73d..6cdf5abe 100644 --- a/savannaclient/api/job_binaries.py +++ b/savannaclient/api/job_binaries.py @@ -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