]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove optional parameter from lun mapping call
authormikhail <mikhail.khodos@nexenta.com>
Wed, 11 Feb 2015 16:20:13 +0000 (08:20 -0800)
committermikhail <mikhail.khodos@nexenta.com>
Wed, 11 Feb 2015 21:51:06 +0000 (13:51 -0800)
Remove optional parameter from lun mapping call as it's
unneeded and creates an issue in case of HA-cluster

Change-Id: Ifbe2896fd74e514d66256ff0190db25bfcc9fa6b

cinder/tests/test_nexenta.py
cinder/volume/drivers/nexenta/iscsi.py

index 7d39c79cef7330542ba484aaaba1cd0534b22293..6610f1a12f5c12acddcfcd8a71a8f43589e12e06 100644 (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, ),
     ]
index 59bcf63a18ae4bece9c84ee7bfbfc99b6a67bfe0..a48fb05e334c39830e446c079200148abc452c69 100644 (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