<br><tt><font size=2>libvirt-cim-bounces@redhat.com wrote on 2008-09-12
05:22:44:<br>
<br>
> yunguol@cn.ibm.com wrote:<br>
> > # HG changeset patch<br>
> > # User Guolian Yun <yunguol@cn.ibm.com><br>
> > # Date 1221099062 25200<br>
> > # Node ID 79fa907586aa87d71277bf887010d103bba8ccae<br>
> > # Parent bc52b5b0cf586ce117ab43dd9cf3e927d711fbaa<br>
> > [TEST]#2 Fix LogicalDisk - 02_nodevs.py<br>
> > <br>
> > Signed-off-by: Guolian Yun <yunguol@cn.ibm.com><br>
> > <br>
> > diff -r bc52b5b0cf58 -r 79fa907586aa suites/libvirt-<br>
> cim/cimtest/LogicalDisk/02_nodevs.py<br>
> > --- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py
Wed <br>
> Sep 10 20:10:48 2008 +0530<br>
> > +++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py
Wed <br>
> Sep 10 19:11:02 2008 -0700<br>
> > @@ -25,6 +25,7 @@<br>
> > <br>
> > import sys<br>
> > import pywbem<br>
> > +from time import sleep<br>
> > from VirtLib import live<br>
> > from XenKvmLib import devices<br>
> > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE<br>
> > @@ -59,6 +60,15 @@ def main():<br>
> > <br>
> > cn = "LogicalDisk"<br>
> > <br>
> > + timer_count = 10<br>
> > + for count in range(0, 10):<br>
> > + if count < timer_count:<br>
> > + cs = live.domain_list(options.ip,
options.virt) <br>
> > + if len(cs) == 0:<br>
> > + break<br>
> > + sleep(1)<br>
> > + if count == 9 and
len(cs) != 0:<br>
> > + return
SKIP<br>
> > try:<br>
> > devs = devices.enumerate(options.ip,
cn, key_list, options.virt)<br>
> <br>
> You'll want this polling bit to be a part of the clean_system() function
<br>
> - this is the check to see if there are guests running on the system.<br>
> <br>
> I'd remove the call to live.domain_list() in clean_system() and use
<br>
> enumerate() on the ComputerSystem class. That way you're getting
the <br>
> list of guests the providers are seeing.</font></tt>
<br>
<br><tt><font size=2> Good catch! Please review #3 patch.</font></tt>
<br><tt><font size=2><br>
> <br>
> -- <br>
> Kaitlin Rupert<br>
> IBM Linux Technology Center<br>
> kaitlin@linux.vnet.ibm.com<br>
> <br>
> _______________________________________________<br>
> Libvirt-cim mailing list<br>
> Libvirt-cim@redhat.com<br>
> https://www.redhat.com/mailman/listinfo/libvirt-cim<br>
</font></tt>