Improved error reporting for HOT applications
Report HOT deployment errors on behalf of failed application Change-Id: I1eb3f6979c162657298fd0917dcda24a71e56df8 Closes-Bug: #1452080
This commit is contained in:
parent
2affdd5d7a
commit
1fb35e964d
@ -203,6 +203,10 @@ class HotPackage(murano.packages.application_package.ApplicationPackage):
|
|||||||
for key, value in (hot.get('parameters') or {}).items():
|
for key, value in (hot.get('parameters') or {}).items():
|
||||||
template_parameters[key] = YAQL("$." + key)
|
template_parameters[key] = YAQL("$." + key)
|
||||||
|
|
||||||
|
copy_outputs = []
|
||||||
|
for key, value in (hot.get('outputs') or {}).items():
|
||||||
|
copy_outputs.append({YAQL('$.' + key): YAQL('$outputs.' + key)})
|
||||||
|
|
||||||
deploy = [
|
deploy = [
|
||||||
{YAQL('$environment'): YAQL(
|
{YAQL('$environment'): YAQL(
|
||||||
"$.find('io.murano.Environment').require()"
|
"$.find('io.murano.Environment').require()"
|
||||||
@ -232,17 +236,28 @@ class HotPackage(murano.packages.application_package.ApplicationPackage):
|
|||||||
|
|
||||||
YAQL("$reporter.report($this, "
|
YAQL("$reporter.report($this, "
|
||||||
"'Stack creation has started')"),
|
"'Stack creation has started')"),
|
||||||
YAQL('$stack.push()'),
|
{
|
||||||
{YAQL('$outputs'): YAQL('$stack.output()')},
|
'Try': [YAQL('$stack.push()')],
|
||||||
YAQL("$reporter.report($this, "
|
'Catch': [
|
||||||
"'Stack was successfully created')"),
|
{
|
||||||
|
'As': 'e',
|
||||||
|
'Do': [
|
||||||
|
YAQL("$reporter.report_error($this, $e.message)"),
|
||||||
|
{'Rethrow': None}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
'Else': [
|
||||||
|
{YAQL('$outputs'): YAQL('$stack.output()')},
|
||||||
|
{'Do': copy_outputs},
|
||||||
|
YAQL("$reporter.report($this, "
|
||||||
|
"'Stack was successfully created')"),
|
||||||
|
|
||||||
YAQL("$reporter.report($this, "
|
YAQL("$reporter.report($this, "
|
||||||
"'Application deployment has finished')"),
|
"'Application deployment has finished')"),
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
for key, value in (hot.get('outputs') or {}).items():
|
|
||||||
deploy.append({YAQL('$.' + key): YAQL(
|
|
||||||
'$outputs.' + key)})
|
|
||||||
|
|
||||||
destroy = [
|
destroy = [
|
||||||
{YAQL('$stack'): YAQL(
|
{YAQL('$stack'): YAQL(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user