Merge "hyper-v rbd volume support"
This commit is contained in:
commit
0226f9dd63
|
@ -64,7 +64,7 @@ os-resource-classes==0.4.0
|
|||
os-service-types==1.7.0
|
||||
os-traits==2.5.0
|
||||
os-vif==1.14.0
|
||||
os-win==5.1.0
|
||||
os-win==5.4.0
|
||||
os-xenapi==0.3.4
|
||||
osc-lib==1.10.0
|
||||
oslo.cache==1.26.0
|
||||
|
|
|
@ -599,3 +599,28 @@ class SMBFSVolumeDriverTestCase(test_base.HyperVBaseTestCase):
|
|||
mock_set_qos_specs.assert_called_once_with(
|
||||
mock.sentinel.disk_path,
|
||||
fake_total_iops_sec)
|
||||
|
||||
|
||||
class RBDVolumeDriver(test_base.HyperVBaseTestCase):
|
||||
def test_get_vol_driver(self):
|
||||
self._volumeops = volumeops.VolumeOps()
|
||||
self._volumeops._volutils = mock.MagicMock()
|
||||
self._volumeops._vmutils = mock.Mock()
|
||||
|
||||
connection_info = get_fake_connection_info()
|
||||
connection_info['driver_volume_type'] = 'rbd'
|
||||
|
||||
drv = self._volumeops._get_volume_driver(connection_info)
|
||||
|
||||
# Not much to test here. The Hyper-V driver volume attach code
|
||||
# is mostly generic and all the RBD related plumbing is handled
|
||||
# by os-brick.
|
||||
#
|
||||
# We'll just ensure that the RBD driver can be retrieved and that it
|
||||
# has the right fields.
|
||||
self.assertTrue(drv._is_block_dev)
|
||||
self.assertEqual('rbd', drv._protocol)
|
||||
# Hyper-V requires a virtual SCSI disk so we'll ask for a
|
||||
# local attach.
|
||||
self.assertEqual(dict(do_local_attach=True),
|
||||
drv._extra_connector_args)
|
||||
|
|
|
@ -90,3 +90,4 @@ IOPS_BASE_SIZE = 8 * units.Ki
|
|||
STORAGE_PROTOCOL_ISCSI = 'iscsi'
|
||||
STORAGE_PROTOCOL_FC = 'fibre_channel'
|
||||
STORAGE_PROTOCOL_SMBFS = 'smbfs'
|
||||
STORAGE_PROTOCOL_RBD = 'rbd'
|
||||
|
|
|
@ -46,7 +46,8 @@ class VolumeOps(object):
|
|||
self.volume_drivers = {
|
||||
constants.STORAGE_PROTOCOL_SMBFS: SMBFSVolumeDriver(),
|
||||
constants.STORAGE_PROTOCOL_ISCSI: ISCSIVolumeDriver(),
|
||||
constants.STORAGE_PROTOCOL_FC: FCVolumeDriver()}
|
||||
constants.STORAGE_PROTOCOL_FC: FCVolumeDriver(),
|
||||
constants.STORAGE_PROTOCOL_RBD: RBDVolumeDriver()}
|
||||
|
||||
def _get_volume_driver(self, connection_info):
|
||||
driver_type = connection_info.get('driver_volume_type')
|
||||
|
@ -369,3 +370,9 @@ class SMBFSVolumeDriver(BaseVolumeDriver):
|
|||
class FCVolumeDriver(BaseVolumeDriver):
|
||||
_is_block_dev = True
|
||||
_protocol = constants.STORAGE_PROTOCOL_FC
|
||||
|
||||
|
||||
class RBDVolumeDriver(BaseVolumeDriver):
|
||||
_is_block_dev = True
|
||||
_protocol = constants.STORAGE_PROTOCOL_RBD
|
||||
_extra_connector_args = dict(do_local_attach=True)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
features:
|
||||
- |
|
||||
The Hyper-V driver can now attach Cinder RBD volumes. The minimum
|
||||
requirements are Ceph 16 (Pacific) and Windows Server 2016.
|
|
@ -55,7 +55,7 @@ os-brick>=4.2.0 # Apache-2.0
|
|||
os-resource-classes>=0.4.0 # Apache-2.0
|
||||
os-traits>=2.5.0 # Apache-2.0
|
||||
os-vif>=1.14.0 # Apache-2.0
|
||||
os-win>=5.1.0 # Apache-2.0
|
||||
os-win>=5.4.0 # Apache-2.0
|
||||
castellan>=0.16.0 # Apache-2.0
|
||||
microversion-parse>=0.2.1 # Apache-2.0
|
||||
os-xenapi>=0.3.4 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue