
# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1213240048 -28800 # Node ID 4e6f7c50a5b403b88d0d2a8b1cb83d92b4873532 # Parent b9100cec9aedb9f9243d753111a9a856e9480335 [TEST] 2# VirtualSystemSettingDataComponent.02&03 for LXC support, perfect conditional case for prefix Signed-off-by: Guolian Yun <yunguol@cn.ibm.com> diff -r b9100cec9aed -r 4e6f7c50a5b4 suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Wed Jun 11 03:38:49 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Thu Jun 12 11:07:28 2008 +0800 @@ -57,7 +57,7 @@ from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.const import CIM_REV -sup_types = ['Xen', 'XenFV', 'KVM'] +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "VSSDC_dom" test_vcpus = 1 @@ -143,17 +143,20 @@ else: test_disk = "hdb" virt_xml = vxml.get_class(options.virt) - cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk) + if options.virt == 'LXC': + cxml = virt_xml(test_dom) + else: + cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk) ret = cxml.create(options.ip) if not ret: logger.error("Failed to create the dom: %s", test_dom) status = FAIL return status - if options.virt == "Xen" or options.virt == "XenFV": + if options.virt == "XenFV": instIdval = "Xen:%s" % test_dom else: - instIdval = "KVM:%s" % test_dom + instIdval = "%s:%s" % (options.virt, test_dom) try: assoc_info = assoc.AssociatorNames(options.ip, diff -r b9100cec9aed -r 4e6f7c50a5b4 suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Wed Jun 11 03:38:49 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Thu Jun 12 11:07:28 2008 +0800 @@ -64,7 +64,7 @@ from CimTest.Globals import CIM_USER, CIM_PASS, CIM_NS from XenKvmLib.const import CIM_REV -sup_types = ['Xen', 'XenFV', 'KVM'] +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "domu1" test_mac = "00:11:22:33:44:aa" @@ -115,7 +115,10 @@ test_disk = "hda" virt_xml = vxml.get_class(options.virt) - cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk) + if options.virt == 'LXC': + cxml = virt_xml(test_dom) + else: + cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk) ret = cxml.create(options.ip) if not ret: logger.error('Unable to create domain %s' % test_dom)