[PATCH] [TEST] Fix VSSD-02_bootldr.py

# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1221025502 25200 # Node ID d3c88d929119696cf168b883498392e647444660 # Parent aaa44481faee136c0ced9d400860d1eb1002df31 [TEST] Fix VSSD-02_bootldr.py Signed-off-by: Guolian Yun <yunguol@cn.ibm.com> diff -r aaa44481faee -r d3c88d929119 suites/libvirt-cim/cimtest/VSSD/02_bootldr.py --- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Mon Sep 08 23:44:21 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Tue Sep 09 22:45:02 2008 -0700 @@ -28,10 +28,10 @@ import sys from XenKvmLib import enumclass +from XenKvmLib.vxml import get_class from VirtLib import utils from VirtLib.live import bootloader -from XenKvmLib.test_doms import test_domain_function, destroy_and_undefine_all -from XenKvmLib.test_xml import testxml_bl +from XenKvmLib.test_doms import destroy_and_undefine_all from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -45,9 +45,11 @@ def main(): status = 1 destroy_and_undefine_all(options.ip) - xmlfile = testxml_bl(test_dom, server = options.ip, gtype = 0) + virt_xml = get_class(options.virt) + xmlfile = virt_xml(test_dom) + xmlfile.set_bootloader(options.ip, gtype=0) - ret = test_domain_function(xmlfile, options.ip, "define") + ret = xmlfile.cim_define(options.ip) if not ret : logger.error("error while 'define' of VS") return 1 @@ -74,8 +76,7 @@ def main(): logger.error("Exception : %s" % detail) status = 1 - test_domain_function(test_dom, options.ip, "undefine") - + xmlfile.undefine(options.ip) return status if __name__ == "__main__":

yunguol@cn.ibm.com wrote:
# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1221025502 25200 # Node ID d3c88d929119696cf168b883498392e647444660 # Parent aaa44481faee136c0ced9d400860d1eb1002df31 [TEST] Fix VSSD-02_bootldr.py
Signed-off-by: Guolian Yun <yunguol@cn.ibm.com>
diff -r aaa44481faee -r d3c88d929119 suites/libvirt-cim/cimtest/VSSD/02_bootldr.py --- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Mon Sep 08 23:44:21 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Tue Sep 09 22:45:02 2008 -0700 @@ -28,10 +28,10 @@
Can you also change the BaseException to Exception? When this test encounters an exception, python returns the following error: ERROR - NameError : global name 'BaseException' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 115, in do_try File "02_bootldr.py", line 73, in main except BaseException, detail : NameError: global name 'BaseException' is not defined This should be changed to Exception. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

libvirt-cim-bounces@redhat.com wrote on 2008-09-11 04:43:50:
yunguol@cn.ibm.com wrote:
# HG changeset patch # User Guolian Yun <yunguol@cn.ibm.com> # Date 1221025502 25200 # Node ID d3c88d929119696cf168b883498392e647444660 # Parent aaa44481faee136c0ced9d400860d1eb1002df31 [TEST] Fix VSSD-02_bootldr.py
Signed-off-by: Guolian Yun <yunguol@cn.ibm.com>
diff -r aaa44481faee -r d3c88d929119 suites/libvirt- cim/cimtest/VSSD/02_bootldr.py --- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Mon Sep 08 23:44:21 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Tue Sep 09 22:45:02 2008 -0700 @@ -28,10 +28,10 @@
Can you also change the BaseException to Exception? When this test encounters an exception, python returns the following error:
ERROR - NameError : global name 'BaseException' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 115, in do_try File "02_bootldr.py", line 73, in main except BaseException, detail : NameError: global name 'BaseException' is not defined
This should be changed to Exception.
Done!
Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com
_______________________________________________ Libvirt-cim mailing list Libvirt-cim@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim
participants (3)
-
Guo Lian Yun
-
Kaitlin Rupert
-
yunguol@cn.ibm.com