+
+ def _is_substitution_mapped_node(self, nodetemplate, tosca_tpl):
+ """Return True if the nodetemple is substituted."""
+ if (nodetemplate and not nodetemplate.substitution_mapped and
+ self.get_submaped_node_type(tosca_tpl) == nodetemplate.type and
+ len(nodetemplate.interfaces) < 1):
+ return True
+ else:
+ return False
+
+ def get_submaped_node_type(self, tosca_tpl):
+ """Return substitution mappings node type."""
+ if tosca_tpl:
+ return TopologyTemplate.get_submaped_node_type(
+ tosca_tpl.get(TOPOLOGY_TEMPLATE))
+
+ def has_substitution_mappings(self):
+ """Return True if the template has valid substitution mappings."""
+ return self.topology_template is not None and \
+ self.topology_template.substitution_mappings is not None
+
+ def has_nested_templates(self):
+ """Return True if the tosca template has nested templates."""
+ return self.nested_tosca_templates is not None and \
+ len(self.nested_tosca_templates) >= 1