[Kimchi-devel] [PATCH 3/3] Add disks to LVM pool: mockmodel changes

Aline Manera alinefm at linux.vnet.ibm.com
Mon Feb 10 14:51:06 UTC 2014


On 02/07/2014 10:53 AM, Daniel Barboza wrote:
> 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

What about the 'disks' for logical pool?

>           return ident
>
>       def storagepool_activate(self, name):




More information about the Kimchi-devel mailing list