Merge "HOT outputs were merged"

This commit is contained in:
Jenkins 2015-12-03 21:33:10 +00:00 committed by Gerrit Code Review
commit 0e37bcd3cd
2 changed files with 16 additions and 13 deletions

View File

@ -175,13 +175,16 @@ class HotPackage(package_base.PackageBase):
@staticmethod
def _translate_outputs(hot):
result = {}
for key in (hot.get('outputs') or {}).keys():
result[key] = {
"Contract": YAQL("$.string()"),
"Usage": "Out"
contract = {}
for key in (hot.get('outputs') or {}).iterkeys():
contract[key] = YAQL("$.string()")
return {
'templateOutputs': {
'Contract': contract,
'Default': {},
'Usage': 'Out'
}
return result
}
@staticmethod
def _translate_files(source_directory):
@ -262,10 +265,6 @@ class HotPackage(package_base.PackageBase):
hot_env = YAQL("$.hotEnvironment")
copy_outputs = []
for key in (hot.get('outputs') or {}).keys():
copy_outputs.append({YAQL('$.' + key): YAQL('$outputs.' + key)})
deploy = [
{YAQL('$environment'): YAQL(
"$.find('io.murano.Environment').require()"
@ -320,8 +319,7 @@ class HotPackage(package_base.PackageBase):
}
],
'Else': [
{YAQL('$outputs'): YAQL('$stack.output()')},
{'Do': copy_outputs},
{YAQL('$.templateOutputs'): YAQL('$stack.output()')},
YAQL("$reporter.report($this, "
"'Stack was successfully created')"),
@ -340,7 +338,7 @@ class HotPackage(package_base.PackageBase):
]
return {
'Workflow': {
'Methods': {
'deploy': {
'Body': deploy
},

View File

@ -0,0 +1,5 @@
---
features:
- All HOT template outputs are put into a single dictionary property
'templateOutputs' rather than in a generated property per each output.
As a result there are no more constraints on output names.