Merge "Add quobyte protocol for remotefs connections"
This commit is contained in:
commit
f4a9e15b18
@ -74,6 +74,7 @@ HGST = "HGST"
|
||||
RBD = "RBD"
|
||||
SCALEIO = "SCALEIO"
|
||||
SCALITY = "SCALITY"
|
||||
QUOBYTE = "QUOBYTE"
|
||||
|
||||
|
||||
def _check_multipathd_running(root_helper, enforce_multipath):
|
||||
@ -206,7 +207,7 @@ class InitiatorConnector(executor.Executor):
|
||||
execute=execute,
|
||||
device_scan_attempts=device_scan_attempts,
|
||||
*args, **kwargs)
|
||||
elif protocol in (NFS, GLUSTERFS, SCALITY):
|
||||
elif protocol in (NFS, GLUSTERFS, SCALITY, QUOBYTE):
|
||||
return RemoteFsConnector(mount_type=protocol.lower(),
|
||||
root_helper=root_helper,
|
||||
driver=driver,
|
||||
@ -1668,7 +1669,7 @@ class RemoteFsConnector(InitiatorConnector):
|
||||
if conn:
|
||||
mount_point_base = conn.get('mount_point_base')
|
||||
mount_type_lower = mount_type.lower()
|
||||
if mount_type_lower in ('nfs', 'glusterfs', 'scality'):
|
||||
if mount_type_lower in ('nfs', 'glusterfs', 'scality', 'quobyte'):
|
||||
kwargs[mount_type_lower + '_mount_point_base'] = (
|
||||
kwargs.get(mount_type_lower + '_mount_point_base') or
|
||||
mount_point_base)
|
||||
|
@ -40,7 +40,8 @@ class RemoteFsClient(object):
|
||||
'cifs': 'smbfs',
|
||||
'glusterfs': 'glusterfs',
|
||||
'vzstorage': 'vzstorage',
|
||||
'scality': 'scality_sofs'
|
||||
'scality': 'scality_sofs',
|
||||
'quobyte': 'quobyte'
|
||||
}
|
||||
|
||||
if mount_type not in mount_type_to_option_prefix:
|
||||
|
@ -171,6 +171,10 @@ class ConnectorTestCase(base.TestCase):
|
||||
obj = connector.InitiatorConnector.factory("scaleio", None)
|
||||
self.assertEqual("ScaleIOConnector", obj.__class__.__name__)
|
||||
|
||||
obj = connector.InitiatorConnector.factory(
|
||||
'quobyte', None, quobyte_mount_point_base='/mnt/test')
|
||||
self.assertEqual(obj.__class__.__name__, "RemoteFsConnector")
|
||||
|
||||
self.assertRaises(ValueError,
|
||||
connector.InitiatorConnector.factory,
|
||||
"bogus", None)
|
||||
|
@ -177,6 +177,9 @@ class RemoteFsClientTestCase(base.TestCase):
|
||||
def test_no_mount_point_scality(self):
|
||||
self._test_no_mount_point('scality')
|
||||
|
||||
def test_no_mount_point_quobyte(self):
|
||||
self._test_no_mount_point('quobyte')
|
||||
|
||||
def test_invalid_fs(self):
|
||||
self.assertRaises(exception.ProtocolNotSupported,
|
||||
remotefs.RemoteFsClient,
|
||||
|
Loading…
Reference in New Issue
Block a user