# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1228891942 28800
# Node ID 7b947ebadbf4c362f4bc8433d2a7acfbfd89a62e
# Parent 0881bfe3b0ef3b4021c4047962fbe90e2cda2311
[TEST]Verify enum of DiskRASD to have EmulatedType=0 for Disk
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 0881bfe3b0ef -r 7b947ebadbf4 suites/libvirt-cim/lib/XenKvmLib/rasd.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Tue Dec 09 00:01:38 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Tue Dec 09 22:52:22 2008 -0800
@@ -83,6 +83,7 @@
"InstanceID" : '%s/%s' %(t_dom,
t_disk),
"ResourceType" : 17,
"Address" : disk_path,
+ "EmulatedType" : 0,
},
net_cn : {
"InstanceID" : '%s/%s' %(t_dom,
t_mac),
@@ -176,6 +177,11 @@
if assoc_info['ResourceType'] != diskrasd_list['ResourceType']:
RType_err(assoc_info, diskrasd_list)
status = FAIL
+ if assoc_info['EmulatedType'] != diskrasd_list['EmulatedType']:
+ logger.error("%s Mismatch", 'EmulatedType')
+ logger.error("Returned %s instead of %s ",
+ assoc_info['EmulatedType'],
diskrasd_list['EmulatedType'])
+ status = FAIL
if assoc_info['Address'] != diskrasd_list['Address']:
logger.error("%s Mismatch", 'Address')
logger.error("Returned %s instead of %s ",