EntityTemplate has no property of parent_type
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TOSCA Parser |
Triaged
|
Undecided
|
xiaodong shang |
Bug Description
EntityTemplate is the parent of NodeTemplate,but there is no parent_type definition, so the method of is_derived_from may be error when judge one nodetemplate whether is a instance of grandparent node type, the current code logic in EntityTemplate class is below:
def is_derived_
'''Check if object inherits from the given type.
Returns true if this object is derived from 'type_str'.
False otherwise.
'''
if not self.type:
return False
elif self.type == type_str:
return True
elif self.parent_type: # Here may be error
return self.parent_
else:
return False
Changed in tosca-parser: | |
assignee: | nobody → shangxdy (shangxdy) |
Changed in tosca-parser: | |
status: | New → Triaged |