<br><tt><font size=2>libvirt-cim-bounces@redhat.com wrote on 2009-05-19
01:24:35:<br>
<br>
> > +test_mode = ["None", "nat", "route
eth1"]<br>
> <br>
> If you want to set the forward device as eth1, you'll need to use
the <br>
> ForwardDevice attribute.  See the schema (or the template NetPoolRASDs)
<br>
> for more info.<br>
> <br>
> > +    for i in range(0, len(test_mode)):<br>
> > +        pool_attr["ForwardMode"]
= test_mode[i]<br>
> <br>
> ForwardMode needs to be an int, not a string.  Really, you should
be <br>
> using the template NetPoolRASD for this.  These have the values
set <br>
> appropriately.<br>
> <br>
> You can call get_pool_rasds(), and then pull the RASD you want from
the <br>
> list that is returned.  Then you won't have to worry about setting
the <br>
> properties appropriately.</font></tt>
<br>
<br><tt><font size=2>  Good idea. I get an array of NetPoolRASDs from
get_pool_rasds, which </font></tt>
<br><tt><font size=2>  including all net types. And then create them
by create_netpool. This</font></tt>
<br><tt><font size=2>  tc pass for me now.</font></tt>
<br>
<br><tt><font size=2>  Thanks!!</font></tt>
<br><tt><font size=2>> <br>
> > +        <br>
> > +        status = create_netpool(options.ip,
options.virt, <br>
> > +                  
             test_pool, pool_attr)<br>
> > +        if status != PASS:<br>
> > +            logger.error("Error
in networkpool creation")<br>
> >              return FAIL<br>
> > -     <br>
> > -    logger.error("The execution should not have
reached here!!")<br>
> > -    return FAIL<br>
> > +<br>
> > +        status = verify_pool(options.ip,
options.virt, np, <br>
> > +                  
          test_pool, pool_attr)<br>
> > +        if status != PASS:<br>
> > +            logger.error("Error
in networkpool verification")<br>
> > +            destroy_netpool(options.ip,
options.virt, test_pool)<br>
> > +            undefine_netpool(options.ip,
options.virt, test_pool)<br>
> > +            return FAIL<br>
> > +<br>
> > +        status = destroy_netpool(options.ip,
options.virt, test_pool)<br>
> > +        if status != PASS:<br>
> > +            logger.error("Unable
to destroy networkpool %s", test_pool)<br>
> > +            return FAIL<br>
> > +<br>
> > +        status = undefine_netpool(options.ip,
options.virt, test_pool)<br>
> > +        if status != PASS:<br>
> > +            logger.error("Unable
to undefine networkpool %s", test_pool)<br>
> > +            return FAIL<br>
> <br>
> Instead of setting PASS at the top of the test case, set status =
PASS <br>
> here.  This helps prevent returning a false positive.<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>