Don't return list in a parameter as this : try to translate the elements of the list.
Change-Id: I515c806a28f63ab902d683a7e8260fcd029d585f
This commit is contained in:
parent
ebc1edb12e
commit
63d6003b3d
|
@ -135,7 +135,7 @@ log = logging.getLogger('heat-translator')
|
||||||
|
|
||||||
TOSCA_TO_HOT_TYPE = _generate_type_map()
|
TOSCA_TO_HOT_TYPE = _generate_type_map()
|
||||||
|
|
||||||
BASE_TYPES = six.string_types + six.integer_types + (dict, list, OrderedDict)
|
BASE_TYPES = six.string_types + six.integer_types + (dict, OrderedDict)
|
||||||
|
|
||||||
|
|
||||||
class TranslateNodeTemplates(object):
|
class TranslateNodeTemplates(object):
|
||||||
|
@ -415,6 +415,14 @@ class TranslateNodeTemplates(object):
|
||||||
if res:
|
if res:
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
if isinstance(param_value, list):
|
||||||
|
translated_list = []
|
||||||
|
for elem in param_value:
|
||||||
|
translated_elem = self.translate_param_value(elem, resource)
|
||||||
|
if translated_elem:
|
||||||
|
translated_list.append(translated_elem)
|
||||||
|
return translated_list
|
||||||
|
|
||||||
if isinstance(param_value, BASE_TYPES):
|
if isinstance(param_value, BASE_TYPES):
|
||||||
return param_value
|
return param_value
|
||||||
|
|
||||||
|
|
|
@ -46,3 +46,7 @@ outputs:
|
||||||
template: $s0$s1$s2
|
template: $s0$s1$s2
|
||||||
static_map_val:
|
static_map_val:
|
||||||
value: static_value
|
value: static_value
|
||||||
|
test_list_of_functions:
|
||||||
|
value:
|
||||||
|
- get_input: map_val
|
||||||
|
- static_value
|
||||||
|
|
|
@ -79,3 +79,6 @@ topology_template:
|
||||||
|
|
||||||
concat_map_val:
|
concat_map_val:
|
||||||
value: { concat: [ 'http://', { get_property: [ myapp, myfeature, my_map, test_key ] }, ':8080' ] }
|
value: { concat: [ 'http://', { get_property: [ myapp, myfeature, my_map, test_key ] }, ':8080' ] }
|
||||||
|
|
||||||
|
test_list_of_functions:
|
||||||
|
value: [ { get_property: [ myapp, myfeature, my_map, test_key ] }, { get_property: [ myapp, myfeature, my_map, test_key_static ] } ]
|
||||||
|
|
Loading…
Reference in New Issue