diff options
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/elements/entity_type.py')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/elements/entity_type.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py b/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py index 5d620a5..9b9787b 100644 --- a/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py +++ b/tosca2heat/tosca-parser/toscaparser/elements/entity_type.py @@ -56,7 +56,8 @@ class EntityType(object): GROUP_PREFIX = 'tosca.groups.' # currently the data types are defined only for network # but may have changes in the future. - DATATYPE_PREFIX = 'tosca.datatypes.network.' + DATATYPE_PREFIX = 'tosca.datatypes.' + DATATYPE_NETWORK_PREFIX = DATATYPE_PREFIX + 'network.' TOSCA = 'tosca' def derived_from(self, defs): @@ -106,8 +107,14 @@ class EntityType(object): value[k] = v if isinstance(value, list): for p_value in parent_value: - if p_value not in value: - value.append(p_value) + if isinstance(p_value, dict): + if list(p_value.keys())[0] not in [ + list(item.keys())[0] for item in + value]: + value.append(p_value) + else: + if p_value not in value: + value.append(p_value) else: value = copy.copy(parent_value) p = p.parent_type |