heat API : return ResourceProperties as JSON
For boto to correctly parse the API DescribeStackEvents action, the ResourceProperties key in the response must be a string, as per the AWS spec, so we encode the properties in a JSON blob Fixes #245 Change-Id: Icd38984836a941ed4a012b06382933bb46f43c4f Signed-off-by: Steven Hardy <shardy@redhat.com>
This commit is contained in:
parent
715a62d2b4
commit
3c85e1941f
@ -426,6 +426,8 @@ class StackController(object):
|
||||
}
|
||||
|
||||
result = api_utils.reformat_dict_keys(keymap, e)
|
||||
result['ResourceProperties'] = json.dumps(
|
||||
result['ResourceProperties'])
|
||||
|
||||
return self._stackid_format(result)
|
||||
|
||||
|
@ -808,7 +808,7 @@ class StackControllerTest(unittest.TestCase):
|
||||
'ResourceType': u'AWS::EC2::Instance',
|
||||
'Timestamp': u'2012-07-23T13:05:39Z',
|
||||
'StackName': u'wordpress',
|
||||
'ResourceProperties': {u'UserData': u'blah'},
|
||||
'ResourceProperties': json.dumps({u'UserData': u'blah'}),
|
||||
'PhysicalResourceId': None,
|
||||
'ResourceStatusReason': u'state changed',
|
||||
'LogicalResourceId': u'WikiDatabase'}]}}}
|
||||
|
Loading…
Reference in New Issue
Block a user