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
This commit is contained in:
mikhail 2015-02-11 08:20:13 -08:00
parent 0f30349e45
commit 0f038bb81f
2 changed files with 3 additions and 4 deletions

View File

@ -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, ),
]

View File

@ -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