[Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed

Guo Lian Yun yunguol at cn.ibm.com
Thu Oct 9 01:30:44 UTC 2008


libvirt-cim-bounces at redhat.com wrote on 2008-10-07 19:56:23:

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


More information about the Libvirt-cim mailing list