# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1228813500 28800
# Node ID 160f9aff58daa3e77b737bb29c3de3a4175f5a3c
# Parent b12c6c2772b7b5540f06d32cdaa9c99a8bf4fb9d
[TEST] Update VSSDComponent [01_forward.py] to verify GRASD and InputRASD
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b12c6c2772b7 -r 160f9aff58da
suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Sun Dec
07 23:50:29 2008 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Tue Dec
09 01:05:00 2008 -0800
@@ -59,16 +59,17 @@
from XenKvmLib import vxml
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger
-from XenKvmLib.const import do_main
+from XenKvmLib.const import do_main, get_provider_version
from CimTest.ReturnCodes import FAIL, PASS
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
+input_graphics_pool_rev = 757
test_dom = "VSSDC_dom"
test_vcpus = 2
test_mac = "00:11:22:33:44:aa"
-def init_list(test_disk, test_mac, virt='Xen'):
+def init_list(test_disk, test_mac, server, virt='Xen'):
"""
Creating the lists that will be used for comparisons.
"""
@@ -84,6 +85,29 @@
rlist[2] : "%s/%s" % (test_dom, test_mac),
rlist[3] : "%s/%s" % (test_dom, "proc")
}
+
+ if virt == 'LXC' or virt == 'XenFV':
+ input_device = "%s/%s" %(test_dom, "mouse:usb")
+ elif virt == 'Xen':
+ input_device = "%s/%s" %(test_dom, "mouse:xen")
+ else:
+ input_device = "%s/%s" %(test_dom, "mouse:ps2")
+
+ curr_cim_rev, changeset = get_provider_version(virt, server)
+ if curr_cim_rev >= input_graphics_pool_rev:
+ input = get_typed_class(virt,'InputResourceAllocationSettingData')
+ graphics = get_typed_class(virt,'GraphicsResourceAllocationSettingData')
+ rlist.append(input)
+ rlist.append(graphics)
+ prop_list = {rlist[0] : "%s/%s" % (test_dom, test_disk),
+ rlist[1] : "%s/%s" % (test_dom, "mem"),
+ rlist[2] : "%s/%s" % (test_dom, test_mac),
+ rlist[3] : "%s/%s" % (test_dom, "proc"),
+ rlist[4] : "%s" % input_device,
+ rlist[5] : "%s/%s" % (test_dom, "graphics")
+ }
+
+
if virt == 'LXC':
prop_list = {rlist[1] : "%s/%s" % (test_dom, "mem")}
@@ -124,7 +148,7 @@
else:
test_disk = "hdb"
- prop_list = init_list(test_disk, test_mac, options.virt)
+ prop_list = init_list(test_disk, test_mac, options.ip, options.virt)
virt_xml = vxml.get_class(options.virt)
if options.virt == 'LXC':
cxml = virt_xml(test_dom)