Fix response body format of orchestration_client to dict

'create_stack' function in orchestration_client return raw json strings.
However, in most of cases, raw json strings are not expected because it's
too hard to use. So we should do 'json.loads(body)' for the response body.
And the other apis such as {update,delete,suspend,resume} do not return a
response body in the API spec docs[1]. So we do not need to add
'json.load(body)' to the functions for now.

[1] http://developer.openstack.org/api-ref-orchestration-v1.html

Change-Id: Ic7d37d70aa0373d9bbf3ad302d1a521f5adaafe9
This commit is contained in:
Masayuki Igawa 2014-08-29 16:21:23 +09:00
parent 6e418039c5
commit b1afe9b3a9
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ class OrchestrationClient(rest_client.RestClient):
uri = 'stacks'
resp, body = self.post(uri, headers=headers, body=body)
self.expected_success(201, resp.status)
body = json.loads(body)
return resp, body
def update_stack(self, stack_identifier, name, disable_rollback=True,