diff options
Diffstat (limited to 'jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py')
-rw-r--r-- | jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py index 23f544a..c56e7b9 100644 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py +++ b/jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py @@ -25,16 +25,17 @@ from toscaparser.relationship_template import RelationshipTemplate from toscaparser.substitution_mappings import SubstitutionMappings from toscaparser.tpl_relationship_graph import ToscaGraph from toscaparser.utils.gettextutils import _ +from toscaparser.utils import validateutils from org.openecomp.sdc.toscaparser.jython import JyTopologyTemplate # Topology template key names SECTIONS = (DESCRIPTION, INPUTS, NODE_TEMPLATES, RELATIONSHIP_TEMPLATES, OUTPUTS, GROUPS, - SUBSTITUION_MAPPINGS, POLICIES) = \ + SUBSTITUION_MAPPINGS, POLICIES, METADATA) = \ ('description', 'inputs', 'node_templates', 'relationship_templates', 'outputs', 'groups', - 'substitution_mappings', 'policies') + 'substitution_mappings', 'policies', 'metadata') log = logging.getLogger("tosca.model") @@ -48,6 +49,10 @@ class TopologyTemplate(JyTopologyTemplate): self.tpl = template self.sub_mapped_node_template = sub_mapped_node_template if self.tpl: + self.meta_data = None + if METADATA in self.tpl: + self.meta_data = self.tpl.get(METADATA) + validateutils.validate_map(self.meta_data) self.custom_defs = custom_defs self.rel_types = rel_types self.parsed_params = parsed_params @@ -78,6 +83,9 @@ class TopologyTemplate(JyTopologyTemplate): def getJySubstitutionMappings(self): return self.substitution_mappings + + def getJyMetadata(self): + return self.meta_data def _inputs(self): inputs = [] |