From b447864eaf8d74092abbe6113a4bd27a4653e2c8 Mon Sep 17 00:00:00 2001 From: Alexander Tivelkov Date: Wed, 28 May 2014 18:23:02 +0400 Subject: [PATCH] Subsequent stack updates for Heat have proper set of parameters Parameters retrieved from the existing heat stack and re-applied into the updated stack do not include special parameters such as OS::stack_id and OS::stack_name, which cannot be accepted as input params Change-Id: Ic42bead15267822c43ecf703e4128015c89ec6de Closes-Bug: #1324094 --- murano/engine/system/heat_stack.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/murano/engine/system/heat_stack.py b/murano/engine/system/heat_stack.py index e0519c76..1323728e 100644 --- a/murano/engine/system/heat_stack.py +++ b/murano/engine/system/heat_stack.py @@ -18,9 +18,7 @@ import heatclient.client as hclient import heatclient.exc as heat_exc import keystoneclient.v2_0.client as ksclient - import murano.common.config as config - import murano.dsl.helpers as helpers import murano.dsl.murano_class as murano_class import murano.dsl.murano_object as murano_object @@ -80,7 +78,8 @@ class HeatStack(murano_object.MuranoObject): stack_info.id)) # template = {} self._template = template - self._parameters.update(stack_info.parameters) + self._parameters.update( + HeatStack._remove_system_params(stack_info.parameters)) self._applied = True return self._template.copy() except heat_exc.HTTPNotFound: @@ -108,6 +107,11 @@ class HeatStack(murano_object.MuranoObject): self._template = helpers.merge_dicts(self._template, template) self._applied = False + @staticmethod + def _remove_system_params(parameters): + return {k: v for k, v in parameters.iteritems() if + not k.startswith("OS::")} + def _get_status(self): status = [None]