[Kimchi-devel] [PATCH] issue #447: Use required parameter in function "refresh"
Crístian Viana
vianac at linux.vnet.ibm.com
Mon Sep 22 12:53:19 UTC 2014
The function "refresh" (storage pool) has a required parameter in
older versions of libvirt. On newer versions, however, this parameter
is optional and it was causing an error on RHEL because it uses an old
version of libvirt.
Always use the parameter in function "refresh" with its default
value (0).
Signed-off-by: Crístian Viana <vianac at linux.vnet.ibm.com>
---
src/kimchi/model/storagevolumes.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/kimchi/model/storagevolumes.py b/src/kimchi/model/storagevolumes.py
index 237173d..f9f226f 100644
--- a/src/kimchi/model/storagevolumes.py
+++ b/src/kimchi/model/storagevolumes.py
@@ -132,8 +132,7 @@ class StorageVolumesModel(object):
'err': e.message})
# Refresh to make sure volume can be found in following lookup
- pool = StoragePoolModel.get_storagepool(pool_name, self.conn)
- pool.refresh()
+ StoragePoolModel.get_storagepool(pool_name, self.conn).refresh(0)
cb('OK', True)
def _create_volume_with_capacity(self, cb, params):
@@ -209,7 +208,7 @@ class StorageVolumesModel(object):
'pool': pool_name,
'err': e.message})
- StoragePoolModel.get_storagepool(pool_name, self.conn).refresh()
+ StoragePoolModel.get_storagepool(pool_name, self.conn).refresh(0)
cb('OK', True)
def get_list(self, pool_name):
--
1.9.3
More information about the Kimchi-devel
mailing list