# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1211886844 25200
# Node ID 6a273db93afc6cd02702eb090251854ad74a7ff2
# Parent ec679dca161f99a00dfae18dd360f17611d4a1ba
[TEST] Fixing the tc which failed bcs of the vxml.py and const.py changes for KVM.
This patch needs the changes made to KVMXML to make use network as the deafult net_type.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r ec679dca161f -r 6a273db93afc
suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py
--- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue May 27 03:25:54
2008 -0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue May 27 04:14:04
2008 -0700
@@ -58,7 +58,7 @@ from CimTest.ReturnCodes import PASS, FA
from CimTest.ReturnCodes import PASS, FAIL
from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \
verify_diskrasd_values, verify_memrasd_values
-from XenKvmLib.const import CIM_REV
+from XenKvmLib.const import CIM_REV, KVM_default_net_type
sup_types = ['Xen', 'KVM', 'XenFV']
@@ -103,11 +103,14 @@ def init_list(vsxml, virt="Xen"):
"VirtualQuantity" : (test_mem *
1024),
}
}
+ if virt == 'KVM':
+ rasd_values[net_cn]['ntype2'] = KVM_default_net_type
+
if CIM_REV < rev:
- rasd_values[mem_cn]['AllocationUnits'] = "MegaBytes"
+ rasd_values[mem_cn]['AllocationUnits'] = "MegaBytes"
if CIM_REV < proc_instid_rev:
- rasd_values[proc_cn]['InstanceID'] = '%s/%s' %(test_dom, 0)
+ rasd_values[proc_cn]['InstanceID'] = '%s/%s' %(test_dom, 0)
return rasd_values
diff -r ec679dca161f -r 6a273db93afc suites/libvirt-cim/cimtest/NetworkPort/01_netport.py
--- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Tue May 27 03:25:54 2008 -0700
+++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Tue May 27 04:14:04 2008 -0700
@@ -39,11 +39,13 @@ from CimTest.Globals import logger
from CimTest.Globals import logger
from CimTest.Globals import do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
+from XenKvmLib import const
sup_types = ['Xen', 'KVM', 'XenFV']
test_dom = "test_domain"
test_mac = "00:11:22:33:44:55"
+const.KVM_default_net_type='bridge'
@do_main(sup_types)
def main():
diff -r ec679dca161f -r 6a273db93afc
suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py
--- a/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Tue May 27 03:25:54 2008
-0700
+++ b/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Tue May 27 04:14:04 2008
-0700
@@ -54,7 +54,7 @@ from XenKvmLib import vxml
from XenKvmLib import vxml
from XenKvmLib.classes import get_typed_class
from XenKvmLib import rasd
-from XenKvmLib.const import CIM_REV
+from XenKvmLib.const import CIM_REV, KVM_default_net_type
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
@@ -81,6 +81,9 @@ def init_list(xml, disk, virt="Xen"):
"ntype1" : "bridge",
"ntype2" : "ethernet",
"CreationClassName" : get_typed_class(virt, rasd.nasd_cn)}
+ if virt == 'KVM':
+ netrasd['ntype2'] = KVM_default_net_type
+
address = xml.xml_get_disk_source()
diskrasd = {
"InstanceID" : '%s/%s' % (test_dom, disk),
diff -r ec679dca161f -r 6a273db93afc
suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Tue May 27
03:25:54 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Tue May 27
04:14:04 2008 -0700
@@ -55,10 +55,12 @@ from CimTest.Globals import do_main, pla
from CimTest.Globals import do_main, platform_sup
from XenKvmLib.vxml import get_class
from XenKvmLib.classes import get_typed_class
+from XenKvmLib import const
test_dom = "RAPF_domain"
test_mac = "00:11:22:33:44:aa"
test_vcpus = 1
+const.KVM_default_net_type='bridge'
def get_unique_bridge():
bridge = "invalid-bridge"