<br><tt><font size=2>libvirt-cim-bounces@redhat.com wrote on 2008-10-17
00:28:33:<br>
<br>
> yunguol@cn.ibm.com wrote:<br>
> > # HG changeset patch<br>
> > # User Guolian Yun <yunguol@cn.ibm.com><br>
> > # Date 1224140552 25200<br>
> > # Node ID 0167493d2ce4cad2c09d572964844f199555fcb4<br>
> > # Parent  96d45b1dcc0801ade819413abe1af43b3957dde4<br>
> > [TEST] Update Profile/02_profile_to_elec.py to call new EnumNames<br>
> > <br>
> > This tc updates fails for me, I look into this but I can't work
it out.<br>
> > <br>
> > <br>
> > Signed-off-by: Guolian Yun <yunguol@cn.ibm.com><br>
> > <br>
> > diff -r 96d45b1dcc08 -r 0167493d2ce4 suites/libvirt-<br>
> cim/cimtest/Profile/02_profile_to_elec.py<br>
> > --- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py
  <br>
> Wed Oct 15 06:07:28 2008 -0700<br>
> > +++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py
  <br>
> Thu Oct 16 00:02:32 2008 -0700<br>
> > @@ -95,7 +95,7 @@ def get_profile(server, virt):<br>
> >      profile = None<br>
> > <br>
> >      try:<br>
> > -        proflist = enumclass.enumerate_inst(server,
<br>
> 'RegisteredProfile', virt)<br>
> > +        proflist = enumclass.EnumNames(server,
cn)<br>
> >          status, profile = get_expected_inst(cn,
proflist, 'RegisteredName',<br>
> >                  
                     
     registeredname)<br>
> >      except Exception, detail:<br>
> <br>
> This is because EnumNames() only returns a reference, not and instance.
<br>
>   The test case is attempting to verify the attributes of the
instance, <br>
> but that's not possible with just a reference.<br>
> <br>
> What you'll need to do is change enumclass.EnumNames() to <br>
> enumclass.EnumInstances().  In addition, you'll need to modify
<br>
> EnumInstances() so that it can return either CIM_CimtestClass objects
or <br>
> a CIMInstance objects.<br>
> </font></tt>
<br><tt><font size=2>  I updated EnumInstances so it returns both
CIMInstance and CIM_CimtestClass objects.</font></tt>
<br><tt><font size=2>  And #2 patch for tc on the way.</font></tt>
<br>
<br><tt><font size=2>  Thanks!<br>
<br>
> I did something similar with GetInstance() in this patch:<br>
>     "Update inst_to_mof() to convert CIM_CimtestClass
instances to inst"<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>