From 769408d0ed336797f76de5df226d30031ae18887 Mon Sep 17 00:00:00 2001 From: shangxdy Date: Mon, 15 Aug 2016 09:54:52 +0800 Subject: The definition about the sequence of capabilities and requirements in SubstitutionMappings is error The definition in SubstitutionMappings about SECTION is below: SECTIONS = (NODE_TYPE, CAPABILITIES, REQUIREMENTS) = \ ('node_type', 'requirements', 'capabilities') The order of CAPABILITIES and REQUIREMENTS is reserved. JIRA:PARSER-86 Change-Id: Ib55e737f6ed5b49ea3ab9b5e14f8c57486602e7e Signed-off-by: shangxdy --- .../tosca-parser/toscaparser/substitution_mappings.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tosca2heat/tosca-parser/toscaparser/substitution_mappings.py b/tosca2heat/tosca-parser/toscaparser/substitution_mappings.py index f644808..fe47ae4 100644 --- a/tosca2heat/tosca-parser/toscaparser/substitution_mappings.py +++ b/tosca2heat/tosca-parser/toscaparser/substitution_mappings.py @@ -31,7 +31,7 @@ class SubstitutionMappings(object): implementation of a Node type. ''' - SECTIONS = (NODE_TYPE, CAPABILITIES, REQUIREMENTS) = \ + SECTIONS = (NODE_TYPE, REQUIREMENTS, CAPABILITIES) = \ ('node_type', 'requirements', 'capabilities') def __init__(self, sub_mapping_def, nodetemplates, inputs, outputs, @@ -102,13 +102,14 @@ class SubstitutionMappings(object): InvalidNodeTypeError(what=node_type_def)) def _validate_inputs(self): - """validate the inputs of substitution mappings.""" - - # The inputs in service template which provides substutition mappings - # must be in properties of node template which is mapped or provide - # defualt value. Currently the input.name is not restrict to be the - # same as property name in specification, but they should be equal - # for current implementation. + """validate the inputs of substitution mappings. + + The inputs in service template which provides substutition mappings + must be in properties of node template which is mapped or provide + defualt value. Currently the input.name is not restrict to be the + same as property name in specification, but they should be equal + for current implementation. + """ # Must provide parameters for required properties of node_type # This checking is internal(inside SubstitutionMappings) -- cgit 1.2.3-korg