[PATCH] bug fix: Fix shallow scan broken after model refactoring

From: Aline Manera <alinefm@br.ibm.com> The shallow scan is always return an empty array as it is trying to access the pool name as a libvirt pool object. Fix it to restore shallow scan functionality. Signed-off-by: Aline Manera <alinefm@br.ibm.com> --- src/kimchi/model/storagevolumes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/kimchi/model/storagevolumes.py b/src/kimchi/model/storagevolumes.py index 7ff570b..8440a76 100644 --- a/src/kimchi/model/storagevolumes.py +++ b/src/kimchi/model/storagevolumes.py @@ -160,8 +160,9 @@ class IsoVolumesModel(object): pools = conn.listStoragePools() pools += conn.listDefinedStoragePools() - for pool in pools: + for pool_name in pools: try: + pool = StoragePoolModel.get_storagepool(pool_name, self.conn) pool.refresh(0) volumes = pool.listVolumes() except InvalidOperation: @@ -169,7 +170,7 @@ class IsoVolumesModel(object): continue for volume in volumes: - res = self.storagevolume.lookup(pool, volume) + res = self.storagevolume.lookup(pool_name, volume) if res['format'] == 'iso': res['name'] = '%s' % volume iso_volumes.append(res) -- 1.7.10.4

Reviewed-by: Crístian Viana <vianac@linux.vnet.ibm.com> Am 03-02-2014 16:24, schrieb Aline Manera:
From: Aline Manera <alinefm@br.ibm.com>
The shallow scan is always return an empty array as it is trying to access the pool name as a libvirt pool object. Fix it to restore shallow scan functionality.
Signed-off-by: Aline Manera <alinefm@br.ibm.com>
participants (2)
-
Aline Manera
-
Crístian Viana