[Libvirt-cim] [PATCH] [TEST] #3 Fix HostSystem/03_hs_to_settdefcap.py with appropriate number of RASD objects for different platforms

yunguol at cn.ibm.com yunguol at cn.ibm.com
Tue Feb 10 03:41:06 UTC 2009


# HG changeset patch
# User Guolian Yun <yunguol at cn.ibm.com>
# Date 1234237259 28800
# Node ID 83ff45f2d027900a60f8a81bb515558de217f54c
# Parent  263e285881acde9b99849cd133399298219c9d65
[TEST] #3 Fix HostSystem/03_hs_to_settdefcap.py with appropriate number of RASD objects for different platforms

Updates form 2 to 3:
Simplify the if statements

Updates from 1 to 2:
Add two branches of returned RASD objects number:
1) The valule to be 8 for Xen when rev >= 707 and rev < 805
2) The value to be 16 for Xen when rev >= 805
3) The value to be 8 for KVM when rev >= 805


Tested for KVM/Xen/LXC with current sources, KVM with F9 rpm.

Signed-off-by: Guolian Yun<yunguol at cn.ibm.com>

diff -r 263e285881ac -r 83ff45f2d027 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py
--- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py	Fri Feb 06 01:54:39 2009 -0800
+++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py	Mon Feb 09 19:40:59 2009 -0800
@@ -56,6 +56,7 @@
 test_dom = "domgst_test"
 test_vcpus = 1
 libvirt_rasd_template_changes = 707
+libvirt_rasd_new_changes = 805
 
 def setup_env(server, virt="Xen"):
     status = PASS
@@ -214,12 +215,20 @@
                                      InstanceID = ap['InstanceID'])
 
             curr_cim_rev, changeset = get_provider_version(virt, server)
-            if 'DiskPool' in ap['InstanceID'] and virt =='Xen' and \
-                curr_cim_rev >= libvirt_rasd_template_changes:
+            if 'DiskPool' in ap['InstanceID']:
+                if virt =='Xen' and \
+                curr_cim_rev >= libvirt_rasd_template_changes and \
+                curr_cim_rev < libvirt_rasd_new_changes:
                 # For Diskpool, we have info 1 for each of Min, Max, 
                 # default, Increment and 1 for each of PV and FV 
                 # hence 4 * 2 = 8 records
-                exp_len = 8
+                    exp_len = 8
+                if virt == 'Xen' and \
+                curr_cim_rev >= libvirt_rasd_new_changes:
+                    exp_len = 16
+                if virt == 'KVM' and \
+                curr_cim_rev >= libvirt_rasd_new_changes:
+                    exp_len = 8
             else:
                 exp_len = 4 
 




More information about the Libvirt-cim mailing list