virtinst: connection: Only poll volumes for running pools

This commit is contained in:
Cole Robinson 2014-12-04 19:25:15 -05:00
parent a75aa47daf
commit c7d00baf66

View File

@ -236,6 +236,9 @@ class VirtualConnection(object):
ret = []
for xmlobj in self.fetch_all_pools():
pool = self._libvirtconn.storagePoolLookupByName(xmlobj.name)
if pool.info()[0] != libvirt.VIR_STORAGE_POOL_RUNNING:
continue
ignore, ignore, vols = pollhelpers.fetch_volumes(
self, pool, {}, lambda obj, ignore: obj)