From 0bf6124a280dbff9c31ac8e88ecea7e42fd0dc14 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 10 Nov 2015 17:40:04 -0500 Subject: [PATCH] storage: Fix updating UI when volume deleted (bz 1279940) We in fact weren't updating the cached XML when pool.refresh() was called. --- virtManager/storagepool.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/virtManager/storagepool.py b/virtManager/storagepool.py index 45a571d75..b099fbed8 100644 --- a/virtManager/storagepool.py +++ b/virtManager/storagepool.py @@ -146,7 +146,7 @@ class vmmStoragePool(vmmLibvirtObject): def _init_libvirt_state(self): self.tick() - self.refresh(skip_xml_refresh=True) + self.refresh(_do_refresh_xml=False) for vol in self.get_volumes(): vol.init_libvirt_state() @@ -173,16 +173,16 @@ class vmmStoragePool(vmmLibvirtObject): self._backend.undefine() self._backend = None - def refresh(self, skip_xml_refresh=False): + def refresh(self, _do_refresh_xml=True): """ - :param skip_xml_refresh: Only used by init_libvirt_state to avoid - double XML updating + :param _do_refresh_xml: We want this by default. It's only skipped + to avoid double updating XML via init_libvirt_state """ if not self.is_active(): return self._backend.refresh(0) - if skip_xml_refresh: + if _do_refresh_xml: self.ensure_latest_xml() self._update_volumes(force=True) self.idle_emit("refreshed")