Can you review it?
Thanks!

libvirt-cim-bounces@redhat.com wrote on 2008-09-16 11:18:36:

> # HG changeset patch
> # User Guolian Yun <yunguol@cn.ibm.com>
> # Date 1221535110 25200
> # Node ID ff1df42efd6b7dff7f5a4d595fe37abf558b124b
> # Parent  12931170a223bf6194177be33dfad154d7cb21e9
> [TEST] #4 Fix LogicalDisk - 02_nodevs.py
>
> Signed-off-by: Guolian Yun <yunguol@cn.ibm.com>
>
> diff -r 12931170a223 -r ff1df42efd6b suites/libvirt-
> cim/cimtest/LogicalDisk/02_nodevs.py
> --- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py   Wed Sep
> 10 18:58:22 2008 -0700
> +++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py   Mon Sep
> 15 20:18:30 2008 -0700
> @@ -25,8 +25,9 @@
>  
>  import sys
>  import pywbem
> -from VirtLib import live
> +from time import sleep
>  from XenKvmLib import devices
> +from XenKvmLib import enumclass
>  from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
>  from XenKvmLib.const import do_main
>  from CimTest.ReturnCodes import PASS, FAIL, SKIP
> @@ -35,17 +36,17 @@ sup_types = ['Xen', 'KVM', 'XenFV', 'LXC
>  
>  test_dom = "test_domain"
>  def clean_system(host, virt='Xen'):
> -    l = live.domain_list(host, virt)
> -
> -    if virt == "XenFV" or virt == "Xen":
> -        if len(l) > 1:
> -            return False
> +    timer_count = 10
> +    for count in range(0, timer_count):
> +        keys = ['Name', 'CreationClassName']
> +        l = enumclass.enumerate(host, 'ComputerSystem', keys, virt)
> +        if len(l) == 0:
> +            return True
> +        if virt == 'Xen' or virt == 'XenFV':
> +            sleep(1)
>          else:
> -            return True
> -    elif len(l) > 0:
> -        return False
> -    else:
> -        return True
> +            break
> +    return False
>  
>  @do_main(sup_types)
>  def main():
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim