Add quobyte protocol for remotefs connections
Adds the quobyte protocol alongside nfs, glusterfs, etc. . Closes-Bug: #1520207 Change-Id: Ieaf37640b0f4cc21c22cfd836c87f03e91da1564
This commit is contained in:
parent
ebec620bb5
commit
915aa5c8d6
@ -74,6 +74,7 @@ HGST = "HGST"
|
|||||||
RBD = "RBD"
|
RBD = "RBD"
|
||||||
SCALEIO = "SCALEIO"
|
SCALEIO = "SCALEIO"
|
||||||
SCALITY = "SCALITY"
|
SCALITY = "SCALITY"
|
||||||
|
QUOBYTE = "QUOBYTE"
|
||||||
|
|
||||||
|
|
||||||
def _check_multipathd_running(root_helper, enforce_multipath):
|
def _check_multipathd_running(root_helper, enforce_multipath):
|
||||||
@ -194,7 +195,7 @@ class InitiatorConnector(executor.Executor):
|
|||||||
execute=execute,
|
execute=execute,
|
||||||
device_scan_attempts=device_scan_attempts,
|
device_scan_attempts=device_scan_attempts,
|
||||||
*args, **kwargs)
|
*args, **kwargs)
|
||||||
elif protocol in (NFS, GLUSTERFS, SCALITY):
|
elif protocol in (NFS, GLUSTERFS, SCALITY, QUOBYTE):
|
||||||
return RemoteFsConnector(mount_type=protocol.lower(),
|
return RemoteFsConnector(mount_type=protocol.lower(),
|
||||||
root_helper=root_helper,
|
root_helper=root_helper,
|
||||||
driver=driver,
|
driver=driver,
|
||||||
@ -1538,7 +1539,7 @@ class RemoteFsConnector(InitiatorConnector):
|
|||||||
if conn:
|
if conn:
|
||||||
mount_point_base = conn.get('mount_point_base')
|
mount_point_base = conn.get('mount_point_base')
|
||||||
mount_type_lower = mount_type.lower()
|
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[mount_type_lower + '_mount_point_base'] = (
|
||||||
kwargs.get(mount_type_lower + '_mount_point_base') or
|
kwargs.get(mount_type_lower + '_mount_point_base') or
|
||||||
mount_point_base)
|
mount_point_base)
|
||||||
|
@ -40,7 +40,8 @@ class RemoteFsClient(object):
|
|||||||
'cifs': 'smbfs',
|
'cifs': 'smbfs',
|
||||||
'glusterfs': 'glusterfs',
|
'glusterfs': 'glusterfs',
|
||||||
'vzstorage': 'vzstorage',
|
'vzstorage': 'vzstorage',
|
||||||
'scality': 'scality_sofs'
|
'scality': 'scality_sofs',
|
||||||
|
'quobyte': 'quobyte'
|
||||||
}
|
}
|
||||||
|
|
||||||
if mount_type not in mount_type_to_option_prefix:
|
if mount_type not in mount_type_to_option_prefix:
|
||||||
|
@ -171,6 +171,10 @@ class ConnectorTestCase(base.TestCase):
|
|||||||
obj = connector.InitiatorConnector.factory("scaleio", None)
|
obj = connector.InitiatorConnector.factory("scaleio", None)
|
||||||
self.assertEqual("ScaleIOConnector", obj.__class__.__name__)
|
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,
|
self.assertRaises(ValueError,
|
||||||
connector.InitiatorConnector.factory,
|
connector.InitiatorConnector.factory,
|
||||||
"bogus", None)
|
"bogus", None)
|
||||||
|
@ -177,6 +177,9 @@ class RemoteFsClientTestCase(base.TestCase):
|
|||||||
def test_no_mount_point_scality(self):
|
def test_no_mount_point_scality(self):
|
||||||
self._test_no_mount_point('scality')
|
self._test_no_mount_point('scality')
|
||||||
|
|
||||||
|
def test_no_mount_point_quobyte(self):
|
||||||
|
self._test_no_mount_point('quobyte')
|
||||||
|
|
||||||
def test_invalid_fs(self):
|
def test_invalid_fs(self):
|
||||||
self.assertRaises(exception.ProtocolNotSupported,
|
self.assertRaises(exception.ProtocolNotSupported,
|
||||||
remotefs.RemoteFsClient,
|
remotefs.RemoteFsClient,
|
||||||
|
Loading…
Reference in New Issue
Block a user