From d0de50c650a6a7097f402b8165701ade6121870e Mon Sep 17 00:00:00 2001 From: xqli-openstack Date: Fri, 24 Jul 2015 02:36:26 -0700 Subject: [PATCH] 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 --- .../volume/drivers/ibm/storwize_svc/__init__.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) 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. -- 2.45.2