openstack-python-openstackc.../openstackclient
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
..
api Remove usage of six 2020-10-07 02:15:25 +00:00
common Add support '--progress' option for 'image create' 2021-01-04 17:25:34 +00:00
compute compute: Add functional tests for --block-device 2021-03-05 12:44:52 +00:00
identity Merge "Add name and enabled param in ListDomain parser" 2020-12-22 13:30:59 +00:00
image Merge "image: Unset properties rather than setting to None" 2021-01-06 11:16:25 +00:00
locale/tr_TR/LC_MESSAGES Imported Translations from Zanata 2018-03-01 07:25:50 +00:00
network Merge "Add --name to port list" 2021-03-03 17:03:02 +00:00
object Add storage policy option to create container command 2020-02-19 10:08:48 +13:00
tests compute: Add functional tests for --block-device 2021-03-05 12:44:52 +00:00
volume Allow to resize in-use volumes 2020-11-11 09:18:49 +00:00
__init__.py Clean up W503 and E402 pep8 errors 2018-04-15 12:23:06 +09:00
i18n.py Remove log translations 2017-03-21 17:23:09 +08:00
shell.py Remove usage of six 2020-10-07 02:15:25 +00:00