
# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1212547749 -28800 # Node ID 62a1d45d71d9329f29bd17961f7fdd44256b9bc3 # Parent 9b2e8889d7937c66e73968e53ec31bf93f535224 [TEST] 2# Update SystemDevice.01~03 for LXC support, ignore the vcpu tag in define a container guest Signed-off-by: Guolian Yun <yunguol@cn.ibm.com> diff -r 9b2e8889d793 -r 62a1d45d71d9 suites/libvirt-cim/cimtest/SystemDevice/01_forward.py --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Tue Jun 03 13:13:39 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Wed Jun 04 10:49:09 2008 +0800 @@ -33,7 +33,7 @@ from CimTest.Globals import logger, do_main from CimTest.ReturnCodes import PASS, FAIL -sup_types = ['Xen', 'KVM', 'XenFV'] +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "test_domain" test_mac = "00:11:22:33:44:55" @@ -50,7 +50,10 @@ status = PASS virt_xml = vxml.get_class(options.virt) - cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, disk = test_disk) + if options.virt == 'LXC': + cxml = virt_xml(test_dom) + else: + cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, disk = test_disk) ret = cxml.create(options.ip) if not ret: logger.error('Unable to create domain %s' % test_dom) diff -r 9b2e8889d793 -r 62a1d45d71d9 suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py --- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Tue Jun 03 13:13:39 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Wed Jun 04 10:49:09 2008 +0800 @@ -33,7 +33,7 @@ from CimTest.Globals import logger, do_main from CimTest.ReturnCodes import PASS, FAIL -sup_types = ['Xen', 'KVM', 'XenFV'] +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "test_domain" test_mac = "00:11:22:33:44:55" @@ -44,10 +44,14 @@ status = FAIL virt_xml = vxml.get_class(options.virt) - cxml = virt_xml(test_dom, mac=test_mac) + if options.virt == 'LXC': + cxml = virt_xml(test_dom) + devlist = ["Memory"] + else: + cxml = virt_xml(test_dom, mac=test_mac) + devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor" ] cxml.create(options.ip) - devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor" ] key_list = ["DeviceID", "CreationClassName", "SystemName", "SystemCreationClassName"] diff -r 9b2e8889d793 -r 62a1d45d71d9 suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py --- a/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Tue Jun 03 13:13:39 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Wed Jun 04 10:49:09 2008 +0800 @@ -40,7 +40,7 @@ from CimTest import Globals from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -sup_types = ['Xen', 'KVM', 'XenFV'] +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "virt1" test_mac = "00:11:22:33:44:55" @@ -64,15 +64,19 @@ status = PASS virt_xml = vxml.get_class(options.virt) - cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, - disk = test_disk) + if options.virt == 'LXC': + cxml = virt_xml(test_dom) + devlist = ["Memory"] + else: + cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, + disk = test_disk) + devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor" ] ret = cxml.create(options.ip) if not ret : logger.info("error while 'create' of VS") return FAIL - devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor" ] # Building the dict for avoiding the correct key:val pairs # while verifying with the Invalid values for the association