python-novaclient/novaclient/tests/unit/v2
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
..
__init__.py Rename v1_1 to v2 2015-02-04 17:40:46 +02:00
fakes.py Replace MB with MiB 2018-10-22 07:11:25 +00:00
test_agents.py Clean up requests-mock usage 2016-10-05 06:53:05 +11:00
test_aggregates.py Add return-request-id-to-caller function(2/5) 2016-01-27 02:45:22 +00:00
test_assisted_volume_snapshots.py Move all extensions from contrib dir 2016-11-30 18:00:05 +00:00
test_availability_zone.py Add return-request-id-to-caller function(2/5) 2016-01-27 02:45:22 +00:00
test_cells.py Move all extensions from contrib dir 2016-11-30 18:00:05 +00:00
test_client.py Replaces uuid.uuid4 with uuidutils.generate_uuid() 2016-12-20 05:14:03 +00:00
test_flavor_access.py Store api_version object in one place 2016-08-18 18:36:40 +03:00
test_flavors.py Replace MB with MiB 2018-10-22 07:11:25 +00:00
test_hypervisors.py Microversion 2.53 - services and hypervisors using UUIDs 2017-07-26 09:04:19 -04:00
test_images.py Remove deprecated image commands/API bindings 2017-02-22 15:56:28 -05:00
test_instance_actions.py Add support changes-before for microversion 2.66 2018-09-24 15:14:18 -04:00
test_instance_usage_audit_log.py Add CLI to show instance usage audit logs 2018-01-29 07:39:27 +09:00
test_keypairs.py Microversion 2.35 adds keypairs pagination support 2016-08-05 12:15:29 +03:00
test_limits.py Add support for the 2.57 microversion 2018-01-15 14:42:53 +08:00
test_list_extensions.py Use more specific asserts in tests 2016-12-06 09:43:12 +01:00
test_migrations.py Add support changes-before for microversion 2.66 2018-09-24 15:14:18 -04:00
test_quota_classes.py Add support for the 2.57 microversion 2018-01-15 14:42:53 +08:00
test_quotas.py Add support for the 2.57 microversion 2018-01-15 14:42:53 +08:00
test_server_external_events.py Move all extensions from contrib dir 2016-11-30 18:00:05 +00:00
test_server_groups.py Microversion 2.64 - Use new format policy in server group 2018-07-18 10:30:00 -04:00
test_server_migrations.py Support for abort an ongoing live migration 2016-03-01 13:43:33 +00:00
test_servers.py Merge "Replace MB with MiB" 2018-10-27 05:55:20 +00:00
test_services.py Change Service repr to use self.id always 2017-07-26 12:14:54 -04:00
test_shell.py Fix flavor keyerror when nova boot vm 2018-12-13 07:50:37 +00:00
test_usage.py Microversion 2.40 - Simple tenant usage pagination 2016-12-19 14:04:13 -05:00
test_versions.py Fix cropping the endpoint url 2017-07-07 20:33:23 +00:00
test_volumes.py Fix the inappropriate parameter name 2017-07-16 23:34:57 +08:00
testfile.txt Rename v1_1 to v2 2015-02-04 17:40:46 +02:00