Check for tosca keyword in the TOSCA type
Check for tosca keyword in the given tosca type to handle short type name. Change-Id: I398a5192809ba88d2c11bcb0657a03dd0e1f97f9 Closes-Bug: #1382646
This commit is contained in:
@@ -44,6 +44,7 @@ class EntityType(object):
|
||||
RELATIONSHIP_PREFIX = 'tosca.relationships.'
|
||||
CAPABILITY_PREFIX = 'tosca.capabilities.'
|
||||
INTERFACE_PREFIX = 'tosca.interfaces.'
|
||||
TOSCA = 'tosca'
|
||||
|
||||
def derived_from(self, defs):
|
||||
'''Return a type this type is derived from.'''
|
||||
|
||||
@@ -29,7 +29,7 @@ class StatefulEntityType(EntityType):
|
||||
'remove_target']
|
||||
|
||||
def __init__(self, entitytype, prefix, custom_def=None):
|
||||
if prefix not in entitytype:
|
||||
if not entitytype.startswith(self.TOSCA):
|
||||
entitytype = prefix + entitytype
|
||||
if entitytype in list(self.TOSCA_DEF.keys()):
|
||||
self.defs = self.TOSCA_DEF[entitytype]
|
||||
|
||||
Reference in New Issue
Block a user