From 0fc46d513477865fe8abfd54ad9529fda413060f Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 12 Jul 2012 17:46:46 +0100 Subject: [PATCH] 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 --- heat/api/v1/stacks.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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): """ -- 2.45.2