From bfa17e5ccf685e3fa5d6661c72397bf3e6953fe4 Mon Sep 17 00:00:00 2001 From: shangxdy Date: Fri, 2 Dec 2016 16:21:21 +0800 Subject: Add input validation test case The required properties without default value in substituted node template which be mapped must be as inputs of nested service template which defines substutition mappings, and the inputs of nested service template which are not in the properties of the substituted node template must provide default values. JIRA:PARSER-113 Change-Id: Idce9ffa7de61f65032fa29f2ccf26c6433c14a40 Signed-off-by: shangxdy --- tosca2heat/tosca-parser/toscaparser/common/exception.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tosca2heat/tosca-parser/toscaparser/common/exception.py') diff --git a/tosca2heat/tosca-parser/toscaparser/common/exception.py b/tosca2heat/tosca-parser/toscaparser/common/exception.py index f67a277..724844b 100644 --- a/tosca2heat/tosca-parser/toscaparser/common/exception.py +++ b/tosca2heat/tosca-parser/toscaparser/common/exception.py @@ -116,14 +116,19 @@ class UnknownInputError(TOSCAException): class MissingRequiredInputError(TOSCAException): msg_fmt = _('%(what)s is missing required input definition ' - ' with name: "%(input_name)s".') + 'of input "%(input_name)s".') class MissingRequiredParameterError(TOSCAException): - msg_fmt = _('%(what)s is missing required parameter for input: ' + msg_fmt = _('%(what)s is missing required parameter for input ' '"%(input_name)s".') +class MissingDefaultValueError(TOSCAException): + msg_fmt = _('%(what)s is missing required default value ' + 'of input "%(input_name)s".') + + class InvalidPropertyValueError(TOSCAException): msg_fmt = _('Value of property "%(what)s" is invalid.') -- cgit 1.2.3-korg