# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1228812554 28800
# Node ID 2ebfddfd4020e8d5e6b54f0bd56788ebc21d8c1a
# Parent b12c6c2772b7b5540f06d32cdaa9c99a8bf4fb9d
[TEST] Update SettingDefine/01_forward.py to support Graphics/Input
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b12c6c2772b7 -r 2ebfddfd4020
suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Sun Dec 07 23:50:29 2008
-0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Tue Dec 09 00:49:14 2008
-0800
@@ -33,11 +33,11 @@
from XenKvmLib.enumclass import GetInstance
from XenKvmLib.classes import get_typed_class
from CimTest import Globals
-from XenKvmLib.const import do_main
+from XenKvmLib.const import do_main, get_provider_version
from CimTest.ReturnCodes import PASS, FAIL
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
-
+input_graphics_pool_rev = 757
test_dom = "domu1"
test_mac = "00:11:22:33:44:aa"
test_vcpus = 1
@@ -74,11 +74,29 @@
else:
cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac,
disk = test_disk)
+ if options.virt == 'LXC' or options.virt == 'XenFV':
+ input_device = "mouse:usb"
+ elif options.virt == 'Xen':
+ input_device = "mouse:xen"
+ else:
+ input_device = "mouse:ps2"
+
cn_id = {
'LogicalDisk' : test_disk,
'Memory' : 'mem',
'NetworkPort' : test_mac,
'Processor' : test_vcpus -1 }
+
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev >= input_graphics_pool_rev:
+ cn_id = {
+ 'LogicalDisk' : test_disk,
+ 'Memory' : 'mem',
+ 'NetworkPort' : test_mac,
+ 'Processor' : test_vcpus -1,
+ 'PointingDevice' : input_device,
+ 'DisplayController' : 'graphics'
+ }
ret = cxml.create(options.ip)