Remove img_handlers config parameter usage
Now that the only disk code requiring host filesystem mounts is the LXC filesystem setup, the img_handlers config parameter is an solution looking for a purpose. For any disk image format we can categorically say whether it should be mounted using loop or qemu-nbd mount impls. There is no desire to use libguestfs FUSE for mounting LXC disk images, since users of LXC do not want a huge KVM process alongside every container! Move the mount class choice logic into the mount API, by creating new methods nova.virt.disk.mount.API.instance_for_format() nova.virt.disk.mount.API.instance_for_device() and then call these from nova.virt.disk.API code blueprint: virt-disk-api-refactoring Change-Id: I088b5debdf62d4a9a6b4521eee68cd4757f2ff42 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -107,7 +107,6 @@ class TestVirtDisk(test.TestCase):
|
||||
'/mnt/loop/part': '/dev/mapper/loop0p1',
|
||||
'/mnt/nbd/nopart': '/dev/nbd15',
|
||||
'/mnt/nbd/part': '/dev/mapper/nbd15p1',
|
||||
'/mnt/guestfs': 'guestmount',
|
||||
}
|
||||
return mount_points[mount_point]
|
||||
|
||||
@@ -141,11 +140,4 @@ class TestVirtDisk(test.TestCase):
|
||||
('qemu-nbd', '-d', '/dev/nbd15'),
|
||||
]
|
||||
|
||||
disk_api.destroy_container('/mnt/guestfs')
|
||||
expected_commands += [
|
||||
('fusermount', '-u', '/mnt/guestfs'),
|
||||
]
|
||||
# It's not worth trying to match the last timeout command
|
||||
self.executes.pop()
|
||||
|
||||
self.assertEqual(self.executes, expected_commands)
|
||||
|
||||
Reference in New Issue
Block a user