Merge "Deprecate multiattach flag on volume create"
This commit is contained in:
@@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
"""Volume interface (v2 extension)."""
|
"""Volume interface (v2 extension)."""
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
|
||||||
from cinderclient.apiclient import base as common_base
|
from cinderclient.apiclient import base as common_base
|
||||||
from cinderclient import base
|
from cinderclient import base
|
||||||
|
|
||||||
@@ -259,7 +261,7 @@ class VolumeManager(base.ManagerWithFind):
|
|||||||
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
||||||
specified by the client to help boot an instance
|
specified by the client to help boot an instance
|
||||||
:param multiattach: Allow the volume to be attached to more than
|
:param multiattach: Allow the volume to be attached to more than
|
||||||
one instance
|
one instance (deprecated)
|
||||||
:rtype: :class:`Volume`
|
:rtype: :class:`Volume`
|
||||||
"""
|
"""
|
||||||
if metadata is None:
|
if metadata is None:
|
||||||
@@ -267,6 +269,13 @@ class VolumeManager(base.ManagerWithFind):
|
|||||||
else:
|
else:
|
||||||
volume_metadata = metadata
|
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,
|
body = {'volume': {'size': size,
|
||||||
'consistencygroup_id': consistencygroup_id,
|
'consistencygroup_id': consistencygroup_id,
|
||||||
'snapshot_id': snapshot_id,
|
'snapshot_id': snapshot_id,
|
||||||
|
@@ -14,6 +14,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
"""Volume interface (v3 extension)."""
|
"""Volume interface (v3 extension)."""
|
||||||
|
import warnings
|
||||||
|
|
||||||
from cinderclient import api_versions
|
from cinderclient import api_versions
|
||||||
from cinderclient.apiclient import base as common_base
|
from cinderclient.apiclient import base as common_base
|
||||||
from cinderclient import base
|
from cinderclient import base
|
||||||
@@ -95,7 +97,7 @@ class VolumeManager(volumes.VolumeManager):
|
|||||||
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
||||||
specified by the client to help boot an instance
|
specified by the client to help boot an instance
|
||||||
:param multiattach: Allow the volume to be attached to more than
|
:param multiattach: Allow the volume to be attached to more than
|
||||||
one instance
|
one instance (deprecated)
|
||||||
:param backup_id: ID of the backup
|
:param backup_id: ID of the backup
|
||||||
:rtype: :class:`Volume`
|
:rtype: :class:`Volume`
|
||||||
"""
|
"""
|
||||||
@@ -104,6 +106,13 @@ class VolumeManager(volumes.VolumeManager):
|
|||||||
else:
|
else:
|
||||||
volume_metadata = metadata
|
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,
|
body = {'volume': {'size': size,
|
||||||
'consistencygroup_id': consistencygroup_id,
|
'consistencygroup_id': consistencygroup_id,
|
||||||
'snapshot_id': snapshot_id,
|
'snapshot_id': snapshot_id,
|
||||||
|
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The ``--allow-multiattach`` flag on volume creation has now been marked
|
||||||
|
deprecated and will be removed in a future release.
|
Reference in New Issue
Block a user