From d098a14d69bf78b7674ec5d75003c21250e640bc Mon Sep 17 00:00:00 2001 From: shangxdy Date: Mon, 5 Dec 2016 14:23:25 +0800 Subject: Add output validation for substitution mappings 1. The outputs defined by the topology template have to match the attributes of the node type or the substituted node template, 2.The observable attributes of the substituted node template have to be defined as attributes of the node type or outputs in the topology template. The patch will be submitted to openstack too. JIRA: PARSER-115 Change-Id: Ifa62be9d5c1be79ceacfa1ae6e3835b2de446f88 Signed-off-by: shangxdy --- tosca2heat/tosca-parser/toscaparser/common/exception.py | 9 +++++++++ 1 file changed, 9 insertions(+) (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 724844b..13ccabd 100644 --- a/tosca2heat/tosca-parser/toscaparser/common/exception.py +++ b/tosca2heat/tosca-parser/toscaparser/common/exception.py @@ -114,6 +114,10 @@ class UnknownInputError(TOSCAException): msg_fmt = _('Unknown input "%(input_name)s".') +class UnknownOutputError(TOSCAException): + msg_fmt = _('Unknown output "%(output_name)s" in %(where)s.') + + class MissingRequiredInputError(TOSCAException): msg_fmt = _('%(what)s is missing required input definition ' 'of input "%(input_name)s".') @@ -129,6 +133,11 @@ class MissingDefaultValueError(TOSCAException): 'of input "%(input_name)s".') +class MissingRequiredOutputError(TOSCAException): + msg_fmt = _('%(what)s is missing required output definition ' + 'of output "%(output_name)s".') + + class InvalidPropertyValueError(TOSCAException): msg_fmt = _('Value of property "%(what)s" is invalid.') -- cgit 1.2.3-korg