diff options
author | xiaodong shang <shang.xiaodong@zte.com.cn> | 2017-09-15 17:08:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-09-15 17:08:15 +0000 |
commit | a224201e408aca8424b076b5e46138b5e322a9ef (patch) | |
tree | 45f000714217881cf8ac8eb69778871a2fa3ab11 /tosca2heat/tosca-parser/toscaparser/tosca_template.py | |
parent | 6b7f69347669e8a8e12e09774935c76e30654eb3 (diff) | |
parent | c1c67048665a6186490b0039407f3d4c8088182f (diff) |
Merge "Add required parameters validation for nested service"
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/tosca_template.py')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/tosca_template.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tosca_template.py b/tosca2heat/tosca-parser/toscaparser/tosca_template.py index 30432af..b0df424 100644 --- a/tosca2heat/tosca-parser/toscaparser/tosca_template.py +++ b/tosca2heat/tosca-parser/toscaparser/tosca_template.py @@ -18,6 +18,8 @@ from copy import deepcopy from toscaparser.common.exception import ExceptionCollector from toscaparser.common.exception import InvalidTemplateVersion from toscaparser.common.exception import MissingRequiredFieldError +from toscaparser.common.exception import MissingRequiredInputError +from toscaparser.common.exception import MissingRequiredOutputError from toscaparser.common.exception import MissingRequiredParameterError from toscaparser.common.exception import UnknownFieldError from toscaparser.common.exception import ValidationError @@ -316,11 +318,14 @@ class ToscaTemplate(object): % {'path': path})) def verify_template(self): + if self.no_required_paras_check: + ExceptionCollector.removeException( + MissingRequiredParameterError) + ExceptionCollector.removeException( + MissingRequiredInputError) + ExceptionCollector.removeException( + MissingRequiredOutputError) if ExceptionCollector.exceptionsCaught(): - if self.no_required_paras_check: - ExceptionCollector.removeException( - MissingRequiredParameterError) - if self.input_path: exceptions = ValidationError( message=(_('\nThe input "%(path)s" failed validation with ' |