[Kimchi-devel] [PATCH] [Kimchi 1/2] Bug fix #1091: Allow to set disk performance options per guest and template

Aline Manera alinefm at linux.vnet.ibm.com
Tue Mar 7 14:42:27 UTC 2017


Please, update docs and API.json.

Is there a set o bus values to avoid user mistakes?

On 03/03/2017 05:33 PM, Ramon Medeiros wrote:
> Allow vmstorage creation passing disk bus
>
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
>   model/vmstorages.py | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/model/vmstorages.py b/model/vmstorages.py
> index 143225c..b123b50 100644
> --- a/model/vmstorages.py
> +++ b/model/vmstorages.py
> @@ -91,7 +91,9 @@ class VMStoragesModel(object):
>                   raise InvalidParameter("KCHVMSTOR0019E")
>
>           dom = VMModel.get_vm(vm_name, self.conn)
> -        params['bus'] = _get_device_bus(params['type'], dom)
> +
> +        if params.get('bus') == None:
> +            params['bus'] = _get_device_bus(params['type'], dom)
>
>           if is_s390x() and params['type'] == 'disk' and 'dir_path' in params:
>               if 'format' not in params:



More information about the Kimchi-devel mailing list