openstack-python-openstackc.../openstackclient/tests/functional/compute/v2
Stephen Finucane 7c1d6f769c compute: Add functional tests for --block-device
This mostly reuses the existing tests for '--block-device-mapping',
which can hopefully be removed at some point in the future.

This highlights two issues with the implementation of this option.
Firstly, the 'boot_index' parameter is not required so don't mandate it.
Secondly, and more significantly, we were defaulting the destination
type for the 'image' source type to 'local'. Nova only allows you to
attach a single image to local mapping [1], which means this default
would only make sense if you were expecting users to use the
'--block-device' option exclusively and omit the '--image' option. This
is the *less common* case so this is a bad default. Default instead to a
destination type of 'volume' like everything else, and require users
specifying '--block-device' alone to pass 'destination_type=local'
explicitly.

[1] https://github.com/openstack/nova/blob/c8a6f8d2e/nova/block_device.py#L193-L206

Change-Id: I1718be965f57c3bbdb8a14f3cfac967dd4c55b4d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-05 12:44:52 +00:00
..
__init__.py move all functional tests to tests module 2016-09-09 03:29:47 +00:00
common.py volume functest: ensure snapshots deleted when volume delete 2017-06-06 01:14:20 +00:00
test_aggregate.py Refactor AggregateTests 2019-11-05 21:32:15 +00:00
test_flavor.py Fix formatting of the flavor properties 2020-11-02 15:09:09 +01:00
test_keypair.py Fix functional tests for py3 2019-10-31 00:17:35 +00:00
test_server.py compute: Add functional tests for --block-device 2021-03-05 12:44:52 +00:00
test_server_event.py Refactor ServerTests and ServerEventTests functional test classes 2017-03-10 14:50:21 +08:00
test_server_group.py compute: Fix 'server group * -f yaml' output 2021-01-06 12:02:25 +00:00