diff options
author | zhangbailin <zhangbailin@inspur.com> | 2019-05-23 08:18:00 +0800 |
---|---|---|
committer | zhangbailin <zhangbailin@inspur.com> | 2019-05-23 08:18:04 +0800 |
commit | 7b9d3000893aefa9c5efc77b50dc0fec5cab29be (patch) | |
tree | 36999cf4b97b87cd4dc7171deb9829d2b897e881 /novaclient/v2 | |
parent | dfb84228a2748bed82f9b83c1209d5e2e0557bfa (diff) | |
download | python-novaclient-7b9d3000893aefa9c5efc77b50dc0fec5cab29be.tar.gz |
Set the lower limit of api_version for volume_type
In boot server API, the volume_type is supported by microversion 2.67.
Therefore, the lower limit of the volume_type should be added to the CLI
command, otherwise an exception will occur.
Co-Authored-By: Eric Xie <eric_xiett@163.com>
Closes-Bug: #1829854
Change-Id: Ie909c16568b017ca0acc802194140da7bece76c5
Diffstat (limited to 'novaclient/v2')
-rw-r--r-- | novaclient/v2/shell.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/novaclient/v2/shell.py b/novaclient/v2/shell.py index 88ebf2d7..6653aa2f 100644 --- a/novaclient/v2/shell.py +++ b/novaclient/v2/shell.py @@ -145,7 +145,7 @@ def _parse_block_device_mapping_v2(cs, args, image): 'delete_on_termination': False} bdm.append(bdm_dict) - supports_volume_type = cs.api_version == api_versions.APIVersion('2.67') + supports_volume_type = cs.api_version >= api_versions.APIVersion('2.67') for device_spec in args.block_device: spec_dict = _parse_device_spec(device_spec) |