diff options
| author | Sean McGinnis <sean.mcginnis@gmail.com> | 2018-10-10 11:12:40 -0500 |
|---|---|---|
| committer | Sean McGinnis <sean.mcginnis@gmail.com> | 2018-10-12 14:19:51 -0500 |
| commit | 651f0c38a1f364953dc3cb3f7458385410395fd8 (patch) | |
| tree | 9f199ad98602e6035c655a8e84c2f7dadcaab2d8 /openstackclient/volume/v2 | |
| parent | e3dc30fe8c1ae6a13926bf1eae52097e8bb37aab (diff) | |
| download | python-openstackclient-651f0c38a1f364953dc3cb3f7458385410395fd8.tar.gz | |
Handle not having cinderclient.v1 available
The Cinder v1 API was deprecated several years ago and may be removed
from python-cinderclient in the near future. To handle the case where v1
is no longer present, this updates cinderclient initialization to work
without it and give an appropriate error if v1 is requested with a
version where it is no longer available.
Change-Id: I277d7b48b8ad4cce383ec3722f8117938378f615
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Diffstat (limited to 'openstackclient/volume/v2')
| -rw-r--r-- | openstackclient/volume/v2/volume.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openstackclient/volume/v2/volume.py b/openstackclient/volume/v2/volume.py index 8ab61d2a..7a5c207a 100644 --- a/openstackclient/volume/v2/volume.py +++ b/openstackclient/volume/v2/volume.py @@ -212,6 +212,9 @@ class CreateVolume(command.ShowOne): raise exceptions.CommandError( _("ERROR: --user is deprecated, please use" " --os-username instead.")) + if parsed_args.multi_attach: + LOG.warning(_("'--multi-attach' option is no longer supported by " + "the block storage service.")) volume = volume_client.volumes.create( size=size, @@ -224,7 +227,6 @@ class CreateVolume(command.ShowOne): imageRef=image, source_volid=source_volume, consistencygroup_id=consistency_group, - multiattach=parsed_args.multi_attach, scheduler_hints=parsed_args.hint, ) |
