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
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user