[Libvirt-cim] [PATCH] [TEST]#2 Fix LogicalDisk - 02_nodevs.py

Guo Lian Yun yunguol at cn.ibm.com
Fri Sep 12 02:43:01 UTC 2008


libvirt-cim-bounces at redhat.com wrote on 2008-09-12 05:22:44:

> yunguol at cn.ibm.com wrote:
> > # HG changeset patch
> > # User Guolian Yun <yunguol at cn.ibm.com>
> > # Date 1221099062 25200
> > # Node ID 79fa907586aa87d71277bf887010d103bba8ccae
> > # Parent  bc52b5b0cf586ce117ab43dd9cf3e927d711fbaa
> > [TEST]#2 Fix LogicalDisk - 02_nodevs.py
> > 
> > Signed-off-by: Guolian Yun <yunguol at cn.ibm.com>
> > 
> > diff -r bc52b5b0cf58 -r 79fa907586aa suites/libvirt-
> cim/cimtest/LogicalDisk/02_nodevs.py
> > --- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py   Wed 
> Sep 10 20:10:48 2008 +0530
> > +++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py   Wed 
> Sep 10 19:11:02 2008 -0700
> > @@ -25,6 +25,7 @@
> > 
> >  import sys
> >  import pywbem
> > +from time import sleep
> >  from VirtLib import live
> >  from XenKvmLib import devices
> >  from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
> > @@ -59,6 +60,15 @@ def main():
> > 
> >      cn = "LogicalDisk"
> > 
> > +    timer_count = 10
> > +    for count in range(0, 10):
> > +        if count < timer_count:
> > +            cs = live.domain_list(options.ip, options.virt) 
> > +            if len(cs) == 0:
> > +                break
> > +            sleep(1)
> > +            if count == 9 and len(cs) != 0:
> > +                return SKIP
> >      try:
> >          devs = devices.enumerate(options.ip, cn, key_list, 
options.virt)
> 
> You'll want this polling bit to be a part of the clean_system() function 

> - this is the check to see if there are guests running on the system.
> 
> I'd remove the call to live.domain_list() in clean_system() and use 
> enumerate() on the ComputerSystem class.  That way you're getting the 
> list of guests the providers are seeing.

  Good catch! Please review #3 patch.

> 
> -- 
> Kaitlin Rupert
> IBM Linux Technology Center
> kaitlin at linux.vnet.ibm.com
> 
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080912/356053a8/attachment.htm>


More information about the Libvirt-cim mailing list