# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1211270175 25200
# Node ID 4fc59e7a047e9b662979c6bcd7267f1201663280
# Parent b2b2bb6cc8d87ba0eeddcf3d361d3085104d3492
[TEST] changed ComputerSystem.03 tc for LXC support as an example
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b2b2bb6cc8d8 -r 4fc59e7a047e
suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Mon May 19 10:43:33 2008
-0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Tue May 20 00:56:15 2008
-0700
@@ -30,12 +30,14 @@ from XenKvmLib import computersystem
from XenKvmLib import computersystem
from XenKvmLib import vxml
from XenKvmLib.classes import get_typed_class
+from XenKvmLib.const import LXC_init_path
from VirtLib import utils
+from XenKvmLib.common_util import create_lxc_file
from CimTest import Globals
from CimTest.Globals import do_main
from CimTest.ReturnCodes import PASS, FAIL
-sup_types = ['Xen', 'KVM', 'XenFV']
+sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "domU1"
@do_main(sup_types)
@@ -43,6 +45,7 @@ def main():
options = main.options
status = FAIL
+ create_lxc_file(LXC_init_path)
cxml = vxml.get_class(options.virt)(test_dom)
rc = cxml.define(options.ip)
if not rc:
diff -r b2b2bb6cc8d8 -r 4fc59e7a047e suites/libvirt-cim/lib/XenKvmLib/computersystem.py
--- a/suites/libvirt-cim/lib/XenKvmLib/computersystem.py Mon May 19 10:43:33 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/computersystem.py Tue May 20 00:56:15 2008 -0700
@@ -69,6 +69,9 @@ class KVM_ComputerSystem(CIM_System):
class KVM_ComputerSystem(CIM_System):
pass
+class LXC_ComputerSystem(CIM_System):
+ pass
+
def get_cs_class(virt):
if virt in virt_types:
return eval(get_typed_class(virt, 'ComputerSystem'))