# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1222065339 25200
# Node ID 365281e25f086316d4f8561b92bddc3cf8b7f3c9
# Parent 892ce3fce2340df3fb51a1160f510d15838f2d54
[TEST] Fix HostedService-01_forward.py with sblim base provider installed
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 892ce3fce234 -r 365281e25f08
suites/libvirt-cim/cimtest/HostedService/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Sep 12 14:35:12 2008
-0700
+++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Sun Sep 21 23:35:39 2008
-0700
@@ -29,9 +29,10 @@ from CimTest import Globals
from CimTest import Globals
from XenKvmLib.const import do_main
from CimTest.Globals import logger
-from CimTest.ReturnCodes import PASS, FAIL, XFAIL
+from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
+bug = '00007'
@do_main(sup_types)
def main():
@@ -42,6 +43,14 @@ def main():
except Exception:
logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name)
return FAIL
+
+ if len(host_sys) == 0:
+ linux_cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys,
'Linux')[0]
+ if len(linux_cs) == 0:
+ return XFAIL_RC(bug)
+ else:
+ host_sys = linux_cs
+
try:
service = assoc.AssociatorNames(options.ip,
"HostedService",