From: mikhail Date: Wed, 11 Feb 2015 16:20:13 +0000 (-0800) Subject: Remove optional parameter from lun mapping call X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0f038bb81f36550818d9423edb11eb21e3dce5d6;p=openstack-build%2Fcinder-build.git Remove optional parameter from lun mapping call Remove optional parameter from lun mapping call as it's unneeded and creates an issue in case of HA-cluster Change-Id: Ifbe2896fd74e514d66256ff0190db25bfcc9fa6b --- diff --git a/cinder/tests/test_nexenta.py b/cinder/tests/test_nexenta.py index 7d39c79ce..6610f1a12 100644 --- a/cinder/tests/test_nexenta.py +++ b/cinder/tests/test_nexenta.py @@ -110,7 +110,7 @@ class TestNexentaISCSIDriver(test.TestCase): self.nms_mock.scsidisk.create_lu('cinder/volume1', {}) self.nms_mock.scsidisk.lu_shared('cinder/volume1') self.nms_mock.scsidisk.add_lun_mapping_entry( - 'cinder/volume1', {'target_group': 'cinder/volume1', 'lun': '0'}) + 'cinder/volume1', {'target_group': 'cinder/volume1'}) self.mox.ReplayAll() self.drv.create_volume(self.TEST_VOLUME_REF) @@ -247,7 +247,7 @@ class TestNexentaISCSIDriver(test.TestCase): True, ), ('scsidisk', 'lu_shared', ('cinder/volume1', ), 0, False, ), ('scsidisk', 'add_lun_mapping_entry', ('cinder/volume1', { - 'target_group': 'cinder/volume1', 'lun': '0'}), + 'target_group': 'cinder/volume1'}), u"Unable to add view to zvol 'cinder/volume1' (LUNs in use: ):\n" u" stmfadm: view entry exists\n", True, ), ] diff --git a/cinder/volume/drivers/nexenta/iscsi.py b/cinder/volume/drivers/nexenta/iscsi.py index 59bcf63a1..a48fb05e3 100644 --- a/cinder/volume/drivers/nexenta/iscsi.py +++ b/cinder/volume/drivers/nexenta/iscsi.py @@ -511,8 +511,7 @@ class NexentaISCSIDriver(driver.ISCSIDriver): # pylint: disable=R0921 if not self._is_lu_shared(zvol_name): try: self.nms.scsidisk.add_lun_mapping_entry(zvol_name, { - 'target_group': target_group_name, - 'lun': '0'}) + 'target_group': target_group_name}) except nexenta.NexentaException as exc: if not ensure or 'view entry exists' not in exc.args[0]: raise