libvirt-cim-bounces(a)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(a)linux.vnet.ibm.com
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim