From 9dc141a54f54414d3f3e7b52b9c7d5c0050efa81 Mon Sep 17 00:00:00 2001 From: Viraj Hardikar Date: Wed, 12 Jun 2013 10:34:26 -0700 Subject: [PATCH] Fixes 3PAR drivers terminate_connection issue. 3PAR drivers now default the third parameter when terminate_connection is called after copying a volume to image. Fixes: bug #1190056 Change-Id: Icadacc9e083c6e97a919857d735ec16068d0f0c6 --- cinder/tests/test_hp3par.py | 3 ++- cinder/volume/drivers/san/hp/hp_3par_fc.py | 2 +- cinder/volume/drivers/san/hp/hp_3par_iscsi.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cinder/tests/test_hp3par.py b/cinder/tests/test_hp3par.py index f9939d13b..1f4dedee7 100644 --- a/cinder/tests/test_hp3par.py +++ b/cinder/tests/test_hp3par.py @@ -412,7 +412,8 @@ class HP3PARBaseDriver(): self.driver.initialize_connection(self.volume, self.connector) vlun = self.driver.common.client.getVLUN(self.VOLUME_3PAR_NAME) self.assertEqual(vlun['volumeName'], self.VOLUME_3PAR_NAME) - self.driver.terminate_connection(self.volume, self.connector, True) + self.driver.terminate_connection(self.volume, self.connector, + force=True) # vlun should be gone. self.assertRaises(hpexceptions.HTTPNotFound, self.driver.common.client.getVLUN, diff --git a/cinder/volume/drivers/san/hp/hp_3par_fc.py b/cinder/volume/drivers/san/hp/hp_3par_fc.py index cc55b0a3e..1abd29182 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_fc.py +++ b/cinder/volume/drivers/san/hp/hp_3par_fc.py @@ -185,7 +185,7 @@ class HP3PARFCDriver(cinder.volume.driver.FibreChannelDriver): return info @utils.synchronized('3par', external=True) - def terminate_connection(self, volume, connector, force): + def terminate_connection(self, volume, connector, **kwargs): """Driver entry point to unattach a volume from an instance.""" self.common.client_login() self.common.terminate_connection(volume, diff --git a/cinder/volume/drivers/san/hp/hp_3par_iscsi.py b/cinder/volume/drivers/san/hp/hp_3par_iscsi.py index 4fddb8103..eed9da5ec 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_iscsi.py +++ b/cinder/volume/drivers/san/hp/hp_3par_iscsi.py @@ -191,7 +191,7 @@ class HP3PARISCSIDriver(cinder.volume.driver.ISCSIDriver): return info @utils.synchronized('3par', external=True) - def terminate_connection(self, volume, connector, force): + def terminate_connection(self, volume, connector, **kwargs): """Driver entry point to unattach a volume from an instance.""" self.common.client_login() self.common.terminate_connection(volume, -- 2.45.2