9dab6bfcb9
530f80f5-handle-missing-storage-volumes.patch 5310bd89-console-fix-unsetting-resize-guest.patch 5310e3ac-set-show_arrow-to-true.patch 5310e3ac-vmmConsolePages-toggle-visibilities-on-page-change.patch 5310e3ac-vmmDetails-toggle-visibilities-on-page-change.patch 5310e52d-fix-setting-default-window-size.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=147
35 lines
1.5 KiB
Diff
35 lines
1.5 KiB
Diff
Subject: vmm connection: Handle missing storage volumes (bz 1070883)
|
|
From: Cole Robinson crobinso@redhat.com Thu Feb 27 13:16:21 2014 -0500
|
|
Date: Thu Feb 27 13:16:21 2014 -0500:
|
|
Git: f67df117017e6de855a8c0e900e47fe920dfaa48
|
|
|
|
Similar to what was done in a808bd669293ac66047a716b2e84a5a64c99667b
|
|
for the virtinst connection wrapper.
|
|
|
|
diff --git a/virtManager/connection.py b/virtManager/connection.py
|
|
index 6f6c838..96dfa1c 100644
|
|
--- a/virtManager/connection.py
|
|
+++ b/virtManager/connection.py
|
|
@@ -172,10 +172,17 @@ class vmmConnection(vmmGObject):
|
|
self._backend.cb_fetch_all_pools = (
|
|
lambda: [obj.get_xmlobj(refresh_if_nec=False)
|
|
for obj in self.pools.values()])
|
|
- self._backend.cb_fetch_all_vols = (
|
|
- lambda: [obj.get_xmlobj(refresh_if_nec=False)
|
|
- for pool in self.pools.values()
|
|
- for obj in pool.get_volumes(refresh=False).values()])
|
|
+
|
|
+ def fetch_all_vols():
|
|
+ ret = []
|
|
+ for pool in self.pools.values():
|
|
+ for vol in pool.get_volumes(refresh=False).values():
|
|
+ try:
|
|
+ ret.append(vol.get_xmlobj(refresh_if_nec=False))
|
|
+ except libvirt.libvirtError, e:
|
|
+ logging.debug("Fetching volume XML failed: %s", e)
|
|
+ return ret
|
|
+ self._backend.cb_fetch_all_vols = fetch_all_vols
|
|
|
|
def clear_cache(pools=False):
|
|
if not pools:
|