[PATCH] [TEST] 2# Update ResourcePool.01&02 for LXC support, ignore storage pool

# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1212630664 -28800 # Node ID 531569acf45a5ec8df3164507832dccbc6487d48 # Parent 959719c32cc9d5a60fe3d6474e3fcc09f2e44875 [TEST] 2# Update ResourcePool.01&02 for LXC support, ignore storage pool Signed-off-by: Guolian Yun <yunguol@cn.ibm.com> diff -r 959719c32cc9 -r 531569acf45a suites/libvirt-cim/cimtest/ResourcePool/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Wed Jun 04 17:30:22 2008 +0800 +++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Thu Jun 05 09:51:04 2008 +0800 @@ -39,7 +39,7 @@ from XenKvmLib.common_util import cleanup_restore, test_dpath, \ create_diskpool_file -sup_types = ['Xen', 'KVM'] +sup_types = ['Xen', 'KVM', 'LXC'] diskid = "%s/%s" % ("DiskPool", test_dpath) dp_cn = 'DiskPool' @@ -126,13 +126,14 @@ logger.error(Globals.CIM_ERROR_ENUMERATE % pp_cn) return FAIL status = verify_fields(pool_list, propool, get_typed_class(virt, pp_cn)) - - try: - diskpool = enumerate(ip, dp_cn, key_list, virt) - except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % dp_cn) - return FAIL - status = verify_fields(pool_list, diskpool, get_typed_class(virt, dp_cn)) + + if virt != 'LXC': + try: + diskpool = enumerate(ip, dp_cn, key_list, virt) + except Exception: + logger.error(Globals.CIM_ERROR_ENUMERATE % dp_cn) + return FAIL + status = verify_fields(pool_list, diskpool, get_typed_class(virt, dp_cn)) try: netpool = enumerate(ip, np_cn, key_list, virt) diff -r 959719c32cc9 -r 531569acf45a suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py --- a/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Wed Jun 04 17:30:22 2008 +0800 +++ b/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Thu Jun 05 09:51:04 2008 +0800 @@ -40,7 +40,7 @@ from XenKvmLib.common_util import cleanup_restore, test_dpath, \ create_diskpool_file -sup_types = ['Xen', 'KVM'] +sup_types = ['Xen', 'KVM', 'LXC'] expr_values = { "invalid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, @@ -113,12 +113,19 @@ return SKIP netid = "%s/%s" % ("NetworkPool", test_network) - cn_instid_list = { - get_typed_class(virt, "DiskPool") : "DiskPool/foo", - get_typed_class(virt, "MemoryPool") : "MemoryPool/0", - get_typed_class(virt, "NetworkPool") : netid, - get_typed_class(virt, "ProcessorPool") : "ProcessorPool/0" - } + if virt == 'LXC': + cn_instid_list = { + get_typed_class(virt, "MemoryPool") : "MemoryPool/0", + get_typed_class(virt, "NetworkPool") : netid, + get_typed_class(virt, "ProcessorPool") : "ProcessorPool/0" + } + else: + cn_instid_list = { + get_typed_class(virt, "DiskPool") : "DiskPool/foo", + get_typed_class(virt, "MemoryPool") : "MemoryPool/0", + get_typed_class(virt, "NetworkPool") : netid, + get_typed_class(virt, "ProcessorPool") : "ProcessorPool/0" + } for cn, instid in cn_instid_list.items(): ret_value = err_invalid_instid_keyname(conn, cn, instid)
participants (1)
-
yunguol@cn.ibm.com