]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add LUN# to provider_location in Nexenta driver.
authorYuriy Taraday <yorik.sar@gmail.com>
Fri, 18 Jan 2013 13:44:22 +0000 (17:44 +0400)
committerYuriy Taraday <yorik.sar@gmail.com>
Fri, 18 Jan 2013 13:47:42 +0000 (17:47 +0400)
Fixes bug 1088411. Lets Nexenta driver work with any iscsi_helper.

Change-Id: Ib70ed94fa472c7281de077f0f36575216741678f

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

index 9762f9738ccf1ea58c2f463238729b4e18b7e95d..e430809c0a4f8f85262733b593e312a2f17bbd00 100644 (file)
@@ -148,10 +148,10 @@ class TestNexentaDriver(cinder.test.TestCase):
         self.assertEquals(
             retval,
             {'provider_location':
-                '%s:%s,1 %s%s' % (FLAGS.nexenta_host,
-                                  FLAGS.nexenta_iscsi_target_portal_port,
-                                  FLAGS.nexenta_target_prefix,
-                                  self.TEST_VOLUME_NAME)})
+                '%s:%s,1 %s%s 0' % (FLAGS.nexenta_host,
+                                    FLAGS.nexenta_iscsi_target_portal_port,
+                                    FLAGS.nexenta_target_prefix,
+                                    self.TEST_VOLUME_NAME)})
 
     def __get_test(i):
         def _test_create_export_fail(self):
index 0b737e9146c897f998546f10caa7d6501e7403f7..a384f34274b55d701d1f63ed5d2a61884fecbe0c 100644 (file)
@@ -234,9 +234,9 @@ class NexentaDriver(driver.ISCSIDriver):  # pylint: disable=R0921
             else:
                 LOG.info(_('Ignored LUN mapping entry addition error "%s"'
                            ' while ensuring export'), exc)
-        return '%s:%s,1 %s' % (FLAGS.nexenta_host,
-                               FLAGS.nexenta_iscsi_target_portal_port,
-                               target_name)
+        return '%s:%s,1 %s 0' % (FLAGS.nexenta_host,
+                                 FLAGS.nexenta_iscsi_target_portal_port,
+                                 target_name)
 
     def create_export(self, _ctx, volume):
         """Create new export for zvol.