diff options
author | Zuul <zuul@review.openstack.org> | 2018-01-03 18:07:43 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2018-01-03 18:07:43 +0000 |
commit | 36a2f4b4ebe8c46df2b7786ad9402ac7b12e700a (patch) | |
tree | 5520cd6df2fe832e7e043f0848478e1ab24a4d53 /cinderclient/v3/volumes.py | |
parent | 801ec5a44a8acf744ec1d3bbf744f327d0bf5809 (diff) | |
parent | adb141a2626192e8f45a911291895716d7c1c8a4 (diff) | |
download | python-cinderclient-3.4.0.tar.gz |
Merge "Deprecate multiattach flag on volume create"3.4.0
Diffstat (limited to 'cinderclient/v3/volumes.py')
-rw-r--r-- | cinderclient/v3/volumes.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cinderclient/v3/volumes.py b/cinderclient/v3/volumes.py index 99006b4..9a44a8e 100644 --- a/cinderclient/v3/volumes.py +++ b/cinderclient/v3/volumes.py @@ -14,6 +14,8 @@ # under the License. """Volume interface (v3 extension).""" +import warnings + from cinderclient import api_versions from cinderclient.apiclient import base as common_base from cinderclient import base @@ -95,7 +97,7 @@ class VolumeManager(volumes.VolumeManager): :param scheduler_hints: (optional extension) arbitrary key-value pairs specified by the client to help boot an instance :param multiattach: Allow the volume to be attached to more than - one instance + one instance (deprecated) :param backup_id: ID of the backup :rtype: :class:`Volume` """ @@ -104,6 +106,13 @@ class VolumeManager(volumes.VolumeManager): else: volume_metadata = metadata + if multiattach: + warnings.warn('The ``multiattach`` volume create flag is ' + 'deprecated and will be removed in a future ' + 'release. Multiattach capability is now controlled ' + 'using volume type extra specs.', + DeprecationWarning) + body = {'volume': {'size': size, 'consistencygroup_id': consistencygroup_id, 'snapshot_id': snapshot_id, |