From e5b69eff693e7e012f867d83a54d737fedf74cb0 Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Wed, 16 Aug 2017 21:46:21 -0400 Subject: [PATCH] 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 --- glanceclient/v2/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py index d95ebca5..e0ad2470 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