+ else:
+ try:
+ hs = enumclass.enumerate(options.ip, 'HostSystem', keys,
options.virt)
+ name = get_typed_class(options.virt, 'HostSystem')
- if len(hs) != 1:
- logger.error("Expected 1 %s instance returned" % name)
- return FAIL
+ if len(hs) != 1:
+ logger.error("Expected 1 %s instance returned" % name)
+ return XFAIL
This needs to be XFAIL_RC() with a bug number.
+
+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
You don't return linux_cs in this case.
+ else:
+ logger.info("sblim base provider is not installed")
This print is a little misleading. Because if len(linux_cs) == 1 and
len(host_sys) == 1, you return SBLIM is installed.
Plus, this function checks to determine whether SBLIM is installed or
not. If you return FAIL in the case of len(linux_cs) == 1 and
len(host_sys) == 1, then the test case thinks SBLIM isn't installed,
when isn't accurate.
I would make it so that this function just checks to determine whether
SBLIM is installed or not. It's up to the test case to verify that
HostSystem doesn't return an instance when SBLIM is installed. I would
expect that only the HostSystem 01_enum.py test needs to be concerned
about whether both SBLIM and HostSystem return an instance.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com