summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/hot/tosca/tosca_compute.py
AgeCommit message (Collapse)AuthorFilesLines
2016-09-12Add property of software_config_transport in compute nodeshangxdy1-0/+1
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-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 bugsshangxdy1-8/+71
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-04-07Update tosca lib to version 0.5shangxdy1-0/+280
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>