diff options
author | julien zhang <zhang.jun3g@zte.com.cn> | 2016-08-15 15:08:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-08-15 15:08:34 +0000 |
commit | de4f5e5c4ee8923c8a441c093fb12ddd9fe6fed5 (patch) | |
tree | e6f8506c36224cdf590a2eda5ef909299db48c33 /tosca2heat/tosca-parser/toscaparser/topology_template.py | |
parent | 769408d0ed336797f76de5df226d30031ae18887 (diff) | |
parent | f52871b8f5ed66924ae8c715788d0bc09c1518ac (diff) |
Merge "Add required definition in class of Input."
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/topology_template.py')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/topology_template.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/topology_template.py b/tosca2heat/tosca-parser/toscaparser/topology_template.py index fe05979..100a06b 100644 --- a/tosca2heat/tosca-parser/toscaparser/topology_template.py +++ b/tosca2heat/tosca-parser/toscaparser/topology_template.py @@ -26,7 +26,6 @@ from toscaparser.substitution_mappings import SubstitutionMappings from toscaparser.tpl_relationship_graph import ToscaGraph from toscaparser.utils.gettextutils import _ - # Topology template key names SECTIONS = (DESCRIPTION, INPUTS, NODE_TEMPLATES, RELATIONSHIP_TEMPLATES, OUTPUTS, GROUPS, @@ -73,6 +72,14 @@ class TopologyTemplate(object): default = input.default if default: input.validate(default) + if (self.parsed_params and input.name not in self.parsed_params + or self.parsed_params is None) and input.required \ + and input.default is None: + exception.ExceptionCollector.appendException( + exception.MissingRequiredParameterError( + what='Template', + input_name=input.name)) + inputs.append(input) return inputs |