Skip to content

Commit

Permalink
Add default attribute in hot parameter definition
Browse files Browse the repository at this point in the history
So `default' in hot is translated to `Default' in cfn

Change-Id: Ifd50dbb993dd0cb177b0e16652c6ef17d12cd2e5
Fixes: bug #1199311
  • Loading branch information
JUN JIE NAN committed Jul 22, 2013
1 parent f0b6b55 commit 239c383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions heat/engine/hot.py
Expand Up @@ -84,6 +84,7 @@ def _translate(value, mapping, default=None):
def _translate_parameters(self, parameters):
"""Get the parameters of the template translated into CFN format."""
HOT_TO_CFN_ATTRS = {'type': 'Type',
'default': 'Default',
'description': 'Description'}

HOT_TO_CFN_TYPES = {'string': 'String'}
Expand Down
5 changes: 4 additions & 1 deletion heat/tests/test_hot.py
Expand Up @@ -60,9 +60,12 @@ def test_translate_parameters(self):
param1:
description: foo
type: string
default: boo
''')

expected = {'param1': {'Description': 'foo', 'Type': 'String'}}
expected = {'param1': {'Description': 'foo',
'Type': 'String',
'Default': 'boo'}}

tmpl = parser.Template(hot_tpl)
self.assertEqual(tmpl[hot.PARAMETERS], expected)
Expand Down

0 comments on commit 239c383

Please sign in to comment.