[Libvirt-cim] [PATCH] [TEST] Fix HostedService-02_reverse.py with sblim base provider installed
Guo Lian Yun
yunguol at cn.ibm.com
Sat Sep 27 02:15:17 UTC 2008
libvirt-cim-bounces at redhat.com wrote on 2008-09-27 05:53:39:
> > options = main.options
> > - keys = ['Name', 'CreationClassName']
> > - try:
> > - host_sys = enumclass.enumerate(options.ip, 'HostSystem',
> keys, options.virt)[0]
> > - except Exception:
> > - logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.
> CreationClassName)
> > - return FAIL
> > + ret, linux_cs = check_sblim(options.ip, options.virt)
> > + if ret == PASS:
> > + host_sys = linux_cs
> > + else:
> > + keys = ['Name', 'CreationClassName']
> > + try:
> > + host_sys = enumclass.enumerate(options.ip,
> 'HostSystem', keys, options.virt)[0]
> > + except Exception:
> > + logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.
> CreationClassName)
> > + return FAIL
>
> With Deepti's patch, you can use get_host_info() instead.
>
> > servicelist = {"ResourcePoolConfigurationService" : "RPCS",
> > "VirtualSystemManagementService" :
"ManagementService",
> > "VirtualSystemMigrationService" :
"MigrationService"}
> > @@ -67,7 +72,8 @@ def main():
> > ccn = assoc_host[0].keybindings['CreationClassName']
> > name = assoc_host[0].keybindings['Name']
> >
> > - if ccn != get_typed_class(options.virt, "HostSystem"):
> > + if ccn != get_typed_class(options.virt, "HostSystem")\
> > + and ccn != 'Linux_ComputerSystem':
>
> Instead of using HostSystem and Linux_ComputerSystem here, you can use
> the host_sys CreationClassName.
>
Good catch.
Thanks!
> --
> Kaitlin Rupert
> IBM Linux Technology Center
> kaitlin at linux.vnet.ibm.com
>
> _______________________________________________
> 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/20080927/0b012ad2/attachment.htm>
More information about the Libvirt-cim
mailing list