[Kimchi-devel] [PATCH] issue #491: Check model parameter exists when generating the interface XML
Royce Lv
lvroyce at linux.vnet.ibm.com
Fri Dec 5 10:29:01 UTC 2014
testcase?
On 2014年12月05日 01:13, Aline Manera wrote:
> When interface model is not explicitly set on interface XML, libvirt
> automaticaly sets the default value.
>
> Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
> ---
> src/kimchi/xmlutils/interface.py | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/kimchi/xmlutils/interface.py b/src/kimchi/xmlutils/interface.py
> index c76131a..7b79584 100644
> --- a/src/kimchi/xmlutils/interface.py
> +++ b/src/kimchi/xmlutils/interface.py
> @@ -32,7 +32,9 @@ def get_iface_xml(params, arch=None, os_distro=None, os_version=None):
> """
> interface = E.interface(type=params['type'])
> interface.append(E.source(network=params['network']))
> - interface.append(E.model(type=params['model']))
> +
> + if 'model' in params.keys():
> + interface.append(E.model(type=params['model']))
>
> mac = params.get('mac', None)
> if mac is not None:
More information about the Kimchi-devel
mailing list