
+def check_sblim(server, virt='Xen'): + status = FAIL + Globals.CIM_NS = 'root/cimv2' + keys = ['Name', 'CreationClassName'] + try: + linux_cs = enumclass.enumerate(server, 'ComputerSystem', keys, 'Linux') + host_sys = enumclass.enumerate(server, 'HostSystem', keys, virt) + if len(linux_cs) == 1 and len(host_sys) == 0: + status = PASS + else: + logger.info("sblim base provider is not installed") + except Exception, detail: + logger.error(CIM_ERROR_ENUMERATE, 'Linux_ComputerSystem') + logger.error("Exception: %s", detail) + + Globals.CIM_NS = 'root/virt' + return status, linux_cs
Also, this function should return linux_cs[0], so that the test cases don't need to call host_sys = linux_cs[0] -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com