# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1227506439 28800
# Node ID 3f4b7b3e1e0b013fa3dee488d0d6070a04c19e45
# Parent c349be6661452da17725d63a69aee17f5da9a80d
[TEST] Update rasd.py and fix VSSD/04_vssd_to_rasd.py
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r c349be666145 -r 3f4b7b3e1e0b suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py
--- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Wed Nov 19 22:42:13 2008 -0800
+++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Sun Nov 23 22:00:39 2008 -0800
@@ -54,7 +54,7 @@
from XenKvmLib import rasd
from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \
verify_diskrasd_values, verify_memrasd_values, verify_displayrasd_values, \
-rasd_init_list
+rasd_init_list, verify_inputrasd_values
from XenKvmLib.const import default_network_name
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -176,6 +176,7 @@
diskrasd = rasd_values_list['%s' %in_list['disk']]
memrasd = rasd_values_list['%s' %in_list['mem']]
displayrasd = rasd_values_list['%s' %in_list['display']]
+ inputrasd = rasd_values_list['%s' %in_list['point']]
try:
for rasd_instance in rasd_values_info:
@@ -190,6 +191,8 @@
status = verify_memrasd_values(rasd_instance, memrasd)
elif 'GraphicsResourceAllocationSettingData' in CCName :
status = verify_displayrasd_values(rasd_instance, displayrasd)
+ elif 'InputResourceAllocationSettingData' in CCName:
+ status = verify_inputrasd_values(rasd_instance, inputrasd)
else:
status = FAIL
if status != PASS:
diff -r c349be666145 -r 3f4b7b3e1e0b suites/libvirt-cim/lib/XenKvmLib/rasd.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Nov 19 22:42:13 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Sun Nov 23 22:00:39 2008 -0800
@@ -35,11 +35,13 @@
dasd_cn = 'DiskResourceAllocationSettingData'
masd_cn = 'MemResourceAllocationSettingData'
dcrasd_cn = 'GraphicsResourceAllocationSettingData'
+irasd_cn = 'InputResourceAllocationSettingData'
proccn = 'Processor'
memcn = 'Memory'
netcn = 'NetworkPort'
diskcn = 'LogicalDisk'
dccn = 'DisplayController'
+pdcn = 'PointingDevice'
def rasd_init_list(vsxml, virt, t_disk, t_dom, t_mac, t_mem):
"""
@@ -51,12 +53,14 @@
net_cn = get_typed_class(virt, netcn)
disk_cn = get_typed_class(virt, diskcn)
dc_cn = get_typed_class(virt, dccn)
+ pd_cn = get_typed_class(virt, pdcn)
in_list = { 'proc' : proc_cn,
'mem' : mem_cn,
'net' : net_cn,
'disk' : disk_cn,
- 'display' : dc_cn
+ 'display' : dc_cn,
+ 'point' : pd_cn
}
try:
@@ -88,6 +92,9 @@
},
dc_cn : {
"InstanceID" : "%s/%s" %(t_dom,
"graphics")
+ },
+ pd_cn : {
+ "InstanceID" : "%s/%s" %(t_dom,
"mouse:ps2")
}
}
except Exception, details:
@@ -120,6 +127,15 @@
status = PASS
if assoc_info['InstanceID'] != displayrasd_list['InstanceID']:
InstId_err(assoc_info, displayrasd_list)
+ status = FAIL
+ return status
+
+def verify_inputrasd_values(assoc_info, inputrasd_list):
+ status = PASS
+ logger.info('a %s p is %s' %(assoc_info['InstanceID'],
inputrasd_list['InstanceID']))
+ if assoc_info['InstanceID'] != inputrasd_list['InstanceID']:
+ logger.info('a % p is %s' %(assoc_info['InstanceID'],
inputrasd_list['InstanceID']))
+ InstId_err(assoc_info, inputrasd_list)
status = FAIL
return status