diff options
author | Cole Robinson <crobinso@redhat.com> | 2018-08-31 15:20:50 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2018-08-31 16:50:46 -0400 |
commit | 2b41e130d8f90e85784bd8e29288b07789801d67 (patch) | |
tree | 8f29dff12fc14e3b4407afcc6e7cc17f8d49bc8a /virtinst/connection.py | |
parent | 83a9e613e9fa7d7c7d9ac9b227a8a535618cadb3 (diff) | |
download | virt-manager-2b41e130d8f90e85784bd8e29288b07789801d67.tar.gz |
connection: rename fetch_all_guests->fetch_all_domains
The virtinst class is erroneously called Guest, but these
functions are dealing with libvirt <domain> XML, so rename them
Diffstat (limited to 'virtinst/connection.py')
-rw-r--r-- | virtinst/connection.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/virtinst/connection.py b/virtinst/connection.py index b09dfe52..d707322d 100644 --- a/virtinst/connection.py +++ b/virtinst/connection.py @@ -64,7 +64,7 @@ class VirtinstConnection(object): # These let virt-manager register a callback which provides its # own cached object lists, rather than doing fresh calls - self.cb_fetch_all_guests = None + self.cb_fetch_all_domains = None self.cb_fetch_all_pools = None self.cb_fetch_all_vols = None self.cb_fetch_all_nodedevs = None @@ -156,27 +156,27 @@ class VirtinstConnection(object): # Polling routines # #################### - _FETCH_KEY_GUESTS = "vms" + _FETCH_KEY_DOMAINS = "vms" _FETCH_KEY_POOLS = "pools" _FETCH_KEY_VOLS = "vols" _FETCH_KEY_NODEDEVS = "nodedevs" - def _fetch_all_guests_raw(self): + def _fetch_all_domains_raw(self): ignore, ignore, ret = pollhelpers.fetch_vms( self, {}, lambda obj, ignore: obj) return [Guest(weakref.ref(self), parsexml=obj.XMLDesc(0)) for obj in ret] - def fetch_all_guests(self): + def fetch_all_domains(self): """ Returns a list of Guest() objects """ - if self.cb_fetch_all_guests: - return self.cb_fetch_all_guests() # pylint: disable=not-callable + if self.cb_fetch_all_domains: + return self.cb_fetch_all_domains() # pylint: disable=not-callable - key = self._FETCH_KEY_GUESTS + key = self._FETCH_KEY_DOMAINS if key not in self._fetch_cache: - self._fetch_cache[key] = self._fetch_all_guests_raw() + self._fetch_cache[key] = self._fetch_all_domains_raw() return self._fetch_cache[key][:] def _build_pool_raw(self, poolobj): |