From: Pedro Navarro Perez Date: Tue, 12 Mar 2013 11:48:02 +0000 (-0700) Subject: Fixes dettach volumes in Windows cinder plugin X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=2f7228ae6a10c0da49c67b873c22112ac26d0657;p=openstack-build%2Fcinder-build.git Fixes dettach volumes in Windows cinder plugin 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 (cherry picked from commit 6de6cfebd4398c9912eb1683c91226d5d27cf7e4) --- diff --git a/cinder/volume/drivers/windows.py b/cinder/volume/drivers/windows.py index 89038b052..a0113b153 100644 --- a/cinder/volume/drivers/windows.py +++ b/cinder/volume/drivers/windows.py @@ -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):