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

# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1233910246 28800 # Node ID fb2454096e6662ae955d703c958947659c34256f # Parent 3fc2b8a203339c6a59b5f0e2a159e3e0a802ea6d [TEST] #2 Fix HostSystem/03_hs_to_settdefcap.py with appropriate number of RASD objects for different platforms 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@cn.ibm.com> diff -r 3fc2b8a20333 -r fb2454096e66 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Thu Feb 05 01:19:43 2009 -0800 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Feb 06 00:50:46 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 @@ -215,10 +216,17 @@ 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: + 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 + elif 'DiskPool' in ap['InstanceID'] and virt == 'Xen' and \ + curr_cim_rev >= libvirt_rasd_new_changes: + exp_len = 16 + elif 'DiskPool' in ap['InstanceID'] and virt == 'KVM' and \ + curr_cim_rev >= libvirt_rasd_new_changes: exp_len = 8 else: exp_len = 4

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: + 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 + elif 'DiskPool' in ap['InstanceID'] and virt == 'Xen' and \ + curr_cim_rev >= libvirt_rasd_new_changes: + exp_len = 16 + elif 'DiskPool' in ap['InstanceID'] and virt == 'KVM' and \ + curr_cim_rev >= libvirt_rasd_new_changes: exp_len = 8 else: exp_len = 4
Also this can be simplified to: if 'DiskPool' in ap['InstanceID']: if virt =='Xen' and curr_cim_rev >= libvirt_rasd_new_changes: (etc) -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Kaitlin Rupert
-
yunguol@cn.ibm.com