summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser
AgeCommit message (Collapse)AuthorFilesLines
2016-09-09Add keys validation testcase in substitution_mapping classshangxdy3-6/+54
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-09-07Create translation test code for vRNCshangxdy2-39/+43
Create translation test code from tosca to hot about vRNC definition. JIRA:PARSER-50 Change-Id: I04d5e776b40a856f95548f5d751aeb51220856eb Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-22Remove the cyclic dependencies in vRNC definitionshangxdy1-3/+0
Current the high_availability definition in vRNC about active MM/CM VDUs and passive MM/CM VDUs is cyclic dependencies, and the consequence is deployment of vRNC may fall into a infinite loop. The correct definition is passive VDU depend on the active VDU, but the active VDU doesn't depend on the passive VDU. JIRA:PARSER-95 Change-Id: I3f2fb8c0ce959878b12d7da49e2dc81596b4b528 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-15Merge "Add required definition in class of Input."julien zhang11-20/+70
2016-08-15Add required definition in class of Input.shangxdy11-20/+70
As a template designer; I want to know if the parameters is missed when deploy a template, but currently there is not validation about the required parameters; So i add property in class of Input, and validate the require parameter. Note: the patch will submit to Openstack community too. JIRA:PARSER-88 Change-Id: I5763a18da4037b0f81a55b8c8d83414e685b03d2 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-15The definition about the sequence of capabilities and requirements inshangxdy1-8/+9
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 <shang.xiaodong@zte.com.cn>
2016-08-14Add input validation in substitution_mapping classshangxdy6-23/+99
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-14Change the name of Substitution_mappings to SubstitutionMappingsshangxdy2-21/+11
Change the name of Substitution_mappings to SubstitutionMappings consistent to other classes. JIRA:PARSER-85 Change-Id: I9b27783ccec3f515cfcd2eca9995f09426bbfadd Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-08Service template with substitution mapping definition can deployedshangxdy2-5/+9
standalone According to specification of http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.html,the two main use cases: 1. No matter whether or not the service template has substitution mapping definition,it can be deployed standalone; 2. Also can be imported and used as nested service template substituted a node template with substitution mapping definition; 3. substitution mapping will expose node_type,may expose capabilities and requirements. JIRA:PARSER-78 Change-Id: I81ac940545f946925f6aa96a1b2ca0ccc9bbb076 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-04Add relationship of node template associated with tosca template inshangxdy4-10/+8
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.shangxdy5-65/+71
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-08-03Merge "Parser miss files(*.conf, *.yaml, *.meta, *.sh) when create a ↵julien zhang1-1/+9
distribution"
2016-08-03Merge "Use the real yaml file in testcase of system.yaml"julien zhang5-109/+28
2016-08-03Parser miss files(*.conf, *.yaml, *.meta, *.sh) when create ashangxdy1-1/+9
distribution when create a source or binary distribution, Parser project miss the follow files: 1. heat_translator 1) heat_translator_logging.conf; 2) translator.conf 3) all yaml files in tests directories; 4) all bash script in tests directories; 5) all python script in tests directories; 2. toscad-parser 1) TOSCA_definition_1_0.yaml in elements directory; 2) TOSCA_nfv_definition_1_0.yaml in nfv directory; 3) all yaml files in tests directories; 4) all bash script in tests directories; 5) all python script in tests directories; All the missed files above will cause the parser work failure JIRA:PARSER-75 Change-Id: I124eeff4b94607a68cbba2f2d7f754cba8671a42 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-31Use the real yaml file in testcase of system.yamlshangxdy5-109/+28
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-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 mappingshangxdy5-20/+235
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-29Merge "Add transaction subsystem definition in the use case of ↵shangxdy5-14/+129
substitution_mappings"
2016-07-29Add transaction subsystem definition in the use case ofshangxdy5-14/+129
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-29Add queuing subsystem definition in the use case of substitution_mappingsshangxdy1-0/+75
As a developer; I want to implement the function of substitution_mapping; So that will complete the test file about queuing subsystem definitions. Change-Id: I0602eb915954a4e35ae9e0d8d4c857822e4725d4 JIRA: PARSER-46 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-29Merge "Add database subsystem definition in the use case of ↵julien zhang1-0/+90
substitution_mappings"
2016-07-21Add database subsystem definition in the use case ofshangxdy1-0/+90
substitution_mappings As a developer; I want to implement the function of substitution_mapping; So that will complete the test file about database subsystem definitions. Change-Id: I197f971cbdc64963b6c41b2ca3aa3fb86b2fae8b JIRA: PARSER-47 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-21Substitution mappings doesn't supports propertiesshangxdy1-2/+0
According to the simple tosca specification, substitution mapping only supports key words of node_type, capabilities and requirements, but in the definition of vRNC, add keywords of properties, so it will be deleted Change-Id: I45ca5f6d44410e5a6b8cdb448f3f148d63cc1376 JIRA: PARSER-67 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-19Tosca-Pacer doesn't support https proxy.shangxdy1-3/+3
When access CSAR file which is URL and the protocol is https by proxy, it will be error and the information is below: toscaparser.common.exception.URLException: Failed to reach server "https://raw.githubusercontent.com/openstack/tosca- parser/master/toscaparser /tests/data/custom_types/wordpress.yaml". Reason is: Tunnel connection failed: 503 Service Unavailable. The reason of the error is urllib doesn't support https proxy. JIRA: PARSER-66 Change-Id: I82ec68d533743527fba613cc362e4241494359d4 Signed-off-by: 10013968 <zhang.jun3g@zte.com.cn> Signed-off-by: shangxdy <shangxdy@shangxdy.local>
2016-07-19Disable py34 in tox temporary100139681-1/+1
Before the CI environment can perform python 3.4 test, temporary disable tox py34 in tox.ini. Currently all the submits are blocked for this. Change-Id: Ic73cab212eb68e35a5855d3229b8cfe801f92817 Signed-off-by: 10013968 <zhang.jun3g@zte.com.cn>
2016-07-12Merge "fix import and vRNC Ctrl_net definition error"julien zhang2-8/+8
2016-07-10fix import and vRNC Ctrl_net definition errorshangxdy2-8/+8
1. Currently DM_Port_Ctrl requirement definition requirements: virtualBinding: DM virtualLink: CTRL_Net_Host shall be below: requirements: virtualBinding: DM_Host virtualLink: CTRL_Net 2. In function of _load_import_template when import vRNC definition, it will return "None, None" instead of return Null in case of no value return. Change-Id: I81d2d471eafff8ebd77eef356e6178e1f7701a22 JIRA: PARSER-65 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-10Fix bug in python3.4: 'dict_keys' object does not support indexingshangxdy2-3/+4
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 bugsshangxdy43-137/+1183
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-07-08Merge "netsted template validate type error"julien zhang5-14/+14
2016-07-07fix tox error when run unittestsxd2-0/+14
Currently when run "tox -epep8" it's ok, but it will be error when run "tox -epy27" or run "tox -epy34", the reason is no file .testr.conf and .converagerc in project root directory Change-Id: Ic6ab721738692c389d63bc2d84a4c2a21b397778 JIRA: PARSER-62 Signed-off-by: sxd <shang.xiaodong@zte.com.cn>
2016-07-04Merge "The grouptype's parent_type definition is error"julien zhang2-0/+12
2016-07-04Merge "Divide VDU into soft component and VDU for the vRNC case"julien zhang3-55/+160
2016-07-04Merge "fix error when run unittest case"julien zhang2-3/+1
2016-07-04Merge "EntityTemplate has no property of parent_type"julien zhang2-0/+22
2016-07-04Merge "The artifacttype's parent_type definition is error"julien zhang2-9/+18
2016-07-01The grouptype's parent_type definition is errorshangxdy2-0/+12
1. Group type define parent_type, but it shall be statuefulentity, not string, so the method of is_derived_from in group entity may be error when it's called. 2. The bug will submit to openstack community. Change-Id: I6e78b9dbf9ad0593db9246d34be29d8ec6f092ed JIRA: PARSER-54 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-07-01fix error when run unittest caseshangxdy2-3/+1
when run tox -epy27, there are errors in function of test_relationship for key in relation.keys(): rel_tpl = relation.get(key).get_relationship_template() if rel_tpl: self.assertEqual( rel_tpl[0].type, "tosca.relationships.ConnectsTo") rel_tpl is a list so real_tpl[0].type can be other value, not only tosca.relationships.ConnectsTo. JIRA: PARSER:61 Change-Id: Ibdc7307888f5281ac0bd806088483f8c46416968 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-06-30Merge "Incorrect inheritance of requirements in NodeType"julien zhang1-2/+7
2016-06-30Merge "The relationship type's parent_type definition is not complete"julien zhang2-1/+7
2016-06-30Merge "The policytype's parent_type definition is error"julien zhang2-7/+13
2016-06-29netsted template validate type errorshangxdy5-14/+14
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-29Divide VDU into soft component and VDU for the vRNC caseshangxdy3-55/+160
Currently the heat-translator can't translate the VDU with interface, so VDU shall be divided into SoftComponent and VDU, and the interface will be expressed in SoftComponent node. Change-Id: I1f0e0c6bef88ed66edd39e21e4e6221eb15e3188 JIRA: PARSER-57 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-06-16The artifacttype's parent_type definition is errorshangxdy2-9/+18
1. Artifact type define parent_type, but it shall be statuefulentity, not string, so the method of is_derived_from in artifact entity may be error when it's called. 2. The bug will submit to openstack community. Change-Id: I8e64a28da0287ff5653da69a0cf15016c8ed937f JIRA: PARSER-53 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-06-16EntityTemplate has no property of parent_typeshangxdy2-0/+22
1. EntityTemplate is the parent of NodeTemplate,but there is no definition of parent_type definition, so the method of is_derived_from will be error when call the parent_type's method. 2. The bug will submit to openstack community. Change-Id: If6d360932fd610f001934d23aac63e11ac16fddf JIRA: PARSER-51 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-06-16Merge "The definition in test file subsystem.yaml is error"julien zhang1-0/+3
2016-06-16Merge "Nodetype's logical is incomplete"julien zhang1-0/+4
2016-06-15Incorrect inheritance of requirements in NodeTypeshangxdy1-2/+7
1. When define a new NodeType that inherits from a normative type that has some requirements, and if the reqirement item name is same as parent's, there will be duplicated requirements, not override the parent's item. 2. The bug will submit to openstack community. Change-Id: I22f6e723179a8a8c334d37c1a69b7039dc1f6ae7 JIRA: PARSER-56 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-06-15Merge "Create vRNC test code."julien zhang1-0/+54
2016-06-15Merge "Create test case about nfv tosca"julien zhang4-0/+638