<br>
<br><tt><font size=2>libvirt-cim-bounces@redhat.com wrote on 2008-10-07
19:56:23:<br>
<br>
> <br>
> <br>
> yunguol@cn.ibm.com wrote:<br>
> > # HG changeset patch<br>
> > # User Guolian Yun <yunguol@cn.ibm.com><br>
> > # Date 1223359792 25200<br>
> > # Node ID 0b599308e31a1865ab47b1c2d44d0887c409e139<br>
> > # Parent  311bf6eda3786eb8e47ede06c4da6dc1570aff61<br>
> > [TEST] Fix HostedResourcePool/02_reverse.py to work with sblim
<br>
> cmpi base provider installed<br>
> ><br>
> > Signed-off-by: Guolian Yun <yunguol@cn.ibm.com><br>
> ><br>
> > diff -r 311bf6eda378 -r 0b599308e31a suites/libvirt-<br>
> cim/cimtest/HostedResourcePool/02_reverse.py<br>
> > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py
<br>
> Sun Oct 05 23:56:40 2008 -0700<br>
> > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py
<br>
> Mon Oct 06 23:09:52 2008 -0700<br>
> > @@ -25,6 +25,7 @@ import sys<br>
> >  import sys<br>
> >  from XenKvmLib import assoc<br>
> >  from XenKvmLib import enumclass<br>
> > +from XenKvmLib.common_util import get_host_info<br>
> >  from XenKvmLib.const import default_network_name<br>
> >  from CimTest import Globals<br>
> >  from CimTest.Globals import logger<br>
> > @@ -39,12 +40,11 @@ def main():<br>
> >      status = PASS<br>
> ><br>
> >      keys = ['Name', 'CreationClassName']<br>
> > -    try:<br>
> > -        host_sys = enumclass.enumerate(options.ip,
'HostSystem', <br>
> keys, options.virt)[0]<br>
> > -    except Exception:<br>
> > -        host_cn = get_typed_class(options.virt,
"HostSystem")<br>
> > -        logger.error(Globals.CIM_ERROR_ENUMERATE
% host_cn)<br>
> > -        return FAIL <br>
> > +    status, host_sys, host_cn = get_host_info(options.ip,
options.virt)<br>
> > +    if status != PASS:<br>
> > +        logger.error("Error in calling
get_host_info function")<br>
> > +        return FAIL<br>
> > +<br>
> >      assoc_cn = get_typed_class(options.virt,
"HostedResourcePool")<br>
> >      proc_cn  = get_typed_class(options.virt,
"ProcessorPool")<br>
> >      mem_cn   = get_typed_class(options.virt,
"MemoryPool")<br>
> > @@ -64,10 +64,10 @@ def main():<br>
> >              logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES
% v)<br>
> >   <br>
> This should be<br>
> <br>
> logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn)<br>
> </font></tt>
<br><tt><font size=2>  Good catch. #2 patch on the way.</font></tt>
<br><tt><font size=2>  Thanks!<br>
> >              return FAIL<br>
> >          if len(assoc_host) == 1:<br>
> > -            if assoc_host[0].keybindings['Name']
!= host_sys.Name:<br>
> > +            if assoc_host[0].keybindings['Name']
!= host_sys:<br>
> >                  logger.error("Pool
association returned wrong hostsystem")<br>
> >                  status
= FAIL <br>
> > -            if assoc_host[0].keybindings['CreationClassName']
!= <br>
> host_sys.CreationClassName:<br>
> > +            if assoc_host[0].keybindings['CreationClassName']
!= host_cn:<br>
> >                  logger.error("Pool
association returned wrong <br>
> CreationClassName")<br>
> >                  status
= FAIL <br>
> >          if status != PASS:<br>
> ><br>
> > _______________________________________________<br>
> > Libvirt-cim mailing list<br>
> > Libvirt-cim@redhat.com<br>
> > https://www.redhat.com/mailman/listinfo/libvirt-cim<br>
> >   <br>
> <br>
> _______________________________________________<br>
> Libvirt-cim mailing list<br>
> Libvirt-cim@redhat.com<br>
> https://www.redhat.com/mailman/listinfo/libvirt-cim<br>
</font></tt>