python-novaclient/novaclient/tests/unit
zhaolihui b13ba0138f Fix flavor keyerror when nova boot vm
When creating a server (the 'nova boot' command),
it calls 'POST /servers' API.

The response does not have 'addresses' and 'flavor' attributes.
When accessing 'networks' attribute in the '_print_server' function,
it calls 'GET /servers/{server_id}' and get the 'addresses' and
'flavor' attributes.

If 'GET /servers/{server_id}' fails, the server object does not have
the 'flavor' attribute, then KeyError is raised when accessing it.

Fix the issue by making it raise a CommandError
when the 'GET /servers/{server_id}' fails.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I3ef096c61b0e05a637ab0c4a1027338fa87e4f09
Closes-Bug: #1781368
2018-12-13 07:50:37 +00:00
..
fixture_data Replace MB with MiB 2018-10-22 07:11:25 +00:00
v2 Fix flavor keyerror when nova boot vm 2018-12-13 07:50:37 +00:00
__init__.py Move unit tests into unit test directory 2015-01-27 13:06:06 -08:00
fake_actions_module.py Use novaclient/utils directly and remove openstack/common (1/4) 2016-03-03 01:23:34 +00:00
fakes.py Replace MB with MiB 2018-10-22 07:11:25 +00:00
idfake.pem Move unit tests into unit test directory 2015-01-27 13:06:06 -08:00
test_api_versions.py Use more specific asserts in tests 2016-12-06 09:43:12 +01:00
test_base.py Replace MB with MiB 2018-10-22 07:11:25 +00:00
test_client.py Use uuidutils of oslo.utils 2018-08-08 15:12:28 +09:00
test_crypto.py Fixes Python3 issue in decoding password 2018-10-26 11:06:44 +09:00
test_discover.py Remove deprecated tenant network APIs 2017-03-20 16:36:58 -04:00
test_exceptions.py Handle error response for webob>=1.6.0 2016-03-18 19:22:03 -04:00
test_shell.py Modify novaclient to support basic attributes 2018-06-15 11:51:31 +05:30
test_utils.py Fix server strings in reboot operation 2018-08-07 15:30:48 +09:00
utils.py Add support for microversion 2.67: BDMv2 volume_type 2018-10-14 05:34:24 -04:00