Heat stack deletion for HOT/TOSCA packages was fixed

HeatStack class expects to be owned by some other and uses it to find
OpenStack region name it belongs to. If there is no owner provided then
the default region is used which is random for multi-region setups.

MuranoPL code that was generated from HOT and TOSCA provided that owner
on "deploy" phase but not on "destroy". So the stack that was
successfully created earlier could never be deleted in multi-region
OpenStack installations for non-default region.

Change-Id: I19ca0c7129b073fdd852b22a6a7f84f7ee377ee7
Closes-Bug: #1565777
This commit is contained in:
Stan Lagun 2016-04-05 14:41:56 +03:00
parent 9dc8a7b6b2
commit 612a25371d
2 changed files with 8 additions and 3 deletions

View File

@ -355,8 +355,11 @@ class CSARPackage(package_base.PackageBase):
]
destroy = [
{YAQL('$environment'): YAQL(
"$.find('io.murano.Environment').require()"
)},
{YAQL('$stack'): YAQL(
"new('io.murano.system.HeatStack', "
"new('io.murano.system.HeatStack', $environment, "
"name => $.getAttr(generatedHeatStackName))")},
YAQL('$stack.delete()')

View File

@ -331,10 +331,12 @@ class HotPackage(package_base.PackageBase):
]
destroy = [
{YAQL('$environment'): YAQL(
"$.find('io.murano.Environment').require()"
)},
{YAQL('$stack'): YAQL(
"new('io.murano.system.HeatStack', "
"new('io.murano.system.HeatStack', $environment, "
"name => $.getAttr(generatedHeatStackName))")},
YAQL('$stack.delete()')
]