Add keys validation testcase in substitution_mapping class 55/20755/2
authorshangxdy <shang.xiaodong@zte.com.cn>
Fri, 9 Sep 2016 09:41:48 +0000 (17:41 +0800)
committershangxdy <shang.xiaodong@zte.com.cn>
Fri, 9 Sep 2016 09:54:30 +0000 (17:54 +0800)
commit44540b6c2b16637659099c65e31309fc7573ba7d
tree053fde2c7387644bb2841fe7ae59ed5d008b1949
parent23f466831a8284433609e9f770737830d0b448bf
Add keys validation testcase in substitution_mapping class

Add keys validation in class of substitution_mapping according to
specification of
http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.html:
1) Substitution mapping only supports keys of node_type, capabilities
and requirements;
2) The key of node_type is required, the others are optional.

JIRA:PARSER-80

Change-Id: Icd3284349175429e5ba5e52814819a6790f0e831
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
tosca2heat/tosca-parser/toscaparser/substitution_mappings.py
tosca2heat/tosca-parser/toscaparser/tests/test_topology_template.py
tosca2heat/tosca-parser/toscaparser/tosca_template.py