Please ignore this patch.
Thanks!

Best,
Regards

Daisy (Ô˹úÁ«)
VSM Team, China Systems & Technology Labs (CSTL)
E-mail: yunguol@cn.ibm.com
TEL: (86)-21-60922144
Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203


libvirt-cim-bounces@redhat.com wrote on 2008-06-13 14:29:53:

> # HG changeset patch
> # User Guolian Yun <yunguol@cn.ibm.com>
> # Date 1213338588 -28800
> # Node ID 0dc2a5c7b39e1f1ac7bc4bca9fe33523c8631ced
> # Parent  b9100cec9aedb9f9243d753111a9a856e9480335
> [TEST] Update ResourceAllocationFromPool.01 for LXC support, create
> a guest and verification
>
> Signed-off-by: Guolian Yun <yunguol@cn.ibm.com>
>
> diff -r b9100cec9aed -r 0dc2a5c7b39e suites/libvirt-
> cim/cimtest/ResourceAllocationFromPool/01_forward.py
> --- a/suites/libvirt-
> cim/cimtest/ResourceAllocationFromPool/01_forward.py   Wed Jun 11
> 03:38:49 2008 -0700
> +++ b/suites/libvirt-
> cim/cimtest/ResourceAllocationFromPool/01_forward.py   Fri Jun 13
> 14:29:48 2008 +0800
> @@ -26,17 +26,26 @@
>  from VirtLib import utils
>  from XenKvmLib import assoc
>  from XenKvmLib import enumclass
> +from XenKvmLib import vxml
>  from XenKvmLib.classes import get_typed_class
>  from CimTest import Globals
>  from CimTest.Globals import logger, do_main
>  from CimTest.ReturnCodes import PASS, FAIL, XFAIL
>  
> -sup_types = ['Xen', 'XenFV', 'KVM']
> +test_dom = 'dom'
> +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
>  
>  @do_main(sup_types)
>  def main():
>      options = main.options
>      status = PASS
> +
> +    virt_xml = vxml.get_class(options.virt)
> +    cxml = virt_xml(test_dom)
> +    ret = cxml.define(options.ip)
> +    if not ret:
> +        logger.error('Unable to define domain %s' % test_dom)
> +        return FAIL
>  
>      try:
>          key_list = { 'InstanceID' : "MemoryPool/0" }
> @@ -71,6 +80,9 @@
>          if memdata[i].classname != get_typed_class(options.virt,
> "MemResourceAllocationSettingData"):
>              logger.error("ERROR: Association result error")
>              status = FAIL
> +    if memdata[0]['InstanceID'] != '%s/mem' % test_dom:
> +        logger.error("Return InstanceID error, not %s" % memdata[0]
> ['InstanceID'])
> +        status = FAIL
>                  
>      try:
>          procdata = assoc.AssociatorNames(options.ip,
> "ResourceAllocationFromPool",
> @@ -85,6 +97,10 @@
>          if procdata[j].classname != get_typed_class(options.virt,
> "ProcResourceAllocationSettingData"):
>         logger.error("ERROR: Association result error")
>              status = FAIL
> +    if options.virt != 'LXC' and procdata[0]['InstanceID'] != '%
> s/proc' % test_dom:
> +        logger.error("Return InstanceID error, not %s" %
> procdata[0]['InstanceID'])
> +        status = FAIL
> +
>  
>      return status
>          
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim