Merge "Move CloneableVD to common functions"

This commit is contained in:
Jenkins 2015-11-03 15:45:04 +00:00 committed by Gerrit Code Review
commit fed877360b
20 changed files with 18 additions and 40 deletions

View File

@ -1326,6 +1326,16 @@ class BaseVD(object):
def retype(self, context, volume, new_type, diff, host):
return False, None
def create_cloned_volume(self, volume, src_vref):
"""Creates a clone of the specified volume.
If volume_type extra specs includes 'replication: <is> True' the
driver needs to create a volume replica (secondary)
and setup replication between the newly created volume
and the secondary volume.
"""
raise NotImplementedError()
# ####### Interface methods for DataPath (Connector) ########
@abc.abstractmethod
def ensure_export(self, context, volume):
@ -1504,21 +1514,6 @@ class ConsistencyGroupVD(object):
return
@six.add_metaclass(abc.ABCMeta)
class CloneableVD(object):
@abc.abstractmethod
def create_cloned_volume(self, volume, src_vref):
"""Creates a clone of the specified volume.
If volume_type extra specs includes 'replication: <is> True' the
driver needs to create a volume replica (secondary)
and setup replication between the newly created volume
and the secondary volume.
"""
return
@six.add_metaclass(abc.ABCMeta)
class CloneableImageVD(object):
@abc.abstractmethod
@ -1964,7 +1959,7 @@ class ReplicaVD(object):
class VolumeDriver(ConsistencyGroupVD, TransferVD, ManageableVD, ExtendVD,
CloneableVD, CloneableImageVD, ManageableSnapshotsVD,
CloneableImageVD, ManageableSnapshotsVD,
SnapshotVD, ReplicaVD, LocalVD, MigrateVD, BaseVD):
"""This class will be deprecated soon.
@ -1979,9 +1974,6 @@ class VolumeDriver(ConsistencyGroupVD, TransferVD, ManageableVD, ExtendVD,
def create_volume_from_snapshot(self, volume, snapshot):
raise NotImplementedError()
def create_cloned_volume(self, volume, src_vref):
raise NotImplementedError()
def create_replica_test_volume(self, volume, src_vref):
raise NotImplementedError()

View File

@ -41,7 +41,7 @@ CONF = cfg.CONF
CONF.register_opts(volume_opts)
class BlockDeviceDriver(driver.BaseVD, driver.LocalVD, driver.CloneableVD,
class BlockDeviceDriver(driver.BaseVD, driver.LocalVD,
driver.CloneableImageVD, driver.TransferVD):
VERSION = '2.1.0'

View File

@ -51,8 +51,7 @@ CONF.register_opts(common_opts)
class DellCommonDriver(driver.ConsistencyGroupVD, driver.ManageableVD,
driver.ExtendVD, driver.CloneableVD, driver.SnapshotVD,
driver.BaseVD):
driver.ExtendVD, driver.SnapshotVD, driver.BaseVD):
def __init__(self, *args, **kwargs):
super(DellCommonDriver, self).__init__(*args, **kwargs)

View File

@ -47,7 +47,7 @@ CONF = cfg.CONF
CONF.register_opts(volume_opts)
class GlusterfsDriver(remotefs_drv.RemoteFSSnapDriver, driver.CloneableVD,
class GlusterfsDriver(remotefs_drv.RemoteFSSnapDriver,
driver.ExtendVD):
"""Gluster based cinder driver.

View File

@ -108,7 +108,7 @@ def _sizestr(size_in_g):
class GPFSDriver(driver.ConsistencyGroupVD, driver.ExtendVD,
driver.LocalVD, driver.TransferVD, driver.CloneableVD,
driver.LocalVD, driver.TransferVD,
driver.CloneableImageVD, driver.SnapshotVD,
driver.MigrateVD,
driver.BaseVD):

View File

@ -141,8 +141,7 @@ class StorwizeSVCDriver(san.SanDriver,
driver.ExtendVD, driver.SnapshotVD,
driver.MigrateVD, driver.ReplicaVD,
driver.ConsistencyGroupVD,
driver.CloneableVD, driver.CloneableImageVD,
driver.TransferVD):
driver.CloneableImageVD, driver.TransferVD):
"""IBM Storwize V7000 and SVC iSCSI/FC volume driver.
Version history:

View File

@ -65,7 +65,6 @@ class XIVDS8KDriver(san.SanDriver,
driver.MigrateVD,
driver.ReplicaVD,
driver.ConsistencyGroupVD,
driver.CloneableVD,
driver.CloneableImageVD,
driver.TransferVD):
"""Unified IBM XIV and DS8K volume driver."""

View File

@ -28,7 +28,6 @@ LOG = logging.getLogger(__name__)
class NetApp7modeFibreChannelDriver(driver.BaseVD,
driver.ManageableVD,
driver.ExtendVD,
driver.CloneableVD,
driver.TransferVD,
driver.SnapshotVD):
"""NetApp 7-mode FibreChannel volume driver."""

View File

@ -28,7 +28,6 @@ LOG = logging.getLogger(__name__)
class NetAppCmodeFibreChannelDriver(driver.BaseVD,
driver.ManageableVD,
driver.ExtendVD,
driver.CloneableVD,
driver.TransferVD,
driver.SnapshotVD):
"""NetApp C-mode FibreChannel volume driver."""

View File

@ -27,7 +27,6 @@ LOG = logging.getLogger(__name__)
class NetApp7modeISCSIDriver(driver.BaseVD,
driver.ManageableVD,
driver.ExtendVD,
driver.CloneableVD,
driver.TransferVD,
driver.SnapshotVD):
"""NetApp 7-mode iSCSI volume driver."""

View File

@ -27,7 +27,6 @@ LOG = logging.getLogger(__name__)
class NetAppCmodeISCSIDriver(driver.BaseVD,
driver.ManageableVD,
driver.ExtendVD,
driver.CloneableVD,
driver.TransferVD,
driver.SnapshotVD):
"""NetApp C-mode iSCSI volume driver."""

View File

@ -52,7 +52,6 @@ CONF = cfg.CONF
@six.add_metaclass(utils.TraceWrapperWithABCMetaclass)
class NetAppNfsDriver(driver.ManageableVD,
driver.CloneableVD,
driver.CloneableImageVD,
driver.SnapshotVD,
nfs.NfsDriver):

View File

@ -29,7 +29,6 @@ LOG = logging.getLogger(__name__)
class NetAppEseriesFibreChannelDriver(driver.BaseVD,
driver.ManageableVD,
driver.ExtendVD,
driver.CloneableVD,
driver.TransferVD,
driver.SnapshotVD):
"""NetApp E-Series FibreChannel volume driver."""

View File

@ -31,7 +31,6 @@ LOG = logging.getLogger(__name__)
class NetAppEseriesISCSIDriver(driver.BaseVD,
driver.ManageableVD,
driver.ExtendVD,
driver.CloneableVD,
driver.TransferVD,
driver.SnapshotVD):
"""NetApp E-Series iSCSI volume driver."""

View File

@ -697,7 +697,7 @@ class DPLVolume(object):
class DPLCOMMONDriver(driver.ConsistencyGroupVD, driver.ExtendVD,
driver.CloneableVD, driver.CloneableImageVD,
driver.CloneableImageVD,
driver.SnapshotVD, driver.LocalVD, driver.BaseVD):
"""Class of dpl storage adapter."""
VERSION = '2.0.4'

View File

@ -265,7 +265,7 @@ class RADOSClient(object):
class RBDDriver(driver.TransferVD, driver.ExtendVD,
driver.CloneableVD, driver.CloneableImageVD, driver.SnapshotVD,
driver.CloneableImageVD, driver.SnapshotVD,
driver.MigrateVD, driver.BaseVD):
"""Implements RADOS block device (RBD) volume commands."""

View File

@ -49,7 +49,6 @@ LOG = logging.getLogger(__name__)
class HP3PARFCDriver(driver.TransferVD,
driver.ManageableVD,
driver.ExtendVD,
driver.CloneableVD,
driver.SnapshotVD,
driver.MigrateVD,
driver.ConsistencyGroupVD,

View File

@ -54,7 +54,6 @@ CHAP_PASS_KEY = "HPQ-cinder-CHAP-secret"
class HP3PARISCSIDriver(driver.TransferVD,
driver.ManageableVD,
driver.ExtendVD,
driver.CloneableVD,
driver.SnapshotVD,
driver.MigrateVD,
driver.ConsistencyGroupVD,

View File

@ -48,7 +48,6 @@ MIN_CLIENT_VERSION = '1.0.4'
class HPLeftHandISCSIDriver(driver.TransferVD,
driver.ManageableVD,
driver.ExtendVD,
driver.CloneableVD,
driver.SnapshotVD,
driver.MigrateVD,
driver.BaseVD,

View File

@ -62,7 +62,6 @@ CONF.register_opts(tintri_opts)
class TintriDriver(driver.ManageableVD,
driver.CloneableVD,
driver.CloneableImageVD,
driver.SnapshotVD,
nfs.NfsDriver):