]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Port StorwizeSVCDriver to use ABCMeta driver model
authorxqli-openstack <xiaoqin.li@hotmail.com>
Fri, 24 Jul 2015 09:36:26 +0000 (02:36 -0700)
committerxiaoqin <lixqin@cn.ibm.com>
Mon, 27 Jul 2015 02:59:27 +0000 (02:59 +0000)
Use new ABCMeta driver model for StorwizeSVCDriver driver.
Also add empty function unmanage for ManageableVD.

Partially-implements: blueprint abc-driver-update

Change-Id: Ib92342186908a4e148fcb341b38de012047e8c22

cinder/volume/drivers/ibm/storwize_svc/__init__.py

index 2880838487b041a74c1eb68783061cca1dfa0c5b..c83ed39d8b9139683106c1d6915310921dc72d6d 100644 (file)
@@ -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.