From c96c4df3e6f3934a9238ca9cd0d3797d28bdf80c Mon Sep 17 00:00:00 2001 From: Boris Filippov Date: Wed, 26 Sep 2012 02:53:33 +0400 Subject: Create util for root device path retrieval blueprint snapshots-for-everyone Create libvirt.utils.find_disk(virt_dom) function. This function will retrieve disk path from instance configuration. Will return path both for file and device backed instance root devices. Will throw error in case, when device can't be found. Change-Id: I612a19221c6ff78079ab53a8d77295c555514c77 --- nova/tests/fake_libvirt_utils.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nova/tests') diff --git a/nova/tests/fake_libvirt_utils.py b/nova/tests/fake_libvirt_utils.py index 510774939..378515ac0 100644 --- a/nova/tests/fake_libvirt_utils.py +++ b/nova/tests/fake_libvirt_utils.py @@ -98,6 +98,10 @@ def file_open(path, mode=None): return File(path, mode) +def find_disk(virt_dom): + return "some/path" + + def load_file(path): if os.path.exists(path): with open(path, 'r') as fp: -- cgit