When translating a parameter value by interpreting functions, don't return complex objects when we don't know how to handle them.

Change-Id: I4937fde4d8923baa85c63c9bc3c7167d6aa35bb2
This commit is contained in:
Mathieu Velten 2016-07-01 11:54:32 +02:00
parent e022a26c32
commit ebc1edb12e

View File

@ -16,6 +16,7 @@ import logging
import os
import six
from collections import OrderedDict
from toscaparser.functions import Concat
from toscaparser.functions import GetAttribute
from toscaparser.functions import GetInput
@ -134,6 +135,8 @@ log = logging.getLogger('heat-translator')
TOSCA_TO_HOT_TYPE = _generate_type_map()
BASE_TYPES = six.string_types + six.integer_types + (dict, list, OrderedDict)
class TranslateNodeTemplates(object):
'''Translate TOSCA NodeTemplates to Heat Resources.'''
@ -412,7 +415,10 @@ class TranslateNodeTemplates(object):
if res:
return res
return param_value
if isinstance(param_value, BASE_TYPES):
return param_value
return None
def _translate_concat_function(self, concat_list, resource):
str_replace_template = ''