# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1213188967 -28800
# Node ID 8bf3a489f215999dd76e31730ea6725fb95678b7
# Parent ca8841f47805d5d2a23069220563713412d6a7bd
[TEST] Update SettingsDefineCapabilities.01 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r ca8841f47805 -r 8bf3a489f215
suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Fri Jun 06
02:05:34 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Jun 11
20:56:07 2008 +0800
@@ -67,6 +67,8 @@
from XenKvmLib.common_util import print_field_error
from XenKvmLib.const import CIM_REV
+platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC']
+
memid = "%s/%s" % ("MemoryPool", 0)
procid = "%s/%s" % ("ProcessorPool", 0)
libvirtcim_sdc_rasd_rev = 571
@@ -93,24 +95,29 @@
Creating the lists that will be used for comparisons.
"""
- instlist = [
- dpool.InstanceID,
- mpool.InstanceID,
- npool.InstanceID,
- ppool.InstanceID
- ]
- cllist = [
- get_typed_class(virt, "DiskResourceAllocationSettingData"),
- get_typed_class(virt, "MemResourceAllocationSettingData"),
- get_typed_class(virt, "NetResourceAllocationSettingData"),
- get_typed_class(virt, "ProcResourceAllocationSettingData")
- ]
- rtype = {
- get_typed_class(virt, "DiskResourceAllocationSettingData") : 17,
- get_typed_class(virt, "MemResourceAllocationSettingData") : 4,
- get_typed_class(virt, "NetResourceAllocationSettingData") : 10,
- get_typed_class(virt, "ProcResourceAllocationSettingData") : 3
- }
+ if virt == 'LXC':
+ instlist = [ mpool.InstanceID ]
+ cllist = [ get_typed_class(virt, "MemResourceAllocationSettingData") ]
+ rtype = { get_typed_class(virt, "MemResourceAllocationSettingData") :
4 }
+ else:
+ instlist = [
+ dpool.InstanceID,
+ mpool.InstanceID,
+ npool.InstanceID,
+ ppool.InstanceID
+ ]
+ cllist = [
+ get_typed_class(virt, "DiskResourceAllocationSettingData"),
+ get_typed_class(virt, "MemResourceAllocationSettingData"),
+ get_typed_class(virt, "NetResourceAllocationSettingData"),
+ get_typed_class(virt, "ProcResourceAllocationSettingData")
+ ]
+ rtype = {
+ get_typed_class(virt, "DiskResourceAllocationSettingData") :
17,
+ get_typed_class(virt, "MemResourceAllocationSettingData") :
4,
+ get_typed_class(virt, "NetResourceAllocationSettingData") :
10,
+ get_typed_class(virt, "ProcResourceAllocationSettingData") :
3
+ }
rangelist = {
"Default" : 0,
"Minimum" : 1,