# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1228877098 28800
# Node ID 98a6a8ba06b7a4fb1e6357b71af5bfb2016a0ba9
# Parent 0881bfe3b0ef3b4021c4047962fbe90e2cda2311
[TEST] #2 Update SettingDefine/01_forward.py to support Graphics/Input
Updates from 1 to 2:
Just add new items to the list instead of redefine
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 0881bfe3b0ef -r 98a6a8ba06b7
suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Tue Dec 09 00:01:38 2008
-0800
+++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Tue Dec 09 18:44:58 2008
-0800
@@ -33,10 +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"
@@ -74,13 +75,23 @@
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['PointingDevice'] = input_device
+ cn_id['DisplayController'] = 'graphics'
+
ret = cxml.create(options.ip)
if not ret:
Globals.logger.error("Failed to Create the dom: %s", test_dom)
Show replies by date