Move libvirt NFS volume driver impl into volume.py

For inexplicable reasons the NFS volume driver was put into a
different file than all the other libvirt volume driver impls.
The NFS code isn't so large & complex that it needs to be in
a different place than everything else. Move the code into
the main volume.py file.

To avoid breaking existing deployments, the original class
has to be a trivial subclass of the new module. Any use of it
will trigger a deprecation warning. This allows time for users
to update their 'libvirt_volume_drivers' config (in the unlikely
event they have altered from the default setting).

Change-Id: I26d957e4ee33938b45dc1cad0fe32a2968520a4a
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2013-01-25 13:15:09 +00:00
parent a4e5b256a2
commit 5882dc2884

View File

@@ -61,7 +61,6 @@ from nova.virt.libvirt import firewall
from nova.virt.libvirt import imagebackend
from nova.virt.libvirt import utils as libvirt_utils
from nova.virt.libvirt import volume
from nova.virt.libvirt import volume_nfs
try:
@@ -412,7 +411,7 @@ class LibvirtVolumeTestCase(test.TestCase):
mnt_base = '/mnt'
self.flags(nfs_mount_point_base=mnt_base)
libvirt_driver = volume_nfs.NfsVolumeDriver(self.fake_conn)
libvirt_driver = volume.LibvirtNFSVolumeDriver(self.fake_conn)
export_string = '192.168.1.1:/nfs/share1'
name = 'volume-00001'
export_mnt_base = os.path.join(mnt_base,