From: Steven Hardy Date: Thu, 12 Jul 2012 16:46:46 +0000 (+0100) Subject: heat API : Add missing StackId prefixes X-Git-Tag: 2014.1~1603 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0fc46d513477865fe8abfd54ad9529fda413060f;p=openstack-build%2Fheat-build.git heat API : Add missing StackId prefixes Align event-list and resource-list-details with other calls which add a AWS-style prefix to the StackId response element Change-Id: I0b1951068448d141e04ddca44f1d4188d3dff360 Signed-off-by: Steven Hardy --- diff --git a/heat/api/v1/stacks.py b/heat/api/v1/stacks.py index b1aa1b82..dfa0e046 100644 --- a/heat/api/v1/stacks.py +++ b/heat/api/v1/stacks.py @@ -302,8 +302,12 @@ class StackController(object): events = 'Error' not in event_res and event_res['events'] or [] + result = [] + for e in events: + result.append(self._stackid_addprefix(e)) + return self._format_response('DescribeStackEvents', - {'StackEvents': events}) + {'StackEvents': result}) def describe_stack_resource(self, req): """ @@ -364,8 +368,12 @@ class StackController(object): except rpc_common.RemoteError as ex: return self._remote_error(ex) + result = [] + for r in resources: + result.append(self._stackid_addprefix(r)) + return self._format_response('DescribeStackResources', - {'StackResources': resources}) + {'StackResources': result}) def list_stack_resources(self, req): """