# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1221184469 25200
# Node ID 7efdd4ae22828154d19c0daf53dd5ee5d8942eb2
# Parent 12931170a223bf6194177be33dfad154d7cb21e9
[TEST] #3 Fix LogicalDisk - 02_nodevs.py
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 12931170a223 -r 7efdd4ae2282 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 Thu Sep 11 18:54:29 2008 -0700
@@ -25,7 +25,8 @@
import sys
import pywbem
-from VirtLib import live
+from time import sleep
+from XenKvmLib import enumclass
from XenKvmLib import devices
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
from XenKvmLib.const import do_main
@@ -35,17 +36,18 @@
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 virt == "XenFV" or virt == "Xen":
+ if len(l) == 0:
+ return True
+ sleep(1)
+ if count == 9 and len(l) != 0:
+ return SKIP
else:
return True
- elif len(l) > 0:
- return False
- else:
- return True
@do_main(sup_types)
def main():