[Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 01_definesystem_name.py to use cim_() functions
Deepti B Kalakeri
deeptik at linux.vnet.ibm.com
Thu Jan 8 05:38:59 UTC 2009
Kaitlin Rupert wrote:
> # HG changeset patch
> # User Kaitlin Rupert <karupert at us.ibm.com>
> # Date 1231345874 28800
> # Node ID 02df4284e91f0c3def604cf9e208bf5df256fe91
> # Parent c3e4470bce26b1da0e848f5be2ae411b9ea1b937
> [TEST] #2 Update VSMS 01_definesystem_name.py to use cim_() functions
>
> Updates:
> -Added cim_destroy() to destroy the guest at the end of the test
> -Reworded log message for clarity
>
> Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
>
> diff -r c3e4470bce26 -r 02df4284e91f suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py
> --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 11:56:13 2009 -0800
> +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Wed Jan 07 08:31:14 2009 -0800
> @@ -23,12 +23,10 @@
> #
>
> import sys
> -import pywbem
> -from VirtLib import utils
> -from XenKvmLib.test_doms import undefine_test_domain
> -from XenKvmLib.common_util import create_using_definesystem
> from XenKvmLib.const import do_main
> from CimTest.Globals import logger
> +from CimTest.ReturnCodes import PASS, FAIL
> +from XenKvmLib.vxml import get_class
>
> SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC']
> default_dom = 'test_domain'
> @@ -37,10 +35,19 @@
> def main():
> options = main.options
>
> - status = create_using_definesystem(default_dom, options.ip,
> - virt=options.virt)
> - undefine_test_domain(default_dom, options.ip,
> - virt=options.virt)
> + cxml = get_class(options.virt)(default_dom)
> +
> + ret = cxml.cim_define(options.ip)
> + if not ret:
> + logger.error("Unable to define %s" % default_dom)
> + return FAIL
> +
> + status = cxml.cim_start(options.ip)
> + if status != PASS:
> + logger.info("Failed to start the defined domain: %s" % default_dom)
>
This should be logger.error() instead of logger.info message.
sorry for missing this in the previous patch.
> +
> + cxml.cim_destroy(options.ip)
> + cxml.undefine(options.ip)
>
> return status
>
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list