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
This commit is contained in:
Matt Riedemann 2015-07-16 13:51:23 -07:00
parent 50aad81fd5
commit 9e6e677318
2 changed files with 4 additions and 0 deletions

View 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."""

View 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'],
}
}