# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1227753198 28800
# Node ID 266b282b2cdef8ebd88602672067eb9fbff51782
# Parent 8807a94aa58a411d8596e717674c91c937881247
[TEST] #2 Set InstanceID of InputRASD to work for all virt types in rasd_init_list()
Updates from 1 to 2:
Add a condition for XenPV - it's mouse:xen.
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 8807a94aa58a -r 266b282b2cde suites/libvirt-cim/lib/XenKvmLib/rasd.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Mon Nov 24 22:08:51 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Nov 26 18:33:18 2008 -0800
@@ -67,7 +67,12 @@
disk_path = vsxml.xml_get_disk_source()
if virt == 'LXC':
disk_path = '/tmp/lxc_files'
-
+ if virt == 'LXC' or virt == 'XenFV':
+ point_device = "%s/%s" %(t_dom, "mouse:xen")
+ if virt == 'XenPV':
+ point_device = "%s/%s" %(t_dom, "mouse:usb")
+ else:
+ point_device = "%s/%s" %(t_dom, "mouse:ps2")
rasd_values = {
proc_cn : {
"InstanceID" : '%s/%s' %(t_dom,
"proc"),
@@ -94,7 +99,7 @@
"InstanceID" : "%s/%s" %(t_dom,
"graphics")
},
pd_cn : {
- "InstanceID" : "%s/%s" %(t_dom,
"mouse:ps2")
+ "InstanceID" : point_device
}
}
except Exception, details: