Move more libvirt disk setup into the imagebackend module
Move the setup of target bus and target dev out of the libvirt driver and into the imagebackend module to reduce code duplication Change-Id: I6796c125af769236f93341361ee07c8319817f7f Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -37,10 +37,13 @@ class Backend(object):
|
||||
def cache(self, fn, fname, size=None, *args, **kwargs):
|
||||
pass
|
||||
|
||||
def libvirt_info(self, device_type, cache_mode):
|
||||
def libvirt_info(self, disk_bus, disk_dev,
|
||||
device_type, cache_mode):
|
||||
info = config.LibvirtConfigGuestDisk()
|
||||
info.source_type = 'file'
|
||||
info.source_device = device_type
|
||||
info.target_bus = disk_bus
|
||||
info.target_dev = disk_dev
|
||||
info.driver_cache = cache_mode
|
||||
info.driver_format = 'raw'
|
||||
info.source_path = self.path
|
||||
|
||||
Reference in New Issue
Block a user