summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Rosmaita <rosmaita.fossdev@gmail.com>2017-08-16 21:46:21 -0400
committerBrian Rosmaita <rosmaita.fossdev@gmail.com>2017-08-18 15:12:04 +0000
commite5b69eff693e7e012f867d83a54d737fedf74cb0 (patch)
tree3f0f6793f5331938c75e6de914bbb0e536807b11
parent6fe3018de8564a20865d9350bc942e8e14296d85 (diff)
downloadpython-glanceclient-e5b69eff693e7e012f867d83a54d737fedf74cb0.tar.gz
Fix image-import call
Change the request body sent from the client to be the format that the API expects for the image-import call. Depends-On: I08783e28719e63b5a4b2115b8fce135e55be460a Change-Id: I5e34d772d561306c6f103c859740658a825dd189 Closes-bug: #1711259
-rw-r--r--glanceclient/v2/images.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py
index d95ebca..e0ad247 100644
--- a/glanceclient/v2/images.py
+++ b/glanceclient/v2/images.py
@@ -255,7 +255,7 @@ class Controller(object):
def image_import(self, image_id, method='glance-direct'):
"""Import Image via method."""
url = '/v2/images/%s/import' % image_id
- data = {'import_method': method}
+ data = {'method': {'name': method}}
resp, body = self.http_client.post(url, data=data)
return body, resp