summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/hot
AgeCommit message (Collapse)AuthorFilesLines
2017-02-27Add ip output in compute nodeshangxdy2-3/+3
After sync the latest heat-translator code from upstream, there is not ip output in compute node, it's necessary to add. JIRA:PARSER-121 Change-Id: Idb0126f9d2bcb6100be6083e2a661cc1cdbe0f27 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2017-02-27Fix heat-translator after sync codeshangxdy1-1/+4
Fix heat-translator after sync code from upstream JIRA:PARSER-120 Change-Id: I033fa7c09fea716d7568613f72643f1e4bf8cd19 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2017-02-26Sync heat-translator codeshangxdy22-403/+963
Sync heat-translator code from upstream JIRA:PARSER-119 Change-Id: I2287b78ad38bc54f7740fd1ee5f08989d5e680bf Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2017-02-25Fix ci bugshangxdy1-1/+1
Fix ci bug when integrated with functest JIRA:PARSER-117 Change-Id: I054ee8a578c5deeaa9cae383fac4bb0984389053 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-09-30Replace the hot template versoion of 2013-05-23 with 2014-10-16shangxdy1-1/+1
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 translationshangxdy2-3/+3
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-14Update the upstream of tosco-parser and heat-translator to stableshangxdy9-286/+97
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-09Add property of software_config_transport in compute nodeshangxdy3-12/+25
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 resourceshangxdy1-3/+6
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-07Merge "Fix network info output about compute node"shangxdy2-3/+3
2016-09-01Fix network info output about compute nodeshangxdy2-3/+3
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 nodeshangxdy1-3/+9
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-23Bug: there is not segmentation_id in resource ofshangxdy1-2/+2
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-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-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-07-10Synchronise the openstack bugsshangxdy11-120/+400
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-05Affinity and anti-affinity translate to heat resource typeshangxdy3-3/+81
Translate simple tosca policy types of tosca.policy.Placement.Colocate and tosca.policy.Placement.Antilocate into heat resource type(nova::servergroup and nova::server) Change-Id: Icbe8c51c158886608a196951df19e9a503cb786a JIRA: PARSER-39 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
2016-04-07Update tosca lib to version 0.5shangxdy32-0/+3128
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>