[Libvirt-cim] [PATCH 2 of 3] [TEST] update EC.03 for XenFV and KVM support
Zhengang Li
zli at linux.vnet.ibm.com
Fri Mar 28 10:06:25 UTC 2008
Guo Lian Yun wrote:
> # HG changeset patch
> # User Guolian Yun <yunguol at cn.ibm.com>
> # Date 1206688450 25200
> # Node ID b8c7f56633f9f273e615f58f7c82b6524dea82d5
> # Parent 5eae4d73506a53965f3fcf1bb132d04bd9266c4a
> [TEST] update EC.03 for XenFV and KVM support
>
> Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>
>
> diff -r 5eae4d73506a -r b8c7f56633f9 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py
> --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Mar 28 00:12:21 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Mar 28 00:14:10 2008 -0700
> @@ -25,11 +25,12 @@ from pywbem.cim_obj import CIMInstanceNa
> from pywbem.cim_obj import CIMInstanceName
> from XenKvmLib import assoc
> from XenKvmLib import hostsystem
> +from XenKvmLib.classes import get_typed_class
> from CimTest import Globals
> from CimTest.Globals import log_param, logger, do_main
> from CimTest.ReturnCodes import PASS, FAIL
>
> -sup_types = ['Xen']
> +sup_types = ['Xen', 'XenFV', 'KVM']
>
> exp_rc = 6 #CIM_ERR_NOT_FOUND
> exp_desc = "No such instance"
> @@ -44,7 +45,7 @@ def try_assoc(ref, ref_class, exp_rc, ex
> names = []
>
> try:
> - names = conn.AssociatorNames(ref, AssocClass = "Xen_ElementCapabilities")
> + names = conn.AssociatorNames(ref, AssocClass = get_typed_class(options.virt, "ElementCapabilities"))
> rc = 0
> except pywbem.CIMError, (rc, desc):
> if rc == exp_rc and desc.find(exp_desc) >= 0:
> @@ -57,7 +58,8 @@ def try_assoc(ref, ref_class, exp_rc, ex
> logger.error(details)
> finally:
> if rc == 0:
> - logger.error("Xen_ElementCapabilities associator should NOT return excepted result with a wrong key name and value of %s input" % ref_class)
> + logger.error("%s_ElementCapabilities associator should NOT return excepted result \
> + with a wrong key name and value of %s input" % (options.virt, ref_class))
I prefer the error log use the base classname. So possibly we don't
necessarily need to pass the options.virt here.
> status = FAIL
>
> return status
--
- Zhengang
More information about the Libvirt-cim
mailing list