# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1212844304 -28800
# Node ID a59fe03154cb7dcafd34cdd4f26e2b653a027f41
# Parent fee941e683a399cb96994f863026ec3837841934
[TEST] Update VSSD.04 for LXC support
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r fee941e683a3 -r a59fe03154cb suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py
--- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Thu Jun 05 09:51:04 2008 +0800
+++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Sat Jun 07 21:11:44 2008 +0800
@@ -55,7 +55,7 @@
verify_diskrasd_values, verify_memrasd_values
from XenKvmLib.const import CIM_REV
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "VSSDC_dom"
test_vcpus = 1
@@ -64,13 +64,21 @@
proc_rev = 531
mem_rev = 529
-def setup_env():
+def setup_env(virt):
vsxml_info = None
virt_xml = get_class(virt)
- vsxml_info = virt_xml(test_dom, mem=test_mem, vcpus = test_vcpus,
- mac = test_mac, disk = test_disk)
+ if virt == 'LXC':
+ vsxml_info = virt_xml(test_dom)
+ else:
+ vsxml_info = virt_xml(test_dom, mem=test_mem, vcpus = test_vcpus,
+ mac = test_mac, disk = test_disk)
+ try:
+ bridge = vsxml_info.set_vbridge(server)
+ except Exception, details:
+ logger.error("Exception : %s", details)
+ return FAIL, vsxml_info
+
try:
- bridge = vsxml_info.set_vbridge(server)
ret = vsxml_info.define(server)
if not ret:
logger.error("Failed to Define the domain: %s", test_dom)
@@ -177,7 +185,10 @@
assoc_cname = get_typed_class(virt, 'VirtualSystemSettingDataComponent')
try:
vssdc_assoc_info = assoc.Associators(server, assoc_cname, qcn, virt, InstanceID =
instIdval)
- if len(vssdc_assoc_info) < 4:
+ if len(vssdc_assoc_info) == 1 and \
+ vssdc_assoc_info[0].classname ==
'LXC_MemResourceAllocationSettingData':
+ logger.info("%s returned expect objects" % assoc_cname)
+ elif len(vssdc_assoc_info) < 4:
logger.error("%s returned %i %s objects, expected 4" %
(assoc_cname, len(vssdc_assoc_info), qcn))
status = FAIL
@@ -223,7 +234,7 @@
else:
test_disk = "hda"
- status, vsxml = setup_env()
+ status, vsxml = setup_env(virt)
if status != PASS:
return status
Show replies by date