
# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1258581016 28800 # Node ID 694c0d606e2fd61961d3a64a6e5c601fd30c23c5 # Parent 3e6d9522f2e1240a67bdcae6c09743de0f155753 [TEST] Add new VSMS test for testing new EnableAPCI, EnableAPIC, and ... EnablePAE options in libvirt-cim. Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r 3e6d9522f2e1 -r 694c0d606e2f suites/libvirt-cim/cimtest/VirtualSystemManagementService/24_define_sys_features.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/24_define_sys_features.py Wed Nov 18 13:50:16 2009 -0800 @@ -0,0 +1,71 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Kaitlin Rupert <karupert@us.ibm.com> +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# This testcase verifies defining and starting domain with bridge interface +# + +import sys +from XenKvmLib import vxml +from CimTest.Globals import logger +from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.const import do_main + +sup_types = ['Xen', 'KVM', 'XenFV'] +default_dom = 'features_domain' + +@do_main(sup_types) +def main(): + options = main.options + + status = FAIL + + cxml = vxml.get_class(options.virt)(default_dom, pae=True, + acpi=True, apic=True) + + try: + ret = cxml.cim_define(options.ip) + if not ret: + raise Exception("Failed to define the dom: %s" % default_dom) + + cxml.dumpxml(options.ip) + + if cxml.xml_get_pae() == None: + raise Exception("Failed to set pae for dom: %s" % default_dom) + + if cxml.xml_get_acpi() == None: + raise Exception("Failed to set acpi for dom: %s" % default_dom) + + if cxml.xml_get_apic() == None: + raise Exception("Failed to set apic for dom: %s" % default_dom) + + status = PASS + + except Exception, details: + logger.error(details) + status = FAIL + + cxml.cim_destroy(options.ip) + + return status + +if __name__ == "__main__": + sys.exit(main()) +