From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
---
src/kimchi/mockmodel.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/kimchi/mockmodel.py b/src/kimchi/mockmodel.py
index 4e276eb..5303bda 100644
--- a/src/kimchi/mockmodel.py
+++ b/src/kimchi/mockmodel.py
@@ -316,12 +316,12 @@ class MockModel(object):
return storagepool.info
def storagepool_update(self, name, params):
- autostart = params['autostart']
- if autostart not in [True, False]:
- raise InvalidOperation("Autostart flag must be true or false")
- storagepool = self._get_storagepool(name)
- storagepool.info['autostart'] = autostart
- ident = storagepool.name
+ pool = self._get_storagepool(name)
+ if 'autostart' in params:
+ if params['autostart'] not in [True, False]:
+ raise InvalidOperation("Autostart flag must be true or false")
+ pool.info['autostart'] = params['autostart']
+ ident = pool.name
return ident
def storagepool_activate(self, name):
--
1.8.3.1