]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes VNX NotImplementedError of unmanage
authorpeter_wang <wangxu198709@gmail.com>
Mon, 9 Mar 2015 00:38:25 +0000 (20:38 -0400)
committerPeter Wang <peter.wang13@emc.com>
Tue, 10 Mar 2015 15:00:33 +0000 (15:00 +0000)
When unmanaging a volume, cinder would call unmanage.
This fix is to add unmanage to avoid NotImplementedError.

Change-Id: I11539cc945d432e23bebf085cacb0023b9a6a1e3
Closes-Bug: 1429702

cinder/tests/test_emc_vnxdirect.py
cinder/volume/drivers/emc/emc_cli_fc.py
cinder/volume/drivers/emc/emc_cli_iscsi.py
cinder/volume/drivers/emc/emc_vnx_cli.py

index a1e7b60fed23ea36772d13c3436a5749bce06076..6628ae8f5f0e85a4f52d3e11b12fd83baec15757 100644 (file)
@@ -3064,6 +3064,13 @@ Time Remaining:  0 second(s)
                       '-o')]
         fake_cli.assert_has_calls(expect_cmd)
 
+    def test_unmanage(self):
+        self.driverSetup()
+        try:
+            self.driver.unmanage(self.testData.test_volume)
+        except NotImplementedError:
+            self.fail('Interface unmanage need to be implemented')
+
 
 class EMCVNXCLIDArrayBasedDriverTestCase(DriverTestCaseBase):
     def setUp(self):
index d7fd46f7c2e520c705f643809e84b0c3404cc1d7..a05b3031e1c9f39c9f8c04856ddaec1993c5242b 100644 (file)
@@ -247,3 +247,7 @@ class EMCCLIFCDriver(driver.FibreChannelDriver):
         return self.cli.update_consistencygroup(context, group,
                                                 add_volumes,
                                                 remove_volumes)
+
+    def unmanage(self, volume):
+        """Unmanages a volume."""
+        return self.cli.unmanage(volume)
index fb7b1ce9803ae1a33b370a634de48bd605736132..b5f943405329698cf847a97ab7b21d68b69ff5e7 100644 (file)
@@ -226,3 +226,7 @@ class EMCCLIISCSIDriver(driver.ISCSIDriver):
         return self.cli.update_consistencygroup(context, group,
                                                 add_volumes,
                                                 remove_volumes)
+
+    def unmanage(self, volume):
+        """Unmanages a volume."""
+        self.cli.unmanage(volume)
index 45b87daf1ed2949227c00652e437926ffdd7a708..0710cc2e66cb0bb726418dfafdd5ad4a8995f2c1 100644 (file)
@@ -1582,7 +1582,7 @@ class CommandLineHelper(object):
 class EMCVnxCliBase(object):
     """This class defines the functions to use the native CLI functionality."""
 
-    VERSION = '05.03.00'
+    VERSION = '05.03.01'
     stats = {'driver_version': VERSION,
              'storage_protocol': None,
              'vendor_name': 'EMC',
@@ -2917,6 +2917,10 @@ class EMCVnxCliBase(object):
                                             poll=False)
         return data.get(self._client.LUN_POOL.key)
 
+    def unmanage(self, volume):
+        """Unmanages a volume"""
+        pass
+
 
 @decorate_all_methods(log_enter_exit)
 class EMCVnxCliPool(EMCVnxCliBase):