libvirt-cim-bounces@redhat.com wrote on 2008-10-17 00:05:24:

> > diff -r 96d45b1dcc08 -r 1ea2c899795c suites/libvirt-
> cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py
> > --- a/suites/libvirt-
> cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py   Wed Oct
> 15 06:07:28 2008 -0700
> > +++ b/suites/libvirt-
> cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py   Wed Oct
> 15 19:23:11 2008 -0700
> > @@ -45,9 +45,7 @@ def main():
> >      priority = 0
> >
> >      try:
> > -        vsmsd = enumclass.enumerate_inst(options.ip,
> > -                                        
> "VirtualSystemMigrationSettingData",
> > -                                         options.virt)
> > +        vsmsd = enumclass.EnumNames(options.ip, cn)
> >      except Exception, detail:
> >          logger.error(CIM_ERROR_ENUMERATE, cn)
> >          logger.error("Exception: %s", detail)
>
> This test fails with:
>
> VirtualSystemMigrationSettingData - 01_enum.py: FAIL
> ERROR   - KeyError : 'migrationtype'
> Traceback (most recent call last):
>    File "./lib/XenKvmLib/const.py", line 116, in do_try
>    File "01_enum.py", line 65, in main
>      if verify_vsmsd['MigrationType'] != MType:
>    File "/usr/lib/python2.5/site-packages/pywbem/cim_obj.py", line 533,
> in __getitem__
>      def __getitem__(self, key): return self.keybindings[key]
>    File "/usr/lib/python2.5/site-packages/pywbem/cim_obj.py", line 76,
> in __getitem__
>      return self.data[k][1]
> KeyError: 'migrationtype'
> ERROR   - None
>
>
> You'll want to change enumclass.EnumNames() to
> enumclass.EnumInstances().  The test case is verifying all the
> attributes of the instance.  However, enumclass.EnumNames() only returns
> a reference, not and instance.
>

  Fixed.

  Thanks.

> --
> Kaitlin Rupert
> IBM Linux Technology Center
> kaitlin@linux.vnet.ibm.com
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim@redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim