summaryrefslogtreecommitdiffstats
path: root/tosca2heat
AgeCommit message (Collapse)AuthorFilesLines
2016-12-07Add output in vRNC for substitution mappingsshangxdy2-4/+17
Add attributes in rnc.nodes.VNF definition. JIRA:PARSER-114 Change-Id: I8578cc89dc58202893370d367dc9923ddc1c111a Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-30Replace the hot template versoion of 2013-05-23 with 2014-10-16shangxdy44-44/+44
Currently the translated hot version is 2013-05-23, but there some intrinsic function(such as get_attr) must be 2014-10-16 or higher in order to support more parameters. So it's necessary to update the hot template version. JIRA:PARSER-110 Change-Id: I72f7b36ba0ed32cb9e6f092c0be2dd0dea3d2572 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-23Add ip output in compute translationshangxdy21-57/+56
As a template designer, I want to visit a server which is depleted by parser, So it's necessary to make the ip exposed. JIRA:PARSER-109 Change-Id: Idef0605d23df6af38b86e7a393a151b34828e511 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-19Delete not used property from vRNCshangxdy2-20/+0
Delete not used property from vRNC,such as activestatus and id. Change-Id: I14b4563663d220c241440dff0244ccbadff7912b Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-19Merge "Provide file list about the difference between parser and upstreams."shangxdy2-3/+113
2016-09-14Provide file list about the difference between parser and upstreams.shangxdy2-3/+113
Provide a list about difference between parser project and the upstream projects, include tosco-parser and heat-project in openstack community. JIRA:PARSER-108 Change-Id: I6195fe035340e5af40f7e7a30f7d7cb1fbcdb27f Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-14Update the upstream of tosco-parser and heat-translator to stableshangxdy29-1457/+1502
release 0.6/0.5 Currently the parser is based on dev branch of upstream projects, include tosco-parser and heat-translator, for the colorado release of parser, it should be based on a stable version, so it's necessary to update the upstream version to 0.6/tosca-parser and 0.5/heat-translator. JIRA:PARSER-106 Change-Id: I8fb043068d25188c47e5648e1b66184446ac82d6 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-12Merge "Add keys validation testcase in substitution_mapping class"shangxdy3-6/+54
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-09Add property of software_config_transport in compute nodeshangxdy45-12/+92
According to hot syntax, when deploy software into compute, it shall include software_config_transport property in server resource, because the openstack environment configuration may not support the default value. so the software_config_transport shall be specified. JIRA:PARSER-105 Change-Id: Iefe50400ae2008214bb8cb98dde719130553b3bf Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-09Add signal_transport in software deployment resourceshangxdy18-3/+116
According to hot syntax, when deploy software, it shall include signal_transport property, or will use default value NO_SIGNAL, but the openstack environment configuration may not support the default value. so the signal_transport shall be specified. JIRA:PARSER-104 Change-Id: Ifd01cd55c7daf538efb32f44a8d278cf3058af05 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-08Emergence merged for unit test.shangxdy1-8/+0
Reversed merged caused the unit test error, i think this is the ci system's bug. Change-Id: I6d29f7f11cc0a78c695f179aa30c93545a575584 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-07Merge "Create translation test code for vRNC"shangxdy8-39/+1302
2016-09-07Merge "Add deployment scripts for vRNC"shangxdy11-0/+44
2016-09-07Merge "Fix network info output about compute node"shangxdy20-102/+6
2016-09-07Create translation test code for vRNCshangxdy8-39/+1302
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-09-02Merge "[NFV] Reduce instance requirements"xiaodong shang2-6/+6
2016-09-01Fix parser run error when attach blockstorage.shangxdy2-4/+4
The error is below: CREATE_FAILED Error: resources.tosca.relationships.attachesto_1: Failed to attach volume dc1cd8fb-9cf3-42c2-bb3e-6a24ba354003 to server fded0b07-9da2-4d9c-aedc-fefd22ee1efb - Invalid input for field/attribute device. Value: /data. u'/data' does not match '(^/dev/x{0,1}[a-z]{0,1}d{0,1})([a-z]+)[0-9]*$' JIRA:PARSER-102 Change-Id: Ie30c669ab5eeddbcd8bc33d648b8cd33d9942333 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-01[NFV] Reduce instance requirementsMichael Polenchuk2-6/+6
In order to keep requirements of cpu/ram at minimum reduce their values. Change-Id: I624f9638d6207a2dc8a6f83e47ad4e6a0f221595 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
2016-09-01Fix network info output about compute nodeshangxdy20-102/+6
In the template version of 2013-05-23, the intrinsic function of get_attr doesn't support keys or indexes, it requires 2014-10-16 or higher, the syntax is below: get_attr: <resource name> <attribute name> <key/index 1> (optional) not support in 2013-05-23 <key/index 2> (optional) not support in 2013-05-23 So the translation about compute node's ip address only uses two parameters currently. JIRA:PARSER-101 Change-Id: I51e5d7c04c329ede69ff3be61bbee2941b56ea93 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-28Fix BlockStorageAttachment bug when translate compute nodeshangxdy3-3/+35
Currently, when translate compute node with local_storage and high_availability, there is not BlockStorageAttache resource created about block storage, and only BlockStorage created. If only local_storage requirement in compute node, the result is correct. The reason is the function logic of _get_attachment_node is error. and the patch will fixit. JIRA:PARSER-100 Change-Id: I36456089ae65102d4b17797d266c850d8c16b29d Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-24Add deployment scripts for vRNCshangxdy11-0/+44
Add deployment scripts for vRNC when deploy vRNC in openstack. JIRA:PARSER-49 Change-Id: I13092f9939a3fe6710e50e2191a82b8cdc25e3e3 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-23Bug: there is not segmentation_id in resource ofshangxdy3-2/+15
tosca.nodes.network.Network In current implementation of tosca.nodes.network.Network translation, the property of segmentation_id is included, but it doesn't exist in hot syntax, so it will be deleted from current code. JIRA:PARSER-96 Change-Id: I2bd32be887a07f77f7dad3fca469464f124e628f Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-23Replace the policie types with parent type when judging policy nodeshangxdy1-8/+10
template in HotResource In class of HotResource, because the policy node template has not interface property, so it is excepted when get all operation from node, but the policy types are enumerated, they are can expressed with parent type. JIRA:PARSER-97 Change-Id: I6393dcaefc774af3aa627ffa287b75083a173f3f Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-22Merge "Remove the cyclic dependencies in vRNC definition"julien zhang1-3/+0
2016-08-22Merge "Add high_availability test case"julien zhang2-0/+49
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-22Add high_availability test caseshangxdy2-0/+49
As a template designer; I want to define a vdu with high availability; So i will add test case to violate high_availability requirement in VDU; JIRA:PARSER-94 Change-Id: Icd35e5a533231395a2174cdc20b747a9ab803599 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-22Modify the stack name to template file name when deploy stack useshangxdy2-4/+7
heat-translator When deploy a stack online, it can specify a name as a input name(which was added by issue PARSER-91), but the parameter is optional, if no specified name, currently the default stack name is shown below: 'heat' + first part of a random uuid For readable and to be easier founded, the default name will be improved to be the follow: 'heat' + filename of template file + first part of a random uuid. JIRA:PARSER-93 Change-Id: Ib8f5fd18bf4e57d2424c2a439aa6db8feead44cd Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-19Merge "Provide a specific stack_name when deploy a template use heat-translator"julien zhang1-3/+12
2016-08-19Judge volume node is error when translate compute nodeshangxdy1-2/+6
Currently, when translate a compute node in heat-translator, code is below: for requires in requirements: for value in requires.values(): if isinstance(value, dict): for node_name in value.values(): for n in self.nodetemplates: if n.name == node_name: volume_name = node_name break else: # unreachable code ! for n in self.nodetemplates: if n.name == node_name: volume_name = node_name break It's error in nfv tosca because there are more than one requirements, So the unreachable code will reach. Notes: the fix will submit to Openstack community. JIRA:PARSER-92 Change-Id: Ife9c0d28ebe236c04d9d2c02f0025cf774bf6208 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-19Provide a specific stack_name when deploy a template use heat-translatorshangxdy1-3/+12
Currently, the stack ame of a template is random when use heat-translator online, and there is not any other feedback information except success or failure, the result is not very convenient. So it is necessary to provide a stack name when deploy a template. Note: the improvement will submit to openstack community. JIRA:PARSER-91 Change-Id: Ia5f99c38301211dfb9c21a8b10dd31a50b82f966 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-08-16Fix parser test bug with functest in real env.shangxdy1-1/+1
Traceback (most recent call last): File "/usr/local/bin/heat-translator", line 10, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/translator/shell.py", line 225, in main TranslatorShell().main(args) File "/usr/local/lib/python2.7/dist-packages/translator/shell.py", line 121, in main parsed_params, a_file, deploy) File "/usr/local/lib/python2.7/dist-packages/translator/shell.py", line 168, in _translate output = translator.translate() File "/usr/local/lib/python2.7/dist-packages/translator/hot/tosca_translator.py", line 42, in translate self.hot_template.resources = self.node_translator.translate() File "/usr/local/lib/python2.7/dist-packages/translator/hot/translate_node_templates.py", line 159, in translate return self._translate_nodetemplates() File "/usr/local/lib/python2.7/dist-packages/translator/hot/translate_node_templates.py", line 302, in _translate_nodetemplates self._recursive_handle_properties(resource) File "/usr/local/lib/python2.7/dist-packages/translator/hot/translate_node_templates.py", line 173, in _recursive_handle_properties resource.handle_properties() File "/usr/local/lib/python2.7/dist-packages/translator/hot/tosca/tosca_compute.py", line 105, in handle_properties self.nodetemplate.get_capability('os')) File "/usr/local/lib/python2.7/dist-packages/translator/hot/tosca/tosca_compute.py", line 134, in translate_compute_flavor_and_image image = self._best_image(os_cap_props) File "/usr/local/lib/python2.7/dist-packages/translator/hot/tosca/tosca_compute.py", line 266, in _best_image if len(resp.keys()) > 0: AttributeError: 'NoneType' object has no attribute 'keys' Traceback (most recent call last): File "/usr/local/bin/heat-translator", line 10, in <module> sys.exit(main()) File "/usr/local/lib/python2.7/dist-packages/translator/shell.py", line 225, in main TranslatorShell().main(args) File "/usr/local/lib/python2.7/dist-packages/translator/shell.py", line 121, in main parsed_params, a_file, deploy) File "/usr/local/lib/python2.7/dist-packages/translator/shell.py", line 168, in _translate output = translator.translate() File "/usr/local/lib/python2.7/dist-packages/translator/hot/tosca_translator.py", line 42, in translate self.hot_template.resources = self.node_translator.translate() File "/usr/local/lib/python2.7/dist-packages/translator/hot/translate_node_templates.py", line 159, in translate return self._translate_nodetemplates() File "/usr/local/lib/python2.7/dist-packages/translator/hot/translate_node_templates.py", line 302, in _translate_nodetemplates self._recursive_handle_properties(resource) File "/usr/local/lib/python2.7/dist-packages/translator/hot/translate_node_templates.py", line 173, in _recursive_handle_properties resource.handle_properties() File "/usr/local/lib/python2.7/dist-packages/translator/hot/tosca/tosca_compute.py", line 105, in handle_properties self.nodetemplate.get_capability('os')) File "/usr/local/lib/python2.7/dist-packages/translator/hot/tosca/tosca_compute.py", line 134, in translate_compute_flavor_and_image image = self._best_image(os_cap_props) File "/usr/local/lib/python2.7/dist-packages/translator/hot/tosca/tosca_compute.py", line 266, in _best_image if len(resp.keys()) > 0: AttributeError: 'NoneType' object has no attribute 'keys' The request you have made requires authentication. (HTTP 401) (Request-ID: req-027940ce-5a5f-4459-9d91-7e65329c4d13) The request you have made requires authentication. (HTTP 401) (Request-ID: req-32c378fb-6d3c-46c6-845e-a8dd50975acd) JIRA:PARSER-89 Change-Id: Id89d2293972cae9f39c0d950fc67fdc6ae520304 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 zhang2-2/+18
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 ashangxdy2-2/+18
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>