# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212842935 -28800
# Node ID 4972af55a4c0086235375b02b97114803752baaa
# Parent fee941e683a399cb96994f863026ec3837841934
[TEST] Update RASD.02 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r fee941e683a3 -r 4972af55a4c0 suites/libvirt-cim/cimtest/RASD/02_enum.py
--- a/suites/libvirt-cim/cimtest/RASD/02_enum.py Thu Jun 05 09:51:04 2008 +0800
+++ b/suites/libvirt-cim/cimtest/RASD/02_enum.py Sat Jun 07 20:48:55 2008 +0800
@@ -38,7 +38,7 @@
from CimTest.Globals import logger
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "VSSDC_dom"
test_vcpus = 1
@@ -154,10 +154,20 @@
else:
test_disk = "hda"
virtxml = get_class(virt)
- vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus,
+ if virt == 'LXC':
+ vsxml = virtxml(test_dom)
+ class_list = [get_typed_class(virt, rasd.masd_cn)]
+ else:
+ vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus,
mac = test_mac, disk = test_disk)
+ vsxml.set_vbridge(server)
+ class_list = [ get_typed_class(virt, rasd.dasd_cn),
+ get_typed_class(virt, rasd.masd_cn),
+ get_typed_class(virt, rasd.pasd_cn),
+ get_typed_class(virt, rasd.nasd_cn)
+ ]
+
try:
- vsxml.set_vbridge(server)
ret = vsxml.define(server)
if not ret:
logger.error("Failed to Define the domain: %s", test_dom)
@@ -165,11 +175,7 @@
except Exception, details:
logger.error("Exception : %s", details)
return FAIL
- class_list = [ get_typed_class(virt, rasd.dasd_cn),
- get_typed_class(virt, rasd.masd_cn),
- get_typed_class(virt, rasd.pasd_cn),
- get_typed_class(virt, rasd.nasd_cn)
- ]
+
status = PASS
procrasd, netrasd, diskrasd, memrasd = init_list(virt)
diff -r fee941e683a3 -r 4972af55a4c0 suites/libvirt-cim/lib/XenKvmLib/enumclass.py
--- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Jun 05 09:51:04 2008 +0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Sat Jun 07 20:48:55 2008 +0800
@@ -233,6 +233,9 @@
class KVM_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData):
pass
+class LXC_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData):
+ pass
+
class Xen_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData):
pass
Show replies by date