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 f9939d13b16..1f4dedee7f3 100644 --- a/cinder/tests/test_hp3par.py +++ b/cinder/tests/test_hp3par.py @@ -412,7 +412,8 @@ def test_terminate_connection(self): 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 cc55b0a3eec..1abd291825d 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 @@ def initialize_connection(self, volume, connector): 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 4fddb810364..eed9da5ecea 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 @@ def initialize_connection(self, volume, connector): 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,