summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-08-21 12:23:37 +0000
committerGerrit Code Review <review@openstack.org>2017-08-21 12:23:37 +0000
commit40a2d25abd048c81c04b8490d80bbd459a19762d (patch)
tree63619be23b1c95739f5269a96e344ebb9b073a78
parent14a96931fe53eb63bbd06b0e2be58008f05e22d3 (diff)
parent0e50837a374958d2863deef890879c960a05d8aa (diff)
downloadpython-glanceclient-40a2d25abd048c81c04b8490d80bbd459a19762d.tar.gz
Merge "stage call fails with TypeError"
-rw-r--r--glanceclient/v2/images.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py
index d95ebca..6d456eb 100644
--- a/glanceclient/v2/images.py
+++ b/glanceclient/v2/images.py
@@ -240,16 +240,18 @@ class Controller(object):
return body, resp
@utils.add_req_id_to_object()
- def stage(self, image_id, image_data):
+ def stage(self, image_id, image_data, image_size=None):
"""Upload the data to image staging.
:param image_id: ID of the image to upload data for.
:param image_data: File-like object supplying the data to upload.
+ :param image_size: Unused - present for backwards compatibility
"""
url = '/v2/images/%s/stage' % image_id
- return self.upload(image_id,
- image_data,
- u_url=url)
+ resp, body = self.upload(image_id,
+ image_data,
+ u_url=url)
+ return body, resp
@utils.add_req_id_to_object()
def image_import(self, image_id, method='glance-direct'):