Make custom definitions biggest priority

Make custom type definitions bigger priority than internal normative TOSCA definitions

Change-Id: I64c45953e5c4bb5612f5a98e65033e98b43417c7
Closes-Bug: #1883562
This commit is contained in:
Valeriya Shvetcova 2020-06-15 18:21:39 +03:00
parent b43f595fd3
commit 093fc8025e

View File

@ -40,11 +40,11 @@ class StatefulEntityType(EntityType):
entire_entitytype = prefix + entitytype
if not entitytype.startswith(self.TOSCA):
entire_entitytype = prefix + entitytype
if entire_entitytype in list(self.TOSCA_DEF.keys()):
if custom_def and entitytype in list(custom_def.keys()):
self.defs = custom_def[entitytype]
elif entire_entitytype in list(self.TOSCA_DEF.keys()):
self.defs = self.TOSCA_DEF[entire_entitytype]
entitytype = entire_entitytype
elif custom_def and entitytype in list(custom_def.keys()):
self.defs = custom_def[entitytype]
else:
self.defs = None
ExceptionCollector.appendException(