[Kimchi-devel] [PATCH] issue #491: Check model parameter exists when generating the interface XML

Aline Manera alinefm at linux.vnet.ibm.com
Fri Dec 5 12:03:39 UTC 2014


On 12/05/2014 08:29 AM, Royce Lv wrote:
> testcase?

Yeap! Well remembered!
I will add it and send V2.

> 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