[PATCH] [TEST] Update ResourceAllocationFromPool.01~04 for LXC support

# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1212128528 -28800 # Node ID 7d2ce92ea89eedd84ad92ece773edcf175162d27 # Parent 3ac66cf562f082546883c1de0d748471b557cd39 [TEST] Update ResourceAllocationFromPool.01~04 for LXC support Signed-off-by: Guolian Yun <yunguol@cn.ibm.com> diff -r 3ac66cf562f0 -r 7d2ce92ea89e suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri May 30 00:24:45 2008 +0800 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri May 30 14:22:08 2008 +0800 @@ -31,7 +31,7 @@ from CimTest.Globals import logger, do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL -sup_types = ['Xen', 'XenFV', 'KVM'] +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @do_main(sup_types) def main(): diff -r 3ac66cf562f0 -r 7d2ce92ea89e suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri May 30 00:24:45 2008 +0800 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri May 30 14:22:08 2008 +0800 @@ -31,7 +31,7 @@ from CimTest.Globals import logger, do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL -sup_types = ['Xen', 'XenFV', 'KVM'] +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @do_main(sup_types) def main(): diff -r 3ac66cf562f0 -r 7d2ce92ea89e suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Fri May 30 00:24:45 2008 +0800 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Fri May 30 14:22:08 2008 +0800 @@ -30,7 +30,7 @@ from CimTest.ReturnCodes import PASS, FAIL, XFAIL from XenKvmLib.const import CIM_REV -sup_types = ['Xen', 'XenFV', 'KVM'] +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] rev = 466 diff -r 3ac66cf562f0 -r 7d2ce92ea89e suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py Fri May 30 00:24:45 2008 +0800 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py Fri May 30 14:22:08 2008 +0800 @@ -29,7 +29,7 @@ from CimTest.Globals import logger, do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL -sup_types = ['Xen', 'XenFV', 'KVM'] +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] exp_rc = 6 #CIM_ERR_NOT_FOUND exp_desc = "No such instance" diff -r 3ac66cf562f0 -r 7d2ce92ea89e suites/libvirt-cim/lib/XenKvmLib/devices.py --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Fri May 30 00:24:45 2008 +0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Fri May 30 14:22:08 2008 +0800 @@ -87,10 +87,16 @@ class KVM_Memory(CIM_Memory): pass +class LXC_Memory(CIM_Memory): + pass + class Xen_Processor(CIM_Processor): pass class KVM_Processor(CIM_Processor): + pass + +class LXC_Processor(CIM_Processor): pass def get_class(classname):

[TEST] Update ResourceAllocationFromPool.01~04 for LXC support
diff -r 3ac66cf562f0 -r 7d2ce92ea89e suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri May 30 00:24:45 2008 +0800 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri May 30 14:22:08 2008 +0800 @@ -31,7 +31,7 @@ from CimTest.Globals import logger, do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL
-sup_types = ['Xen', 'XenFV', 'KVM'] +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
@do_main(sup_types) def main(): diff -r 3ac66cf562f0 -r 7d2ce92ea89e suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri May 30 00:24:45 2008 +0800 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri May 30 14:22:08 2008 +0800 @@ -31,7 +31,7 @@ from CimTest.Globals import logger, do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL
-sup_types = ['Xen', 'XenFV', 'KVM'] +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
@do_main(sup_types) def main():
Containers currently only really support memory and disk, so we need to make sure these only verify those two pools. These tests don't currently support network and disk, but Deepti is working on adding that support. Also, this test case passes, but it really shouldn't since there's no processor device returned from the container. I think the issue is here (this is from ResourceAllocationFromPool/01_forward.py) for j in range(len(procdata)): if procdata[j].classname != get_typed_class(options.virt, "ProcResourceAllocationSettingData"): logger.error("ERROR: Association result error") status = FAIL We need this test to instead, verify that the ProcResourceAllocationSettingData instance returned from the HRP association matches the one we expect for the guest. This test isn't creating a guest though, and it really should be. So, instead of adding LXC support to the test, I would fix these two test cases first so that they do the following: 1) Also support network and disk 2) Create a guest, and then verify the RASDs of the guest match the expected pools (and vice versa). But check with Deepti, because I know that she is working on this already (see the "Fixing 02_reverse.py of RAPF" patch). -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
participants (2)
-
Kaitlin Rupert
-
yunguol@cn.ibm.com