[PATCH] [TEST]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 1233813279 28800 # Node ID 722d799284c3e5777c9ea4abd692e4cb36d9d233 # Parent edfa908a60d058c7f1ba7394bd1d818999802287 [TEST]Fix HostSystem/03_hs_to_settdefcap.py with appropriate number of RASD objects for different platforms Update the number of returned RASD objects to 16 for Xen, 8 for KVM Tested for KVM/Xen/LXC with current sources, KVM with F9 rpm. Signed-off-by: Guolian Yun<yunguol@cn.ibm.com> diff -r edfa908a60d0 -r 722d799284c3 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Feb 03 09:37:05 2009 -0800 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Feb 04 21:54:39 2009 -0800 @@ -219,6 +219,9 @@ # 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 = 16 + elif 'DiskPool' in ap['InstanceID'] and virt == 'KVM' and \ + curr_cim_rev >= libvirt_rasd_template_changes: exp_len = 8 else: exp_len = 4

diff -r edfa908a60d0 -r 722d799284c3 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Feb 03 09:37:05 2009 -0800 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Feb 04 21:54:39 2009 -0800 @@ -219,6 +219,9 @@ # 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 = 16 + elif 'DiskPool' in ap['InstanceID'] and virt == 'KVM' and \ + curr_cim_rev >= libvirt_rasd_template_changes: exp_len = 8
These changes were made in rev 805. So using libvirt_rasd_template_changes won't work here. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

Kaitlin Rupert wrote:
diff -r edfa908a60d0 -r 722d799284c3 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Feb 03 09:37:05 2009 -0800 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Feb 04 21:54:39 2009 -0800 @@ -219,6 +219,9 @@ # 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 = 16
You need 2 branches here - The value needs to be 8 for: rev >= 707 and rev < 805 It needs to be 16 if rev >= 805.
+ elif 'DiskPool' in ap['InstanceID'] and virt == 'KVM' and \ + curr_cim_rev >= libvirt_rasd_template_changes: exp_len = 8
These changes were made in rev 805. So using libvirt_rasd_template_changes won't work here.
-- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

libvirt-cim-bounces@redhat.com wrote on 2009-02-06 07:26:15:
Kaitlin Rupert wrote:
diff -r edfa908a60d0 -r 722d799284c3 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Feb 03 09:37:05 2009 -0800 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Feb 04 21:54:39 2009 -0800 @@ -219,6 +219,9 @@ # 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 = 16
You need 2 branches here - The value needs to be 8 for: rev >= 707 and rev < 805
It needs to be 16 if rev >= 805.
+ elif 'DiskPool' in ap['InstanceID'] and virt == 'KVM' and \ + curr_cim_rev >= libvirt_rasd_template_changes: exp_len = 8
These changes were made in rev 805. So using libvirt_rasd_template_changes won't work here.
I fixed it on #2 patch as follows: 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
-- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
participants (3)
-
Guo Lian Yun
-
Kaitlin Rupert
-
yunguol@cn.ibm.com