# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1247531298 25200
# Node ID 5443392e87298a0d1a94eee50485e20fb815a5be
# Parent c72a55c4533250a84ae5bcd25cab08a083f2e8d5
[TEST] Fix rasd_init_list() - XenFV guests with newer vesions of libvirt...
Use ps2 input devices, not usb. Set ps2 as the default, otherwise, the guest
could end up with both ps2 and usb devices, which breaks some of the tests.
This is because the test is only expecting one input device, but libvirt adds
an additional ps2 device (in the case usb is specified).
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r c72a55c45332 -r 5443392e8729
suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py
--- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Mon Jul 13 16:12:22
2009 -0700
+++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Mon Jul 13 17:28:18
2009 -0700
@@ -149,7 +149,8 @@
status, rasd_values, in_list = rasd_init_list(vsxml, virt,
test_disk, test_dom,
- test_mac, test_mem)
+ test_mac, test_mem,
+ server)
if status != PASS:
return status
diff -r c72a55c45332 -r 5443392e8729 suites/libvirt-cim/cimtest/RASD/02_enum.py
--- a/suites/libvirt-cim/cimtest/RASD/02_enum.py Mon Jul 13 16:12:22 2009 -0700
+++ b/suites/libvirt-cim/cimtest/RASD/02_enum.py Mon Jul 13 17:28:18 2009 -0700
@@ -147,7 +147,7 @@
status, rasd_values_list, in_list = rasd_init_list(vsxml, virt, test_disk,
test_dom, test_mac,
- test_mem)
+ test_mem, server)
if status != PASS:
return status
diff -r c72a55c45332 -r 5443392e8729 suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py
--- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Mon Jul 13 16:12:22 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Mon Jul 13 17:28:18 2009 -0700
@@ -165,10 +165,10 @@
status = FAIL
return status, vssdc_assoc_info
-def verify_rasd_values(rasd_values_info):
+def verify_rasd_values(rasd_values_info, server):
status, rasd_values_list, in_list = rasd_init_list(vsxml, virt, test_disk,
test_dom, test_mac,
- test_mem)
+ test_mem, server)
if status != PASS:
return status
@@ -229,12 +229,12 @@
if status != PASS or len(vssd_values) == 0:
return status
- status, rasd_values = get_rasd_values_from_vssdc_assoc(vssd_values)
+ status, rasd_values = get_rasd_values_from_vssdc_assoc(vssd_values)
if status != PASS or len(rasd_values) == 0:
vsxml.undefine(server)
return status
- status = verify_rasd_values(rasd_values)
+ status = verify_rasd_values(rasd_values, server)
try:
vsxml.undefine(server)
except Exception, detail:
diff -r c72a55c45332 -r 5443392e8729 suites/libvirt-cim/lib/XenKvmLib/rasd.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Mon Jul 13 16:12:22 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Mon Jul 13 17:28:18 2009 -0700
@@ -47,7 +47,7 @@
dccn = 'DisplayController'
pdcn = 'PointingDevice'
-def rasd_init_list(vsxml, virt, t_disk, t_dom, t_mac, t_mem):
+def rasd_init_list(vsxml, virt, t_disk, t_dom, t_mac, t_mem, server):
"""
Creating the lists that will be used for comparisons.
"""
@@ -72,7 +72,9 @@
if virt == 'LXC':
disk_path = '/tmp/lxc_files'
- if virt == 'LXC' or virt == 'XenFV':
+ libvirt_version = virsh_version(server, virt)
+
+ if virt == 'LXC' or (virt == 'XenFV' and libvirt_version <
"0.6.3"):
point_device = "%s/%s" %(t_dom, "mouse:usb")
elif virt == 'Xen':
point_device = "%s/%s" %(t_dom, "mouse:xen")
diff -r c72a55c45332 -r 5443392e8729 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jul 13 16:12:22 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jul 13 17:28:18 2009 -0700
@@ -916,7 +916,7 @@
net_name=const.default_network_name,
emu_type=None, grstype="vnc",
address="127.0.0.1", port_num='-1',
keymap="en-us",
- irstype="mouse", btype="usb"):
+ irstype="mouse", btype="ps2"):
if not os.path.exists(disk_file_path):
logger.error('Error: Disk image does not exist')
sys.exit(1)