Reviewed-by: Daniel Barboza <danielhb(a)linux.vnet.ibm.com>
On 12/04/2014 03:13 PM, 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(a)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: