[Libvirt-cim] [PATCH] [TEST] changed ComputerSystem.03 tc for LXC support as an example
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Tue May 20 18:24:38 UTC 2008
Guo Lian Yun wrote:
> # HG changeset patch
> # User Guolian Yun <yunguol at 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 at 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)
Instead of creating this file in each test case, it should be created
once per test run. I'd suggest making the file creation a part of the
guest creation. Also, you'd want to have the file deleted when the
guest is destroyed or undefined.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list