[Kimchi-devel] [PATCH 3/3] Add disks to LVM pool: mockmodel changes
Daniel Barboza
danielhb at linux.vnet.ibm.com
Fri Feb 7 12:53:13 UTC 2014
From: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb at 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
More information about the Kimchi-devel
mailing list