Kaitlin Rupert <kaitlin@linux.vnet.ibm.com>
Sent by: libvirt-cim-bounces@redhat.com
12/11/2009 05:17 PM
Please respond to
List for discussion and development of libvirt CIM <libvirt-cim@redhat.com>
To
libvirt-cim@redhat.com
cc
Subject
[Libvirt-cim] [PATCH] [TEST] Get the proper default net template RASD
# HG changeset patch
# User Kaitlin Rupert <karupert@us.ibm.com>
# Date 1260576721 28800
# Node ID 7635e4deb3516ffe938ee597bd5e771cd7fae491
# Parent 4c73bb18cd2d6144debd06135ad8de6e569f6747
[TEST] Get the proper default net template RASD
The test caes assume "network" for the default interface type. Depending on
how the templates are returned, SettingsDefineCapabilities might return a
"bridge" or "user" type interface. This fix adds some additional filtering
to get the proper template.
for id in ac_id_list:
@@ -260,7 +262,10 @@
return []
for rasd in rasd_list:
- if rasd['InstanceID'] == "Default":
+ if rasd['InstanceID'] == "Default":
+ if rasd.classname.find(net_cn) > 0 and \
+ rasd['NetworkType'] != default_net_type:
+ continue
templates.append(rasd)