summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/tests/test_topology_template.py
AgeCommit message (Collapse)AuthorFilesLines
2017-07-17synchronize upstream about tosca-parsershangxdy1-1/+1
synchronize tosca-parser with version of 0.81 JIRA: PARSER-128 Change-Id: Ib00e391bd6c1f4c69776796eb7b28062f14b92fc Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2017-02-26Sync upstream codeshangxdy1-40/+40
Sync upstream project of tosca-parser Change-Id: Ic707844203ea05007b3c02e9dcadb52389eb3149 JIRA:PARSER-118 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-12-09Add output validation test case for substitution.shangxdy1-0/+49
According to currently implementation, add new test case for substitution mappings output validation: 1. Unknown output; 2. Missing required output. JIRA:PARSER-116 Change-Id: I84dc80c2bc6fd8b63dd7c4ddf0b81dc5148a4ceb Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-12-09Add output validation for substitution mappingsshangxdy1-1/+1
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 <shang.xiaodong@zte.com.cn>
2016-12-05Add input validation test caseshangxdy1-0/+57
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 <shang.xiaodong@zte.com.cn>
2016-09-09Add keys validation testcase in substitution_mapping classshangxdy1-0/+43
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>
2016-08-04Add relationship of node template associated with tosca template inshangxdy1-1/+1
substitution mapping As a nested template desinger; I want to known the tosca template which a substituted node template associated; So i will create the relationship under node template which is substituted. JIRA:PARSER-76 Change-Id: Ifb9883e5c5f630cd7f1b5d1292eddb54ad4c20be Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-03Distinguish the mapping and mapped by name.shangxdy1-1/+3
1. Use complete name like nested_topology_tpls here and other places like get_nested_topology_tpls for better readability; 2. Use "sub_mapped_node_tpl" instead of submaped_node_tpl; 3. Use sub_mapped_ instead of submaped. Upper changed in substitution_mappings.py, tosca_template.py, tosca_template.py and others JIRA:PARSER-73 Change-Id: I21b2d3a35773078d7437bbae9ff5d1522608c4d2 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-31Use the real yaml file in testcase of system.yamlshangxdy1-1/+1
As a tester; I want to make sure of the validation of substitution mappings in system chain. So i use the real test yaml file and delete the old. Change-Id: Id3dee02d8af5b221b654a3ee79e28f0ad5b53868 JIRA:PARSER-74 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-29tosca-parser support the semantic of substitution mappingshangxdy1-1/+1
As a template designer, I want to using node template substitution for model composition or chaining subsystems. So firstly tosca-paser should support the substitution mappings analysis. Change-Id: I44371795504415ba8cf5a15f7e1d046e3ff00ade JIRA: PARSER-43 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-29Add transaction subsystem definition in the use case ofshangxdy1-2/+4
substitution_mappings As a developer; I want to implement the function of substitution_mapping; So that will complete the test file about transaction subsystem definitions for example. Change-Id: I5e44c2b4933afadf96743641279016af5afc39e0 JIRA: PARSER-68 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-06-29netsted template validate type errorshangxdy1-5/+0
When import nested template, validate type error, in the validate list lack the type of "topology_template" Change-Id: Ic16e02f460dc59936dfc5a361a21b9533f0e5e83 JIRA: PARSER-58 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-06-05tosco-parser supports importing the other service withshangxdy1-0/+5
topology template As a tosca-parser developer; I want to implement the function of substitution_mapping; So that must support the import topology template firstly Change-Id: Ie26aab712e7870e1ec345ad654460bb84014f207 JIRA: PARSER-48 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-04-07Update tosca lib to version 0.5shangxdy1-0/+160
Use tosca-parser and heat-translator to analyze to the basic nfv-tosca type definitions, and use simple tosca new feature such as policy, group and trigger, which are now supported by the latest version of tosca-parser and heat-translator. JIRA:PARSER-18 Change-Id: I797bcacbb5b32005d0aeb0f3f32851ac96e30f01 Signed--off-by: shangxdy <shang.xiaodong@zte.com.cn> Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>