summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/entity_template.py
diff options
context:
space:
mode:
authorjulien zhang <zhang.jun3g@zte.com.cn>2016-07-04 10:05:45 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-07-04 10:05:45 +0000
commitff5fc2fc822ea6833e8291c129176b87e15dc2a9 (patch)
treece3f79e6f2e3b046ca7bba9480dbdb9081f5f8e5 /tosca2heat/tosca-parser/toscaparser/entity_template.py
parent5eb53e8aa498bf080ff52cbddf3070be83292c3c (diff)
parent898719f261d68f822e3ab14c1466e893dd70f2a7 (diff)
Merge "EntityTemplate has no property of parent_type"
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/entity_template.py')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/entity_template.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/entity_template.py b/tosca2heat/tosca-parser/toscaparser/entity_template.py
index 281012b..f416c99 100644
--- a/tosca2heat/tosca-parser/toscaparser/entity_template.py
+++ b/tosca2heat/tosca-parser/toscaparser/entity_template.py
@@ -81,6 +81,15 @@ class EntityTemplate(object):
def type(self):
if self.type_definition:
return self.type_definition.type
+ else:
+ return None
+
+ @property
+ def parent_type(self):
+ if self.type_definition:
+ return self.type_definition.parent_type
+ else:
+ return None
@property
def requirements(self):