From: xqli-openstack Date: Fri, 24 Jul 2015 09:36:26 +0000 (-0700) Subject: Port StorwizeSVCDriver to use ABCMeta driver model X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d0de50c650a6a7097f402b8165701ade6121870e;p=openstack-build%2Fcinder-build.git Port StorwizeSVCDriver to use ABCMeta driver model Use new ABCMeta driver model for StorwizeSVCDriver driver. Also add empty function unmanage for ManageableVD. Partially-implements: blueprint abc-driver-update Change-Id: Ib92342186908a4e148fcb341b38de012047e8c22 --- diff --git a/cinder/volume/drivers/ibm/storwize_svc/__init__.py b/cinder/volume/drivers/ibm/storwize_svc/__init__.py index 288083848..c83ed39d8 100644 --- a/cinder/volume/drivers/ibm/storwize_svc/__init__.py +++ b/cinder/volume/drivers/ibm/storwize_svc/__init__.py @@ -48,6 +48,7 @@ from cinder import context from cinder import exception from cinder.i18n import _, _LE, _LI, _LW from cinder import utils +from cinder.volume import driver from cinder.volume.drivers.ibm.storwize_svc import helpers as storwize_helpers from cinder.volume.drivers.ibm.storwize_svc import replication as storwize_rep from cinder.volume.drivers.san import san @@ -126,7 +127,14 @@ CONF = cfg.CONF CONF.register_opts(storwize_svc_opts) -class StorwizeSVCDriver(san.SanDriver): +class StorwizeSVCDriver(san.SanDriver, + driver.ManageableVD, + driver.ExtendVD, driver.SnapshotVD, + driver.MigrateVD, driver.ReplicaVD, + driver.ConsistencyGroupVD, + driver.CloneableVD, driver.CloneableImageVD, + driver.RetypeVD, + driver.TransferVD): """IBM Storwize V7000 and SVC iSCSI/FC volume driver. Version history: @@ -144,9 +152,10 @@ class StorwizeSVCDriver(san.SanDriver): 1.2.6 - Added QoS support in terms of I/O throttling rate 1.3.1 - Added support for volume replication 1.3.2 - Added support for consistency group + 1.3.3 - Update driver to use ABC metaclasses """ - VERSION = "1.3.2" + VERSION = "1.3.3" VDISKCOPYOPS_INTERVAL = 600 def __init__(self, *args, **kwargs): @@ -1055,6 +1064,10 @@ class StorwizeSVCDriver(san.SanDriver): return int(math.ceil(float(vdisk['capacity']) / units.Gi)) + def unmanage(self, volume): + """Remove the specified volume from Cinder management.""" + pass + def get_volume_stats(self, refresh=False): """Get volume stats.