diff options
author | Brian Rosmaita <rosmaita.fossdev@gmail.com> | 2017-08-16 21:46:21 -0400 |
---|---|---|
committer | Abhishek Kekane <abhishek.kekane@nttdata.com> | 2017-08-24 09:18:21 +0000 |
commit | 66d486738a4f198fca4934d6cb7db5caec0e8fd7 (patch) | |
tree | daf81f49f11de18012d49e1be5820a8cf5e94eec | |
parent | f7ce62b08901b16c472cc4ec84831f2144a55cc6 (diff) | |
download | python-glanceclient-66d486738a4f198fca4934d6cb7db5caec0e8fd7.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
(cherry picked from commit e5b69eff693e7e012f867d83a54d737fedf74cb0)
-rw-r--r-- | glanceclient/v2/images.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py index 6d456eb..29abc30 100644 --- a/glanceclient/v2/images.py +++ b/glanceclient/v2/images.py @@ -257,7 +257,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 |