]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fixes dettach volumes in Windows cinder plugin
authorPedro Navarro Perez <pednape@gmail.com>
Tue, 12 Mar 2013 11:48:02 +0000 (04:48 -0700)
committerPedro Navarro Perez <pednape@gmail.com>
Wed, 13 Mar 2013 13:24:23 +0000 (06:24 -0700)
The patch fixes issues when desassigning target to initiators
in the terminate_connection method. The method now takes
the right parameter coming from provider location.

Change-Id: I2ea1ac7f46e3a24a6493af8eba46a113126e1117
Fixes: bug #1153968
cinder/volume/drivers/windows.py

index 89038b052ef428afc8dca102e9acb9f976346e19..a0113b15350a6b698acc9fda4d0a7fdc61f403c9 100644 (file)
@@ -119,10 +119,11 @@ class WindowsDriver(driver.ISCSIDriver):
         longer access it.
         """
         initiator_name = connector['initiator']
+        provider_location = volume['provider_location']
         #DesAssigning target to initiators
-        wt_idmethod = self._conn_wmi.WT_IDMethod(HostName=volume['name'],
+        wt_idmethod = self._conn_wmi.WT_IDMethod(HostName=provider_location,
                                                  Method=4,
-                                                 Value=initiator_name)
+                                                 Value=initiator_name)[0]
         wt_idmethod.Delete_()
 
     def create_volume(self, volume):