summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/tosca_template.py
AgeCommit message (Collapse)AuthorFilesLines
2017-09-05Merge "Support version of tosca_simple_yaml_1_1"0.5.0julien zhang1-3/+6
2017-09-05Fix exceptions overwritten when nested import service topologyshangxdy1-6/+23
Currently exceptions will be overwritten when import nested service topology, the patch will fix the issue. JIRA: PARSER-145 Change-Id: I531755efe55b43aef304fa972773c63613c915ff Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2017-09-05Support version of tosca_simple_yaml_1_1shangxdy1-3/+6
Currently tosca-parser only support tosca_version_1_0, this patch will enable it to support tosca_version_1_1. This requirement is from ONAP, but not need to submit to OpenStack currently JIRA:PARSER-146 Change-Id: If1bc470e3f2d18a606b312425241f27be33b65b4 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2017-08-29Add parameter validation in design timeshangxdy1-2/+10
Add validation for SDC from ONAP when use parse in design time: ignore parameter validation and only print warning message. JIRA: PARSER-142 Change-Id: I9372f20816f2acbda83c5f1e4f673f2ffc3c2e94 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2017-08-10Support yaml file with suffix of ymlshangxdy1-1/+1
Currently toscaparser only support service template file with suffix: yaml, zip and csar, need to support file with suffix of yml. the patch will be submitted to OpenStack JIRA: PARSER-137 Change-Id: I039bcfbfeb8e2aae47df133221162a68736ded55 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2017-02-26Sync upstream codeshangxdy1-6/+10
Sync upstream project of tosca-parser Change-Id: Ic707844203ea05007b3c02e9dcadb52389eb3149 JIRA:PARSER-118 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-09Add keys validation testcase in substitution_mapping classshangxdy1-2/+2
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-14Add input validation in substitution_mapping classshangxdy1-1/+14
Add input 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) The properties of substituted node template which be mapped must be in the inputs of nested service template which defines substutition mappings; 2) The inputs of nested service template which are not in properties of the substituted node template must have default values. 3) If the properties of node_type is required and no default value, must provide inputs for them; 4) Property names and the input names must be the same. JIRA:PARSER-79 Change-Id: Ie4664fe17c8279ad531ac9acec057f98d4e9281a Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-04Add relationship of node template associated with tosca template inshangxdy1-6/+6
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-30/+33
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-31Doesn't support nested exceptioncollector when implement the nestedshangxdy1-2/+4
tosca template After the netsted tosca template is implemented, the ExceptionCollector doesn't work in netsted template, because the exceptions are reset by upper tosca template. The solution is judging if support nested node template before starting or stop exceptioncollector. Change-Id: Ic48bcb639031391a6771db2f7235b674b22be837 JIRA:PARSER-72 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-29tosca-parser support the semantic of substitution mappingshangxdy1-14/+54
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-1/+1
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-07-10Fix bug in python3.4: 'dict_keys' object does not support indexingshangxdy1-1/+1
In python3.4, dictory's function of key() return value is a dict_key object, not list, so the follow code will be error: dict x = {1:11, 2:22, 3;33} y= x.keys()[0] the error is TypeError: 'dict_keys' object does not support indexing, the correct expression is below: y = list(x.keys())[0] So parser's code will be modified refer to above. Change-Id: I41e0c28167c7823fc735aaf3afc78c1a9a15e9e0 JIRA: PARSER-64 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-10Synchronise the openstack bugsshangxdy1-0/+11
When run unittests through tox, some test cases are always error, the errors are already done in openstack community, so it's necessary to synchronise the fixes. Change-Id: Ib29078e6cc138a474e89c6a2cc90ad7a1db1bb46 JIRA: PARSER-63 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-06-29netsted template validate type errorshangxdy1-6/+8
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-2/+16
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/+255
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>