<br><tt><font size=2>libvirt-cim-bounces@redhat.com wrote on 2008-09-27
05:57:48:<br>
<br>
> > rc = -1<br>
> > status = FAIL<br>
> > - keys = ['Name', 'CreationClassName']<br>
> > - try:<br>
> > - host_sys = enumclass.enumerate(options.ip,
'HostSystem', <br>
> keys, options.virt)[0]<br>
> > - except Exception:<br>
> > - logger.error(CIM_ERROR_ENUMERATE
% host_sys.name)<br>
> > - return FAIL<br>
> > + ret, linux_cs = check_sblim(options.ip, options.virt)<br>
> > + if ret == PASS:<br>
> > + host_sys = linux_cs<br>
> > + else:<br>
> > + keys = ['Name', 'CreationClassName']<br>
> > + try:<br>
> > + host_sys = enumclass.enumerate(options.ip,
<br>
> 'HostSystem', keys, options.virt)[0]<br>
> > + except Exception:<br>
> > + logger.error(CIM_ERROR_ENUMERATE
% host_sys.name)<br>
> > + return FAIL<br>
> <br>
> You can use get_host_info() instead.<br>
> <br>
> > <br>
> > <br>
> > servicelist = {get_typed_class(options.virt,
<br>
> "ResourcePoolConfigurationService") : "RPCS",<br>
> > @@ -65,7 +70,8 @@ def main():<br>
> > names = []<br>
> > <br>
> > try:<br>
> > - names = conn.AssociatorNames(instanceref,
AssocClass <br>
> = get_typed_class(options.virt, "HostedService"))<br>
> > + names = conn.AssociatorNames(instanceref,
AssocClass = \<br>
> > +
get_typed_class(options.virt, "HostedService"))<br>
> <br>
> The alignment here is a little strange. Usually, you align like the
<br>
> following:<br>
> <br>
> names = conn.AssociatorNames(instanceref, AssocClass=\<br>
>
get_typed_class(options.virt, <br>
> "HostedService"))<br>
> <br>
> <br>
> But instead, I'd suggest doing something like:<br>
> <br>
> hostedserv_cn = get_typed_class(options.virt, "HostedService"))<br>
> names = conn.AssociatorNames(instanceref, AssocClass=hostedserv_cn)</font></tt>
<br>
<br><tt><font size=2> #3 patch on the way.</font></tt>
<br>
<br><tt><font size=2> Thanks!<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>