summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/hot/tosca
AgeCommit message (Collapse)AuthorFilesLines
2016-09-19Update the upstream of tosco-parser and heat-translator to stableshangxdy4-18/+20
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> (cherry picked from commit f977b94e012828cd2a905b9b841aff33c4b732f8)
2016-09-12Add 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> (cherry picked from commit f90be03da41fa8a233ecc84f54fa59d1f2f7021f)
2016-09-07Fix network info output about compute nodeshangxdy1-1/+1
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> (cherry picked from commit 528ed804c77758d8e7270ec5a76cc5279330b086)
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> (cherry picked from commit b284ccc46a966ce1f8a6e59363904d69bb8d081e)
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 bugsshangxdy6-40/+110
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 typeshangxdy2-0/+72
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.5shangxdy18-0/+1395
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>