From 9e6e677318f3b92f34d2549011407b83d2997487 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Thu, 16 Jul 2015 13:51:23 -0700 Subject: [PATCH] scality: add export and name keys to os-initialize_connection info 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 | 2 ++ cinder/volume/drivers/scality.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/cinder/tests/unit/test_scality.py b/cinder/tests/unit/test_scality.py index 52f93dd50..a9f8d1237 100644 --- a/cinder/tests/unit/test_scality.py +++ b/cinder/tests/unit/test_scality.py @@ -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.""" diff --git a/cinder/volume/drivers/scality.py b/cinder/volume/drivers/scality.py index 011fb144a..a03fb6509 100644 --- a/cinder/volume/drivers/scality.py +++ b/cinder/volume/drivers/scality.py @@ -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'], } } -- 2.45.2