# HG changeset patch
# User Sharad Mishra <snmishra(a)us.ibm.com>
# Date 1301604632 25200
# Node ID c1d9565fff50d8aaa7990088b16a8364f563187a
# Parent 6d7dab79f4e8806aea65cb413c4f193cdbfc4f40
[TEST] Conditionally fail if VSI hardware not available.
This test requires VSI capable hardware to run successfully.
On non-vsi hosts, the test was failing, changed it to fail
conditionally now giving detailed cause of failure.
Signed-off-by: Sharad Mishra <snmishra(a)us.ibm.com>
diff -r 6d7dab79f4e8 -r c1d9565fff50
suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py
---
a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py Thu
Mar 31 13:40:51 2011 -0700
+++
b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/28_definesystem_with_vsi_profile.py Thu
Mar 31 13:50:32 2011 -0700
@@ -179,29 +179,34 @@
try:
rasd_list = get_rasd_list(server, virt, vsi_defaults, nrasd_cn)
if len(rasd_list) < 1:
+ status = FAIL
raise Exception("Unable to get template RASDs for %s" % test_dom)
cxml = get_class(virt)(test_dom)
cxml.set_res_settings(rasd_list)
ret = cxml.cim_define(server)
if not ret:
+ status = FAIL
raise Exception("Unable to define guest %s" % test_dom)
status = cxml.cim_start(server)
if status != PASS:
- raise Exception("Unable to start %s" % test_dom)
+ status = XFAIL
+ raise Exception("Unable to start VM "
+ "*** Is VSI support available on this host? ***")
status, inst = get_net_inst(server, nrasd_cn, test_dom)
if status != PASS:
+ status = FAIL
raise Exception("Failed to get net interface for %s" % test_dom)
status = verify_net_rasd(server, virt, vsi_defaults, inst)
if status != PASS:
+ status = FAIL
logger.error("Failed to verify net interface for %s", test_dom)
except Exception, details:
logger.error(details)
- status = FAIL
cxml.cim_destroy(server)
cxml.undefine(server)