Merge "libvirt: remove volume_drivers config param"
This commit is contained in:
commit
ad329b0d44
@ -574,16 +574,16 @@ class LibvirtConnTestCase(test.NoDBTestCase):
|
|||||||
return FakeVirtDomain()
|
return FakeVirtDomain()
|
||||||
|
|
||||||
# Creating mocks
|
# Creating mocks
|
||||||
volume_driver = ('iscsi=nova.tests.unit.virt.libvirt.test_driver'
|
volume_driver = ['iscsi=nova.tests.unit.virt.libvirt.test_driver'
|
||||||
'.FakeVolumeDriver')
|
'.FakeVolumeDriver']
|
||||||
self.flags(volume_drivers=[volume_driver],
|
|
||||||
group='libvirt')
|
|
||||||
fake = FakeLibvirtDriver()
|
fake = FakeLibvirtDriver()
|
||||||
# Customizing above fake if necessary
|
# Customizing above fake if necessary
|
||||||
for key, val in kwargs.items():
|
for key, val in kwargs.items():
|
||||||
fake.__setattr__(key, val)
|
fake.__setattr__(key, val)
|
||||||
|
|
||||||
self.stubs.Set(libvirt_driver.LibvirtDriver, '_conn', fake)
|
self.stubs.Set(libvirt_driver.LibvirtDriver, '_conn', fake)
|
||||||
|
self.stubs.Set(libvirt_driver.LibvirtDriver, '_get_volume_drivers',
|
||||||
|
lambda x: volume_driver)
|
||||||
self.stubs.Set(host.Host, 'get_connection', lambda x: fake)
|
self.stubs.Set(host.Host, 'get_connection', lambda x: fake)
|
||||||
|
|
||||||
def fake_lookup(self, instance_name):
|
def fake_lookup(self, instance_name):
|
||||||
|
@ -161,31 +161,6 @@ libvirt_opts = [
|
|||||||
help='Snapshot image format (valid options are : '
|
help='Snapshot image format (valid options are : '
|
||||||
'raw, qcow2, vmdk, vdi). '
|
'raw, qcow2, vmdk, vdi). '
|
||||||
'Defaults to same as source image'),
|
'Defaults to same as source image'),
|
||||||
cfg.ListOpt('volume_drivers',
|
|
||||||
default=[
|
|
||||||
'iscsi=nova.virt.libvirt.volume.LibvirtISCSIVolumeDriver',
|
|
||||||
'iser=nova.virt.libvirt.volume.LibvirtISERVolumeDriver',
|
|
||||||
'local=nova.virt.libvirt.volume.LibvirtVolumeDriver',
|
|
||||||
'fake=nova.virt.libvirt.volume.LibvirtFakeVolumeDriver',
|
|
||||||
'rbd=nova.virt.libvirt.volume.LibvirtNetVolumeDriver',
|
|
||||||
'sheepdog=nova.virt.libvirt.volume.LibvirtNetVolumeDriver',
|
|
||||||
'nfs=nova.virt.libvirt.volume.LibvirtNFSVolumeDriver',
|
|
||||||
'smbfs=nova.virt.libvirt.volume.LibvirtSMBFSVolumeDriver',
|
|
||||||
'aoe=nova.virt.libvirt.volume.LibvirtAOEVolumeDriver',
|
|
||||||
'glusterfs='
|
|
||||||
'nova.virt.libvirt.volume.LibvirtGlusterfsVolumeDriver',
|
|
||||||
'fibre_channel=nova.virt.libvirt.volume.'
|
|
||||||
'LibvirtFibreChannelVolumeDriver',
|
|
||||||
'scality='
|
|
||||||
'nova.virt.libvirt.volume.LibvirtScalityVolumeDriver',
|
|
||||||
'gpfs='
|
|
||||||
'nova.virt.libvirt.volume.LibvirtGPFSVolumeDriver',
|
|
||||||
'quobyte='
|
|
||||||
'nova.virt.libvirt.volume.LibvirtQuobyteVolumeDriver',
|
|
||||||
],
|
|
||||||
help='DEPRECATED. Libvirt handlers for remote volumes. '
|
|
||||||
'This option is deprecated and will be removed in the '
|
|
||||||
'Kilo release.'),
|
|
||||||
cfg.StrOpt('disk_prefix',
|
cfg.StrOpt('disk_prefix',
|
||||||
help='Override the default disk prefix for the devices attached'
|
help='Override the default disk prefix for the devices attached'
|
||||||
' to a server, which is dependent on virt_type. '
|
' to a server, which is dependent on virt_type. '
|
||||||
@ -294,6 +269,23 @@ CONSOLE = "console=tty0 console=ttyS0"
|
|||||||
GuestNumaConfig = collections.namedtuple(
|
GuestNumaConfig = collections.namedtuple(
|
||||||
'GuestNumaConfig', ['cpuset', 'cputune', 'numaconfig', 'numatune'])
|
'GuestNumaConfig', ['cpuset', 'cputune', 'numaconfig', 'numatune'])
|
||||||
|
|
||||||
|
libvirt_volume_drivers = [
|
||||||
|
'iscsi=nova.virt.libvirt.volume.LibvirtISCSIVolumeDriver',
|
||||||
|
'iser=nova.virt.libvirt.volume.LibvirtISERVolumeDriver',
|
||||||
|
'local=nova.virt.libvirt.volume.LibvirtVolumeDriver',
|
||||||
|
'fake=nova.virt.libvirt.volume.LibvirtFakeVolumeDriver',
|
||||||
|
'rbd=nova.virt.libvirt.volume.LibvirtNetVolumeDriver',
|
||||||
|
'sheepdog=nova.virt.libvirt.volume.LibvirtNetVolumeDriver',
|
||||||
|
'nfs=nova.virt.libvirt.volume.LibvirtNFSVolumeDriver',
|
||||||
|
'smbfs=nova.virt.libvirt.volume.LibvirtSMBFSVolumeDriver',
|
||||||
|
'aoe=nova.virt.libvirt.volume.LibvirtAOEVolumeDriver',
|
||||||
|
'glusterfs=nova.virt.libvirt.volume.LibvirtGlusterfsVolumeDriver',
|
||||||
|
'fibre_channel=nova.virt.libvirt.volume.LibvirtFibreChannelVolumeDriver',
|
||||||
|
'scality=nova.virt.libvirt.volume.LibvirtScalityVolumeDriver',
|
||||||
|
'gpfs=nova.virt.libvirt.volume.LibvirtGPFSVolumeDriver',
|
||||||
|
'quobyte=nova.virt.libvirt.volume.LibvirtQuobyteVolumeDriver',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
def patch_tpool_proxy():
|
def patch_tpool_proxy():
|
||||||
"""eventlet.tpool.Proxy doesn't work with old-style class in __str__()
|
"""eventlet.tpool.Proxy doesn't work with old-style class in __str__()
|
||||||
@ -416,7 +408,7 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||||||
self.vif_driver = libvirt_vif.LibvirtGenericVIFDriver()
|
self.vif_driver = libvirt_vif.LibvirtGenericVIFDriver()
|
||||||
|
|
||||||
self.volume_drivers = driver.driver_dict_from_config(
|
self.volume_drivers = driver.driver_dict_from_config(
|
||||||
CONF.libvirt.volume_drivers, self)
|
self._get_volume_drivers(), self)
|
||||||
|
|
||||||
self._disk_cachemode = None
|
self._disk_cachemode = None
|
||||||
self.image_cache_manager = imagecache.ImageCacheManager()
|
self.image_cache_manager = imagecache.ImageCacheManager()
|
||||||
@ -472,6 +464,9 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||||||
'expect': ', '.join("'%s'" % k for k in
|
'expect': ', '.join("'%s'" % k for k in
|
||||||
sysinfo_serial_funcs.keys())})
|
sysinfo_serial_funcs.keys())})
|
||||||
|
|
||||||
|
def _get_volume_drivers(self):
|
||||||
|
return libvirt_volume_drivers
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def disk_cachemode(self):
|
def disk_cachemode(self):
|
||||||
if self._disk_cachemode is None:
|
if self._disk_cachemode is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user