From 513fc8380ec66bccc0572c09b18b38ef3f203739 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 20 Jul 2012 12:07:14 +0100 Subject: [PATCH] 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 --- nova/tests/fake_imagebackend.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nova/tests/fake_imagebackend.py b/nova/tests/fake_imagebackend.py index 8707ad65..55e59f75 100644 --- a/nova/tests/fake_imagebackend.py +++ b/nova/tests/fake_imagebackend.py @@ -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