]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
scality: add export and name keys to os-initialize_connection info
authorMatt Riedemann <mriedem@us.ibm.com>
Thu, 16 Jul 2015 20:51:23 +0000 (13:51 -0700)
committerMatt Riedemann <mriedem@us.ibm.com>
Thu, 16 Jul 2015 21:13:29 +0000 (14:13 -0700)
Nova is standardizing on some of the common code for file system type
volume drivers in blueprint consolidate-libvirt-fs-volume-drivers and
expects the 'export' and 'name' keys to be in connection_info['data']
returned from the os-initialize_connection Cinder API.

The Scality volume driver wasn't providing these keys so those are added
here.

Related Nova change: I7db834956c67383e63be2fe2c465118e00273e4b

Closes-Bug: #1475419

Change-Id: I73938c51ac147dca5cf39765768f4ac078bf5e63

cinder/tests/unit/test_scality.py
cinder/volume/drivers/scality.py

index 52f93dd502bf9eb7deffbb7019ef6ed3390acb43..a9f8d1237c30386b241865ab59f83441a9faba6b 100644 (file)
@@ -221,6 +221,8 @@ class ScalityDriverTestCase(test.TestCase):
         self.assertEqual(ret['data']['sofs_path'],
                          os.path.join(self.TEST_VOLDIR,
                                       self.TEST_VOLNAME))
+        self.assertEqual(self.TEST_VOLDIR, ret['data']['export'])
+        self.assertEqual(self.TEST_VOLNAME, ret['data']['name'])
 
     def test_copy_image_to_volume(self):
         """Expected behaviour for copy_image_to_volume."""
index 011fb144a69d26b63de6ef9a4f2e593eba9ef418..a03fb6509ffcb5355d1157270668120114aa3694 100644 (file)
@@ -212,6 +212,8 @@ class ScalityDriver(driver.VolumeDriver):
             'driver_volume_type': 'scality',
             'data': {
                 'sofs_path': self._sofs_path(volume),
+                'export': self.configuration.scality_sofs_volume_dir,
+                'name': volume['name'],
             }
         }