From yunguol at cn.ibm.com Fri Aug 1 04:39:23 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 1 Aug 2008 12:39:23 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Make related indication_test.py changes In-Reply-To: <837943c970641071e556.1217543766@elm3b41.beaverton.ibm.com> Message-ID: +1 from me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 Kaitlin Rupert Sent by: libvirt-cim-bounces at redhat.com 2008-08-01 06:36 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH] [TEST] Make related indication_test.py changes # HG changeset patch # User Kaitlin Rupert # Date 1217543735 25200 # Node ID 837943c970641071e55637386d9ac30df5d41e4b # Parent b53b5a20e8f561366ff90f2156ad6d26d90b5d1b [TEST] Make related indication_test.py changes. The version of indication_tester.py in libcmpiutil has changed, so the version in libvirt needs to change as well. Signed-off-by: Kaitlin Rupert diff -r b53b5a20e8f5 -r 837943c97064 suites/libvirt-cim/lib/XenKvmLib/indication_tester.py --- a/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py Thu Jul 31 15:17:28 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py Thu Jul 31 15:35:35 2008 -0700 @@ -169,7 +169,7 @@ """ % (sysname, name, sysname, name) -def delete_inst_xml(name, type, sysname): +def delete_inst_xml(name, type, sysname, inst_name): return """ @@ -192,7 +192,7 @@ CIM_Indication%s - %s%s + %s @@ -200,7 +200,7 @@ ; - """ % (type, sysname, type, name, type); + """ % (type, sysname, type, inst_name); def delete_sub_xml(name, sysname): return """ @@ -298,15 +298,16 @@ self.server.indications.append(indication) class CIMIndicationSubscription: - def __init__(self, name, typ, ns, print_ind, sysname): + def __init__(self, name, typ, ns, print_ind, sysname, port=0): self.name = name self.type = typ self.ns = ns self.sysname = sysname - self.server = BaseHTTPServer.HTTPServer(('', 8000), CIMSocketHandler) + self.port = 8000 + port + self.server = BaseHTTPServer.HTTPServer(('', self.port), + CIMSocketHandler) self.server.print_ind = print_ind - self.port = 8000 self.server.indications = [] self.filter_xml = filter_xml(name, typ, ns, sysname) @@ -325,7 +326,7 @@ conn.request("POST", "/cimom", body, headers) resp = conn.getresponse() if not resp.getheader("content-length"): - raise Exception("Request Failed: %d %s" % + raise Exception("Request Failed: %d %s" % (resp.status, resp.reason)) resp.read() @@ -355,10 +356,12 @@ xml = delete_sub_xml(self.name, self.sysname) self.__do_cimpost(self.conn, xml, "DeleteInstance", auth_hdr) - xml = delete_inst_xml(self.name, "Handler", self.sysname) + xml = delete_inst_xml(self.name, "HandlerCIMXML", self.sysname, + "%sHandler" % self.name) self.__do_cimpost(self.conn, xml, "DeleteInstance", auth_hdr) - xml = delete_inst_xml(self.name, "Filter", self.sysname) + xml = delete_inst_xml(self.name, "Filter", self.sysname, + "%sFilter" % self.name) self.__do_cimpost(self.conn, xml, "DeleteInstance", auth_hdr) @@ -366,8 +369,9 @@ filter_str = filter_xml(name, typ, ns, sysname) handler_str = handler_xml(name, 8000, sysname) subscript_str = subscription_xml(name, sysname) - del_filter_str = delete_inst_xml(name, "Filter", sysname) - del_handler_str = delete_inst_xml(name, "Handler", sysname) + del_filter_str = delete_inst_xml(name, "Filter", sysname, "%sFilter" % name) + del_handler_str = delete_inst_xml(name, "HandlerCIMXML", sysname, + "%sHandler" % name) del_subscript_str = delete_sub_xml(name, sysname) print "CreateFilter:\n%s\n" % filter_str @@ -398,6 +402,8 @@ help="HTTP Auth username") parser.add_option("-P", "--pass", dest="password", default=None, help="HTTP Auth password") + parser.add_option("--port", dest="port", default=0, type=int, + help="Port increment value (server default: 8000)") (options, args) = parser.parse_args() @@ -413,14 +419,14 @@ if ":" in options.url: (sysname, port) = options.url.split(":") else: - sysname = url + sysname = options.url if options.dump: dump_xml(options.name, args[0], options.ns, sysname) sys.exit(0) sub = CIMIndicationSubscription(options.name, args[0], options.ns, - options.print_ind, sysname) + options.print_ind, sysname, options.port) sub.subscribe(options.url, auth) print "Watching for %s" % args[0] _______________________________________________ Libvirt-cim mailing list Libvirt-cim at redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Aug 1 04:50:51 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 1 Aug 2008 12:50:51 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modify CSI test to support modified and deleted indications In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-01 07:24:23: > # HG changeset patch > # User Kaitlin Rupert > # Date 1217543970 25200 > # Node ID a0f1042dd8dd0b685aa755e1cedbbd7cdd71bbfc > # Parent 837943c970641071e55637386d9ac30df5d41e4b > [TEST] Modify CSI test to support modified and deleted indications. > > This may fail on KVM with the following error message: > "CIM_ERR_FAILED: Invalid state transition." Will follow up on this issue. Yup, I run it on KVM, and below is the detail error message: ComputerSystemIndication - 01_created_indication.py: FAIL ERROR - Exception: (1, u'CIM_ERR_FAILED: Invalid state transition') ERROR - Failed to start domain: domU InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Invalid state transition > > Signed-off-by: Kaitlin Rupert > > diff -r 837943c97064 -r a0f1042dd8dd suites/libvirt- > cim/cimtest/ComputerSystemIndication/01_created_indication.py > --- a/suites/libvirt- > cim/cimtest/ComputerSystemIndication/01_created_indication.py Thu > Jul 31 15:35:35 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/ComputerSystemIndication/01_created_indication.py Thu > Jul 31 15:39:30 2008 -0700 > @@ -24,91 +24,163 @@ > import os > import signal > import time > +from pywbem.cim_obj import CIMInstanceName > from CimTest.Globals import logger > from CimTest.Globals import do_main > from CimTest.ReturnCodes import PASS, FAIL > -from XenKvmLib.common_util import create_using_definesystem > -from XenKvmLib.test_doms import undefine_test_domain > +from XenKvmLib.common_util import create_using_definesystem, \ > + call_request_state_change > +from XenKvmLib.test_doms import destroy_and_undefine_domain > from XenKvmLib.classes import get_typed_class > from XenKvmLib.indication_tester import CIMIndicationSubscription > from XenKvmLib.vxml import set_default > +from XenKvmLib.vsms import get_vsms_class > > SUPPORTED_TYPES = ['Xen', 'XenFV', 'KVM'] > > test_dom = "domU" > +REQ_STATE = 2 > +TIME = "00000000000000.000000:000" > + > +def sub_ind(ip, virt): > + dict = set_default(ip) > + ind_names = {"define" : 'ComputerSystemCreatedIndication', > + "start" : 'ComputerSystemModifiedIndication', > + "destroy" : 'ComputerSystemDeletedIndication' > + } > + > + sub_list = {} > + port = 5 > + > + for ind, iname in ind_names.iteritems(): > + ind_name = get_typed_class(virt, iname) > + > + sub_name = "Test%s" % ind_name It's better to insert a whitespace here. > + port += 1 > + > + sub = CIMIndicationSubscription(sub_name, ind_name, > + dict['default_ns'], > + dict['default_print_ind'], > + dict['default_sysname'], > + port) > + sub.subscribe(dict['default_url'], dict['default_auth']) > + logger.info("Watching for %s" % iname) > + ind_names[ind] = ind_name > + sub_list[ind] = sub > + > + return sub_list, ind_names, dict > + > +def gen_ind(test_dom, ip, vtype, ind): > + if ind == "define": > + return create_using_definesystem(test_dom, ip, virt=vtype) Do you have to check the return status of create_using_definesystem() function here? > + > + elif ind == "start": > + rc = call_request_state_change(test_dom, ip, REQ_STATE, TIME, vtype) > + if rc != 0: > + logger.error("Failed to start domain: %s" % test_dom) > + return FAIL > + return PASS > + > + elif ind == "destroy": > + service = get_vsms_class(vtype)(ip) > + try: > + classname = get_typed_class(vtype, 'ComputerSystem') > + cs_ref = CIMInstanceName(classname, keybindings = { > + 'Name':test_dom, > + 'CreationClassName':classname}) > + service.DestroySystem(AffectedSystem=cs_ref) > + except Exception, details: > + logger.error('Unknow exception happened') > + logger.error(details) > + return FAIL > + return PASS > + > + return FAIL > + > +def handle_request(sub, ind_name): > + sub.server.handle_request() > + if len(sub.server.indications) == 0: > + logger.error("No valid indications received") > + return FAIL > + elif str(sub.server.indications[0]) != ind_name: > + logger.error("Received indication %s instead of %s" % \ > + (str(sub.server.indications[0])), ind_name) > + return FAIL > + > + return PASS > + > +def poll_for_ind(pid): > + for i in range(0, 20): > + pw = os.waitpid(pid, os.WNOHANG) > + > + # If pid exits, waitpid returns [pid, return_code] > + # If pid is still running, waitpid returns [0, 0] > + # Only return a success if waitpid returns the expected pid > + # and the return code is 0. > + if pw[0] == pid and pw[1] == 0: > + logger.info("Great, got indication successfuly") > + status = PASS > + break > + elif pw[1] == 0 and i < 19: > + if i % 10 == 0: > + logger.info("In child process, waiting for indication") > + time.sleep(1) > + else: > + # Time is up and waitpid never returned the expected pid > + if pw[0] != pid: > + logger.error("Waited too long for indication") > + os.kill(pid, signal.SIGKILL) > + else: > + logger.error("Received indication error: %d" % pw[1]) > + > + status = FAIL > + break > + > + return status > > @do_main(SUPPORTED_TYPES) > def main(): > options = main.options > status = FAIL > > - dict = set_default(options.ip) > - indication_name = get_typed_class(options.virt, > - 'ComputerSystemCreatedIndication') > - > - sub = CIMIndicationSubscription(dict['default_name'], indication_name, > - dict['default_ns'], > - dict['default_print_ind'], > - dict['default_sysname']) > - sub.subscribe(dict['default_url'], dict['default_auth']) > - logger.info("Watching for %s" % indication_name) > - > - try: > - pid = os.fork() > - if pid == 0: > - sub.server.handle_request() > - if len(sub.server.indications) == 0: > - logger.error("No valid indications received") > - os._exit(1) > - elif str(sub.server.indications[0]) != indication_name: > - logger.error("Received indication %s instead of %s" % \ > - (indication_name, str(sub.server. > indications[0]))) > - os._exit(2) > + sub_list, ind_names, dict = sub_ind(options.ip, options.virt) > + > + ind_list = ["define", "start", "destroy"] > + > + for ind in ind_list: > + sub = sub_list[ind] > + ind_name = ind_names[ind] > + > + try: > + pid = os.fork() > + if pid == 0: > + status = handle_request(sub, ind_name) > + if status != PASS: > + os._exit(1) > + > + os._exit(0) > else: > - os._exit(0) > - else: > - status = create_using_definesystem(test_dom, options. > ip, None, None, > - options.virt) > - if status != PASS: > - sub.unsubscribe(dict['default_auth']) > - logger.info("Cancelling subscription for %s" % > indication_name) > - os.kill(pid, signal.SIGKILL) > - return status > + try: > + status = gen_ind(test_dom, options.ip, options.virt, ind) > + if status != PASS: > + os.kill(pid, signal.SIGKILL) > + return FAIL > > - status = FAIL > - for i in range(0,100): > - pw = os.waitpid(pid, os.WNOHANG) > + status = poll_for_ind(pid) > + except Exception, details: > + logger.error("Exception: %s" % details) > + os.kill(pid, signal.SIGKILL) > + return FAIL > > - # If pid exits, waitpid returns [pid, return_code] > - # If pid is still running, waitpid returns [0, 0] > - # Only return a success if waitpid returns the expected pid > - # and the return code is 0. > - if pw[0] == pid and pw[1] == 0: > - logger.info("Great, got indication successfuly") > - status = PASS > - break > - elif pw[1] == 0 and i < 99: > - if i % 10 == 0: > - logger.info("In child process, waiting for > indication") > - time.sleep(1) > - else: > - status = FAIL > - > - # Time is up and waitpid never returned the expected pid > - if pw[0] != pid: > - logger.error("Waited too long for indication") > - os.kill(pid, signal.SIGKILL) > - else: > - logger.error("Received indication error: %d" % pw[1]) > - break > + except Exception, details: > + logger.error("Exception: %s" % details) > + return FAIL > > - except Exception, details: > - logger.error("Unknown exception happened") > - logger.error(details) > - > - sub.unsubscribe(dict['default_auth']) > - logger.info("Cancelling subscription for %s" % indication_name) > - undefine_test_domain(test_dom, options.ip, options.virt) > + for ind, sub in sub_list.iteritems(): > + sub.unsubscribe(dict['default_auth']) > + logger.info("Cancelling subscription for %s" % ind_names[ind]) > + > + destroy_and_undefine_domain(test_dom, options.ip, options.virt) > > return status > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Aug 1 04:59:16 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 1 Aug 2008 12:59:16 +0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Add function to poll for a guest In-Reply-To: Message-ID: +1 from me =) libvirt-cim-bounces at redhat.com wrote on 2008-08-01 06:26:05: > # HG changeset patch > # User Kaitlin Rupert > # Date 1217542638 25200 > # Node ID d0c5bdff331b674690f973a70d4ef00878e484f4 > # Parent 365e478e317b6559dd8869051aeda8d54d358686 > Add function to poll for a guest > > This function is a work around to deal with a stale data issue seen > with libvirt on RHEL 5.x. > > Signed-off-by: Kaitlin Rupert > > diff -r 365e478e317b -r d0c5bdff331b suites/libvirt- > cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Jul 31 > 15:19:33 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Jul 31 > 15:17:18 2008 -0700 > @@ -33,10 +33,12 @@ > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib.devices import CIM_Instance > from XenKvmLib.classes import get_typed_class > -from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE > +from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE, \ > + CIM_ERROR_GETINSTANCE > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > -from VirtLib.live import diskpool_list, virsh_version, net_list > +from VirtLib.live import diskpool_list, virsh_version, net_list, domain_list > from XenKvmLib.vxml import PoolXML, NetXML > +from XenKvmLib.enumclass import getInstance > > test_dpath = "foo" > disk_file = '/etc/libvirt/diskpool.conf' > @@ -57,7 +59,7 @@ > return (1, cs) > > except Exception, detail: > - logger.error(Globals.CIM_ERROR_GETINSTANCE, > + logger.error(CIM_ERROR_GETINSTANCE, > get_typed_class(virt, 'ComputerSystem')) > logger.error("Exception: %s", detail) > return (1, cs) > @@ -397,3 +399,18 @@ > > return PASS > > +def check_virsh_poll(ip, virt, dom_name): > + cs = None > + > + dom_list = domain_list(ip, virt) > + if dom_name in dom_list: > + timeout = 10 > + > + for i in range(0, timeout): > + rc, cs = get_cs_instance(dom_name, ip, virt) > + if rc == 0: > + return cs > + > + sleep(1) > + > + return cs > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Aug 1 05:02:54 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 1 Aug 2008 13:02:54 +0800 Subject: [Libvirt-cim] [PATCH 2 of 2] Update ElementConforms 02 to use check_virsh_poll() work around In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-01 06:26:06: > # HG changeset patch > # User Kaitlin Rupert > # Date 1217542648 25200 > # Node ID b53b5a20e8f561366ff90f2156ad6d26d90b5d1b > # Parent d0c5bdff331b674690f973a70d4ef00878e484f4 > Update ElementConforms 02 to use check_virsh_poll() work around. > > Also clean this test case some. > > Signed-off-by: Kaitlin Rupert > > diff -r d0c5bdff331b -r b53b5a20e8f5 suites/libvirt- > cim/cimtest/ElementConforms/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Thu > Jul 31 15:17:18 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Thu > Jul 31 15:17:28 2008 -0700 > @@ -52,6 +52,7 @@ > from XenKvmLib.vxml import XenXML, KVMXML, get_class > from XenKvmLib.classes import get_typed_class > from CimTest.ReturnCodes import PASS, FAIL > +from XenKvmLib.common_util import check_virsh_poll, get_cs_instance > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > @@ -96,51 +97,41 @@ > > inst_list = [] > > + rc, cs = get_cs_instance(test_dom, options.ip, options.virt) > + if rc != 0: > + sys = check_virsh_poll(options.ip, options.virt, test_dom) > + if sys is None: > + logger.error("Instance for %s not created" % test_dom) > + return FAIL > + > + inst_list.append(sys) > + > try: > - cs_list = computersystem.enumerate(options.ip, options.virt) > - # The len should be atleast two, as the CS returns info > - # one regarding VS and the other one for Domain-0. > - if len(cs_list) < 1: > - logger.error("ERROR: Wrong number of instances returned") > - return status > - for item in cs_list: > - if item.Name == test_dom: > - inst_list.append(item) > - break > - > - if len(inst_list) != 1: > - logger.error("ERROR: Instance for %s not created" % test_dom) > - return status > - > #Getting the hostname, to verify with the value returned bythe assoc. > host_sys = hostsystem.enumerate(options.ip, options.virt) > > if len(host_sys) < 1: > logger.error("ERROR: Enumerate returned 0 host instances") > - return status > - elif host_sys[0].Name == "": > - logger.error("ERROR: HostName seems to be empty") > - return status > - else: > - # Instance of the HostSystem > - inst_list.append(host_sys[0]) > - except Exception , detail: > - logger.error("Exception: %s" % detail) > - return status > + return FAIL > + > + inst_list.append(host_sys[0]) > + > + except Exception, details: > + logger.error("Exception: %s" % details) > + return FAIL > > prev_namespace = Globals.CIM_NS > Globals.CIM_NS = 'root/interop' > > try: > key_list = ["InstanceID"] > - proflist = enumclass.enumerate(options.ip, \ > - "RegisteredProfile", \ > + proflist = enumclass.enumerate(options.ip, > + "RegisteredProfile", > key_list, > options.virt) > - except Exception, detail: > - logger.error(CIM_ERROR_ENUMERATE, \ > - 'RegisteredProfile') > - logger.error("Exception: %s", detail) > + except Exception, details: > + logger.error(CIM_ERROR_ENUMERATE, 'RegisteredProfile') It's better to log details. logger.error(CIM_ERROR_ENUMERATE, \ get_typed_class(options.virt, 'RegisteredProfile')) > + logger.error("Exception: %s", details) > return status > > Globals.CIM_NS = prev_namespace > @@ -160,11 +151,12 @@ > Name=name) > if len(profs) != 1: > logger.error("ElementConformsToProfile assoc failed") > - return status > + return FAIL > > status = verify_profile(profs[0], exp_list[cn]) > if status != PASS: > logger.error("Verification of profile instance failed") > + return FAIL > > except Exception, detail: > logger.error(CIM_ERROR_ASSOCIATORS, 'RegisteredProfile') > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Aug 1 05:37:18 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 31 Jul 2008 22:37:18 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Update SettingsDefineCapabilities.01 to return less valeus in pool related function Message-ID: # HG changeset patch # User Guolian Yun # Date 1217569031 25200 # Node ID bc7f9edeaa5ff372bf79e5ed699654a2a1aa26a3 # Parent a289fb981e70e916ed1f0bbf1b7ba579e96502c6 [TEST] #3 Update SettingsDefineCapabilities.01 to return less valeus in pool related function Signed-off-by: Guolian Yun diff -r a289fb981e70 -r bc7f9edeaa5f suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Jul 30 20:01:53 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Thu Jul 31 22:37:11 2008 -0700 @@ -63,7 +63,7 @@ CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf, \ -create_netpool_conf +create_netpool_conf, destroy_netpool from XenKvmLib.common_util import print_field_error platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -87,21 +87,21 @@ return instance -def init_list(virt, dpool, npool, mpool, ppool): +def init_list(virt, pool): """ Creating the lists that will be used for comparisons. """ - + if virt == 'LXC': - instlist = [ mpool.InstanceID ] + instlist = [ pool[1].InstanceID ] cllist = [ get_typed_class(virt, "MemResourceAllocationSettingData") ] rtype = { get_typed_class(virt, "MemResourceAllocationSettingData") : 4 } else: instlist = [ - dpool.InstanceID, - mpool.InstanceID, - npool.InstanceID, - ppool.InstanceID + pool[0].InstanceID, + pool[1].InstanceID, + pool[2].InstanceID, + pool[3].InstanceID ] cllist = [ get_typed_class(virt, "DiskResourceAllocationSettingData"), @@ -130,10 +130,11 @@ def get_pool_details(virt, server): dpool = npool = mpool = ppool = None + pool_set = [] try : status, diskid = create_diskpool_conf(server, virt) if status != PASS: - return status, dpool, npool, mpool, ppool + return status, pool_set, None dpool = get_pool_info(virt, server, diskid, poolname="DiskPool") mpool = get_pool_info(virt, server, memid, poolname= "MemoryPool") @@ -141,16 +142,23 @@ status, test_network = create_netpool_conf(server, virt) if status != PASS: - return status, dpool, npool, mpool, ppool + return status, pool_set, test_network netid = "%s/%s" % ("NetworkPool", test_network) npool = get_pool_info(virt, server, netid, poolname= "NetworkPool") - + if dpool.InstanceID == None or mpool.InstanceID == None \ + or npool.InstanceID == None or ppool.InstanceID == None: + logger.error("Get pool None") + cleanup_restore(server, virt) + destroy_netpool(server, virt, test_network) + return FAIL + else: + pool_set = [dpool, mpool, ppool, npool] except Exception, detail: logger.error("Exception: %s", detail) - return FAIL, dpool, npool, mpool, ppool + return FAIL, pool_set, test_network - return PASS, dpool, npool, mpool, ppool + return PASS, pool_set, test_network def verify_rasd_fields(loop, assoc_info, cllist, rtype, rangelist): for inst in assoc_info: @@ -164,10 +172,9 @@ return PASS -def verify_sdc_with_ac(virt, server, dpool, npool, mpool, ppool): +def verify_sdc_with_ac(virt, server, pool): loop = 0 - instlist, cllist, rtype, rangelist = init_list(virt, dpool, npool, mpool, - ppool) + instlist, cllist, rtype, rangelist = init_list(virt, pool) assoc_cname = get_typed_class(virt, "SettingsDefineCapabilities") cn = get_typed_class(virt, "AllocationCapabilities") for instid in sorted(instlist): @@ -200,14 +207,15 @@ server = options.ip virt = options.virt - status, dpool, npool, mpool, ppool = get_pool_details(virt, server) - if status != PASS or dpool.InstanceID == None or mpool.InstanceID == None \ - or npool.InstanceID == None or ppool.InstanceID == None: + status, pool, test_network = get_pool_details(virt, server) + if status != PASS: cleanup_restore(server, virt) + destroy_netpool(server, virt, test_network) return FAIL - status = verify_sdc_with_ac(virt, server, dpool, npool, mpool, ppool) + status = verify_sdc_with_ac(virt, server, pool) cleanup_restore(server, virt) + destroy_netpool(server, virt, test_network) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Fri Aug 1 09:19:35 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 01 Aug 2008 14:49:35 +0530 Subject: [Libvirt-cim] Re: Issue with DiskRASD size parameter on KVM with current sources. In-Reply-To: <877ib2yu8v.fsf@caffeine.beaverton.ibm.com> References: <3c80ea156a3c45bc321f.1217005491@guaranine.danplanet.com> <4891B1F3.9020200@linux.vnet.ibm.com> <4891BB33.2040305@linux.vnet.ibm.com> <877ib2yu8v.fsf@caffeine.beaverton.ibm.com> Message-ID: <4892D527.7090901@linux.vnet.ibm.com> Dan Smith wrote: > DK> The revision of the libvirt-cim on my machines is 651. > > The changeset that added this functionality is 652, so please > upgrade... :) > > :) I should have done this before sending the mail. Yes this problem is not seen in the latest 654 libvirt-cim provider. Thanks and Regards, Deepti. > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From danms at us.ibm.com Fri Aug 1 15:03:31 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 01 Aug 2008 08:03:31 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add function to poll for a guest In-Reply-To: (Kaitlin Rupert's message of "Thu, 31 Jul 2008 15:26:05 -0700") References: Message-ID: <874p64u69o.fsf@caffeine.beaverton.ibm.com> KR> +def check_virsh_poll(ip, virt, dom_name): KR> + cs = None KR> + KR> + dom_list = domain_list(ip, virt) KR> + if dom_name in dom_list: KR> + timeout = 10 KR> + KR> + for i in range(0, timeout): KR> + rc, cs = get_cs_instance(dom_name, ip, virt) KR> + if rc == 0: KR> + return cs KR> + KR> + sleep(1) KR> + KR> + return cs How many iterations does this normally have to go through to get fresh data? I suppose it's a reasonable band-aid for now. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Aug 1 18:06:39 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 01 Aug 2008 11:06:39 -0700 Subject: [Libvirt-cim] [PATCH] When saving out the infostore, clear any previous data Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1217613773 25200 # Node ID a9e3b40692cef1635f1c377f896fc2d5be0b3c16 # Parent d7406e2f4670208cfe61ef9c0065164292ab3942 When saving out the infostore, clear any previous data. Signed-off-by: Kaitlin Rupert diff -r d7406e2f4670 -r a9e3b40692ce libxkutil/infostore.c --- a/libxkutil/infostore.c Tue Jul 29 12:34:38 2008 -0700 +++ b/libxkutil/infostore.c Fri Aug 01 11:02:53 2008 -0700 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -42,6 +43,7 @@ xmlNodePtr root; xmlXPathContextPtr xpathctx; int fd; + char *filename; }; static void infostore_cleanup_ctx(struct infostore_ctx *ctx) @@ -49,6 +51,7 @@ xmlXPathFreeContext(ctx->xpathctx); xmlFreeDoc(ctx->doc); close(ctx->fd); + free(ctx->filename); free(ctx); } @@ -148,7 +151,12 @@ xmlSaveCtxtPtr save = NULL; long size = 0; - lseek(ctx->fd, 0, SEEK_SET); + close(ctx->fd); + ctx->fd = open(ctx->filename, O_RDWR|O_TRUNC, 0600); + if (ctx->fd < 0) { + CU_DEBUG("Unable to open `%s': %m", ctx->filename); + goto out; + } save = xmlSaveToFd(ctx->fd, NULL, 0); if (save == NULL) { @@ -179,6 +187,8 @@ filename = make_filename(dom); if (filename == NULL) goto err; + + isc->filename = strdup(filename); isc->fd = open(filename, O_RDWR|O_CREAT, 0600); if (isc->fd < 0) { @@ -310,6 +320,7 @@ } xmlNodeSetContent(node, BAD_CAST val); + out: xmlXPathFreeObject(result); From kaitlin at linux.vnet.ibm.com Fri Aug 1 18:14:18 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 01 Aug 2008 11:14:18 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add function to poll for a guest In-Reply-To: <874p64u69o.fsf@caffeine.beaverton.ibm.com> References: <874p64u69o.fsf@caffeine.beaverton.ibm.com> Message-ID: <4893527A.9040109@linux.vnet.ibm.com> Dan Smith wrote: > KR> +def check_virsh_poll(ip, virt, dom_name): > KR> + cs = None > KR> + > KR> + dom_list = domain_list(ip, virt) > KR> + if dom_name in dom_list: > KR> + timeout = 10 > KR> + > KR> + for i in range(0, timeout): > KR> + rc, cs = get_cs_instance(dom_name, ip, virt) > KR> + if rc == 0: > KR> + return cs > KR> + > KR> + sleep(1) > KR> + > KR> + return cs > > How many iterations does this normally have to go through to get fresh > data? 6 - 7 iterations - seems pretty consistent in my testing. > > I suppose it's a reasonable band-aid for now. > In the future, most of these tests will use the provider to create the guest (not virsh), so I think this problem will go away on its own in time. Although, we'll want to have some tests that use virsh, just to make sure the providers handle guests created outside of the providers. So we'll need this (or something like this) in those cases. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Aug 1 18:18:37 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 01 Aug 2008 11:18:37 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify CSI test to support modified and deleted indications In-Reply-To: References: Message-ID: <4893537D.5060301@linux.vnet.ibm.com> > > > > This may fail on KVM with the following error message: > > "CIM_ERR_FAILED: Invalid state transition." Will follow up on this > issue. > > Yup, I run it on KVM, and below is the detail error message: > > ComputerSystemIndication - 01_created_indication.py: FAIL > ERROR - Exception: (1, u'CIM_ERR_FAILED: Invalid state transition') > ERROR - Failed to start domain: domU > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Invalid state > transition > This is a bug in libvirt. I spoke to the libvirt folks this morning, and this should be fixed in CVS soon. > > + > > + sub = CIMIndicationSubscription(sub_name, ind_name, > > + dict['default_ns'], > > + dict['default_print_ind'], > > + dict['default_sysname'], > > + port) > > + sub.subscribe(dict['default_url'], dict['default_auth']) > > + logger.info("Watching for %s" % iname) > > + ind_names[ind] = ind_name > > + sub_list[ind] = sub > > + > > + return sub_list, ind_names, dict > > + > > +def gen_ind(test_dom, ip, vtype, ind): > > + if ind == "define": > > + return create_using_definesystem(test_dom, ip, virt=vtype) > > Do you have to check the return status of create_using_definesystem() > function here? > The status gets checked in the main function (see below). If this is confusing, I can change it. > > + try: > > + status = gen_ind(test_dom, options.ip, > options.virt, ind) > > + if status != PASS: > > + os.kill(pid, signal.SIGKILL) > > + return FAIL > > > > - status = FAIL > > - for i in range(0,100): > > - pw = os.waitpid(pid, os.WNOHANG) > > + status = poll_for_ind(pid) > > + except Exception, details: > > + logger.error("Exception: %s" % details) > > + os.kill(pid, signal.SIGKILL) > > + return FAIL -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Fri Aug 1 18:26:28 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 01 Aug 2008 11:26:28 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add function to poll for a guest References: <874p64u69o.fsf@caffeine.beaverton.ibm.com> <4893527A.9040109@linux.vnet.ibm.com> Message-ID: <87fxpor3qj.fsf@caffeine.beaverton.ibm.com> KR> 6 - 7 iterations - seems pretty consistent in my testing. Okay. KR> In the future, most of these tests will use the provider to create the KR> guest (not virsh), so I think this problem will go away on its own in KR> time. Indeed. As long as that's the plan, I think doing this for those tests that need to check this behavior is fine. What's up with the name though? The function has 'virsh' in the name, but it's querying the providers, right? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Aug 1 18:42:37 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 01 Aug 2008 11:42:37 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add function to poll for a guest In-Reply-To: <87fxpor3qj.fsf@caffeine.beaverton.ibm.com> References: <874p64u69o.fsf@caffeine.beaverton.ibm.com> <4893527A.9040109@linux.vnet.ibm.com> <87fxpor3qj.fsf@caffeine.beaverton.ibm.com> Message-ID: <4893591D.3030908@linux.vnet.ibm.com> Dan Smith wrote: > KR> 6 - 7 iterations - seems pretty consistent in my testing. > > Okay. > > KR> In the future, most of these tests will use the provider to create the > KR> guest (not virsh), so I think this problem will go away on its own in > KR> time. > > Indeed. As long as that's the plan, I think doing this for those > tests that need to check this behavior is fine. > > What's up with the name though? The function has 'virsh' in the name, > but it's querying the providers, right? > It's checking both virsh and the providers. The hack here is that virsh doesn't hit the caching issue. So if virsh lists the guest, then we poll until the providers see it. If virsh doesn't see the guest, then the guest wasn't created. So we don't waste time polling for a guest that doesn't exist. Even still, the name is pretty poor. I'll think something else up and resend. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From jfehlig at novell.com Fri Aug 1 22:44:45 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Fri, 01 Aug 2008 16:44:45 -0600 Subject: [Libvirt-cim] [PATCH] Fix memory corruption in Virt_VSMigrationService Message-ID: # HG changeset patch # User Jim Fehlig # Date 1217630619 21600 # Node ID dc93425ad702b45d013a53d6e237066201207999 # Parent dbdf9a5fce21e33d23d280e48bae1912fd5f3a0d Fix memory corruption in Virt_VSMigrationService According to uuid_unparse(3), the out param needs to accommodate 37 bytes. This patch expands the uuid field of migration_job structure to 37 bytes. Signed-off-by: Jim Fehlig diff -r dbdf9a5fce21 -r dc93425ad702 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Thu Jul 31 07:20:19 2008 -0700 +++ b/src/Virt_VSMigrationService.c Fri Aug 01 16:43:39 2008 -0600 @@ -78,7 +78,7 @@ struct migration_job { char *ref_ns; char *host; uint16_t type; - char uuid[33]; + char uuid[37]; }; static CMPIStatus get_msd(const CMPIObjectPath *ref, From deeptik at linux.vnet.ibm.com Mon Aug 4 06:28:50 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 03 Aug 2008 23:28:50 -0700 Subject: [Libvirt-cim] [PATCH 6 of 7] [TEST] Added KVM support to 33_suspend_reboot.py of CS provider In-Reply-To: Message-ID: <2776112e3333225f5007.1217831330@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1217830892 25200 # Node ID 2776112e3333225f5007bd359ec3c53d795ae90f # Parent 0da57be7b99849de19732a5affec07739a8c6f37 [TEST] Added KVM support to 33_suspend_reboot.py of CS provider. 1) Added support for KVM, added XFAIL_RC bcs the VS fails to move from suspend to reboot. 2) Removed check_attributes(). 3) Adding create_netpool_conf(), destroy_netpool() since the VSMS now requires networkpool. 4) Used destroy_and_undefine_domain() to undefine and destroy the VS. 5) Used try_request_state_change() library function to verify the exception. 6) Used poll_for_state_change() to verify the poll and verify the EnabledState value and also get the RequestedState value. The changes are verified with KVM, Xen, XenFV with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 0da57be7b998 -r 2776112e3333 suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Sun Aug 03 23:20:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Sun Aug 03 23:21:32 2008 -0700 @@ -4,6 +4,7 @@ # # Authors: # Anoop V Chakkalakkal +# Deepti B. Kalakeri # # # This library is free software; you can redistribute it and/or @@ -26,7 +27,7 @@ # information is captured in the RequestedState Property of the VS. # The test is considered to be successful if RequestedState Property # has a value of 9 when the VS is moved from active to suspend state -# and has a value of 10 when rebooted +# and when rebooted the value of RequestedState should be 10. # # List of Valid state values (Refer to VSP spec doc Table 2 for more) # --------------------------------- @@ -40,77 +41,71 @@ # Date: 06-03-2008 import sys +import pywbem from VirtLib import utils from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import get_cs_instance +from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import create_using_definesystem from XenKvmLib.common_util import call_request_state_change +from XenKvmLib.common_util import poll_for_state_change +from XenKvmLib.common_util import try_request_state_change +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool -sup_types = ['Xen', 'XenFV'] +sup_types = ['Xen', 'XenFV', 'KVM'] +bug_req_state = "00002" ACTIVE_STATE = 2 SUSPND_STATE = 9 REBOOT_STATE = 10 -bug_req_state = "00002" default_dom = 'test_domain' TIME = "00000000000000.000000:000" - -def check_attributes(domain_name, ip, en_state, rq_state, virt): - rc, cs = get_cs_instance(domain_name, ip, virt) - if rc != 0: - return rc - if cs.RequestedState != rq_state: - logger.error("RequestedState should be %d not %d", - rq_state, cs.RequestedState) - return XFAIL_RC(bug_req_state) - - if cs.EnabledState != en_state: - logger.error("EnabledState should be %d not %d", - en_state, cs.EnabledState) - return FAIL - - return PASS @do_main(sup_types) def main(): options = main.options status = FAIL + server = options.ip + virt = options.virt - tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ - ('Suspend', [SUSPND_STATE, SUSPND_STATE]), \ - ('Reboot', [SUSPND_STATE, REBOOT_STATE])] + status, test_network = create_netpool_conf(server, virt, False) + if status != PASS: + return FAIL + + tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), + ('Suspend', [SUSPND_STATE, SUSPND_STATE]), + ('Reboot', [SUSPND_STATE, REBOOT_STATE])] try: # define the vs - status = create_using_definesystem(default_dom, options.ip, - virt=options.virt) + status = create_using_definesystem(default_dom, server, + virt=virt) if status != PASS: - logger.error("Unable to define domain %s using DefineSystem()", \ - default_dom) + logger.error("Unable to define domain '%s' using DefineSystem()", + default_dom) return status # start, suspend and reboot for action, state in tc_scen: en_state = state[0] rq_state = state[1] - status = call_request_state_change(default_dom, options.ip, + status = call_request_state_change(default_dom, server, rq_state, TIME, - virt=options.virt) + virt=virt) if status != PASS: - logger.error("Unable to %s dom %s using \ -RequestedStateChange()", action, default_dom) + logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", + action, default_dom) + status = XFAIL_RC(bug_req_state) break - # FIX ME - # sleep() - - status = check_attributes(default_dom, options.ip, - en_state, rq_state, options.virt) + status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, + timeout=10) if status != PASS: - logger.error("Attributes for dom %s not set as expected.", + break + + if dom_cs.RequestedState != rq_state: + logger.error("RequestedState for dom '%s' is not set as expected.", default_dom) break @@ -118,9 +113,8 @@ logger.error("Exception: %s", detail) status = FAIL - # undefine the vs - undefine_test_domain(default_dom, options.ip, options.virt) - + destroy_netpool(server, virt, test_network) + destroy_and_undefine_domain(default_dom, server, virt) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Mon Aug 4 06:28:47 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 03 Aug 2008 23:28:47 -0700 Subject: [Libvirt-cim] [PATCH 3 of 7] [TEST] Updating the test cases which are affected by poll_for_state_change() library function changes In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1217830581 25200 # Node ID a5b12e49cfe1db373f34bd35cf20060ca74f83a7 # Parent 4ed904b18000ef148cb82e6b28729460970cca24 [TEST] Updating the test cases which are affected by poll_for_state_change() library function changes. 1) Updated 09_procrasd_persist.py to accomdate the poll_for_state_change() changes. Also, modified to include the create_netpool_conf(), destroy_netpool() functions. 2) Updated 01_migratable_host.py and 02_host_migrate_type.py to accomdate the poll_for_state_change() changes. The changes are verified with KVM, Xen, XenFV with current sources. 01_migratable_host.py and 02_host_migrate_type.py are skipped for KVM and should be supported to work on KVM. Signed-off-by: Deepti B. Kalakeri diff -r 4ed904b18000 -r a5b12e49cfe1 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Sun Aug 03 23:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Sun Aug 03 23:16:21 2008 -0700 @@ -30,6 +30,7 @@ from CimTest.Globals import do_main from CimTest.ReturnCodes import FAIL, PASS from XenKvmLib.test_doms import destroy_and_undefine_domain +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool sup_types = ['Xen', 'XenFV', 'KVM'] default_dom = 'rstest_domain' @@ -94,6 +95,11 @@ def main(): options = main.options + status, test_network = create_netpool_conf(options.ip, options.virt, False) + if status != PASS: + return FAIL + + status, vssd, rasd = setup_rasd_mof(options.ip, options.virt) if status != PASS: return status @@ -111,8 +117,8 @@ raise Exception("Unable to start %s using RequestedStateChange()" % default_dom) - status = poll_for_state_change(options.ip, options.virt, default_dom, - REQUESTED_STATE) + status, dom_cs = poll_for_state_change(options.ip, options.virt, default_dom, + REQUESTED_STATE) if status != PASS: raise Exception("%s didn't change state as expected" % default_dom) @@ -128,6 +134,7 @@ logger.error(details) status = FAIL + destroy_netpool(options.ip, options.virt, test_network) destroy_and_undefine_domain(default_dom, options.ip, options.virt) return status diff -r 4ed904b18000 -r a5b12e49cfe1 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Sun Aug 03 23:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Sun Aug 03 23:16:21 2008 -0700 @@ -49,8 +49,8 @@ logger.error("Error create domain %s" % guest_name) return FAIL - status = poll_for_state_change(ip, virt, guest_name, - REQUESTED_STATE) + status, dom_cs = poll_for_state_change(ip, virt, guest_name, + REQUESTED_STATE) if status != PASS: raise Exception("%s didn't change state as expected" % guest_name) return FAIL diff -r 4ed904b18000 -r a5b12e49cfe1 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Sun Aug 03 23:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Sun Aug 03 23:16:21 2008 -0700 @@ -99,8 +99,8 @@ cxml = virt_xml(guest_name) cxml.start(ip) - status = poll_for_state_change(ip, virt, guest_name, - REQUESTED_STATE) + status, dom_cs = poll_for_state_change(ip, virt, guest_name, + REQUESTED_STATE) if status != PASS: raise Exception("%s didn't change state as expected" % guest_name) return FAIL, None From deeptik at linux.vnet.ibm.com Mon Aug 4 06:28:49 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 03 Aug 2008 23:28:49 -0700 Subject: [Libvirt-cim] [PATCH 5 of 7] [TEST] Added KVM support to 32_start_reboot.py of CS In-Reply-To: Message-ID: <0da57be7b99849de1973.1217831329@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1217830823 25200 # Node ID 0da57be7b99849de19732a5affec07739a8c6f37 # Parent 776e7915449e10bf12562be362eb14d2599a0445 [TEST] Added KVM support to 32_start_reboot.py of CS. 1) Removed the invalid bug nos. 2) Removed check_attributes() . 3) Adding create_netpool_conf(), destroy_netpool() since the VSMS now requires networkpool. 4) Used destroy_and_undefine_domain() to undefine and destroy the VS. 5) Used poll_for_state_change() to verify the poll and verify the EnabledState value and to get the RequestedState value. The changes are verified with KVM, Xen, XenFV with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 776e7915449e -r 0da57be7b998 suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Sun Aug 03 23:19:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Sun Aug 03 23:20:23 2008 -0700 @@ -4,6 +4,7 @@ # # Authors: # Anoop V Chakkalakkal +# Deepti B. Kalakeri # # # This library is free software; you can redistribute it and/or @@ -25,7 +26,7 @@ # This test case is used to verify the Virtual System State Transition # information is captured in the RequestedState Property of the VS. # The test is considered to be successful if RequestedState Property -# has a value of 10 when the VS is moved from active to reboot state +# has a value of 10 when the VS is moved from active to reboot state. # # List of Valid state values (Refer to VSP spec doc Table 2 for more) # --------------------------------- @@ -41,72 +42,63 @@ from VirtLib import utils from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import get_cs_instance +from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import create_using_definesystem from XenKvmLib.common_util import call_request_state_change +from XenKvmLib.common_util import poll_for_state_change +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool -sup_types = ['Xen', 'XenFV'] +sup_types = ['Xen', 'XenFV', 'KVM'] +bug_req_state = "00002" ACTIVE_STATE = 2 REBOOT_STATE = 10 - -bug_req_state = "00002" -default_dom = 'test_domain' +default_dom = 'cs_test_domain' TIME = "00000000000000.000000:000" - -def check_attributes(domain_name, ip, en_state, rq_state, virt): - rc, cs = get_cs_instance(domain_name, ip, virt) - if rc != 0: - return rc - if cs.RequestedState != rq_state: - logger.error("RequestedState should be %d not %d", - rq_state, cs.RequestedState) - return XFAIL_RC(bug_req_state) - - if cs.EnabledState != en_state: - logger.error("EnabledState should be %d not %d", - en_state, cs.EnabledState) - return FAIL - - return PASS @do_main(sup_types) def main(): options = main.options status = FAIL + server = options.ip + virt = options.virt + + status, test_network = create_netpool_conf(server, virt, False) + if status != PASS: + return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ ('Reboot', [ACTIVE_STATE, REBOOT_STATE])] try: # define the vs - status = create_using_definesystem(default_dom, options.ip, - virt=options.virt) + status = create_using_definesystem(default_dom, server, + virt=virt) if status != PASS: - logger.error("Unable to define domain %s using DefineSystem()", \ - default_dom) + logger.error("Unable to define domain '%s' using DefineSystem()", + default_dom) return status # start, then reboot for action, state in tc_scen: en_state = state[0] rq_state = state[1] - status = call_request_state_change(default_dom, options.ip, + status = call_request_state_change(default_dom, server, rq_state, TIME, - virt=options.virt) + virt=virt) if status != PASS: - logger.error("Unable to %s dom %s using \ -RequestedStateChange()", action, default_dom) + logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", + action, default_dom) + status = XFAIL_RC(bug_req_state) break - # FIX ME - # sleep() - - status = check_attributes(default_dom, options.ip, - en_state, rq_state, options.virt) + status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, + timeout=10) if status != PASS: - logger.error("Attributes for dom %s not set as expected.", + break + + if dom_cs.RequestedState != rq_state: + logger.error("RequestedState for dom '%s' is not set as expected.", default_dom) break @@ -114,9 +106,8 @@ logger.error("Exception: %s", detail) status = FAIL - # undefine the vs - undefine_test_domain(default_dom, options.ip, options.virt) - + destroy_netpool(server, virt, test_network) + destroy_and_undefine_domain(default_dom, server, virt) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Mon Aug 4 06:28:48 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 03 Aug 2008 23:28:48 -0700 Subject: [Libvirt-cim] [PATCH 4 of 7] [TEST] Adding KVM support to 23_suspend_suspend.py of CS In-Reply-To: Message-ID: <776e7915449e10bf1256.1217831328@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1217830744 25200 # Node ID 776e7915449e10bf12562be362eb14d2599a0445 # Parent a5b12e49cfe1db373f34bd35cf20060ca74f83a7 [TEST] Adding KVM support to 23_suspend_suspend.py of CS. 1) Added support for KVM 2) Removed the invalid bug nos. 3) Removed check_attributes() function. 4) Adding create_netpool_conf(), destroy_netpool() since the VSMS now requires networkpool. 5) used destroy_and_undefine_domain() to undefine and destroy the VS. 6) Used try_request_state_change() library function to verify the exception. 7) Used poll_for_state_change() to verify the poll and verify the EnabledState value and also to get the RequestedState value. The changes are verified with KVM, Xen, XenFV with current sources. Signed-off-by: Deepti B. Kalakeri diff -r a5b12e49cfe1 -r 776e7915449e suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Sun Aug 03 23:16:21 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Sun Aug 03 23:19:04 2008 -0700 @@ -4,7 +4,7 @@ # # Authors: # Anoop V Chakkalakkal -# +# Deepti B. Kalakeri # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public @@ -26,7 +26,7 @@ # information is captured in the RequestedState Property of the VS. # The test is considered to be successful if RequestedState Property # has a value of 9 when the VS is moved from active to suspend state -# and has a value of 9 when supended again +# and returns an excpetion when supended again. # # List of Valid state values (Refer to VSP spec doc Table 2 for more) # --------------------------------- @@ -39,84 +39,87 @@ # Date: 29-02-2008 import sys +import pywbem from VirtLib import utils from CimTest.Globals import do_main, logger -from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import get_cs_instance +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import create_using_definesystem from XenKvmLib.common_util import call_request_state_change +from XenKvmLib.common_util import try_request_state_change +from XenKvmLib.common_util import poll_for_state_change +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool -sup_types = ['Xen', 'XenFV'] +sup_types = ['Xen', 'XenFV', 'KVM'] ACTIVE_STATE = 2 SUSPND_STATE = 9 -bug_req_state = "00002" -default_dom = 'test_domain' +default_dom = 'cs_test_domain' TIME = "00000000000000.000000:000" - -def check_attributes(domain_name, ip, en_state, rq_state, virt): - rc, cs = get_cs_instance(domain_name, ip, virt) - if rc != 0: - return rc - if cs.RequestedState != rq_state: - logger.error("RequestedState should be %d not %d", - rq_state, cs.RequestedState) - return XFAIL_RC(bug_req_state) - - if cs.EnabledState != en_state: - logger.error("EnabledState should be %d not %d", - en_state, cs.EnabledState) - return FAIL - - return PASS +err_no = pywbem.CIM_ERR_FAILED +err_desc = "Domain not running" @do_main(sup_types) def main(): options = main.options - status = FAIL + server = options.ip + virt = options.virt + + status, test_network = create_netpool_conf(server, virt, False) + if status != PASS: + return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ - ('Suspend', [SUSPND_STATE, SUSPND_STATE]), \ - ('Suspend', [SUSPND_STATE, SUSPND_STATE])] + ('Suspend', [SUSPND_STATE, SUSPND_STATE])] try: # define the vs status = create_using_definesystem(default_dom, - options.ip, - virt=options.virt) + server, + virt=virt) if status != PASS: - logger.error("Unable to define domain %s using DefineSystem()", \ - default_dom) + logger.error("Unable to define domain '%s' using DefineSystem()", + default_dom) return status - # start, suspend and suspend again + # start, suspend for action, state in tc_scen: en_state = state[0] rq_state = state[1] - status = call_request_state_change(default_dom, options.ip, - rq_state, TIME, options.virt) + status = call_request_state_change(default_dom, server, + rq_state, TIME, virt) if status != PASS: - logger.error("Unable to %s dom %s using \ -RequestedStateChange()", action, default_dom) + logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", + action, default_dom) break - # FIX ME - # sleep() + status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, + timeout=30) + if status != PASS: + break - status = check_attributes(default_dom, options.ip, - en_state, rq_state, options.virt) - if status != PASS: - logger.error("Attributes for dom %s not set as expected.", + if dom_cs.RequestedState != rq_state: + logger.error("RequestedState for dom '%s' is not set as expected.", default_dom) break except Exception, detail: - logger.error("Exception: %s", detail) + logger.error("Exception: '%s'", detail) status = FAIL - # undefine the vs - undefine_test_domain(default_dom, options.ip, options.virt) + if status != PASS: + destroy_netpool(server, virt, test_network) + destroy_and_undefine_domain(default_dom, server, virt) + return status + + # try to suspend already suspended VS + rq_state = SUSPND_STATE + status = try_request_state_change(default_dom, server, + rq_state, TIME, err_no, + err_desc, virt) + + destroy_netpool(server, virt, test_network) + destroy_and_undefine_domain(default_dom, server, virt) return status From deeptik at linux.vnet.ibm.com Mon Aug 4 06:28:44 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 03 Aug 2008 23:28:44 -0700 Subject: [Libvirt-cim] [PATCH 0 of 7] Changes to common_util.py library and test cases affected changes. Message-ID: 1) Fixed get_cs_instance() debug statement. 2) Moved the common code which tried to match the error to a new fn verify_err_desc(). 3) Added try_request_state_change() to verify the error conditions of RequestStateChange(). 4) Changed the poll_for_state_change() function to return cs instance along with the status. 5) Added KVM support to 23_suspend_suspend.py, 32_start_reboot.py, 33_suspend_reboot.py, 35_start_reset.py. 6) Fixing 06_paused_active_suspend.py tc. 7) Updated 09_procrasd_persist.py to accomdate the poll_for_state_change() changes. 8) Updated 01_migratable_host.py and 02_host_migrate_type.py to accomdate the poll_for_state_change() changes. For the tc to work on KVM, this patchset is dependent on the vsms library related changes submit as part of "Adding AllocationUnits field to MemRASD and updating the call to MemRASD in the libraries where it is accessed." patch. Signed-off-by: Deepti B. Kalakeri From deeptik at linux.vnet.ibm.com Mon Aug 4 06:28:46 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 03 Aug 2008 23:28:46 -0700 Subject: [Libvirt-cim] [PATCH 2 of 7] [TEST] Fixing the 06_paused_active_suspend.py tc of ComputerSystem In-Reply-To: Message-ID: <4ed904b18000ef148cb8.1217831326@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1217830288 25200 # Node ID 4ed904b18000ef148cb82e6b28729460970cca24 # Parent 5e9892634c019ddb4fb95abd47959ab3a5e67e0e [TEST] Fixing the 06_paused_active_suspend.py tc of ComputerSystem. 1) Updated the tc to use the poll_for_state_change() function. 2) Removed cxml.undefine() call since it was not req. 3) Fixed Indentation. 4) Removed the bug no 0002 since it is fixed. 5) Added create_netpool_conf(), destroy_netpool() The changes are verified with KVM, Xen, XenFV with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 5e9892634c01 -r 4ed904b18000 suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Sun Aug 03 23:07:11 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Sun Aug 03 23:11:28 2008 -0700 @@ -41,110 +41,100 @@ # Date :18-10-2007 import sys -from time import sleep from XenKvmLib import computersystem from XenKvmLib import vxml from VirtLib import utils from XenKvmLib.test_doms import destroy_and_undefine_all from CimTest.Globals import logger from CimTest.Globals import do_main -from XenKvmLib.common_util import call_request_state_change -from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.common_util import call_request_state_change, \ +poll_for_state_change +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool sup_types = ['Xen', 'KVM', 'XenFV'] test_dom = "DomST1" mem = 128 # MB -# Keeping the bug no for future reference -# bug_no_req_change_method = "90559" -bug_no_req_change_prop = "00002" START_STATE = 2 FINAL_STATE = 9 -REQUESTED_STATE = FINAL_STATE TIME = "00000000000000.000000:000" @do_main(sup_types) def main(): options = main.options status = FAIL + server = options.ip + virt = options.virt + + destroy_and_undefine_all(server) + status, test_network = create_netpool_conf(server, virt) + if status != PASS: + return FAIL - cxml = vxml.get_class(options.virt)(test_dom, mem) + cxml = vxml.get_class(virt)(test_dom, mem) -#Create VS + #Create VS try: - ret = cxml.create(options.ip) + ret = cxml.create(server) if not ret: - logger.error("ERROR: VS %s was not created" % test_dom) - return status - cs = computersystem.get_cs_class(options.virt)(options.ip, test_dom) - if cs.Name == test_dom: - from_State = cs.EnabledState - else: - logger.error("ERROR: VS %s not found" % test_dom) + logger.error("VS '%s' was not created" % test_dom) return status except Exception, detail: logger.error("Exception variable: %s" % detail) - cxml.destroy(options.ip) - cxml.undefine(options.ip) return status -#Suspend the VS - rc = call_request_state_change(test_dom, options.ip, REQUESTED_STATE, - TIME, options.virt) - if rc != 0: - logger.error("Unable to suspend dom %s using RequestedStateChange()", test_dom) - cxml.destroy(options.ip) - cxml.undefine(options.ip) - return status -#Polling for the value of EnabledState to be set to 9. -#We need to wait for the EnabledState to be set appropriately since -#it does not get set immediatley to value of 9 when suspended. - timeout = 10 - try: + status, dom_cs = poll_for_state_change(server, virt, test_dom, + START_STATE) - for i in range(1, (timeout + 1)): - sleep(1) - cs = computersystem.get_cs_class(options.virt)(options.ip, test_dom) - if cs.Name == test_dom: - to_RequestedState = cs.RequestedState - enabledState = cs.EnabledState - else: - logger.error("VS %s not found" % test_dom) - return status - if enabledState == FINAL_STATE: - status = PASS - break - - except Exception, detail: - logger.error("Exception variable: %s" % detail) + if status != PASS: + cxml.destroy(server) + destroy_netpool(server, virt, test_network) return status - if enabledState != FINAL_STATE: - logger.error("EnabledState has %i instead of %i", enabledState, FINAL_STATE) - logger.error("Try to increase the timeout and run the test again") + from_State = dom_cs.EnabledState + + #Suspend the VS + status = call_request_state_change(test_dom, server, FINAL_STATE, + TIME, virt) + if status != PASS: + logger.error("Unable to suspend dom '%s' using RequestedStateChange()", + test_dom) + cxml.destroy(server) + destroy_netpool(server, virt, test_network) + return status + + #Polling for the value of EnabledState to be set to 9. + #We need to wait for the EnabledState to be set appropriately since + #it does not get set immediatley to value of 9 when suspended. + status, dom_cs = poll_for_state_change(server, virt, test_dom, + FINAL_STATE, timeout=40) if status != PASS: - ret = cxml.destroy(options.ip) - cxml.undefine(options.ip) + cxml.destroy(server) + destroy_netpool(server, virt, test_network) return status -# Success: -# if -# From state == 9 -# To state == 2 -# Enabled_state == RequestedState + enabledState = dom_cs.EnabledState + to_RequestedState = dom_cs.RequestedState + + # Success: + # if + # From state == 2 + # To state == 9 + # Enabled_state == RequestedState if from_State == START_STATE and \ to_RequestedState == FINAL_STATE and \ - enabledState == to_RequestedState: + to_RequestedState == enabledState: status = PASS else: - logger.error("ERROR: VS %s transition from suspend State to Activate state \ - was not Successful" % test_dom) -# Replace the status with FAIL once the bug is fixed. - status = XFAIL_RC(bug_no_req_change_prop) - ret = cxml.destroy(options.ip) - cxml.undefine(options.ip) + logger.error("VS '%s' transition from Activate State to Suspend State" + " was not Successful" % test_dom) + status = FAIL + + cxml.destroy(server) + destroy_netpool(server, virt, test_network) + return status - if __name__ == "__main__": sys.exit(main()) From deeptik at linux.vnet.ibm.com Mon Aug 4 06:28:51 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 03 Aug 2008 23:28:51 -0700 Subject: [Libvirt-cim] [PATCH 7 of 7] [TEST] Added support for KVM to 35_start_reset.py of CS provider In-Reply-To: Message-ID: <56ae86dadb4d67ebcfce.1217831331@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1217830969 25200 # Node ID 56ae86dadb4d67ebcfce703e3895c7fb8a118c58 # Parent 2776112e3333225f5007bd359ec3c53d795ae90f [TEST] Added support for KVM to 35_start_reset.py of CS provider. 1) Added support for KVM 2) Removed the invalid bug nos. 3) Removed check_attributes() . 4) Adding create_netpool_conf(), destroy_netpool() since the VSMS now requires networkpool. 5) Used destroy_and_undefine_domain() to undefine and destroy the VS. 6) Used poll_for_state_change() to verify the poll and verify the EnabledState value and get RequestedState value. The changes are verified with KVM, Xen, XenFV with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 2776112e3333 -r 56ae86dadb4d suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Sun Aug 03 23:21:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Sun Aug 03 23:22:49 2008 -0700 @@ -4,6 +4,7 @@ # # Authors: # Anoop V Chakkalakkal +# Deepti B. Kalakeri # # # This library is free software; you can redistribute it and/or @@ -41,83 +42,74 @@ import sys from VirtLib import utils from CimTest.Globals import do_main, logger -from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from XenKvmLib.test_doms import undefine_test_domain +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import get_cs_instance from XenKvmLib.common_util import create_using_definesystem from XenKvmLib.common_util import call_request_state_change +from XenKvmLib.common_util import poll_for_state_change +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool -sup_types = ['Xen', 'XenFV'] +sup_types = ['Xen', 'XenFV', 'KVM'] ACTIVE_STATE = 2 RESET_STATE = 11 -bug_req_state = "00002" -default_dom = 'test_domain' +default_dom = 'cs_test_domain' TIME = "00000000000000.000000:000" - -def check_attributes(domain_name, ip, en_state, rq_state, virt): - rc, cs = get_cs_instance(domain_name, ip, virt) - if rc != 0: - return rc - if cs.RequestedState != rq_state: - logger.error("RequestedState should be %d not %d", - rq_state, cs.RequestedState) - return XFAIL_RC(bug_req_state) - - if cs.EnabledState != en_state: - logger.error("EnabledState should be %d not %d", - en_state, cs.EnabledState) - return FAIL - - return PASS @do_main(sup_types) def main(): options = main.options status = FAIL + server = options.ip + virt = options.virt - tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ + status, test_network = create_netpool_conf(server, virt, False) + if status != PASS: + return FAIL + + tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), ('Reset', [ACTIVE_STATE, RESET_STATE])] try: # define the vs - status = create_using_definesystem(default_dom, options.ip, - virt=options.virt) + status = create_using_definesystem(default_dom, server, + virt=virt) if status != PASS: - logger.error("Unable to define domain %s using DefineSystem()", \ - default_dom) + logger.error("Unable to define domain '%s' using DefineSystem()", + default_dom) return status # start and reset for action, state in tc_scen: en_state = state[0] rq_state = state[1] - status = call_request_state_change(default_dom, options.ip, + status = call_request_state_change(default_dom, server, rq_state, TIME, - virt=options.virt) + virt=virt) if status != PASS: - logger.error("Unable to %s dom %s using \ -RequestedStateChange()", action, default_dom) + logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", + action, default_dom) break - # FIX ME - # sleep() + status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, + timeout=30) + if status != PASS: + break - status = check_attributes(default_dom, options.ip, - en_state, rq_state, options.virt) - if status != PASS: - logger.error("Attributes for dom %s not set as expected.", + if dom_cs.RequestedState != rq_state: + logger.error("RequestedState for dom '%s' is not set as expected.", default_dom) break + except Exception, detail: logger.error("Exception: %s", detail) status = FAIL - # undefine the vs - undefine_test_domain(default_dom, options.ip, options.virt) - + destroy_netpool(server, virt, test_network) + destroy_and_undefine_domain(default_dom, server, virt) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Mon Aug 4 06:28:45 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 03 Aug 2008 23:28:45 -0700 Subject: [Libvirt-cim] [PATCH 1 of 7] [TEST] Adding verify_err_desc(), Modifying poll_for_state_change() and Fixing get_cs_instance() In-Reply-To: Message-ID: <5e9892634c019ddb4fb9.1217831325@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1217830031 25200 # Node ID 5e9892634c019ddb4fb95abd47959ab3a5e67e0e # Parent 00331e6468e447afad6ea78b96cf26f08d4582f4 [TEST] Adding verify_err_desc(), Modifying poll_for_state_change() and Fixing get_cs_instance(). 1) Fixed get_cs_instance() debug statement. 2) Moved the common code which tried to match the error to a new fn verify_err_desc(). 3) Added try_request_state_change() to verify the error conditions of RequestStateChange(). 4) Changed the poll_for_state_change() function to return cs instance along with the status. The changes are verified with KVM, Xen, XenFV with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 00331e6468e4 -r 5e9892634c01 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Aug 01 11:16:25 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Sun Aug 03 23:07:11 2008 -0700 @@ -33,7 +33,8 @@ from pywbem.cim_obj import CIMInstanceName from XenKvmLib.devices import CIM_Instance from XenKvmLib.classes import get_typed_class -from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE +from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE, \ +CIM_ERROR_GETINSTANCE from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from VirtLib.live import diskpool_list, virsh_version, net_list from XenKvmLib.vxml import PoolXML, NetXML @@ -57,7 +58,7 @@ return (1, cs) except Exception, detail: - logger.error(Globals.CIM_ERROR_GETINSTANCE, + logger.error(CIM_ERROR_GETINSTANCE, get_typed_class(virt, 'ComputerSystem')) logger.error("Exception: %s", detail) return (1, cs) @@ -122,10 +123,21 @@ return PASS +def verify_err_desc(exp_rc, exp_desc, err_no, err_desc): + if err_no == exp_rc and err_desc.find(exp_desc) >= 0: + logger.info("Got expected exception where ") + logger.info("Errno is '%s' ", exp_rc) + logger.info("Error string is '%s'", exp_desc) + return PASS + else: + logger.error("Unexpected rc code %s and description %s\n", + (err_no, err_desc)) + return FAIL + def call_request_state_change(domain_name, ip, rs, time, virt='Xen'): rc, cs = get_cs_instance(domain_name, ip, virt) if rc != 0: - return 1 + return FAIL try: cs.RequestStateChange(RequestedState=pywbem.cim_types.Uint16(rs), @@ -133,11 +145,27 @@ except Exception, detail: logger.error("Exception: %s" % detail) - return 1 + return FAIL - return 0 + return PASS + +def try_request_state_change(domain_name, ip, rs, time, exp_rc, + exp_desc, virt='Xen'): + rc, cs = get_cs_instance(domain_name, ip, virt) + if rc != 0: + return FAIL + + try: + cs.RequestStateChange(RequestedState=pywbem.cim_types.Uint16(rs), + TimeoutPeriod=pywbem.cim_types.CIMDateTime(time)) + + except Exception, (err_no, err_desc) : + return verify_err_desc(exp_rc, exp_desc, err_no, err_desc) + logger.error("RequestStateChange failed to generate an exception") + return FAIL def poll_for_state_change(server, virt, dom, exp_state, timeout=30): + dom_cs = None cs = computersystem.get_cs_class(virt) try: @@ -146,22 +174,22 @@ dom_cs = cs(server, name=dom) if dom_cs is None or dom_cs.Name != dom: logger.error("CS instance not returned for %s." % dom) - return FAIL + return FAIL, dom_cs if dom_cs.EnabledState == exp_state: break except Exception, detail: logger.error("Exception: %s" % detail) - return FAIL + return FAIL, dom_cs if dom_cs.EnabledState != exp_state: logger.error("EnabledState is %i instead of %i." % (dom_cs.EnabledState, exp_state)) logger.error("Try to increase the timeout and run the test again") - return FAIL + return FAIL, dom_cs - return PASS + return PASS, dom_cs def get_host_info(server, virt="Xen"): status = PASS @@ -191,20 +219,12 @@ try: assoc_info = conn.AssociatorNames(instanceref, \ AssocClass=assoc_classname) - except pywbem.CIMError, (err_no, desc): + except pywbem.CIMError, (err_no, err_desc): exp_rc = expr_values['rc'] exp_desc = expr_values['desc'] - if err_no == exp_rc and desc.find(exp_desc) >= 0: - logger.info("Got expected exception where ") - logger.info("Errno is '%s' ", exp_rc) - logger.info("Error string is '%s'", exp_desc) - return PASS - else: - logger.error("Unexpected rc code %s and description %s\n" \ - %(err_no, desc)) - return FAIL - logger.error("'%s' association failed to generate an exception and \ -'%s' passed.", assoc_classname, field_name) + return verify_err_desc(exp_rc, exp_desc, err_no, err_desc) + logger.error("'%s' association failed to generate an exception and" + " '%s' passed.", assoc_classname, field_name) return XFAIL_RC(bug_no) def try_getinstance(conn, classname, keys, field_name, expr_values, bug_no): @@ -213,20 +233,12 @@ instanceref = CIMInstanceName(classname, keybindings=keys) logger.info ("Instanceref is '%s'", instanceref) inst = conn.GetInstance(instanceref) - except pywbem.CIMError, (err_no, desc): + except pywbem.CIMError, (err_no, err_desc): exp_rc = expr_values['rc'] exp_desc = expr_values['desc'] - if err_no == exp_rc and desc.find(exp_desc) >= 0: - logger.info("Got expected exception where ") - logger.info("Errno is '%s' ", exp_rc) - logger.info("Error string is '%s'", exp_desc) - return PASS - else: - logger.error("Unexpected rc code %s and description %s\n" \ - %(err_no, desc)) - return FAIL - logger.error("'%s' GetInstance failed to generate an exception and \ -'%s' passed.", classname, field_name) + return verify_err_desc(exp_rc, exp_desc, err_no, err_desc) + logger.error("'%s' GetInstance failed to generate an exception and" + " '%s' passed.", classname, field_name) return XFAIL_RC(bug_no) def profile_init_list(): From deeptik at linux.vnet.ibm.com Mon Aug 4 12:20:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 04 Aug 2008 05:20:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the 40_RSC_start.py tc Message-ID: <6773c2717b6d2a1ccc31.1217852409@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1217851690 25200 # Node ID 6773c2717b6d2a1ccc3143a27bc2209dabc81e4b # Parent 56ae86dadb4d67ebcfce703e3895c7fb8a118c58 [TEST] Fixing the 40_RSC_start.py tc. 1) Used poll_for_state_change() to verify the poll and verify the EnabledState and RequestedState value. 2) Removed the invalid bug nos. 3) Removed check_attributes(). 4) Adding create_netpool_conf(), destroy_netpool() since the VSMS now requires networkpool. 5) Used destroy_and_undefine_domain() to undefine and destroy the VS. The changes are verified with KVM on current sources. Signed-off-by: Deepti B. Kalakeri diff -r 56ae86dadb4d -r 6773c2717b6d suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Sun Aug 03 23:22:49 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Mon Aug 04 05:08:10 2008 -0700 @@ -36,60 +36,49 @@ import sys import pywbem from VirtLib import utils -from XenKvmLib.test_doms import undefine_test_domain +from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import * from CimTest.Globals import logger from CimTest.Globals import do_main -from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'KVM', 'XenFV'] -bug = "00001" -bug_req_state = "00002" -default_dom = 'test_domain' +default_dom = 'cs_test_domain' REQUESTED_STATE = 2 TIME = "00000000000000.000000:000" - -def check_attributes(domain_name, ip, virt): - rc, cs = get_cs_instance(domain_name, ip, virt) - if rc != 0: - return rc - - if cs.RequestedState != REQUESTED_STATE: - logger.error("RequestedState should be %d not %d", - REQUESTED_STATE, cs.RequestedState) - return FAIL - - if cs.EnabledState != REQUESTED_STATE: - logger.error("EnabledState should be %d not %d", - REQUESTED_STATE, cs.EnabledState) - return FAIL - - return PASS @do_main(sup_types) def main(): options = main.options + server = options.ip + virt = options.virt status = FAIL + status, test_network = create_netpool_conf(server, virt, False) + if status != PASS: + return FAIL + try: - rc = create_using_definesystem(default_dom, options.ip, - virt=options.virt) + rc = create_using_definesystem(default_dom, server, + virt=virt) if rc != 0: - raise Exception("DefineSystem() failed to create domain: %s" % + status = FAIL + raise Exception("DefineSystem() failed to create domain: '%s'" % default_dom) - rc = call_request_state_change(default_dom, options.ip, - REQUESTED_STATE, TIME, options.virt) + rc = call_request_state_change(default_dom, server, + REQUESTED_STATE, TIME, virt) if rc != 0: - status = XFAIL_RC(bug) + status = FAIL raise Exception("RequestedStateChange() could not be used to start" " domain: '%s'" % default_dom) + status, dom_cs = poll_for_state_change(server, virt, default_dom, + REQUESTED_STATE, timeout=10) - rc = check_attributes(default_dom, options.ip, options.virt) - if rc != 0: - status = XFAIL_RC(bug_req_state) + if status != PASS or dom_cs.RequestedState != REQUESTED_STATE: + status = FAIL raise Exception("Attributes were not set as expected for " "domain: '%s'" % default_dom) else: @@ -98,8 +87,8 @@ except Exception, detail: logger.error("Exception: %s", detail) - undefine_test_domain(default_dom, options.ip, options.virt) - + destroy_netpool(server, virt, test_network) + destroy_and_undefine_domain(default_dom, server, virt) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Mon Aug 4 12:41:30 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 04 Aug 2008 05:41:30 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the missing status value for 23_suspend_suspend.py, 32_start_reboot.py, 33_suspend_reboot.py, 35_start_reset.py Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1217853560 25200 # Node ID afd9b3b300da23a72118942133d7791c0987573a # Parent 6773c2717b6d2a1ccc3143a27bc2209dabc81e4b [TEST] Fixing the missing status value for 23_suspend_suspend.py, 32_start_reboot.py, 33_suspend_reboot.py, 35_start_reset.py. 1) This is a followup patch for the patchset "Changes to common_util.py library and test cases affected changes." 2) Fixing the missing status value which was missed in the previous patch. Tested on KVM with current sources ONLY. PS: APPLY "Changes to common_util.py library and test cases affected changes." PATCH BEFORE THIS PATCHSET. Signed-off-by: Deepti B. Kalakeri diff -r 6773c2717b6d -r afd9b3b300da suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Mon Aug 04 05:08:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Mon Aug 04 05:39:20 2008 -0700 @@ -94,12 +94,10 @@ break status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, - timeout=30) - if status != PASS: - break - - if dom_cs.RequestedState != rq_state: - logger.error("RequestedState for dom '%s' is not set as expected.", + timeout=30) + if status != PASS or dom_cs.RequestedState != rq_state: + status = FAIL + logger.error("Attributes for dom '%s' is not set as expected.", default_dom) break diff -r 6773c2717b6d -r afd9b3b300da suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Aug 04 05:08:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Aug 04 05:39:20 2008 -0700 @@ -94,11 +94,10 @@ status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, timeout=10) - if status != PASS: - break - - if dom_cs.RequestedState != rq_state: - logger.error("RequestedState for dom '%s' is not set as expected.", + + if status != PASS or dom_cs.RequestedState != rq_state: + status = FAIL + logger.error("Attributes for dom '%s' is not set as expected.", default_dom) break diff -r 6773c2717b6d -r afd9b3b300da suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Mon Aug 04 05:08:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Mon Aug 04 05:39:20 2008 -0700 @@ -101,11 +101,9 @@ status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, timeout=10) - if status != PASS: - break - - if dom_cs.RequestedState != rq_state: - logger.error("RequestedState for dom '%s' is not set as expected.", + if status != PASS or dom_cs.RequestedState != rq_state: + status = FAIL + logger.error("Attributes for dom '%s' is not set as expected.", default_dom) break diff -r 6773c2717b6d -r afd9b3b300da suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Mon Aug 04 05:08:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Mon Aug 04 05:39:20 2008 -0700 @@ -95,11 +95,10 @@ status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, timeout=30) - if status != PASS: - break - if dom_cs.RequestedState != rq_state: - logger.error("RequestedState for dom '%s' is not set as expected.", + if status != PASS or dom_cs.RequestedState != rq_state: + status = FAIL + logger.error("Attributes for dom '%s' is not set as expected.", default_dom) break From danms at us.ibm.com Mon Aug 4 14:02:39 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 04 Aug 2008 07:02:39 -0700 Subject: [Libvirt-cim] [PATCH] Fix memory corruption in Virt_VSMigrationService In-Reply-To: (Jim Fehlig's message of "Fri, 01 Aug 2008 16:44:45 -0600") References: Message-ID: <87ej54q3nk.fsf@caffeine.beaverton.ibm.com> JF> According to uuid_unparse(3), the out param needs to accommodate JF> 37 bytes. This patch expands the uuid field of migration_job JF> structure to 37 bytes. Good call. However, in other places, we use the libvirt-defined symbol VIR_UUID_STRING_BUFLEN for this, which I think it probably more appropriate. In checking on this, I found another spot with the same incorrect magic number. I'll cook up a patch to fix both. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Mon Aug 4 14:07:20 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 04 Aug 2008 07:07:20 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add function to poll for a guest In-Reply-To: <4893591D.3030908@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Fri, 01 Aug 2008 11:42:37 -0700") References: <874p64u69o.fsf@caffeine.beaverton.ibm.com> <4893527A.9040109@linux.vnet.ibm.com> <87fxpor3qj.fsf@caffeine.beaverton.ibm.com> <4893591D.3030908@linux.vnet.ibm.com> Message-ID: <87abfsq3fr.fsf@caffeine.beaverton.ibm.com> KR> It's checking both virsh and the providers. The hack here is that KR> virsh doesn't hit the caching issue. So if virsh lists the guest, KR> then we poll until the providers see it. Oh, okay, I see it now. I had lost sight of what the other patch did. KR> Even still, the name is pretty poor. I'll think something else up and KR> resend. =) Well, I wonder if the other function needs a more clear name, since it's what actually polls both. That might make this function name make more sense. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Mon Aug 4 14:44:19 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 04 Aug 2008 07:44:19 -0700 Subject: [Libvirt-cim] [PATCH] Fix UUID string buffer length in a couple of spots Message-ID: <7ecbef9e2146cb2937c2.1217861059@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1217861057 25200 # Node ID 7ecbef9e2146cb2937c2cff27be0f2e4c75ea1cc # Parent fed521ebbf7d0b64a90036252f9e6c765d8b3105 Fix UUID string buffer length in a couple of spots Thanks to Jim Fehlig for pointing this out. Signed-off-by: Dan Smith diff -r fed521ebbf7d -r 7ecbef9e2146 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Thu Jul 31 07:25:33 2008 -0700 +++ b/src/Virt_VSMigrationService.c Mon Aug 04 07:44:17 2008 -0700 @@ -78,7 +78,7 @@ char *ref_ns; char *host; uint16_t type; - char uuid[33]; + char uuid[VIR_UUID_STRING_BUFLEN]; }; static CMPIStatus get_msd(const CMPIObjectPath *ref, diff -r fed521ebbf7d -r 7ecbef9e2146 src/Virt_VirtualSystemSnapshotService.c --- a/src/Virt_VirtualSystemSnapshotService.c Thu Jul 31 07:25:33 2008 -0700 +++ b/src/Virt_VirtualSystemSnapshotService.c Mon Aug 04 07:44:17 2008 -0700 @@ -51,7 +51,7 @@ struct snap_context { CMPIContext *context; char *domain; - char uuid[33]; + char uuid[VIR_UUID_STRING_BUFLEN]; char *save_path; char *ref_ns; char *ref_cn; From jfehlig at novell.com Mon Aug 4 14:48:53 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Mon, 04 Aug 2008 08:48:53 -0600 Subject: [Libvirt-cim] [PATCH] Fix UUID string buffer length in a couple of spots In-Reply-To: <7ecbef9e2146cb2937c2.1217861059@guaranine.danplanet.com> References: <7ecbef9e2146cb2937c2.1217861059@guaranine.danplanet.com> Message-ID: <489716D5.9030406@novell.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1217861057 25200 > # Node ID 7ecbef9e2146cb2937c2cff27be0f2e4c75ea1cc > # Parent fed521ebbf7d0b64a90036252f9e6c765d8b3105 > Fix UUID string buffer length in a couple of spots > +1 Thanks Dan! Jim From danms at us.ibm.com Mon Aug 4 17:36:29 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 04 Aug 2008 10:36:29 -0700 Subject: [Libvirt-cim] [PATCH] Make infostore compare the UUID of the domain to the one stored in the Message-ID: <91cffef5e2cbb19f956e.1217871389@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1217871367 25200 # Node ID 91cffef5e2cbb19f956e2969aacfd3fdab0d30b7 # Parent 3386917656ad569e226a846eea28793ecd852d0b Make infostore compare the UUID of the domain to the one stored in the store file, and if different, ignore all the information therein. This should make sure that if a domain is undefined and redefined with the same name, using other libvirt tools, the settings previously persisted by the providers will not be used for the new domain. Signed-off-by: Dan Smith diff -r 3386917656ad -r 91cffef5e2cb libxkutil/infostore.c --- a/libxkutil/infostore.c Mon Aug 04 10:28:30 2008 -0700 +++ b/libxkutil/infostore.c Mon Aug 04 10:36:07 2008 -0700 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -164,7 +165,7 @@ return size >= 0; } -struct infostore_ctx *infostore_open(virDomainPtr dom) +static struct infostore_ctx *_infostore_open(virDomainPtr dom) { struct infostore_ctx *isc; struct stat s; @@ -228,6 +229,58 @@ free(filename); return NULL; +} + +static struct infostore_ctx *delete_and_open(virDomainPtr dom) +{ + char *filename = NULL; + + filename = make_filename(dom); + if (filename == NULL) { + CU_DEBUG("Failed to make filename for domain"); + return NULL; + } + + if (unlink(filename) != 0) { + CU_DEBUG("Unable to delete %s: %m", filename); + } else { + CU_DEBUG("Deleted %s", filename); + } + + free(filename); + + return _infostore_open(dom); +} + +struct infostore_ctx *infostore_open(virDomainPtr dom) +{ + struct infostore_ctx *isc; + char uuid[VIR_UUID_STRING_BUFLEN]; + char *_uuid = NULL; + + isc = _infostore_open(dom); + if (isc == NULL) + return NULL; + + if (virDomainGetUUIDString(dom, uuid) != 0) { + CU_DEBUG("Failed to get UUID string for comparison"); + infostore_close(isc); + isc = delete_and_open(dom); + return isc; + } + + _uuid = infostore_get_str(isc, "uuid"); + if (_uuid == NULL) + goto out; + + if (!STREQ(uuid, _uuid)) { + infostore_close(isc); + isc = delete_and_open(dom); + } + out: + free(_uuid); + infostore_set_str(isc, "uuid", uuid); + return isc; } void infostore_close(struct infostore_ctx *ctx) From kaitlin at linux.vnet.ibm.com Mon Aug 4 18:16:57 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 04 Aug 2008 11:16:57 -0700 Subject: [Libvirt-cim] [PATCH] Make infostore compare the UUID of the domain to the one stored in the In-Reply-To: <91cffef5e2cbb19f956e.1217871389@guaranine.danplanet.com> References: <91cffef5e2cbb19f956e.1217871389@guaranine.danplanet.com> Message-ID: <48974799.2090600@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1217871367 25200 > # Node ID 91cffef5e2cbb19f956e2969aacfd3fdab0d30b7 > # Parent 3386917656ad569e226a846eea28793ecd852d0b > Make infostore compare the UUID of the domain to the one stored in the > store file, and if different, ignore all the information therein. > > This should make sure that if a domain is undefined and redefined with > the same name, using other libvirt tools, the settings previously persisted > by the providers will not be used for the new domain. > > Signed-off-by: Dan Smith > > diff -r 3386917656ad -r 91cffef5e2cb libxkutil/infostore.c +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Aug 4 19:24:19 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 04 Aug 2008 12:24:19 -0700 Subject: [Libvirt-cim] [PATCH 1 of 7] [TEST] Adding verify_err_desc(), Modifying poll_for_state_change() and Fixing get_cs_instance() In-Reply-To: <5e9892634c019ddb4fb9.1217831325@elm3b193.beaverton.ibm.com> References: <5e9892634c019ddb4fb9.1217831325@elm3b193.beaverton.ibm.com> Message-ID: <48975763.5050204@linux.vnet.ibm.com> > + > +def try_request_state_change(domain_name, ip, rs, time, exp_rc, > + exp_desc, virt='Xen'): > + rc, cs = get_cs_instance(domain_name, ip, virt) > + if rc != 0: > + return FAIL > + > + try: > + cs.RequestStateChange(RequestedState=pywbem.cim_types.Uint16(rs), > + TimeoutPeriod=pywbem.cim_types.CIMDateTime(time)) > + > + except Exception, (err_no, err_desc) : > + return verify_err_desc(exp_rc, exp_desc, err_no, err_desc) > + logger.error("RequestStateChange failed to generate an exception") > + return FAIL I think this is a special case and that we don't need a separate function for this. There will only be a few cases where this is used, I think. Or maybe it's possible to modify call_request_state_change(0 to handle errors? > > def poll_for_state_change(server, virt, dom, exp_state, timeout=30): > + dom_cs = None > cs = computersystem.get_cs_class(virt) > > try: > @@ -146,22 +174,22 @@ > dom_cs = cs(server, name=dom) > if dom_cs is None or dom_cs.Name != dom: > logger.error("CS instance not returned for %s." % dom) > - return FAIL > + return FAIL, dom_cs > > if dom_cs.EnabledState == exp_state: > break > > except Exception, detail: > logger.error("Exception: %s" % detail) > - return FAIL > + return FAIL, dom_cs > > if dom_cs.EnabledState != exp_state: > logger.error("EnabledState is %i instead of %i." % (dom_cs.EnabledState, > exp_state)) > logger.error("Try to increase the timeout and run the test again") > - return FAIL > + return FAIL, dom_cs > > - return PASS > + return PASS, dom_cs This is a good set of changes - thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Aug 4 19:44:18 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 04 Aug 2008 12:44:18 -0700 Subject: [Libvirt-cim] [PATCH 5 of 7] [TEST] Added KVM support to 32_start_reboot.py of CS In-Reply-To: <0da57be7b99849de1973.1217831329@elm3b193.beaverton.ibm.com> References: <0da57be7b99849de1973.1217831329@elm3b193.beaverton.ibm.com> Message-ID: <48975C12.7010002@linux.vnet.ibm.com> > @@ -41,72 +42,63 @@ > from VirtLib import utils > from CimTest.Globals import do_main, logger > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import get_cs_instance > +from XenKvmLib.test_doms import destroy_and_undefine_domain > from XenKvmLib.common_util import create_using_definesystem > from XenKvmLib.common_util import call_request_state_change > +from XenKvmLib.common_util import poll_for_state_change > +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool > > -sup_types = ['Xen', 'XenFV'] > +sup_types = ['Xen', 'XenFV', 'KVM'] > > +bug_req_state = "00002" Is this still an issue? Dan submitted a patch that should fix this. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Tue Aug 5 10:25:20 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 5 Aug 2008 18:25:20 +0800 Subject: [Libvirt-cim] Failed to create a KVM guest with real image Message-ID: Hi, I try to create a domain with real image in VT machine with RedHat 5 host system, but report error with following: virsh # start kvm libvir: QEMU error : internal error QEMU quit during console startup error: Failed to start domain kvm Here is the xml config. kvm66cd875c-62ab-11dd-b113-0011259da336hvm1310721destroyrestartdestroy/usr/bin/qemu Who knows why this fails for me? Thanks! Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Tue Aug 5 12:14:15 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 05 Aug 2008 05:14:15 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] #2 Fixing the tc 08_modifyresource.py and updating the others to accomdate the AllocationUnits field changes In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1217937888 25200 # Node ID c5f346ab79d7abab5e4b9d433cc89108d4265870 # Parent e58d58ab857cac9cad118eb517294ee1f4ece949 [TEST] #2 Fixing the tc 08_modifyresource.py and updating the others to accomdate the AllocationUnits field changes. Changes: ------- Patch 2: -------- 1) Reverted the changes to 08_modifyresource.py, since it is no longer required and the default values are assigned in the library for MemRASD. Hence the 08_modifyresource.py is no longer in the patch. Patch 1: -------- 1) Modified the tc to Pass appropriate values to AllocationUnits field. The changes are tested with KVM, Xen, XenFV on the current sources. Signed-off-by: Deepti B. Kalakeri diff -r e58d58ab857c -r c5f346ab79d7 suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py --- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Tue Aug 05 04:58:00 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Tue Aug 05 05:04:48 2008 -0700 @@ -78,7 +78,7 @@ def test_rasd(options, temp, test_size): drasd = drasd_class("hda", temp, default_dom) mrasd_class = vsms.get_masd_class(options.virt) - mrasd = mrasd_class(32, default_dom) + mrasd = mrasd_class(name=default_dom, megabytes=32) params = { "vssd" : vssd.mof(), diff -r e58d58ab857c -r c5f346ab79d7 suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Tue Aug 05 04:58:00 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Tue Aug 05 05:04:48 2008 -0700 @@ -47,10 +47,8 @@ values = [ def try_define(options, vssd, units, value): mrasd_class = vsms.get_masd_class(options.virt) - mrasd = mrasd_class(None, default_dom) - - mrasd.AllocationUnits = units - mrasd.VirtualQuantity = value + mrasd = mrasd_class(megabytes=value, mallocunits=units, + name=default_dom) params = { "vssd" : vssd.mof(), From deeptik at linux.vnet.ibm.com Tue Aug 5 12:14:14 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 05 Aug 2008 05:14:14 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] #2 Adding AllocationUnits field to MemRASD and updating the call to MemRASD in the libraries where it is accessed In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1217937480 25200 # Node ID e58d58ab857cac9cad118eb517294ee1f4ece949 # Parent 60a06040f18db61947039512028c75faf450ceb5 [TEST] #2 Adding AllocationUnits field to MemRASD and updating the call to MemRASD in the libraries where it is accessed. Changes -------- Patch 2: -------- 1) Added default values to MemRASD properties. Patch 1: -------- 1) Initalised the MemRASD AllocationUnits. These changes are required to accomdate the recent RASD provider changes. The changes are tested with KVM, Xen, XenFV on the current sources. Signed-off-by: Deepti B. Kalakeri diff -r 60a06040f18d -r e58d58ab857c suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Jul 31 22:37:11 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Aug 05 04:58:00 2008 -0700 @@ -49,6 +49,7 @@ default_domname = 'domU1' default_domname = 'domU1' default_memory = 128 default_vcpus = 1 +default_mallocunits="MegaBytes" _image_dir = '/tmp' diff -r 60a06040f18d -r e58d58ab857c suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Thu Jul 31 22:37:11 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Aug 05 04:58:00 2008 -0700 @@ -203,11 +203,14 @@ def get_pasd_class(virt): pass class CIM_MemResourceAllocationSettingData(CIMClassMOF): - def __init__(self, megabytes, name): + def __init__(self, name, megabytes=512, mallocunits="MegaBytes"): self.ResourceType = RASD_TYPE_MEM if megabytes != None: self.VirtualQuantity = megabytes + + if mallocunits != None: + self.AllocationUnits = mallocunits if name != None: self.InstanceID = '%s/mem' % name @@ -232,6 +235,7 @@ def default_vssd_rasd_str(dom_name='test net_mac=const.Xen_default_mac, proc_vcpu=1, mem_mb=512, + malloc_units="MegaBytes", virt='Xen'): class_vssd = get_vssd_class(virt) vssd = class_vssd(name=dom_name, virt=virt) @@ -258,6 +262,7 @@ def default_vssd_rasd_str(dom_name='test class_masd = get_masd_class(virt) m = class_masd( megabytes=mem_mb, + mallocunits=malloc_units, name=dom_name) if virt == 'LXC': return vssd.mof(), [d.mof(), m.mof()] diff -r 60a06040f18d -r e58d58ab857c suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jul 31 22:37:11 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Aug 05 04:58:00 2008 -0700 @@ -498,7 +498,7 @@ class VirtXML(Virsh, XMLClass): class VirtCIM: def __init__(self, virt, dom_name, disk_dev, disk_source, - net_type, net_mac, vcpus, mem): + net_type, net_mac, vcpus, mem, mem_allocunits): self.virt = virt self.domain_name = dom_name self.vssd = vsms.get_vssd_class(virt)(name=dom_name, virt=virt) @@ -509,7 +509,9 @@ class VirtCIM: mac=net_mac, name=dom_name) self.pasd = vsms.get_pasd_class(virt)(vcpu=vcpus, name=dom_name) - self.masd = vsms.get_masd_class(virt)(megabytes=mem, name=dom_name) + self.masd = vsms.get_masd_class(virt)(megabytes=mem, + mallocunits=mem_allocunits, + name=dom_name) def cim_define(self, ip): service = vsms.get_vsms_class(self.virt)(ip) @@ -552,6 +554,7 @@ class XenXML(VirtXML, VirtCIM): def __init__(self, test_dom=const.default_domname, mem=const.default_memory, + mem_allocunits=const.default_mallocunits, vcpus=const.default_vcpus, mac=const.Xen_default_mac, disk_file_path=const.Xen_disk_path, @@ -567,7 +570,7 @@ class XenXML(VirtXML, VirtCIM): self._devices(disk_file_path, disk, ntype, mac) VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path, - ntype, mac, vcpus, mem) + ntype, mac, vcpus, mem, mem_allocunits) def _os(self, os_kernel, os_initrd): os = self.get_node('/domain/os') From deeptik at linux.vnet.ibm.com Tue Aug 5 12:14:13 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 05 Aug 2008 05:14:13 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Adding AllocationUnits field to MemRASD and updating the call to MemRASD in the libraries where it is accessed. Message-ID: 1) Initalised the MemRASD AllocationUnits and added default values to MemRASD properties. 2) Modified the tc to Pass appropriate values to AllocationUnits field. From deeptik at linux.vnet.ibm.com Tue Aug 5 12:41:01 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 05 Aug 2008 18:11:01 +0530 Subject: [Libvirt-cim] [PATCH 5 of 7] [TEST] Added KVM support to 32_start_reboot.py of CS In-Reply-To: <48975C12.7010002@linux.vnet.ibm.com> References: <0da57be7b99849de1973.1217831329@elm3b193.beaverton.ibm.com> <48975C12.7010002@linux.vnet.ibm.com> Message-ID: <48984A5D.5010604@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> @@ -41,72 +42,63 @@ >> from VirtLib import utils >> from CimTest.Globals import do_main, logger >> from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC >> -from XenKvmLib.test_doms import undefine_test_domain >> -from XenKvmLib.common_util import get_cs_instance >> +from XenKvmLib.test_doms import destroy_and_undefine_domain >> from XenKvmLib.common_util import create_using_definesystem >> from XenKvmLib.common_util import call_request_state_change >> +from XenKvmLib.common_util import poll_for_state_change >> +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool >> >> -sup_types = ['Xen', 'XenFV'] >> +sup_types = ['Xen', 'XenFV', 'KVM'] >> >> +bug_req_state = "00002" > > Is this still an issue? Dan submitted a patch that should fix this. > For a KVM guest the RequestedStateChange() fails to reboot the VS. Here is the error which occurs when we try to reboot a KVM guest. libvir: error : this function is not supported by the hypervisor: virDomainReboot error: Failed to reboot domain cs_test_domain Here is the XML config file which I used to create the guest. a980e2f5-48a6-48d9-a71b-e90939849c7a cs_test_domain destroy destroy hvm 524288 524288 1 I had already informed about this particular problem in the previous mail "Need CS state transition related info." Thanks and Regards, Deepti. From kaitlin at linux.vnet.ibm.com Tue Aug 5 14:41:18 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 05 Aug 2008 07:41:18 -0700 Subject: [Libvirt-cim] [PATCH 5 of 7] [TEST] Added KVM support to 32_start_reboot.py of CS In-Reply-To: <48984A5D.5010604@linux.vnet.ibm.com> References: <0da57be7b99849de1973.1217831329@elm3b193.beaverton.ibm.com> <48975C12.7010002@linux.vnet.ibm.com> <48984A5D.5010604@linux.vnet.ibm.com> Message-ID: <4898668E.4030208@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Kaitlin Rupert wrote: >>> @@ -41,72 +42,63 @@ >>> from VirtLib import utils >>> from CimTest.Globals import do_main, logger >>> from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC >>> -from XenKvmLib.test_doms import undefine_test_domain >>> -from XenKvmLib.common_util import get_cs_instance >>> +from XenKvmLib.test_doms import destroy_and_undefine_domain >>> from XenKvmLib.common_util import create_using_definesystem >>> from XenKvmLib.common_util import call_request_state_change >>> +from XenKvmLib.common_util import poll_for_state_change >>> +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool >>> >>> -sup_types = ['Xen', 'XenFV'] >>> +sup_types = ['Xen', 'XenFV', 'KVM'] >>> >>> +bug_req_state = "00002" >> >> Is this still an issue? Dan submitted a patch that should fix this. >> > For a KVM guest the RequestedStateChange() fails to reboot the VS. > Here is the error which occurs when we try to reboot a KVM guest. > libvir: error : this function is not supported by the hypervisor: > virDomainReboot > error: Failed to reboot domain cs_test_domain > > > I had already informed about this particular problem in the previous > mail "Need CS state transition related info." > I think there should be a different bug number for this. Bug 00002 was because the providers were persisting the state properly. This particular issue is because libvirt doesn't support reboot for KVM, and the provider isn't handling the reboot on its own. Can you add a different bug number to the wiki and change the bug number in the test? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Aug 5 15:22:54 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 05 Aug 2008 20:52:54 +0530 Subject: [Libvirt-cim] [PATCH 5 of 7] [TEST] Added KVM support to 32_start_reboot.py of CS In-Reply-To: <4898668E.4030208@linux.vnet.ibm.com> References: <0da57be7b99849de1973.1217831329@elm3b193.beaverton.ibm.com> <48975C12.7010002@linux.vnet.ibm.com> <48984A5D.5010604@linux.vnet.ibm.com> <4898668E.4030208@linux.vnet.ibm.com> Message-ID: <4898704E.40301@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B Kalakeri wrote: >> >> >> Kaitlin Rupert wrote: >>>> @@ -41,72 +42,63 @@ >>>> from VirtLib import utils >>>> from CimTest.Globals import do_main, logger >>>> from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC >>>> -from XenKvmLib.test_doms import undefine_test_domain >>>> -from XenKvmLib.common_util import get_cs_instance >>>> +from XenKvmLib.test_doms import destroy_and_undefine_domain >>>> from XenKvmLib.common_util import create_using_definesystem >>>> from XenKvmLib.common_util import call_request_state_change >>>> +from XenKvmLib.common_util import poll_for_state_change >>>> +from XenKvmLib.common_util import create_netpool_conf, >>>> destroy_netpool >>>> >>>> -sup_types = ['Xen', 'XenFV'] >>>> +sup_types = ['Xen', 'XenFV', 'KVM'] >>>> >>>> +bug_req_state = "00002" >>> >>> Is this still an issue? Dan submitted a patch that should fix this. >>> >> For a KVM guest the RequestedStateChange() fails to reboot the VS. >> Here is the error which occurs when we try to reboot a KVM guest. >> libvir: error : this function is not supported by the hypervisor: >> virDomainReboot >> error: Failed to reboot domain cs_test_domain >> > >> >> I had already informed about this particular problem in the previous >> mail "Need CS state transition related info." >> > > I think there should be a different bug number for this. Bug 00002 was > because the providers were persisting the state properly. This > particular issue is because libvirt doesn't support reboot for KVM, > and the provider isn't handling the reboot on its own. Since this was related to RSC() call I thought of using the existing bug number and I know this bug no could be misleading. Also, I was not sure if I could create a new one. > > Can you add a different bug number to the wiki and change the bug > number in the test? Yeah sure, I will update the wiki with the new bug number and send a new patch. > > Thanks! From yunguol at cn.ibm.com Wed Aug 6 02:41:33 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 05 Aug 2008 19:41:33 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one Message-ID: # HG changeset patch # User root at elm3b197.beaverton.ibm.com # Date 1217987020 25200 # Node ID f50bfc180219f6cca02e73b55ec4472b07bc64ac # Parent 3add446da91108d419ce8adae434ebc78039fa34 [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one Signed-off-by: Guolian Yun diff -r 3add446da911 -r f50bfc180219 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05 08:59:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05 18:43:40 2008 -0700 @@ -171,7 +171,7 @@ def main(): if status != PASS: return status - status, test_network = create_netpool_conf(server, virt) + status, test_network = create_netpool_conf(server, virt, use_existing=True) if status != PASS: return status @@ -184,7 +184,6 @@ def main(): return status cleanup_restore(server, virt) - destroy_netpool(server, virt, test_network) vsxml.undefine(server) return status From yunguol at cn.ibm.com Wed Aug 6 02:47:09 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 05 Aug 2008 19:47:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ResourceAllocationFromPool.01, use existing Networkpool instead of creating a new one Message-ID: <50d6db48dd8f95bf8464.1217990829@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1217990822 25200 # Node ID 50d6db48dd8f95bf84644dbb2f120a89241151c7 # Parent 3add446da91108d419ce8adae434ebc78039fa34 [TEST] Fix ResourceAllocationFromPool.01, use existing Networkpool instead of creating a new one Signed-off-by: Guolian Yun diff -r 3add446da911 -r 50d6db48dd8f suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Tue Aug 05 08:59:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Tue Aug 05 19:47:02 2008 -0700 @@ -121,7 +121,8 @@ def main(): vsxml.undefine(options.ip) return status - status, test_network = create_netpool_conf(options.ip, options.virt) + status, test_network = create_netpool_conf(options.ip, options.virt, + use_existing=True) if status != PASS: cleanup_restore(options.ip, options.virt) vsxml.undefine(options.ip) @@ -152,7 +153,6 @@ def main(): break cleanup_restore(options.ip, options.virt) - destroy_netpool(options.ip, options.virt, test_network) vsxml.undefine(options.ip) return status From yunguol at cn.ibm.com Wed Aug 6 05:01:09 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 6 Aug 2008 13:01:09 +0800 Subject: [Libvirt-cim] Cimtest Report for KVM on F9 with current sources (2008/08/06) Message-ID: Kernel : kernel-2.6.25-0.121.rc5.git4.fc9.x86_64 Libvirt : libvirt-0.4.4 CIMOM : sblim-sfcb-1.3.0 PyWBEM : pywbem-0.6 CIM Schema : cimv216Experimental LibCMPIutil : 83 LibVirtCIM : 660 CIMTEST : 283 ========================================================= PASS : 110 FAILED : 6 XFAIL : 3 SKIP : 14 Total : 133 =======================FAILED============================== ResourceAllocationFromPool - 01_forward.py: FAIL ERROR - Return NULL, expect at least one instance This fails because of NetworkPool, a patch on the way. ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(CreateResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(CreateChildResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(RemoveResourcesFromResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(DeleteResourcePool): The requested operation is not supported VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL ERROR - destroy_fail>> noname: Error executing DestroySystem ERROR - (1, u'Unable to retrieve domain name.') ERROR - destroy_fail>> nonexistent: Error executing DestroySystem ERROR - (1, u'Failed to find domain') InvokeMethod(DestroySystem): Unable to retrieve domain name. InvokeMethod(DestroySystem): Failed to find domain =======================CIMTEST REPORT======================= Cleaned log files. Testing KVM hypervisor AllocationCapabilities - 01_enum.py: PASS AllocationCapabilities - 02_alloccap_gi_errs.py: PASS ComputerSystem - 01_enum.py: PASS ComputerSystem - 02_nosystems.py: SKIP ERROR - System has defined domains; unable to run ComputerSystem - 03_defineVS.py: PASS ComputerSystem - 04_defineStartVS.py: PASS ComputerSystem - 05_activate_defined_start.py: PASS ComputerSystem - 06_paused_active_suspend.py: PASS ComputerSystem - 22_define_suspend.py: SKIP ERROR - Need to give different bridge name since it already exists ComputerSystem - 23_suspend_suspend.py: PASS ComputerSystem - 27_define_suspend_errs.py: SKIP ComputerSystem - 32_start_reboot.py: XFAIL Bug: 00002 ERROR - Exception: (1, u'Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): Domain Operation Failed Bug:<00002> ComputerSystem - 33_suspend_reboot.py: XFAIL Bug: 00002 ERROR - Exception: (1, u'Domain not running') ERROR - Unable to 'Reboot' dom 'test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): Domain not running Bug:<00002> ComputerSystem - 35_start_reset.py: PASS ComputerSystem - 40_RSC_start.py: PASS ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystem - 42_cs_gi_errs.py: PASS ComputerSystemIndication - 01_created_indication.py: PASS ElementAllocatedFromPool - 01_forward.py: PASS ElementAllocatedFromPool - 02_reverse.py: PASS ElementAllocatedFromPool - 03_reverse_errs.py: PASS ElementAllocatedFromPool - 04_forward_errs.py: PASS ElementCapabilities - 01_forward.py: PASS ElementCapabilities - 02_reverse.py: PASS ElementCapabilities - 03_forward_errs.py: PASS ElementCapabilities - 04_reverse_errs.py: PASS ElementCapabilities - 05_hostsystem_cap.py: PASS ElementConforms - 01_forward.py: PASS ElementConforms - 02_reverse.py: PASS ElementConforms - 03_ectp_fwd_errs.py: PASS ElementConforms - 04_ectp_rev_errs.py: PASS ElementSettingData - 01_forward.py: PASS ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS EnabledLogicalElementCapabilities - 01_enum.py: PASS EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS HostSystem - 01_enum.py: PASS HostSystem - 02_hostsystem_to_rasd.py: PASS HostSystem - 03_hs_to_settdefcap.py: PASS HostSystem - 04_hs_to_EAPF.py: PASS HostSystem - 05_hs_gi_errs.py: PASS HostSystem - 06_hs_to_vsms.py: PASS HostedDependency - 01_forward.py: PASS HostedDependency - 02_reverse.py: PASS HostedDependency - 03_enabledstate.py: PASS HostedDependency - 04_reverse_errs.py: PASS HostedResourcePool - 01_forward.py: PASS HostedResourcePool - 02_reverse.py: PASS HostedResourcePool - 03_forward_errs.py: PASS HostedResourcePool - 04_reverse_errs.py: PASS HostedService - 01_forward.py: PASS HostedService - 02_reverse.py: PASS HostedService - 03_forward_errs.py: PASS HostedService - 04_reverse_errs.py: PASS LogicalDisk - 01_disk.py: PASS LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run LogicalDisk - 03_ld_gi_errs.py: PASS Memory - 01_memory.py: PASS Memory - 02_defgetmem.py: PASS Memory - 03_mem_gi_errs.py: PASS NetworkPort - 01_netport.py: PASS NetworkPort - 02_np_gi_errors.py: PASS NetworkPort - 03_user_netport.py: PASS Processor - 01_processor.py: PASS Processor - 02_definesys_get_procs.py: PASS Processor - 03_proc_gi_errs.py: PASS Profile - 01_enum.py: PASS Profile - 02_profile_to_elec.py: SKIP Profile - 03_rprofile_gi_errs.py: PASS RASD - 01_verify_rasd_fields.py: PASS RASD - 02_enum.py: PASS RASD - 03_rasd_errs.py: PASS RASD - 04_disk_rasd_size.py: PASS ReferencedProfile - 01_verify_refprof.py: PASS ReferencedProfile - 02_refprofile_errs.py: PASS ResourceAllocationFromPool - 01_forward.py: FAIL ERROR - Return NULL, expect at least one instance ResourceAllocationFromPool - 02_reverse.py: SKIP ERROR - Need to give different bridge name since it already exists ResourceAllocationFromPool - 03_forward_errs.py: PASS ResourceAllocationFromPool - 04_reverse_errs.py: PASS ResourceAllocationFromPool - 05_RAPF_err.py: PASS ResourcePool - 01_enum.py: PASS ResourcePool - 02_rp_gi_errors.py: PASS ResourcePoolConfigurationCapabilities - 01_enum.py: PASS ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS ResourcePoolConfigurationService - 01_enum.py: PASS ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(CreateResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(CreateChildResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(RemoveResourcesFromResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(DeleteResourcePool): The requested operation is not supported SettingsDefine - 01_forward.py: PASS SettingsDefine - 02_reverse.py: PASS SettingsDefine - 03_sds_fwd_errs.py: PASS SettingsDefine - 04_sds_rev_errs.py: PASS SettingsDefineCapabilities - 01_forward.py: SKIP ERROR - Need to give different bridge name since it already exists SettingsDefineCapabilities - 03_forward_errs.py: XFAIL Bug: Test error: returned XFAIL without a valid bug string. ERROR - 'KVM_SettingsDefineCapabilities' association failed to generate an exception and 'WrongClassName' passed. ERROR - ------ FAILED: Invalid CCName Key Name.------ Bug:<> SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS SystemDevice - 01_forward.py: PASS SystemDevice - 02_reverse.py: PASS SystemDevice - 03_fwderrs.py: PASS VSSD - 01_enum.py: PASS VSSD - 02_bootldr.py: SKIP VSSD - 03_vssd_gi_errs.py: PASS SD - 04_vssd_to_rasd.py: PASS VirtualSystemManagementCapabilities - 01_enum.py: PASS VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS VirtualSystemManagementService - 01_definesystem_name.py: PASS VirtualSystemManagementService - 02_destroysystem.py: PASS VirtualSystemManagementService - 03_definesystem_ess.py: PASS VirtualSystemManagementService - 04_definesystem_ers.py: PASS VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL InvokeMethod(DestroySystem): Unable to retrieve domain name. InvokeMethod(DestroySystem): Failed to find domain VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemManagementService - 07_addresource_neg.py: PASS VirtualSystemManagementService - 08_modifyresource.py: PASS VirtualSystemManagementService - 09_procrasd_persist.py: SKIP VirtualSystemManagementService - 10_hv_version.py: PASS VirtualSystemManagementService - 11_define_memrasdunits.py: PASS VirtualSystemMigrationCapabilities - 01_enum.py: PASS VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP VirtualSystemMigrationSettingData - 01_enum.py: PASS VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS VirtualSystemSettingDataComponent - 01_forward.py: PASS VirtualSystemSettingDataComponent - 02_reverse.py: PASS VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS VirtualSystemSnapshotService - 01_enum.py: PASS VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Wed Aug 6 09:07:31 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 06 Aug 2008 14:37:31 +0530 Subject: [Libvirt-cim] CimTest Report for KVM on F9 06-08-2008 Message-ID: <489969D3.5040704@linux.vnet.ibm.com> ======================================================================== CIM Test Report for KVM on F9 with latest libvirt-cim and libcmpiutil ======================================================================== Distro : Fedora 9 Beta Kernel : 2.6.25-0.121.rc5.git4.fc9 Libvirt : libvirt-0.4.2-1.fc9.x86_64 CIMOM : pegasus PyWBEM : pywbem-0.6 CIM Schema : cimv216Experimental LibCMPIutil : 83 LibVirtCIM : 660 CIMTEST : 282 ======================================================= PASS : 120 FAIL : 4 XFAIL : 2 SKIP : 7 ----------------- Total : 133 ======================================================= Here is one of the tc that failed: ComputerSystemIndication - 01_created_indication.py: FAIL Need to verify this. ResourceAllocationFromPool - 01_forward.py: FAIL ResourceAllocationFromPool - 02_reverse.py: FAIL Fix for this is submitted by Daisy. This tc passed when run manually. HostSystem - 04_hs_to_EAPF.py: FAIL Please find the complete report attached with the mail. Thanks and Regards, Deepti. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Aug6-KVM-report URL: From deeptik at linux.vnet.ibm.com Wed Aug 6 09:50:02 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 06 Aug 2008 15:20:02 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one In-Reply-To: References: Message-ID: <489973CA.2010501@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User root at elm3b197.beaverton.ibm.com > # Date 1217987020 25200 > # Node ID f50bfc180219f6cca02e73b55ec4472b07bc64ac > # Parent 3add446da91108d419ce8adae434ebc78039fa34 > [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one > > Signed-off-by: Guolian Yun > > diff -r 3add446da911 -r f50bfc180219 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05 08:59:29 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05 18:43:40 2008 -0700 > @@ -171,7 +171,7 @@ def main(): > if status != PASS: > return status > > - status, test_network = create_netpool_conf(server, virt) > + status, test_network = create_netpool_conf(server, virt, use_existing=True) > This fix works fine for this test case. The actual reason for this test case to fail is bcs of the difference in the networkpool used to define the guest and the pool used in the create_netpool_conf(). If we see the _set_vbridge() or set_vnetwork() of the vxml.py they make use of the networkpool/bridge information if they already exist or they create one, see below: def _set_vbridge(self, ip, virt_type): network_list = live.net_list(ip, virt=virt_type) if len(network_list) > 0: vbr = live.get_bridge_from_network_xml(network_list[0], ip, virt = virt_type) else: logger.info('No virutal network found') logger.info('Trying to create one ......') netxml = NetXML(ip, virt=virt_type) .................... AND def set_vnetwork(self, interface, virt_type): network_list = live.net_list(CIM_IP, virt_type) if len(network_list) > 0: nname = network_list[0] else: logger.info('No virutal network found') logger.info('Trying to create one ......') netxml = NetXML(CIM_IP, virt=virt_type) ret = netxml.create_vnet() 1) We might have to sync the function _set_vbridge() and set_vnetwork() to something similar to create_netpool_conf() funtion. OR And also, we do not need create_netpool_conf() in this test case as the call to vxml.define will internally call set_interface_details() and assign the network information accordingly. 2) Removing the create_netpool_conf() and either getting the bridge name using xml_get_net_bridge() or network name info by using xml_get_net_network() will also solve the failure seen in the test case. I think we should go with the approach 2 to solve the above test case problem, any thoughts ?? Thanks and Regards, Deepti. > if status != PASS: > return status > > @@ -184,7 +184,6 @@ def main(): > return status > > cleanup_restore(server, virt) > - destroy_netpool(server, virt, test_network) > vsxml.undefine(server) > return status > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Wed Aug 6 10:09:25 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 06 Aug 2008 15:39:25 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ResourceAllocationFromPool.01, use existing Networkpool instead of creating a new one In-Reply-To: <50d6db48dd8f95bf8464.1217990829@elm3b217.beaverton.ibm.com> References: <50d6db48dd8f95bf8464.1217990829@elm3b217.beaverton.ibm.com> Message-ID: <48997855.7080908@linux.vnet.ibm.com> Same comments as given for RAFP.02 . See my reply for "Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one" Regards, Deepti. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1217990822 25200 > # Node ID 50d6db48dd8f95bf84644dbb2f120a89241151c7 > # Parent 3add446da91108d419ce8adae434ebc78039fa34 > [TEST] Fix ResourceAllocationFromPool.01, use existing Networkpool instead of creating a new one > > Signed-off-by: Guolian Yun > > diff -r 3add446da911 -r 50d6db48dd8f suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py > --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Tue Aug 05 08:59:29 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Tue Aug 05 19:47:02 2008 -0700 > @@ -121,7 +121,8 @@ def main(): > vsxml.undefine(options.ip) > return status > > - status, test_network = create_netpool_conf(options.ip, options.virt) > + status, test_network = create_netpool_conf(options.ip, options.virt, > + use_existing=True) > if status != PASS: > cleanup_restore(options.ip, options.virt) > vsxml.undefine(options.ip) > @@ -152,7 +153,6 @@ def main(): > break > > cleanup_restore(options.ip, options.virt) > - destroy_netpool(options.ip, options.virt, test_network) > vsxml.undefine(options.ip) > return status > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Wed Aug 6 10:12:31 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 06 Aug 2008 15:42:31 +0530 Subject: [Libvirt-cim] Cimtest Report for KVM on F9 with current sources (2008/08/06) In-Reply-To: References: Message-ID: <4899790F.4050802@linux.vnet.ibm.com> Guo Lian Yun wrote: > > Kernel : kernel-2.6.25-0.121.rc5.git4.fc9.x86_64 > Libvirt : libvirt-0.4.4 > CIMOM : sblim-sfcb-1.3.0 > PyWBEM : pywbem-0.6 > CIM Schema : cimv216Experimental > LibCMPIutil : 83 > LibVirtCIM : 660 > CIMTEST : 283 > ========================================================= > PASS : 110 > FAILED : 6 > XFAIL : 3 > SKIP : 14 > > Total : 133 > =======================FAILED============================== > ResourceAllocationFromPool - 01_forward.py: FAIL > ERROR - Return NULL, expect at least one instance > > This fails because of NetworkPool, a patch on the way. > > ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL > ERROR - Unexpected rc code 7 and description The requested operation > is not supported > InvokeMethod(CreateResourcePool): The requested operation is not > supported > > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL > ERROR - Unexpected rc code 7 and description The requested operation > is not supported > InvokeMethod(CreateChildResourcePool): The requested operation is not > supported > > ResourcePoolConfigurationService - > 06_RemoveResourcesFromResourcePool.py: FAIL > ERROR - Unexpected rc code 7 and description The requested operation > is not supported > InvokeMethod(RemoveResourcesFromResourcePool): The requested operation > is not supported > > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL > ERROR - Unexpected rc code 7 and description The requested operation > is not supported > InvokeMethod(DeleteResourcePool): The requested operation is not > supported > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > ERROR - destroy_fail>> noname: Error executing DestroySystem > ERROR - (1, u'Unable to retrieve domain name.') > ERROR - destroy_fail>> nonexistent: Error executing DestroySystem > ERROR - (1, u'Failed to find domain') > InvokeMethod(DestroySystem): Unable to retrieve domain name. > InvokeMethod(DestroySystem): Failed to find domain The RPCS and VSMS tc did not fail for me with pegasus with the latest 660 libvirt-cim. Did these fail even when run manually ? Thanks and Regards, Deepti. From yunguol at cn.ibm.com Wed Aug 6 10:33:31 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 6 Aug 2008 18:33:31 +0800 Subject: [Libvirt-cim] Cimtest Report for KVM on F9 with current sources (2008/08/06) In-Reply-To: <4899790F.4050802@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-06 18:12:31: > > > Guo Lian Yun wrote: > > > > Kernel : kernel-2.6.25-0.121.rc5.git4.fc9.x86_64 > > Libvirt : libvirt-0.4.4 > > CIMOM : sblim-sfcb-1.3.0 > > PyWBEM : pywbem-0.6 > > CIM Schema : cimv216Experimental > > LibCMPIutil : 83 > > LibVirtCIM : 660 > > CIMTEST : 283 > > ========================================================= > > PASS : 110 > > FAILED : 6 > > XFAIL : 3 > > SKIP : 14 > > > > Total : 133 > > =======================FAILED============================== > > ResourceAllocationFromPool - 01_forward.py: FAIL > > ERROR - Return NULL, expect at least one instance > > > > This fails because of NetworkPool, a patch on the way. > > > > ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL > > ERROR - Unexpected rc code 7 and description The requested operation > > is not supported > > InvokeMethod(CreateResourcePool): The requested operation is not > > supported > > > > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL > > ERROR - Unexpected rc code 7 and description The requested operation > > is not supported > > InvokeMethod(CreateChildResourcePool): The requested operation is not > > supported > > > > ResourcePoolConfigurationService - > > 06_RemoveResourcesFromResourcePool.py: FAIL > > ERROR - Unexpected rc code 7 and description The requested operation > > is not supported > > InvokeMethod(RemoveResourcesFromResourcePool): The requested operation > > is not supported > > > > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL > > ERROR - Unexpected rc code 7 and description The requested operation > > is not supported > > InvokeMethod(DeleteResourcePool): The requested operation is not > > supported > > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > ERROR - destroy_fail>> noname: Error executing DestroySystem > > ERROR - (1, u'Unable to retrieve domain name.') > > ERROR - destroy_fail>> nonexistent: Error executing DestroySystem > > ERROR - (1, u'Failed to find domain') > > InvokeMethod(DestroySystem): Unable to retrieve domain name. > > InvokeMethod(DestroySystem): Failed to find domain > The RPCS and VSMS tc did not fail for me with pegasus with the latest > 660 libvirt-cim. > Did these fail even when run manually ? Yes, these still fail when run manually and report the same error. > > Thanks and Regards, > Deepti. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Wed Aug 6 12:30:52 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 06 Aug 2008 18:00:52 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one In-Reply-To: <489973CA.2010501@linux.vnet.ibm.com> References: <489973CA.2010501@linux.vnet.ibm.com> Message-ID: <4899997C.40709@linux.vnet.ibm.com> Also, for the part of the tc below: for rasd_cn, id_info in cn_id_list.iteritems(): status = get_rasdinst_verify_pool_from_RAFP(server, virt, vsxml, rasd_cn, id_info) if status != PASS: return status Please include the following for status != PASS: cleanup_restore(server, virt) destroy_netpool(server, virt, test_network) vsxml.undefine(server) Thanks and Regards, Deepti. Deepti B Kalakeri wrote: > > > yunguol at cn.ibm.com wrote: >> # HG changeset patch >> # User root at elm3b197.beaverton.ibm.com >> # Date 1217987020 25200 >> # Node ID f50bfc180219f6cca02e73b55ec4472b07bc64ac >> # Parent 3add446da91108d419ce8adae434ebc78039fa34 >> [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool >> instead of creating a new one >> >> Signed-off-by: Guolian Yun >> >> diff -r 3add446da911 -r f50bfc180219 >> suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py >> --- >> a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py >> Tue Aug 05 08:59:29 2008 -0700 >> +++ >> b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py >> Tue Aug 05 18:43:40 2008 -0700 >> @@ -171,7 +171,7 @@ def main(): >> if status != PASS: >> return status >> >> - status, test_network = create_netpool_conf(server, virt) >> + status, test_network = create_netpool_conf(server, virt, >> use_existing=True) > This fix works fine for this test case. > The actual reason for this test case to fail is bcs of the difference > in the networkpool used to define the guest and the pool used in the > create_netpool_conf(). > If we see the _set_vbridge() or set_vnetwork() of the vxml.py they > make use of the networkpool/bridge information if they already exist > or they create one, see below: > def _set_vbridge(self, ip, virt_type): > network_list = live.net_list(ip, virt=virt_type) > if len(network_list) > 0: > vbr = live.get_bridge_from_network_xml(network_list[0], ip, > virt = virt_type) > else: > logger.info('No virutal network found') > logger.info('Trying to create one ......') > netxml = NetXML(ip, virt=virt_type) > > .................... > > > AND > > def set_vnetwork(self, interface, virt_type): > network_list = live.net_list(CIM_IP, virt_type) > if len(network_list) > 0: > nname = network_list[0] > else: > logger.info('No virutal network found') > logger.info('Trying to create one ......') > netxml = NetXML(CIM_IP, virt=virt_type) > ret = netxml.create_vnet() > > > 1) We might have to sync the function _set_vbridge() and > set_vnetwork() to something similar to create_netpool_conf() funtion. > > OR > > And also, we do not need create_netpool_conf() in this test case as > the call to vxml.define will internally call set_interface_details() > and assign the network information accordingly. > > 2) Removing the create_netpool_conf() and either getting the bridge > name using xml_get_net_bridge() or network name info by using > xml_get_net_network() will also solve the failure seen in the test case. > > I think we should go with the approach 2 to solve the above test case > problem, any thoughts ?? > > Thanks and Regards, > Deepti. >> if status != PASS: >> return status >> >> @@ -184,7 +184,6 @@ def main(): >> return status >> >> cleanup_restore(server, virt) >> - destroy_netpool(server, virt, test_network) >> vsxml.undefine(server) return status >> >> >> _______________________________________________ >> Libvirt-cim mailing list >> Libvirt-cim at redhat.com >> https://www.redhat.com/mailman/listinfo/libvirt-cim From deeptik at linux.vnet.ibm.com Wed Aug 6 13:08:16 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 06 Aug 2008 06:08:16 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding KVM support to 27_define_suspend_errs.py tc of CS provider Message-ID: <61d83397310fc918956d.1218028096@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1218028082 25200 # Node ID 61d83397310fc918956d079a7500d83c67637718 # Parent 3add446da91108d419ce8adae434ebc78039fa34 [TEST] Adding KVM support to 27_define_suspend_errs.py tc of CS provider. Changes: -------- 1) Added KVM support. 2) Using the library function try_request_state_change() to verify the exception. 3) Added create_netpool_conf(), destroy_netpool() functions since VSMS requires networkpool. 4) Using destroy_and_undefine_domain() to destroy and undefine the domain. Tested with KVM, XenFV, Xen on current sources. Signed-off-by: Deepti B. Kalakeri diff -r 3add446da911 -r 61d83397310f suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Tue Aug 05 08:59:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Wed Aug 06 06:08:02 2008 -0700 @@ -41,11 +41,12 @@ from VirtLib import utils from VirtLib import utils from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import get_cs_instance +from XenKvmLib.test_doms import destroy_and_undefine_domain +from XenKvmLib.common_util import try_request_state_change from XenKvmLib.common_util import create_using_definesystem +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool -sup_types = ['Xen', 'XenFV', 'LXC'] +sup_types = ['Xen', 'XenFV', 'LXC', 'KVM'] SUSPEND_STATE = 9 default_dom = 'test_domain' @@ -53,44 +54,42 @@ exp_rc = pywbem.CIM_ERR_FAILED exp_rc = pywbem.CIM_ERR_FAILED exp_desc = 'Domain not running' + @do_main(sup_types) def main(): options = main.options + server = options.ip + virt = options.virt + status = FAIL + + status, test_network = create_netpool_conf(server, virt, False) + if status != PASS: + return FAIL try: # define the vs - status = create_using_definesystem(default_dom, options.ip, - virt=options.virt) + status = create_using_definesystem(default_dom, server, virt=virt) if status != PASS: - logger.error("Unable to define domain %s using DefineSystem()", \ - default_dom) - return FAIL + logger.error("Unable to define domain '%s' using DefineSystem()", + default_dom) + return status - rc, cs = get_cs_instance(default_dom, options.ip, options.virt) - if rc != 0: - logger.error("GetInstance failed") - undefine_test_domain(default_dom, options.ip) - return FAIL - - # try to suspend - cs.RequestStateChange( \ - RequestedState=pywbem.cim_types.Uint16(SUSPEND_STATE), \ - TimeoutPeriod=pywbem.cim_types.CIMDateTime(TIME)) - - except pywbem.CIMError, (err_no, desc): - if err_no == exp_rc and desc.find(exp_desc) >= 0: - logger.info("Got expected exception where ") - logger.info("Errno is '%s' ", exp_rc) - logger.info("Error string is '%s'", exp_desc) - undefine_test_domain(default_dom, options.ip, options.virt) - return PASS - logger.error("Unexpected RC: %s & Desc. %s", err_no, desc) - undefine_test_domain(default_dom, options.ip, options.virt) + except Exception, details: + logger.error("Exception: %s", details) + destroy_netpool(server, virt, test_network) + destroy_and_undefine_domain(default_dom, server, virt) return FAIL - logger.error("Expected Defined -> Suspended state transition to fail") - undefine_test_domain(default_dom, options.ip, options.virt) - return FAIL + status = try_request_state_change(default_dom, server, + SUSPEND_STATE, TIME, exp_rc, + exp_desc, virt) + + if status != PASS: + logger.error("Expected Defined -> Suspended state transition to fail") + + destroy_netpool(server, virt, test_network) + destroy_and_undefine_domain(default_dom, server, virt) + return status if __name__ == "__main__": sys.exit(main()) From kaitlin at linux.vnet.ibm.com Wed Aug 6 15:31:29 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 08:31:29 -0700 Subject: [Libvirt-cim] Cimtest Report for KVM on F9 with current sources (2008/08/06) In-Reply-To: References: Message-ID: <4899C3D1.1000908@linux.vnet.ibm.com> > > > ERROR - Return NULL, expect at least one instance > > > > > > This fails because of NetworkPool, a patch on the way. > > > > > > ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL > > > ERROR - Unexpected rc code 7 and description The requested operation > > > is not supported > > > InvokeMethod(CreateResourcePool): The requested operation is not > > > supported > > > > > > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL > > > ERROR - Unexpected rc code 7 and description The requested operation > > > is not supported > > > InvokeMethod(CreateChildResourcePool): The requested operation is not > > > supported > > > > > > ResourcePoolConfigurationService - > > > 06_RemoveResourcesFromResourcePool.py: FAIL > > > ERROR - Unexpected rc code 7 and description The requested operation > > > is not supported > > > InvokeMethod(RemoveResourcesFromResourcePool): The requested operation > > > is not supported > > > > > > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL > > > ERROR - Unexpected rc code 7 and description The requested operation > > > is not supported > > > InvokeMethod(DeleteResourcePool): The requested operation is not > > > supported > > > > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > > ERROR - destroy_fail>> noname: Error executing DestroySystem > > > ERROR - (1, u'Unable to retrieve domain name.') > > > ERROR - destroy_fail>> nonexistent: Error executing DestroySystem > > > ERROR - (1, u'Failed to find domain') > > > InvokeMethod(DestroySystem): Unable to retrieve domain name. > > > InvokeMethod(DestroySystem): Failed to find domain > > The RPCS and VSMS tc did not fail for me with pegasus with the latest > > 660 libvirt-cim. > > Did these fail even when run manually ? > > Yes, these still fail when run manually and report the same error. I think is due to a difference in what error sfcb and Pegasus report. Pegasus reports CIM_ERR_NOT_SUPPORTED, but sfcb returns something like "The requested operation is not supported". So the test needs to be updated to match either the Pegasus error or the sfcb error. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Aug 6 15:36:38 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 08:36:38 -0700 Subject: [Libvirt-cim] CimTest Report for KVM on F9 06-08-2008 In-Reply-To: <489969D3.5040704@linux.vnet.ibm.com> References: <489969D3.5040704@linux.vnet.ibm.com> Message-ID: <4899C506.9060808@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ======================================================================== > CIM Test Report for KVM on F9 with latest libvirt-cim and libcmpiutil > ======================================================================== > > This tc passed when run manually. > HostSystem - 04_hs_to_EAPF.py: FAIL > Any thoughts as to why this fails in the bulk run? Sounds like one of the tests alters the environment in a way that this test isn't expecting. - Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Aug 6 16:40:39 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 09:40:39 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one In-Reply-To: <489973CA.2010501@linux.vnet.ibm.com> References: <489973CA.2010501@linux.vnet.ibm.com> Message-ID: <4899D407.5000309@linux.vnet.ibm.com> > > 2) Removing the create_netpool_conf() and either getting the bridge name > using xml_get_net_bridge() or network name info by using > xml_get_net_network() will also solve the failure seen in the test case. > > I think we should go with the approach 2 to solve the above test case > problem, any thoughts ?? > Agreed. I think this is the best approach. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Aug 6 16:43:53 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 09:43:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one In-Reply-To: <4899997C.40709@linux.vnet.ibm.com> References: <489973CA.2010501@linux.vnet.ibm.com> <4899997C.40709@linux.vnet.ibm.com> Message-ID: <4899D4C9.6030601@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > Also, for the part of the tc below: > for rasd_cn, id_info in cn_id_list.iteritems(): > status = get_rasdinst_verify_pool_from_RAFP(server, virt, vsxml, > rasd_cn, id_info) > if status != PASS: > return status > > Please include the following for status != PASS: > cleanup_restore(server, virt) > destroy_netpool(server, virt, test_network) This won't be needed if the create_netpool_conf() function is removed. > vsxml.undefine(server) > get_rasdinst_verify_pool_from_RAFP() handles the undefine() already. But I think the undefine() calls should be removed from the get_rasdinst_verify_pool_from_RAFP() call and instead handled as you say Deepti - by something like the following: status != PASS: cleanup_restore(server, virt) vsxml.undefine(server) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Aug 6 19:19:43 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 12:19:43 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Temp work around for stale libvirt info Message-ID: This will work temporarily until all (or most) of the tests are converted for using virsh to define the guests to using the providers. From kaitlin at linux.vnet.ibm.com Wed Aug 6 19:19:44 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 12:19:44 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] (#2) Add function to poll for a guest In-Reply-To: Message-ID: <3f73022d65dc1385ba90.1218050384@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1217542638 25200 # Node ID 3f73022d65dc1385ba90a2de874c878c631e7aee # Parent 01e5197b144a873a55bb0c088fc29cd31a5a9b0e (#2) Add function to poll for a guest This function is a work around to deal with a stale data issue seen with libvirt on RHEL 5.x. -Updates: -Changed name of polling function for clarity. Signed-off-by: Kaitlin Rupert diff -r 01e5197b144a -r 3f73022d65dc suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Aug 06 09:15:45 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Jul 31 15:17:18 2008 -0700 @@ -33,10 +33,12 @@ from pywbem.cim_obj import CIMInstanceName from XenKvmLib.devices import CIM_Instance from XenKvmLib.classes import get_typed_class -from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE +from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE, \ + CIM_ERROR_GETINSTANCE from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from VirtLib.live import diskpool_list, virsh_version, net_list +from VirtLib.live import diskpool_list, virsh_version, net_list, domain_list from XenKvmLib.vxml import PoolXML, NetXML +from XenKvmLib.enumclass import getInstance test_dpath = "foo" disk_file = '/etc/libvirt/diskpool.conf' @@ -57,7 +59,7 @@ return (1, cs) except Exception, detail: - logger.error(Globals.CIM_ERROR_GETINSTANCE, + logger.error(CIM_ERROR_GETINSTANCE, get_typed_class(virt, 'ComputerSystem')) logger.error("Exception: %s", detail) return (1, cs) @@ -397,3 +399,18 @@ return PASS +def libvirt_cached_data_poll(ip, virt, dom_name): + cs = None + + dom_list = domain_list(ip, virt) + if dom_name in dom_list: + timeout = 10 + + for i in range(0, timeout): + rc, cs = get_cs_instance(dom_name, ip, virt) + if rc == 0: + return cs + + sleep(1) + + return cs From kaitlin at linux.vnet.ibm.com Wed Aug 6 19:19:45 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 12:19:45 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] (#2) Update ElementConforms 02 to use check_virsh_poll() work around In-Reply-To: Message-ID: <40afbdebb121e53b37e3.1218050385@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1217542648 25200 # Node ID 40afbdebb121e53b37e3a8d357afa8de86ff09cb # Parent 3f73022d65dc1385ba90a2de874c878c631e7aee (#2) Update ElementConforms 02 to use check_virsh_poll() work around. Also clean this test case some. Updates: -Fix log messages so that they print the proper class prefix -Updated poll function name. Signed-off-by: Kaitlin Rupert diff -r 3f73022d65dc -r 40afbdebb121 suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Thu Jul 31 15:17:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Thu Jul 31 15:17:28 2008 -0700 @@ -52,6 +52,7 @@ from XenKvmLib.vxml import XenXML, KVMXML, get_class from XenKvmLib.classes import get_typed_class from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.common_util import libvirt_cached_data_poll, get_cs_instance sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -96,51 +97,42 @@ inst_list = [] + rc, cs = get_cs_instance(test_dom, options.ip, options.virt) + if rc != 0: + sys = libvirt_cached_data_poll(options.ip, options.virt, test_dom) + if sys is None: + logger.error("Instance for %s not created" % test_dom) + return FAIL + + inst_list.append(sys) + try: - cs_list = computersystem.enumerate(options.ip, options.virt) - # The len should be atleast two, as the CS returns info - # one regarding VS and the other one for Domain-0. - if len(cs_list) < 1: - logger.error("ERROR: Wrong number of instances returned") - return status - for item in cs_list: - if item.Name == test_dom: - inst_list.append(item) - break - - if len(inst_list) != 1: - logger.error("ERROR: Instance for %s not created" % test_dom) - return status - #Getting the hostname, to verify with the value returned by the assoc. host_sys = hostsystem.enumerate(options.ip, options.virt) if len(host_sys) < 1: logger.error("ERROR: Enumerate returned 0 host instances") - return status - elif host_sys[0].Name == "": - logger.error("ERROR: HostName seems to be empty") - return status - else: - # Instance of the HostSystem - inst_list.append(host_sys[0]) - except Exception , detail: - logger.error("Exception: %s" % detail) - return status + return FAIL + + inst_list.append(host_sys[0]) + + except Exception, details: + logger.error("Exception: %s" % details) + return FAIL prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' try: key_list = ["InstanceID"] - proflist = enumclass.enumerate(options.ip, \ - "RegisteredProfile", \ + proflist = enumclass.enumerate(options.ip, + "RegisteredProfile", key_list, options.virt) - except Exception, detail: - logger.error(CIM_ERROR_ENUMERATE, \ - 'RegisteredProfile') - logger.error("Exception: %s", detail) + except Exception, details: + logger.error(CIM_ERROR_ENUMERATE, + get_typed_class(options.virt, 'RegisteredProfile')) + logger.error("Exception: %s", details) return status Globals.CIM_NS = prev_namespace @@ -160,14 +152,16 @@ Name=name) if len(profs) != 1: logger.error("ElementConformsToProfile assoc failed") - return status + return FAIL status = verify_profile(profs[0], exp_list[cn]) if status != PASS: logger.error("Verification of profile instance failed") + return FAIL except Exception, detail: - logger.error(CIM_ERROR_ASSOCIATORS, 'RegisteredProfile') + logger.error(CIM_ERROR_ASSOCIATORS, + get_typed_class(options.virt, 'RegisteredProfile')) logger.error("Exception: %s", detail) status = FAIL From kaitlin at linux.vnet.ibm.com Wed Aug 6 19:28:36 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 12:28:36 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Enable test infrastructure to support writing to a temporary file In-Reply-To: Message-ID: <63757929dd9a15671ae5.1218050916@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1213136844 25200 # Node ID 63757929dd9a15671ae59fb54b89121bbc93d50d # Parent 502dddef8c34eeb85b571df0ee97f0ee0676861b [TEST] Enable test infrastructure to support writing to a temporary file. Allow the option to print to a file in addition to stdout. This will allow a test suite to read back the file after the test execution is complete. If a previous log exists at the start of the run, it is removed and a new one is created. Signed-off-by: Kaitlin Rupert diff -r 502dddef8c34 -r 63757929dd9a lib/Reporter.py --- a/lib/Reporter.py Tue Jul 01 14:12:48 2008 -0700 +++ b/lib/Reporter.py Tue Jun 10 15:27:24 2008 -0700 @@ -19,10 +19,13 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL + class Reporter: - def __init__(self, verbosity=1): + def __init__(self, verbosity=1, log_fd=None): self.verbosity = verbosity + self.log_fd = log_fd def __red(self, str): return "\033[01;31m%s\033[00m" % str @@ -36,11 +39,38 @@ def __blue(self, str): return "\033[01;34m%s\033[00m" % str - def __out(self, str): - """We might not always be just printing output to stdout, so this should - be used for all output.""" - # Right now we just mimic print. - print(str) + def __out(self, str, status, bug): + def no_color(string): + return string + + colors = { "FAIL" : self.__red, + "PASS" : self.__green, + "SKIP" : self.__yellow, + "XFAIL" : self.__blue, + } + + fn = colors.get(status, no_color) + + if status == XFAIL: + print "%s: %s\tBug: %s" % (str, fn(status), bug) + else: + print "%s: %s" % (str, fn(status)) + + if self.log_fd is not None: + if status == XFAIL: + self.log_fd.write("%s: %s\tBug: %s" % (str, status, bug)) + else: + self.log_fd.write("%s: %s" % (str, status)) + + def results(self, str, status, bug): + + rc = { FAIL : "FAIL", + PASS : "PASS", + SKIP : "SKIP", + XFAIL : "XFAIL" + } + + self.__out(str, rc[status], bug) def debug(self, level, str): """Produces debug output if appropriate for current verbosity level. @@ -49,20 +79,5 @@ priority output will be printed in the most levels, while low priority output will only be printed when verbosity is high.""" if level <= self.verbosity: - self.__out(str) + print(str) - def pass_test(self, test_name): - str = self.__green("PASS") - self.__out("%s: %s" % (test_name, str)) - - def fail_test(self, test_name): - str = self.__red("FAIL") - self.__out("%s: %s" % (test_name, str)) - - def xfail_test(self, test_name, bug): - str = self.__blue("XFAIL") - self.__out("%s: %s\tBug: %s" % (test_name, str, bug)) - - def skip_test(self, test_name): - str = self.__yellow("SKIP") - self.__out("%s: %s" % (test_name, str)) diff -r 502dddef8c34 -r 63757929dd9a lib/TestSuite.py --- a/lib/TestSuite.py Tue Jul 01 14:12:48 2008 -0700 +++ b/lib/TestSuite.py Tue Jun 10 15:27:24 2008 -0700 @@ -24,48 +24,59 @@ DEFAULT_RPC_URL = "http://morbo.linux.ibm.com/xenotest/testrun/api" +DEFAULT_LOG_FILE = "run_report.txt" + import Reporter import re +import os +from CimTest.ReturnCodes import PASS, FAIL, XFAIL, SKIP class TestSuite: """Test Suite class to make the output of driving test suites a bit more consistant""" - def __init__(self): - self.rep = Reporter.Reporter(verbosity=5) + def __init__(self, log=False, file_name=None): + if log == True: + if file_name is None: + self.log_file = DEFAULT_LOG_FILE + else: + self.log_file = file_name - def ok(self, group, test, output=""): - self.rep.pass_test("%s - %s" % (group, test)) + if os.path.exists(self.log_file): + os.remove(self.log_file) + self.log_fd = open(self.log_file, "w") + else: + self.log_file = None + self.log_fd = None - def skip(self, group, test, output=""): - self.rep.skip_test("%s - %s" % (group, test)) + self.rep = Reporter.Reporter(verbosity=5, log_fd=self.log_fd) + + def print_results(self, group, test, status, output=""): + bug = None + if status == XFAIL: + err = "Test error: returned XFAIL without a valid bug string." + bug = err + if len(output) > 0: + try: + str = re.search('Bug:<[0-9]*>', output).group() + bug = re.search("Bug:<([0-9]+)>", str).group(1) + if len(str) > 0: + if output == str: + #No need to pring bug twice + output = "" + except: + #If we hit a problem, make sure bug = error msg + bug = err + + self.rep.results("%s - %s" % (group, test), status, bug) if output: self.rep.debug(1, output) - def fail(self, group, test, output=""): - self.rep.fail_test("%s - %s" % (group, test)) - if output: - self.rep.debug(1, output) - - def xfail(self, group, test, output=""): - err = "Test error: returned XFAIL without a valid bug string." - bug = err - if len(output) > 0: - try: - str = re.search('Bug:<[0-9]*>', output).group() - bug = re.search("Bug:<([0-9]+)>", str).group(1) - if len(str) > 0: - if output == str: - #No need to pring bug twice - output = "" - except: - #If we hit a problem, make sure bug is equal to the error msg - bug = err - self.rep.xfail_test("%s - %s" % (group, test), bug) - if output: - self.rep.debug(1, output) + def debug(self, str): + self.rep.debug(1, str) def finish(self): - pass + if self.log_fd is not None: + self.log_fd.close() class RPCTestSuite: """Test Suite class to make the output of driving test suites a bit more consistant diff -r 502dddef8c34 -r 63757929dd9a suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Tue Jul 01 14:12:48 2008 -0700 +++ b/suites/libvirt-cim/main.py Tue Jun 10 15:27:24 2008 -0700 @@ -153,14 +153,7 @@ os_status = os.WEXITSTATUS(status) - if os_status == PASS: - testsuite.ok(test['group'], test['test']) - elif os_status == SKIP: - testsuite.skip(test['group'], test['test'], output) - elif os_status == XFAIL: - testsuite.xfail(test['group'], test['test'], output) - else: - testsuite.fail(test['group'], test['test'], output) + testsuite.print_results(test['group'], test['test'], os_status) testsuite.finish() From kaitlin at linux.vnet.ibm.com Wed Aug 6 19:28:37 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 12:28:37 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Add test report generation In-Reply-To: Message-ID: <723430f4ceb0770b1a13.1218050917@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1213136844 25200 # Node ID 723430f4ceb0770b1a133c6babfc4fd63c17f7a5 # Parent 63757929dd9a15671ae59fb54b89121bbc93d50d [TEST] Add test report generation. Using the --report option, you can generate a report and have it mailed to the address supplied. How to call using the report option: ./runtests libvirt-cim -i localhost -c -d -v LXC -g VirtualSystemManagementService -t 01_definesystem_name.py --report The user will need to create a .cimtestrc file in their home directory in the following format: [email] relay = my.mail.relay.com from = Joe User Will need to add revision number support to cimtest and then add the cimtest revision number to the report. Signed-off-by: Kaitlin Rupert diff -r 63757929dd9a -r 723430f4ceb0 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Tue Jun 10 15:27:24 2008 -0700 +++ b/suites/libvirt-cim/main.py Tue Jun 10 15:27:24 2008 -0700 @@ -25,6 +25,8 @@ from optparse import OptionParser import os import sys +import smtplib +from time import gmtime, strftime from pywbem import WBEMConnection sys.path.append('../../lib') import TestSuite @@ -35,6 +37,7 @@ from CimTest.Globals import platform_sup sys.path.append('./lib') from XenKvmLib.classes import get_typed_class +import ConfigParser parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", @@ -54,8 +57,11 @@ help="Virt type, select from 'Xen' & 'KVM' & 'XenFV' & 'LXC'(default: Xen). ") parser.add_option("-d", "--debug-output", action="store_true", dest="debug", help="Duplicate the output to stderr") +parser.add_option("--report", dest="report", + help="Send report using mail info: --report=") TEST_SUITE = 'cimtest' +CIMTEST_RCFILE = '%s/.cimtestrc' % os.environ['HOME'] def set_python_path(): previous_pypath = os.environ.get('PYTHONPATH') @@ -82,6 +88,28 @@ print "Cleaned log files." +def get_rcfile_vals(): + if not os.access(CIMTEST_RCFILE, os.R_OK): + print "\nCould not access the %s file for this user." % CIMTEST_RCFILE + print "Create this file and add the appropriate relay:" + print "\tfrom = me at isp.com\n\trelay = my.relay\n" + return None, None + + try: + conf = ConfigParser.ConfigParser() + if not conf.read(CIMTEST_RCFILE): + return None, None + + addr = conf.get("email", "from") + relay = conf.get("email", "relay") + + except Exception, details: + print "\n%s" % details + print "\nPlease verify the format of the %s file\n" % CIMTEST_RCFILE + return None, None + + return addr, relay + def get_version(virt, ip): conn = WBEMConnection('http://%s' % ip, (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), @@ -99,9 +127,139 @@ changeset = 'Unknown' return revision, changeset +def get_cmd_val(cmd, ip): + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return "Unknown" + return out + +def get_env_data(rev, changeset, ip): + distro = get_cmd_val("cat /etc/issue | awk 'NR<=1'", ip) + kernel_ver = get_cmd_val("uname -r", ip) + + libvirt_ver = "Unknown" + hyp_ver = "Unknown" + cmd = "virsh version" + virsh_ver = get_cmd_val(cmd, ip) + if virsh_ver != "Unknown": + if len(virsh_ver.splitlines()) == 4: + if virsh_ver.splitlines()[0].find("libvir"): + libvirt_ver = virsh_ver.splitlines()[0].split()[4] + + if virsh_ver.splitlines()[3].find("hypervisor"): + hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] + hyp_ver = hyp_ver.split(": ")[1] + + cimom = get_cmd_val("ps -ef | grep cimserver | grep -v grep", ip) + if cimom != "Unknown": + cimom = "Pegasus" + else: + cimom = get_cmd_val("ps -ef | grep sfcb | grep -v grep", ip) + if cimom != "Unknown": + cimom = "sfcb" + + if cimom == "Pegasus": + cimom_ver = get_cmd_val("cimserver -v", ip) + elif cimom == "sfcb": + cimom_ver = get_cmd_val("sfcbd -v", ip) + else: + cimom_ver = "unknown version" + + env = "Distro: %s\nKernel: %s\nlibvirt: %s\nHypervisor: %s\nCIMOM: %s %s\n"\ + % (distro, kernel_ver, libvirt_ver, hyp_ver, cimom, cimom_ver) + + lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \ + (rev, changeset) + + return env + lc_ver + +def build_report(run_output, rev, changeset, virt, ip): + rvals = { 'PASS' : 0, + 'FAIL' : 0, + 'XFAIL' : 0, + 'SKIP' : 0, + } + + tstr = { 'PASS' : "", + 'FAIL' : "", + 'XFAIL' : "", + 'SKIP' : "", + } + + date = strftime("%b %d %Y", gmtime()) + + heading = "%s Test Run Summary %s" % (virt, date) + sys_env = get_env_data(rev, changeset, ip) + + divider = "=================================================\n" + + for line in run_output.splitlines(): + for type, val in rvals.iteritems(): + if type in line: + if type == "FAIL" and "py: FAIL" not in line: + continue + rvals[type] += 1 + tstr[type] += "%s\n" % line + + results = "" + test_total = 0 + for type, val in rvals.iteritems(): + results += " %s:\t%d\n" % (type, val) + test_total += val + + results_total = " -----------------\n Total:\t%d\n" % test_total + + test_block = "" + for type, str in tstr.iteritems(): + if type == "PASS" or str == "": + continue + test_block += "%s Test Summary:\n%s\n%s" % (type, str, divider) + + report = divider + heading + "\n" + divider + sys_env + divider + results \ + + results_total + divider + test_block + "Full report:\n" \ + + run_output + + return report, heading + +def gen_report(rev, changeset, virt, ip, log_file): + fd = open(log_file, "r") + run_results = fd.read() + fd.close() + + msg_body, heading = build_report(run_results, rev, changeset, virt, ip) + + fd = open(log_file, "w") + rc = fd.write(msg_body) + if rc is not None: + print "Error %s writing report to: %s." % (rc, log_file) + fd.close() + + return msg_body, heading + +def send_report(to_addr, from_addr, relay, report, heading): + headers = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (from_addr, to_addr, + heading) + + message = headers + report + + try: + server = smtplib.SMTP(relay) + result = server.sendmail(to_addr, from_addr, message) + server.quit() + + if result: + for recip in result.keys(): + print "Could not deliver mail to: %s" % recip + + except Exception, details: + print "Encountered a problem mailing report: %s" % details + def main(): (options, args) = parser.parse_args() - + to_addr = None + from_addr = None + relay = None + div = "--------------------------------------------------------------------" if options.test and not options.group: parser.print_help() @@ -114,7 +272,15 @@ os.environ['CIMOM_PORT'] = str(options.port) # - testsuite = TestSuite.TestSuite() + if options.report: + from_addr, relay = get_rcfile_vals() + + if from_addr == None or relay == None: + return 1 + + to_addr = options.report + + testsuite = TestSuite.TestSuite(log=True) set_python_path() @@ -139,9 +305,10 @@ revision, changeset = get_version(options.virt, options.ip) - print "Testing " + options.virt + " hypervisor" + print "\nTesting " + options.virt + " hypervisor" - for test in test_list: + for test in test_list: + testsuite.debug(div) t_path = os.path.join(TEST_SUITE, test['group']) os.environ['CIM_TC'] = test['test'] cdto = 'cd %s' % t_path @@ -155,7 +322,16 @@ testsuite.print_results(test['group'], test['test'], os_status) + testsuite.debug("%s\n" % div) testsuite.finish() + + msg_body, heading = gen_report(revision, changeset, options.virt, + options.ip, testsuite.log_file) + + if options.report: + print "Sending mail from %s to %s using %s relay.\n" % \ + (from_addr, to_addr, relay) + send_report(to_addr, from_addr, relay, msg_body, heading) if __name__ == '__main__': sys.exit(main()) From kaitlin at linux.vnet.ibm.com Wed Aug 6 19:28:35 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 12:28:35 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add reporting capabilities Message-ID: This patch set will allow cimtest to generate reports. With a little extra help from a cron script, this can be used to do automated test runs. From kaitlin at linux.vnet.ibm.com Wed Aug 6 19:28:35 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 12:28:35 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add reporting capabilities Message-ID: This patch set will allow cimtest to generate reports. With a little extra help from a cron script, this can be used to do automated test runs. From danms at us.ibm.com Wed Aug 6 22:17:44 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 06 Aug 2008 15:17:44 -0700 Subject: [Libvirt-cim] [PATCH] When saving out the infostore, clear any previous data In-Reply-To: (Kaitlin Rupert's message of "Fri, 01 Aug 2008 11:06:39 -0700") References: Message-ID: <87abfprdo7.fsf@caffeine.beaverton.ibm.com> KR> - lseek(ctx->fd, 0, SEEK_SET); KR> + close(ctx->fd); KR> + ctx->fd = open(ctx->filename, O_RDWR|O_TRUNC, 0600); KR> + if (ctx->fd < 0) { KR> + CU_DEBUG("Unable to open `%s': %m", ctx->filename); KR> + goto out; KR> + } Why not just leave the lseek() in place, and then call an ftruncate() on the file descriptor? That saves us from adding all the infrastructure for saving the filename, etc. It's my fault for not calling for the truncate in the original code... Good catch! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Thu Aug 7 00:04:05 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 06 Aug 2008 17:04:05 -0700 Subject: [Libvirt-cim] [PATCH] (#2) When saving out the infostore, clear any previous data Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1217613773 25200 # Node ID ca56c48f31038a8dc718e09ef8bf68a8917408fa # Parent 9f2f9b117797907bfa2b89a499b4eb5bb62cd458 (#2) When saving out the infostore, clear any previous data. Updates: -Replace additional open call with ftruncate() Signed-off-by: Kaitlin Rupert diff -r 9f2f9b117797 -r ca56c48f3103 libxkutil/infostore.c --- a/libxkutil/infostore.c Mon Aug 04 11:57:27 2008 -0700 +++ b/libxkutil/infostore.c Fri Aug 01 11:02:53 2008 -0700 @@ -150,6 +150,9 @@ long size = 0; lseek(ctx->fd, 0, SEEK_SET); + + if (ftruncate(ctx->fd, 0) != 0) + CU_DEBUG("Unable to truncate infostore"); save = xmlSaveToFd(ctx->fd, NULL, 0); if (save == NULL) { From jfehlig at novell.com Thu Aug 7 03:38:38 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Wed, 06 Aug 2008 21:38:38 -0600 Subject: [Libvirt-cim] [PATCH] Fix logic that determines memory only or memory terminal snapshot Message-ID: <394f63c771edba0828e4.1218080318@linux-l5dg.site> # HG changeset patch # User Jim Fehlig # Date 1218080112 21600 # Node ID 394f63c771edba0828e4aa0b48f7e9e2689b14c7 # Parent 9f2f9b117797907bfa2b89a499b4eb5bb62cd458 Fix logic that determines memory only or memory terminal snapshot According to comments in Virt_VirtualSystemSnapshotService.h and VirtualSystemSnapshotService.mof, it seems logic that determines whether to do a restore uses wrong definition. Signed-off-by: Jim Fehlig diff -r 9f2f9b117797 -r 394f63c771ed src/Virt_VirtualSystemSnapshotService.c --- a/src/Virt_VirtualSystemSnapshotService.c Mon Aug 04 11:57:27 2008 -0700 +++ b/src/Virt_VirtualSystemSnapshotService.c Wed Aug 06 21:35:12 2008 -0600 @@ -397,7 +397,7 @@ static CMPIStatus start_snapshot_job(con } ctx->save = (type != 0); - ctx->restore = (type != VIR_VSSS_SNAPSHOT_MEM); + ctx->restore = (type != VIR_VSSS_SNAPSHOT_MEMT); s = create_job(context, ref, ctx, &job); From jfehlig at novell.com Thu Aug 7 03:45:26 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Wed, 06 Aug 2008 21:45:26 -0600 Subject: [Libvirt-cim] [PATCH] Fix name of Snaphot parameter to ApplySnapshot Message-ID: <245baf0acbcbe3f2f0f4.1218080726@linux-l5dg.site> # HG changeset patch # User Jim Fehlig # Date 1218080667 21600 # Node ID 245baf0acbcbe3f2f0f425bf0d803110fa8c9eaa # Parent 394f63c771edba0828e4aa0b48f7e9e2689b14c7 Fix name of Snaphot parameter to ApplySnapshot The ApplySnapshot extrinsic takes 1 input parameter named Snapshot. Change parameter name from AffectedSnapshot to Snapshot. Signed-off-by: Jim Fehlig diff -r 394f63c771ed -r 245baf0acbcb src/Virt_VirtualSystemSnapshotService.c --- a/src/Virt_VirtualSystemSnapshotService.c Wed Aug 06 21:35:12 2008 -0600 +++ b/src/Virt_VirtualSystemSnapshotService.c Wed Aug 06 21:44:27 2008 -0600 @@ -542,7 +542,7 @@ static CMPIStatus apply_snapshot(CMPIMet char *name = NULL; uint32_t retcode = CIM_RETURN_FAILED; - if (cu_get_ref_arg(argsin, "AffectedSnapshot", &snap) != CMPI_RC_OK) { + if (cu_get_ref_arg(argsin, "Snapshot", &snap) != CMPI_RC_OK) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_INVALID_PARAMETER, "Missing Snapshot"); @@ -587,7 +587,7 @@ static struct method_handler ApplySnapsh static struct method_handler ApplySnapshot = { .name = "ApplySnapshot", .handler = apply_snapshot, - .args = {{"AffectedSnapshot", CMPI_ref, false}, + .args = {{"Snapshot", CMPI_ref, false}, ARG_END} }; From yunguol at cn.ibm.com Thu Aug 7 09:17:36 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 07 Aug 2008 02:17:36 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ResourceAllocationFromPool.01 & 02 Message-ID: # HG changeset patch # User Guolian Yun # Date 1218100649 25200 # Node ID c96db4410fd7b152f803726132378ec0caa9f1ad # Parent 0f568c2c36035da2574e11d128780833392e43af [TEST] #2 Fix ResourceAllocationFromPool.01 & 02 Removing the create_netpool_conf(), getting the bridge name using xml_get_net_bridge() and network name info by using xml_get_net_network() Signed-off-by: Guolian Yun diff -r 0f568c2c3603 -r c96db4410fd7 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Wed Aug 06 06:08:02 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Thu Aug 07 02:17:29 2008 -0700 @@ -23,7 +23,7 @@ # import sys -from VirtLib import utils +from VirtLib import utils, live from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class @@ -42,7 +42,7 @@ test_mem = 128 test_mac = "00:11:22:33:44:aa" -def setup_env(server, virt): +def setup_env(server, virt, nettype='network'): destroy_and_undefine_all(server) vsxml = None if virt == "Xen": @@ -58,6 +58,20 @@ else: vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, mac = test_mac, disk = test_disk) + if nettype == 'bridge': + int_name = vsxml.xml_get_net_bridge() + else: + int_name = vsxml.xml_get_net_network() + + if int_name == None: + devices = vsxml.get_node('/domain/devices') + vsxml.set_interface_details(devices, test_mac, nettype, virt) + + if nettype == 'bridge': + vsxml.set_bridge_name(int_name) + else: + vsxml.set_net_name(int_name) + try: ret = vsxml.define(server) if not ret: @@ -68,7 +82,7 @@ logger.error("Exception : %s", details) return FAIL, vsxml, test_disk - return PASS, vsxml, test_disk + return PASS, vsxml, test_disk, int_name def get_instance(server, pool, list, virt='Xen'): try: @@ -111,17 +125,12 @@ status = PASS - status, vsxml, test_disk = setup_env(options.ip, options.virt) + status, vsxml, test_disk, test_network = setup_env(options.ip, options.virt) if status != PASS: + vsxml.undefine(options.ip) return status status, diskid = create_diskpool_conf(options.ip, options.virt) - if status != PASS: - cleanup_restore(options.ip, options.virt) - vsxml.undefine(options.ip) - return status - - status, test_network = create_netpool_conf(options.ip, options.virt) if status != PASS: cleanup_restore(options.ip, options.virt) vsxml.undefine(options.ip) @@ -152,7 +161,6 @@ break cleanup_restore(options.ip, options.virt) - destroy_netpool(options.ip, options.virt, test_network) vsxml.undefine(options.ip) return status diff -r 0f568c2c3603 -r c96db4410fd7 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Wed Aug 06 06:08:02 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Thu Aug 07 02:17:29 2008 -0700 @@ -24,7 +24,7 @@ # import sys -from VirtLib import utils +from VirtLib import utils, live from XenKvmLib import assoc from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.vxml import get_class @@ -43,7 +43,7 @@ test_mem = 128 test_mac = "00:11:22:33:44:aa" -def setup_env(server, virt): +def setup_env(server, virt, nettype='network'): destroy_and_undefine_all(server) vsxml = None if virt == "Xen": @@ -57,6 +57,20 @@ else: vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, mac = test_mac, disk = test_disk) + if nettype == 'bridge': + int_name = vsxml.xml_get_net_bridge() + else: + int_name = vsxml.xml_get_net_network() + + if int_name == None: + devices = vsxml.get_node('/domain/devices') + vsxml.set_interface_details(devices, test_mac, nettype, virt) + + if nettype == 'bridge': + vsxml.set_bridge_name(int_name) + else: + vsxml.set_net_name(int_name) + try: ret = vsxml.define(server) if not ret: @@ -67,7 +81,7 @@ logger.error("Exception : %s", details) return FAIL, vsxml, test_disk - return PASS, vsxml, test_disk + return PASS, vsxml, test_disk, int_name def init_list(test_disk, diskid, test_network, virt='Xen'): @@ -163,16 +177,13 @@ server = options.ip virt = options.virt - status, vsxml, test_disk = setup_env(server, virt) + status, vsxml, test_disk, test_network = setup_env(server, virt) if status != PASS: return status status, diskid = create_diskpool_conf(server, virt) if status != PASS: - return status - - status, test_network = create_netpool_conf(server, virt) - if status != PASS: + vsxml.undefine(server) return status cn_id_list = init_list(test_disk, diskid, test_network, options.virt) @@ -181,10 +192,11 @@ status = get_rasdinst_verify_pool_from_RAFP(server, virt, vsxml, rasd_cn, id_info) if status != PASS: + cleanup_restore(server, virt) + vsxml.undefine(server) return status cleanup_restore(server, virt) - destroy_netpool(server, virt, test_network) vsxml.undefine(server) return status From yunguol at cn.ibm.com Thu Aug 7 09:13:34 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 7 Aug 2008 17:13:34 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool instead of creating a new one In-Reply-To: <489973CA.2010501@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-06 17:50:02: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User root at elm3b197.beaverton.ibm.com > > # Date 1217987020 25200 > > # Node ID f50bfc180219f6cca02e73b55ec4472b07bc64ac > > # Parent 3add446da91108d419ce8adae434ebc78039fa34 > > [TEST] Fix RAFP.02 failuer for KVM, using existing networkpool > instead of creating a new one > > > > Signed-off-by: Guolian Yun > > > > diff -r 3add446da911 -r f50bfc180219 suites/libvirt- > cim/cimtest/ResourceAllocationFromPool/02_reverse.py > > --- a/suites/libvirt- > cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05 > 08:59:29 2008 -0700 > > +++ b/suites/libvirt- > cim/cimtest/ResourceAllocationFromPool/02_reverse.py Tue Aug 05 > 18:43:40 2008 -0700 > > @@ -171,7 +171,7 @@ def main(): > > if status != PASS: > > return status > > > > - status, test_network = create_netpool_conf(server, virt) > > + status, test_network = create_netpool_conf(server, virt, > use_existing=True) > > > This fix works fine for this test case. > The actual reason for this test case to fail is bcs of the difference in > the networkpool used to define the guest and the pool used in the > create_netpool_conf(). > If we see the _set_vbridge() or set_vnetwork() of the vxml.py they make > use of the networkpool/bridge information if they already exist or they > create one, see below: > def _set_vbridge(self, ip, virt_type): > network_list = live.net_list(ip, virt=virt_type) > if len(network_list) > 0: > vbr = live.get_bridge_from_network_xml(network_list[0], ip, > virt = virt_type) > else: > logger.info('No virutal network found') > logger.info('Trying to create one ......') > netxml = NetXML(ip, virt=virt_type) > > .................... > > > AND > > def set_vnetwork(self, interface, virt_type): > network_list = live.net_list(CIM_IP, virt_type) > if len(network_list) > 0: > nname = network_list[0] > else: > logger.info('No virutal network found') > logger.info('Trying to create one ......') > netxml = NetXML(CIM_IP, virt=virt_type) > ret = netxml.create_vnet() > > > 1) We might have to sync the function _set_vbridge() and set_vnetwork() > to something similar to create_netpool_conf() funtion. > > OR > > And also, we do not need create_netpool_conf() in this test case as the > call to vxml.define will internally call set_interface_details() and > assign the network information accordingly. > > 2) Removing the create_netpool_conf() and either getting the bridge name > using xml_get_net_bridge() or network name info by using > xml_get_net_network() will also solve the failure seen in the test case. > > I think we should go with the approach 2 to solve the above test case > problem, any thoughts ?? Excellent! Done with approach 2. > > Thanks and Regards, > Deepti. > > if status != PASS: > > return status > > > > @@ -184,7 +184,6 @@ def main(): > > return status > > > > cleanup_restore(server, virt) > > - destroy_netpool(server, virt, test_network) > > vsxml.undefine(server) > > return status > > > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Thu Aug 7 11:30:28 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 07 Aug 2008 17:00:28 +0530 Subject: [Libvirt-cim] CimTest Report on XenFV 07-08-2008 Message-ID: <489ADCD4.10009@linux.vnet.ibm.com> ====================================== CIM Test Report for XenFV ====================================== Distro : RHEL 5.2 Beta Kernel : 2.6.18-88.el5xen Xen version : 3.1.2-88.el5 Libvirt : libvirt-0.3.3-7.el5 CIMOM : pegasus PyWBEM : pywbem-3.14 CIM Schema : cimv216Experimental LibCMPIutil : 83 LibVirtCIM : 660 CIMTEST : 287 ====================================== PASS : 114 TOTAL FAILED : 9 [5 test cases passed when ran manually] ACTUAL FAILED : 4 XFAIL : 3 SKIP : 7 [1 tc passed when run manually] ACTUAL SKIPPED: 6 ------------------- Total : 133 ====================================== List of tc that are failing: ComputerSystem - 06_paused_active_suspend.py: FAIL ComputerSystem - 35_start_reset.py: FAIL ResourceAllocationFromPool - 01_forward.py: FAIL ResourceAllocationFromPool - 02_reverse.py: FAIL The following tc passed when run manually: LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL NetworkPort - 01_netport.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL The following SKIPPED tc passed when run manually: LogicalDisk - 02_nodevs.py Please find the complete report attached with the mail. Thanks and Regards, Deepti. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Aug7-XenFV-report URL: From deeptik at linux.vnet.ibm.com Thu Aug 7 11:38:10 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 07 Aug 2008 17:08:10 +0530 Subject: [Libvirt-cim] Re: CimTest Report on XenFV 07-08-2008 In-Reply-To: <489ADCD4.10009@linux.vnet.ibm.com> References: <489ADCD4.10009@linux.vnet.ibm.com> Message-ID: <489ADEA2.30905@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ====================================== > CIM Test Report for XenFV > ====================================== > Distro : RHEL 5.2 Beta > Kernel : 2.6.18-88.el5xen > Xen version : 3.1.2-88.el5 > Libvirt : libvirt-0.3.3-7.el5 > CIMOM : pegasus > PyWBEM : pywbem-3.14 > CIM Schema : cimv216Experimental > LibCMPIutil : 83 > LibVirtCIM : 660 > CIMTEST : 287 > ====================================== > PASS : 114 > TOTAL FAILED : 9 [5 test cases passed when ran manually] > ACTUAL FAILED : 4 > XFAIL : 3 > SKIP : 7 [1 tc passed when run manually] > ACTUAL SKIPPED: 6 > ------------------- > Total : 133 > ====================================== > > List of tc that are failing: > > ComputerSystem - 06_paused_active_suspend.py: FAIL ComputerSystem - 35_start_reset.py: FAIL These test case are failing intermittently to execute even when the VS are in the valid state to be able to move to different state. I tried inserting delay between the state transition and they passed. For ex: For 06_paused_active_suspend.py; For the above tc it is valid to move the VS from RUNNING/BLOCKED to SUSPEND. But, even though the VS was in the BLOCKED state it was failing with the following error when tried to SUSPEND: ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain not running') ERROR - Unable to suspend dom 'DomST1' using RequestedStateChange() InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running I verified the EnabledState Value to be appropriately set to 2 [BLOCKED] before moving to SUSPEND. I tried putting some debug statement in the Virt_ComputerSystem.c in state_change_pause() function: Here is the debug msg, which shows value of *0* instead of *2*: std_invokemethod.c(279): Method `RequestStateChange' execution attempted std_invokemethod.c(230): Method parameter `RequestedState' validated type 0x90 std_invokemethod.c(230): Method parameter `TimeoutPeriod' validated type 0x1800 std_invokemethod.c(303): Executing handler for method `RequestStateChange' misc_util.c(72): Connecting to libvirt with uri `xen' *Virt_ComputerSystem.c(815): Debug: info->state 0* infostore.c(88): Path is /etc/libvirt/cim/Xen_DomST1 infostore.c(353): Creating new node reqstate=9 The other tc ComputerSystem - 35_start_reset.py also passed when a delay was introduced between STARTING the domain and before RESETTING . Any thoughts what can be the proper way of fixing these tc ? The above tc had passed when I submitted the fix last time. ResourceAllocationFromPool - 01_forward.py: FAIL ResourceAllocationFromPool - 02_reverse.py: FAIL Fix for the above are under review. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Thu Aug 7 11:47:59 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 07 Aug 2008 17:17:59 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ResourceAllocationFromPool.01 & 02 In-Reply-To: References: Message-ID: <489AE0EF.1040600@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1218100649 25200 > # Node ID c96db4410fd7b152f803726132378ec0caa9f1ad > # Parent 0f568c2c36035da2574e11d128780833392e43af > [TEST] #2 Fix ResourceAllocationFromPool.01 & 02 > > Removing the create_netpool_conf(), getting the bridge name > using xml_get_net_bridge() and network name info by using > xml_get_net_network() > > Signed-off-by: Guolian Yun > > diff -r 0f568c2c3603 -r c96db4410fd7 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py > --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Wed Aug 06 06:08:02 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Thu Aug 07 02:17:29 2008 -0700 > @@ -23,7 +23,7 @@ > # > > import sys > -from VirtLib import utils > +from VirtLib import utils, live > from XenKvmLib import assoc > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > @@ -42,7 +42,7 @@ > test_mem = 128 > test_mac = "00:11:22:33:44:aa" > > -def setup_env(server, virt): > +def setup_env(server, virt, nettype='network'): > destroy_and_undefine_all(server) > vsxml = None > if virt == "Xen": > @@ -58,6 +58,20 @@ > else: > vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, > mac = test_mac, disk = test_disk) > + if nettype == 'bridge': > + int_name = vsxml.xml_get_net_bridge() > + else: > + int_name = vsxml.xml_get_net_network() > + > + if int_name == None: > + devices = vsxml.get_node('/domain/devices') > + vsxml.set_interface_details(devices, test_mac, nettype, virt) > + > + if nettype == 'bridge': > + vsxml.set_bridge_name(int_name) > + else: > + vsxml.set_net_name(int_name) > + > Daisy, we dont need to execute all these steps. You can specify the nettype while you try to call virtxml as follows: vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, mac = test_mac, disk = test_disk, ntype="network") OR vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, mac = test_mac, disk = test_disk, ntype="bridge") You can then easily get the either network name using test_network = vsxml.xml_get_net_network() OR test_network = vsxml.xml_get_net_bridge() for bridge type. Thanks and Regards, Deepti. > try: > ret = vsxml.define(server) > if not ret: > @@ -68,7 +82,7 @@ > logger.error("Exception : %s", details) > return FAIL, vsxml, test_disk > > - return PASS, vsxml, test_disk > + return PASS, vsxml, test_disk, int_name > > def get_instance(server, pool, list, virt='Xen'): > try: > @@ -111,17 +125,12 @@ > status = PASS > > > - status, vsxml, test_disk = setup_env(options.ip, options.virt) > + status, vsxml, test_disk, test_network = setup_env(options.ip, options.virt) > if status != PASS: > + vsxml.undefine(options.ip) > return status > > status, diskid = create_diskpool_conf(options.ip, options.virt) > - if status != PASS: > - cleanup_restore(options.ip, options.virt) > - vsxml.undefine(options.ip) > - return status > - > - status, test_network = create_netpool_conf(options.ip, options.virt) > if status != PASS: > cleanup_restore(options.ip, options.virt) > vsxml.undefine(options.ip) > @@ -152,7 +161,6 @@ > break > > cleanup_restore(options.ip, options.virt) > - destroy_netpool(options.ip, options.virt, test_network) > vsxml.undefine(options.ip) > return status > > diff -r 0f568c2c3603 -r c96db4410fd7 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Wed Aug 06 06:08:02 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Thu Aug 07 02:17:29 2008 -0700 > @@ -24,7 +24,7 @@ > # > > import sys > -from VirtLib import utils > +from VirtLib import utils, live > from XenKvmLib import assoc > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib.vxml import get_class > @@ -43,7 +43,7 @@ > test_mem = 128 > test_mac = "00:11:22:33:44:aa" > > -def setup_env(server, virt): > +def setup_env(server, virt, nettype='network'): > destroy_and_undefine_all(server) > vsxml = None > if virt == "Xen": > @@ -57,6 +57,20 @@ > else: > vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, > mac = test_mac, disk = test_disk) > + if nettype == 'bridge': > + int_name = vsxml.xml_get_net_bridge() > + else: > + int_name = vsxml.xml_get_net_network() > + > + if int_name == None: > + devices = vsxml.get_node('/domain/devices') > + vsxml.set_interface_details(devices, test_mac, nettype, virt) > + > + if nettype == 'bridge': > + vsxml.set_bridge_name(int_name) > + else: > + vsxml.set_net_name(int_name) > + > try: > ret = vsxml.define(server) > if not ret: > @@ -67,7 +81,7 @@ > logger.error("Exception : %s", details) > return FAIL, vsxml, test_disk > > - return PASS, vsxml, test_disk > + return PASS, vsxml, test_disk, int_name > > def init_list(test_disk, diskid, test_network, virt='Xen'): > > @@ -163,16 +177,13 @@ > server = options.ip > virt = options.virt > > - status, vsxml, test_disk = setup_env(server, virt) > + status, vsxml, test_disk, test_network = setup_env(server, virt) > if status != PASS: > return status > > status, diskid = create_diskpool_conf(server, virt) > if status != PASS: > - return status > - > - status, test_network = create_netpool_conf(server, virt) > - if status != PASS: > + vsxml.undefine(server) > return status > > cn_id_list = init_list(test_disk, diskid, test_network, options.virt) > @@ -181,10 +192,11 @@ > status = get_rasdinst_verify_pool_from_RAFP(server, virt, vsxml, > rasd_cn, id_info) > if status != PASS: > + cleanup_restore(server, virt) > + vsxml.undefine(server) > return status > > cleanup_restore(server, virt) > - destroy_netpool(server, virt, test_network) > vsxml.undefine(server) > return status > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From danms at us.ibm.com Thu Aug 7 13:51:29 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 07 Aug 2008 06:51:29 -0700 Subject: [Libvirt-cim] [PATCH] Fix logic that determines memory only or memory terminal snapshot In-Reply-To: <394f63c771edba0828e4.1218080318@linux-l5dg.site> (Jim Fehlig's message of "Wed, 06 Aug 2008 21:38:38 -0600") References: <394f63c771edba0828e4.1218080318@linux-l5dg.site> Message-ID: <87wsitorvi.fsf@caffeine.beaverton.ibm.com> JF> - ctx->restore = (type != VIR_VSSS_SNAPSHOT_MEM); JF> + ctx->restore = (type != VIR_VSSS_SNAPSHOT_MEMT); The amount of time it took me to mentally process this change tells me that this should be made a little clearer in the code at some point. But, the fix is good. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Thu Aug 7 14:28:00 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 07 Aug 2008 07:28:00 -0700 Subject: [Libvirt-cim] Re: CimTest Report on XenFV 07-08-2008 In-Reply-To: <489ADEA2.30905@linux.vnet.ibm.com> References: <489ADCD4.10009@linux.vnet.ibm.com> <489ADEA2.30905@linux.vnet.ibm.com> Message-ID: <489B0670.5010900@linux.vnet.ibm.com> > > I verified the EnabledState Value to be appropriately set to 2 [BLOCKED] > before moving to SUSPEND. > I tried putting some debug statement in the Virt_ComputerSystem.c in > state_change_pause() function: > Here is the debug msg, which shows value of *0* instead of *2*: > > std_invokemethod.c(279): Method `RequestStateChange' execution attempted > std_invokemethod.c(230): Method parameter `RequestedState' validated > type 0x90 > std_invokemethod.c(230): Method parameter `TimeoutPeriod' validated type > 0x1800 > std_invokemethod.c(303): Executing handler for method `RequestStateChange' > misc_util.c(72): Connecting to libvirt with uri `xen' > *Virt_ComputerSystem.c(815): Debug: info->state 0* > infostore.c(88): Path is /etc/libvirt/cim/Xen_DomST1 > infostore.c(353): Creating new node reqstate=9 > This is due to the "no state" issue. I submitted a patch for this awhile back, and Dan had some review comments. I haven't had a chance to resubmit the patch. Basically, XenFV guests sometimes show up as "no state" instead of running or blocked because the guest isn't requesting the CPU. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Aug 7 15:04:23 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 07 Aug 2008 08:04:23 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix image creation for KVM only systems, also create LXC init script Message-ID: <67b52446e366c7695394.1218121463@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218121427 25200 # Node ID 67b52446e366c76953949c7680fe2e18fae375c9 # Parent 0f568c2c36035da2574e11d128780833392e43af [TEST] Fix image creation for KVM only systems, also create LXC init script If the box isn't booted on a Xen kernel, then Xen guests won't work. So I think it's safe to not create the /tmp/default-xen-kernel file. Signed-off-by: Kaitlin Rupert diff -r 0f568c2c3603 -r 67b52446e366 suites/libvirt-cim/images/Makefile --- a/suites/libvirt-cim/images/Makefile Wed Aug 06 06:08:02 2008 -0700 +++ b/suites/libvirt-cim/images/Makefile Thu Aug 07 08:03:47 2008 -0700 @@ -23,6 +23,7 @@ DEFAULT_INITRD = /tmp/default-xen-initrd DEFAULT_DIMAGE = /tmp/default-xen-dimage DEFAULT_KVMIMG = /tmp/default-kvm-dimage +DEFAULT_LXCINIT = /tmp/cimtest_lxc_init SECONDARY_DIMAGE = $(DEFAULT_DIMAGE).2ND SECONDARY_KVMIMG = $(DEFAULT_KVMIMG).2ND @@ -34,13 +35,11 @@ XMT_URL=http://xm-test.xensource.com/ramdisks/initrd-1.1-i386.img # Default to xm-test ramdisk image & kvm image for now -default: xmtestimage $(DEFAULT_KERNEL) $(DEFAULT_KVMIMG) +default: xmtestimage $(DEFAULT_KERNEL) $(DEFAULT_KVMIMG) $(DEFAULT_LXCINIT) $(DEFAULT_KERNEL): if uname -r | grep -q xen; then \ cp /boot/vmlinuz-`uname -r` $@; \ - else \ - cp /boot/vmlinuz-xen $@; \ fi $(XMT_INITRD): @@ -65,8 +64,11 @@ cp $(XMT_DIMAGE) $(DEFAULT_KVMIMG) cp $(XMT_DIMAGE) $(SECONDARY_KVMIMG) +$(DEFAULT_LXCINIT): + echo "exec /bin/bash" > $(DEFAULT_LXCINIT) + chmod 755 $(DEFAULT_LXCINIT) clean: - rm -f $(DEFAULT_KERNEL) $(DEFAULT_INITRD) $(DEFAULT_DIMAGE) $(SECONDARY_DIMAGE) + rm -f $(DEFAULT_KERNEL) $(DEFAULT_INITRD) $(DEFAULT_DIMAGE) $(SECONDARY_DIMAGE) $(DEFAULT_LXCINIT) rm -f $(DEFAULT_KVMIMG) $(SECONDARY_KVMIMG) rm -Rf $(XMT_BASE) From jfehlig at novell.com Thu Aug 7 18:29:33 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Thu, 07 Aug 2008 12:29:33 -0600 Subject: [Libvirt-cim] [RFC] override CreateSnapshot extrinsic Message-ID: <489B3F0D.2040703@novell.com> Since the CreateSnapshot() extrinsic has 2 vendor defined values added for SnapshotType parameter, I think the method should be overridden to define these new values. The attached patch does so by creating a new class Virt_VirtualSystemSnapshotService where CreateSnapshot is overridden. The various virtualizer flavors then inherit from Virt_VirtualSystemSnapshotService instead of CIM_VirtualSystemSnapshotService directly. Some tools will parse the class info and format gui based on qualifiers it finds. In the case of CreateSnapshot, such tools will not display the vendor additions unless we override the method and describe the additions. While on the subject, I would like to understand the usefulness of SnapshotType 32768. This type will save the vm's memory state and subsequently restore the vm. IMO applying this memory snapshot later would be quite dangerous. The vm has since been running and the disk state will be quite different from when the memory snapshot was taken. Does this make sense or am I not thinking clearly :-)? Finally, invoking CreateSnapshot with SnapshotType 32769 will save the vm and leave it powered off. Querying EnabledState shows the vm 'Enabled but Offline' (suspended). According to System Virtualization Profile, one should be able to move a vm in this state to Enabled by invoking RSC(Enabled) but doing so results in "snapshot exists, apply snapshot" error. So the behavior diverges from the spec IMO. It seems the current behavior of SnapshotService should just be implemented via RSC. CreateSnapshot -> RSC(Enabled but Offline), ApplySnapshot -> RSC(Enabled) Regards, Jim -------------- next part -------------- A non-text attachment was scrubbed... Name: snapshot-service-schema.diff Type: text/x-patch Size: 3767 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Thu Aug 7 18:42:27 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 07 Aug 2008 11:42:27 -0700 Subject: [Libvirt-cim] [PATCH] (#3) For pause, reboot, and enable add support for guests in the NOSTATE state Message-ID: <1c6d0148299eef6b19c9.1218134547@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218134457 25200 # Node ID 1c6d0148299eef6b19c9eecad01063ca53fe0175 # Parent 9f2f9b117797907bfa2b89a499b4eb5bb62cd458 (#3) For pause, reboot, and enable add support for guests in the NOSTATE state. It's possible that a XenFV guest might return no state instead of blocked or running. This can occur when the guest is active, but isn't running of the CPU or blocked waiting for it. This should be a safe approach - we return an error if the guest is in some other state or if libvirt is unable to successfully change the state of the guest. Updates from 2 to 3: -Add logic to check connection type so NOSTATE only applied to Xen guests. Updates from 1 to 2: -For the reboot and reset operations, add support for paused guests (per the VSP). -If the guest returns VIR_DOMAIN_NOSTATE, the provider should return the value CIM_STATE_ENABLED, not CIM_STATE_UNKNOWN. Signed-off-by: Kaitlin Rupert diff -r 9f2f9b117797 -r 1c6d0148299e src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Mon Aug 04 11:57:27 2008 -0700 +++ b/src/Virt_ComputerSystem.c Thu Aug 07 11:40:57 2008 -0700 @@ -242,6 +242,22 @@ return state; } +static uint16_t adjust_state_if_nostate_xen(virDomainPtr dom, + uint16_t state) +{ + virConnectPtr conn; + + if (state != CIM_STATE_UNKNOWN) + return state; + + conn = virDomainGetConnect(dom); + + if (STREQC(virConnectGetType(conn), "Xen")) + return CIM_STATE_ENABLED; + + return state; +} + static int set_state_from_dom(const CMPIBroker *broker, virDomainPtr dom, CMPIInstance *instance) @@ -262,6 +278,7 @@ cim_state = state_lv_to_cim((const int)info.state); cim_state = adjust_state_if_saved(virDomainGetName(dom), cim_state); + cim_state = adjust_state_if_nostate_xen(dom, cim_state); CMSetProperty(instance, "EnabledState", (CMPIValue *)&cim_state, CMPI_uint16); @@ -810,9 +827,19 @@ static CMPIStatus state_change_pause(virDomainPtr dom, virDomainInfoPtr info) { CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn; + unsigned char state; int ret = 0; - switch (info->state) { + state = info->state; + conn = virDomainGetConnect(dom); + + if ((STREQC(virConnectGetType(conn), "Xen")) && + (state == VIR_DOMAIN_NOSTATE)) { + state = VIR_DOMAIN_RUNNING; + } + + switch (state) { case VIR_DOMAIN_RUNNING: case VIR_DOMAIN_BLOCKED: CU_DEBUG("Pause domain"); @@ -835,11 +862,22 @@ static CMPIStatus state_change_reboot(virDomainPtr dom, virDomainInfoPtr info) { CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn; + unsigned char state; int ret = 0; - switch (info->state) { + state = info->state; + conn = virDomainGetConnect(dom); + + if ((STREQC(virConnectGetType(conn), "Xen")) && + (state == VIR_DOMAIN_NOSTATE)) { + state = VIR_DOMAIN_RUNNING; + } + + switch (state) { case VIR_DOMAIN_RUNNING: case VIR_DOMAIN_BLOCKED: + case VIR_DOMAIN_PAUSED: CU_DEBUG("Reboot domain"); ret = virDomainReboot(dom, 0); break; @@ -860,11 +898,22 @@ static CMPIStatus state_change_reset(virDomainPtr dom, virDomainInfoPtr info) { CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn; + unsigned char state; int ret = 0; - switch (info->state) { + state = info->state; + conn = virDomainGetConnect(dom); + + if ((STREQC(virConnectGetType(conn), "Xen")) && + (state == VIR_DOMAIN_NOSTATE)) { + state = VIR_DOMAIN_RUNNING; + } + + switch (state) { case VIR_DOMAIN_RUNNING: case VIR_DOMAIN_BLOCKED: + case VIR_DOMAIN_PAUSED: CU_DEBUG("Reset domain"); ret = domain_reset(dom); break; From kaitlin at linux.vnet.ibm.com Thu Aug 7 18:45:15 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 07 Aug 2008 11:45:15 -0700 Subject: [Libvirt-cim] [PATCH] (#3) For pause, reboot, and enable add support for guests in the NOSTATE state In-Reply-To: <1c6d0148299eef6b19c9.1218134547@elm3b41.beaverton.ibm.com> References: <1c6d0148299eef6b19c9.1218134547@elm3b41.beaverton.ibm.com> Message-ID: <489B42BB.8070809@linux.vnet.ibm.com> > static CMPIStatus state_change_reset(virDomainPtr dom, virDomainInfoPtr info) > { > CMPIStatus s = {CMPI_RC_OK, NULL}; > + virConnectPtr conn; > + unsigned char state; > int ret = 0; > > - switch (info->state) { > + state = info->state; > + conn = virDomainGetConnect(dom); > + > + if ((STREQC(virConnectGetType(conn), "Xen")) && > + (state == VIR_DOMAIN_NOSTATE)) { > + state = VIR_DOMAIN_RUNNING; > + } Instead of having this redundant bit of code, it could be replaced by: state_lv_to_cim() adjust_state_if_nostate_xen() And then the switch can be done using CIM states instead of libvirt states. But using libvirt states for this determination seems more flexible. > + > + switch (state) { > case VIR_DOMAIN_RUNNING: > case VIR_DOMAIN_BLOCKED: > + case VIR_DOMAIN_PAUSED: > CU_DEBUG("Reset domain"); > ret = domain_reset(dom); > break; > -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Aug 7 18:48:57 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 07 Aug 2008 11:48:57 -0700 Subject: [Libvirt-cim] [PATCH] (#3) For pause, reboot, and enable add support for guests in the NOSTATE state References: <1c6d0148299eef6b19c9.1218134547@elm3b41.beaverton.ibm.com> Message-ID: <87tzdwoe3q.fsf@caffeine.beaverton.ibm.com> KR> static CMPIStatus state_change_pause(virDomainPtr dom, virDomainInfoPtr info) KR> { KR> CMPIStatus s = {CMPI_RC_OK, NULL}; KR> + virConnectPtr conn; KR> + unsigned char state; KR> int ret = 0; KR> - switch (info->state) { KR> + state = info->state; KR> + conn = virDomainGetConnect(dom); KR> + KR> + if ((STREQC(virConnectGetType(conn), "Xen")) && KR> + (state == VIR_DOMAIN_NOSTATE)) { KR> + state = VIR_DOMAIN_RUNNING; KR> + } KR> + KR> + switch (state) { I can't help but notice that you do this exact same thing in several other places. Perhaps a unified adjust_state_xen() function that would coalesce NO_STATE and RUNNING would be useful here. You could use it to pre-adjust the state before getting the CIM equivalent in the earlier code, and then use it in these state change functions to avoid these special cases? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Thu Aug 7 19:01:51 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 07 Aug 2008 12:01:51 -0700 Subject: [Libvirt-cim] [RFC] override CreateSnapshot extrinsic In-Reply-To: <489B3F0D.2040703@novell.com> (Jim Fehlig's message of "Thu, 07 Aug 2008 12:29:33 -0600") References: <489B3F0D.2040703@novell.com> Message-ID: <87od44odi8.fsf@caffeine.beaverton.ibm.com> JF> Some tools will parse the class info and format gui based on JF> qualifiers it finds. In the case of CreateSnapshot, such tools will JF> not display the vendor additions unless we override the method and JF> describe the additions. Agreed. JF> While on the subject, I would like to understand the usefulness of JF> SnapshotType 32768. This type will save the vm's memory state and JF> subsequently restore the vm. IMO applying this memory snapshot JF> later would be quite dangerous. The vm has since been running and JF> the disk state will be quite different from when the memory snapshot JF> was taken. Does this make sense or am I not thinking clearly :-)? That's true, it's not useful (or safe) to do a restore from it again, once the guest has been restored once. However, if you're looking to get the memory snapshot for forensic purposes, you would not care to be able to restore from it again. Perhaps we should use a different filename in the case of a save-and-restore snapshot so that we don't confuse our own logic into thinking that the domain has a valid save image. JF> Finally, invoking CreateSnapshot with SnapshotType 32769 will save JF> the vm and leave it powered off. Querying EnabledState shows the vm JF> Enabled but Offline' (suspended). According to System JF> Virtualization Profile, one should be able to move a vm in this JF> state to Enabled by invoking RSC(Enabled) but doing so results in JF> "snapshot exists, apply snapshot" error. So the behavior diverges JF> from the spec IMO. It seems the current behavior of SnapshotService JF> should just be implemented via RSC. CreateSnapshot -> RSC(Enabled JF> but Offline), ApplySnapshot -> RSC(Enabled) I thought we had discussed this before on IRC, but perhaps it got lost in some of the other noise. It seems a little broken to me to have the services cross each other with this bit of functionality. While it may seem trivial right now, since we only ever have one snapshot to restore from, I wonder what behavior it should have later if we support multiple ones? Should it restore from the most recent? The oldest? The snapshot service handles this by exposing the snapshots as instances that the caller can reference when asking to restore. I would expect this to be the desired and sane behavior if it was all contained in ComputerSystem, but I don't think it makes sense to intermingle the behavior of the snapshot service in this case. Perhaps it would have been better to support this by doing a save on RSC(suspend) and a restore on RSC(enabled, from suspend) in the first place, but we figured that the snapshot service would be more useful in the long run. If we specify in the capabilities object that we don't support the transition from suspended to enabled, then we're not really breaking the spec here, right? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From jfehlig at novell.com Thu Aug 7 20:20:26 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Thu, 07 Aug 2008 14:20:26 -0600 Subject: [Libvirt-cim] [RFC] override CreateSnapshot extrinsic In-Reply-To: <87od44odi8.fsf@caffeine.beaverton.ibm.com> References: <489B3F0D.2040703@novell.com> <87od44odi8.fsf@caffeine.beaverton.ibm.com> Message-ID: <489B590A.7040205@novell.com> Dan Smith wrote: > JF> While on the subject, I would like to understand the usefulness of > JF> SnapshotType 32768. This type will save the vm's memory state and > JF> subsequently restore the vm. IMO applying this memory snapshot > JF> later would be quite dangerous. The vm has since been running and > JF> the disk state will be quite different from when the memory snapshot > JF> was taken. Does this make sense or am I not thinking clearly :-)? > > That's true, it's not useful (or safe) to do a restore from it again, > once the guest has been restored once. However, if you're looking to > get the memory snapshot for forensic purposes, you would not care to be > able to restore from it again. Right, that's a valid use case. > Perhaps we should use a different > filename in the case of a save-and-restore snapshot so that we don't > confuse our own logic into thinking that the domain has a valid save > image. > Agreed. Sounds like a good idea. > JF> Finally, invoking CreateSnapshot with SnapshotType 32769 will save > JF> the vm and leave it powered off. Querying EnabledState shows the vm > JF> Enabled but Offline' (suspended). According to System > JF> Virtualization Profile, one should be able to move a vm in this > JF> state to Enabled by invoking RSC(Enabled) but doing so results in > JF> "snapshot exists, apply snapshot" error. So the behavior diverges > JF> from the spec IMO. It seems the current behavior of SnapshotService > JF> should just be implemented via RSC. CreateSnapshot -> RSC(Enabled > JF> but Offline), ApplySnapshot -> RSC(Enabled) > > I thought we had discussed this before on IRC, but perhaps it got lost > in some of the other noise. > We did. I just felt the need to revisit it after playing with the code :-). > It seems a little broken to me to have the services cross each other > with this bit of functionality. While it may seem trivial right now, > since we only ever have one snapshot to restore from, I wonder what > behavior it should have later if we support multiple ones? Should it > restore from the most recent? The oldest? The snapshot service handles > this by exposing the snapshots as instances that the caller can > reference when asking to restore. > Yep, understood. I think my biggest problem with the SnapshotService is that I have a hard time thinking about snapshots that don't include a disk component - even more so in the context of multiple snapshots. This to me is the usefulness of SnapshotService. I can happily take snapshots (either just disk or disk + memory) and then sometime later select one to apply and end up with a functional system. With multiple, memory-only snapshots I think the most recent is all that could be safely applied. > I would expect this to be the desired and sane behavior if it was all > contained in ComputerSystem, but I don't think it makes sense to > intermingle the behavior of the snapshot service in this case. Agreed. > Perhaps it would have been better to support this by doing a save on > RSC(suspend) and a restore on RSC(enabled, from suspend) in the first > place, but we figured that the snapshot service would be more useful in > the long run. > From a client's perspective I just think it is cumbersome to use the SnapShotService to implement the notion of suspend. IMO, either the providers should support suspend or not. Currently they don't (as indicated in capabilities) but after invoking CreateSnapshot the vm is in suspended state - so they kind of do. Folks here writing client code are a little confused by this :-). > If we specify in the capabilities object that we don't support the > transition from suspended to enabled, then we're not really breaking the > spec here, right? > Correct. And it seems the Virtual System Profile allows for states to occur even if the client cannot explicitly move the vm to that state. From note on page 23: NOTE State transitions may be observed even if client state management as described in section 7.6 is not supported. For example, a state transition might be initiated by means inherent to the virtualization platform, or it might be triggered during activation of the virtualization platform itself. So I think it is safe to say that from client's perspective the providers don't support the suspended state. That said, they can achieve the same effect by means of {Create,Apply}Snapshot with the vendor defined values. Thanks, Jim From danms at us.ibm.com Thu Aug 7 20:43:27 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 07 Aug 2008 13:43:27 -0700 Subject: [Libvirt-cim] [RFC] override CreateSnapshot extrinsic In-Reply-To: <489B590A.7040205@novell.com> (Jim Fehlig's message of "Thu, 07 Aug 2008 14:20:26 -0600") References: <489B3F0D.2040703@novell.com> <87od44odi8.fsf@caffeine.beaverton.ibm.com> <489B590A.7040205@novell.com> Message-ID: <87k5eso8sw.fsf@caffeine.beaverton.ibm.com> JF> Yep, understood. I think my biggest problem with the JF> SnapshotService is that I have a hard time thinking about snapshots JF> that don't include a disk component - even more so in the context of JF> multiple snapshots. This to me is the usefulness of JF> SnapshotService. I can happily take snapshots (either just disk or JF> disk + memory) and then sometime later select one to apply and end JF> up with a functional system. Right, and that's where the snapshot service will start to become much more useful, when we can support that sort of behavior on one or more platforms. JF> From a client's perspective I just think it is cumbersome to use the JF> SnapShotService to implement the notion of suspend. IMO, either the JF> providers should support suspend or not. Currently they don't (as JF> indicated in capabilities) but after invoking CreateSnapshot the vm JF> is in suspended state - so they kind of do. Folks here writing JF> client code are a little confused by this :-). But in the future, when we do have coordinated snapshots, would you ever really want to do a suspend instead of a snapshot? The danger of someone corrupting their disk is definitely higher, and I don't think there are any performance benefits for most storage types. So my point is: when we get to that point, even if we support suspend as a state transition, it would still be a "you should really be using the snapshot service instead" kinda thing, I think. JF> So I think it is safe to say that from client's perspective the JF> providers don't support the suspended state. That said, they can JF> achieve the same effect by means of {Create,Apply}Snapshot with the JF> vendor defined values. Okay, I'm happy with that for now. If it becomes an issue, perhaps we can target a behavioral change to coincide with a significant version bump. Thanks Jim! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Thu Aug 7 21:57:55 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 07 Aug 2008 14:57:55 -0700 Subject: [Libvirt-cim] [PATCH] (#4) For pause, reboot, and enable add support for guests in the NOSTATE state Message-ID: <98bc9888014993a2b964.1218146275@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218134457 25200 # Node ID 98bc9888014993a2b9642ad91202161f07941e94 # Parent 9f2f9b117797907bfa2b89a499b4eb5bb62cd458 (#4) For pause, reboot, and enable add support for guests in the NOSTATE state. It's possible that a XenFV guest might return no state instead of blocked or running. This can occur when the guest is active, but isn't running of the CPU or blocked waiting for it. This should be a safe approach - we return an error if the guest is in some other state or if libvirt is unable to successfully change the state of the guest. Updates from 3 to 4: -Use single function to convert Xen NOSTATE to RUNNING. Updates from 2 to 3: -Add logic to check connection type so NOSTATE only applied to Xen guests. Updates from 1 to 2: -For the reboot and reset operations, add support for paused guests (per the VSP). -If the guest returns VIR_DOMAIN_NOSTATE, the provider should return the value CIM_STATE_ENABLED, not CIM_STATE_UNKNOWN. Signed-off-by: Kaitlin Rupert diff -r 9f2f9b117797 -r 98bc98880149 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Mon Aug 04 11:57:27 2008 -0700 +++ b/src/Virt_ComputerSystem.c Thu Aug 07 11:40:57 2008 -0700 @@ -230,6 +230,22 @@ } } +static unsigned char adjust_state_xen(virDomainPtr dom, + unsigned char state) +{ + virConnectPtr conn; + + if (state != VIR_DOMAIN_NOSTATE) + return state; + + conn = virDomainGetConnect(dom); + + if (STREQC(virConnectGetType(conn), "Xen")) + return VIR_DOMAIN_RUNNING; + + return state; +} + static uint16_t adjust_state_if_saved(const char *name, uint16_t state) { @@ -259,6 +275,8 @@ ret = virDomainGetInfo(dom, &info); if (ret != 0) return 0; + + info.state = adjust_state_xen(dom, info.state); cim_state = state_lv_to_cim((const int)info.state); cim_state = adjust_state_if_saved(virDomainGetName(dom), cim_state); @@ -812,6 +830,8 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; int ret = 0; + info->state = adjust_state_xen(dom, info->state); + switch (info->state) { case VIR_DOMAIN_RUNNING: case VIR_DOMAIN_BLOCKED: @@ -837,9 +857,12 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; int ret = 0; + info->state = adjust_state_xen(dom, info->state); + switch (info->state) { case VIR_DOMAIN_RUNNING: case VIR_DOMAIN_BLOCKED: + case VIR_DOMAIN_PAUSED: CU_DEBUG("Reboot domain"); ret = virDomainReboot(dom, 0); break; @@ -862,9 +885,12 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; int ret = 0; + info->state = adjust_state_xen(dom, info->state); + switch (info->state) { case VIR_DOMAIN_RUNNING: case VIR_DOMAIN_BLOCKED: + case VIR_DOMAIN_PAUSED: CU_DEBUG("Reset domain"); ret = domain_reset(dom); break; From yunguol at cn.ibm.com Fri Aug 8 06:00:42 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 07 Aug 2008 23:00:42 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ResourceAllocationFromPool.01 & 02 Message-ID: <38cb7b2def3f81333420.1218175242@elm3b41.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1218175235 25200 # Node ID 38cb7b2def3f81333420a6957d24103c5b55fad9 # Parent 0f568c2c36035da2574e11d128780833392e43af [TEST] #3 Fix ResourceAllocationFromPool.01 & 02 Signed-off-by: Guolian Yun diff -r 0f568c2c3603 -r 38cb7b2def3f suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Wed Aug 06 06:08:02 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Thu Aug 07 23:00:35 2008 -0700 @@ -57,18 +57,21 @@ vsxml = virtxml(test_dom) else: vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, - mac = test_mac, disk = test_disk) + mac = test_mac, disk = test_disk, + ntype='network') + + test_network = vsxml.xml_get_net_network() try: ret = vsxml.define(server) if not ret: logger.error("Failed to Define the domain: %s", test_dom) - return FAIL, vsxml, test_disk + return FAIL, vsxml, test_disk, test_network except Exception, details: logger.error("Exception : %s", details) - return FAIL, vsxml, test_disk + return FAIL, vsxml, test_disk, test_network - return PASS, vsxml, test_disk + return PASS, vsxml, test_disk, test_network def get_instance(server, pool, list, virt='Xen'): try: @@ -111,22 +114,19 @@ status = PASS - status, vsxml, test_disk = setup_env(options.ip, options.virt) + status, vsxml, test_disk, test_network = setup_env(options.ip, options.virt) if status != PASS: + destroy_netpool(options.ip, options.virt, test_network) + vsxml.undefine(options.ip) return status status, diskid = create_diskpool_conf(options.ip, options.virt) if status != PASS: cleanup_restore(options.ip, options.virt) + destroy_netpool(options.ip, options.virt, test_network) vsxml.undefine(options.ip) return status - status, test_network = create_netpool_conf(options.ip, options.virt) - if status != PASS: - cleanup_restore(options.ip, options.virt) - vsxml.undefine(options.ip) - return status - if options.virt == 'LXC': pool = { "MemoryPool" : {'InstanceID' : "MemoryPool/0"} } rasd = { "MemoryPool" : "%s/mem" % test_dom } diff -r 0f568c2c3603 -r 38cb7b2def3f suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Wed Aug 06 06:08:02 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Thu Aug 07 23:00:35 2008 -0700 @@ -56,18 +56,20 @@ vsxml = virtxml(test_dom) else: vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, - mac = test_mac, disk = test_disk) + mac = test_mac, disk = test_disk, + ntype = 'network') + test_network = vsxml.xml_get_net_network() try: ret = vsxml.define(server) if not ret: logger.error("Failed to Define the domain: %s", test_dom) - return FAIL, vsxml, test_disk + return FAIL, vsxml, test_disk, test_network except Exception, details: logger.error("Exception : %s", details) - return FAIL, vsxml, test_disk + return FAIL, vsxml, test_disk, test_network - return PASS, vsxml, test_disk + return PASS, vsxml, test_disk, test_network def init_list(test_disk, diskid, test_network, virt='Xen'): @@ -163,16 +165,16 @@ server = options.ip virt = options.virt - status, vsxml, test_disk = setup_env(server, virt) + status, vsxml, test_disk, test_network = setup_env(server, virt) if status != PASS: + destroy_netpool(server, virt, test_network) + vsxml.undefine(server) return status status, diskid = create_diskpool_conf(server, virt) if status != PASS: - return status - - status, test_network = create_netpool_conf(server, virt) - if status != PASS: + destroy_netpool(server, virt, test_network) + vsxml.undefine(server) return status cn_id_list = init_list(test_disk, diskid, test_network, options.virt) From yunguol at cn.ibm.com Fri Aug 8 05:57:03 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 8 Aug 2008 13:57:03 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ResourceAllocationFromPool.01 & 02 In-Reply-To: <489AE0EF.1040600@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-07 19:47:59: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1218100649 25200 > > # Node ID c96db4410fd7b152f803726132378ec0caa9f1ad > > # Parent 0f568c2c36035da2574e11d128780833392e43af > > [TEST] #2 Fix ResourceAllocationFromPool.01 & 02 > > > > Removing the create_netpool_conf(), getting the bridge name > > using xml_get_net_bridge() and network name info by using > > xml_get_net_network() > > > > Signed-off-by: Guolian Yun > > > > diff -r 0f568c2c3603 -r c96db4410fd7 suites/libvirt- > cim/cimtest/ResourceAllocationFromPool/01_forward.py > > --- a/suites/libvirt- > cim/cimtest/ResourceAllocationFromPool/01_forward.py Wed Aug 06 > 06:08:02 2008 -0700 > > +++ b/suites/libvirt- > cim/cimtest/ResourceAllocationFromPool/01_forward.py Thu Aug 07 > 02:17:29 2008 -0700 > > @@ -23,7 +23,7 @@ > > # > > > > import sys > > -from VirtLib import utils > > +from VirtLib import utils, live > > from XenKvmLib import assoc > > from XenKvmLib import enumclass > > from XenKvmLib.classes import get_typed_class > > @@ -42,7 +42,7 @@ > > test_mem = 128 > > test_mac = "00:11:22:33:44:aa" > > > > -def setup_env(server, virt): > > +def setup_env(server, virt, nettype='network'): > > destroy_and_undefine_all(server) > > vsxml = None > > if virt == "Xen": > > @@ -58,6 +58,20 @@ > > else: > > vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, > > mac = test_mac, disk = test_disk) > > + if nettype == 'bridge': > > + int_name = vsxml.xml_get_net_bridge() > > + else: > > + int_name = vsxml.xml_get_net_network() > > + > > + if int_name == None: > > + devices = vsxml.get_node('/domain/devices') > > + vsxml.set_interface_details(devices, test_mac, nettype, virt) > > + > > + if nettype == 'bridge': > > + vsxml.set_bridge_name(int_name) > > + else: > > + vsxml.set_net_name(int_name) > > + > > > Daisy, we dont need to execute all these steps. > You can specify the nettype while you try to call virtxml as follows: Deepti - Thanks a lot! I specify the nettype as network in tc. #3 patch on the way! > > vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, > mac = test_mac, disk = test_disk, ntype="network") > > OR > > vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, > mac = test_mac, disk = test_disk, ntype="bridge") > > You can then easily get the either network name using > > test_network = vsxml.xml_get_net_network() > > OR > > test_network = vsxml.xml_get_net_bridge() for bridge type. > > Thanks and Regards, > Deepti. > > try: > > ret = vsxml.define(server) > > if not ret: > > @@ -68,7 +82,7 @@ > > logger.error("Exception : %s", details) > > return FAIL, vsxml, test_disk > > > > - return PASS, vsxml, test_disk > > + return PASS, vsxml, test_disk, int_name > > > > def get_instance(server, pool, list, virt='Xen'): > > try: > > @@ -111,17 +125,12 @@ > > status = PASS > > > > > > - status, vsxml, test_disk = setup_env(options.ip, options.virt) > > + status, vsxml, test_disk, test_network = setup_env(options. > ip, options.virt) > > if status != PASS: > > + vsxml.undefine(options.ip) > > return status > > > > status, diskid = create_diskpool_conf(options.ip, options.virt) > > - if status != PASS: > > - cleanup_restore(options.ip, options.virt) > > - vsxml.undefine(options.ip) > > - return status > > - > > - status, test_network = create_netpool_conf(options.ip, options.virt) > > if status != PASS: > > cleanup_restore(options.ip, options.virt) > > vsxml.undefine(options.ip) > > @@ -152,7 +161,6 @@ > > break > > > > cleanup_restore(options.ip, options.virt) > > - destroy_netpool(options.ip, options.virt, test_network) > > vsxml.undefine(options.ip) > > return status > > > > diff -r 0f568c2c3603 -r c96db4410fd7 suites/libvirt- > cim/cimtest/ResourceAllocationFromPool/02_reverse.py > > --- a/suites/libvirt- > cim/cimtest/ResourceAllocationFromPool/02_reverse.py Wed Aug 06 > 06:08:02 2008 -0700 > > +++ b/suites/libvirt- > cim/cimtest/ResourceAllocationFromPool/02_reverse.py Thu Aug 07 > 02:17:29 2008 -0700 > > @@ -24,7 +24,7 @@ > > # > > > > import sys > > -from VirtLib import utils > > +from VirtLib import utils, live > > from XenKvmLib import assoc > > from XenKvmLib.test_doms import destroy_and_undefine_all > > from XenKvmLib.vxml import get_class > > @@ -43,7 +43,7 @@ > > test_mem = 128 > > test_mac = "00:11:22:33:44:aa" > > > > -def setup_env(server, virt): > > +def setup_env(server, virt, nettype='network'): > > destroy_and_undefine_all(server) > > vsxml = None > > if virt == "Xen": > > @@ -57,6 +57,20 @@ > > else: > > vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, > > mac = test_mac, disk = test_disk) > > + if nettype == 'bridge': > > + int_name = vsxml.xml_get_net_bridge() > > + else: > > + int_name = vsxml.xml_get_net_network() > > + > > + if int_name == None: > > + devices = vsxml.get_node('/domain/devices') > > + vsxml.set_interface_details(devices, test_mac, nettype, virt) > > + > > + if nettype == 'bridge': > > + vsxml.set_bridge_name(int_name) > > + else: > > + vsxml.set_net_name(int_name) > > + > > try: > > ret = vsxml.define(server) > > if not ret: > > @@ -67,7 +81,7 @@ > > logger.error("Exception : %s", details) > > return FAIL, vsxml, test_disk > > > > - return PASS, vsxml, test_disk > > + return PASS, vsxml, test_disk, int_name > > > > def init_list(test_disk, diskid, test_network, virt='Xen'): > > > > @@ -163,16 +177,13 @@ > > server = options.ip > > virt = options.virt > > > > - status, vsxml, test_disk = setup_env(server, virt) > > + status, vsxml, test_disk, test_network = setup_env(server, virt) > > if status != PASS: > > return status > > > > status, diskid = create_diskpool_conf(server, virt) > > if status != PASS: > > - return status > > - > > - status, test_network = create_netpool_conf(server, virt) > > - if status != PASS: > > + vsxml.undefine(server) > > return status > > > > cn_id_list = init_list(test_disk, diskid, test_network, options.virt) > > @@ -181,10 +192,11 @@ > > status = get_rasdinst_verify_pool_from_RAFP(server, virt, vsxml, > > rasd_cn, id_info) > > if status != PASS: > > + cleanup_restore(server, virt) > > + vsxml.undefine(server) > > return status > > > > cleanup_restore(server, virt) > > - destroy_netpool(server, virt, test_network) > > vsxml.undefine(server) > > return status > > > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Fri Aug 8 06:46:01 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 07 Aug 2008 23:46:01 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating the bug no for in 32_start_reboot.py and 33_suspend_reboot.py Message-ID: <27296a26623a258e9e05.1218177961@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1218177942 25200 # Node ID 27296a26623a258e9e05effbcbf6d483dd0f8faa # Parent 0f568c2c36035da2574e11d128780833392e43af [TEST] Updating the bug no for in 32_start_reboot.py and 33_suspend_reboot.py. Changed the bug no to 00005 to reflect the issue where libvirt does not support rebooting the KVM guest. Signed-off-by: Deepti B. Kalakeri diff -r 0f568c2c3603 -r 27296a26623a suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Wed Aug 06 06:08:02 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Thu Aug 07 23:45:42 2008 -0700 @@ -50,7 +50,7 @@ from XenKvmLib.common_util import create sup_types = ['Xen', 'XenFV', 'KVM'] -bug_req_state = "00002" +bug_libvirt = "00005" ACTIVE_STATE = 2 REBOOT_STATE = 10 default_dom = 'cs_test_domain' @@ -89,7 +89,7 @@ def main(): if status != PASS: logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", action, default_dom) - status = XFAIL_RC(bug_req_state) + status = XFAIL_RC(bug_libvirt) break status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, diff -r 0f568c2c3603 -r 27296a26623a suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Wed Aug 06 06:08:02 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Thu Aug 07 23:45:42 2008 -0700 @@ -54,7 +54,7 @@ from XenKvmLib.common_util import create sup_types = ['Xen', 'XenFV', 'KVM'] -bug_req_state = "00002" +bug_libvirt = "00005" ACTIVE_STATE = 2 SUSPND_STATE = 9 REBOOT_STATE = 10 @@ -96,7 +96,7 @@ def main(): if status != PASS: logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", action, default_dom) - status = XFAIL_RC(bug_req_state) + status = XFAIL_RC(bug_libvirt) break status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, From yunguol at cn.ibm.com Fri Aug 8 06:48:18 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 8 Aug 2008 14:48:18 +0800 Subject: [Libvirt-cim] Cimtest Report for Xen on RHEL5.2 (2008/08/08) Message-ID: Distro : RHEL 5.2 Beta Kernel : kernel-2.6.18-92.el5 Xen version : xen-3.0.3-64.el5 Libvirt : libvirt-0.3.3-7.el5 CIMOM : pegasus PyWBEM : pywbem-3.14 CIM Schema : cimv216Experimental LibCMPIutil : 83 LibVirtCIM : 660 CIMTEST : 287 ========================================================= PASS : 121 FAILED : 8 ACTUAL FAILED : 2 SKIP : 2 Total : 133 =======================FAILED============================== RsourceAllocationFromPool - 01_forward.py: FAIL ERROR - Return NULL, expect at least one instance #3 patch under review ResourceAllocationFromPool - 02_reverse.py: FAIL ERROR - InstanceID Mismatch #3 patch under review The following tc passed when run manually: LogicalDisk - 02_nodevs.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL NetworkPort - 01_netport.py: FAIL VSSD - 02_bootldr.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL =======================CIMTEST REPORT======================= AllocationCapabilities - 01_enum.py: PASS AllocationCapabilities - 02_alloccap_gi_errs.py: PASS ComputerSystem - 01_enum.py: PASS ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 03_defineVS.py: PASS ComputerSystem - 04_defineStartVS.py: PASS ComputerSystem - 05_activate_defined_start.py: PASS ComputerSystem - 06_paused_active_suspend.py: PASS ComputerSystem - 22_define_suspend.py: PASS ComputerSystem - 23_suspend_suspend.py: PASS ComputerSystem - 27_define_suspend_errs.py: PASS ComputerSystem - 32_start_reboot.py: PASS ComputerSystem - 33_suspend_reboot.py: PASS ComputerSystem - 35_start_reset.py: PASS ComputerSystem - 40_RSC_start.py: PASS ComputerSystem - 41_cs_to_settingdefinestate.py: PASS ComputerSystem - 42_cs_gi_errs.py: PASS ComputerSystemIndication - 01_created_indication.py: PASS ElementAllocatedFromPool - 01_forward.py: PASS ElementAllocatedFromPool - 02_reverse.py: PASS ElementAllocatedFromPool - 03_reverse_errs.py: PASS ElementAllocatedFromPool - 04_forward_errs.py: PASS ElementCapabilities - 01_forward.py: PASS ElementCapabilities - 02_reverse.py: PASS ElementCapabilities - 03_forward_errs.py: PASS ElementCapabilities - 04_reverse_errs.py: PASS ElementCapabilities - 05_hostsystem_cap.py: PASS ElementConforms - 01_forward.py: PASS ElementConforms - 02_reverse.py: PASS ElementConforms - 03_ectp_fwd_errs.py: PASS ElementConforms - 04_ectp_rev_errs.py: PASS ElementSettingData - 01_forward.py: PASS ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS EnabledLogicalElementCapabilities - 01_enum.py: PASS EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS HostSystem - 01_enum.py: PASS HostSystem - 02_hostsystem_to_rasd.py: PASS HostSystem - 03_hs_to_settdefcap.py: PASS HostSystem - 04_hs_to_EAPF.py: PASS HostSystem - 05_hs_gi_errs.py: PASS HostSystem - 06_hs_to_vsms.py: PASS HostedDependency - 01_forward.py: PASS HostedDependency - 02_reverse.py: PASS HostedDependency - 03_enabledstate.py: PASS HostedDependency - 04_reverse_errs.py: PASS HostedResourcePool - 01_forward.py: PASS HostedResourcePool - 02_reverse.py: PASS HostedResourcePool - 03_forward_errs.py: PASS HostedResourcePool - 04_reverse_errs.py: PASS HostedService - 01_forward.py: PASS HostedService - 02_reverse.py: PASS HostedService - 03_forward_errs.py: PASS HostedService - 04_reverse_errs.py: PASS LogicalDisk - 01_disk.py: PASS LogicalDisk - 02_nodevs.py: FAIL ERROR - LogicalDisk returned 1 instead of empty list LogicalDisk - 03_ld_gi_errs.py: FAIL ERROR - Failed to get instance by the class of Xen_LogicalDisk ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/xvda)') Memory - 01_memory.py: FAIL ERROR - Capacity should be 262144 MB instead of 131072 MB Memory - 02_defgetmem.py: PASS Memory - 03_mem_gi_errs.py: PASS NetworkPort - 01_netport.py: FAIL ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)') NetworkPort - 02_np_gi_errors.py: PASS NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: PASS Processor - 02_definesys_get_procs.py: PASS Processor - 03_proc_gi_errs.py: PASS Profile - 01_enum.py: PASS Profile - 02_profile_to_elec.py: PASS Profile - 03_rprofile_gi_errs.py: PASS RASD - 01_verify_rasd_fields.py: PASS RASD - 02_enum.py: PASS RASD - 03_rasd_errs.py: PASS RASD - 04_disk_rasd_size.py: PASS ReferencedProfile - 01_verify_refprof.py: PASS ReferencedProfile - 02_refprofile_errs.py: PASS ResourceAllocationFromPool - 01_forward.py: FAIL ERROR - Return NULL, expect at least one instance ResourceAllocationFromPool - 02_reverse.py: FAIL ERROR - InstanceID Mismatch ERROR - Returned NetworkPool/default-net instead of NetworkPool/default-net49 ResourceAllocationFromPool - 03_forward_errs.py: PASS ResourceAllocationFromPool - 04_reverse_errs.py: PASS ResourceAllocationFromPool - 05_RAPF_err.py: PASS ResourcePool - 01_enum.py: PASS ResourcePool - 02_rp_gi_errors.py: PASS ResourcePoolConfigurationCapabilities - 01_enum.py: PASS ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS ResourcePoolConfigurationService - 01_enum.py: PASS ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS SettingsDefine - 01_forward.py: PASS SettingsDefine - 02_reverse.py: PASS SettingsDefine - 03_sds_fwd_errs.py: PASS SettingsDefine - 04_sds_rev_errs.py: PASS SettingsDefineCapabilities - 01_forward.py: PASS SettingsDefineCapabilities - 03_forward_errs.py: PASS SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS SystemDevice - 01_forward.py: PASS SystemDevice - 02_reverse.py: PASS SystemDevice - 03_fwderrs.py: PASS VSSD - 01_enum.py: PASS VSSD - 02_bootldr.py: FAIL ERROR - NameError : global name 'BaseException' is not defined Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 144, in do_try rc = f() File "02_bootldr.py", line 72, in main except BaseException, detail : NameError: global name 'BaseException' is not defined ERROR - None CIM_ERR_NOT_FOUND: No such instance (dom) VSSD - 03_vssd_gi_errs.py: PASS VSSD - 04_vssd_to_rasd.py: FAIL ERROR - Xen_VirtualSystemSettingData with VSSDC_dom was not returned ERROR - Xen_VirtualSystemSettingData returned 0 VSSD objects, expected only 1 VirtualSystemManagementCapabilities - 01_enum.py: PASS VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS VirtualSystemManagementService - 01_definesystem_name.py: PASS VirtualSystemManagementService - 02_destroysystem.py: PASS VirtualSystemManagementService - 03_definesystem_ess.py: PASS VirtualSystemManagementService - 04_definesystem_ers.py: PASS VirtualSystemManagementService - 05_destroysystem_neg.py: PASS VirtualSystemManagementService - 06_addresource.py: PASS VirtualSystemManagementService - 07_addresource_neg.py: PASS VirtualSystemManagementService - 08_modifyresource.py: PASS VirtualSystemManagementService - 09_procrasd_persist.py: PASS VirtualSystemManagementService - 10_hv_version.py: PASS VirtualSystemManagementService - 11_define_memrasdunits.py: PASS VirtualSystemMigrationCapabilities - 01_enum.py: PASS VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS VirtualSystemMigrationService - 01_migratable_host.py: PASS VirtualSystemMigrationService - 02_host_migrate_type.py: PASS VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS VirtualSystemMigrationSettingData - 01_enum.py: PASS VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS VirtualSystemSettingDataComponent - 01_forward.py: PASS VirtualSystemSettingDataComponent - 02_reverse.py: PASS VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS VirtualSystemSnapshotService - 01_enum.py: PASS VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Aug 8 07:11:43 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 8 Aug 2008 15:11:43 +0800 Subject: [Libvirt-cim] [PATCH 0 of 2] Add reporting capabilities In-Reply-To: Message-ID: Kaitlin - Sorry for late response. I think I have to review the patch set next Monday =) Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 Kaitlin Rupert Sent by: libvirt-cim-bounces at redhat.com 2008-08-07 03:28 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH 0 of 2] Add reporting capabilities This patch set will allow cimtest to generate reports. With a little extra help from a cron script, this can be used to do automated test runs. _______________________________________________ Libvirt-cim mailing list Libvirt-cim at redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Fri Aug 8 16:25:23 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 08 Aug 2008 09:25:23 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] Fix calls to create_using_definesystem() to support new param In-Reply-To: Message-ID: <55b78429571c289fee32.1218212723@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218212683 25200 # Node ID 55b78429571c289fee32af48898d4d7f23c1cbdd # Parent adf7be19f36383916980d55d138761244cb3e389 [TEST] Fix calls to create_using_definesystem() to support new param. This call now how has a ref_config param. Signed-off-by: Kaitlin Rupert diff -r adf7be19f363 -r 55b78429571c suites/libvirt-cim/cimtest/Memory/02_defgetmem.py --- a/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Mon Jul 21 17:26:45 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Fri Aug 08 09:24:43 2008 -0700 @@ -64,8 +64,11 @@ undefine_test_domain(default_dom, options.ip) + try: - rc = create_using_definesystem(default_dom, options.ip, None, None, options.virt) + rc = create_using_definesystem(default_dom, options.ip, params=None, + ref_config='', exp_err=None, + virt=options.virt) if rc != 0: raise Exception("Unable to create domain %s using DefineSys()" % default_dom) diff -r adf7be19f363 -r 55b78429571c suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py --- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Mon Jul 21 17:26:45 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Fri Aug 08 09:24:43 2008 -0700 @@ -75,9 +75,9 @@ undefine_test_domain(default_dom, options.ip) try: - rc = create_using_definesystem(default_dom, options.ip, - None, None, - options.virt) + rc = create_using_definesystem(default_dom, options.ip, params=None, + ref_config=' ', exp_err=None, + virt=options.virt) if rc != 0: raise Exception("Unable create domain %s using DefineSystem()" \ % default_dom) diff -r adf7be19f363 -r 55b78429571c suites/libvirt-cim/cimtest/VirtualSystemManagementService/03_definesystem_ess.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/03_definesystem_ess.py Mon Jul 21 17:26:45 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/03_definesystem_ess.py Fri Aug 08 09:24:43 2008 -0700 @@ -52,8 +52,8 @@ 'exp_desc' : exp_desc } - rc = create_using_definesystem(dname, options.ip, - params, exp_err, virt=options.virt) + rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', + exp_err=exp_err, virt=options.virt) if rc != PASS: logger.error('DefineSystem should NOT return OK with a wrong ss input') diff -r adf7be19f363 -r 55b78429571c suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Mon Jul 21 17:26:45 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Fri Aug 08 09:24:43 2008 -0700 @@ -51,8 +51,9 @@ 'exp_desc' : exp_desc } - rc = create_using_definesystem(dname, options.ip, - params, exp_err, virt=options.virt) + + rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', + exp_err=exp_err, virt=options.virt) if rc != PASS: logger.error('DefineSystem should NOT return OK with a wrong ss input') From kaitlin at linux.vnet.ibm.com Fri Aug 8 16:25:22 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 08 Aug 2008 09:25:22 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] #2 Add VSMS 10_referenced_config.py In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1216686405 25200 # Node ID adf7be19f36383916980d55d138761244cb3e389 # Parent 76bf5dc66e914b68807882983a827116909338b4 [TEST] #2 Add VSMS 10_referenced_config.py. This test creates a guest using default RASDS. Then another guest is defined using a reference of the first guest an the value for the ReferencedConfiguration parameter. This second guest is created with an additional network interface. The test verifies that the second guest is defined properly. It also verifies that the second guest has 2 network interfaces: one with a mac address that matches that of the first guest and one with a different mac address. This test current fails on LXC because the test suite doesn't pass a console device to the DefineSystem(). Will fix this in a follow up patch. Updates: -Create a network pool and then destroy the pool when test is complete. -Use VSSD ref instead of CS ref Signed-off-by: Kaitlin Rupert diff -r 76bf5dc66e91 -r adf7be19f363 suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Mon Jul 21 17:26:45 2008 -0700 @@ -0,0 +1,175 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Kaitlin Rupert +# +# 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 +# + +import sys +import pywbem +from XenKvmLib.common_util import create_using_definesystem, \ + call_request_state_change, \ + poll_for_state_change, get_cs_instance, \ + create_netpool_conf, destroy_netpool +from XenKvmLib import vsms +from VirtLib import utils +from CimTest.Globals import logger, do_main +from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.test_doms import destroy_and_undefine_domain +from XenKvmLib.classes import get_typed_class +from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.test_xml import dumpxml + +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +test_dom = 'rstest_domain' +test_dom2 = 'rstest_domain2' + +mac = "aa:aa:aa:00:00:00" + +REQUESTED_STATE = 2 +TIME = "00000000000000.000000:000" + +def setup_first_guest(ip, virt): + status = create_using_definesystem(test_dom, ip, virt=virt) + if status != PASS: + logger.error("Unable to define %s using DefineSystem()" % test_dom) + return FAIL + + rc = call_request_state_change(test_dom, ip, REQUESTED_STATE, TIME, virt) + if rc != 0: + logger.error("Unable to start %s" % test_dom) + return FAIL + + status, cs = poll_for_state_change(ip, virt, test_dom, REQUESTED_STATE) + if status != PASS: + logger.error("Unable to start %s" % test_dom) + return FAIL + + return PASS + +def get_vssd_ref(ip, virt): + rc, cs = get_cs_instance(test_dom, ip, virt) + if rc != 0: + return None + + cn = "ComputerSystem" + ccn = get_typed_class(virt, cn) + vssd = AssociatorNames(ip, 'SettingsDefineState', cn, virt=virt, + Name = test_dom, CreationClassName = ccn) + + if len(vssd) != 1: + logger.error("Returned %i vssd insts for '%s'", len(vssd), test_dom) + return None + + return vssd[0] + +def get_vssd_rasd(virt): + vssd, def_rasd = vsms.default_vssd_rasd_str(dom_name=test_dom2, + net_type='network', + net_mac=mac, virt=virt) + + rasd = [] + for inst in def_rasd: + cn = get_typed_class(virt, "NetResourceAllocationSettingData") + if cn in inst: + rasd.append(inst) + + params = {} + + if len(rasd) != 1: + return params + + params['vssd'] = vssd + params['rasd'] = rasd + + return params + +def get_dom_macs(server, dom, virt): + mac_list = [] + + myxml = dumpxml(dom, server, virt=virt) + + lines = myxml.splitlines() + for l in lines: + if l.find("mac address=") != -1: + mac = l.split('=')[1] + mac = mac.lstrip('\'') + mac = mac.rstrip('\'/>') + mac_list.append(mac) + + return mac_list + + at do_main(sup_types) +def main(): + options = main.options + + try: + status, net_name = create_netpool_conf(options.ip, options.virt, False) + if status != PASS: + logger.error('Unable to find a network pool') + return FAIL + + status = setup_first_guest(options.ip, options.virt) + if status != PASS: + raise Exception("Unable to start %s" % test_dom) + + ref = get_vssd_ref(options.ip, options.virt) + if ref is None: + raise Exception("Unable to get %s reference" % test_dom) + + define_params = get_vssd_rasd(options.virt) + if len(define_params) != 2: + raise Exception("Unable to build VSSD and RASD instances for %s" % \ + test_dom2) + + status = create_using_definesystem(test_dom2, options.ip, + params=define_params, ref_config=ref, + virt=options.virt) + if status != PASS: + raise Exception("Unable to define %s" % test_dom2) + + dom1_mac_list = get_dom_macs(options.ip, test_dom, options.virt) + if len(dom1_mac_list) != 1: + raise Exception("%s has %d macs, expected 1" % (test_dom, + len(dom1_mac_list))) + + dom2_mac_list = get_dom_macs(options.ip, test_dom2, options.virt) + if len(dom2_mac_list) != 2: + raise Exception("%s has %d macs, expected 2" % (test_dom2, + len(dom2_mac_list))) + + for item in dom2_mac_list: + if item != mac and item != dom1_mac_list[0]: + raise Exception("%s has unexpected mac value, exp: %s %s" % \ + (item, mac, dom1_mac_list[0])) + + status = PASS + + except Exception, details: + logger.error(details) + status = FAIL + + destroy_netpool(options.ip, options.virt, net_name) + destroy_and_undefine_domain(test_dom, options.ip, options.virt) + destroy_and_undefine_domain(test_dom2, options.ip, options.virt) + + return status + +if __name__ == "__main__": + sys.exit(main()) + From kaitlin at linux.vnet.ibm.com Fri Aug 8 16:25:20 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 08 Aug 2008 09:25:20 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] ReferencedConfiguration test Message-ID: This is one way of testing the ReferencedConfiguration support. Will need to add more tests in the future. From kaitlin at linux.vnet.ibm.com Fri Aug 8 16:25:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 08 Aug 2008 09:25:21 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] #2 Fixes to support the ReferencedConfiguration VSMS param In-Reply-To: Message-ID: <76bf5dc66e914b688078.1218212721@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1216686405 25200 # Node ID 76bf5dc66e914b68807882983a827116909338b4 # Parent d279e40c73d27e7fced47c2c63ba0fd2b0b56cf6 [TEST] #2 Fixes to support the ReferencedConfiguration VSMS param. These changes are needed to create a test case that tests the ReferencedConfiguration VSMS parameter. Fixes: -Add ref_config param to create_using_definesystem() - allows the caller to specify a reference for the ReferenceConfiguration param -Add enumerate_names() - Calls EnumerateInstanceNames() so the caller can get a list of CS references -Fix default_vssd_rasd_str() so that is a mac address is supplied to the function, it is used instead of one of the const.<> values. Updates: -Add LXC network mac address Signed-off-by: Kaitlin Rupert diff -r d279e40c73d2 -r 76bf5dc66e91 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Aug 07 16:10:53 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Jul 21 17:26:45 2008 -0700 @@ -65,8 +65,8 @@ return (0, cs) -def create_using_definesystem(domain_name, ip, - params=None, exp_err=None, virt='Xen'): +def create_using_definesystem(domain_name, ip, params=None, ref_config=' ', + exp_err=None, virt='Xen'): bug = "85673" try: class_vsms = eval('vsms.' + \ @@ -90,7 +90,7 @@ service.DefineSystem(SystemSettings=vssd, ResourceSettings=rasd, - ReferenceConfiguration=' ') + ReferenceConfiguration=ref_config) except pywbem.CIMError, (rc, desc): if rc == exp_rc and desc.find(exp_desc) >= 0: logger.info('Got expected rc code and error string.') diff -r d279e40c73d2 -r 76bf5dc66e91 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Thu Aug 07 16:10:53 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jul 21 17:26:45 2008 -0700 @@ -268,10 +268,14 @@ return vssd.mof(), [d.mof(), m.mof()] class_nasd = get_nasd_class(virt) - if virt == 'KVM': + if net_mac != const.Xen_default_mac: + pass + elif virt == 'KVM': net_mac= const.KVM_default_mac elif virt == 'XenFV': net_mac = const.XenFV_default_mac + elif virt == 'LXC': + net_mac = const.LXC_default_mac n = class_nasd( type=net_type, mac=net_mac, From kaitlin at linux.vnet.ibm.com Fri Aug 8 16:48:28 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 08 Aug 2008 09:48:28 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Remove XFAIL from NetworkPort 03 Message-ID: <5f7a1fd46a3678b0628b.1218214108@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218214093 25200 # Node ID 5f7a1fd46a3678b0628b7ae2f1d95c6f633f5fab # Parent 55b78429571c289fee32af48898d4d7f23c1cbdd [TEST] Remove XFAIL from NetworkPort 03. This issue has been fixed in the providers. Signed-off-by: Kaitlin Rupert diff -r 55b78429571c -r 5f7a1fd46a36 suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Fri Aug 08 09:24:43 2008 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Fri Aug 08 09:48:13 2008 -0700 @@ -32,13 +32,12 @@ from XenKvmLib.vxml import KVMXML from CimTest.Globals import logger from CimTest.Globals import do_main -from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from CimTest.ReturnCodes import PASS, FAIL sup_types = ['KVM'] test_dom = "test_domain" test_mac = "00:11:22:33:44:55" -bug = '00004' @do_main(sup_types) def main(): @@ -62,7 +61,7 @@ except Exception, detail: logger.error("Exception: %s" % detail) cxml.undefine(options.ip) - return XFAIL_RC(bug) + return FAIL if dev.DeviceID != devid: logger.error("DeviceID reported incorrectly (%s instead of %s)", From jfehlig at novell.com Fri Aug 8 18:14:28 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Fri, 08 Aug 2008 12:14:28 -0600 Subject: [Libvirt-cim] [PATCH] Override CreateSnapshot extrinsic to include vendor-defined values Message-ID: <5db4666a13d97ef7b648.1218219268@linux-l5dg.site> # HG changeset patch # User Jim Fehlig # Date 1218219221 21600 # Node ID 5db4666a13d97ef7b64837f3b9de20fb712e927f # Parent f1a672f33772c5a6314f1d5a5fd0f701b1564673 Override CreateSnapshot extrinsic to include vendor-defined values Some tools will parse the class info and format gui based on qualifiers it finds. In the case of CreateSnapshot, such tools will not display the vendor additions unless the method is overridden to describe the additions. This patch introduces a new class Virt_VirtualSystemSnapshotService where CreateSnapshot is overridden. The various virtualizer flavors then inherit from that. Signed-off-by: Jim Fehlig diff -r f1a672f33772 -r 5db4666a13d9 schema/VirtualSystemSnapshotService.mof --- a/schema/VirtualSystemSnapshotService.mof Wed Aug 06 21:35:12 2008 -0600 +++ b/schema/VirtualSystemSnapshotService.mof Fri Aug 08 12:13:41 2008 -0600 @@ -1,8 +1,59 @@ // Copyright IBM Corp. 2008 -[Description ( "Snapshot types are as follows: " - "32768: Memory-only snapshot (suspend, resume, keep image)" - "32769: Memory-only, terminal (domain is offline after op)")] -class Xen_VirtualSystemSnapshotService : CIM_VirtualSystemSnapshotService { }; -class KVM_VirtualSystemSnapshotService : CIM_VirtualSystemSnapshotService { }; -class LXC_VirtualSystemSnapshotService : CIM_VirtualSystemSnapshotService { }; +[Description ( + "Service to create, apply and destroy snapshots of virtual systems." + )] +class Virt_VirtualSystemSnapshotService: CIM_VirtualSystemSnapshotService { + [Override, Description ( "Creates a snapshot of a virtual system." ), + ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", + "4097..32767", "32768..65535" }, + Values { "Completed with No Error", "Not Supported", + "Failed", "Timeout", "Invalid Parameter", "Invalid State", + "Invalid Type", "DMTF Reserved", + "Method Parameters Checked - Job Started", + "Method Reserved", "Vendor Specific" }] + uint32 CreateSnapshot( + [In, Description ( + "Reference to the affected virtual system." )] + CIM_ComputerSystem REF AffectedSystem, + [In, Description ( "Parameter settings." ), + EmbeddedInstance ( "CIM_SettingData" )] + string SnapshotSettings, + [In, Description ( + "Requested snapshot type:\n" + "Full Snapshot: Complete snapshot of the virtual system.\n" + "Disk Snapshot: Snapshot of virtual system disks.\n" + "Memory Snapshot: Snapshot of virtual system memory only. " + "The virtual system remains active after memory snapshot " + "is complete.\n" + "Memory Snapshot Terminal: Snapshot of virtual system " + "memory only. The virtual system is transitioned to " + "disabled state after the memory snapshot is complete.\n" ), + ValueMap { "2", "3", "..", "32768", "32769", "32770..65535" }, + Values { "Full Snapshot", "Disk Snapshot", + "DMTF Reserved", "Memory Snapshot", "Memory Snapshot Terminal", + "Vendor Specific" }, + ModelCorrespondence { + "CIM_VirtualSystemSnapshotCapabilities.SnapshotTypesEnabled", + "CIM_VirtualSystemSnapshotServiceCapabilities.SnapshotTypesSupported" }] + uint16 SnapshotType, + [In, Out, Description ( + "Resulting virtual system snapshot" )] + CIM_VirtualSystemSettingData REF ResultingSnapshot, + [In, Out, Description ( + "If the operation is long running, then optionally " + "a job may be returned. In this case, the instance " + "of the CIM_VirtualSystemSettingData class " + "representing the new virtual system snapshot is " + "presented via the CIM_AffectedJobElement " + "association with the value of the AffectedElement " + "property referring to the new instance of the " + "CIM_VirtualSystemSettingData class representing " + "the virtual system snapshot and and the value of " + "the ElementEffects set to 5 (Create)." )] + CIM_ConcreteJob REF Job); +}; + +class Xen_VirtualSystemSnapshotService : Virt_VirtualSystemSnapshotService { }; +class KVM_VirtualSystemSnapshotService : Virt_VirtualSystemSnapshotService { }; +class LXC_VirtualSystemSnapshotService : Virt_VirtualSystemSnapshotService { }; From kaitlin at linux.vnet.ibm.com Fri Aug 8 22:18:50 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 08 Aug 2008 15:18:50 -0700 Subject: [Libvirt-cim] [PATCH] Map SHUTDOWN state change to current DISABLED functionality Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1218234088 25200 # Node ID e24b03f7076f18c7960eec81405c591999d8df93 # Parent 9f2f9b117797907bfa2b89a499b4eb5bb62cd458 Map SHUTDOWN state change to current DISABLED functionality Signed-off-by: Kaitlin Rupert diff -r 9f2f9b117797 -r e24b03f7076f src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Mon Aug 04 11:57:27 2008 -0700 +++ b/src/Virt_ComputerSystem.c Fri Aug 08 15:21:28 2008 -0700 @@ -793,7 +793,8 @@ ret = virDomainShutdown(dom); break; default: - CU_DEBUG("Cannot go to disabled state from %i", info->state); + CU_DEBUG("Cannot go to disabled/shutdown state from %i", + info->state); cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Invalid state transition"); @@ -811,6 +812,8 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; int ret = 0; + + info->state = adjust_state_xen(dom, info->state); switch (info->state) { case VIR_DOMAIN_RUNNING: @@ -913,7 +916,7 @@ if (state == CIM_STATE_ENABLED) s = state_change_enable(dom, &info); - else if (state == CIM_STATE_DISABLED) + else if ((state == CIM_STATE_DISABLED) || (state == CIM_STATE_SHUTDOWN)) s = state_change_disable(dom, &info); else if (state == CIM_STATE_PAUSED) s = state_change_pause(dom, &info); From deeptik at linux.vnet.ibm.com Mon Aug 11 05:27:32 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 11 Aug 2008 10:57:32 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Remove XFAIL from NetworkPort 03 In-Reply-To: <5f7a1fd46a3678b0628b.1218214108@elm3b41.beaverton.ibm.com> References: <5f7a1fd46a3678b0628b.1218214108@elm3b41.beaverton.ibm.com> Message-ID: <489FCDC4.2060902@linux.vnet.ibm.com> +1 for me. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1218214093 25200 > # Node ID 5f7a1fd46a3678b0628b7ae2f1d95c6f633f5fab > # Parent 55b78429571c289fee32af48898d4d7f23c1cbdd > [TEST] Remove XFAIL from NetworkPort 03. > > This issue has been fixed in the providers. > > Signed-off-by: Kaitlin Rupert > > diff -r 55b78429571c -r 5f7a1fd46a36 suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py > --- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Fri Aug 08 09:24:43 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Fri Aug 08 09:48:13 2008 -0700 > @@ -32,13 +32,12 @@ > from XenKvmLib.vxml import KVMXML > from CimTest.Globals import logger > from CimTest.Globals import do_main > -from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > +from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['KVM'] > > test_dom = "test_domain" > test_mac = "00:11:22:33:44:55" > -bug = '00004' > > @do_main(sup_types) > def main(): > @@ -62,7 +61,7 @@ > except Exception, detail: > logger.error("Exception: %s" % detail) > cxml.undefine(options.ip) > - return XFAIL_RC(bug) > + return FAIL > > if dev.DeviceID != devid: > logger.error("DeviceID reported incorrectly (%s instead of %s)", > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From yunguol at cn.ibm.com Mon Aug 11 06:21:17 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 14:21:17 +0800 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] #2 Fixes to support the ReferencedConfiguration VSMS param In-Reply-To: <76bf5dc66e914b688078.1218212721@elm3b41.beaverton.ibm.com> Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-09 00:25:21: > # HG changeset patch > # User Kaitlin Rupert > # Date 1216686405 25200 > # Node ID 76bf5dc66e914b68807882983a827116909338b4 > # Parent d279e40c73d27e7fced47c2c63ba0fd2b0b56cf6 > [TEST] #2 Fixes to support the ReferencedConfiguration VSMS param. > > These changes are needed to create a test case that tests the > ReferencedConfiguration VSMS parameter. > > Fixes: > -Add ref_config param to create_using_definesystem() - allows the > caller to specify a reference for the ReferenceConfiguration param > -Add enumerate_names() - Calls EnumerateInstanceNames() so the > caller can get a list of CS references > -Fix default_vssd_rasd_str() so that is a mac address is supplied > to the function, it is used instead of one of the const.<> values. > > Updates: > -Add LXC network mac address > > Signed-off-by: Kaitlin Rupert > > diff -r d279e40c73d2 -r 76bf5dc66e91 suites/libvirt- > cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Aug 07 > 16:10:53 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Jul 21 > 17:26:45 2008 -0700 > @@ -65,8 +65,8 @@ > > return (0, cs) > > -def create_using_definesystem(domain_name, ip, > - params=None, exp_err=None, virt='Xen'): > +def create_using_definesystem(domain_name, ip, params=None, ref_config=' ', > + exp_err=None, virt='Xen'): > bug = "85673" > try: > class_vsms = eval('vsms.' + \ > @@ -90,7 +90,7 @@ > > service.DefineSystem(SystemSettings=vssd, > ResourceSettings=rasd, > - ReferenceConfiguration=' ') > + ReferenceConfiguration=ref_config) > except pywbem.CIMError, (rc, desc): > if rc == exp_rc and desc.find(exp_desc) >= 0: > logger.info('Got expected rc code and error string.') > diff -r d279e40c73d2 -r 76bf5dc66e91 suites/libvirt-cim/lib/XenKvmLib/vsms.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Thu Aug 07 16:10:532008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jul 21 17:26:452008 -0700 > @@ -268,10 +268,14 @@ > return vssd.mof(), [d.mof(), m.mof()] > > class_nasd = get_nasd_class(virt) > - if virt == 'KVM': > + if net_mac != const.Xen_default_mac: > + pass > + elif virt == 'KVM': > net_mac= const.KVM_default_mac > elif virt == 'XenFV': > net_mac = const.XenFV_default_mac > + elif virt == 'LXC': > + net_mac = const.LXC_default_mac > n = class_nasd( > type=net_type, > mac=net_mac, > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 11 06:20:43 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 14:20:43 +0800 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] Fix calls to create_using_definesystem() to support new param In-Reply-To: <55b78429571c289fee32.1218212723@elm3b41.beaverton.ibm.com> Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-09 00:25:23: > # HG changeset patch > # User Kaitlin Rupert > # Date 1218212683 25200 > # Node ID 55b78429571c289fee32af48898d4d7f23c1cbdd > # Parent adf7be19f36383916980d55d138761244cb3e389 > [TEST] Fix calls to create_using_definesystem() to support new param. > > This call now how has a ref_config param. > > Signed-off-by: Kaitlin Rupert > > diff -r adf7be19f363 -r 55b78429571c suites/libvirt- > cim/cimtest/Memory/02_defgetmem.py > --- a/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Mon Jul 21 > 17:26:45 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Fri Aug 08 > 09:24:43 2008 -0700 > @@ -64,8 +64,11 @@ > > undefine_test_domain(default_dom, options.ip) > > + > try: > - rc = create_using_definesystem(default_dom, options.ip, > None, None, options.virt) > + rc = create_using_definesystem(default_dom, options.ip, params=None, > + ref_config='', exp_err=None, > + virt=options.virt) > if rc != 0: > raise Exception("Unable to create domain %s using > DefineSys()" % default_dom) > > diff -r adf7be19f363 -r 55b78429571c suites/libvirt- > cim/cimtest/Processor/02_definesys_get_procs.py > --- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py > Mon Jul 21 17:26:45 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py > Fri Aug 08 09:24:43 2008 -0700 > @@ -75,9 +75,9 @@ > undefine_test_domain(default_dom, options.ip) > > try: > - rc = create_using_definesystem(default_dom, options.ip, > - None, None, > - options.virt) > + rc = create_using_definesystem(default_dom, options.ip, params=None, > + ref_config=' ', exp_err=None, > + virt=options.virt) > if rc != 0: > raise Exception("Unable create domain %s using DefineSystem()" \ > % default_dom) > diff -r adf7be19f363 -r 55b78429571c suites/libvirt- > cim/cimtest/VirtualSystemManagementService/03_definesystem_ess.py > --- a/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/03_definesystem_ess.py > Mon Jul 21 17:26:45 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/03_definesystem_ess.py > Fri Aug 08 09:24:43 2008 -0700 > @@ -52,8 +52,8 @@ > 'exp_desc' : exp_desc > } > > - rc = create_using_definesystem(dname, options.ip, > - params, exp_err, virt=options.virt) > + rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', > + exp_err=exp_err, virt=options.virt) > > if rc != PASS: > logger.error('DefineSystem should NOT return OK with a > wrong ss input') > diff -r adf7be19f363 -r 55b78429571c suites/libvirt- > cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py > --- a/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py > Mon Jul 21 17:26:45 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py > Fri Aug 08 09:24:43 2008 -0700 > @@ -51,8 +51,9 @@ > 'exp_desc' : exp_desc > } > > - rc = create_using_definesystem(dname, options.ip, > - params, exp_err, virt=options.virt) > + > + rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', > + exp_err=exp_err, virt=options.virt) > > if rc != PASS: > logger.error('DefineSystem should NOT return OK with a > wrong ss input') > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 11 06:23:01 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 14:23:01 +0800 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] #2 Add VSMS 10_referenced_config.py In-Reply-To: Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-09 00:25:22: > # HG changeset patch > # User Kaitlin Rupert > # Date 1216686405 25200 > # Node ID adf7be19f36383916980d55d138761244cb3e389 > # Parent 76bf5dc66e914b68807882983a827116909338b4 > [TEST] #2 Add VSMS 10_referenced_config.py. > > This test creates a guest using default RASDS. Then another guest > is defined using a reference of the first guest an the value for the > ReferencedConfiguration parameter. This second guest is created > with an additional network interface. > > The test verifies that the second guest is defined properly. It > also verifies that the second guest has 2 network interfaces: one > with a mac address that matches that of the first guest and one with > a different mac address. > > This test current fails on LXC because the test suite doesn't pass a > console device to the DefineSystem(). Will fix this in a follow up patch. > > Updates: > -Create a network pool and then destroy the pool when test is complete. > -Use VSSD ref instead of CS ref > > Signed-off-by: Kaitlin Rupert > > diff -r 76bf5dc66e91 -r adf7be19f363 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/12_referenced_config.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/12_referenced_config.py > Mon Jul 21 17:26:45 2008 -0700 > @@ -0,0 +1,175 @@ > +#!/usr/bin/python > +# > +# Copyright 2008 IBM Corp. > +# > +# Authors: > +# Kaitlin Rupert > +# > +# 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 > +# > + > +import sys > +import pywbem > +from XenKvmLib.common_util import create_using_definesystem, \ > + call_request_state_change, \ > + poll_for_state_change, get_cs_instance, \ > + create_netpool_conf, destroy_netpool > +from XenKvmLib import vsms > +from VirtLib import utils > +from CimTest.Globals import logger, do_main > +from CimTest.ReturnCodes import FAIL, PASS > +from XenKvmLib.test_doms import destroy_and_undefine_domain > +from XenKvmLib.classes import get_typed_class > +from XenKvmLib.assoc import AssociatorNames > +from XenKvmLib.test_xml import dumpxml > + > +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > +test_dom = 'rstest_domain' > +test_dom2 = 'rstest_domain2' > + > +mac = "aa:aa:aa:00:00:00" > + > +REQUESTED_STATE = 2 > +TIME = "00000000000000.000000:000" > + > +def setup_first_guest(ip, virt): > + status = create_using_definesystem(test_dom, ip, virt=virt) > + if status != PASS: > + logger.error("Unable to define %s using DefineSystem()" % test_dom) > + return FAIL > + > + rc = call_request_state_change(test_dom, ip, REQUESTED_STATE, TIME, virt) > + if rc != 0: > + logger.error("Unable to start %s" % test_dom) > + return FAIL > + > + status, cs = poll_for_state_change(ip, virt, test_dom, REQUESTED_STATE) > + if status != PASS: > + logger.error("Unable to start %s" % test_dom) > + return FAIL > + > + return PASS > + > +def get_vssd_ref(ip, virt): > + rc, cs = get_cs_instance(test_dom, ip, virt) > + if rc != 0: > + return None > + > + cn = "ComputerSystem" > + ccn = get_typed_class(virt, cn) > + vssd = AssociatorNames(ip, 'SettingsDefineState', cn, virt=virt, > + Name = test_dom, CreationClassName = ccn) > + > + if len(vssd) != 1: > + logger.error("Returned %i vssd insts for '%s'", len(vssd), test_dom) > + return None > + > + return vssd[0] > + > +def get_vssd_rasd(virt): > + vssd, def_rasd = vsms.default_vssd_rasd_str(dom_name=test_dom2, > + net_type='network', > + net_mac=mac, virt=virt) > + > + rasd = [] > + for inst in def_rasd: > + cn = get_typed_class(virt, "NetResourceAllocationSettingData") > + if cn in inst: > + rasd.append(inst) > + > + params = {} > + > + if len(rasd) != 1: > + return params > + > + params['vssd'] = vssd > + params['rasd'] = rasd > + > + return params > + > +def get_dom_macs(server, dom, virt): > + mac_list = [] > + > + myxml = dumpxml(dom, server, virt=virt) > + > + lines = myxml.splitlines() > + for l in lines: > + if l.find("mac address=") != -1: > + mac = l.split('=')[1] > + mac = mac.lstrip('\'') > + mac = mac.rstrip('\'/>') > + mac_list.append(mac) > + > + return mac_list > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + try: > + status, net_name = create_netpool_conf(options.ip, options. > virt, False) > + if status != PASS: > + logger.error('Unable to find a network pool') > + return FAIL > + > + status = setup_first_guest(options.ip, options.virt) > + if status != PASS: > + raise Exception("Unable to start %s" % test_dom) > + > + ref = get_vssd_ref(options.ip, options.virt) > + if ref is None: > + raise Exception("Unable to get %s reference" % test_dom) > + > + define_params = get_vssd_rasd(options.virt) > + if len(define_params) != 2: > + raise Exception("Unable to build VSSD and RASD > instances for %s" % \ > + test_dom2) > + > + status = create_using_definesystem(test_dom2, options.ip, > + params=define_params, > ref_config=ref, > + virt=options.virt) > + if status != PASS: > + raise Exception("Unable to define %s" % test_dom2) > + > + dom1_mac_list = get_dom_macs(options.ip, test_dom, options.virt) > + if len(dom1_mac_list) != 1: > + raise Exception("%s has %d macs, expected 1" % (test_dom, > + len(dom1_mac_list))) > + > + dom2_mac_list = get_dom_macs(options.ip, test_dom2, options.virt) > + if len(dom2_mac_list) != 2: > + raise Exception("%s has %d macs, expected 2" % (test_dom2, > + len(dom2_mac_list))) > + > + for item in dom2_mac_list: > + if item != mac and item != dom1_mac_list[0]: > + raise Exception("%s has unexpected mac value, exp: %s %s" % \ > + (item, mac, dom1_mac_list[0])) > + > + status = PASS > + > + except Exception, details: > + logger.error(details) > + status = FAIL > + > + destroy_netpool(options.ip, options.virt, net_name) > + destroy_and_undefine_domain(test_dom, options.ip, options.virt) > + destroy_and_undefine_domain(test_dom2, options.ip, options.virt) > + > + return status > + > +if __name__ == "__main__": > + sys.exit(main()) > + > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 11 06:29:57 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 14:29:57 +0800 Subject: [Libvirt-cim] [PATCH 1 of 2] (#2) Add function to poll for a guest In-Reply-To: <3f73022d65dc1385ba90.1218050384@elm3b41.beaverton.ibm.com> Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-07 03:19:44: > # HG changeset patch > # User Kaitlin Rupert > # Date 1217542638 25200 > # Node ID 3f73022d65dc1385ba90a2de874c878c631e7aee > # Parent 01e5197b144a873a55bb0c088fc29cd31a5a9b0e > (#2) Add function to poll for a guest > > This function is a work around to deal with a stale data issue seen > with libvirt on RHEL 5.x. > > -Updates: > -Changed name of polling function for clarity. > > Signed-off-by: Kaitlin Rupert > > diff -r 01e5197b144a -r 3f73022d65dc suites/libvirt- > cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Aug 06 > 09:15:45 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Jul 31 > 15:17:18 2008 -0700 > @@ -33,10 +33,12 @@ > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib.devices import CIM_Instance > from XenKvmLib.classes import get_typed_class > -from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE > +from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE, \ > + CIM_ERROR_GETINSTANCE > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > -from VirtLib.live import diskpool_list, virsh_version, net_list > +from VirtLib.live import diskpool_list, virsh_version, net_list, domain_list > from XenKvmLib.vxml import PoolXML, NetXML > +from XenKvmLib.enumclass import getInstance > > test_dpath = "foo" > disk_file = '/etc/libvirt/diskpool.conf' > @@ -57,7 +59,7 @@ > return (1, cs) > > except Exception, detail: > - logger.error(Globals.CIM_ERROR_GETINSTANCE, > + logger.error(CIM_ERROR_GETINSTANCE, > get_typed_class(virt, 'ComputerSystem')) > logger.error("Exception: %s", detail) > return (1, cs) > @@ -397,3 +399,18 @@ > > return PASS > > +def libvirt_cached_data_poll(ip, virt, dom_name): > + cs = None > + > + dom_list = domain_list(ip, virt) > + if dom_name in dom_list: > + timeout = 10 > + > + for i in range(0, timeout): > + rc, cs = get_cs_instance(dom_name, ip, virt) > + if rc == 0: > + return cs > + > + sleep(1) > + > + return cs > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 11 06:36:13 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 14:36:13 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix image creation for KVM only systems, also create LXC init script In-Reply-To: <67b52446e366c7695394.1218121463@elm3b41.beaverton.ibm.com> Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-07 23:04:23: > # HG changeset patch > # User Kaitlin Rupert > # Date 1218121427 25200 > # Node ID 67b52446e366c76953949c7680fe2e18fae375c9 > # Parent 0f568c2c36035da2574e11d128780833392e43af > [TEST] Fix image creation for KVM only systems, also create LXC init script > > If the box isn't booted on a Xen kernel, then Xen guests won't work. > So I think it's safe to not create the /tmp/default-xen-kernel file. > > Signed-off-by: Kaitlin Rupert > > diff -r 0f568c2c3603 -r 67b52446e366 suites/libvirt-cim/images/Makefile > --- a/suites/libvirt-cim/images/Makefile Wed Aug 06 06:08:02 2008 -0700 > +++ b/suites/libvirt-cim/images/Makefile Thu Aug 07 08:03:47 2008 -0700 > @@ -23,6 +23,7 @@ > DEFAULT_INITRD = /tmp/default-xen-initrd > DEFAULT_DIMAGE = /tmp/default-xen-dimage > DEFAULT_KVMIMG = /tmp/default-kvm-dimage > +DEFAULT_LXCINIT = /tmp/cimtest_lxc_init > > SECONDARY_DIMAGE = $(DEFAULT_DIMAGE).2ND > SECONDARY_KVMIMG = $(DEFAULT_KVMIMG).2ND > @@ -34,13 +35,11 @@ > XMT_URL=http://xm-test.xensource.com/ramdisks/initrd-1.1-i386.img > > # Default to xm-test ramdisk image & kvm image for now > -default: xmtestimage $(DEFAULT_KERNEL) $(DEFAULT_KVMIMG) > +default: xmtestimage $(DEFAULT_KERNEL) $(DEFAULT_KVMIMG) $(DEFAULT_LXCINIT) > > $(DEFAULT_KERNEL): > if uname -r | grep -q xen; then \ > cp /boot/vmlinuz-`uname -r` $@; \ > - else \ > - cp /boot/vmlinuz-xen $@; \ > fi > > $(XMT_INITRD): > @@ -65,8 +64,11 @@ > cp $(XMT_DIMAGE) $(DEFAULT_KVMIMG) > cp $(XMT_DIMAGE) $(SECONDARY_KVMIMG) > > +$(DEFAULT_LXCINIT): > + echo "exec /bin/bash" > $(DEFAULT_LXCINIT) > + chmod 755 $(DEFAULT_LXCINIT) > > clean: > - rm -f $(DEFAULT_KERNEL) $(DEFAULT_INITRD) $(DEFAULT_DIMAGE) > $(SECONDARY_DIMAGE) > + rm -f $(DEFAULT_KERNEL) $(DEFAULT_INITRD) $(DEFAULT_DIMAGE) > $(SECONDARY_DIMAGE) $(DEFAULT_LXCINIT) > rm -f $(DEFAULT_KVMIMG) $(SECONDARY_KVMIMG) > rm -Rf $(XMT_BASE) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 11 06:30:21 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 14:30:21 +0800 Subject: [Libvirt-cim] [PATCH 2 of 2] (#2) Update ElementConforms 02 to use check_virsh_poll() work around In-Reply-To: <40afbdebb121e53b37e3.1218050385@elm3b41.beaverton.ibm.com> Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-07 03:19:45: > # HG changeset patch > # User Kaitlin Rupert > # Date 1217542648 25200 > # Node ID 40afbdebb121e53b37e3a8d357afa8de86ff09cb > # Parent 3f73022d65dc1385ba90a2de874c878c631e7aee > (#2) Update ElementConforms 02 to use check_virsh_poll() work around. > > Also clean this test case some. > > Updates: > -Fix log messages so that they print the proper class prefix > -Updated poll function name. > > Signed-off-by: Kaitlin Rupert > > diff -r 3f73022d65dc -r 40afbdebb121 suites/libvirt- > cim/cimtest/ElementConforms/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Thu > Jul 31 15:17:18 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Thu > Jul 31 15:17:28 2008 -0700 > @@ -52,6 +52,7 @@ > from XenKvmLib.vxml import XenXML, KVMXML, get_class > from XenKvmLib.classes import get_typed_class > from CimTest.ReturnCodes import PASS, FAIL > +from XenKvmLib.common_util import libvirt_cached_data_poll, get_cs_instance > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > @@ -96,51 +97,42 @@ > > inst_list = [] > > + rc, cs = get_cs_instance(test_dom, options.ip, options.virt) > + if rc != 0: > + sys = libvirt_cached_data_poll(options.ip, options.virt, test_dom) > + if sys is None: > + logger.error("Instance for %s not created" % test_dom) > + return FAIL > + > + inst_list.append(sys) > + > try: > - cs_list = computersystem.enumerate(options.ip, options.virt) > - # The len should be atleast two, as the CS returns info > - # one regarding VS and the other one for Domain-0. > - if len(cs_list) < 1: > - logger.error("ERROR: Wrong number of instances returned") > - return status > - for item in cs_list: > - if item.Name == test_dom: > - inst_list.append(item) > - break > - > - if len(inst_list) != 1: > - logger.error("ERROR: Instance for %s not created" % test_dom) > - return status > - > #Getting the hostname, to verify with the value returned bythe assoc. > host_sys = hostsystem.enumerate(options.ip, options.virt) > > if len(host_sys) < 1: > logger.error("ERROR: Enumerate returned 0 host instances") > - return status > - elif host_sys[0].Name == "": > - logger.error("ERROR: HostName seems to be empty") > - return status > - else: > - # Instance of the HostSystem > - inst_list.append(host_sys[0]) > - except Exception , detail: > - logger.error("Exception: %s" % detail) > - return status > + return FAIL > + > + inst_list.append(host_sys[0]) > + > + except Exception, details: > + logger.error("Exception: %s" % details) > + return FAIL > > prev_namespace = Globals.CIM_NS > Globals.CIM_NS = 'root/interop' > > try: > key_list = ["InstanceID"] > - proflist = enumclass.enumerate(options.ip, \ > - "RegisteredProfile", \ > + proflist = enumclass.enumerate(options.ip, > + "RegisteredProfile", > key_list, > options.virt) > - except Exception, detail: > - logger.error(CIM_ERROR_ENUMERATE, \ > - 'RegisteredProfile') > - logger.error("Exception: %s", detail) > + except Exception, details: > + logger.error(CIM_ERROR_ENUMERATE, > + get_typed_class(options.virt, 'RegisteredProfile')) > + logger.error("Exception: %s", details) > return status > > Globals.CIM_NS = prev_namespace > @@ -160,14 +152,16 @@ > Name=name) > if len(profs) != 1: > logger.error("ElementConformsToProfile assoc failed") > - return status > + return FAIL > > status = verify_profile(profs[0], exp_list[cn]) > if status != PASS: > logger.error("Verification of profile instance failed") > + return FAIL > > except Exception, detail: > - logger.error(CIM_ERROR_ASSOCIATORS, 'RegisteredProfile') > + logger.error(CIM_ERROR_ASSOCIATORS, > + get_typed_class(options.virt, 'RegisteredProfile')) > logger.error("Exception: %s", detail) > status = FAIL > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 11 07:13:19 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 15:13:19 +0800 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Enable test infrastructure to support writing to a temporary file In-Reply-To: <63757929dd9a15671ae5.1218050916@elm3b41.beaverton.ibm.com> Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-07 03:28:36: > # HG changeset patch > # User Kaitlin Rupert > # Date 1213136844 25200 > # Node ID 63757929dd9a15671ae59fb54b89121bbc93d50d > # Parent 502dddef8c34eeb85b571df0ee97f0ee0676861b > [TEST] Enable test infrastructure to support writing to a temporary file. > > Allow the option to print to a file in addition to stdout. This > will allow a test suite to read back the file after the test > execution is complete. > > If a previous log exists at the start of the run, it is removed and > a new one is created. > > Signed-off-by: Kaitlin Rupert > > diff -r 502dddef8c34 -r 63757929dd9a lib/Reporter.py > --- a/lib/Reporter.py Tue Jul 01 14:12:48 2008 -0700 > +++ b/lib/Reporter.py Tue Jun 10 15:27:24 2008 -0700 > @@ -19,10 +19,13 @@ > # License along with this library; if not, write to the Free Software > # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > # > +from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL > + > class Reporter: > > - def __init__(self, verbosity=1): > + def __init__(self, verbosity=1, log_fd=None): > self.verbosity = verbosity > + self.log_fd = log_fd > > def __red(self, str): > return "\033[01;31m%s\033[00m" % str > @@ -36,11 +39,38 @@ > def __blue(self, str): > return "\033[01;34m%s\033[00m" % str > > - def __out(self, str): > - """We might not always be just printing output to stdout, > so this should > - be used for all output.""" > - # Right now we just mimic print. > - print(str) > + def __out(self, str, status, bug): > + def no_color(string): > + return string > + > + colors = { "FAIL" : self.__red, > + "PASS" : self.__green, > + "SKIP" : self.__yellow, > + "XFAIL" : self.__blue, > + } > + > + fn = colors.get(status, no_color) > + > + if status == XFAIL: > + print "%s: %s\tBug: %s" % (str, fn(status), bug) > + else: > + print "%s: %s" % (str, fn(status)) > + > + if self.log_fd is not None: > + if status == XFAIL: > + self.log_fd.write("%s: %s\tBug: %s" % (str, status, bug)) > + else: > + self.log_fd.write("%s: %s" % (str, status)) > + > + def results(self, str, status, bug): > + > + rc = { FAIL : "FAIL", > + PASS : "PASS", > + SKIP : "SKIP", > + XFAIL : "XFAIL" > + } > + > + self.__out(str, rc[status], bug) > > def debug(self, level, str): > """Produces debug output if appropriate for current verbosity level. > @@ -49,20 +79,5 @@ > priority output will be printed in the most levels, while > low priority > output will only be printed when verbosity is high.""" > if level <= self.verbosity: > - self.__out(str) > + print(str) > > - def pass_test(self, test_name): > - str = self.__green("PASS") > - self.__out("%s: %s" % (test_name, str)) > - > - def fail_test(self, test_name): > - str = self.__red("FAIL") > - self.__out("%s: %s" % (test_name, str)) > - > - def xfail_test(self, test_name, bug): > - str = self.__blue("XFAIL") > - self.__out("%s: %s\tBug: %s" % (test_name, str, bug)) > - > - def skip_test(self, test_name): > - str = self.__yellow("SKIP") > - self.__out("%s: %s" % (test_name, str)) > diff -r 502dddef8c34 -r 63757929dd9a lib/TestSuite.py > --- a/lib/TestSuite.py Tue Jul 01 14:12:48 2008 -0700 > +++ b/lib/TestSuite.py Tue Jun 10 15:27:24 2008 -0700 > @@ -24,48 +24,59 @@ > > DEFAULT_RPC_URL = "http://morbo.linux.ibm.com/xenotest/testrun/api" > > +DEFAULT_LOG_FILE = "run_report.txt" > + > import Reporter > import re > +import os > +from CimTest.ReturnCodes import PASS, FAIL, XFAIL, SKIP > > class TestSuite: > """Test Suite class to make the output of driving test suites a > bit more consistant""" > > - def __init__(self): > - self.rep = Reporter.Reporter(verbosity=5) > + def __init__(self, log=False, file_name=None): > + if log == True: > + if file_name is None: > + self.log_file = DEFAULT_LOG_FILE > + else: > + self.log_file = file_name > > - def ok(self, group, test, output=""): > - self.rep.pass_test("%s - %s" % (group, test)) > + if os.path.exists(self.log_file): > + os.remove(self.log_file) > + self.log_fd = open(self.log_file, "w") > + else: > + self.log_file = None > + self.log_fd = None > > - def skip(self, group, test, output=""): > - self.rep.skip_test("%s - %s" % (group, test)) > + self.rep = Reporter.Reporter(verbosity=5, log_fd=self.log_fd) > + > + def print_results(self, group, test, status, output=""): > + bug = None > + if status == XFAIL: > + err = "Test error: returned XFAIL without a valid bug string." > + bug = err > + if len(output) > 0: > + try: > + str = re.search('Bug:<[0-9]*>', output).group() > + bug = re.search("Bug:<([0-9]+)>", str).group(1) > + if len(str) > 0: > + if output == str: > + #No need to pring bug twice > + output = "" > + except: > + #If we hit a problem, make sure bug = error msg > + bug = err > + > + self.rep.results("%s - %s" % (group, test), status, bug) > if output: > self.rep.debug(1, output) > > - def fail(self, group, test, output=""): > - self.rep.fail_test("%s - %s" % (group, test)) > - if output: > - self.rep.debug(1, output) > - > - def xfail(self, group, test, output=""): > - err = "Test error: returned XFAIL without a valid bug string." > - bug = err > - if len(output) > 0: > - try: > - str = re.search('Bug:<[0-9]*>', output).group() > - bug = re.search("Bug:<([0-9]+)>", str).group(1) > - if len(str) > 0: > - if output == str: > - #No need to pring bug twice > - output = "" > - except: > - #If we hit a problem, make sure bug is equal to theerror msg > - bug = err > - self.rep.xfail_test("%s - %s" % (group, test), bug) > - if output: > - self.rep.debug(1, output) > + def debug(self, str): > + self.rep.debug(1, str) > > def finish(self): > - pass > + if self.log_fd is not None: > + self.log_fd.close() > > class RPCTestSuite: > """Test Suite class to make the output of driving test suites a > bit more consistant > diff -r 502dddef8c34 -r 63757929dd9a suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Tue Jul 01 14:12:48 2008 -0700 > +++ b/suites/libvirt-cim/main.py Tue Jun 10 15:27:24 2008 -0700 > @@ -153,14 +153,7 @@ > > os_status = os.WEXITSTATUS(status) > > - if os_status == PASS: > - testsuite.ok(test['group'], test['test']) > - elif os_status == SKIP: > - testsuite.skip(test['group'], test['test'], output) > - elif os_status == XFAIL: > - testsuite.xfail(test['group'], test['test'], output) > - else: > - testsuite.fail(test['group'], test['test'], output) > + testsuite.print_results(test['group'], test['test'], os_status) > > testsuite.finish() > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 11 07:10:32 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 15:10:32 +0800 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Add test report generation In-Reply-To: <723430f4ceb0770b1a13.1218050917@elm3b41.beaverton.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-07 03:28:37: > # HG changeset patch > # User Kaitlin Rupert > # Date 1213136844 25200 > # Node ID 723430f4ceb0770b1a133c6babfc4fd63c17f7a5 > # Parent 63757929dd9a15671ae59fb54b89121bbc93d50d > [TEST] Add test report generation. > > Using the --report option, you can generate a report and have it > mailed to the address supplied. > > How to call using the report option: > > ./runtests libvirt-cim -i localhost -c -d -v LXC -g > VirtualSystemManagementService -t 01_definesystem_name.py --report > > > The user will need to create a .cimtestrc file in their home > directory in the following format: > > [email] > relay = my.mail.relay.com > from = Joe User > > Will need to add revision number support to cimtest and then add the > cimtest revision number to the report. > > Signed-off-by: Kaitlin Rupert > > diff -r 63757929dd9a -r 723430f4ceb0 suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Tue Jun 10 15:27:24 2008 -0700 > +++ b/suites/libvirt-cim/main.py Tue Jun 10 15:27:24 2008 -0700 > @@ -25,6 +25,8 @@ > from optparse import OptionParser > import os > import sys > +import smtplib > +from time import gmtime, strftime > from pywbem import WBEMConnection > sys.path.append('../../lib') > import TestSuite > @@ -35,6 +37,7 @@ > from CimTest.Globals import platform_sup > sys.path.append('./lib') > from XenKvmLib.classes import get_typed_class > +import ConfigParser > > parser = OptionParser() > parser.add_option("-i", "--ip", dest="ip", default="localhost", > @@ -54,8 +57,11 @@ > help="Virt type, select from 'Xen' & 'KVM' & > 'XenFV' & 'LXC'(default: Xen). ") > parser.add_option("-d", "--debug-output", action="store_true", dest="debug", > help="Duplicate the output to stderr") > +parser.add_option("--report", dest="report", > + help="Send report using mail info: -- > report=") > > TEST_SUITE = 'cimtest' > +CIMTEST_RCFILE = '%s/.cimtestrc' % os.environ['HOME'] > > def set_python_path(): > previous_pypath = os.environ.get('PYTHONPATH') > @@ -82,6 +88,28 @@ > > print "Cleaned log files." > > +def get_rcfile_vals(): > + if not os.access(CIMTEST_RCFILE, os.R_OK): > + print "\nCould not access the %s file for this user." % > CIMTEST_RCFILE > + print "Create this file and add the appropriate relay:" > + print "\tfrom = me at isp.com\n\trelay = my.relay\n" > + return None, None > + > + try: > + conf = ConfigParser.ConfigParser() > + if not conf.read(CIMTEST_RCFILE): > + return None, None > + > + addr = conf.get("email", "from") > + relay = conf.get("email", "relay") > + > + except Exception, details: > + print "\n%s" % details > + print "\nPlease verify the format of the %s file\n" % CIMTEST_RCFILE > + return None, None > + > + return addr, relay > + > def get_version(virt, ip): > conn = WBEMConnection('http://%s' % ip, > (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), > @@ -99,9 +127,139 @@ > changeset = 'Unknown' > return revision, changeset > > +def get_cmd_val(cmd, ip): > + rc, out = utils.run_remote(ip, cmd) > + if rc != 0: > + return "Unknown" > + return out > + > +def get_env_data(rev, changeset, ip): > + distro = get_cmd_val("cat /etc/issue | awk 'NR<=1'", ip) > + kernel_ver = get_cmd_val("uname -r", ip) > + > + libvirt_ver = "Unknown" > + hyp_ver = "Unknown" > + cmd = "virsh version" > + virsh_ver = get_cmd_val(cmd, ip) > + if virsh_ver != "Unknown": > + if len(virsh_ver.splitlines()) == 4: > + if virsh_ver.splitlines()[0].find("libvir"): > + libvirt_ver = virsh_ver.splitlines()[0].split()[4] > + > + if virsh_ver.splitlines()[3].find("hypervisor"): > + hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] > + hyp_ver = hyp_ver.split(": ")[1] > + > + cimom = get_cmd_val("ps -ef | grep cimserver | grep -v grep", ip) > + if cimom != "Unknown": > + cimom = "Pegasus" > + else: > + cimom = get_cmd_val("ps -ef | grep sfcb | grep -v grep", ip) > + if cimom != "Unknown": > + cimom = "sfcb" > + > + if cimom == "Pegasus": > + cimom_ver = get_cmd_val("cimserver -v", ip) > + elif cimom == "sfcb": > + cimom_ver = get_cmd_val("sfcbd -v", ip) > + else: > + cimom_ver = "unknown version" > + > + env = "Distro: %s\nKernel: %s\nlibvirt: %s\nHypervisor: % > s\nCIMOM: %s %s\n"\ > + % (distro, kernel_ver, libvirt_ver, hyp_ver, cimom, cimom_ver) > + > + lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \ > + (rev, changeset) > + > + return env + lc_ver > + > +def build_report(run_output, rev, changeset, virt, ip): > + rvals = { 'PASS' : 0, > + 'FAIL' : 0, > + 'XFAIL' : 0, > + 'SKIP' : 0, > + } > + > + tstr = { 'PASS' : "", > + 'FAIL' : "", > + 'XFAIL' : "", > + 'SKIP' : "", > + } > + > + date = strftime("%b %d %Y", gmtime()) > + > + heading = "%s Test Run Summary %s" % (virt, date) Do you think it's better to add distribution info in heading? Otherwise, +1 for me =) > + sys_env = get_env_data(rev, changeset, ip) > + > + divider = "=================================================\n" > + > + for line in run_output.splitlines(): > + for type, val in rvals.iteritems(): > + if type in line: > + if type == "FAIL" and "py: FAIL" not in line: > + continue > + rvals[type] += 1 > + tstr[type] += "%s\n" % line > + > + results = "" > + test_total = 0 > + for type, val in rvals.iteritems(): > + results += " %s:\t%d\n" % (type, val) > + test_total += val > + > + results_total = " -----------------\n Total:\t%d\n" % test_total > + > + test_block = "" > + for type, str in tstr.iteritems(): > + if type == "PASS" or str == "": > + continue > + test_block += "%s Test Summary:\n%s\n%s" % (type, str, divider) > + > + report = divider + heading + "\n" + divider + sys_env + divider > + results \ > + + results_total + divider + test_block + "Full report:\n" \ > + + run_output > + > + return report, heading > + > +def gen_report(rev, changeset, virt, ip, log_file): > + fd = open(log_file, "r") > + run_results = fd.read() > + fd.close() > + > + msg_body, heading = build_report(run_results, rev, changeset, virt, ip) > + > + fd = open(log_file, "w") > + rc = fd.write(msg_body) > + if rc is not None: > + print "Error %s writing report to: %s." % (rc, log_file) > + fd.close() > + > + return msg_body, heading > + > +def send_report(to_addr, from_addr, relay, report, heading): > + headers = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % > (from_addr, to_addr, > + heading) > + > + message = headers + report > + > + try: > + server = smtplib.SMTP(relay) > + result = server.sendmail(to_addr, from_addr, message) > + server.quit() > + > + if result: > + for recip in result.keys(): > + print "Could not deliver mail to: %s" % recip > + > + except Exception, details: > + print "Encountered a problem mailing report: %s" % details > + > def main(): > (options, args) = parser.parse_args() > - > + to_addr = None > + from_addr = None > + relay = None > + div = > "--------------------------------------------------------------------" > > if options.test and not options.group: > parser.print_help() > @@ -114,7 +272,15 @@ > os.environ['CIMOM_PORT'] = str(options.port) > # > > - testsuite = TestSuite.TestSuite() > + if options.report: > + from_addr, relay = get_rcfile_vals() > + > + if from_addr == None or relay == None: > + return 1 > + > + to_addr = options.report > + > + testsuite = TestSuite.TestSuite(log=True) > > set_python_path() > > @@ -139,9 +305,10 @@ > > revision, changeset = get_version(options.virt, options.ip) > > - print "Testing " + options.virt + " hypervisor" > + print "\nTesting " + options.virt + " hypervisor" > > - for test in test_list: > + for test in test_list: > + testsuite.debug(div) > t_path = os.path.join(TEST_SUITE, test['group']) > os.environ['CIM_TC'] = test['test'] > cdto = 'cd %s' % t_path > @@ -155,7 +322,16 @@ > > testsuite.print_results(test['group'], test['test'], os_status) > > + testsuite.debug("%s\n" % div) > testsuite.finish() > + > + msg_body, heading = gen_report(revision, changeset, options.virt, > + options.ip, testsuite.log_file) > + > + if options.report: > + print "Sending mail from %s to %s using %s relay.\n" % \ > + (from_addr, to_addr, relay) > + send_report(to_addr, from_addr, relay, msg_body, heading) > > if __name__ == '__main__': > sys.exit(main()) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Aug 11 07:44:04 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 11 Aug 2008 00:44:04 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding KVM and XenFV support to 41_cs_to_settingdefinestate.py Message-ID: <0b5dea4e96cd0e128c0d.1218440644@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1218440570 25200 # Node ID 0b5dea4e96cd0e128c0da6019cc545964deeba49 # Parent 8ac224c6840c79e73c54b7c59647f5be5117d29e [TEST] Adding KVM and XenFV support to 41_cs_to_settingdefinestate.py. 1) Added support for XenFV, KVM. 2) Removed get_inst_from_list(). 3) Used poll_for_state_change to get the CS instance and also verify the enabled state is set to 2 4) Also verifying that the RequestedState is set to 0 when the VS is created. Tested with Xen, XenFV and KVM on latest sources. Signed-off-by: Deepti B. Kalakeri diff -r 8ac224c6840c -r 0b5dea4e96cd suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Thu Aug 07 23:45:42 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Mon Aug 11 00:42:50 2008 -0700 @@ -37,9 +37,9 @@ # Steps: # ------ # 1) Create a guest domain. -# 2) Enumerate ComputerSystem. -# 3) Select the guest domain from the output and create info list for the guest domain -# to be used later for comparison. +# 2) Enumerate ComputerSystem and Select the guest domain from the output +# and and verify the EnabledState is 2. +# 3) Create info list for the guest domain to be used later for comparison. # 4) Get the various devices allocated to the domain by using the SystemDevice # association and giving the ComputerSystem output from the previous enumeration # as inputs to the association. @@ -70,26 +70,31 @@ from XenKvmLib import rasd from XenKvmLib import rasd from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ verify_diskrasd_values, verify_memrasd_values, rasd_init_list +from XenKvmLib.common_util import poll_for_state_change +from XenKvmLib.classes import get_typed_class -sup_types = ['Xen'] +sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = "CrossClass_GuestDom" test_vcpus = 1 test_mem = 128 test_mac = "00:11:22:33:44:aa" -test_disk = "xvda" def vssd_init_list(virt): """ Creating the lists that will be used for comparisons. """ + if virt == 'XenFV': + virt = 'Xen' + vssd_values = { - 'Caption' : "Virtual System", \ - 'InstanceID' : '%s:%s' % (virt, test_dom), \ - 'ElementName' : test_dom, \ - 'VirtualSystemIdentifier' : test_dom, \ - 'VirtualSystemType' : virt, \ - 'Classname' : "Xen_VirtualSystemSettingData" + 'Caption' : "Virtual System", + 'InstanceID' : '%s:%s' % (virt, test_dom), + 'ElementName' : test_dom, + 'VirtualSystemIdentifier' : test_dom, + 'VirtualSystemType' : virt, + 'Classname' : get_typed_class(virt, + "VirtualSystemSettingData") } return vssd_values @@ -99,19 +104,20 @@ def cs_init_list(cs_dom): Creating the lists that will be used for comparisons. """ cs_values = { - 'Caption' : cs_dom.Caption, \ - 'EnabledState' : cs_dom.EnabledState, \ - 'RequestedState' : cs_dom.RequestedState, \ - 'CreationClassName' : cs_dom.CreationClassName, \ + 'Caption' : cs_dom.Caption, + 'EnabledState' : cs_dom.EnabledState, + 'RequestedState' : cs_dom.RequestedState, + 'CreationClassName' : cs_dom.CreationClassName, 'Name' : cs_dom.Name } return cs_values -def setup_env(server, virt): +def setup_env(server, virt, test_disk): vsxml_info = None status = PASS destroy_and_undefine_all(server) virt_xml = get_class(virt) + vsxml_info = virt_xml(test_dom, mem = test_mem, vcpus=test_vcpus, mac = test_mac, @@ -137,23 +143,7 @@ def vssd_sds_err( an, fieldname, ret_val logger.error(err) logger.error(detail) -def get_inst_from_list(server, vsxml, cn, cs_list, exp_val): - status = PASS - ret = -1 - inst = None - for inst in cs_list: - if inst.Name == exp_val: - ret = PASS - break - - if ret != PASS: - logger.error("%s with %s was not returned" % (cn, exp_val)) - vsxml.destroy(server) - status = FAIL - - return status, inst - -def get_associatornames_info(server, vsxml, cn, an, qcn, name): +def get_associatornames_info(server, virt, vsxml, cn, an, qcn, name): status = PASS assoc_info = [] try: @@ -161,7 +151,8 @@ def get_associatornames_info(server, vsx an, cn, CreationClassName=cn, - Name = name) + Name = name, + virt=virt) if len(assoc_info) < 1: logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) status = FAIL @@ -174,14 +165,15 @@ def get_associatornames_info(server, vsx return status, assoc_info -def get_associators_info(server, vsxml, cn, an, qcn, instid): +def get_associators_info(server, virt, vsxml, cn, an, qcn, instid): status = PASS assoc_info = [] try: assoc_info = Associators(server, an, cn, - InstanceID = instid) + InstanceID = instid, + virt=virt) if len(assoc_info) < 1: logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) @@ -208,31 +200,39 @@ def get_SDS_verify_RASD_build_vssdc_inpu status = PASS in_setting_define_state = {} in_vssdc = {} + prasd = get_typed_class(virt, 'ProcResourceAllocationSettingData') + mrasd = get_typed_class(virt, 'MemResourceAllocationSettingData') + nrasd = get_typed_class(virt, 'NetResourceAllocationSettingData') + drasd = get_typed_class(virt, 'DiskResourceAllocationSettingData') + try: -# Building the input for Xen_SettingsDefineState association. + + # Building the input for Xen_SettingsDefineState association. for i in range(len(sd_assoc_info)): if sd_assoc_info[i]['SystemName'] == test_dom: classname_keyvalue = sd_assoc_info[i]['CreationClassName'] deviceid = sd_assoc_info[i]['DeviceID'] in_setting_define_state[classname_keyvalue] = deviceid -# Expect the Xen_SystemDevice to return 4 logical device records. -# one each for memory, network, disk and processor and hence 4. -# and hence expect the in_setting_define_state to contain just 4 entries. - an = "Xen_SystemDevice" + + # Expect the Xen_SystemDevice to return 4 logical device records. + # one each for memory, network, disk and processor and hence 4. + # and hence expect the in_setting_define_state to contain just 4 entries. + an = get_typed_class(virt, "SystemDevice") qcn = "Logical Devices" exp_len = 4 if check_len(an, in_setting_define_state, qcn, exp_len) != PASS: return FAIL, in_setting_define_state -# Get the rasd values that will be used to compare with the Xen_SettingsDefineState -# output. + + # Get the rasd values that will be used to compare with the Xen_SettingsDefineState + # output. status, rasd_values, in_list = rasd_init_list(vsxml, virt, test_disk, test_dom, test_mac, test_mem) if status != PASS: - return status - - sccn = "Xen_ComputerSystem" - an = "Xen_SettingsDefineState" + return status, rasd_values + + sccn = get_typed_class(virt,"ComputerSystem") + an = get_typed_class(virt,"SettingsDefineState") for cn, devid in sorted(in_setting_define_state.items()): assoc_info = Associators(server, an, @@ -240,10 +240,11 @@ def get_SDS_verify_RASD_build_vssdc_inpu DeviceID = devid, CreationClassName = cn, SystemName = test_dom, - SystemCreationClassName = sccn) + SystemCreationClassName = sccn, + virt=virt) -# we expect only one RASD record to be returned for each device that is used to -# query with the Xen_SettingsDefineState association. + # we expect only one RASD record to be returned for each device that is used to + # query with the Xen_SettingsDefineState association. if len(assoc_info) != 1: logger.error("%s returned %i %s objects" % (an, len(assoc_info), cn)) status = FAIL @@ -251,13 +252,13 @@ def get_SDS_verify_RASD_build_vssdc_inpu index = (len(assoc_info) - 1) rasd = rasd_values[cn] CCName = assoc_info[index].classname - if CCName == 'Xen_ProcResourceAllocationSettingData': + if CCName == prasd: status = verify_procrasd_values(assoc_info[index], rasd) - elif CCName == 'Xen_NetResourceAllocationSettingData': + elif CCName == nrasd: status = verify_netrasd_values(assoc_info[index], rasd) - elif CCName == 'Xen_DiskResourceAllocationSettingData': + elif CCName == drasd: status = verify_diskrasd_values(assoc_info[index], rasd) - elif CCName == 'Xen_MemResourceAllocationSettingData': + elif CCName == mrasd: status = verify_memrasd_values(assoc_info[index], rasd) else: status = FAIL @@ -283,9 +284,9 @@ def verify_fields(an, field_name, vssd_c def verify_VSSD_values(assoc_info, vssd_values, an, qcn): -# We expect that Xen_VirtualSystemSettingDataComponent returns only one -# Xen_VirtualSystemSettingData object when queried with disk, processor, -# network and memory rasd's and all of them return the same output. + # We expect that Xen_VirtualSystemSettingDataComponent returns only one + # Xen_VirtualSystemSettingData object when queried with disk, processor, + # network and memory rasd's and all of them return the same output. exp_len = 1 if check_len(an, assoc_info, qcn, exp_len) != PASS: return FAIL @@ -301,8 +302,8 @@ def verify_VSSD_values(assoc_info, vssd_ if verify_fields(an, 'VirtualSystemType', vssd_assoc, vssd_values) != PASS: return FAIL if vssd_assoc.classname != vssd_values['Classname']: - vssd_sds_err(an, 'Classname', vssd_assoc.classname, \ - vssd_values['Classname']) + vssd_sds_err(an, 'Classname', vssd_assoc.classname, + vssd_values['Classname']) return FAIL return PASS @@ -327,60 +328,56 @@ def main(): def main(): server = main.options.ip virt = main.options.virt - status, vsxml = setup_env(server, virt) + if virt == 'Xen': + test_disk = "xvda" + else: + test_disk = "hda" + + status, vsxml = setup_env(server, virt, test_disk) if status != PASS: return status - cs_enum = computersystem.enumerate(server) - if len(cs_enum) == 0: + status, cs_dom = poll_for_state_change(server, virt, test_dom, 2, + timeout=10) + if status != PASS and cs_dom.RequestedState != 0: vsxml.destroy(server) - return status - cn = cs_enum[0].CreationClassName - status, cs_dom = get_inst_from_list(server, - vsxml, - cn, - cs_enum, - test_dom) - if status != PASS: - vsxml.destroy(server) - return status + return FAIL -# Creating the cs info list which will be used later for comparison. + # Creating the cs info list which will be used later for comparison. cs_values = cs_init_list(cs_dom) - if cs_values['EnabledState'] != 2 : - logger.error("Improper EnabledState value set for domain %s", test_dom) - logger.error("Should have been 2 instead of %s", cs_values['EnabledState']) - vsxml.destroy(server) - return FAIL cn = cs_dom.CreationClassName - an = 'Xen_SystemDevice' + an = get_typed_class(virt, 'SystemDevice') qcn = 'Logical Devices' name = test_dom - status, sd_assoc_info = get_associatornames_info(server, vsxml, + status, sd_assoc_info = get_associatornames_info(server, virt, vsxml, cn, an, qcn, name) if status != PASS or len(sd_assoc_info) == 0: return status + status, in_vssdc_list = get_SDS_verify_RASD_build_vssdc_input(server, virt, vsxml, test_disk, sd_assoc_info) if status != PASS or len(in_vssdc_list) == 0 : vsxml.destroy(server) return status -# Verifying that the in_vssdc_list contains 4 entries one each for mem rasd, -# network rasd, processor rasd and disk rasd. + + # Verifying that the in_vssdc_list contains 4 entries one each for mem rasd, + # network rasd, processor rasd and disk rasd. exp_len = 4 if check_len(an, in_vssdc_list, qcn, exp_len) != PASS: vsxml.destroy(server) return FAIL -# Get the vssd values which will be used for verifying the Xen_VirtualSystemSettingData -# output from the Xen_VirtualSystemSettingDataComponent results. + + # Get the vssd values which will be used for verifying the + # Xen_VirtualSystemSettingData output from the + # Xen_VirtualSystemSettingDataComponent results. vssd_values = vssd_init_list(virt) - an = 'Xen_VirtualSystemSettingDataComponent' - qcn = 'Xen_VirtualSystemSettingData' + an = get_typed_class(virt, 'VirtualSystemSettingDataComponent') + qcn = get_typed_class(virt, 'VirtualSystemSettingData') for cn, instid in sorted((in_vssdc_list.items())): - status, vssd_assoc_info = get_associators_info(server, vsxml, cn, an, qcn, - instid) + status, vssd_assoc_info = get_associators_info(server, virt, vsxml, cn, + an, qcn, instid) if status != PASS or len(vssd_assoc_info) == 0: break status = verify_VSSD_values(vssd_assoc_info, vssd_values, an, qcn) @@ -389,18 +386,22 @@ def main(): if status != PASS: vsxml.destroy(server) return status -# Since the Xen_VirtualSystemSettingDataComponent returns similar output when queried with -# every RASD, we are taking the output of the last associtaion query as inputs for -# querying Xen_SettingsDefineState. + + # Since the Xen_VirtualSystemSettingDataComponent returns similar + # output when queried with every RASD, we are taking the output of + # the last associtaion query as inputs for + # querying Xen_SettingsDefineState. cn = vssd_assoc_info[0].classname - an = 'Xen_SettingsDefineState' - qcn = 'Xen_ComputerSystem' + an = get_typed_class(virt, 'SettingsDefineState') + qcn = get_typed_class(virt, 'ComputerSystem') instid = vssd_assoc_info[0]['InstanceID'] - status, cs_assoc_info = get_associators_info(server, vsxml, cn, an, qcn, instid) + status, cs_assoc_info = get_associators_info(server, virt, vsxml, cn, + an, qcn, instid) if status != PASS or len(cs_assoc_info) == 0: return status -# verify the results of Xen_SettingsDefineState with the cs_values list that was -# built using the output of the enumeration on Xen_ComputerSystem. + + # verify the results of Xen_SettingsDefineState with the cs_values list that was + # built using the output of the enumeration on Xen_ComputerSystem. status = verify_CS_values(cs_assoc_info, cs_values, an, qcn) vsxml.destroy(server) return status From yunguol at cn.ibm.com Mon Aug 11 07:53:41 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 15:53:41 +0800 Subject: [Libvirt-cim] Cimtest Report for KVM on Fedora 9 (2008/08/11) Message-ID: Distro : Fedora 9 Kernel : kernel-2.6.25-0.121.rc5.git4.fc9.x86_64 Libvirt : libvirt-0.4.4 CIMOM : sblim-sfcb-1.3.0 PyWBEM : pywbem-0.6 CIM Schema : cimv216Experimental LibCMPIutil : 83 LibVirtCIM : 665 CIMTEST : 289 ========================================================= PASS : 118 FAILED : 6 XFAIL : 3 SKIP : 6 Total : 133 =======================FAILED============================== ComputerSystemIndication - 01_created_indication.py: FAIL Got indication: KVM_ComputerSystemCreatedIndication Got indication: KVM_ComputerSystemCreatedIndication Here is the debug info on sfcb: Problem processing indication to http://localhost:8008. sfcb rc: 4 CURL error: 52 (Server returned nothing (no headers, no data)) Problem processing indication to http://localhost:8007. sfcb rc: 4 CURL error: 52 (Server returned nothing (no headers, no data)) Problem processing indication to http://localhost:8006. sfcb rc: 4 CURL error: 52 (Server returned nothing (no headers, no data)) ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(CreateResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(CreateChildResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(RemoveResourcesFromResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL ERROR - Unexpected rc code 7 and description The requested operation is not supported InvokeMethod(DeleteResourcePool): The requested operation is not supported VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL ERROR - destroy_fail>> noname: Error executing DestroySystem ERROR - (1, u'Unable to retrieve domain name.') ERROR - destroy_fail>> nonexistent: Error executing DestroySystem ERROR - (1, u'Failed to find domain') InvokeMethod(DestroySystem): Unable to retrieve domain name. InvokeMethod(DestroySystem): Failed to find domain =======================CIMTEST REPORT======================= AllocationCapabilities - 01_enum.py: PASS AllocationCapabilities - 02_alloccap_gi_errs.py: PASS ComputerSystem - 01_enum.py: PASS ComputerSystem - 02_nosystems.py: PASS ComputerSystem - 03_defineVS.py: PASS ComputerSystem - 04_defineStartVS.py: PASS ComputerSystem - 05_activate_defined_start.py: PASS ComputerSystem - 06_paused_active_suspend.py: PASS ComputerSystem - 22_define_suspend.py: PASS ComputerSystem - 23_suspend_suspend.py: PASS ComputerSystem - 27_define_suspend_errs.py: PASS ComputerSystem - 32_start_reboot.py: XFAIL Bug: 00005 InvokeMethod(RequestStateChange): Domain Operation Failed Bug:<00005> ComputerSystem - 33_suspend_reboot.py: XFAIL Bug: 00005 InvokeMethod(RequestStateChange): Domain Operation Failed Bug:<00005> ComputerSystem - 35_start_reset.py: PASS ComputerSystem - 40_RSC_start.py: PASS ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystem - 42_cs_gi_errs.py: PASS ComputerSystemIndication - 01_created_indication.py: FAIL Got indication: KVM_ComputerSystemCreatedIndication Got indication: KVM_ComputerSystemCreatedIndication ElementAllocatedFromPool - 01_forward.py: PASS ElementAllocatedFromPool - 02_reverse.py: PASS ElementAllocatedFromPool - 03_reverse_errs.py: PASS ElementAllocatedFromPool - 04_forward_errs.py: PASS ElementCapabilities - 01_forward.py: PASS ElementCapabilities - 02_reverse.py: PASS ElementCapabilities - 03_forward_errs.py: PASS ElementCapabilities - 04_reverse_errs.py: PASS ElementCapabilities - 05_hostsystem_cap.py: PASS ElementConforms - 01_forward.py: PASS ElementConforms - 02_reverse.py: PASS ElementConforms - 03_ectp_fwd_errs.py: PASS ElementConforms - 04_ectp_rev_errs.py: PASS ElementSettingData - 01_forward.py: PASS ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS EnabledLogicalElementCapabilities - 01_enum.py: PASS EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS HostSystem - 01_enum.py: PASS HostSystem - 02_hostsystem_to_rasd.py: PASS HostSystem - 03_hs_to_settdefcap.py: PASS HostSystem - 04_hs_to_EAPF.py: PASS HostSystem - 05_hs_gi_errs.py: PASS HostSystem - 06_hs_to_vsms.py: PASS HostedDependency - 01_forward.py: PASS HostedDependency - 02_reverse.py: PASS HostedDependency - 03_enabledstate.py: PASS HostedDependency - 04_reverse_errs.py: PASS HostedResourcePool - 01_forward.py: PASS HostedResourcePool - 02_reverse.py: PASS HostedResourcePool - 03_forward_errs.py: PASS HostedResourcePool - 04_reverse_errs.py: PASS HostedService - 01_forward.py: PASS HostedService - 02_reverse.py: PASS HostedService - 03_forward_errs.py: PASS HostedService - 04_reverse_errs.py: PASS LogicalDisk - 01_disk.py: PASS LogicalDisk - 02_nodevs.py: PASS LogicalDisk - 03_ld_gi_errs.py: PASS Memory - 01_memory.py: PASS Memory - 02_defgetmem.py: PASS Memory - 03_mem_gi_errs.py: PASS NetworkPort - 01_netport.py: PASS NetworkPort - 02_np_gi_errors.py: PASS NetworkPort - 03_user_netport.py: PASS Processor - 01_processor.py: PASS Processor - 02_definesys_get_procs.py: PASS Processor - 03_proc_gi_errs.py: PASS Profile - 01_enum.py: PASS Profile - 02_profile_to_elec.py: SKIP Profile - 03_rprofile_gi_errs.py: PASS RASD - 01_verify_rasd_fields.py: PASS RASD - 02_enum.py: PASS RASD - 03_rasd_errs.py: PASS RASD - 04_disk_rasd_size.py: PASS ReferencedProfile - 01_verify_refprof.py: PASS ReferencedProfile - 02_refprofile_errs.py: PASS ResourceAllocationFromPool - 01_forward.py: PASS ResourceAllocationFromPool - 02_reverse.py: PASS ResourceAllocationFromPool - 03_forward_errs.py: PASS ResourceAllocationFromPool - 04_reverse_errs.py: PASS ResourceAllocationFromPool - 05_RAPF_err.py: PASS ResourcePool - 01_enum.py: PASS ResourcePool - 02_rp_gi_errors.py: PASS ResourcePoolConfigurationCapabilities - 01_enum.py: PASS ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS ResourcePoolConfigurationService - 01_enum.py: PASS ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL InvokeMethod(CreateResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL InvokeMethod(CreateChildResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: FAIL InvokeMethod(RemoveResourcesFromResourcePool): The requested operation is not supported ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL InvokeMethod(DeleteResourcePool): The requested operation is not supported SettingsDefine - 01_forward.py: PASS SettingsDefine - 02_reverse.py: PASS SettingsDefine - 03_sds_fwd_errs.py: PASS SettingsDefine - 04_sds_rev_errs.py: PASS SettingsDefineCapabilities - 01_forward.py: PASS SettingsDefineCapabilities - 03_forward_errs.py: XFAIL Bug: Test error: returned XFAIL without a valid bug string. Bug:<> SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS SystemDevice - 01_forward.py: PASS SystemDevice - 02_reverse.py: PASS SystemDevice - 03_fwderrs.py: PASS VSSD - 01_enum.py: PASS VSSD - 02_bootldr.py: SKIP VSSD - 03_vssd_gi_errs.py: PASS VSSD - 04_vssd_to_rasd.py: PASS VirtualSystemManagementCapabilities - 01_enum.py: PASS VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS VirtualSystemManagementService - 01_definesystem_name.py: PASS VirtualSystemManagementService - 02_destroysystem.py: PASS VirtualSystemManagementService - 03_definesystem_ess.py: PASS VirtualSystemManagementService - 04_definesystem_ers.py: PASS VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL InvokeMethod(DestroySystem): Unable to retrieve domain name. InvokeMethod(DestroySystem): Failed to find domain VirtualSystemManagementService - 06_addresource.py: PASS VirtualSystemManagementService - 07_addresource_neg.py: PASS VirtualSystemManagementService - 08_modifyresource.py: PASS VirtualSystemManagementService - 09_procrasd_persist.py: PASS VirtualSystemManagementService - 10_hv_version.py: PASS VirtualSystemManagementService - 11_define_memrasdunits.py: PASS VirtualSystemMigrationCapabilities - 01_enum.py: PASS VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP VirtualSystemMigrationSettingData - 01_enum.py: PASS VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS VirtualSystemSettingDataComponent - 01_forward.py: PASS VirtualSystemSettingDataComponent - 02_reverse.py: PASS VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS VirtualSystemSnapshotService - 01_enum.py: PASS VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 11 09:35:20 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 11 Aug 2008 17:35:20 +0800 Subject: [Libvirt-cim] Cimtest Report for Xen on RHEL5.2 (2008/08/11) Message-ID: Distro : RHEL 5.2 Beta Kernel : kernel-2.6.18-92.el5 Xen version : xen-3.0.3-64.el5 Libvirt : libvirt-0.3.3-7.el5 CIMOM : pegasus PyWBEM : pywbem-3.14 CIM Schema : cimv216Experimental LibCMPIutil : 83 LibVirtCIM : 665 CIMTEST : 289 ========================================================= PASS : 120 FAILED : 11 ACTUAL FAILED : 0 SKIP : 2 Total : 133 =======================FAILED============================== All the following tc passed when run manually: ComputerSystem - 23_suspend_suspend.py: FAIL LogicalDisk - 02_nodevs.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL NetworkPort - 01_netport.py: FAIL RASD - 02_enum.py: FAIL ResourceAllocationFromPool - 01_forward.py: FAIL ResourceAllocationFromPool - 05_RAPF_err.py: FAIL VSSD - 02_bootldr.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL =======================CIMTEST REPORT======================= AllocationCapabilities - 01_enum.py: PASS AllocationCapabilities - 02_alloccap_gi_errs.py: PASS ComputerSystem - 01_enum.py: PASS ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 03_defineVS.py: PASS ComputerSystem - 04_defineStartVS.py: PASS ComputerSystem - 05_activate_defined_start.py: PASS ComputerSystem - 06_paused_active_suspend.py: PASS ComputerSystem - 22_define_suspend.py: PASS ComputerSystem - 23_suspend_suspend.py: FAIL ComputerSystem - 27_define_suspend_errs.py: PASS ComputerSystem - 32_start_reboot.py: PASS ComputerSystem - 33_suspend_reboot.py: PASS ComputerSystem - 35_start_reset.py: PASS ComputerSystem - 40_RSC_start.py: PASS ComputerSystem - 41_cs_to_settingdefinestate.py: PASS ComputerSystem - 42_cs_gi_errs.py: PASS ComputerSystemIndication - 01_created_indication.py: PASS ElementAllocatedFromPool - 01_forward.py: PASS ElementAllocatedFromPool - 02_reverse.py: PASS ElementAllocatedFromPool - 03_reverse_errs.py: PASS ElementAllocatedFromPool - 04_forward_errs.py: PASS ElementCapabilities - 01_forward.py: PASS ElementCapabilities - 02_reverse.py: PASS ElementCapabilities - 03_forward_errs.py: PASS ElementCapabilities - 04_reverse_errs.py: PASS ElementCapabilities - 05_hostsystem_cap.py: PASS ElementConforms - 01_forward.py: PASS ElementConforms - 02_reverse.py: PASS ElementConforms - 03_ectp_fwd_errs.py: PASS ElementConforms - 04_ectp_rev_errs.py: PASS ElementSettingData - 01_forward.py: PASS ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS EnabledLogicalElementCapabilities - 01_enum.py: PASS EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS HostSystem - 01_enum.py: PASS HostSystem - 02_hostsystem_to_rasd.py: PASS HostSystem - 03_hs_to_settdefcap.py: PASS HostSystem - 04_hs_to_EAPF.py: PASS HostSystem - 05_hs_gi_errs.py: PASS HostSystem - 06_hs_to_vsms.py: PASS HostedDependency - 01_forward.py: PASS HostedDependency - 02_reverse.py: PASS HostedDependency - 03_enabledstate.py: PASS HostedDependency - 04_reverse_errs.py: PASS HostedResourcePool - 01_forward.py: PASS HostedResourcePool - 02_reverse.py: PASS HostedResourcePool - 03_forward_errs.py: PASS HostedResourcePool - 04_reverse_errs.py: PASS HostedService - 01_forward.py: PASS HostedService - 02_reverse.py: PASS HostedService - 03_forward_errs.py: PASS HostedService - 04_reverse_errs.py: PASS LogicalDisk - 01_disk.py: PASS LogicalDisk - 02_nodevs.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL Memory - 02_defgetmem.py: PASS Memory - 03_mem_gi_errs.py: PASS NetworkPort - 01_netport.py: FAIL NetworkPort - 02_np_gi_errors.py: PASS NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: PASS Processor - 02_definesys_get_procs.py: PASS Processor - 03_proc_gi_errs.py: PASS Profile - 01_enum.py: PASS Profile - 02_profile_to_elec.py: PASS Profile - 03_rprofile_gi_errs.py: PASS RASD - 01_verify_rasd_fields.py: PASS RASD - 02_enum.py: FAIL RASD - 03_rasd_errs.py: PASS RASD - 04_disk_rasd_size.py: PASS ReferencedProfile - 01_verify_refprof.py: PASS ReferencedProfile - 02_refprofile_errs.py: PASS ResourceAllocationFromPool - 01_forward.py: FAIL ResourceAllocationFromPool - 02_reverse.py: PASS ResourceAllocationFromPool - 03_forward_errs.py: PASS ResourceAllocationFromPool - 04_reverse_errs.py: PASS ResourceAllocationFromPool - 05_RAPF_err.py: FAIL ResourcePool - 01_enum.py: PASS ResourcePool - 02_rp_gi_errors.py: PASS ResourcePoolConfigurationCapabilities - 01_enum.py: PASS ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS ResourcePoolConfigurationService - 01_enum.py: PASS ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS SettingsDefine - 01_forward.py: PASS SettingsDefine - 02_reverse.py: PASS SettingsDefine - 03_sds_fwd_errs.py: PASS SettingsDefine - 04_sds_rev_errs.py: PASS SettingsDefineCapabilities - 01_forward.py: PASS SettingsDefineCapabilities - 03_forward_errs.py: PASS SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS SystemDevice - 01_forward.py: PASS SystemDevice - 02_reverse.py: PASS SystemDevice - 03_fwderrs.py: PASS VSSD - 01_enum.py: PASS VSSD - 02_bootldr.py: FAIL Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 144, in do_try rc = f() File "02_bootldr.py", line 72, in main except BaseException, detail : NameError: global name 'BaseException' is not defined CIM_ERR_NOT_FOUND: No such instance (dom) VSSD - 03_vssd_gi_errs.py: PASS VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementCapabilities - 01_enum.py: PASS VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS VirtualSystemManagementService - 01_definesystem_name.py: PASS VirtualSystemManagementService - 02_destroysystem.py: PASS VirtualSystemManagementService - 03_definesystem_ess.py: PASS VirtualSystemManagementService - 04_definesystem_ers.py: PASS VirtualSystemManagementService - 05_destroysystem_neg.py: PASS VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 07_addresource_neg.py: PASS VirtualSystemManagementService - 08_modifyresource.py: PASS VirtualSystemManagementService - 09_procrasd_persist.py: PASS VirtualSystemManagementService - 10_hv_version.py: PASS VirtualSystemManagementService - 11_define_memrasdunits.py: PASS VirtualSystemMigrationCapabilities - 01_enum.py: PASS VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS VirtualSystemMigrationService - 01_migratable_host.py: PASS VirtualSystemMigrationService - 02_host_migrate_type.py: PASS VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS VirtualSystemMigrationSettingData - 01_enum.py: PASS VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS VirtualSystemSettingDataComponent - 01_forward.py: PASS VirtualSystemSettingDataComponent - 02_reverse.py: PASS VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS VirtualSystemSnapshotService - 01_enum.py: PASS VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Aug 11 12:52:39 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 11 Aug 2008 18:22:39 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Adding KVM and XenFV support to 41_cs_to_settingdefinestate.py In-Reply-To: <0b5dea4e96cd0e128c0d.1218440644@elm3b217.beaverton.ibm.com> References: <0b5dea4e96cd0e128c0d.1218440644@elm3b217.beaverton.ibm.com> Message-ID: <48A03617.1020700@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1218440570 25200 > # Node ID 0b5dea4e96cd0e128c0da6019cc545964deeba49 > # Parent 8ac224c6840c79e73c54b7c59647f5be5117d29e > [TEST] Adding KVM and XenFV support to 41_cs_to_settingdefinestate.py. > > 1) Added support for XenFV, KVM. > 2) Removed get_inst_from_list(). > 3) Used poll_for_state_change to get the CS instance and also verify the enabled state is set to 2 > 4) Also verifying that the RequestedState is set to 0 when the VS is created. > > Tested with Xen, XenFV and KVM on latest sources. > > Signed-off-by: Deepti B. Kalakeri > > diff -r 8ac224c6840c -r 0b5dea4e96cd suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Thu Aug 07 23:45:42 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Mon Aug 11 00:42:50 2008 -0700 > @@ -37,9 +37,9 @@ > # Steps: > # ------ > # 1) Create a guest domain. > -# 2) Enumerate ComputerSystem. > -# 3) Select the guest domain from the output and create info list for the guest domain > -# to be used later for comparison. > +# 2) Enumerate ComputerSystem and Select the guest domain from the output > +# and and verify the EnabledState is 2. > +# 3) Create info list for the guest domain to be used later for comparison. > # 4) Get the various devices allocated to the domain by using the SystemDevice > # association and giving the ComputerSystem output from the previous enumeration > # as inputs to the association. > @@ -70,26 +70,31 @@ from XenKvmLib import rasd > from XenKvmLib import rasd > from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ > verify_diskrasd_values, verify_memrasd_values, rasd_init_list > +from XenKvmLib.common_util import poll_for_state_change > +from XenKvmLib.classes import get_typed_class > > -sup_types = ['Xen'] > +sup_types = ['Xen', 'XenFV', 'KVM'] > > test_dom = "CrossClass_GuestDom" > test_vcpus = 1 > test_mem = 128 > test_mac = "00:11:22:33:44:aa" > -test_disk = "xvda" > > def vssd_init_list(virt): > """ > Creating the lists that will be used for comparisons. > """ > + if virt == 'XenFV': > + virt = 'Xen' > + > vssd_values = { > - 'Caption' : "Virtual System", \ > - 'InstanceID' : '%s:%s' % (virt, test_dom), \ > - 'ElementName' : test_dom, \ > - 'VirtualSystemIdentifier' : test_dom, \ > - 'VirtualSystemType' : virt, \ > - 'Classname' : "Xen_VirtualSystemSettingData" > + 'Caption' : "Virtual System", > + 'InstanceID' : '%s:%s' % (virt, test_dom), > + 'ElementName' : test_dom, > + 'VirtualSystemIdentifier' : test_dom, > + 'VirtualSystemType' : virt, > + 'Classname' : get_typed_class(virt, > + "VirtualSystemSettingData") > } > > return vssd_values > @@ -99,19 +104,20 @@ def cs_init_list(cs_dom): > Creating the lists that will be used for comparisons. > """ > cs_values = { > - 'Caption' : cs_dom.Caption, \ > - 'EnabledState' : cs_dom.EnabledState, \ > - 'RequestedState' : cs_dom.RequestedState, \ > - 'CreationClassName' : cs_dom.CreationClassName, \ > + 'Caption' : cs_dom.Caption, > + 'EnabledState' : cs_dom.EnabledState, > + 'RequestedState' : cs_dom.RequestedState, > + 'CreationClassName' : cs_dom.CreationClassName, > 'Name' : cs_dom.Name > } > return cs_values > > -def setup_env(server, virt): > +def setup_env(server, virt, test_disk): > vsxml_info = None > status = PASS > destroy_and_undefine_all(server) > virt_xml = get_class(virt) > + > vsxml_info = virt_xml(test_dom, mem = test_mem, > vcpus=test_vcpus, > mac = test_mac, > @@ -137,23 +143,7 @@ def vssd_sds_err( an, fieldname, ret_val > logger.error(err) > logger.error(detail) > > -def get_inst_from_list(server, vsxml, cn, cs_list, exp_val): > - status = PASS > - ret = -1 > - inst = None > - for inst in cs_list: > - if inst.Name == exp_val: > - ret = PASS > - break > - > - if ret != PASS: > - logger.error("%s with %s was not returned" % (cn, exp_val)) > - vsxml.destroy(server) > - status = FAIL > - > - return status, inst > - > -def get_associatornames_info(server, vsxml, cn, an, qcn, name): > +def get_associatornames_info(server, virt, vsxml, cn, an, qcn, name): > status = PASS > assoc_info = [] > try: > @@ -161,7 +151,8 @@ def get_associatornames_info(server, vsx > an, > cn, > CreationClassName=cn, > - Name = name) > + Name = name, > + virt=virt) > if len(assoc_info) < 1: > logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) > status = FAIL > @@ -174,14 +165,15 @@ def get_associatornames_info(server, vsx > > return status, assoc_info > > -def get_associators_info(server, vsxml, cn, an, qcn, instid): > +def get_associators_info(server, virt, vsxml, cn, an, qcn, instid): > status = PASS > assoc_info = [] > try: > assoc_info = Associators(server, > an, > cn, > - InstanceID = instid) > + InstanceID = instid, > + virt=virt) > if len(assoc_info) < 1: > logger.error("%s returned %i %s objects" % > (an, len(assoc_info), qcn)) > @@ -208,31 +200,39 @@ def get_SDS_verify_RASD_build_vssdc_inpu > status = PASS > in_setting_define_state = {} > in_vssdc = {} > + prasd = get_typed_class(virt, 'ProcResourceAllocationSettingData') > + mrasd = get_typed_class(virt, 'MemResourceAllocationSettingData') > + nrasd = get_typed_class(virt, 'NetResourceAllocationSettingData') > + drasd = get_typed_class(virt, 'DiskResourceAllocationSettingData') > + > try: > -# Building the input for Xen_SettingsDefineState association. > + > + # Building the input for Xen_SettingsDefineState association. > for i in range(len(sd_assoc_info)): > if sd_assoc_info[i]['SystemName'] == test_dom: > classname_keyvalue = sd_assoc_info[i]['CreationClassName'] > deviceid = sd_assoc_info[i]['DeviceID'] > in_setting_define_state[classname_keyvalue] = deviceid > -# Expect the Xen_SystemDevice to return 4 logical device records. > -# one each for memory, network, disk and processor and hence 4. > -# and hence expect the in_setting_define_state to contain just 4 entries. > - an = "Xen_SystemDevice" > + > + # Expect the Xen_SystemDevice to return 4 logical device records. > + # one each for memory, network, disk and processor and hence 4. > + # and hence expect the in_setting_define_state to contain just 4 entries. > + an = get_typed_class(virt, "SystemDevice") > qcn = "Logical Devices" > exp_len = 4 > if check_len(an, in_setting_define_state, qcn, exp_len) != PASS: > return FAIL, in_setting_define_state > -# Get the rasd values that will be used to compare with the Xen_SettingsDefineState > -# output. > + > + # Get the rasd values that will be used to compare with the Xen_SettingsDefineState > + # output. > status, rasd_values, in_list = rasd_init_list(vsxml, virt, test_disk, > test_dom, test_mac, > test_mem) > if status != PASS: > - return status > - > - sccn = "Xen_ComputerSystem" > - an = "Xen_SettingsDefineState" > + return status, rasd_values > + > + sccn = get_typed_class(virt,"ComputerSystem") > + an = get_typed_class(virt,"SettingsDefineState") > for cn, devid in sorted(in_setting_define_state.items()): > assoc_info = Associators(server, > an, > @@ -240,10 +240,11 @@ def get_SDS_verify_RASD_build_vssdc_inpu > DeviceID = devid, > CreationClassName = cn, > SystemName = test_dom, > - SystemCreationClassName = sccn) > + SystemCreationClassName = sccn, > + virt=virt) > > -# we expect only one RASD record to be returned for each device that is used to > -# query with the Xen_SettingsDefineState association. > + # we expect only one RASD record to be returned for each device that is used to > + # query with the Xen_SettingsDefineState association. > if len(assoc_info) != 1: > logger.error("%s returned %i %s objects" % (an, len(assoc_info), cn)) > status = FAIL > @@ -251,13 +252,13 @@ def get_SDS_verify_RASD_build_vssdc_inpu > index = (len(assoc_info) - 1) > rasd = rasd_values[cn] > CCName = assoc_info[index].classname > - if CCName == 'Xen_ProcResourceAllocationSettingData': > + if CCName == prasd: > status = verify_procrasd_values(assoc_info[index], rasd) > - elif CCName == 'Xen_NetResourceAllocationSettingData': > + elif CCName == nrasd: > status = verify_netrasd_values(assoc_info[index], rasd) > - elif CCName == 'Xen_DiskResourceAllocationSettingData': > + elif CCName == drasd: > status = verify_diskrasd_values(assoc_info[index], rasd) > - elif CCName == 'Xen_MemResourceAllocationSettingData': > + elif CCName == mrasd: > status = verify_memrasd_values(assoc_info[index], rasd) > else: > status = FAIL > I wanted to reduce the above functions like the way done in logicaldevices.py library function. Since the change to the rasd.py library function required rework on quite a few other test case I plan to do it later. Thanks and Regards, Deepti. > @@ -283,9 +284,9 @@ def verify_fields(an, field_name, vssd_c > > > def verify_VSSD_values(assoc_info, vssd_values, an, qcn): > -# We expect that Xen_VirtualSystemSettingDataComponent returns only one > -# Xen_VirtualSystemSettingData object when queried with disk, processor, > -# network and memory rasd's and all of them return the same output. > + # We expect that Xen_VirtualSystemSettingDataComponent returns only one > + # Xen_VirtualSystemSettingData object when queried with disk, processor, > + # network and memory rasd's and all of them return the same output. > exp_len = 1 > if check_len(an, assoc_info, qcn, exp_len) != PASS: > return FAIL > @@ -301,8 +302,8 @@ def verify_VSSD_values(assoc_info, vssd_ > if verify_fields(an, 'VirtualSystemType', vssd_assoc, vssd_values) != PASS: > return FAIL > if vssd_assoc.classname != vssd_values['Classname']: > - vssd_sds_err(an, 'Classname', vssd_assoc.classname, \ > - vssd_values['Classname']) > + vssd_sds_err(an, 'Classname', vssd_assoc.classname, > + vssd_values['Classname']) > return FAIL > return PASS > > @@ -327,60 +328,56 @@ def main(): > def main(): > server = main.options.ip > virt = main.options.virt > - status, vsxml = setup_env(server, virt) > + if virt == 'Xen': > + test_disk = "xvda" > + else: > + test_disk = "hda" > + > + status, vsxml = setup_env(server, virt, test_disk) > if status != PASS: > return status > > - cs_enum = computersystem.enumerate(server) > - if len(cs_enum) == 0: > + status, cs_dom = poll_for_state_change(server, virt, test_dom, 2, > + timeout=10) > + if status != PASS and cs_dom.RequestedState != 0: > vsxml.destroy(server) > - return status > - cn = cs_enum[0].CreationClassName > - status, cs_dom = get_inst_from_list(server, > - vsxml, > - cn, > - cs_enum, > - test_dom) > - if status != PASS: > - vsxml.destroy(server) > - return status > + return FAIL > > -# Creating the cs info list which will be used later for comparison. > + # Creating the cs info list which will be used later for comparison. > cs_values = cs_init_list(cs_dom) > - if cs_values['EnabledState'] != 2 : > - logger.error("Improper EnabledState value set for domain %s", test_dom) > - logger.error("Should have been 2 instead of %s", cs_values['EnabledState']) > - vsxml.destroy(server) > - return FAIL > > cn = cs_dom.CreationClassName > - an = 'Xen_SystemDevice' > + an = get_typed_class(virt, 'SystemDevice') > qcn = 'Logical Devices' > name = test_dom > - status, sd_assoc_info = get_associatornames_info(server, vsxml, > + status, sd_assoc_info = get_associatornames_info(server, virt, vsxml, > cn, an, qcn, name) > if status != PASS or len(sd_assoc_info) == 0: > return status > + > status, in_vssdc_list = get_SDS_verify_RASD_build_vssdc_input(server, virt, > vsxml, test_disk, > sd_assoc_info) > if status != PASS or len(in_vssdc_list) == 0 : > vsxml.destroy(server) > return status > -# Verifying that the in_vssdc_list contains 4 entries one each for mem rasd, > -# network rasd, processor rasd and disk rasd. > + > + # Verifying that the in_vssdc_list contains 4 entries one each for mem rasd, > + # network rasd, processor rasd and disk rasd. > exp_len = 4 > if check_len(an, in_vssdc_list, qcn, exp_len) != PASS: > vsxml.destroy(server) > return FAIL > -# Get the vssd values which will be used for verifying the Xen_VirtualSystemSettingData > -# output from the Xen_VirtualSystemSettingDataComponent results. > + > + # Get the vssd values which will be used for verifying the > + # Xen_VirtualSystemSettingData output from the > + # Xen_VirtualSystemSettingDataComponent results. > vssd_values = vssd_init_list(virt) > - an = 'Xen_VirtualSystemSettingDataComponent' > - qcn = 'Xen_VirtualSystemSettingData' > + an = get_typed_class(virt, 'VirtualSystemSettingDataComponent') > + qcn = get_typed_class(virt, 'VirtualSystemSettingData') > for cn, instid in sorted((in_vssdc_list.items())): > - status, vssd_assoc_info = get_associators_info(server, vsxml, cn, an, qcn, > - instid) > + status, vssd_assoc_info = get_associators_info(server, virt, vsxml, cn, > + an, qcn, instid) > if status != PASS or len(vssd_assoc_info) == 0: > break > status = verify_VSSD_values(vssd_assoc_info, vssd_values, an, qcn) > @@ -389,18 +386,22 @@ def main(): > if status != PASS: > vsxml.destroy(server) > return status > -# Since the Xen_VirtualSystemSettingDataComponent returns similar output when queried with > -# every RASD, we are taking the output of the last associtaion query as inputs for > -# querying Xen_SettingsDefineState. > + > + # Since the Xen_VirtualSystemSettingDataComponent returns similar > + # output when queried with every RASD, we are taking the output of > + # the last associtaion query as inputs for > + # querying Xen_SettingsDefineState. > cn = vssd_assoc_info[0].classname > - an = 'Xen_SettingsDefineState' > - qcn = 'Xen_ComputerSystem' > + an = get_typed_class(virt, 'SettingsDefineState') > + qcn = get_typed_class(virt, 'ComputerSystem') > instid = vssd_assoc_info[0]['InstanceID'] > - status, cs_assoc_info = get_associators_info(server, vsxml, cn, an, qcn, instid) > + status, cs_assoc_info = get_associators_info(server, virt, vsxml, cn, > + an, qcn, instid) > if status != PASS or len(cs_assoc_info) == 0: > return status > -# verify the results of Xen_SettingsDefineState with the cs_values list that was > -# built using the output of the enumeration on Xen_ComputerSystem. > + > + # verify the results of Xen_SettingsDefineState with the cs_values list that was > + # built using the output of the enumeration on Xen_ComputerSystem. > status = verify_CS_values(cs_assoc_info, cs_values, an, qcn) > vsxml.destroy(server) > return status > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Mon Aug 11 12:53:26 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 11 Aug 2008 18:23:26 +0530 Subject: [Libvirt-cim] CimTest Report for KVM on F9 06-08-2008 In-Reply-To: <4899C506.9060808@linux.vnet.ibm.com> References: <489969D3.5040704@linux.vnet.ibm.com> <4899C506.9060808@linux.vnet.ibm.com> Message-ID: <48A03646.9000703@linux.vnet.ibm.com> List for discussion and development of libvirt CIM Kaitlin Rupert wrote: > Deepti B Kalakeri wrote: >> ======================================================================== >> CIM Test Report for KVM on F9 with latest libvirt-cim and libcmpiutil >> ======================================================================== > >> >> This tc passed when run manually. >> HostSystem - 04_hs_to_EAPF.py: FAIL >> > > Any thoughts as to why this fails in the bulk run? Sounds like one of > the tests alters the environment in a way that this test isn't expecting. I did not find anything common in the other test case which could be making the HostSystem - 04_hs_to_EAPF.py tc to fail. I tried reproducing the problem for KVM by running all the HostSystem tc, but this time the tc did not fail for me in the batch run. The above test case has passed for XenFV test runs till now. I tried batch run of the HostSystem directory for XenFV and the tc failed bcs of the following reason: HostSystem - 04_hs_to_EAPF.py: FAIL ERROR - DeviceID Mismatch ERROR - Returned CrossClass_GuestDom/hda instead of CrossClass_GuestDom/xvdb I went through the test case and found to have the following problems with the test case: 1) The XML configuration information with the existing test case is not completely correct for *creating* a KVM/XenFV guest. It does not set the test_disk information correctly, but this does not matter when we just *define *the guest, but surely the XML config was not useful in *creating* the KVM/XenFV guest. The test_disk was set to 'xvdb' for all Xen/XenFV/KVM. 2) The network pool information that is used for creating the guest and the networkpool used in the rest of the test case are different. 3) The tc was using create_diskpool_file() function to create a DiskPool, this should have been create_diskpool_conf() which calls either creating of diskconf file or using the diskpool depending on the version of the libvirt on the machine. 4) Also, the networkpool information that was initialized using the pool_init_list() test case was getting overwritten in the case where there were more than one networkpool existed. And this could be one of the potential reason for the test case to be intermittently fail, since the information in the list would not have been set appropriately. The patch with the fixes is on way. If anyone else has any other idea of debugging this problem ? Thanks and Regards, Deepti. > > - > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From kaitlin at linux.vnet.ibm.com Mon Aug 11 16:11:04 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 09:11:04 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Add test report generation In-Reply-To: References: Message-ID: <48A06498.4050607@linux.vnet.ibm.com> > > + > > +def build_report(run_output, rev, changeset, virt, ip): > > + rvals = { 'PASS' : 0, > > + 'FAIL' : 0, > > + 'XFAIL' : 0, > > + 'SKIP' : 0, > > + } > > + > > + tstr = { 'PASS' : "", > > + 'FAIL' : "", > > + 'XFAIL' : "", > > + 'SKIP' : "", > > + } > > + > > + date = strftime("%b %d %Y", gmtime()) > > + > > + heading = "%s Test Run Summary %s" % (virt, date) > > Do you think it's better to add distribution info in heading? > Otherwise, > +1 for me =) > > This is a good idea - I'll add this change and send another version. I'm also going to refactor the reporting pieces so that they are in their own library file. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Aug 11 16:21:15 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 09:21:15 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] Add reporting library In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1218470737 25200 # Node ID a5111986921da879e2dcc57a1529c7f4d902aebf # Parent 5cb81d3b311601846b23bc2288a0dfc9b255c683 [TEST] Add reporting library. Include CIMOM type in email heading. Signed-off-by: Kaitlin Rupert diff -r 5cb81d3b3116 -r a5111986921d suites/libvirt-cim/lib/XenKvmLib/reporting.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Mon Aug 11 09:05:37 2008 -0700 @@ -0,0 +1,170 @@ +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Kaitlin Rupert +# +# 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 + +import os +import sys +import commands +import smtplib +from time import gmtime, strftime +from VirtLib import utils + +def get_cmd_val(cmd, ip): + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return "Unknown" + return out + +def get_libvirt_ver(ip): + libvirt_ver = "Unknown" + hyp_ver = "Unknown" + cmd = "virsh version" + virsh_ver = get_cmd_val(cmd, ip) + if virsh_ver != "Unknown": + if len(virsh_ver.splitlines()) == 4: + if virsh_ver.splitlines()[0].find("libvir"): + libvirt_ver = virsh_ver.splitlines()[0].split()[4] + + if virsh_ver.splitlines()[3].find("hypervisor"): + hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] + hyp_ver = hyp_ver.split(": ")[1] + + return libvirt_ver, hyp_ver + + +def get_cimom_ver(ip): + cimom = get_cmd_val("ps -ef | grep cimserver | grep -v grep", ip) + if cimom != "Unknown": + cimom = "Pegasus" + else: + cimom = get_cmd_val("ps -ef | grep sfcb | grep -v grep", ip) + if cimom != "Unknown": + cimom = "sfcb" + + if cimom == "Pegasus": + cimom_ver = get_cmd_val("cimserver -v", ip) + elif cimom == "sfcb": + cimom_ver = get_cmd_val("sfcbd -v", ip) + else: + cimom_ver = "unknown version" + + return cimom, cimom_ver + + +def get_env_data(rev, changeset, ip): + distro = get_cmd_val("cat /etc/issue | awk 'NR<=1'", ip) + kernel_ver = get_cmd_val("uname -r", ip) + + libvirt_ver, hyp_ver = get_libvirt_ver(ip) + + cimom, cimom_ver = get_cimom_ver(ip) + + env = "Distro: %s\nKernel: %s\nlibvirt: %s\nHypervisor: %s\nCIMOM: %s %s\n"\ + % (distro, kernel_ver, libvirt_ver, hyp_ver, cimom, cimom_ver) + + lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \ + (rev, changeset) + + return env + lc_ver + +def build_report(run_output, rev, changeset, virt, ip): + rvals = { 'PASS' : 0, + 'FAIL' : 0, + 'XFAIL' : 0, + 'SKIP' : 0, + } + + tstr = { 'PASS' : "", + 'FAIL' : "", + 'XFAIL' : "", + 'SKIP' : "", + } + + date = strftime("%b %d %Y", gmtime()) + + cimom, cimom_ver = get_cimom_ver(ip) + + heading = "%s on %s Test Run Summary for %s" % (virt, cimom, date) + sys_env = get_env_data(rev, changeset, ip) + + divider = "=================================================\n" + + for line in run_output.splitlines(): + for type, val in rvals.iteritems(): + if type in line: + if type == "FAIL" and "py: FAIL" not in line: + continue + rvals[type] += 1 + tstr[type] += "%s\n" % line + + results = "" + test_total = 0 + for type, val in rvals.iteritems(): + results += " %s:\t%d\n" % (type, val) + test_total += val + + results_total = " -----------------\n Total:\t%d\n" % test_total + + test_block = "" + for type, str in tstr.iteritems(): + if type == "PASS" or str == "": + continue + test_block += "%s Test Summary:\n%s\n%s" % (type, str, divider) + + report = divider + heading + "\n" + divider + sys_env + divider + results \ + + results_total + divider + test_block + "Full report:\n" \ + + run_output + + return report, heading + + +def gen_report(rev, changeset, virt, ip, log_file): + fd = open(log_file, "r") + run_results = fd.read() + fd.close() + + msg_body, heading = build_report(run_results, rev, changeset, virt, ip) + + fd = open(log_file, "w") + rc = fd.write(msg_body) + if rc is not None: + print "Error %s writing report to: %s." % (rc, log_file) + fd.close() + + return msg_body, heading + + +def send_report(to_addr, from_addr, relay, report, heading): + headers = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (from_addr, to_addr, + heading) + + message = headers + report + + try: + server = smtplib.SMTP(relay) + result = server.sendmail(to_addr, from_addr, message) + server.quit() + + if result: + for recip in result.keys(): + print "Could not deliver mail to: %s" % recip + + except Exception, details: + print "Encountered a problem mailing report: %s" % details + From kaitlin at linux.vnet.ibm.com Mon Aug 11 16:21:16 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 09:21:16 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1218470745 25200 # Node ID d1e8325893b3e68e12b1725e350314aeaf6d2be1 # Parent a5111986921da879e2dcc57a1529c7f4d902aebf [TEST] #2 Add test report generation. Using the --report option, you can generate a report and have it mailed to the address supplied. How to call using the report option: ./runtests libvirt-cim -i localhost -c -d -v LXC -g VirtualSystemManagementService -t 01_definesystem_name.py --report The user will need to create a .cimtestrc file in their home directory in the following format: [email] relay = my.mail.relay.com from = Joe User Will need to add revision number support to cimtest and then add the cimtest revision number to the report. Updates: -Refactored reporting related pieces into their own library file Signed-off-by: Kaitlin Rupert diff -r a5111986921d -r d1e8325893b3 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Mon Aug 11 09:05:37 2008 -0700 +++ b/suites/libvirt-cim/main.py Mon Aug 11 09:05:45 2008 -0700 @@ -29,12 +29,13 @@ sys.path.append('../../lib') import TestSuite import commands -from VirtLib import utils from VirtLib import groups from CimTest.ReturnCodes import PASS, SKIP, XFAIL from CimTest.Globals import platform_sup sys.path.append('./lib') from XenKvmLib.classes import get_typed_class +import ConfigParser +from XenKvmLib.reporting import gen_report, send_report parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", @@ -54,8 +55,11 @@ help="Virt type, select from 'Xen' & 'KVM' & 'XenFV' & 'LXC'(default: Xen). ") parser.add_option("-d", "--debug-output", action="store_true", dest="debug", help="Duplicate the output to stderr") +parser.add_option("--report", dest="report", + help="Send report using mail info: --report=") TEST_SUITE = 'cimtest' +CIMTEST_RCFILE = '%s/.cimtestrc' % os.environ['HOME'] def set_python_path(): previous_pypath = os.environ.get('PYTHONPATH') @@ -82,6 +86,28 @@ print "Cleaned log files." +def get_rcfile_vals(): + if not os.access(CIMTEST_RCFILE, os.R_OK): + print "\nCould not access the %s file for this user." % CIMTEST_RCFILE + print "Create this file and add the appropriate relay:" + print "\tfrom = me at isp.com\n\trelay = my.relay\n" + return None, None + + try: + conf = ConfigParser.ConfigParser() + if not conf.read(CIMTEST_RCFILE): + return None, None + + addr = conf.get("email", "from") + relay = conf.get("email", "relay") + + except Exception, details: + print "\n%s" % details + print "\nPlease verify the format of the %s file\n" % CIMTEST_RCFILE + return None, None + + return addr, relay + def get_version(virt, ip): conn = WBEMConnection('http://%s' % ip, (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), @@ -101,7 +127,10 @@ def main(): (options, args) = parser.parse_args() - + to_addr = None + from_addr = None + relay = None + div = "--------------------------------------------------------------------" if options.test and not options.group: parser.print_help() @@ -114,7 +143,15 @@ os.environ['CIMOM_PORT'] = str(options.port) # - testsuite = TestSuite.TestSuite() + if options.report: + from_addr, relay = get_rcfile_vals() + + if from_addr == None or relay == None: + return 1 + + to_addr = options.report + + testsuite = TestSuite.TestSuite(log=True) set_python_path() @@ -139,9 +176,10 @@ revision, changeset = get_version(options.virt, options.ip) - print "Testing " + options.virt + " hypervisor" + print "\nTesting " + options.virt + " hypervisor" - for test in test_list: + for test in test_list: + testsuite.debug(div) t_path = os.path.join(TEST_SUITE, test['group']) os.environ['CIM_TC'] = test['test'] cdto = 'cd %s' % t_path @@ -155,7 +193,16 @@ testsuite.print_results(test['group'], test['test'], os_status) + testsuite.debug("%s\n" % div) testsuite.finish() + + msg_body, heading = gen_report(revision, changeset, options.virt, + options.ip, testsuite.log_file) + + if options.report: + print "Sending mail from %s to %s using %s relay.\n" % \ + (from_addr, to_addr, relay) + send_report(to_addr, from_addr, relay, msg_body, heading) if __name__ == '__main__': sys.exit(main()) From kaitlin at linux.vnet.ibm.com Mon Aug 11 16:21:13 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 09:21:13 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] [TEST] #2 Add reporting capabilities Message-ID: This patch set will allow cimtest to generate reports. With a little extra help from a cron script, this can be used to do automated test runs. From kaitlin at linux.vnet.ibm.com Mon Aug 11 16:21:14 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 09:21:14 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] Enable test infrastructure to support writing to a temporary file In-Reply-To: Message-ID: <5cb81d3b311601846b23.1218471674@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218470726 25200 # Node ID 5cb81d3b311601846b23bc2288a0dfc9b255c683 # Parent 680b9475757c1576af1addae83645ab1d1bb6971 [TEST] Enable test infrastructure to support writing to a temporary file. Allow the option to print to a file in addition to stdout. This will allow a test suite to read back the file after the test execution is complete. If a previous log exists at the start of the run, it is removed and a new one is created. Signed-off-by: Kaitlin Rupert diff -r 680b9475757c -r 5cb81d3b3116 lib/Reporter.py --- a/lib/Reporter.py Thu Jul 31 15:17:28 2008 -0700 +++ b/lib/Reporter.py Mon Aug 11 09:05:26 2008 -0700 @@ -19,10 +19,13 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL + class Reporter: - def __init__(self, verbosity=1): + def __init__(self, verbosity=1, log_fd=None): self.verbosity = verbosity + self.log_fd = log_fd def __red(self, str): return "\033[01;31m%s\033[00m" % str @@ -36,11 +39,38 @@ def __blue(self, str): return "\033[01;34m%s\033[00m" % str - def __out(self, str): - """We might not always be just printing output to stdout, so this should - be used for all output.""" - # Right now we just mimic print. - print(str) + def __out(self, str, status, bug): + def no_color(string): + return string + + colors = { "FAIL" : self.__red, + "PASS" : self.__green, + "SKIP" : self.__yellow, + "XFAIL" : self.__blue, + } + + fn = colors.get(status, no_color) + + if status == XFAIL: + print "%s: %s\tBug: %s" % (str, fn(status), bug) + else: + print "%s: %s" % (str, fn(status)) + + if self.log_fd is not None: + if status == XFAIL: + self.log_fd.write("%s: %s\tBug: %s" % (str, status, bug)) + else: + self.log_fd.write("%s: %s" % (str, status)) + + def results(self, str, status, bug): + + rc = { FAIL : "FAIL", + PASS : "PASS", + SKIP : "SKIP", + XFAIL : "XFAIL" + } + + self.__out(str, rc[status], bug) def debug(self, level, str): """Produces debug output if appropriate for current verbosity level. @@ -49,20 +79,5 @@ priority output will be printed in the most levels, while low priority output will only be printed when verbosity is high.""" if level <= self.verbosity: - self.__out(str) + print(str) - def pass_test(self, test_name): - str = self.__green("PASS") - self.__out("%s: %s" % (test_name, str)) - - def fail_test(self, test_name): - str = self.__red("FAIL") - self.__out("%s: %s" % (test_name, str)) - - def xfail_test(self, test_name, bug): - str = self.__blue("XFAIL") - self.__out("%s: %s\tBug: %s" % (test_name, str, bug)) - - def skip_test(self, test_name): - str = self.__yellow("SKIP") - self.__out("%s: %s" % (test_name, str)) diff -r 680b9475757c -r 5cb81d3b3116 lib/TestSuite.py --- a/lib/TestSuite.py Thu Jul 31 15:17:28 2008 -0700 +++ b/lib/TestSuite.py Mon Aug 11 09:05:26 2008 -0700 @@ -24,48 +24,59 @@ DEFAULT_RPC_URL = "http://morbo.linux.ibm.com/xenotest/testrun/api" +DEFAULT_LOG_FILE = "run_report.txt" + import Reporter import re +import os +from CimTest.ReturnCodes import PASS, FAIL, XFAIL, SKIP class TestSuite: """Test Suite class to make the output of driving test suites a bit more consistant""" - def __init__(self): - self.rep = Reporter.Reporter(verbosity=5) + def __init__(self, log=False, file_name=None): + if log == True: + if file_name is None: + self.log_file = DEFAULT_LOG_FILE + else: + self.log_file = file_name - def ok(self, group, test, output=""): - self.rep.pass_test("%s - %s" % (group, test)) + if os.path.exists(self.log_file): + os.remove(self.log_file) + self.log_fd = open(self.log_file, "w") + else: + self.log_file = None + self.log_fd = None - def skip(self, group, test, output=""): - self.rep.skip_test("%s - %s" % (group, test)) + self.rep = Reporter.Reporter(verbosity=5, log_fd=self.log_fd) + + def print_results(self, group, test, status, output=""): + bug = None + if status == XFAIL: + err = "Test error: returned XFAIL without a valid bug string." + bug = err + if len(output) > 0: + try: + str = re.search('Bug:<[0-9]*>', output).group() + bug = re.search("Bug:<([0-9]+)>", str).group(1) + if len(str) > 0: + if output == str: + #No need to pring bug twice + output = "" + except: + #If we hit a problem, make sure bug = error msg + bug = err + + self.rep.results("%s - %s" % (group, test), status, bug) if output: self.rep.debug(1, output) - def fail(self, group, test, output=""): - self.rep.fail_test("%s - %s" % (group, test)) - if output: - self.rep.debug(1, output) - - def xfail(self, group, test, output=""): - err = "Test error: returned XFAIL without a valid bug string." - bug = err - if len(output) > 0: - try: - str = re.search('Bug:<[0-9]*>', output).group() - bug = re.search("Bug:<([0-9]+)>", str).group(1) - if len(str) > 0: - if output == str: - #No need to pring bug twice - output = "" - except: - #If we hit a problem, make sure bug is equal to the error msg - bug = err - self.rep.xfail_test("%s - %s" % (group, test), bug) - if output: - self.rep.debug(1, output) + def debug(self, str): + self.rep.debug(1, str) def finish(self): - pass + if self.log_fd is not None: + self.log_fd.close() class RPCTestSuite: """Test Suite class to make the output of driving test suites a bit more consistant diff -r 680b9475757c -r 5cb81d3b3116 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Thu Jul 31 15:17:28 2008 -0700 +++ b/suites/libvirt-cim/main.py Mon Aug 11 09:05:26 2008 -0700 @@ -153,14 +153,7 @@ os_status = os.WEXITSTATUS(status) - if os_status == PASS: - testsuite.ok(test['group'], test['test']) - elif os_status == SKIP: - testsuite.skip(test['group'], test['test'], output) - elif os_status == XFAIL: - testsuite.xfail(test['group'], test['test'], output) - else: - testsuite.fail(test['group'], test['test'], output) + testsuite.print_results(test['group'], test['test'], os_status) testsuite.finish() From deeptik at linux.vnet.ibm.com Mon Aug 11 18:17:45 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 11 Aug 2008 11:17:45 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 04_hs_to_EAPF.py tc Message-ID: <3eca51b419cc44654c94.1218478665@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1218478580 25200 # Node ID 3eca51b419cc44654c94c21f32c4361632a43fac # Parent 0b5dea4e96cd0e128c0da6019cc545964deeba49 [TEST] Fixing 04_hs_to_EAPF.py tc. 1) Fixed the 04_hs_to_EAPF.py tc. 2) Set test_disk appropriately. 3) Improved pool_init_list() fn to include only pool info belonging to which the VS belongs. 4) Cleaned up unnecessary declarations and import stmt. 5) Replaced create_diskpool_file() function to create a DiskPool, with create_diskpool_conf() which calls either creating of diskconf file or using the diskpool depending on the version of the libvirt on the machine. Tested with Xen, XenFV and KVM on latest sources. This tc might not work on LXC with these changes. Signed-off-by: Deepti B. Kalakeri diff -r 0b5dea4e96cd -r 3eca51b419cc suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Mon Aug 11 00:42:50 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Mon Aug 11 11:16:20 2008 -0700 @@ -59,8 +59,8 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL, SKIP from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.logicaldevices import verify_device_values -from XenKvmLib.common_util import cleanup_restore, test_dpath, \ -create_diskpool_file, create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import cleanup_restore, \ +create_diskpool_conf, destroy_netpool sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -68,27 +68,34 @@ test_mac = "00:11:22:33:44:aa" test_mac = "00:11:22:33:44:aa" test_mem = 128 test_vcpus = 1 -test_disk = "xvdb" -diskid = "%s/%s" % ("DiskPool", test_dpath) -memid = "%s/%s" % ("MemoryPool", 0) -procid = "%s/%s" % ("ProcessorPool", 0) def print_err(err, detail, cn): logger.error(err % cn) logger.error("Exception: %s", detail) -def pool_init_list(pool_assoc): +def pool_init_list(virt, pool_assoc, net_name, dpool_name): """ Creating the lists that will be used for comparisons. """ in_pllist = {} + npool = get_typed_class(virt, 'NetworkPool') + dpool = get_typed_class(virt, 'DiskPool') + ppool = get_typed_class(virt, 'ProcessorPool') + mpool = get_typed_class(virt, 'MemoryPool') + n_instid = '%s/%s' % ('NetworkPool', net_name) + for i in range(len(pool_assoc)): classname_keyvalue = pool_assoc[i].classname instid = pool_assoc[i]['InstanceID'] - in_pllist[classname_keyvalue] = instid + if classname_keyvalue == npool and instid == n_instid: + in_pllist[classname_keyvalue] = instid + elif classname_keyvalue == dpool and instid == dpool_name: + in_pllist[classname_keyvalue] = instid + elif classname_keyvalue == ppool or classname_keyvalue == mpool: + in_pllist[classname_keyvalue] = instid return in_pllist -def eapf_list(server, virt="Xen"): +def eapf_list(server, virt, test_disk): disk_inst = get_typed_class(virt, "LogicalDisk") proc_inst = get_typed_class(virt, "Processor") net_inst = get_typed_class(virt, "NetworkPort") @@ -136,7 +143,7 @@ def get_inst_for_dom(assoc_val): return dom_list -def get_assocname_info(server, cn, an, qcn, hostname, virt="Xen"): +def get_assocname_info(server, cn, an, qcn, hostname, virt): status = PASS assoc_info = [] try: @@ -155,9 +162,6 @@ def get_assocname_info(server, cn, an, q print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn) status = FAIL - if status != PASS: - cleanup_restore(server, virt='Xen') - return status, assoc_info def check_len(an, assoc_list_info, qcn, exp_len): @@ -167,14 +171,14 @@ def check_len(an, assoc_list_info, qcn, return FAIL return PASS -def verify_eafp_values(server, in_pllist, virt="Xen"): +def verify_eafp_values(server, in_pllist, virt, test_disk): # Looping through the in_pllist to get association for various pools. status = PASS an = get_typed_class(virt, "ElementAllocatedFromPool") exp_len = 1 - qcn = "Logical Devices" - eafp_values = eapf_list(server, virt) + eafp_values = eapf_list(server, virt, test_disk) for cn, instid in sorted(in_pllist.items()): + qcn = cn try: assoc_info = Associators(server, an, cn, virt, InstanceID = instid) inst_list = get_inst_for_dom(assoc_info) @@ -185,14 +189,12 @@ def verify_eafp_values(server, in_pllist CCName = assoc_eafp_info['CreationClassName'] status = verify_device_values(assoc_eafp_info, eafp_values, virt) - if status != PASS: return status - except Exception, detail: logger.error(CIM_ERROR_ASSOCIATORS, an) logger.error("Exception: %s", detail) - cleanup_restore(server, virt='Xen') + cleanup_restore(server, virt) status = FAIL return status @@ -200,38 +202,37 @@ def main(): def main(): options= main.options server = options.ip - if options.virt == "XenFV": - virt = "Xen" - else: - virt=options.virt + virt=options.virt # Get the host info status, host_name, classname = get_host_info(server, virt) if status != PASS: return status + destroy_and_undefine_all(server) + if virt == 'Xen': + test_disk = 'xvdb' + else: + test_disk = 'hdb' + virt_type = get_class(virt) if virt == 'LXC': - vsxml = virt_type(test_dom) + vsxml = virt_type(test_dom, ntype="network") else: vsxml = virt_type(test_dom, vcpus = test_vcpus, mac = test_mac, - disk = test_disk) + disk = test_disk, ntype="network") ret = vsxml.define(server) if not ret: logger.error("Failed to define the dom: '%s'", test_dom) return FAIL - # Verify DiskPool on machine - status = create_diskpool_file() + + # Get the network pool info which is used by the VS. + net_name = vsxml.xml_get_net_network() + + status, dpool_name = create_diskpool_conf(server, virt) if status != PASS: logger.error("Failed to create diskpool") - vsxml.undefine(server) - return FAIL - # Create NetPool on machine - status, net_name = create_netpool_conf(server, virt, use_existing=False) - if status != PASS: - logger.error('Unable to create network pool') vsxml.undefine(server) - cleanup_restore(server, virt=virt) return FAIL # Get the hostedResourcePool info first @@ -244,6 +245,7 @@ def main(): cleanup_restore(server, virt=virt) destroy_netpool(server, virt, net_name) return status + # One pool for each Device type, hence len should be 4 exp_len = 4 status = check_len(an, pool, qcn, exp_len) @@ -253,13 +255,14 @@ def main(): destroy_netpool(server, virt, net_name) return FAIL - in_pllist = pool_init_list(pool) + in_pllist = pool_init_list(virt, pool, net_name, dpool_name) if virt == 'LXC': for cn, instid in in_pllist.items(): if cn == 'LXC_MemoryPool': in_pllist = {cn: instid} break - status = verify_eafp_values(server, in_pllist, virt) + + status = verify_eafp_values(server, in_pllist, virt, test_disk) vsxml.undefine(server) cleanup_restore(server, virt=virt) destroy_netpool(server, virt, net_name) From kaitlin at linux.vnet.ibm.com Mon Aug 11 18:19:45 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 11:19:45 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding KVM and XenFV support to 41_cs_to_settingdefinestate.py In-Reply-To: <0b5dea4e96cd0e128c0d.1218440644@elm3b217.beaverton.ibm.com> References: <0b5dea4e96cd0e128c0d.1218440644@elm3b217.beaverton.ibm.com> Message-ID: <48A082C1.4000509@linux.vnet.ibm.com> Just a minor comment.. Can all of these comments be changed so that they are hypervisor independent? I think removing the Xen_ prefix is good enough. Otherwise, this patch looks good. Thanks! > + > + # Expect the Xen_SystemDevice to return 4 logical device records. > + > + # Get the rasd values that will be used to compare with the Xen_SettingsDefineState > + # we expect only one RASD record to be returned for each device that is used to > + # query with the Xen_SettingsDefineState association. > + # We expect that Xen_VirtualSystemSettingDataComponent returns only one > + # Xen_VirtualSystemSettingData object when queried with disk, processor, > + # network and memory rasd's and all of them return the same output. > + > + # Get the vssd values which will be used for verifying the > + # Xen_VirtualSystemSettingData output from the > + # Xen_VirtualSystemSettingDataComponent results. > + # Since the Xen_VirtualSystemSettingDataComponent returns similar > + # output when queried with every RASD, we are taking the output of > + # the last associtaion query as inputs for > + # querying Xen_SettingsDefineState. > + # verify the results of Xen_SettingsDefineState with the cs_values list that was > + # built using the output of the enumeration on Xen_ComputerSystem. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Mon Aug 11 19:51:33 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 11 Aug 2008 12:51:33 -0700 Subject: [Libvirt-cim] Cimtest Report for KVM on Fedora 9 (2008/08/11) In-Reply-To: (Guo Lian Yun's message of "Mon, 11 Aug 2008 15:53:41 +0800") References: Message-ID: <87hc9rgwje.fsf@caffeine.beaverton.ibm.com> GY> Problem processing indication to http://localhost:8008. sfcb rc: 4 CURL error: GY> 52 (Server returned nothing (no headers, no data)) GY> Problem processing indication to http://localhost:8007. sfcb rc: 4 CURL error: GY> 52 (Server returned nothing (no headers, no data)) GY> Problem processing indication to http://localhost:8006. sfcb rc: 4 CURL error: GY> 52 (Server returned nothing (no headers, no data)) This is an SFCB build issue. If it's not properly linked against libcurl, then it can't process incoming HTTP requests for the indications. GY> ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL GY> ERROR - Unexpected rc code 7 and description The requested operation is not GY> supported GY> InvokeMethod(CreateResourcePool): The requested operation is not supported GY> ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL GY> ERROR - Unexpected rc code 7 and description The requested operation is not GY> supported GY> InvokeMethod(CreateChildResourcePool): The requested operation is not supported GY> ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: FAIL GY> ERROR - Unexpected rc code 7 and description The requested operation is not GY> supported GY> InvokeMethod(RemoveResourcesFromResourcePool): The requested operation is not GY> supported GY> ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL GY> ERROR - Unexpected rc code 7 and description The requested operation is not GY> supported GY> InvokeMethod(DeleteResourcePool): The requested operation is not supported Why are these failing? We don't support these methods, so returning NOT_SUPPORTED is the proper behavior. GY> VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL GY> ERROR - destroy_fail>> noname: Error executing DestroySystem GY> ERROR - (1, u'Unable to retrieve domain name.') GY> ERROR - destroy_fail>> nonexistent: Error executing DestroySystem GY> ERROR - (1, u'Failed to find domain') GY> InvokeMethod(DestroySystem): Unable to retrieve domain name. GY> InvokeMethod(DestroySystem): Failed to find domain Any idea why this is failing? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Mon Aug 11 20:26:45 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 13:26:45 -0700 Subject: [Libvirt-cim] Cimtest Report for KVM on Fedora 9 (2008/08/11) In-Reply-To: <87hc9rgwje.fsf@caffeine.beaverton.ibm.com> References: <87hc9rgwje.fsf@caffeine.beaverton.ibm.com> Message-ID: <48A0A085.2020504@linux.vnet.ibm.com> > GY> ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL > GY> ERROR - Unexpected rc code 7 and description The requested operation is not > GY> supported > GY> InvokeMethod(CreateResourcePool): The requested operation is not supported > > GY> ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL > GY> ERROR - Unexpected rc code 7 and description The requested operation is not > GY> supported > GY> InvokeMethod(CreateChildResourcePool): The requested operation is not supported > GY> ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: FAIL > GY> ERROR - Unexpected rc code 7 and description The requested operation is not > GY> supported > GY> InvokeMethod(RemoveResourcesFromResourcePool): The requested operation is not > GY> supported > GY> ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL > GY> ERROR - Unexpected rc code 7 and description The requested operation is not > GY> supported > GY> InvokeMethod(DeleteResourcePool): The requested operation is not supported > > Why are these failing? We don't support these methods, so returning > NOT_SUPPORTED is the proper behavior. These tests were written against Pegasus, which returns "CIM_ERR_NOT_SUPPORTED". SFCB is returning "The requested operation is not supported". Daisy - can you update these tests? > > GY> VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > GY> ERROR - destroy_fail>> noname: Error executing DestroySystem > GY> ERROR - (1, u'Unable to retrieve domain name.') > GY> ERROR - destroy_fail>> nonexistent: Error executing DestroySystem > GY> ERROR - (1, u'Failed to find domain') > GY> InvokeMethod(DestroySystem): Unable to retrieve domain name. > GY> InvokeMethod(DestroySystem): Failed to find domain > > Any idea why this is failing? > This is a similar problem. SFCB is returning the following errors: "Unable to retrieve domain name." "Failed to find domain" The test is looking for the following errors (because this is what Pegasus returns): "CIM_ERR_FAILED: Unable to retrieve domain name." "CIM_ERR_FAILED: Failed to find domain" Daisy - can you fix this test to work for both Pegasus and SFCB? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Aug 11 20:39:20 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 13:39:20 -0700 Subject: [Libvirt-cim] CimTest Report for KVM on F9 06-08-2008 In-Reply-To: <48A03646.9000703@linux.vnet.ibm.com> References: <489969D3.5040704@linux.vnet.ibm.com> <4899C506.9060808@linux.vnet.ibm.com> <48A03646.9000703@linux.vnet.ibm.com> Message-ID: <48A0A378.0@linux.vnet.ibm.com> > I went through the test case and found to have the following problems > with the test case: > > 1) The XML configuration information with the existing test case is > not completely correct for *creating* a KVM/XenFV guest. > It does not set the test_disk information correctly, but this does > not matter when we just *define *the guest, but surely the XML config > was not useful in *creating* the KVM/XenFV guest. > The test_disk was set to 'xvdb' for all Xen/XenFV/KVM. > 2) The network pool information that is used for creating the guest > and the networkpool used in the rest of the test case are different. > 3) The tc was using create_diskpool_file() function to create a > DiskPool, this should have been create_diskpool_conf() which calls > either creating of diskconf file or using the diskpool > depending on the version of the libvirt on the machine. > 4) Also, the networkpool information that was initialized using the > pool_init_list() test case was getting overwritten in the case where > there were more than one networkpool existed. > And this could be one of the potential reason for the test case to > be intermittently fail, since the information in the list would not have > been set appropriately. Yep, I agree here. I was seeing this fail when I had more than one network pool defined because the guest was using one pool but the test was comparing against a different pool. Thanks for looking at this test - looks like a lot of issues to fix. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Mon Aug 11 20:59:47 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 11 Aug 2008 13:59:47 -0700 Subject: [Libvirt-cim] Cimtest Report for KVM on Fedora 9 (2008/08/11) In-Reply-To: <48A0A085.2020504@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Mon, 11 Aug 2008 13:26:45 -0700") References: <87hc9rgwje.fsf@caffeine.beaverton.ibm.com> <48A0A085.2020504@linux.vnet.ibm.com> Message-ID: <8763q7gtdo.fsf@caffeine.beaverton.ibm.com> KR> The test is looking for the following errors (because this is what KR> Pegasus returns): KR> "CIM_ERR_FAILED: Unable to retrieve domain name." KR> "CIM_ERR_FAILED: Failed to find domain" The error code is the same though, right? I think that it would be better to check the code than the string... -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Mon Aug 11 21:10:02 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 14:10:02 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 04_hs_to_EAPF.py tc In-Reply-To: <3eca51b419cc44654c94.1218478665@elm3b217.beaverton.ibm.com> References: <3eca51b419cc44654c94.1218478665@elm3b217.beaverton.ibm.com> Message-ID: <48A0AAAA.7000605@linux.vnet.ibm.com> > -def pool_init_list(pool_assoc): > +def pool_init_list(virt, pool_assoc, net_name, dpool_name): > """ > Creating the lists that will be used for comparisons. > """ > in_pllist = {} > + npool = get_typed_class(virt, 'NetworkPool') > + dpool = get_typed_class(virt, 'DiskPool') > + ppool = get_typed_class(virt, 'ProcessorPool') > + mpool = get_typed_class(virt, 'MemoryPool') > + n_instid = '%s/%s' % ('NetworkPool', net_name) > + > for i in range(len(pool_assoc)): > classname_keyvalue = pool_assoc[i].classname > instid = pool_assoc[i]['InstanceID'] > - in_pllist[classname_keyvalue] = instid > + if classname_keyvalue == npool and instid == n_instid: > + in_pllist[classname_keyvalue] = instid > + elif classname_keyvalue == dpool and instid == dpool_name: > + in_pllist[classname_keyvalue] = instid > + elif classname_keyvalue == ppool or classname_keyvalue == mpool: > + in_pllist[classname_keyvalue] = instid > return in_pllist This loop is a little hard to read. I think this loop can be removed. Instead, just build a list with the values you're expecting. in_pllist = { npool, '%s/%s' % ('NetworkPool', net_name), ... } I know this was already existing code, but if pool_assoc doesn't contain the instances you're expecting, then in_pllist won't contain the proper values to query against ElementAllocatedFromPool. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Aug 11 21:12:58 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 11 Aug 2008 14:12:58 -0700 Subject: [Libvirt-cim] Cimtest Report for KVM on Fedora 9 (2008/08/11) In-Reply-To: <8763q7gtdo.fsf@caffeine.beaverton.ibm.com> References: <87hc9rgwje.fsf@caffeine.beaverton.ibm.com> <48A0A085.2020504@linux.vnet.ibm.com> <8763q7gtdo.fsf@caffeine.beaverton.ibm.com> Message-ID: <48A0AB5A.4000308@linux.vnet.ibm.com> Dan Smith wrote: > KR> The test is looking for the following errors (because this is what > KR> Pegasus returns): > KR> "CIM_ERR_FAILED: Unable to retrieve domain name." > KR> "CIM_ERR_FAILED: Failed to find domain" > > The error code is the same though, right? I think that it would be > better to check the code than the string... > Yep, the return code is the same. But the problem is that the provider returns CIM_ERR_FAILED as the return code, which is the generic return code. So the test is checking the error description to verify that the test failed for the expected reason. There was some talk awhile back about adding provider specific return codes in addition to the standard CIM ones. If we move that way in the future, it'll allow us to check just the error codes in the tests. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Aug 12 05:48:20 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 11 Aug 2008 22:48:20 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding KVM and XenFV support to 41_cs_to_settingdefinestate.py Message-ID: <20f581053105b42a48b5.1218520100@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1218520092 25200 # Node ID 20f581053105b42a48b5a13c09d0e193aa953051 # Parent 98f69895a4dcc3d314d41611cf67f51329e15a44 [TEST] #2 Adding KVM and XenFV support to 41_cs_to_settingdefinestate.py. Changes: -------- Patch 2: ------- 1) Modified the comments to make it more generic to Virt types. Patch 1: -------- 1) Added support for XenFV, KVM. 2) Removed get_inst_from_list(). 3) Used poll_for_state_change to get the CS instance and also verify the enabled state is set to 2 4) Also verifying that the RequestedState is set to 0 when the VS is created. Tested with Xen, XenFV and KVM on latest sources. Signed-off-by: Deepti B. Kalakeri diff -r 98f69895a4dc -r 20f581053105 suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Fri Aug 08 11:01:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Mon Aug 11 22:48:12 2008 -0700 @@ -37,9 +37,9 @@ # Steps: # ------ # 1) Create a guest domain. -# 2) Enumerate ComputerSystem. -# 3) Select the guest domain from the output and create info list for the guest domain -# to be used later for comparison. +# 2) Enumerate ComputerSystem and Select the guest domain from the output +# and and verify the EnabledState is 2. +# 3) Create info list for the guest domain to be used later for comparison. # 4) Get the various devices allocated to the domain by using the SystemDevice # association and giving the ComputerSystem output from the previous enumeration # as inputs to the association. @@ -70,26 +70,31 @@ from XenKvmLib import rasd from XenKvmLib import rasd from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ verify_diskrasd_values, verify_memrasd_values, rasd_init_list +from XenKvmLib.common_util import poll_for_state_change +from XenKvmLib.classes import get_typed_class -sup_types = ['Xen'] +sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = "CrossClass_GuestDom" test_vcpus = 1 test_mem = 128 test_mac = "00:11:22:33:44:aa" -test_disk = "xvda" def vssd_init_list(virt): """ Creating the lists that will be used for comparisons. """ + if virt == 'XenFV': + virt = 'Xen' + vssd_values = { - 'Caption' : "Virtual System", \ - 'InstanceID' : '%s:%s' % (virt, test_dom), \ - 'ElementName' : test_dom, \ - 'VirtualSystemIdentifier' : test_dom, \ - 'VirtualSystemType' : virt, \ - 'Classname' : "Xen_VirtualSystemSettingData" + 'Caption' : "Virtual System", + 'InstanceID' : '%s:%s' % (virt, test_dom), + 'ElementName' : test_dom, + 'VirtualSystemIdentifier' : test_dom, + 'VirtualSystemType' : virt, + 'Classname' : get_typed_class(virt, + "VirtualSystemSettingData") } return vssd_values @@ -99,19 +104,20 @@ def cs_init_list(cs_dom): Creating the lists that will be used for comparisons. """ cs_values = { - 'Caption' : cs_dom.Caption, \ - 'EnabledState' : cs_dom.EnabledState, \ - 'RequestedState' : cs_dom.RequestedState, \ - 'CreationClassName' : cs_dom.CreationClassName, \ + 'Caption' : cs_dom.Caption, + 'EnabledState' : cs_dom.EnabledState, + 'RequestedState' : cs_dom.RequestedState, + 'CreationClassName' : cs_dom.CreationClassName, 'Name' : cs_dom.Name } return cs_values -def setup_env(server, virt): +def setup_env(server, virt, test_disk): vsxml_info = None status = PASS destroy_and_undefine_all(server) virt_xml = get_class(virt) + vsxml_info = virt_xml(test_dom, mem = test_mem, vcpus=test_vcpus, mac = test_mac, @@ -137,23 +143,7 @@ def vssd_sds_err( an, fieldname, ret_val logger.error(err) logger.error(detail) -def get_inst_from_list(server, vsxml, cn, cs_list, exp_val): - status = PASS - ret = -1 - inst = None - for inst in cs_list: - if inst.Name == exp_val: - ret = PASS - break - - if ret != PASS: - logger.error("%s with %s was not returned" % (cn, exp_val)) - vsxml.destroy(server) - status = FAIL - - return status, inst - -def get_associatornames_info(server, vsxml, cn, an, qcn, name): +def get_associatornames_info(server, virt, vsxml, cn, an, qcn, name): status = PASS assoc_info = [] try: @@ -161,7 +151,8 @@ def get_associatornames_info(server, vsx an, cn, CreationClassName=cn, - Name = name) + Name = name, + virt=virt) if len(assoc_info) < 1: logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) status = FAIL @@ -174,14 +165,15 @@ def get_associatornames_info(server, vsx return status, assoc_info -def get_associators_info(server, vsxml, cn, an, qcn, instid): +def get_associators_info(server, virt, vsxml, cn, an, qcn, instid): status = PASS assoc_info = [] try: assoc_info = Associators(server, an, cn, - InstanceID = instid) + InstanceID = instid, + virt=virt) if len(assoc_info) < 1: logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) @@ -208,31 +200,39 @@ def get_SDS_verify_RASD_build_vssdc_inpu status = PASS in_setting_define_state = {} in_vssdc = {} + prasd = get_typed_class(virt, 'ProcResourceAllocationSettingData') + mrasd = get_typed_class(virt, 'MemResourceAllocationSettingData') + nrasd = get_typed_class(virt, 'NetResourceAllocationSettingData') + drasd = get_typed_class(virt, 'DiskResourceAllocationSettingData') + try: -# Building the input for Xen_SettingsDefineState association. + + # Building the input for SettingsDefineState association. for i in range(len(sd_assoc_info)): if sd_assoc_info[i]['SystemName'] == test_dom: classname_keyvalue = sd_assoc_info[i]['CreationClassName'] deviceid = sd_assoc_info[i]['DeviceID'] in_setting_define_state[classname_keyvalue] = deviceid -# Expect the Xen_SystemDevice to return 4 logical device records. -# one each for memory, network, disk and processor and hence 4. -# and hence expect the in_setting_define_state to contain just 4 entries. - an = "Xen_SystemDevice" + + # Expect the SystemDevice to return 4 logical device records. + # one each for memory, network, disk and processor and hence 4. + # and hence expect the in_setting_define_state to contain just 4 entries. + an = get_typed_class(virt, "SystemDevice") qcn = "Logical Devices" exp_len = 4 if check_len(an, in_setting_define_state, qcn, exp_len) != PASS: return FAIL, in_setting_define_state -# Get the rasd values that will be used to compare with the Xen_SettingsDefineState -# output. + + # Get the rasd values that will be used to compare with the SettingsDefineState + # output. status, rasd_values, in_list = rasd_init_list(vsxml, virt, test_disk, test_dom, test_mac, test_mem) if status != PASS: - return status - - sccn = "Xen_ComputerSystem" - an = "Xen_SettingsDefineState" + return status, rasd_values + + sccn = get_typed_class(virt,"ComputerSystem") + an = get_typed_class(virt,"SettingsDefineState") for cn, devid in sorted(in_setting_define_state.items()): assoc_info = Associators(server, an, @@ -240,10 +240,11 @@ def get_SDS_verify_RASD_build_vssdc_inpu DeviceID = devid, CreationClassName = cn, SystemName = test_dom, - SystemCreationClassName = sccn) + SystemCreationClassName = sccn, + virt=virt) -# we expect only one RASD record to be returned for each device that is used to -# query with the Xen_SettingsDefineState association. + # we expect only one RASD record to be returned for each device that is used to + # query with the SettingsDefineState association. if len(assoc_info) != 1: logger.error("%s returned %i %s objects" % (an, len(assoc_info), cn)) status = FAIL @@ -251,13 +252,13 @@ def get_SDS_verify_RASD_build_vssdc_inpu index = (len(assoc_info) - 1) rasd = rasd_values[cn] CCName = assoc_info[index].classname - if CCName == 'Xen_ProcResourceAllocationSettingData': + if CCName == prasd: status = verify_procrasd_values(assoc_info[index], rasd) - elif CCName == 'Xen_NetResourceAllocationSettingData': + elif CCName == nrasd: status = verify_netrasd_values(assoc_info[index], rasd) - elif CCName == 'Xen_DiskResourceAllocationSettingData': + elif CCName == drasd: status = verify_diskrasd_values(assoc_info[index], rasd) - elif CCName == 'Xen_MemResourceAllocationSettingData': + elif CCName == mrasd: status = verify_memrasd_values(assoc_info[index], rasd) else: status = FAIL @@ -283,10 +284,11 @@ def verify_fields(an, field_name, vssd_c def verify_VSSD_values(assoc_info, vssd_values, an, qcn): -# We expect that Xen_VirtualSystemSettingDataComponent returns only one -# Xen_VirtualSystemSettingData object when queried with disk, processor, -# network and memory rasd's and all of them return the same output. + # We expect that VirtualSystemSettingDataComponent returns only one + # VirtualSystemSettingData object when queried with disk, processor, + # network and memory rasd's and all of them return the same output. exp_len = 1 + if check_len(an, assoc_info, qcn, exp_len) != PASS: return FAIL vssd_assoc = assoc_info[0] @@ -301,13 +303,14 @@ def verify_VSSD_values(assoc_info, vssd_ if verify_fields(an, 'VirtualSystemType', vssd_assoc, vssd_values) != PASS: return FAIL if vssd_assoc.classname != vssd_values['Classname']: - vssd_sds_err(an, 'Classname', vssd_assoc.classname, \ - vssd_values['Classname']) + vssd_sds_err(an, 'Classname', vssd_assoc.classname, + vssd_values['Classname']) return FAIL return PASS def verify_CS_values(assoc_info, cs_values, an, qcn): exp_len = 1 + if check_len(an, assoc_info, qcn, exp_len) != PASS: return FAIL cs_assoc = assoc_info[0] @@ -327,60 +330,56 @@ def main(): def main(): server = main.options.ip virt = main.options.virt - status, vsxml = setup_env(server, virt) + if virt == 'Xen': + test_disk = "xvda" + else: + test_disk = "hda" + + status, vsxml = setup_env(server, virt, test_disk) if status != PASS: return status - cs_enum = computersystem.enumerate(server) - if len(cs_enum) == 0: + status, cs_dom = poll_for_state_change(server, virt, test_dom, 2, + timeout=10) + if status != PASS and cs_dom.RequestedState != 0: vsxml.destroy(server) - return status - cn = cs_enum[0].CreationClassName - status, cs_dom = get_inst_from_list(server, - vsxml, - cn, - cs_enum, - test_dom) - if status != PASS: - vsxml.destroy(server) - return status + return FAIL -# Creating the cs info list which will be used later for comparison. + # Creating the cs info list which will be used later for comparison. cs_values = cs_init_list(cs_dom) - if cs_values['EnabledState'] != 2 : - logger.error("Improper EnabledState value set for domain %s", test_dom) - logger.error("Should have been 2 instead of %s", cs_values['EnabledState']) - vsxml.destroy(server) - return FAIL cn = cs_dom.CreationClassName - an = 'Xen_SystemDevice' + an = get_typed_class(virt, 'SystemDevice') qcn = 'Logical Devices' name = test_dom - status, sd_assoc_info = get_associatornames_info(server, vsxml, + status, sd_assoc_info = get_associatornames_info(server, virt, vsxml, cn, an, qcn, name) if status != PASS or len(sd_assoc_info) == 0: return status + status, in_vssdc_list = get_SDS_verify_RASD_build_vssdc_input(server, virt, vsxml, test_disk, sd_assoc_info) if status != PASS or len(in_vssdc_list) == 0 : vsxml.destroy(server) return status -# Verifying that the in_vssdc_list contains 4 entries one each for mem rasd, -# network rasd, processor rasd and disk rasd. + + # Verifying that the in_vssdc_list contains 4 entries one each for mem rasd, + # network rasd, processor rasd and disk rasd. exp_len = 4 if check_len(an, in_vssdc_list, qcn, exp_len) != PASS: vsxml.destroy(server) return FAIL -# Get the vssd values which will be used for verifying the Xen_VirtualSystemSettingData -# output from the Xen_VirtualSystemSettingDataComponent results. + + # Get the vssd values which will be used for verifying the + # VirtualSystemSettingData output from the + # VirtualSystemSettingDataComponent results. vssd_values = vssd_init_list(virt) - an = 'Xen_VirtualSystemSettingDataComponent' - qcn = 'Xen_VirtualSystemSettingData' + an = get_typed_class(virt, 'VirtualSystemSettingDataComponent') + qcn = get_typed_class(virt, 'VirtualSystemSettingData') for cn, instid in sorted((in_vssdc_list.items())): - status, vssd_assoc_info = get_associators_info(server, vsxml, cn, an, qcn, - instid) + status, vssd_assoc_info = get_associators_info(server, virt, vsxml, cn, + an, qcn, instid) if status != PASS or len(vssd_assoc_info) == 0: break status = verify_VSSD_values(vssd_assoc_info, vssd_values, an, qcn) @@ -389,18 +388,22 @@ def main(): if status != PASS: vsxml.destroy(server) return status -# Since the Xen_VirtualSystemSettingDataComponent returns similar output when queried with -# every RASD, we are taking the output of the last associtaion query as inputs for -# querying Xen_SettingsDefineState. + + # Since the VirtualSystemSettingDataComponent returns similar + # output when queried with every RASD, we are taking the output of + # the last associtaion query as inputs for + # querying SettingsDefineState. cn = vssd_assoc_info[0].classname - an = 'Xen_SettingsDefineState' - qcn = 'Xen_ComputerSystem' + an = get_typed_class(virt, 'SettingsDefineState') + qcn = get_typed_class(virt, 'ComputerSystem') instid = vssd_assoc_info[0]['InstanceID'] - status, cs_assoc_info = get_associators_info(server, vsxml, cn, an, qcn, instid) + status, cs_assoc_info = get_associators_info(server, virt, vsxml, cn, + an, qcn, instid) if status != PASS or len(cs_assoc_info) == 0: return status -# verify the results of Xen_SettingsDefineState with the cs_values list that was -# built using the output of the enumeration on Xen_ComputerSystem. + + # verify the results of SettingsDefineState with the cs_values list that was + # built using the output of the enumeration on ComputerSystem. status = verify_CS_values(cs_assoc_info, cs_values, an, qcn) vsxml.destroy(server) return status From yunguol at cn.ibm.com Tue Aug 12 06:01:52 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 11 Aug 2008 23:01:52 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ResourcePoolConfigurationService.03, 04, 06&07 to work for both Pegasus and sfcb Message-ID: # HG changeset patch # User Guolian Yun # Date 1218520874 25200 # Node ID a8604735c04b457abd35327996fae64eb0d5babe # Parent 98f69895a4dcc3d314d41611cf67f51329e15a44 [TEST] Fix ResourcePoolConfigurationService.03,04,06&07 to work for both Pegasus and sfcb Signed-off-by: Guolian Yun diff -r 98f69895a4dc -r a8604735c04b suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py Fri Aug 08 11:01:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py Mon Aug 11 23:01:14 2008 -0700 @@ -40,6 +40,7 @@ import sys import pywbem +from VirtLib import utils from XenKvmLib import rpcs_service from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS @@ -47,7 +48,6 @@ from XenKvmLib.classes import get_typed_class cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED -cim_desc = "CIM_ERR_NOT_SUPPORTED" cim_mname = "CreateResourcePool" @@ -56,6 +56,14 @@ options = main.options rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \ "ResourcePoolConfigurationService"))(options.ip) + + cmd = "lsof -P -i:5988 | grep sfcbd" + rc, out = utils.run_remote(options.ip, cmd) + if rc == 0: + cim_desc = "The requested operation is not supported" + else: + cim_desc = "CIM_ERR_NOT_SUPPORTED" + try: rpcs_conn.CreateResourcePool() except pywbem.CIMError, (err_no, desc): diff -r 98f69895a4dc -r a8604735c04b suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Fri Aug 08 11:01:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Mon Aug 11 23:01:14 2008 -0700 @@ -50,13 +50,13 @@ import sys import pywbem from XenKvmLib import rpcs_service +from VirtLib import utils from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS from CimTest.Globals import do_main, platform_sup from XenKvmLib.classes import get_typed_class cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED -cim_desc = "CIM_ERR_NOT_SUPPORTED" cim_mname = "CreateChildResourcePool" @do_main(platform_sup) @@ -64,6 +64,13 @@ options = main.options rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \ "ResourcePoolConfigurationService"))(options.ip) + cmd = "lsof -P -i:5988 | grep sfcbd" + rc, out = utils.run_remote(options.ip, cmd) + if rc == 0: + cim_desc = "The requested operation is not supported" + else: + cim_desc = "CIM_ERR_NOT_SUPPORTED" + try: rpcs_conn.CreateChildResourcePool() except pywbem.CIMError, (err_no, desc): diff -r 98f69895a4dc -r a8604735c04b suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Fri Aug 08 11:01:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Mon Aug 11 23:01:14 2008 -0700 @@ -46,7 +46,8 @@ import sys -import pywbem +import pywbem +from VirtLib import utils from XenKvmLib import rpcs_service from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS @@ -54,7 +55,6 @@ from XenKvmLib.classes import get_typed_class cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED -cim_desc = "CIM_ERR_NOT_SUPPORTED" cim_mname = "RemoveResourcesFromResourcePool" @do_main(platform_sup) @@ -62,6 +62,14 @@ options = main.options rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \ "ResourcePoolConfigurationService"))(options.ip) + + cmd = "lsof -P -i:5988 | grep sfcbd" + rc, out = utils.run_remote(options.ip, cmd) + if rc == 0: + cim_desc = "The requested operation is not supported" + else: + cim_desc = "CIM_ERR_NOT_SUPPORTED" + try: rpcs_conn.RemoveResourcesFromResourcePool() except pywbem.CIMError, (err_no, desc): diff -r 98f69895a4dc -r a8604735c04b suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Fri Aug 08 11:01:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Mon Aug 11 23:01:14 2008 -0700 @@ -43,6 +43,7 @@ import sys import pywbem +from VirtLib import utils from XenKvmLib import rpcs_service from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS @@ -50,7 +51,6 @@ from XenKvmLib.classes import get_typed_class cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED -cim_desc = "CIM_ERR_NOT_SUPPORTED" cim_mname = "DeleteResourcePool" @do_main(platform_sup) @@ -58,6 +58,13 @@ options = main.options rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \ "ResourcePoolConfigurationService"))(options.ip) + cmd = "lsof -P -i:5988 | grep sfcbd" + rc, out = utils.run_remote(options.ip, cmd) + if rc == 0: + cim_desc = "The requested operation is not supported" + else: + cim_desc = "CIM_ERR_NOT_SUPPORTED" + try: rpcs_conn.DeleteResourcePool() except pywbem.CIMError, (err_no, desc): From yunguol at cn.ibm.com Tue Aug 12 05:57:51 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 12 Aug 2008 13:57:51 +0800 Subject: [Libvirt-cim] Cimtest Report for KVM on Fedora 9 (2008/08/11) In-Reply-To: <48A0A085.2020504@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-12 04:26:45: > > GY> ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL > > GY> ERROR - Unexpected rc code 7 and description The requested > operation is not > > GY> supported > > GY> InvokeMethod(CreateResourcePool): The requested operation is > not supported > > > > GY> ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL > > GY> ERROR - Unexpected rc code 7 and description The requested > operation is not > > GY> supported > > GY> InvokeMethod(CreateChildResourcePool): The requested operation > is not supported > > GY> ResourcePoolConfigurationService - > 06_RemoveResourcesFromResourcePool.py: FAIL > > GY> ERROR - Unexpected rc code 7 and description The requested > operation is not > > GY> supported > > GY> InvokeMethod(RemoveResourcesFromResourcePool): The requested > operation is not > > GY> supported > > GY> ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL > > GY> ERROR - Unexpected rc code 7 and description The requested > operation is not > > GY> supported > > GY> InvokeMethod(DeleteResourcePool): The requested operation is > not supported > > > > Why are these failing? We don't support these methods, so returning > > NOT_SUPPORTED is the proper behavior. > > These tests were written against Pegasus, which returns > "CIM_ERR_NOT_SUPPORTED". SFCB is returning "The requested operation is > not supported". > > Daisy - can you update these tests? Patch on the way. > > > > > GY> VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > GY> ERROR - destroy_fail>> noname: Error executing DestroySystem > > GY> ERROR - (1, u'Unable to retrieve domain name.') > > GY> ERROR - destroy_fail>> nonexistent: Error executing DestroySystem > > GY> ERROR - (1, u'Failed to find domain') > > GY> InvokeMethod(DestroySystem): Unable to retrieve domain name. > > GY> InvokeMethod(DestroySystem): Failed to find domain > > > > Any idea why this is failing? > > > > This is a similar problem. SFCB is returning the following errors: > > "Unable to retrieve domain name." > "Failed to find domain" > > The test is looking for the following errors (because this is what > Pegasus returns): > "CIM_ERR_FAILED: Unable to retrieve domain name." > "CIM_ERR_FAILED: Failed to find domain" > > Daisy - can you fix this test to work for both Pegasus and SFCB? Done! > > Thanks! > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Tue Aug 12 05:38:04 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 11 Aug 2008 22:38:04 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VSMS - 05_destroysystem_neg.py to work for both Pegasus and sfcb Message-ID: # HG changeset patch # User Guolian Yun # Date 1218519475 25200 # Node ID b4a54ba548b4d34c485dc04d1fc5dba257e40446 # Parent 98f69895a4dcc3d314d41611cf67f51329e15a44 [TEST] Fix VSMS - 05_destroysystem_neg.py to work for both Pegasus and sfcb Signed-off-by: Guolian Yun diff -r 98f69895a4dc -r b4a54ba548b4 suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Fri Aug 08 11:01:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Mon Aug 11 22:37:55 2008 -0700 @@ -40,23 +40,35 @@ classname = get_typed_class(options.virt, 'ComputerSystem') + cmd = "lsof -P -i:5988 | grep sfcbd" + rc, out = utils.run_remote(options.ip, cmd) + if tc == 'noname': cs_ref = CIMInstanceName(classname, keybindings = {'CreationClassName':classname}) - exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, - 'desc' : 'CIM_ERR_FAILED: Unable to retrieve domain\ - name.' - } + if rc == 0: + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, + 'desc' : 'Unable to retrieve domain name.' + } + else: + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, + 'desc' : 'CIM_ERR_FAILED: Unable to retrieve domain name.' + } elif tc == 'nonexistent': cs_ref = CIMInstanceName(classname,keybindings = { 'Name':'##@@!!cimtest_domain', 'CreationClassName':classname}) - exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, - 'desc' : 'CIM_ERR_FAILED: Failed to find domain' - } + if rc == 0: + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, + 'desc' : 'Failed to find domain' + } + else: + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, + 'desc' : 'CIM_ERR_FAILED: Failed to find domain' + } else: return SKIP From deeptik at linux.vnet.ibm.com Tue Aug 12 07:50:41 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 12 Aug 2008 13:20:41 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 04_hs_to_EAPF.py tc In-Reply-To: <48A0AAAA.7000605@linux.vnet.ibm.com> References: <3eca51b419cc44654c94.1218478665@elm3b217.beaverton.ibm.com> <48A0AAAA.7000605@linux.vnet.ibm.com> Message-ID: <48A140D1.90405@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> -def pool_init_list(pool_assoc): >> +def pool_init_list(virt, pool_assoc, net_name, dpool_name): >> """ >> Creating the lists that will be used for comparisons. >> """ >> in_pllist = {} >> + npool = get_typed_class(virt, 'NetworkPool') >> + dpool = get_typed_class(virt, 'DiskPool') >> + ppool = get_typed_class(virt, 'ProcessorPool') >> + mpool = get_typed_class(virt, 'MemoryPool') >> + n_instid = '%s/%s' % ('NetworkPool', net_name) >> + >> for i in range(len(pool_assoc)): >> classname_keyvalue = pool_assoc[i].classname >> instid = pool_assoc[i]['InstanceID'] >> - in_pllist[classname_keyvalue] = instid >> + if classname_keyvalue == npool and instid == n_instid: >> + in_pllist[classname_keyvalue] = instid >> + elif classname_keyvalue == dpool and instid == dpool_name: >> + in_pllist[classname_keyvalue] = instid >> + elif classname_keyvalue == ppool or classname_keyvalue == mpool: >> + in_pllist[classname_keyvalue] = instid >> return in_pllist > > This loop is a little hard to read. I think this loop can be removed. > Instead, just build a list with the values you're expecting. > > in_pllist = { npool, '%s/%s' % ('NetworkPool', net_name), > ... > } > > I know this was already existing code, but if pool_assoc doesn't > contain the instances you're expecting, then in_pllist won't contain > the proper values to query against ElementAllocatedFromPool. I agree that the loop is little hard to read, but considering the fact that this is a Cross class test case where we would like to be able to make use of the output from the previous provider as input for the next step as much as possible, do you think that manually generating a list of our own will serve the purpose ? If yes, then the Crosss Class tc will no longer require query from the *HostedResourcePool, *correct?? Also, the above *if condition*s checks along with the following check after the *pool_init_list()* is called in the *main loop *make sure that we have *4* *required resourcepool *as inputs for *EAFP *query. in_pllist = pool_init_list(virt, pool, net_name, dpool_name) # One pool for each Device type, hence len should be 4 exp_len = 4 status = check_len(an, in_pllist, qcn, exp_len) if status != PASS: vsxml.undefine(server) cleanup_restore(server, virt=virt) destroy_netpool(server, virt, net_name) return FAIL Apart from this, the above *pool_init_list() *function can be made more readable as follows: def pool_init_list(virt, pool_assoc, net_name, dp_InstID): """ Creating the lists that will be used for comparisons. """ in_pllist = {} dp_CName = get_typed_class(virt, 'DiskPool') pp_CName = get_typed_class(virt, 'ProcessorPool') mp_CName = get_typed_class(virt, 'MemoryPool') np_CName = get_typed_class(virt, 'NetworkPool') np_InstID = '%s/%s' % ('NetworkPool', net_name) for p_inst in pool_assoc: CName = p_inst.classname InstID = p_inst['InstanceID'] if CName == np_CName and InstID == np_InstID: in_pllist[CName] = InstID elif CName == dp_CName and InstID == dp_InstID: in_pllist[CName] = InstID elif CName == pp_CName or CName == mp_CName: in_pllist[CName] = InstID return in_pllist Inputs are welcome as always :). Thanks and Regards, Deepti. From yunguol at cn.ibm.com Tue Aug 12 10:38:36 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 12 Aug 2008 18:38:36 +0800 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: Message-ID: Kaitlin, I applied the patch on my own repository. Here is the test result: ================================================= KVM on Pegasus Test Run Summary for Aug 12 2008 ================================================= Distro: Fedora release 8.93 (Rawhide) Kernel: 2.6.26-rc2-mm1-netns libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 661 Libvirt-cim changeset: 98bc98880149 ================================================= FAIL: 0 XFAIL: 1 SKIP: 1 PASS: 1 ----------------- Total: 3 ================================================= XFAIL Test Summary: ComputerSystem - 01_enum.py: PASSComputerSystem - 02_nosystems.py: SKIPComputerSystem - 03_defineVS.py: PASSComputerSystem - 04_defineStartVS.py: PASSComputerSystem - 05_activate_defined_start.py: PASSComputerSystem - 06_paused_active_suspend.py: PASSComputerSystem - 22_define_suspend.py: PASSComputerSystem - 23_suspend_suspend.py: PASSComputerSystem - 27_define_suspend_errs.py: PASSComputerSystem - 32_start_reboot.py: XFAILComputerSystem - 33_suspend_reboot.py: XFAILComputerSystem - 35_start_reset.py: PASSComputerSystem - 40_RSC_start.py: PASSComputerSystem - 41_cs_to_settingdefinestate.py: SKIPComputerSystem - 42_cs_gi_errs.py: PASS ================================================= SKIP Test Summary: ComputerSystem - 01_enum.py: PASSComputerSystem - 02_nosystems.py: SKIPComputerSystem - 03_defineVS.py: PASSComputerSystem - 04_defineStartVS.py: PASSComputerSystem - 05_activate_defined_start.py: PASSComputerSystem - 06_paused_active_suspend.py: PASSComputerSystem - 22_define_suspend.py: PASSComputerSystem - 23_suspend_suspend.py: PASSComputerSystem - 27_define_suspend_errs.py: PASSComputerSystem - 32_start_reboot.py: XFAILComputerSystem - 33_suspend_reboot.py: XFAILComputerSystem - 35_start_reset.py: PASSComputerSystem - 40_RSC_start.py: PASSComputerSystem - 41_cs_to_settingdefinestate.py: SKIPComputerSystem - 42_cs_gi_errs.py: PASS ================================================= Full report: ComputerSystem - 01_enum.py: PASSComputerSystem - 02_nosystems.py: SKIPComputerSystem - 03_defineVS.py: PASSComputerSystem - 04_defineStartVS.py: PASSComputerSystem - 05_activate_defined_start.py: PASSComputerSystem - 06_paused_active_suspend.py: PASSComputerSystem - 22_define_suspend.py: PASSComputerSystem - 23_suspend_suspend.py: PASSComputerSystem - 27_define_suspend_errs.py: PASSComputerSystem - 32_start_reboot.py: XFAILComputerSystem - 33_suspend_reboot.py: XFAILComputerSystem - 35_start_reset.py: PASSComputerSystem - 40_RSC_start.py: PASSComputerSystem - 41_cs_to_settingdefinestate.py: SKIPComputerSystem - 42_cs_gi_errs.py: PASS 1) Would you please to fix the whitespace for XFAIL and Total summary? 2) The count numbers are not correct, actually there are total 15 tests, 2 skip, 2 XFAIL and 11 pass for me. 3) I think it's better to change to a newline for each test case in the Test Summary and Full report. 4) The test summary isn't correct in XFAIL/SKIP status. Thanks! Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-12 00:21:16: > # HG changeset patch > # User Kaitlin Rupert > # Date 1218470745 25200 > # Node ID d1e8325893b3e68e12b1725e350314aeaf6d2be1 > # Parent a5111986921da879e2dcc57a1529c7f4d902aebf > [TEST] #2 Add test report generation. > > Using the --report option, you can generate a report and have it > mailed to the address supplied. > > How to call using the report option: > > ./runtests libvirt-cim -i localhost -c -d -v LXC -g > VirtualSystemManagementService -t 01_definesystem_name.py --report > > > The user will need to create a .cimtestrc file in their home > directory in the following format: > > [email] > relay = my.mail.relay.com > from = Joe User > > Will need to add revision number support to cimtest and then add the > cimtest revision number to the report. > > Updates: > -Refactored reporting related pieces into their own library file > > Signed-off-by: Kaitlin Rupert > > diff -r a5111986921d -r d1e8325893b3 suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Mon Aug 11 09:05:37 2008 -0700 > +++ b/suites/libvirt-cim/main.py Mon Aug 11 09:05:45 2008 -0700 > @@ -29,12 +29,13 @@ > sys.path.append('../../lib') > import TestSuite > import commands > -from VirtLib import utils > from VirtLib import groups > from CimTest.ReturnCodes import PASS, SKIP, XFAIL > from CimTest.Globals import platform_sup > sys.path.append('./lib') > from XenKvmLib.classes import get_typed_class > +import ConfigParser > +from XenKvmLib.reporting import gen_report, send_report > > parser = OptionParser() > parser.add_option("-i", "--ip", dest="ip", default="localhost", > @@ -54,8 +55,11 @@ > help="Virt type, select from 'Xen' & 'KVM' & > 'XenFV' & 'LXC'(default: Xen). ") > parser.add_option("-d", "--debug-output", action="store_true", dest="debug", > help="Duplicate the output to stderr") > +parser.add_option("--report", dest="report", > + help="Send report using mail info: -- > report=") > > TEST_SUITE = 'cimtest' > +CIMTEST_RCFILE = '%s/.cimtestrc' % os.environ['HOME'] > > def set_python_path(): > previous_pypath = os.environ.get('PYTHONPATH') > @@ -82,6 +86,28 @@ > > print "Cleaned log files." > > +def get_rcfile_vals(): > + if not os.access(CIMTEST_RCFILE, os.R_OK): > + print "\nCould not access the %s file for this user." % > CIMTEST_RCFILE > + print "Create this file and add the appropriate relay:" > + print "\tfrom = me at isp.com\n\trelay = my.relay\n" > + return None, None > + > + try: > + conf = ConfigParser.ConfigParser() > + if not conf.read(CIMTEST_RCFILE): > + return None, None > + > + addr = conf.get("email", "from") > + relay = conf.get("email", "relay") > + > + except Exception, details: > + print "\n%s" % details > + print "\nPlease verify the format of the %s file\n" % CIMTEST_RCFILE > + return None, None > + > + return addr, relay > + > def get_version(virt, ip): > conn = WBEMConnection('http://%s' % ip, > (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), > @@ -101,7 +127,10 @@ > > def main(): > (options, args) = parser.parse_args() > - > + to_addr = None > + from_addr = None > + relay = None > + div = > "--------------------------------------------------------------------" > > if options.test and not options.group: > parser.print_help() > @@ -114,7 +143,15 @@ > os.environ['CIMOM_PORT'] = str(options.port) > # > > - testsuite = TestSuite.TestSuite() > + if options.report: > + from_addr, relay = get_rcfile_vals() > + > + if from_addr == None or relay == None: > + return 1 > + > + to_addr = options.report > + > + testsuite = TestSuite.TestSuite(log=True) > > set_python_path() > > @@ -139,9 +176,10 @@ > > revision, changeset = get_version(options.virt, options.ip) > > - print "Testing " + options.virt + " hypervisor" > + print "\nTesting " + options.virt + " hypervisor" > > - for test in test_list: > + for test in test_list: > + testsuite.debug(div) > t_path = os.path.join(TEST_SUITE, test['group']) > os.environ['CIM_TC'] = test['test'] > cdto = 'cd %s' % t_path > @@ -155,7 +193,16 @@ > > testsuite.print_results(test['group'], test['test'], os_status) > > + testsuite.debug("%s\n" % div) > testsuite.finish() > + > + msg_body, heading = gen_report(revision, changeset, options.virt, > + options.ip, testsuite.log_file) > + > + if options.report: > + print "Sending mail from %s to %s using %s relay.\n" % \ > + (from_addr, to_addr, relay) > + send_report(to_addr, from_addr, relay, msg_body, heading) > > if __name__ == '__main__': > sys.exit(main()) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Tue Aug 12 11:17:35 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 12 Aug 2008 04:17:35 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Adding cim_[define/destroy] support for XenFV, KVM In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1218539488 25200 # Node ID d61c70298d799393882c0bddda01afa6519f3166 # Parent 98f69895a4dcc3d314d41611cf67f51329e15a44 [TEST] Adding cim_[define/destroy] support for XenFV, KVM. Tested with Xen, XenFV and KVM on latest sources. Signed-off-by: Deepti B. Kalakeri diff -r 98f69895a4dc -r d61c70298d79 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Aug 08 11:01:29 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Aug 12 04:11:28 2008 -0700 @@ -603,12 +603,13 @@ class XenXML(VirtXML, VirtCIM): return self._set_vbridge(ip, 'Xen') -class KVMXML(VirtXML): +class KVMXML(VirtXML, VirtCIM): secondary_disk_path = const.KVM_secondary_disk_path def __init__(self, test_dom=const.default_domname, mem=const.default_memory, + mem_allocunits=const.default_mallocunits, vcpus=const.default_vcpus, mac=const.KVM_default_mac, disk_file_path=const.KVM_disk_path, @@ -618,9 +619,12 @@ class KVMXML(VirtXML): logger.error('Error: Disk image does not exist') sys.exit(1) VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus) + VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path, + ntype, mac, vcpus, mem, mem_allocunits) self._os() self._devices(const.KVM_default_emulator, ntype, disk_file_path, disk, mac) + def _os(self): self.add_sub_node('/domain/os', 'type', 'hvm') @@ -645,12 +649,13 @@ class KVMXML(VirtXML): return self._set_vbridge(ip, 'KVM') -class XenFVXML(VirtXML): +class XenFVXML(VirtXML, VirtCIM): secondary_disk_path = const.XenFV_secondary_disk_path def __init__(self, test_dom=const.default_domname, mem=const.default_memory, + mem_allocunits=const.default_mallocunits, vcpus=const.default_vcpus, mac=const.XenFV_default_mac, disk_file_path=const.XenFV_disk_path, @@ -660,6 +665,8 @@ class XenFVXML(VirtXML): logger.error('Error: Disk image does not exist') sys.exit(1) VirtXML.__init__(self, 'xenfv', test_dom, set_uuid(), mem, vcpus) + VirtCIM.__init__(self, 'XenFV', test_dom, disk, disk_file_path, + ntype, mac, vcpus, mem, mem_allocunits) self._features() self._os(const.XenFV_default_loader) self._devices(const.XenFV_default_emulator, From deeptik at linux.vnet.ibm.com Tue Aug 12 11:17:36 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 12 Aug 2008 04:17:36 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Adding XenFV, KVM support to 02_profile_to_elec.py In-Reply-To: Message-ID: <6c90dfd0733df044e7de.1218539856@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1218539840 25200 # Node ID 6c90dfd0733df044e7de2ef12e64be1b6599a294 # Parent d61c70298d799393882c0bddda01afa6519f3166 [TEST] Adding XenFV, KVM support to 02_profile_to_elec.py. Tested with Xen, XenFV and KVM on latest sources. Signed-off-by: Deepti B. Kalakeri diff -r d61c70298d79 -r 6c90dfd0733d suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py --- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Tue Aug 12 04:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Tue Aug 12 04:17:20 2008 -0700 @@ -46,12 +46,13 @@ from CimTest.Globals import logger, CIM_ from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORNAMES from CimTest.Globals import do_main from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.classes import get_typed_class -sup_types = ['Xen'] +sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = "domguest" -def setup_env(server): +def setup_env(server, virt): rc = -1 status = PASS csxml_info = None @@ -76,53 +77,36 @@ def print_err(err, detail, cn): logger.error(err % cn) logger.error("Exception: %s", detail) -def get_inst_from_list(server, cn, qcn, list, filter, exp_val): - status = PASS - ret = -1 - inst = None - - if len(list) < 1: - logger.error("%s returned %i %s objects" % (qcn, len(list), cn)) - return FAIL, None - - for inst in list: - if inst[filter['key']] == exp_val: - ret = PASS - break +def get_expected_inst(cn, list, property, exp): + try: + for x in list: + if x[property] == exp: + return PASS, x + except Exception: + pass + logger.error("%s with %s was not returned" % (cn, exp)) + return FAIL, None - if ret != PASS: - status = FAIL - logger.error("%s with %s was not returned" % (cn, exp_val)) - return PASS, inst - -def get_profile(server): +def get_profile(server, virt): registeredname = 'Virtual System Profile' - cn = 'Xen_RegisteredProfile' + cn = get_typed_class(virt, 'RegisteredProfile') status = PASS profile = None try: - proflist = enumclass.enumerate_inst(server, - enumclass.Xen_RegisteredProfile) - - filter = {"key" : "RegisteredName"} - status, profile = get_inst_from_list(server, - cn, - cn, - proflist, - filter, - registeredname) - + proflist = enumclass.enumerate_inst(server, 'RegisteredProfile', virt) + status, profile = get_expected_inst(cn, proflist, 'RegisteredName', + registeredname) except Exception, detail: print_err(CIM_ERROR_ENUMERATE, detail, cn) status = FAIL return status, profile -def get_cs(server, profile): - cn = 'Xen_RegisteredProfile' - an = 'Xen_ElementConformsToProfile' +def get_cs(server, virt, profile): + cn = get_typed_class(virt, 'RegisteredProfile') + an = get_typed_class(virt, 'ElementConformsToProfile') status = PASS cs = None @@ -130,16 +114,11 @@ def get_cs(server, profile): assoc_info = Associators(server, an, cn, - InstanceID = profile['InstanceID']) + InstanceID = profile['InstanceID'], + virt=virt) - cn = 'Xen_ComputerSystem' - filter = {"key" : "Name"} - status, cs = get_inst_from_list(server, - cn, - an, - assoc_info, - filter, - test_dom) + cn = get_typed_class(virt, 'ComputerSystem') + status, cs = get_expected_inst(cn, assoc_info, 'Name', test_dom) except Exception, detail: print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn) @@ -147,9 +126,9 @@ def get_cs(server, profile): return status, cs -def get_elec(server, cs): - cn = 'Xen_ComputerSystem' - an = 'Xen_ElementCapabilities' +def get_elec(server, virt, cs): + cn = get_typed_class(virt, 'ComputerSystem') + an = get_typed_class(virt, 'ElementCapabilities') status = FAIL elec = None @@ -159,59 +138,46 @@ def get_elec(server, cs): an, cn, Name = cs['Name'], - CreationClassName = ccn) - - cn = 'Xen_EnabledLogicalElementCapabilities' - filter = {"key" : "InstanceID"} - status, elec = get_inst_from_list(server, - cn, - an, - assoc_info, - filter, - test_dom) + CreationClassName = ccn, + virt=virt) + cn = get_typed_class(virt, 'EnabledLogicalElementCapabilities') + status, elec = get_expected_inst(cn, assoc_info, 'InstanceID', test_dom) except Exception, detail: print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn) status = FAIL - return status, elec @do_main(sup_types) def main(): - global virt - global csxml options = main.options virt = options.virt server = options.ip - status = PASS - - status, csxml = setup_env(server) + status, csxml = setup_env(server, virt) if status != PASS: return status prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' - status, prof = get_profile(server) + status, prof = get_profile(server, virt) if status != PASS or prof == None: csxml.undefine(server) - return status + return FAIL - status, cs = get_cs(server, prof) + status, cs = get_cs(server, virt, prof) if status != PASS or cs == None: csxml.undefine(server) - return status + return FAIL Globals.CIM_NS = prev_namespace - status, elec = get_elec(server, cs) + status, elec = get_elec(server, virt, cs) if status != PASS or elec == None: - return status + status = FAIL csxml.undefine(server) return status - - if __name__ == "__main__": sys.exit(main()) From deeptik at linux.vnet.ibm.com Tue Aug 12 11:17:34 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 12 Aug 2008 04:17:34 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] KVMXML, XENXML cim_define()/cim_destroy support and XenFV, KVM support for Profile.02. Message-ID: From danms at us.ibm.com Tue Aug 12 13:32:36 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 12 Aug 2008 06:32:36 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ResourcePoolConfigurationService.03, 04, 06&07 to work for both Pegasus and sfcb In-Reply-To: (yunguol@cn.ibm.com's message of "Mon, 11 Aug 2008 23:01:52 -0700") References: Message-ID: <87zlnigxzf.fsf@caffeine.beaverton.ibm.com> GY> + cmd = "lsof -P -i:5988 | grep sfcbd" GY> + rc, out = utils.run_remote(options.ip, cmd) GY> + if rc == 0: GY> + cim_desc = "The requested operation is not supported" GY> + else: GY> + cim_desc = "CIM_ERR_NOT_SUPPORTED" -1. Just have a list of the two valid error codes and check that it's one of the two: msgs = ["The requested operation is not supported", "CIM_ERR_NOT_SUPPORTED"] if errmsg not in msgs: # FAIL However, it seems to me like this particular case should be handled by checking the error code. We should fix the return values instead of this hack. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Tue Aug 12 13:34:16 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 12 Aug 2008 06:34:16 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VSMS - 05_destroysystem_neg.py to work for both Pegasus and sfcb In-Reply-To: (yunguol@cn.ibm.com's message of "Mon, 11 Aug 2008 22:38:04 -0700") References: Message-ID: <87vdy6gxwn.fsf@caffeine.beaverton.ibm.com> GY> + cmd = "lsof -P -i:5988 | grep sfcbd" GY> + rc, out = utils.run_remote(options.ip, cmd) -1 on this one too. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Tue Aug 12 17:35:27 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 12 Aug 2008 10:35:27 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ResourcePoolConfigurationService.03, 04, 06&07 to work for both Pegasus and sfcb In-Reply-To: <87zlnigxzf.fsf@caffeine.beaverton.ibm.com> References: <87zlnigxzf.fsf@caffeine.beaverton.ibm.com> Message-ID: <48A1C9DF.5000304@linux.vnet.ibm.com> Dan Smith wrote: > GY> + cmd = "lsof -P -i:5988 | grep sfcbd" > GY> + rc, out = utils.run_remote(options.ip, cmd) > GY> + if rc == 0: > GY> + cim_desc = "The requested operation is not supported" > GY> + else: > GY> + cim_desc = "CIM_ERR_NOT_SUPPORTED" > > -1. > > Just have a list of the two valid error codes and check that it's one of > the two: > > msgs = ["The requested operation is not supported", "CIM_ERR_NOT_SUPPORTED"] > if errmsg not in msgs: > # FAIL > > However, it seems to me like this particular case should be handled by > checking the error code. We should fix the return values instead of > this hack. > The providers are returning the proper values for these calls. The difference between Pegasus and SFCB in this case is that Pegasus returns "CIM_ERR_NOT_SUPPORTED" as the error description and SFCB returns "The requested operation is not supported". Daisy, in this case, the error returned by both is CIM_ERR_NOT_SUPPORTED (which is equal to 7). Since this error is specific, I think it's fine to just check the error number. There's no need to check the error description. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Aug 12 17:46:03 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 12 Aug 2008 10:46:03 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VSMS - 05_destroysystem_neg.py to work for both Pegasus and sfcb In-Reply-To: <87vdy6gxwn.fsf@caffeine.beaverton.ibm.com> References: <87vdy6gxwn.fsf@caffeine.beaverton.ibm.com> Message-ID: <48A1CC5B.9090703@linux.vnet.ibm.com> Dan Smith wrote: > GY> + cmd = "lsof -P -i:5988 | grep sfcbd" > GY> + rc, out = utils.run_remote(options.ip, cmd) > > -1 on this one too. > > Daisy, changing the error description from 'CIM_ERR_FAILED: Unable to retrieve domain name.' to 'Unable to retrieve domain name.' will work. Instead of: if err_no == exp_value['rc'] and err_desc == exp_value['desc']: You can do something like: if err_no == exp_value['rc'] and err_desc.find(exp_value['desc']) >= 0: You can look at suites/libvirt-cim/cimtest/ResourceAllocationFromPool/04_reverse_errs.py - this test uses find on the error descriptions. For this test, since the provider returns the same error code for both errors, so I think checking the error description is needed. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Aug 12 22:03:23 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 12 Aug 2008 15:03:23 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: References: Message-ID: <48A208AB.8010205@linux.vnet.ibm.com> Guo Lian Yun wrote: > > Kaitlin, > > I applied the patch on my own repository. Here is the test result: > > ================================================= > KVM on Pegasus Test Run Summary for Aug 12 2008 > ================================================= > Distro: Fedora release 8.93 (Rawhide) > Kernel: 2.6.26-rc2-mm1-netns > libvirt: 0.4.4 > Hypervisor: QEMU 0.9.1 > CIMOM: Pegasus 2.7.0 > Libvirt-cim revision: 661 > Libvirt-cim changeset: 98bc98880149 > ================================================= > FAIL: 0 > XFAIL: 1 > SKIP: 1 > PASS: 1 > ----------------- > Total: 3 > > 1) Would you please to fix the whitespace for XFAIL and Total summary? > 2) The count numbers are not correct, actually there are total 15 tests, > 2 skip, 2 XFAIL and 11 pass for me. > 3) I think it's better to change to a newline for each test case in the > Test Summary and Full report. > 4) The test summary isn't correct in XFAIL/SKIP status. Yikes, the formatting is all messed up. As are the count values. When I tested yesterday, I was seeing proper formatting. I must have sent a bad version of the patches. I'll look at this when I get a chance tomorrow. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Aug 12 22:06:06 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 12 Aug 2008 15:06:06 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 04_hs_to_EAPF.py tc In-Reply-To: <48A140D1.90405@linux.vnet.ibm.com> References: <3eca51b419cc44654c94.1218478665@elm3b217.beaverton.ibm.com> <48A0AAAA.7000605@linux.vnet.ibm.com> <48A140D1.90405@linux.vnet.ibm.com> Message-ID: <48A2094E.6050803@linux.vnet.ibm.com> >> >> I know this was already existing code, but if pool_assoc doesn't >> contain the instances you're expecting, then in_pllist won't contain >> the proper values to query against ElementAllocatedFromPool. > I agree that the loop is little hard to read, but considering the fact > that this is a Cross class test case where we would like to be able to > as input for the next > step as much as possible, do you think that manually generating a list > of our own will serve the purpose ? > If yes, then the Crosss Class tc will no longer require query from the > *HostedResourcePool, *correct?? This is a really good point. I won't considering this a cross class test when I first read the patch. > > def pool_init_list(virt, pool_assoc, net_name, dp_InstID): > """ > Creating the lists that will be used for comparisons. > """ > in_pllist = {} > dp_CName = get_typed_class(virt, 'DiskPool') > pp_CName = get_typed_class(virt, 'ProcessorPool') > mp_CName = get_typed_class(virt, 'MemoryPool') > np_CName = get_typed_class(virt, 'NetworkPool') > np_InstID = '%s/%s' % ('NetworkPool', net_name) > > for p_inst in pool_assoc: > CName = p_inst.classname > InstID = p_inst['InstanceID'] > if CName == np_CName and InstID == np_InstID: > in_pllist[CName] = InstID > elif CName == dp_CName and InstID == dp_InstID: > in_pllist[CName] = InstID > elif CName == pp_CName or CName == mp_CName: > in_pllist[CName] = InstID > return in_pllist > What confuses me here are the comparisons: The outcome of each if statement is the same. You're essentially building a list that is: in_pllist = { Cname : InstID, ... } Why only verify the network pool and disk pool InstanceIDs but not the memory pool or processor pool InstanceIDs? If you want to verify in_pllist only has InstanceIDs you're expecting, you should check for proc and mem as well. Why not do something like: exp_pllist = { dp_CName : dp_InstID, ... } for p_inst in pool_assoc: CName = p_inst.classname InstID = p_inst['InstanceID'] if exp_pllist[Cname] == InstID: in_pllist[Cname] = InstID This way, you can build a list of expected values. in_pllist should match exp_pllist. You could then call check_len() at this point, or you could call it after pool_init_list() returns. Although, this seems silly. You could do something like: for p_inst in pool_assoc: CName = p_inst.classname InstID = p_inst['InstanceID'] if exp_pllist[Cname] != InstID: return FAIL, None return PASS, exp_pllist I agree that you want to use the output from the previous provider. However, if you've already confirmed that A == B, then returning A is no different than returning B. But either way is fine in this case. I just think the multiple if statements in the loop were confusing - it took me awhile to understand what that loop was trying to accomplish. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Aug 13 00:47:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 12 Aug 2008 17:47:59 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] #2 Add reporting library In-Reply-To: Message-ID: <30dd178dfe0f86b01fe3.1218588479@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218470737 25200 # Node ID 30dd178dfe0f86b01fe36d36166e7e6c024be6ba # Parent dfd2ac2440a2543fffe6e8c6ae27445e14932ca0 [TEST] #2 Add reporting library. Include CIMOM type in email heading. Updates: -Read from the file using xreadlines() -Reorganize some of the report building pieces -Fixed issue where mail was being sent to the from address Signed-off-by: Kaitlin Rupert diff -r dfd2ac2440a2 -r 30dd178dfe0f suites/libvirt-cim/lib/XenKvmLib/reporting.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Mon Aug 11 09:05:37 2008 -0700 @@ -0,0 +1,176 @@ +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Kaitlin Rupert +# +# 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 + +import os +import sys +import commands +import smtplib +from time import gmtime, strftime +from VirtLib import utils + +def get_cmd_val(cmd, ip): + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return "Unknown" + return out + +def get_libvirt_ver(ip): + libvirt_ver = "Unknown" + hyp_ver = "Unknown" + cmd = "virsh version" + virsh_ver = get_cmd_val(cmd, ip) + if virsh_ver != "Unknown": + if len(virsh_ver.splitlines()) == 4: + if virsh_ver.splitlines()[0].find("libvir"): + libvirt_ver = virsh_ver.splitlines()[0].split()[4] + + if virsh_ver.splitlines()[3].find("hypervisor"): + hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] + hyp_ver = hyp_ver.split(": ")[1] + + return libvirt_ver, hyp_ver + + +def get_cimom_ver(ip): + cimom = get_cmd_val("ps -ef | grep cimserver | grep -v grep", ip) + if cimom != "Unknown": + cimom = "Pegasus" + else: + cimom = get_cmd_val("ps -ef | grep sfcb | grep -v grep", ip) + if cimom != "Unknown": + cimom = "sfcb" + + if cimom == "Pegasus": + cimom_ver = get_cmd_val("cimserver -v", ip) + elif cimom == "sfcb": + cimom_ver = get_cmd_val("sfcbd -v", ip) + else: + cimom_ver = "unknown version" + + return cimom, cimom_ver + + +def get_env_data(rev, changeset, ip): + distro = get_cmd_val("cat /etc/issue | awk 'NR<=1'", ip) + kernel_ver = get_cmd_val("uname -r", ip) + + libvirt_ver, hyp_ver = get_libvirt_ver(ip) + + cimom, cimom_ver = get_cimom_ver(ip) + + env = "Distro: %s\nKernel: %s\nlibvirt: %s\nHypervisor: %s\nCIMOM: %s %s\n"\ + % (distro, kernel_ver, libvirt_ver, hyp_ver, cimom, cimom_ver) + + lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \ + (rev, changeset) + + return env + lc_ver + +def parse_run_output(log_file): + rvals = { 'PASS' : 0, + 'FAIL' : 0, + 'XFAIL' : 0, + 'SKIP' : 0, + } + + tstr = { 'PASS' : "", + 'FAIL' : "", + 'XFAIL' : "", + 'SKIP' : "", + } + + fd = open(log_file, "r") + + run_output = "" + for line in fd.xreadlines(): + for type, val in rvals.iteritems(): + if type in line: + if type == "FAIL" and "py: FAIL" not in line: + continue + rvals[type] += 1 + tstr[type] += "%s" % line + run_output += line + + fd.close() + + return rvals, tstr, run_output + +def build_report_body(rvals, tstr, div): + results = "" + test_total = 0 + for type, val in rvals.iteritems(): + results += " %s:\t%d\n" % (type, val) + test_total += val + + results_total = " -----------------\n Total:\t%d\n" % test_total + + test_block = "" + for type, str in tstr.iteritems(): + if type == "PASS" or str == "": + continue + test_block += "%s Test Summary:\n%s\n%s" % (type, str, div) + + return results, results_total, test_block + +def gen_report(rev, changeset, virt, ip, log_file): + date = strftime("%b %d %Y", gmtime()) + + cimom, cimom_ver = get_cimom_ver(ip) + + heading = "%s on %s Test Run Summary for %s" % (virt, cimom, date) + sys_env = get_env_data(rev, changeset, ip) + + divider = "=================================================\n" + + rvals, tstr, run_output = parse_run_output(log_file) + + res, res_total, test_block = build_report_body(rvals, tstr, divider) + + report = divider + heading + "\n" + divider + sys_env + divider + res \ + + res_total + divider + test_block + "Full report:\n" \ + + run_output + + fd = open(log_file, "w") + rc = fd.write(report) + if rc is not None: + print "Error %s writing report to: %s." % (rc, log_file) + fd.close() + + return report, heading + + +def send_report(to_addr, from_addr, relay, report, heading): + headers = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (from_addr, to_addr, + heading) + + message = headers + report + + try: + server = smtplib.SMTP(relay) + result = server.sendmail(from_addr, to_addr, message) + server.quit() + + if result: + for recip in result.keys(): + print "Could not deliver mail to: %s" % recip + + except Exception, details: + print "Encountered a problem mailing report: %s" % details + From kaitlin at linux.vnet.ibm.com Wed Aug 13 00:47:57 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 12 Aug 2008 17:47:57 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] #3 Add reporting capabilities Message-ID: This patch set will allow cimtest to generate reports. With a little extra help from a cron script, this can be used to do automated test runs. There will need to be a follow-up patch that includes the logger error info in the FAIL test block. From kaitlin at linux.vnet.ibm.com Wed Aug 13 00:48:00 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 12 Aug 2008 17:48:00 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: Message-ID: <5d79740edaf2e2f1d206.1218588480@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218470745 25200 # Node ID 5d79740edaf2e2f1d2062a0fad933a01a661dd50 # Parent 30dd178dfe0f86b01fe36d36166e7e6c024be6ba [TEST] #2 Add test report generation. Using the --report option, you can generate a report and have it mailed to the address supplied. How to call using the report option: ./runtests libvirt-cim -i localhost -c -d -v LXC -g VirtualSystemManagementService -t 01_definesystem_name.py --report The user will need to create a .cimtestrc file in their home directory in the following format: [email] relay = my.mail.relay.com from = Joe User Will need to add revision number support to cimtest and then add the cimtest revision number to the report. Updates: -Refactored reporting related pieces into their own library file Signed-off-by: Kaitlin Rupert diff -r 30dd178dfe0f -r 5d79740edaf2 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Mon Aug 11 09:05:37 2008 -0700 +++ b/suites/libvirt-cim/main.py Mon Aug 11 09:05:45 2008 -0700 @@ -29,12 +29,12 @@ sys.path.append('../../lib') import TestSuite import commands -from VirtLib import utils from VirtLib import groups -from CimTest.ReturnCodes import PASS, SKIP, XFAIL from CimTest.Globals import platform_sup sys.path.append('./lib') from XenKvmLib.classes import get_typed_class +import ConfigParser +from XenKvmLib.reporting import gen_report, send_report parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", @@ -54,8 +54,11 @@ help="Virt type, select from 'Xen' & 'KVM' & 'XenFV' & 'LXC'(default: Xen). ") parser.add_option("-d", "--debug-output", action="store_true", dest="debug", help="Duplicate the output to stderr") +parser.add_option("--report", dest="report", + help="Send report using mail info: --report=") TEST_SUITE = 'cimtest' +CIMTEST_RCFILE = '%s/.cimtestrc' % os.environ['HOME'] def set_python_path(): previous_pypath = os.environ.get('PYTHONPATH') @@ -82,6 +85,28 @@ print "Cleaned log files." +def get_rcfile_vals(): + if not os.access(CIMTEST_RCFILE, os.R_OK): + print "\nCould not access the %s file for this user." % CIMTEST_RCFILE + print "Create this file and add the appropriate relay:" + print "\tfrom = me at isp.com\n\trelay = my.relay\n" + return None, None + + try: + conf = ConfigParser.ConfigParser() + if not conf.read(CIMTEST_RCFILE): + return None, None + + addr = conf.get("email", "from") + relay = conf.get("email", "relay") + + except Exception, details: + print "\n%s" % details + print "\nPlease verify the format of the %s file\n" % CIMTEST_RCFILE + return None, None + + return addr, relay + def get_version(virt, ip): conn = WBEMConnection('http://%s' % ip, (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), @@ -101,7 +126,10 @@ def main(): (options, args) = parser.parse_args() - + to_addr = None + from_addr = None + relay = None + div = "--------------------------------------------------------------------" if options.test and not options.group: parser.print_help() @@ -114,7 +142,15 @@ os.environ['CIMOM_PORT'] = str(options.port) # - testsuite = TestSuite.TestSuite() + if options.report: + from_addr, relay = get_rcfile_vals() + + if from_addr == None or relay == None: + return 1 + + to_addr = options.report + + testsuite = TestSuite.TestSuite(log=True) set_python_path() @@ -139,9 +175,10 @@ revision, changeset = get_version(options.virt, options.ip) - print "Testing " + options.virt + " hypervisor" + print "\nTesting " + options.virt + " hypervisor" - for test in test_list: + for test in test_list: + testsuite.debug(div) t_path = os.path.join(TEST_SUITE, test['group']) os.environ['CIM_TC'] = test['test'] cdto = 'cd %s' % t_path @@ -155,7 +192,16 @@ testsuite.print_results(test['group'], test['test'], os_status, output) + testsuite.debug("%s\n" % div) testsuite.finish() + + msg_body, heading = gen_report(revision, changeset, options.virt, + options.ip, testsuite.log_file) + + if options.report: + print "Sending mail from %s to %s using %s relay.\n" % \ + (from_addr, to_addr, relay) + send_report(to_addr, from_addr, relay, msg_body, heading) if __name__ == '__main__': sys.exit(main()) From kaitlin at linux.vnet.ibm.com Wed Aug 13 00:47:58 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 12 Aug 2008 17:47:58 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] #2 Enable test infrastructure to support writing to a temporary file In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1218470726 25200 # Node ID dfd2ac2440a2543fffe6e8c6ae27445e14932ca0 # Parent 680b9475757c1576af1addae83645ab1d1bb6971 [TEST] #2 Enable test infrastructure to support writing to a temporary file. Allow the option to print to a file in addition to stdout. This will allow a test suite to read back the file after the test execution is complete. If a previous log exists at the start of the run, it is removed and a new one is created. Updates: -Add a new line at the end of each line when writing out to the log Signed-off-by: Kaitlin Rupert diff -r 680b9475757c -r dfd2ac2440a2 lib/Reporter.py --- a/lib/Reporter.py Thu Jul 31 15:17:28 2008 -0700 +++ b/lib/Reporter.py Mon Aug 11 09:05:26 2008 -0700 @@ -19,10 +19,13 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL + class Reporter: - def __init__(self, verbosity=1): + def __init__(self, verbosity=1, log_fd=None): self.verbosity = verbosity + self.log_fd = log_fd def __red(self, str): return "\033[01;31m%s\033[00m" % str @@ -36,11 +39,38 @@ def __blue(self, str): return "\033[01;34m%s\033[00m" % str - def __out(self, str): - """We might not always be just printing output to stdout, so this should - be used for all output.""" - # Right now we just mimic print. - print(str) + def __out(self, str, status, bug): + def no_color(string): + return string + + colors = { "FAIL" : self.__red, + "PASS" : self.__green, + "SKIP" : self.__yellow, + "XFAIL" : self.__blue, + } + + fn = colors.get(status, no_color) + + if status == XFAIL: + print "%s: %s\tBug: %s" % (str, fn(status), bug) + else: + print "%s: %s" % (str, fn(status)) + + if self.log_fd is not None: + if status == XFAIL: + self.log_fd.write("%s: %s\tBug: %s\n" % (str, status, bug)) + else: + self.log_fd.write("%s: %s\n" % (str, status)) + + def results(self, str, status, bug): + + rc = { FAIL : "FAIL", + PASS : "PASS", + SKIP : "SKIP", + XFAIL : "XFAIL" + } + + self.__out(str, rc[status], bug) def debug(self, level, str): """Produces debug output if appropriate for current verbosity level. @@ -49,20 +79,6 @@ priority output will be printed in the most levels, while low priority output will only be printed when verbosity is high.""" if level <= self.verbosity: - self.__out(str) + print str + self.log_fd.write("%s\n" % str) - def pass_test(self, test_name): - str = self.__green("PASS") - self.__out("%s: %s" % (test_name, str)) - - def fail_test(self, test_name): - str = self.__red("FAIL") - self.__out("%s: %s" % (test_name, str)) - - def xfail_test(self, test_name, bug): - str = self.__blue("XFAIL") - self.__out("%s: %s\tBug: %s" % (test_name, str, bug)) - - def skip_test(self, test_name): - str = self.__yellow("SKIP") - self.__out("%s: %s" % (test_name, str)) diff -r 680b9475757c -r dfd2ac2440a2 lib/TestSuite.py --- a/lib/TestSuite.py Thu Jul 31 15:17:28 2008 -0700 +++ b/lib/TestSuite.py Mon Aug 11 09:05:26 2008 -0700 @@ -24,48 +24,59 @@ DEFAULT_RPC_URL = "http://morbo.linux.ibm.com/xenotest/testrun/api" +DEFAULT_LOG_FILE = "run_report.txt" + import Reporter import re +import os +from CimTest.ReturnCodes import PASS, FAIL, XFAIL, SKIP class TestSuite: """Test Suite class to make the output of driving test suites a bit more consistant""" - def __init__(self): - self.rep = Reporter.Reporter(verbosity=5) + def __init__(self, log=False, file_name=None): + if log == True: + if file_name is None: + self.log_file = DEFAULT_LOG_FILE + else: + self.log_file = file_name - def ok(self, group, test, output=""): - self.rep.pass_test("%s - %s" % (group, test)) + if os.path.exists(self.log_file): + os.remove(self.log_file) + self.log_fd = open(self.log_file, "w") + else: + self.log_file = None + self.log_fd = None - def skip(self, group, test, output=""): - self.rep.skip_test("%s - %s" % (group, test)) + self.rep = Reporter.Reporter(verbosity=5, log_fd=self.log_fd) + + def print_results(self, group, test, status, output=""): + bug = None + if status == XFAIL: + err = "Test error: returned XFAIL without a valid bug string." + bug = err + if len(output) > 0: + try: + str = re.search('Bug:<[0-9]*>', output).group() + bug = re.search("Bug:<([0-9]+)>", str).group(1) + if len(str) > 0: + if output == str: + #No need to pring bug twice + output = "" + except: + #If we hit a problem, make sure bug = error msg + bug = err + + self.rep.results("%s - %s" % (group, test), status, bug) if output: self.rep.debug(1, output) - def fail(self, group, test, output=""): - self.rep.fail_test("%s - %s" % (group, test)) - if output: - self.rep.debug(1, output) - - def xfail(self, group, test, output=""): - err = "Test error: returned XFAIL without a valid bug string." - bug = err - if len(output) > 0: - try: - str = re.search('Bug:<[0-9]*>', output).group() - bug = re.search("Bug:<([0-9]+)>", str).group(1) - if len(str) > 0: - if output == str: - #No need to pring bug twice - output = "" - except: - #If we hit a problem, make sure bug is equal to the error msg - bug = err - self.rep.xfail_test("%s - %s" % (group, test), bug) - if output: - self.rep.debug(1, output) + def debug(self, str): + self.rep.debug(1, str) def finish(self): - pass + if self.log_fd is not None: + self.log_fd.close() class RPCTestSuite: """Test Suite class to make the output of driving test suites a bit more consistant diff -r 680b9475757c -r dfd2ac2440a2 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Thu Jul 31 15:17:28 2008 -0700 +++ b/suites/libvirt-cim/main.py Mon Aug 11 09:05:26 2008 -0700 @@ -153,14 +153,7 @@ os_status = os.WEXITSTATUS(status) - if os_status == PASS: - testsuite.ok(test['group'], test['test']) - elif os_status == SKIP: - testsuite.skip(test['group'], test['test'], output) - elif os_status == XFAIL: - testsuite.xfail(test['group'], test['test'], output) - else: - testsuite.fail(test['group'], test['test'], output) + testsuite.print_results(test['group'], test['test'], os_status, output) testsuite.finish() From yunguol at cn.ibm.com Wed Aug 13 02:00:23 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 12 Aug 2008 19:00:23 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix VSMS-05_destroysystem_neg.py to work for both Pegasus and sfcb Message-ID: # HG changeset patch # User Guolian Yun # Date 1218592814 25200 # Node ID c6f6da023a564a0e9fdb33d5aec72af269238a3d # Parent d1c7391bcfe9f1ab85effa7e8fa5c21063c8e1f7 [TEST] #2 Fix VSMS-05_destroysystem_neg.py to work for both Pegasus and sfcb Signed-off-by: Guolian Yun diff -r d1c7391bcfe9 -r c6f6da023a56 suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Tue Aug 12 04:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Tue Aug 12 19:00:14 2008 -0700 @@ -45,8 +45,7 @@ keybindings = {'CreationClassName':classname}) exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, - 'desc' : 'CIM_ERR_FAILED: Unable to retrieve domain\ - name.' + 'desc' : 'Unable to retrieve domain name.' } elif tc == 'nonexistent': @@ -55,7 +54,7 @@ 'CreationClassName':classname}) exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, - 'desc' : 'CIM_ERR_FAILED: Failed to find domain' + 'desc' : 'Failed to find domain' } else: @@ -68,7 +67,7 @@ except Exception, details: err_no = details[0] err_desc = details[1] - if err_no == exp_value['rc'] and err_desc == exp_value['desc']: + if err_no == exp_value['rc'] and err_desc.find(exp_value['desc']) >= 0: logger.error("For Invalid Scenario '%s'", tc) logger.info('Got expected error no: %s', err_no) logger.info('Got expected error desc: %s',err_desc) From yunguol at cn.ibm.com Wed Aug 13 02:10:59 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 12 Aug 2008 19:10:59 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Just check the error number, fix ResourcePoolConfigurationService.03, 04, 06&07 to work for both Pegasus and sfcb Message-ID: # HG changeset patch # User Guolian Yun # Date 1218593453 25200 # Node ID f476a9817c6f5c6140567f3d144c412e7afe494a # Parent d1c7391bcfe9f1ab85effa7e8fa5c21063c8e1f7 [TEST] #2 Just check the error number, fix ResourcePoolConfigurationService.03,04,06&07 to work for both Pegasus and sfcb The Pegasus and sfcb return the same error code in this case, but different in error description. For this specific, we just to check the error number Signed-off-by: Guolian Yun diff -r d1c7391bcfe9 -r f476a9817c6f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py Tue Aug 12 04:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/03_CreateResourcePool.py Tue Aug 12 19:10:53 2008 -0700 @@ -47,7 +47,6 @@ from XenKvmLib.classes import get_typed_class cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED -cim_desc = "CIM_ERR_NOT_SUPPORTED" cim_mname = "CreateResourcePool" @@ -59,7 +58,7 @@ try: rpcs_conn.CreateResourcePool() except pywbem.CIMError, (err_no, desc): - if err_no == cim_errno and desc.find(cim_desc) >= 0 : + if err_no == cim_errno : logger.info("Got expected exception for '%s' service", cim_mname) logger.info("Errno is '%s' ", err_no) logger.info("Error string is '%s'", desc) diff -r d1c7391bcfe9 -r f476a9817c6f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Aug 12 04:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Aug 12 19:10:53 2008 -0700 @@ -56,7 +56,6 @@ from XenKvmLib.classes import get_typed_class cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED -cim_desc = "CIM_ERR_NOT_SUPPORTED" cim_mname = "CreateChildResourcePool" @do_main(platform_sup) @@ -67,7 +66,7 @@ try: rpcs_conn.CreateChildResourcePool() except pywbem.CIMError, (err_no, desc): - if err_no == cim_errno and desc.find(cim_desc) >= 0 : + if err_no == cim_errno : logger.info("Got expected exception for '%s' service", cim_mname) logger.info("Errno is '%s' ", err_no) logger.info("Error string is '%s'", desc) diff -r d1c7391bcfe9 -r f476a9817c6f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Tue Aug 12 04:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/06_RemoveResourcesFromResourcePool.py Tue Aug 12 19:10:53 2008 -0700 @@ -54,7 +54,6 @@ from XenKvmLib.classes import get_typed_class cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED -cim_desc = "CIM_ERR_NOT_SUPPORTED" cim_mname = "RemoveResourcesFromResourcePool" @do_main(platform_sup) @@ -65,7 +64,7 @@ try: rpcs_conn.RemoveResourcesFromResourcePool() except pywbem.CIMError, (err_no, desc): - if err_no == cim_errno and desc.find(cim_desc) >= 0 : + if err_no == cim_errno : logger.info("Got expected exception for '%s' service", cim_mname) logger.info("Errno is '%s' ", err_no) logger.info("Error string is '%s'", desc) diff -r d1c7391bcfe9 -r f476a9817c6f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Tue Aug 12 04:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/07_DeleteResourcePool.py Tue Aug 12 19:10:53 2008 -0700 @@ -50,7 +50,6 @@ from XenKvmLib.classes import get_typed_class cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED -cim_desc = "CIM_ERR_NOT_SUPPORTED" cim_mname = "DeleteResourcePool" @do_main(platform_sup) @@ -61,7 +60,7 @@ try: rpcs_conn.DeleteResourcePool() except pywbem.CIMError, (err_no, desc): - if err_no == cim_errno and desc.find(cim_desc) >= 0 : + if err_no == cim_errno : logger.info("Got expected exception for '%s' service", cim_mname) logger.info("Errno is '%s' ", err_no) logger.info("Error string is '%s'", desc) From yunguol at cn.ibm.com Wed Aug 13 02:33:50 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 12 Aug 2008 19:33:50 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSMS - 06_addresource.py to support XenFV Message-ID: # HG changeset patch # User Guolian Yun # Date 1218594821 25200 # Node ID e4b5b9850a661c9a16fbc2b8d7fc31e5a78ec6c6 # Parent d1c7391bcfe9f1ab85effa7e8fa5c21063c8e1f7 [TEST] Update VSMS - 06_addresource.py to support XenFV Signed-off-by: Guolian Yun diff -r d1c7391bcfe9 -r e4b5b9850a66 suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py Tue Aug 12 04:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py Tue Aug 12 19:33:41 2008 -0700 @@ -34,7 +34,7 @@ from XenKvmLib import vsms_util from XenKvmLib.common_util import create_netpool_conf, destroy_netpool -sup_types = ['Xen', 'KVM'] +sup_types = ['Xen', 'KVM', 'XenFV'] default_dom = 'rstest_domain' nmac = '99:aa:bb:cc:ee:ff' ntype = 'network' From deeptik at linux.vnet.ibm.com Wed Aug 13 06:47:16 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 13 Aug 2008 12:17:16 +0530 Subject: [Libvirt-cim] CimTest Report for KVM on F9 13-08-2008 Message-ID: <48A28374.40007@linux.vnet.ibm.com> ======================================================================== CIM Test Report for KVM on F9 with latest libvirt-cim and libcmpiutil ======================================================================== Distro : Fedora 9 Beta Kernel : 2.6.25-0.121.rc5.git4.fc9 Libvirt : libvirt-0.4.2-1.fc9.x86_64 CIMOM : pegasus PyWBEM : pywbem-0.6 CIM Schema : cimv216Experimental LibCMPIutil : 83 LibVirtCIM : 665 CIMTEST : 299 ======================================================= PASS : 125 FAIL : 1 ACUTAL FAILED : 0 XFAIL : 2 SKIP : 6 ACTUAL SKIPPED : 4 --------------------- Total : 134 ======================================================= Here is one of the tc that failed, this tc passed when ran manually: VirtualSystemManagementService - 06_addresource.py: FAIL The following skipped tc passed when run manually: ComputerSystem - 22_define_suspend.py: SKIP ComputerSystem - 40_RSC_start.py: SKIP Here is the list of tc that skipped : VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP Below is the list of tc that XFAIL : ComputerSystem - 32_start_reboot.py: XFAIL Bug: 00005 ComputerSystem - 33_suspend_reboot.py: XFAIL Bug: 00005 These are XFailing as the libvirt does not yet support rebooting a KVM guest. Please find the complete report attached with the mail. Thanks and Regards, Deepti. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Aug13-KVM-report URL: From yunguol at cn.ibm.com Wed Aug 13 09:36:59 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 13 Aug 2008 17:36:59 +0800 Subject: [Libvirt-cim] Cimtest Report for LXC on Fedora 9 (2008/08/13) Message-ID: Distro : Fedora 9 Kernel : kernel-2.6.25-0.121.rc5.git4.fc9.x86_64 Libvirt : libvirt-0.4.4 CIMOM : sblim-sfcb-1.3.0 PyWBEM : pywbem-0.6 CIM Schema : cimv216Experimental LibCMPIutil : 83 LibVirtCIM : 665 CIMTEST : 299 ================================================================== PASS : 97 XFAIL : 3 FAIL : 2 SKIP : 34 ----------------- Total : 134 ======================CIMTEST FAIL REPORT================================= VirtualSystemManagementService - 10_hv_version.py: FAIL ERROR - CIM says version is `%s', but libvirt says `%s' VirtualSystemManagementService - 12_referenced_config.py: FAIL ERROR - EnabledState is 3 instead of 2. ERROR - Try to increase the timeout and run the test again ERROR - Unable to start rstest_domain ERROR - Unable to start rstest_domain ======================CIMTEST FULL REPORT================================== AllocationCapabilities - 01_enum.py: PASS AllocationCapabilities - 02_alloccap_gi_errs.py: PASS ComputerSystem - 01_enum.py: PASS ComputerSystem - 02_nosystems.py: PASS ComputerSystem - 03_defineVS.py: PASS ComputerSystem - 04_defineStartVS.py: PASS ComputerSystem - 05_activate_defined_start.py: PASS ComputerSystem - 06_paused_active_suspend.py: SKIP ComputerSystem - 22_define_suspend.py: PASS ComputerSystem - 23_suspend_suspend.py: SKIP ComputerSystem - 27_define_suspend_errs.py: PASS ComputerSystem - 32_start_reboot.py: SKIP ComputerSystem - 33_suspend_reboot.py: SKIP ComputerSystem - 35_start_reset.py: SKIP ComputerSystem - 40_RSC_start.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystem - 42_cs_gi_errs.py: PASS ComputerSystemIndication - 01_created_indication.py: SKIP ElementAllocatedFromPool - 01_forward.py: PASS ElementAllocatedFromPool - 02_reverse.py: PASS ElementAllocatedFromPool - 03_reverse_errs.py: SKIP ElementAllocatedFromPool - 04_forward_errs.py: SKIP ElementCapabilities - 01_forward.py: PASS ElementCapabilities - 02_reverse.py: PASS ElementCapabilities - 03_forward_errs.py: PASS ElementCapabilities - 04_reverse_errs.py: PASS ElementCapabilities - 05_hostsystem_cap.py: PASS ElementConforms - 01_forward.py: PASS ElementConforms - 02_reverse.py: PASS ElementConforms - 03_ectp_fwd_errs.py: PASS ElementConforms - 04_ectp_rev_errs.py: PASS ElementSettingData - 01_forward.py: PASS ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS EnabledLogicalElementCapabilities - 01_enum.py: PASS EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS HostSystem - 01_enum.py: PASS HostSystem - 02_hostsystem_to_rasd.py: PASS HostSystem - 03_hs_to_settdefcap.py: PASS HostSystem - 04_hs_to_EAPF.py: PASS HostSystem - 05_hs_gi_errs.py: PASS HostSystem - 06_hs_to_vsms.py: PASS HostedDependency - 01_forward.py: PASS HostedDependency - 02_reverse.py: PASS HostedDependency - 03_enabledstate.py: SKIP HostedDependency - 04_reverse_errs.py: PASS HostedResourcePool - 01_forward.py: PASS HostedResourcePool - 02_reverse.py: PASS HostedResourcePool - 03_forward_errs.py: PASS HostedResourcePool - 04_reverse_errs.py: PASS HostedService - 01_forward.py: PASS HostedService - 02_reverse.py: PASS HostedService - 03_forward_errs.py: PASS HostedService - 04_reverse_errs.py: PASS LogicalDisk - 01_disk.py: SKIP LogicalDisk - 02_nodevs.py: PASS LogicalDisk - 03_ld_gi_errs.py: SKIP Memory - 01_memory.py: PASS Memory - 02_defgetmem.py: PASS Memory - 03_mem_gi_errs.py: PASS NetworkPort - 01_netport.py: SKIP NetworkPort - 02_np_gi_errors.py: PASS NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: SKIP Processor - 02_definesys_get_procs.py: SKIP Processor - 03_proc_gi_errs.py: SKIP Profile - 01_enum.py: PASS Profile - 02_profile_to_elec.py: SKIP Profile - 03_rprofile_gi_errs.py: PASS RASD - 01_verify_rasd_fields.py: PASS RASD - 02_enum.py: PASS RASD - 03_rasd_errs.py: PASS RASD - 04_disk_rasd_size.py: SKIP ReferencedProfile - 01_verify_refprof.py: PASS ReferencedProfile - 02_refprofile_errs.py: PASS ResourceAllocationFromPool - 01_forward.py: PASS ResourceAllocationFromPool - 02_reverse.py: PASS ResourceAllocationFromPool - 03_forward_errs.py: PASS ResourceAllocationFromPool - 04_reverse_errs.py: PASS ResourceAllocationFromPool - 05_RAPF_err.py: SKIP ResourcePool - 01_enum.py: PASS ResourcePool - 02_rp_gi_errors.py: PASS ResourcePoolConfigurationCapabilities - 01_enum.py: PASS ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS ResourcePoolConfigurationService - 01_enum.py: PASS ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP SettingsDefine - 01_forward.py: PASS SettingsDefine - 02_reverse.py: PASS SettingsDefine - 03_sds_fwd_errs.py: PASS SettingsDefine - 04_sds_rev_errs.py: PASS SettingsDefineCapabilities - 01_forward.py: PASS SettingsDefineCapabilities - 03_forward_errs.py: XFAIL Bug: Test error: returned XFAIL without a valid bug string. ERROR - 'LXC_SettingsDefineCapabilities' association failed to generate an exception and 'WrongClassName' passed. ERROR - ------ FAILED: Invalid CCName Key Name.------ Bug:<> SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS SystemDevice - 01_forward.py: PASS SystemDevice - 02_reverse.py: PASS SystemDevice - 03_fwderrs.py: PASS VSSD - 01_enum.py: PASS VSSD - 02_bootldr.py: SKIP VSSD - 03_vssd_gi_errs.py: PASS VSSD - 04_vssd_to_rasd.py: PASS VirtualSystemManagementCapabilities - 01_enum.py: PASS VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS VirtualSystemManagementService - 01_definesystem_name.py: PASS VirtualSystemManagementService - 02_destroysystem.py: PASS VirtualSystemManagementService - 03_definesystem_ess.py: PASS VirtualSystemManagementService - 04_definesystem_ers.py: PASS VirtualSystemManagementService - 05_destroysystem_neg.py: PASS VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemManagementService - 07_addresource_neg.py: PASS VirtualSystemManagementService - 08_modifyresource.py: SKIP VirtualSystemManagementService - 09_procrasd_persist.py: SKIP VirtualSystemManagementService - 10_hv_version.py: FAIL ERROR - CIM says version is `%s', but libvirt says `%s' VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP VirtualSystemManagementService - 12_referenced_config.py: FAIL ERROR - EnabledState is 3 instead of 2. ERROR - Try to increase the timeout and run the test again ERROR - Unable to start rstest_domain ERROR - Unable to start rstest_domain VirtualSystemMigrationCapabilities - 01_enum.py: PASS VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP VirtualSystemMigrationSettingData - 01_enum.py: PASS VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS VirtualSystemSettingDataComponent - 01_forward.py: PASS VirtualSystemSettingDataComponent - 02_reverse.py: PASS VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS VirtualSystemSnapshotService - 01_enum.py: PASS VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Aug 13 11:13:41 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 13 Aug 2008 19:13:41 +0800 Subject: [Libvirt-cim] Cimtest Report for LXC on Fedora 9 (2008/08/13) In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-13 17:36:59: > > Distro : Fedora 9 > Kernel : kernel-2.6.25-0.121.rc5.git4.fc9.x86_64 > Libvirt : libvirt-0.4.4 > CIMOM : sblim-sfcb-1.3.0 > PyWBEM : pywbem-0.6 > CIM Schema : cimv216Experimental > LibCMPIutil : 83 > LibVirtCIM : 665 > CIMTEST : 299 > ================================================================== > PASS : 97 > XFAIL : 3 > FAIL : 2 > SKIP : 34 > ----------------- > Total : 134 > > ======================CIMTEST FAIL REPORT================================= > VirtualSystemManagementService - 10_hv_version.py: FAIL > ERROR - CIM says version is `%s', but libvirt says `%s' This fails because of get version error by LXC hypervisor. CIM says version is `LXC 0.0.0', but libvirt says `libvir: error : this function is not supported by the hypervisor: virConnectGetVersion Below command even doesn't work manually on my machine. #virsh -c lxc version | grep ^Running | cut -d ' ' -f 3,4 libvir: error : this function is not supported by the hypervisor: virConnectGetVersion error: failed to get the hypervisor version virConnectGetVersion() doesn't support LXC? The qemu works for me on the same machine. #virsh -c qemu:///system version | grep ^Running | cut -d ' ' -f 3,4 #QEMU 0.9.1 > > VirtualSystemManagementService - 12_referenced_config.py: FAIL > ERROR - EnabledState is 3 instead of 2. > ERROR - Try to increase the timeout and run the test again > ERROR - Unable to start rstest_domain > ERROR - Unable to start rstest_domain > This fails because that the define domain can't be started. Here is the dumpxml of the test domain: rstest_domain 80ccbf55-dba0-461b-b23f-90a335503680 /tmp/cimtest_lxc_init 524288 > ======================CIMTEST FULL REPORT================================== > AllocationCapabilities - 01_enum.py: PASS > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > ComputerSystem - 01_enum.py: PASS > ComputerSystem - 02_nosystems.py: PASS > ComputerSystem - 03_defineVS.py: PASS > ComputerSystem - 04_defineStartVS.py: PASS > ComputerSystem - 05_activate_defined_start.py: PASS > ComputerSystem - 06_paused_active_suspend.py: SKIP > ComputerSystem - 22_define_suspend.py: PASS > ComputerSystem - 23_suspend_suspend.py: SKIP > ComputerSystem - 27_define_suspend_errs.py: PASS > ComputerSystem - 32_start_reboot.py: SKIP > ComputerSystem - 33_suspend_reboot.py: SKIP > ComputerSystem - 35_start_reset.py: SKIP > ComputerSystem - 40_RSC_start.py: SKIP > ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP > ComputerSystem - 42_cs_gi_errs.py: PASS > ComputerSystemIndication - 01_created_indication.py: SKIP > ElementAllocatedFromPool - 01_forward.py: PASS > ElementAllocatedFromPool - 02_reverse.py: PASS > ElementAllocatedFromPool - 03_reverse_errs.py: SKIP > ElementAllocatedFromPool - 04_forward_errs.py: SKIP > ElementCapabilities - 01_forward.py: PASS > ElementCapabilities - 02_reverse.py: PASS > ElementCapabilities - 03_forward_errs.py: PASS > ElementCapabilities - 04_reverse_errs.py: PASS > ElementCapabilities - 05_hostsystem_cap.py: PASS > ElementConforms - 01_forward.py: PASS > ElementConforms - 02_reverse.py: PASS > ElementConforms - 03_ectp_fwd_errs.py: PASS > ElementConforms - 04_ectp_rev_errs.py: PASS > ElementSettingData - 01_forward.py: PASS > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > EnabledLogicalElementCapabilities - 01_enum.py: PASS > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > HostSystem - 01_enum.py: PASS > HostSystem - 02_hostsystem_to_rasd.py: PASS > HostSystem - 03_hs_to_settdefcap.py: PASS > HostSystem - 04_hs_to_EAPF.py: PASS > HostSystem - 05_hs_gi_errs.py: PASS > HostSystem - 06_hs_to_vsms.py: PASS > HostedDependency - 01_forward.py: PASS > HostedDependency - 02_reverse.py: PASS > HostedDependency - 03_enabledstate.py: SKIP > HostedDependency - 04_reverse_errs.py: PASS > HostedResourcePool - 01_forward.py: PASS > HostedResourcePool - 02_reverse.py: PASS > HostedResourcePool - 03_forward_errs.py: PASS > HostedResourcePool - 04_reverse_errs.py: PASS > HostedService - 01_forward.py: PASS > HostedService - 02_reverse.py: PASS > HostedService - 03_forward_errs.py: PASS > HostedService - 04_reverse_errs.py: PASS > LogicalDisk - 01_disk.py: SKIP > LogicalDisk - 02_nodevs.py: PASS > LogicalDisk - 03_ld_gi_errs.py: SKIP > Memory - 01_memory.py: PASS > Memory - 02_defgetmem.py: PASS > Memory - 03_mem_gi_errs.py: PASS > NetworkPort - 01_netport.py: SKIP > NetworkPort - 02_np_gi_errors.py: PASS > NetworkPort - 03_user_netport.py: SKIP > Processor - 01_processor.py: SKIP > Processor - 02_definesys_get_procs.py: SKIP > Processor - 03_proc_gi_errs.py: SKIP > Profile - 01_enum.py: PASS > Profile - 02_profile_to_elec.py: SKIP > Profile - 03_rprofile_gi_errs.py: PASS > RASD - 01_verify_rasd_fields.py: PASS > RASD - 02_enum.py: PASS > RASD - 03_rasd_errs.py: PASS > RASD - 04_disk_rasd_size.py: SKIP > ReferencedProfile - 01_verify_refprof.py: PASS > ReferencedProfile - 02_refprofile_errs.py: PASS > ResourceAllocationFromPool - 01_forward.py: PASS > ResourceAllocationFromPool - 02_reverse.py: PASS > ResourceAllocationFromPool - 03_forward_errs.py: PASS > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > ResourceAllocationFromPool - 05_RAPF_err.py: SKIP > ResourcePool - 01_enum.py: PASS > ResourcePool - 02_rp_gi_errors.py: PASS > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > ResourcePoolConfigurationService - 01_enum.py: PASS > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP > SettingsDefine - 01_forward.py: PASS > SettingsDefine - 02_reverse.py: PASS > SettingsDefine - 03_sds_fwd_errs.py: PASS > SettingsDefine - 04_sds_rev_errs.py: PASS > SettingsDefineCapabilities - 01_forward.py: PASS > SettingsDefineCapabilities - 03_forward_errs.py: XFAIL Bug: Test > error: returned XFAIL without a valid bug string. > ERROR - 'LXC_SettingsDefineCapabilities' association failed to > generate an exception and 'WrongClassName' passed. > ERROR - ------ FAILED: Invalid CCName Key Name.------ > Bug:<> > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS > SystemDevice - 01_forward.py: PASS > SystemDevice - 02_reverse.py: PASS > SystemDevice - 03_fwderrs.py: PASS > VSSD - 01_enum.py: PASS > VSSD - 02_bootldr.py: SKIP > VSSD - 03_vssd_gi_errs.py: PASS > VSSD - 04_vssd_to_rasd.py: PASS > VirtualSystemManagementCapabilities - 01_enum.py: PASS > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > VirtualSystemManagementService - 01_definesystem_name.py: PASS > VirtualSystemManagementService - 02_destroysystem.py: PASS > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > VirtualSystemManagementService - 06_addresource.py: SKIP > VirtualSystemManagementService - 07_addresource_neg.py: PASS > VirtualSystemManagementService - 08_modifyresource.py: SKIP > VirtualSystemManagementService - 09_procrasd_persist.py: SKIP > VirtualSystemManagementService - 10_hv_version.py: FAIL > ERROR - CIM says version is `%s', but libvirt says `%s' > VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP > VirtualSystemManagementService - 12_referenced_config.py: FAIL > ERROR - EnabledState is 3 instead of 2. > ERROR - Try to increase the timeout and run the test again > ERROR - Unable to start rstest_domain > ERROR - Unable to start rstest_domain > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > VirtualSystemMigrationSettingData - 01_enum.py: PASS > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > VirtualSystemSettingDataComponent - 01_forward.py: PASS > VirtualSystemSettingDataComponent - 02_reverse.py: PASS > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS > VirtualSystemSnapshotService - 01_enum.py: PASS > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS > > > Best, > Regards > > Daisy (???) > VSM Team, China Systems & Technology Labs (CSTL) > E-mail: yunguol at cn.ibm.com > TEL: (86)-21-60922403 > Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Aug 13 11:34:59 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 13 Aug 2008 19:34:59 +0800 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: <5d79740edaf2e2f1d206.1218588480@elm3b41.beaverton.ibm.com> Message-ID: Kaitlin, Here is a test report generation. Please fix whitespace in XFAIL and Total count. Thanks! ================================================= LXC on sfcb Test Run Summary for Aug 13 2008 ================================================= Distro: Fedora release 8.92 (Rawhide) Kernel: 2.6.26-rc2-mm1-netns libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.0 Libvirt-cim revision: 656 Libvirt-cim changeset: dbdf9a5fce21 ================================================= FAIL: 0 XFAIL: 0 SKIP: 8 PASS: 7 ----------------- Total: 15 ================================================= SKIP Test Summary: ComputerSystem - 06_paused_active_suspend.py: SKIP ComputerSystem - 22_define_suspend.py: SKIP ComputerSystem - 23_suspend_suspend.py: SKIP ComputerSystem - 32_start_reboot.py: SKIP ComputerSystem - 33_suspend_reboot.py: SKIP ComputerSystem - 35_start_reset.py: SKIP ComputerSystem - 40_RSC_start.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ================================================= Full report: -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: PASS -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: SKIP -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: SKIP ERROR - Exception: (1, u'Domain not running') ERROR - Need to give different bridge name since it already exists InvokeMethod(RequestStateChange): Domain not running -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: SKIP -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS InvokeMethod(RequestStateChange): Domain not running -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: SKIP -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: SKIP -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: SKIP -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: SKIP -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-13 08:48:00: > # HG changeset patch > # User Kaitlin Rupert > # Date 1218470745 25200 > # Node ID 5d79740edaf2e2f1d2062a0fad933a01a661dd50 > # Parent 30dd178dfe0f86b01fe36d36166e7e6c024be6ba > [TEST] #2 Add test report generation. > > Using the --report option, you can generate a report and have it > mailed to the address supplied. > > How to call using the report option: > > ./runtests libvirt-cim -i localhost -c -d -v LXC -g > VirtualSystemManagementService -t 01_definesystem_name.py --report > > > The user will need to create a .cimtestrc file in their home > directory in the following format: > > [email] > relay = my.mail.relay.com > from = Joe User > > Will need to add revision number support to cimtest and then add the > cimtest revision number to the report. > > Updates: > -Refactored reporting related pieces into their own library file > > Signed-off-by: Kaitlin Rupert > > diff -r 30dd178dfe0f -r 5d79740edaf2 suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Mon Aug 11 09:05:37 2008 -0700 > +++ b/suites/libvirt-cim/main.py Mon Aug 11 09:05:45 2008 -0700 > @@ -29,12 +29,12 @@ > sys.path.append('../../lib') > import TestSuite > import commands > -from VirtLib import utils > from VirtLib import groups > -from CimTest.ReturnCodes import PASS, SKIP, XFAIL > from CimTest.Globals import platform_sup > sys.path.append('./lib') > from XenKvmLib.classes import get_typed_class > +import ConfigParser > +from XenKvmLib.reporting import gen_report, send_report > > parser = OptionParser() > parser.add_option("-i", "--ip", dest="ip", default="localhost", > @@ -54,8 +54,11 @@ > help="Virt type, select from 'Xen' & 'KVM' & > 'XenFV' & 'LXC'(default: Xen). ") > parser.add_option("-d", "--debug-output", action="store_true", dest="debug", > help="Duplicate the output to stderr") > +parser.add_option("--report", dest="report", > + help="Send report using mail info: -- > report=") > > TEST_SUITE = 'cimtest' > +CIMTEST_RCFILE = '%s/.cimtestrc' % os.environ['HOME'] > > def set_python_path(): > previous_pypath = os.environ.get('PYTHONPATH') > @@ -82,6 +85,28 @@ > > print "Cleaned log files." > > +def get_rcfile_vals(): > + if not os.access(CIMTEST_RCFILE, os.R_OK): > + print "\nCould not access the %s file for this user." % > CIMTEST_RCFILE > + print "Create this file and add the appropriate relay:" > + print "\tfrom = me at isp.com\n\trelay = my.relay\n" > + return None, None > + > + try: > + conf = ConfigParser.ConfigParser() > + if not conf.read(CIMTEST_RCFILE): > + return None, None > + > + addr = conf.get("email", "from") > + relay = conf.get("email", "relay") > + > + except Exception, details: > + print "\n%s" % details > + print "\nPlease verify the format of the %s file\n" % CIMTEST_RCFILE > + return None, None > + > + return addr, relay > + > def get_version(virt, ip): > conn = WBEMConnection('http://%s' % ip, > (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), > @@ -101,7 +126,10 @@ > > def main(): > (options, args) = parser.parse_args() > - > + to_addr = None > + from_addr = None > + relay = None > + div = > "--------------------------------------------------------------------" > > if options.test and not options.group: > parser.print_help() > @@ -114,7 +142,15 @@ > os.environ['CIMOM_PORT'] = str(options.port) > # > > - testsuite = TestSuite.TestSuite() > + if options.report: > + from_addr, relay = get_rcfile_vals() > + > + if from_addr == None or relay == None: > + return 1 > + > + to_addr = options.report > + > + testsuite = TestSuite.TestSuite(log=True) > > set_python_path() > > @@ -139,9 +175,10 @@ > > revision, changeset = get_version(options.virt, options.ip) > > - print "Testing " + options.virt + " hypervisor" > + print "\nTesting " + options.virt + " hypervisor" > > - for test in test_list: > + for test in test_list: > + testsuite.debug(div) > t_path = os.path.join(TEST_SUITE, test['group']) > os.environ['CIM_TC'] = test['test'] > cdto = 'cd %s' % t_path > @@ -155,7 +192,16 @@ > > testsuite.print_results(test['group'], test['test'], > os_status, output) > > + testsuite.debug("%s\n" % div) > testsuite.finish() > + > + msg_body, heading = gen_report(revision, changeset, options.virt, > + options.ip, testsuite.log_file) > + > + if options.report: > + print "Sending mail from %s to %s using %s relay.\n" % \ > + (from_addr, to_addr, relay) > + send_report(to_addr, from_addr, relay, msg_body, heading) > > if __name__ == '__main__': > sys.exit(main()) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Aug 13 11:48:07 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 13 Aug 2008 04:48:07 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix logger error in VSMS - 10_hv_version.py Message-ID: <2733481ee6603800a4ba.1218628087@elm3b41.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1218628069 25200 # Node ID 2733481ee6603800a4ba143d3ec467326f51692e # Parent d1c7391bcfe9f1ab85effa7e8fa5c21063c8e1f7 [TEST] Fix logger error in VSMS - 10_hv_version.py Signed-off-by: Guolian Yun diff -r d1c7391bcfe9 -r 2733481ee660 suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Tue Aug 12 04:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Wed Aug 13 04:47:49 2008 -0700 @@ -49,7 +49,8 @@ local_ver = live.get_hv_ver(options.ip, options.virt) if cim_ver != local_ver: - logger.error("CIM says version is `%s', but libvirt says `%s'") + logger.error("CIM says version is `%s', but libvirt says `%s'" \ + % (cim_ver, local_ver)) return FAIL else: logger.info("Verified %s == %s" % (cim_ver, local_ver)) From deeptik at linux.vnet.ibm.com Wed Aug 13 12:47:47 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 13 Aug 2008 05:47:47 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fixing 04_hs_to_EAPF.py tc Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1218631664 25200 # Node ID d408db44715b1e88637a9b0248c5f5b05919c3bf # Parent d1c7391bcfe9f1ab85effa7e8fa5c21063c8e1f7 [TEST] #2 Fixing 04_hs_to_EAPF.py tc. Changes: ------- Patch 2: -------- 1) Improved the pool_init_list() function. 2) Moved the logic for creating the input pool list to pool_init_list(). Patch 1: -------- 1) Fixed the 04_hs_to_EAPF.py tc. 2) Set test_disk appropriately. 3) Improved pool_init_list() fn to include only pool info belonging to which the VS belongs. 4) Cleaned up unnecessary declarations and import stmt. 5) Replaced create_diskpool_file() function to create a DiskPool, with create_diskpool_conf() which calls either creating of diskconf file or using the diskpool depending on the version of the libvirt on the machine. Tested with Xen, XenFV and KVM on latest sources. This tc might not work on LXC with these changes. Signed-off-by: Deepti B. Kalakeri diff -r d1c7391bcfe9 -r d408db44715b suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Tue Aug 12 04:11:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Wed Aug 13 05:47:44 2008 -0700 @@ -59,8 +59,8 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL, SKIP from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.logicaldevices import verify_device_values -from XenKvmLib.common_util import cleanup_restore, test_dpath, \ -create_diskpool_file, create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import cleanup_restore, \ +create_diskpool_conf, destroy_netpool sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -68,27 +68,40 @@ test_mac = "00:11:22:33:44:aa" test_mac = "00:11:22:33:44:aa" test_mem = 128 test_vcpus = 1 -test_disk = "xvdb" -diskid = "%s/%s" % ("DiskPool", test_dpath) -memid = "%s/%s" % ("MemoryPool", 0) -procid = "%s/%s" % ("ProcessorPool", 0) def print_err(err, detail, cn): logger.error(err % cn) logger.error("Exception: %s", detail) -def pool_init_list(pool_assoc): +def pool_init_list(virt, pool_assoc, net_name, dp_InstID): """ Creating the lists that will be used for comparisons. """ in_pllist = {} - for i in range(len(pool_assoc)): - classname_keyvalue = pool_assoc[i].classname - instid = pool_assoc[i]['InstanceID'] - in_pllist[classname_keyvalue] = instid + mpool = get_typed_class(virt, 'MemoryPool') + + exp_pllist = { + mpool : 'MemoryPool/0' + } + + if virt != 'LXC': + npool = get_typed_class(virt, 'NetworkPool') + dpool = get_typed_class(virt, 'DiskPool') + ppool = get_typed_class(virt, 'ProcessorPool') + exp_pllist[dpool] = dp_InstID + exp_pllist[npool] = '%s/%s' %('NetworkPool', net_name) + exp_pllist[ppool] = 'ProcessorPool/0' + exp_pllist[mpool] = 'MemoryPool/0' + + for p_inst in pool_assoc: + CName = p_inst.classname + InstID = p_inst['InstanceID'] + if exp_pllist[CName] == InstID: + in_pllist[CName] = InstID + return in_pllist -def eapf_list(server, virt="Xen"): +def eapf_list(server, virt, test_disk): disk_inst = get_typed_class(virt, "LogicalDisk") proc_inst = get_typed_class(virt, "Processor") net_inst = get_typed_class(virt, "NetworkPort") @@ -136,7 +149,7 @@ def get_inst_for_dom(assoc_val): return dom_list -def get_assocname_info(server, cn, an, qcn, hostname, virt="Xen"): +def get_assocname_info(server, cn, an, qcn, hostname, virt): status = PASS assoc_info = [] try: @@ -155,9 +168,6 @@ def get_assocname_info(server, cn, an, q print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn) status = FAIL - if status != PASS: - cleanup_restore(server, virt='Xen') - return status, assoc_info def check_len(an, assoc_list_info, qcn, exp_len): @@ -167,14 +177,14 @@ def check_len(an, assoc_list_info, qcn, return FAIL return PASS -def verify_eafp_values(server, in_pllist, virt="Xen"): +def verify_eafp_values(server, in_pllist, virt, test_disk): # Looping through the in_pllist to get association for various pools. status = PASS an = get_typed_class(virt, "ElementAllocatedFromPool") exp_len = 1 - qcn = "Logical Devices" - eafp_values = eapf_list(server, virt) + eafp_values = eapf_list(server, virt, test_disk) for cn, instid in sorted(in_pllist.items()): + qcn = cn try: assoc_info = Associators(server, an, cn, virt, InstanceID = instid) inst_list = get_inst_for_dom(assoc_info) @@ -185,14 +195,12 @@ def verify_eafp_values(server, in_pllist CCName = assoc_eafp_info['CreationClassName'] status = verify_device_values(assoc_eafp_info, eafp_values, virt) - if status != PASS: return status - except Exception, detail: logger.error(CIM_ERROR_ASSOCIATORS, an) logger.error("Exception: %s", detail) - cleanup_restore(server, virt='Xen') + cleanup_restore(server, virt) status = FAIL return status @@ -200,38 +208,37 @@ def main(): def main(): options= main.options server = options.ip - if options.virt == "XenFV": - virt = "Xen" - else: - virt=options.virt + virt=options.virt # Get the host info status, host_name, classname = get_host_info(server, virt) if status != PASS: return status + destroy_and_undefine_all(server) + if virt == 'Xen': + test_disk = 'xvdb' + else: + test_disk = 'hdb' + virt_type = get_class(virt) if virt == 'LXC': - vsxml = virt_type(test_dom) + vsxml = virt_type(test_dom, ntype="network") else: vsxml = virt_type(test_dom, vcpus = test_vcpus, mac = test_mac, - disk = test_disk) + disk = test_disk, ntype="network") ret = vsxml.define(server) if not ret: logger.error("Failed to define the dom: '%s'", test_dom) return FAIL - # Verify DiskPool on machine - status = create_diskpool_file() + + # Get the network pool info which is used by the VS. + net_name = vsxml.xml_get_net_network() + + status, dpool_name = create_diskpool_conf(server, virt) if status != PASS: logger.error("Failed to create diskpool") - vsxml.undefine(server) - return FAIL - # Create NetPool on machine - status, net_name = create_netpool_conf(server, virt, use_existing=False) - if status != PASS: - logger.error('Unable to create network pool') vsxml.undefine(server) - cleanup_restore(server, virt=virt) return FAIL # Get the hostedResourcePool info first @@ -244,22 +251,18 @@ def main(): cleanup_restore(server, virt=virt) destroy_netpool(server, virt, net_name) return status + + in_pllist = pool_init_list(virt, pool, net_name, dpool_name) # One pool for each Device type, hence len should be 4 exp_len = 4 - status = check_len(an, pool, qcn, exp_len) + status = check_len(an, in_pllist, qcn, exp_len) if status != PASS: vsxml.undefine(server) cleanup_restore(server, virt=virt) destroy_netpool(server, virt, net_name) return FAIL - in_pllist = pool_init_list(pool) - if virt == 'LXC': - for cn, instid in in_pllist.items(): - if cn == 'LXC_MemoryPool': - in_pllist = {cn: instid} - break - status = verify_eafp_values(server, in_pllist, virt) + status = verify_eafp_values(server, in_pllist, virt, test_disk) vsxml.undefine(server) cleanup_restore(server, virt=virt) destroy_netpool(server, virt, net_name) From deeptik at linux.vnet.ibm.com Wed Aug 13 12:38:07 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 13 Aug 2008 18:08:07 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 04_hs_to_EAPF.py tc In-Reply-To: <48A2094E.6050803@linux.vnet.ibm.com> References: <3eca51b419cc44654c94.1218478665@elm3b217.beaverton.ibm.com> <48A0AAAA.7000605@linux.vnet.ibm.com> <48A140D1.90405@linux.vnet.ibm.com> <48A2094E.6050803@linux.vnet.ibm.com> Message-ID: <48A2D5AF.1070101@linux.vnet.ibm.com> Kaitlin Rupert wrote: >>> >>> I know this was already existing code, but if pool_assoc doesn't >>> contain the instances you're expecting, then in_pllist won't contain >>> the proper values to query against ElementAllocatedFromPool. >> I agree that the loop is little hard to read, but considering the >> fact that this is a Cross class test case where we would like to be >> able to as input for the next step as much as possible, do you think >> that manually generating a list of our own will serve the purpose ? >> If yes, then the Crosss Class tc will no longer require query from >> the *HostedResourcePool, *correct?? > > This is a really good point. I won't considering this a cross class > test when I first read the patch. > >> >> def pool_init_list(virt, pool_assoc, net_name, dp_InstID): >> """ >> Creating the lists that will be used for comparisons. >> """ >> in_pllist = {} >> dp_CName = get_typed_class(virt, 'DiskPool') >> pp_CName = get_typed_class(virt, 'ProcessorPool') >> mp_CName = get_typed_class(virt, 'MemoryPool') >> np_CName = get_typed_class(virt, 'NetworkPool') >> np_InstID = '%s/%s' % ('NetworkPool', net_name) >> >> for p_inst in pool_assoc: >> CName = p_inst.classname >> InstID = p_inst['InstanceID'] >> if CName == np_CName and InstID == np_InstID: >> in_pllist[CName] = InstID >> elif CName == dp_CName and InstID == dp_InstID: >> in_pllist[CName] = InstID >> elif CName == pp_CName or CName == mp_CName: >> in_pllist[CName] = InstID >> return in_pllist >> > > What confuses me here are the comparisons: The outcome of each if > statement is the same. You're essentially building a list that is: > > in_pllist = { Cname : InstID, > ... > } > > Why only verify the network pool and disk pool InstanceIDs but not the > memory pool or processor pool InstanceIDs? If you want to verify > in_pllist only has InstanceIDs you're expecting, you should check for > proc and mem as well. > Since the processorpool and memorypool InstanceID do not change I did not consider checking them as well. > Why not do something like: > > exp_pllist = { dp_CName : dp_InstID, > ... > } > > for p_inst in pool_assoc: > CName = p_inst.classname > InstID = p_inst['InstanceID'] > if exp_pllist[Cname] == InstID: > in_pllist[Cname] = InstID > > This way, you can build a list of expected values. in_pllist should > match exp_pllist. You could then call check_len() at this point, or > you could call it after pool_init_list() returns. > > Although, this seems silly. You could do something like: > > for p_inst in pool_assoc: > CName = p_inst.classname > InstID = p_inst['InstanceID'] > if exp_pllist[Cname] != InstID: > return FAIL, None > > return PASS, exp_pllist > > I agree that you want to use the output from the previous provider. > However, if you've already confirmed that A == B, then returning A is > no different than returning B. > > But either way is fine in this case. I just think the multiple if > statements in the loop were confusing - it took me awhile to > understand what that loop was trying to accomplish. > We should be returning the new list B that will be created since the HostedResourcePool might not contain all the Pool details that exp_list is expecting to have. These are good approach :) thanks. I sent a new patch with the changes. Thanks and Regards, Deepti. From kaitlin at linux.vnet.ibm.com Wed Aug 13 16:46:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 13 Aug 2008 09:46:59 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: References: Message-ID: <48A31003.6000802@linux.vnet.ibm.com> Guo Lian Yun wrote: > > Kaitlin, > > Here is a test report generation. > > Please fix whitespace in XFAIL and Total count. > > Thanks! > > > ================================================= > LXC on sfcb Test Run Summary for Aug 13 2008 > ================================================= > Distro: Fedora release 8.92 (Rawhide) > Kernel: 2.6.26-rc2-mm1-netns > libvirt: 0.4.4 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.0 > Libvirt-cim revision: 656 > Libvirt-cim changeset: dbdf9a5fce21 > ================================================= > FAIL: 0 > XFAIL: 0 > SKIP: 8 > PASS: 7 > ----------------- > Total: 15 > ================================================= This is odd because the code uses tabs: for type, val in rvals.iteritems(): results += " %s:\t%d\n" % (type, val) test_total += val results_total = " -----------------\n Total:\t%d\n" % test_total So the formatting shouldn't get shifted like that. Is it showing up as shifted in the test file as well? Can you check your suites/libvirt-cim/run_report.txt file? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Wed Aug 13 18:14:40 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 13 Aug 2008 11:14:40 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: <48A31003.6000802@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Wed, 13 Aug 2008 09:46:59 -0700") References: <48A31003.6000802@linux.vnet.ibm.com> Message-ID: <87d4kcaijz.fsf@caffeine.beaverton.ibm.com> KR> This is odd because the code uses tabs: The tabs aren't translating properly into the mailer, I'm sure. I think it would be safer to use space-padded fields where possible. KR> for type, val in rvals.iteritems(): Replacing this: KR> results += " %s:\t%d\n" % (type, val) with something like this: results += " %s: %20d\n" % (type, val) should do it. KR> results_total = " -----------------\n Total:\t%d\n" % test_total The same should be applicable here -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Wed Aug 13 19:22:03 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 13 Aug 2008 12:22:03 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fixing 04_hs_to_EAPF.py tc In-Reply-To: References: Message-ID: <48A3345B.3080604@linux.vnet.ibm.com> > +def pool_init_list(virt, pool_assoc, net_name, dp_InstID): > """ > Creating the lists that will be used for comparisons. > """ > in_pllist = {} > - for i in range(len(pool_assoc)): > - classname_keyvalue = pool_assoc[i].classname > - instid = pool_assoc[i]['InstanceID'] > - in_pllist[classname_keyvalue] = instid > + mpool = get_typed_class(virt, 'MemoryPool') > + > + exp_pllist = { > + mpool : 'MemoryPool/0' > + } > + > + if virt != 'LXC': > + npool = get_typed_class(virt, 'NetworkPool') > + dpool = get_typed_class(virt, 'DiskPool') > + ppool = get_typed_class(virt, 'ProcessorPool') > + exp_pllist[dpool] = dp_InstID > + exp_pllist[npool] = '%s/%s' %('NetworkPool', net_name) > + exp_pllist[ppool] = 'ProcessorPool/0' > + exp_pllist[mpool] = 'MemoryPool/0' > + > + for p_inst in pool_assoc: > + CName = p_inst.classname > + InstID = p_inst['InstanceID'] > + if exp_pllist[CName] == InstID: > + in_pllist[CName] = InstID > + > return in_pllist Thanks Deepti - I think this is much easier to read. And good point about HostedResourcePool nor returning all of the expected pool instances. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Aug 13 21:25:19 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 13 Aug 2008 14:25:19 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] #2 Enable test infrastructure to support writing to a temporary file In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1218470726 25200 # Node ID dfd2ac2440a2543fffe6e8c6ae27445e14932ca0 # Parent 680b9475757c1576af1addae83645ab1d1bb6971 [TEST] #2 Enable test infrastructure to support writing to a temporary file. Allow the option to print to a file in addition to stdout. This will allow a test suite to read back the file after the test execution is complete. If a previous log exists at the start of the run, it is removed and a new one is created. Updates: -Add a new line at the end of each line when writing out to the log Signed-off-by: Kaitlin Rupert diff -r 680b9475757c -r dfd2ac2440a2 lib/Reporter.py --- a/lib/Reporter.py Thu Jul 31 15:17:28 2008 -0700 +++ b/lib/Reporter.py Mon Aug 11 09:05:26 2008 -0700 @@ -19,10 +19,13 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL + class Reporter: - def __init__(self, verbosity=1): + def __init__(self, verbosity=1, log_fd=None): self.verbosity = verbosity + self.log_fd = log_fd def __red(self, str): return "\033[01;31m%s\033[00m" % str @@ -36,11 +39,38 @@ def __blue(self, str): return "\033[01;34m%s\033[00m" % str - def __out(self, str): - """We might not always be just printing output to stdout, so this should - be used for all output.""" - # Right now we just mimic print. - print(str) + def __out(self, str, status, bug): + def no_color(string): + return string + + colors = { "FAIL" : self.__red, + "PASS" : self.__green, + "SKIP" : self.__yellow, + "XFAIL" : self.__blue, + } + + fn = colors.get(status, no_color) + + if status == XFAIL: + print "%s: %s\tBug: %s" % (str, fn(status), bug) + else: + print "%s: %s" % (str, fn(status)) + + if self.log_fd is not None: + if status == XFAIL: + self.log_fd.write("%s: %s\tBug: %s\n" % (str, status, bug)) + else: + self.log_fd.write("%s: %s\n" % (str, status)) + + def results(self, str, status, bug): + + rc = { FAIL : "FAIL", + PASS : "PASS", + SKIP : "SKIP", + XFAIL : "XFAIL" + } + + self.__out(str, rc[status], bug) def debug(self, level, str): """Produces debug output if appropriate for current verbosity level. @@ -49,20 +79,6 @@ priority output will be printed in the most levels, while low priority output will only be printed when verbosity is high.""" if level <= self.verbosity: - self.__out(str) + print str + self.log_fd.write("%s\n" % str) - def pass_test(self, test_name): - str = self.__green("PASS") - self.__out("%s: %s" % (test_name, str)) - - def fail_test(self, test_name): - str = self.__red("FAIL") - self.__out("%s: %s" % (test_name, str)) - - def xfail_test(self, test_name, bug): - str = self.__blue("XFAIL") - self.__out("%s: %s\tBug: %s" % (test_name, str, bug)) - - def skip_test(self, test_name): - str = self.__yellow("SKIP") - self.__out("%s: %s" % (test_name, str)) diff -r 680b9475757c -r dfd2ac2440a2 lib/TestSuite.py --- a/lib/TestSuite.py Thu Jul 31 15:17:28 2008 -0700 +++ b/lib/TestSuite.py Mon Aug 11 09:05:26 2008 -0700 @@ -24,48 +24,59 @@ DEFAULT_RPC_URL = "http://morbo.linux.ibm.com/xenotest/testrun/api" +DEFAULT_LOG_FILE = "run_report.txt" + import Reporter import re +import os +from CimTest.ReturnCodes import PASS, FAIL, XFAIL, SKIP class TestSuite: """Test Suite class to make the output of driving test suites a bit more consistant""" - def __init__(self): - self.rep = Reporter.Reporter(verbosity=5) + def __init__(self, log=False, file_name=None): + if log == True: + if file_name is None: + self.log_file = DEFAULT_LOG_FILE + else: + self.log_file = file_name - def ok(self, group, test, output=""): - self.rep.pass_test("%s - %s" % (group, test)) + if os.path.exists(self.log_file): + os.remove(self.log_file) + self.log_fd = open(self.log_file, "w") + else: + self.log_file = None + self.log_fd = None - def skip(self, group, test, output=""): - self.rep.skip_test("%s - %s" % (group, test)) + self.rep = Reporter.Reporter(verbosity=5, log_fd=self.log_fd) + + def print_results(self, group, test, status, output=""): + bug = None + if status == XFAIL: + err = "Test error: returned XFAIL without a valid bug string." + bug = err + if len(output) > 0: + try: + str = re.search('Bug:<[0-9]*>', output).group() + bug = re.search("Bug:<([0-9]+)>", str).group(1) + if len(str) > 0: + if output == str: + #No need to pring bug twice + output = "" + except: + #If we hit a problem, make sure bug = error msg + bug = err + + self.rep.results("%s - %s" % (group, test), status, bug) if output: self.rep.debug(1, output) - def fail(self, group, test, output=""): - self.rep.fail_test("%s - %s" % (group, test)) - if output: - self.rep.debug(1, output) - - def xfail(self, group, test, output=""): - err = "Test error: returned XFAIL without a valid bug string." - bug = err - if len(output) > 0: - try: - str = re.search('Bug:<[0-9]*>', output).group() - bug = re.search("Bug:<([0-9]+)>", str).group(1) - if len(str) > 0: - if output == str: - #No need to pring bug twice - output = "" - except: - #If we hit a problem, make sure bug is equal to the error msg - bug = err - self.rep.xfail_test("%s - %s" % (group, test), bug) - if output: - self.rep.debug(1, output) + def debug(self, str): + self.rep.debug(1, str) def finish(self): - pass + if self.log_fd is not None: + self.log_fd.close() class RPCTestSuite: """Test Suite class to make the output of driving test suites a bit more consistant diff -r 680b9475757c -r dfd2ac2440a2 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Thu Jul 31 15:17:28 2008 -0700 +++ b/suites/libvirt-cim/main.py Mon Aug 11 09:05:26 2008 -0700 @@ -153,14 +153,7 @@ os_status = os.WEXITSTATUS(status) - if os_status == PASS: - testsuite.ok(test['group'], test['test']) - elif os_status == SKIP: - testsuite.skip(test['group'], test['test'], output) - elif os_status == XFAIL: - testsuite.xfail(test['group'], test['test'], output) - else: - testsuite.fail(test['group'], test['test'], output) + testsuite.print_results(test['group'], test['test'], os_status, output) testsuite.finish() From kaitlin at linux.vnet.ibm.com Wed Aug 13 21:25:20 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 13 Aug 2008 14:25:20 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] #3 Add reporting library In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1218470737 25200 # Node ID b1b0cc8fbbd13706fd3a30c2343251688acf8dcf # Parent dfd2ac2440a2543fffe6e8c6ae27445e14932ca0 [TEST] #3 Add reporting library. Include CIMOM type in email heading. Updates from 2 to 3: -Changed tabs in the build_report_body() call with space padded fields. Updates from 1 to 2: -Read from the file using xreadlines() -Reorganize some of the report building pieces -Fixed issue where mail was being sent to the from address Signed-off-by: Kaitlin Rupert diff -r dfd2ac2440a2 -r b1b0cc8fbbd1 suites/libvirt-cim/lib/XenKvmLib/reporting.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Mon Aug 11 09:05:37 2008 -0700 @@ -0,0 +1,176 @@ +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Kaitlin Rupert +# +# 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 + +import os +import sys +import commands +import smtplib +from time import gmtime, strftime +from VirtLib import utils + +def get_cmd_val(cmd, ip): + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return "Unknown" + return out + +def get_libvirt_ver(ip): + libvirt_ver = "Unknown" + hyp_ver = "Unknown" + cmd = "virsh version" + virsh_ver = get_cmd_val(cmd, ip) + if virsh_ver != "Unknown": + if len(virsh_ver.splitlines()) == 4: + if virsh_ver.splitlines()[0].find("libvir"): + libvirt_ver = virsh_ver.splitlines()[0].split()[4] + + if virsh_ver.splitlines()[3].find("hypervisor"): + hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] + hyp_ver = hyp_ver.split(": ")[1] + + return libvirt_ver, hyp_ver + + +def get_cimom_ver(ip): + cimom = get_cmd_val("ps -ef | grep cimserver | grep -v grep", ip) + if cimom != "Unknown": + cimom = "Pegasus" + else: + cimom = get_cmd_val("ps -ef | grep sfcb | grep -v grep", ip) + if cimom != "Unknown": + cimom = "sfcb" + + if cimom == "Pegasus": + cimom_ver = get_cmd_val("cimserver -v", ip) + elif cimom == "sfcb": + cimom_ver = get_cmd_val("sfcbd -v", ip) + else: + cimom_ver = "unknown version" + + return cimom, cimom_ver + + +def get_env_data(rev, changeset, ip): + distro = get_cmd_val("cat /etc/issue | awk 'NR<=1'", ip) + kernel_ver = get_cmd_val("uname -r", ip) + + libvirt_ver, hyp_ver = get_libvirt_ver(ip) + + cimom, cimom_ver = get_cimom_ver(ip) + + env = "Distro: %s\nKernel: %s\nlibvirt: %s\nHypervisor: %s\nCIMOM: %s %s\n"\ + % (distro, kernel_ver, libvirt_ver, hyp_ver, cimom, cimom_ver) + + lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \ + (rev, changeset) + + return env + lc_ver + +def parse_run_output(log_file): + rvals = { 'PASS' : 0, + 'FAIL' : 0, + 'XFAIL' : 0, + 'SKIP' : 0, + } + + tstr = { 'PASS' : "", + 'FAIL' : "", + 'XFAIL' : "", + 'SKIP' : "", + } + + fd = open(log_file, "r") + + run_output = "" + for line in fd.xreadlines(): + for type, val in rvals.iteritems(): + if type in line: + if type == "FAIL" and "py: FAIL" not in line: + continue + rvals[type] += 1 + tstr[type] += "%s" % line + run_output += line + + fd.close() + + return rvals, tstr, run_output + +def build_report_body(rvals, tstr, div): + results = "" + test_total = 0 + for type, val in rvals.iteritems(): + results += " %-10s: %d\n" % (type, val) + test_total += val + + results_total = " -----------------\n %-10s: %d\n" % ("Total", test_total) + + test_block = "" + for type, str in tstr.iteritems(): + if type == "PASS" or str == "": + continue + test_block += "%s Test Summary:\n%s\n%s" % (type, str, div) + + return results, results_total, test_block + +def gen_report(rev, changeset, virt, ip, log_file): + date = strftime("%b %d %Y", gmtime()) + + cimom, cimom_ver = get_cimom_ver(ip) + + heading = "%s on %s Test Run Summary for %s" % (virt, cimom, date) + sys_env = get_env_data(rev, changeset, ip) + + divider = "=================================================\n" + + rvals, tstr, run_output = parse_run_output(log_file) + + res, res_total, test_block = build_report_body(rvals, tstr, divider) + + report = divider + heading + "\n" + divider + sys_env + divider + res \ + + res_total + divider + test_block + "Full report:\n" \ + + run_output + + fd = open(log_file, "w") + rc = fd.write(report) + if rc is not None: + print "Error %s writing report to: %s." % (rc, log_file) + fd.close() + + return report, heading + + +def send_report(to_addr, from_addr, relay, report, heading): + headers = "From: %s\r\nTo: %s\r\nSubject: %s\r\n\r\n" % (from_addr, to_addr, + heading) + + message = headers + report + + try: + server = smtplib.SMTP(relay) + result = server.sendmail(from_addr, to_addr, message) + server.quit() + + if result: + for recip in result.keys(): + print "Could not deliver mail to: %s" % recip + + except Exception, details: + print "Encountered a problem mailing report: %s" % details + From kaitlin at linux.vnet.ibm.com Wed Aug 13 21:25:18 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 13 Aug 2008 14:25:18 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] #4 Add reporting capabilities Message-ID: This patch set will allow cimtest to generate reports. With a little extra help from a cron script, this can be used to do automated test runs. Will need to follow up with a patch that includes the error log messages in the FAIL block. From kaitlin at linux.vnet.ibm.com Wed Aug 13 21:25:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 13 Aug 2008 14:25:21 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: Message-ID: <0aad4b07fac5359f5617.1218662721@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218470745 25200 # Node ID 0aad4b07fac5359f56174085deaebdfd3a66efd8 # Parent b1b0cc8fbbd13706fd3a30c2343251688acf8dcf [TEST] #2 Add test report generation. Using the --report option, you can generate a report and have it mailed to the address supplied. How to call using the report option: ./runtests libvirt-cim -i localhost -c -d -v LXC -g VirtualSystemManagementService -t 01_definesystem_name.py --report The user will need to create a .cimtestrc file in their home directory in the following format: [email] relay = my.mail.relay.com from = Joe User Will need to add revision number support to cimtest and then add the cimtest revision number to the report. Updates: -Refactored reporting related pieces into their own library file Signed-off-by: Kaitlin Rupert diff -r b1b0cc8fbbd1 -r 0aad4b07fac5 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Mon Aug 11 09:05:37 2008 -0700 +++ b/suites/libvirt-cim/main.py Mon Aug 11 09:05:45 2008 -0700 @@ -29,12 +29,12 @@ sys.path.append('../../lib') import TestSuite import commands -from VirtLib import utils from VirtLib import groups -from CimTest.ReturnCodes import PASS, SKIP, XFAIL from CimTest.Globals import platform_sup sys.path.append('./lib') from XenKvmLib.classes import get_typed_class +import ConfigParser +from XenKvmLib.reporting import gen_report, send_report parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", @@ -54,8 +54,11 @@ help="Virt type, select from 'Xen' & 'KVM' & 'XenFV' & 'LXC'(default: Xen). ") parser.add_option("-d", "--debug-output", action="store_true", dest="debug", help="Duplicate the output to stderr") +parser.add_option("--report", dest="report", + help="Send report using mail info: --report=") TEST_SUITE = 'cimtest' +CIMTEST_RCFILE = '%s/.cimtestrc' % os.environ['HOME'] def set_python_path(): previous_pypath = os.environ.get('PYTHONPATH') @@ -82,6 +85,28 @@ print "Cleaned log files." +def get_rcfile_vals(): + if not os.access(CIMTEST_RCFILE, os.R_OK): + print "\nCould not access the %s file for this user." % CIMTEST_RCFILE + print "Create this file and add the appropriate relay:" + print "\tfrom = me at isp.com\n\trelay = my.relay\n" + return None, None + + try: + conf = ConfigParser.ConfigParser() + if not conf.read(CIMTEST_RCFILE): + return None, None + + addr = conf.get("email", "from") + relay = conf.get("email", "relay") + + except Exception, details: + print "\n%s" % details + print "\nPlease verify the format of the %s file\n" % CIMTEST_RCFILE + return None, None + + return addr, relay + def get_version(virt, ip): conn = WBEMConnection('http://%s' % ip, (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), @@ -101,7 +126,10 @@ def main(): (options, args) = parser.parse_args() - + to_addr = None + from_addr = None + relay = None + div = "--------------------------------------------------------------------" if options.test and not options.group: parser.print_help() @@ -114,7 +142,15 @@ os.environ['CIMOM_PORT'] = str(options.port) # - testsuite = TestSuite.TestSuite() + if options.report: + from_addr, relay = get_rcfile_vals() + + if from_addr == None or relay == None: + return 1 + + to_addr = options.report + + testsuite = TestSuite.TestSuite(log=True) set_python_path() @@ -139,9 +175,10 @@ revision, changeset = get_version(options.virt, options.ip) - print "Testing " + options.virt + " hypervisor" + print "\nTesting " + options.virt + " hypervisor" - for test in test_list: + for test in test_list: + testsuite.debug(div) t_path = os.path.join(TEST_SUITE, test['group']) os.environ['CIM_TC'] = test['test'] cdto = 'cd %s' % t_path @@ -155,7 +192,16 @@ testsuite.print_results(test['group'], test['test'], os_status, output) + testsuite.debug("%s\n" % div) testsuite.finish() + + msg_body, heading = gen_report(revision, changeset, options.virt, + options.ip, testsuite.log_file) + + if options.report: + print "Sending mail from %s to %s using %s relay.\n" % \ + (from_addr, to_addr, relay) + send_report(to_addr, from_addr, relay, msg_body, heading) if __name__ == '__main__': sys.exit(main()) From kaitlin at linux.vnet.ibm.com Wed Aug 13 21:32:07 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 13 Aug 2008 14:32:07 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: <87d4kcaijz.fsf@caffeine.beaverton.ibm.com> References: <48A31003.6000802@linux.vnet.ibm.com> <87d4kcaijz.fsf@caffeine.beaverton.ibm.com> Message-ID: <48A352D7.7000803@linux.vnet.ibm.com> Dan Smith wrote: > KR> This is odd because the code uses tabs: > > The tabs aren't translating properly into the mailer, I'm sure. I think > it would be safer to use space-padded fields where possible. Excellent suggestion - thanks! > > KR> for type, val in rvals.iteritems(): > > Replacing this: > > KR> results += " %s:\t%d\n" % (type, val) > > with something like this: > > results += " %s: %20d\n" % (type, val) I think it works better to pad the string in this case; I came up with: results += " %-10s: %d\n" % (type, val) So the format looks like: ================================================= FAIL : 6 XFAIL : 0 SKIP : 8 PASS : 1 ----------------- Total : 15 ================================================= This lets the numbers extend to the right, but fixes the status text to be left aligned. Thoughts? Daisy - let me know how this looks in your mailer. I can tweak it some more if need be. Although, I'll probably do that in a follow up patch (that way we can at least get this bit of code in the tree). Thanks for the reviews and for testing it out! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Aug 13 21:52:48 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 13 Aug 2008 14:52:48 -0700 Subject: [Libvirt-cim] CimTest Report for KVM on F9 13-08-2008 In-Reply-To: <48A28374.40007@linux.vnet.ibm.com> References: <48A28374.40007@linux.vnet.ibm.com> Message-ID: <48A357B0.10605@linux.vnet.ibm.com> > ======================================================= > PASS : 125 > FAIL : 1 > ACUTAL FAILED : 0 I'd call this an actual fail. We do see some caching issues with Xen on RHEL 5.2 which causes some tests to fail when they should really pass (will hopefully finish patching those tests soon). However, we don't have a caching issue with KVM. So if a test fails but then passes when it's run individually, I'd still consider that a fail. --- VirtualSystemManagementService - 06_addresource.py: FAIL ERROR - Got 99:aa:bb:cc:ee:ff, exp 99:aa:bb:cc:ee:ff. Got None, exp default-net51. It looks like the test tried to add a network device to a guest, and the verification failed. I'm not sure if this is a test case issue or if there was an actual issue adding the network device. When I did a bulk run, this test failed due to the following: ERROR - Failed to create Virtual Network 'default-net76' ERROR - Unable to create network pool There's been a number for network pool related issues lately. I'm planning on writing a patch that does the following: 1) Do some environment setup before any of the tests are called - create a network pool and a disk pool, etc 2) Use the network pool and disk pool names in all the test of the tests. 3) After the tests are finished, destroy the net / disk pools. The only problem I see with this are tests that need a net / disk pool free environment. However, this would allow us to create a guest without having to worry about also creating a network pool (and then subsequently cleaning up that pool properly). -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Aug 14 00:21:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 13 Aug 2008 17:21:21 -0700 Subject: [Libvirt-cim] Cimtest Report for LXC on Fedora 9 (2008/08/13) In-Reply-To: References: Message-ID: <48A37A81.9030102@linux.vnet.ibm.com> > > VirtualSystemManagementService - 10_hv_version.py: FAIL > > ERROR - CIM says version is `%s', but libvirt says `%s' > > This fails because of get version error by LXC hypervisor. > CIM says version is `LXC 0.0.0', but libvirt says `libvir: error : > this function is not supported by the hypervisor: virConnectGetVersion It looks like this function isn't supported for Containers. There's a lot of Containers related changes going on in libvirt now, so it might be added soon. > > > > VirtualSystemManagementService - 12_referenced_config.py: FAIL > > ERROR - EnabledState is 3 instead of 2. > > ERROR - Try to increase the timeout and run the test again > > ERROR - Unable to start rstest_domain > > ERROR - Unable to start rstest_domain > > > This fails because that the define domain can't be started. > Here is the dumpxml of the test domain: > > > rstest_domain > 80ccbf55-dba0-461b-b23f-90a335503680 > > /tmp/cimtest_lxc_init > > 524288 > > > > > > > > > This is missing a valid tty value. This should be: -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Thu Aug 14 01:31:41 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 14 Aug 2008 09:31:41 +0800 Subject: [Libvirt-cim] [PATCH 0 of 3] #4 Add reporting capabilities In-Reply-To: Message-ID: Kaitlin - Excellent! All the alignment looks fine for me. +1 from me. libvirt-cim-bounces at redhat.com wrote on 2008-08-14 05:25:18: > This patch set will allow cimtest to generate reports. With a > little extra help from a cron script, this can be used to do > automated test runs. > > Will need to follow up with a patch that includes the error log > messages in the FAIL block. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Aug 14 02:10:13 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 13 Aug 2008 19:10:13 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VSMS-10_hv_version.py to XFAIL status because that libvirt does not support virConnectGetVersion function Message-ID: <1f30a898cb2e30587ebf.1218679813@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1218679800 25200 # Node ID 1f30a898cb2e30587ebf094edf57bb911775b4c1 # Parent 0bd92300ca12c4fa58394f0426bc57d054a53c67 [TEST] Fix VSMS-10_hv_version.py to XFAIL status because that libvirt does not support virConnectGetVersion function Signed-off-by: Guolian Yun diff -r 0bd92300ca12 -r 1f30a898cb2e suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Wed Aug 13 05:47:44 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Wed Aug 13 19:10:00 2008 -0700 @@ -26,9 +26,10 @@ from XenKvmLib import vsms from XenKvmLib import vsms from CimTest.Globals import do_main from CimTest.Globals import logger -from CimTest.ReturnCodes import FAIL, PASS +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +bug_libvirt = "00006" @do_main(sup_types) def main(): @@ -51,7 +52,7 @@ def main(): if cim_ver != local_ver: logger.error("CIM says version is `%s', but libvirt says `%s'" \ % (cim_ver, local_ver)) - return FAIL + return XFAIL_RC(bug_libvirt) else: logger.info("Verified %s == %s" % (cim_ver, local_ver)) except Exception, details: From yunguol at cn.ibm.com Thu Aug 14 02:05:49 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 14 Aug 2008 10:05:49 +0800 Subject: [Libvirt-cim] Cimtest Report for LXC on Fedora 9 (2008/08/13) In-Reply-To: <48A37A81.9030102@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-14 08:21:21: > > > VirtualSystemManagementService - 10_hv_version.py: FAIL > > > ERROR - CIM says version is `%s', but libvirt says `%s' > > > > This fails because of get version error by LXC hypervisor. > > CIM says version is `LXC 0.0.0', but libvirt says `libvir: error : > > this function is not supported by the hypervisor: virConnectGetVersion > > It looks like this function isn't supported for Containers. There's a > lot of Containers related changes going on in libvirt now, so it might > be added soon. > > > > > > > VirtualSystemManagementService - 12_referenced_config.py: FAIL > > > ERROR - EnabledState is 3 instead of 2. > > > ERROR - Try to increase the timeout and run the test again > > > ERROR - Unable to start rstest_domain > > > ERROR - Unable to start rstest_domain > > > > > This fails because that the define domain can't be started. > > Here is the dumpxml of the test domain: > > > > > > rstest_domain > > 80ccbf55-dba0-461b-b23f-90a335503680 > > > > /tmp/cimtest_lxc_init > > > > 524288 > > > > > > > > > > > > > > > > > > > > > > This is missing a valid tty value. This should be: > > Do you test it with valid tty value? Acutally I used a valid tty value and tested yesterday, it still failed for me, the domain can't be started yet. Thanks! > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Thu Aug 14 10:42:47 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 14 Aug 2008 16:12:47 +0530 Subject: [Libvirt-cim] CimTest Report for KVM on F9 13-08-2008 In-Reply-To: <48A357B0.10605@linux.vnet.ibm.com> References: <48A28374.40007@linux.vnet.ibm.com> <48A357B0.10605@linux.vnet.ibm.com> Message-ID: <48A40C27.7000904@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> ======================================================= >> PASS : 125 >> FAIL : 1 > > ACUTAL FAILED : 0 > > I'd call this an actual fail. We do see some caching issues with Xen > on RHEL 5.2 which causes some tests to fail when they should really > pass (will hopefully finish patching those tests soon). > > However, we don't have a caching issue with KVM. So if a test fails > but then passes when it's run individually, I'd still consider that a > fail. Yes the caching issue is not seen with KVM. I did try to look at the problem. But was not able to find the actual cause for this particular problem. I will try to look into this again. > > --- > > VirtualSystemManagementService - 06_addresource.py: FAIL > ERROR - Got 99:aa:bb:cc:ee:ff, exp 99:aa:bb:cc:ee:ff. Got None, exp > default-net51. > > It looks like the test tried to add a network device to a guest, and > the verification failed. > > I'm not sure if this is a test case issue or if there was an actual > issue adding the network device. When I did a bulk run, this test > failed due to the following: > > ERROR - Failed to create Virtual Network 'default-net76' > ERROR - Unable to create network pool > > There's been a number for network pool related issues lately. I'm > planning on writing a patch that does the following: > > 1) Do some environment setup before any of the tests are called - > create a network pool and a disk pool, etc > > 2) Use the network pool and disk pool names in all the test of the > tests. > > 3) After the tests are finished, destroy the net / disk pools. > > The only problem I see with this are tests that need a net / disk pool > free environment. However, this would allow us to create a guest > without having to worry about also creating a network pool (and then > subsequently cleaning up that pool properly). Yes doing this will be good. As of now all of the tc which uses the vxml define, destroy etc methods take care of the network pool, the only need is to take care of the diskpool. We need to look into the test case which are calling the create_netpool_conf()and also using the vxml define etc methods since these might be the tc that might fail intermittently. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Thu Aug 14 11:47:12 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 14 Aug 2008 17:17:12 +0530 Subject: [Libvirt-cim] CimTest Report on XenFV 14-08-2008 Message-ID: <48A41B40.609@linux.vnet.ibm.com> ====================================== CIM Test Report for XenFV ====================================== Distro : RHEL 5.2 Beta Kernel : 2.6.18-88.el5xen Xen version : 3.1.2-88.el5 Libvirt : libvirt-0.3.3-7.el5 CIMOM : pegasus PyWBEM : pywbem-3.14 CIM Schema : cimv216Experimental LibCMPIutil : 83 LibVirtCIM : 666 CIMTEST : 304 ====================================== PASS : 124 FAILED : 7 [All the test cases passed when ran manually] XFAIL : 0 SKIP : 3 ------------------- Total : 134 ====================================== All of the failing tc passed when run manually. LogicalDisk - 02_nodevs.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL NetworkPort - 01_netport.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL VirtualSystemManagementService - 12_referenced_config.py: FAIL Please find the complete report attached with the mail. Thanks and Regards, Deepti. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Aug14-XenFV-report URL: From deeptik at linux.vnet.ibm.com Thu Aug 14 12:17:12 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 14 Aug 2008 17:47:12 +0530 Subject: [Libvirt-cim] Re: CimTest Report on XenFV 14-08-2008 In-Reply-To: <48A41B40.609@linux.vnet.ibm.com> References: <48A41B40.609@linux.vnet.ibm.com> Message-ID: <48A42248.4090108@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ====================================== > CIM Test Report for XenFV > ====================================== > Distro : RHEL 5.2 Beta > Kernel : 2.6.18-88.el5xen > Xen version : 3.1.2-88.el5 > Libvirt : libvirt-0.3.3-7.el5 > CIMOM : pegasus > PyWBEM : pywbem-3.14 > CIM Schema : cimv216Experimental > LibCMPIutil : 83 > LibVirtCIM : 666 > CIMTEST : 304 > ====================================== > PASS : 124 > FAILED : 7 [All the test cases passed when ran manually] > XFAIL : 0 > SKIP : 3 > ------------------- > Total : 134 > ====================================== > > > All of the failing tc passed when run manually. > > LogicalDisk - 02_nodevs.py: FAIL The above test case fails in the bulk run but does not when run individually. This is because the guest domain information "test_domain" that is created by the first test case is still persistent when the 02_nodevs.py tc is executed. Here is the o/p of the devices.enumerate() function called within the 02_nodevs.py tc. This tc does not define any domain but yet it has the information about the domain. Thu, 14 Aug 2008 05:14:10:TEST LOG:INFO - ====02_nodevs.py Log==== Thu, 14 Aug 2008 05:14:11:TEST LOG:ERROR - DEBUG Sys on the machine are ['Domain-0'] Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG test_domain123/hda Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG Xen_LogicalDisk Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG test_domain123 Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG Xen_ComputerSystem Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG key_list is {'CreationClassName': u'Xen_LogicalDisk', 'SystemName': u'test_domain123', 'DeviceID': u'test_domain123/hda', 'SystemCreationClassName': u'Xen_ComputerSystem'} > LogicalDisk - 03_ld_gi_errs.py: FAIL > Memory - 01_memory.py: FAIL > NetworkPort - 01_netport.py: FAIL > VSSD - 04_vssd_to_rasd.py: FAIL > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL > VirtualSystemManagementService - 12_referenced_config.py: FAIL > I will look into the problems for the others. Thanks and Regards, Deepti. > > Please find the complete report attached with the mail. > > Thanks and Regards, > Deepti. > ------------------------------------------------------------------------ > > Starting test suite: libvirt-cim > Cleaned log files. > Testing XenFV hypervisor > AllocationCapabilities - 01_enum.py: PASS > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > ComputerSystem - 01_enum.py: PASS > ComputerSystem - 02_nosystems.py: SKIP > ComputerSystem - 03_defineVS.py: PASS > ComputerSystem - 04_defineStartVS.py: PASS > ComputerSystem - 05_activate_defined_start.py: PASS > ComputerSystem - 06_paused_active_suspend.py: PASS > ComputerSystem - 22_define_suspend.py: PASS > ComputerSystem - 23_suspend_suspend.py: PASS > ComputerSystem - 27_define_suspend_errs.py: PASS > ComputerSystem - 32_start_reboot.py: PASS > ComputerSystem - 33_suspend_reboot.py: PASS > ComputerSystem - 35_start_reset.py: PASS > ComputerSystem - 40_RSC_start.py: PASS > ComputerSystem - 41_cs_to_settingdefinestate.py: PASS > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > ComputerSystem - 42_cs_gi_errs.py: PASS > ComputerSystemIndication - 01_created_indication.py: PASS > ElementAllocatedFromPool - 01_forward.py: PASS > ElementAllocatedFromPool - 02_reverse.py: PASS > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > ElementAllocatedFromPool - 04_forward_errs.py: PASS > ElementCapabilities - 01_forward.py: PASS > ElementCapabilities - 02_reverse.py: PASS > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > ElementCapabilities - 03_forward_errs.py: PASS > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > ElementCapabilities - 04_reverse_errs.py: PASS > ElementCapabilities - 05_hostsystem_cap.py: PASS > ElementConforms - 01_forward.py: PASS > ElementConforms - 02_reverse.py: PASS > ElementConforms - 03_ectp_fwd_errs.py: PASS > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > ElementConforms - 04_ectp_rev_errs.py: PASS > ElementSettingData - 01_forward.py: PASS > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > EnabledLogicalElementCapabilities - 01_enum.py: PASS > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > HostSystem - 01_enum.py: PASS > HostSystem - 02_hostsystem_to_rasd.py: PASS > HostSystem - 03_hs_to_settdefcap.py: PASS > HostSystem - 04_hs_to_EAPF.py: PASS > HostSystem - 05_hs_gi_errs.py: PASS > HostSystem - 06_hs_to_vsms.py: PASS > HostedDependency - 01_forward.py: PASS > HostedDependency - 02_reverse.py: PASS > HostedDependency - 03_enabledstate.py: PASS > HostedDependency - 04_reverse_errs.py: PASS > HostedResourcePool - 01_forward.py: PASS > HostedResourcePool - 02_reverse.py: PASS > HostedResourcePool - 03_forward_errs.py: PASS > HostedResourcePool - 04_reverse_errs.py: PASS > HostedService - 01_forward.py: PASS > HostedService - 02_reverse.py: PASS > HostedService - 03_forward_errs.py: PASS > HostedService - 04_reverse_errs.py: PASS > LogicalDisk - 01_disk.py: PASS > LogicalDisk - 02_nodevs.py: FAIL > ERROR - LogicalDisk returned 1 instead of empty list > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > LogicalDisk - 03_ld_gi_errs.py: FAIL > ERROR - Failed to get instance by the class of Xen_LogicalDisk > ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/hda)') > Memory - 01_memory.py: FAIL > ERROR - Capacity should be 262144 MB instead of 131072 MB > Memory - 02_defgetmem.py: PASS > Memory - 03_mem_gi_errs.py: PASS > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > NetworkPort - 01_netport.py: FAIL > ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)') > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > NetworkPort - 02_np_gi_errors.py: PASS > NetworkPort - 03_user_netport.py: SKIP > Processor - 01_processor.py: PASS > Processor - 02_definesys_get_procs.py: PASS > Processor - 03_proc_gi_errs.py: PASS > Profile - 01_enum.py: PASS > Profile - 02_profile_to_elec.py: PASS > Profile - 03_rprofile_gi_errs.py: PASS > RASD - 01_verify_rasd_fields.py: PASS > RASD - 02_enum.py: PASS > RASD - 03_rasd_errs.py: PASS > RASD - 04_disk_rasd_size.py: PASS > ReferencedProfile - 01_verify_refprof.py: PASS > ReferencedProfile - 02_refprofile_errs.py: PASS > ResourceAllocationFromPool - 01_forward.py: PASS > ResourceAllocationFromPool - 02_reverse.py: PASS > ResourceAllocationFromPool - 03_forward_errs.py: PASS > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > libvir: Network error : invalid network pointer in virNetworkFree > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > ResourcePool - 01_enum.py: PASS > ResourcePool - 02_rp_gi_errors.py: PASS > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > ResourcePoolConfigurationService - 01_enum.py: PASS > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > SettingsDefine - 01_forward.py: PASS > SettingsDefine - 02_reverse.py: PASS > SettingsDefine - 03_sds_fwd_errs.py: PASS > SettingsDefine - 04_sds_rev_errs.py: PASS > SettingsDefineCapabilities - 01_forward.py: PASS > SettingsDefineCapabilities - 03_forward_errs.py: PASS > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS > SystemDevice - 01_forward.py: PASS > SystemDevice - 02_reverse.py: PASS > SystemDevice - 03_fwderrs.py: PASS > VSSD - 01_enum.py: PASS > VSSD - 02_bootldr.py: SKIP > VSSD - 03_vssd_gi_errs.py: PASS > VSSD - 04_vssd_to_rasd.py: FAIL > ERROR - Xen_VirtualSystemSettingData with VSSDC_dom was not returned > ERROR - Xen_VirtualSystemSettingData returned 0 VSSD objects, expected only 1 > VirtualSystemManagementCapabilities - 01_enum.py: PASS > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > VirtualSystemManagementService - 01_definesystem_name.py: PASS > VirtualSystemManagementService - 02_destroysystem.py: PASS > error line 1: syntax error in 'wrong' > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > error line 1: syntax error in 'wrong' > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > libvir: Domain error : invalid domain pointer in virDomainFree > libvir: Xen error : Domain not found: xenUnifiedDomainLookupByName > libvir: Domain error : invalid domain pointer in virDomainFree > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > VirtualSystemManagementService - 06_addresource.py: PASS > error line 1: syntax error in 'ever' > VirtualSystemManagementService - 07_addresource_neg.py: PASS > VirtualSystemManagementService - 08_modifyresource.py: PASS > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL > ERROR - Need to give different bridge name since it already exists > ERROR - SystemExit : 2 > Traceback (most recent call last): > File "/data/users/deepti/cimtest/lib/CimTest/Globals.py", line 144, in do_try > rc = f() > File "09_procrasd_persist.py", line 137, in main > destroy_netpool(options.ip, options.virt, test_network) > File "/data/users/deepti/cimtest/suites/libvirt-cim/lib/XenKvmLib/common_util.py", line 404, in destroy_netpool > netxml = NetXML(server, virt=virt, networkname=net_name) > File "/data/users/deepti/cimtest/suites/libvirt-cim/lib/XenKvmLib/vxml.py", line 193, in __init__ > sys.exit(SKIP) > SystemExit: 2 > ERROR - None > VirtualSystemManagementService - 10_hv_version.py: PASS > VirtualSystemManagementService - 11_define_memrasdunits.py: PASS > VirtualSystemManagementService - 12_referenced_config.py: FAIL > ERROR - Exception: (1, u'CIM_ERR_FAILED: Invalid state transition') > ERROR - Unable to start rstest_domain > ERROR - Unable to start rstest_domain > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Invalid state transition > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > VirtualSystemMigrationService - 01_migratable_host.py: PASS > VirtualSystemMigrationService - 02_host_migrate_type.py: PASS > libvir: Domain error : invalid domain pointer in virDomainFree > VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS > VirtualSystemMigrationSettingData - 01_enum.py: PASS > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > VirtualSystemSettingDataComponent - 01_forward.py: PASS > VirtualSystemSettingDataComponent - 02_reverse.py: PASS > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS > VirtualSystemSnapshotService - 01_enum.py: PASS > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS > > From deeptik at linux.vnet.ibm.com Thu Aug 14 12:31:01 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 14 Aug 2008 18:01:01 +0530 Subject: [Libvirt-cim] Cimtest Report for LXC on Fedora 9 (2008/08/13) In-Reply-To: References: Message-ID: <48A42585.8020306@linux.vnet.ibm.com> Guo Lian Yun wrote: > > Distro : Fedora 9 > Kernel : kernel-2.6.25-0.121.rc5.git4.fc9.x86_64 > Libvirt : libvirt-0.4.4 > CIMOM : sblim-sfcb-1.3.0 > PyWBEM : pywbem-0.6 > CIM Schema : cimv216Experimental > LibCMPIutil : 83 > LibVirtCIM : 665 > CIMTEST : 299 > ================================================================== > PASS : 97 > XFAIL : 3 NOTE: The XFAIL count should have been 1 here. > FAIL : 2 > SKIP : 34 > ----------------- > Total : 134 > > ======================CIMTEST FAIL > REPORT================================= > VirtualSystemManagementService - 10_hv_version.py: FAIL > ERROR - CIM says version is `%s', but libvirt says `%s' > > VirtualSystemManagementService - 12_referenced_config.py: FAIL > ERROR - EnabledState is 3 instead of 2. > ERROR - Try to increase the timeout and run the test again > ERROR - Unable to start rstest_domain > ERROR - Unable to start rstest_domain > > ======================CIMTEST FULL > REPORT================================== > AllocationCapabilities - 01_enum.py: PASS > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > ComputerSystem - 01_enum.py: PASS > ComputerSystem - 02_nosystems.py: PASS > ComputerSystem - 03_defineVS.py: PASS > ComputerSystem - 04_defineStartVS.py: PASS > ComputerSystem - 05_activate_defined_start.py: PASS > ComputerSystem - 06_paused_active_suspend.py: SKIP > ComputerSystem - 22_define_suspend.py: PASS > ComputerSystem - 23_suspend_suspend.py: SKIP > ComputerSystem - 27_define_suspend_errs.py: PASS > ComputerSystem - 32_start_reboot.py: SKIP > ComputerSystem - 33_suspend_reboot.py: SKIP > ComputerSystem - 35_start_reset.py: SKIP > ComputerSystem - 40_RSC_start.py: SKIP > ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP > ComputerSystem - 42_cs_gi_errs.py: PASS > ComputerSystemIndication - 01_created_indication.py: SKIP > ElementAllocatedFromPool - 01_forward.py: PASS > ElementAllocatedFromPool - 02_reverse.py: PASS > ElementAllocatedFromPool - 03_reverse_errs.py: SKIP > ElementAllocatedFromPool - 04_forward_errs.py: SKIP > ElementCapabilities - 01_forward.py: PASS > ElementCapabilities - 02_reverse.py: PASS > ElementCapabilities - 03_forward_errs.py: PASS > ElementCapabilities - 04_reverse_errs.py: PASS > ElementCapabilities - 05_hostsystem_cap.py: PASS > ElementConforms - 01_forward.py: PASS > ElementConforms - 02_reverse.py: PASS > ElementConforms - 03_ectp_fwd_errs.py: PASS > ElementConforms - 04_ectp_rev_errs.py: PASS > ElementSettingData - 01_forward.py: PASS > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > EnabledLogicalElementCapabilities - 01_enum.py: PASS > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > HostSystem - 01_enum.py: PASS > HostSystem - 02_hostsystem_to_rasd.py: PASS > HostSystem - 03_hs_to_settdefcap.py: PASS > HostSystem - 04_hs_to_EAPF.py: PASS > HostSystem - 05_hs_gi_errs.py: PASS > HostSystem - 06_hs_to_vsms.py: PASS > HostedDependency - 01_forward.py: PASS > HostedDependency - 02_reverse.py: PASS > HostedDependency - 03_enabledstate.py: SKIP > HostedDependency - 04_reverse_errs.py: PASS > HostedResourcePool - 01_forward.py: PASS > HostedResourcePool - 02_reverse.py: PASS > HostedResourcePool - 03_forward_errs.py: PASS > HostedResourcePool - 04_reverse_errs.py: PASS > HostedService - 01_forward.py: PASS > HostedService - 02_reverse.py: PASS > HostedService - 03_forward_errs.py: PASS > HostedService - 04_reverse_errs.py: PASS > LogicalDisk - 01_disk.py: SKIP > LogicalDisk - 02_nodevs.py: PASS > LogicalDisk - 03_ld_gi_errs.py: SKIP > Memory - 01_memory.py: PASS > Memory - 02_defgetmem.py: PASS > Memory - 03_mem_gi_errs.py: PASS > NetworkPort - 01_netport.py: SKIP > NetworkPort - 02_np_gi_errors.py: PASS > NetworkPort - 03_user_netport.py: SKIP > Processor - 01_processor.py: SKIP > Processor - 02_definesys_get_procs.py: SKIP > Processor - 03_proc_gi_errs.py: SKIP > Profile - 01_enum.py: PASS > Profile - 02_profile_to_elec.py: SKIP > Profile - 03_rprofile_gi_errs.py: PASS > RASD - 01_verify_rasd_fields.py: PASS > RASD - 02_enum.py: PASS > RASD - 03_rasd_errs.py: PASS > RASD - 04_disk_rasd_size.py: SKIP > ReferencedProfile - 01_verify_refprof.py: PASS > ReferencedProfile - 02_refprofile_errs.py: PASS > ResourceAllocationFromPool - 01_forward.py: PASS > ResourceAllocationFromPool - 02_reverse.py: PASS > ResourceAllocationFromPool - 03_forward_errs.py: PASS > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > ResourceAllocationFromPool - 05_RAPF_err.py: SKIP > ResourcePool - 01_enum.py: PASS > ResourcePool - 02_rp_gi_errors.py: PASS > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > ResourcePoolConfigurationService - 01_enum.py: PASS > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP > ResourcePoolConfigurationService - > 06_RemoveResourcesFromResourcePool.py: SKIP > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP > SettingsDefine - 01_forward.py: PASS > SettingsDefine - 02_reverse.py: PASS > SettingsDefine - 03_sds_fwd_errs.py: PASS > SettingsDefine - 04_sds_rev_errs.py: PASS > SettingsDefineCapabilities - 01_forward.py: PASS > SettingsDefineCapabilities - 03_forward_errs.py: XFAIL Bug: Test > error: returned XFAIL without a valid bug string. > ERROR - 'LXC_SettingsDefineCapabilities' association failed to > generate an exception and 'WrongClassName' passed. > ERROR - ------ FAILED: Invalid CCName Key Name.------ > Bug:<> > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS > SystemDevice - 01_forward.py: PASS > SystemDevice - 02_reverse.py: PASS > SystemDevice - 03_fwderrs.py: PASS > VSSD - 01_enum.py: PASS > VSSD - 02_bootldr.py: SKIP > VSSD - 03_vssd_gi_errs.py: PASS > VSSD - 04_vssd_to_rasd.py: PASS > VirtualSystemManagementCapabilities - 01_enum.py: PASS > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > VirtualSystemManagementService - 01_definesystem_name.py: PASS > VirtualSystemManagementService - 02_destroysystem.py: PASS > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > VirtualSystemManagementService - 06_addresource.py: SKIP > VirtualSystemManagementService - 07_addresource_neg.py: PASS > VirtualSystemManagementService - 08_modifyresource.py: SKIP > VirtualSystemManagementService - 09_procrasd_persist.py: SKIP > VirtualSystemManagementService - 10_hv_version.py: FAIL > ERROR - CIM says version is `%s', but libvirt says `%s' > VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP > VirtualSystemManagementService - 12_referenced_config.py: FAIL > ERROR - EnabledState is 3 instead of 2. > ERROR - Try to increase the timeout and run the test again > ERROR - Unable to start rstest_domain > ERROR - Unable to start rstest_domain > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > VirtualSystemMigrationSettingData - 01_enum.py: PASS > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > VirtualSystemSettingDataComponent - 01_forward.py: PASS > VirtualSystemSettingDataComponent - 02_reverse.py: PASS > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS > VirtualSystemSnapshotService - 01_enum.py: PASS > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > VirtualSystemSnapshotServiceCapabilities - > 02_vs_sservicecap_gi_errs.py: PASS > > > Best, > Regards > > Daisy (???) > VSM Team, China Systems & Technology Labs (CSTL) > E-mail: yunguol at cn.ibm.com > TEL: (86)-21-60922403 > Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From ugopalak at in.ibm.com Thu Aug 14 14:20:34 2008 From: ugopalak at in.ibm.com (U Gopalakrishnan) Date: Thu, 14 Aug 2008 19:50:34 +0530 Subject: [Libvirt-cim] libvirt-cim 0.5.1/configure fails with 'No package 'libvirt' found ' Message-ID: Hi, I am trying to setup libvirt-cim 0.5.1 in RHEL 5.2. After unzipping the tar ball when I run ./configure it fails with checking for LIBVIRT... configure: error: Package requirements (libvirt >= 0.3.2) were not met: No package 'libvirt' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBVIRT_CFLAGS and LIBVIRT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. I have libvirt 0.3.3 installed in the system. Also I have open pegasus 2.7 installed. Here is relevant rpm queries. [root at pearl2-009002218157 libvirt-cim-0.5.1]# rpm -q libvirt libvirt-0.3.3-7.el5 [root at pearl2-009002218157 libvirt-cim-0.5.1]# rpm -q tog-pegasus tog-pegasus-2.7.0-2.el5 [root at pearl2-009002218157 libvirt-cim-0.5.1]# Any Ideas? Thanks Gopal -------------- next part -------------- An HTML attachment was scrubbed... URL: From danms at us.ibm.com Thu Aug 14 14:28:26 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 14 Aug 2008 07:28:26 -0700 Subject: [Libvirt-cim] [PATCH] Update VirtualSystemManagementCapabilities to show Add/Remove resources Message-ID: <86d7161daef682ba869f.1218724106@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1218724102 25200 # Node ID 86d7161daef682ba869fbae74133cfd811f1d306 # Parent 9c6a7cfd8c0bd78bef65b60fad37b0873582d09d Update VirtualSystemManagementCapabilities to show Add/Remove resources as supported for synchronous calls. Signed-off-by: Dan Smith diff -r 9c6a7cfd8c0b -r 86d7161daef6 src/Virt_VirtualSystemManagementCapabilities.c --- a/src/Virt_VirtualSystemManagementCapabilities.c Fri Aug 08 15:21:28 2008 -0700 +++ b/src/Virt_VirtualSystemManagementCapabilities.c Thu Aug 14 07:28:22 2008 -0700 @@ -58,21 +58,27 @@ CMSetProperty(inst, "InstanceID", (CMPIValue *)"ManagementCapabilities", CMPI_chars); - array = CMNewArray(broker, 4, CMPI_uint16, &s); + array = CMNewArray(broker, 6, CMPI_uint16, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullObject(array)) goto out; - - element = (uint16_t)DEFINE_SYSTEM; + + element = (uint16_t)ADD_RESOURCES; CMSetArrayElementAt(array, 0, &element, CMPI_uint16); - element = (uint16_t)DESTROY_SYSTEM; + element = (uint16_t)DEFINE_SYSTEM; CMSetArrayElementAt(array, 1, &element, CMPI_uint16); - element = (uint16_t)MOD_RESOURCE_SETTINGS; + element = (uint16_t)DESTROY_SYSTEM; CMSetArrayElementAt(array, 2, &element, CMPI_uint16); + element = (uint16_t)MOD_RESOURCE_SETTINGS; + CMSetArrayElementAt(array, 3, &element, CMPI_uint16); + element = (uint16_t)MOD_SYS_SETTINGS; - CMSetArrayElementAt(array, 3, &element, CMPI_uint16); + CMSetArrayElementAt(array, 4, &element, CMPI_uint16); + + element = (uint16_t)RM_RESOURCES; + CMSetArrayElementAt(array, 5, &element, CMPI_uint16); CMSetProperty(inst, "SynchronousMethodsSupported", (CMPIValue *)&array, CMPI_uint16A); From kaitlin at linux.vnet.ibm.com Thu Aug 14 16:11:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 14 Aug 2008 09:11:59 -0700 Subject: [Libvirt-cim] [PATCH] Update VirtualSystemManagementCapabilities to show Add/Remove resources In-Reply-To: <86d7161daef682ba869f.1218724106@guaranine.danplanet.com> References: <86d7161daef682ba869f.1218724106@guaranine.danplanet.com> Message-ID: <48A4594F.7000004@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1218724102 25200 > # Node ID 86d7161daef682ba869fbae74133cfd811f1d306 > # Parent 9c6a7cfd8c0bd78bef65b60fad37b0873582d09d > Update VirtualSystemManagementCapabilities to show Add/Remove resources > as supported for synchronous calls. > > Signed-off-by: Dan Smith > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Aug 14 16:20:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 14 Aug 2008 09:20:21 -0700 Subject: [Libvirt-cim] Re: CimTest Report on XenFV 14-08-2008 In-Reply-To: <48A42248.4090108@linux.vnet.ibm.com> References: <48A41B40.609@linux.vnet.ibm.com> <48A42248.4090108@linux.vnet.ibm.com> Message-ID: <48A45B45.9040200@linux.vnet.ibm.com> >> >> All of the failing tc passed when run manually. >> >> LogicalDisk - 02_nodevs.py: FAIL > The above test case fails in the bulk run but does not when run > individually. This is because the guest domain information "test_domain" > that is created by the first test case is still persistent when the > 02_nodevs.py tc is executed. > Here is the o/p of the devices.enumerate() function called within the > 02_nodevs.py tc. This tc does not define any domain but yet it has the > information about the domain. > Thu, 14 Aug 2008 05:14:10:TEST LOG:INFO - ====02_nodevs.py Log==== > Thu, 14 Aug 2008 05:14:11:TEST LOG:ERROR - DEBUG Sys on the > machine are ['Domain-0'] > Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG > test_domain123/hda > Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG Xen_LogicalDisk > Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG test_domain123 > Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG > Xen_ComputerSystem > Thu, 14 Aug 2008 05:14:12:TEST LOG:ERROR - DEBUG key_list is > {'CreationClassName': u'Xen_LogicalDisk', 'SystemName': > u'test_domain123', 'DeviceID': u'test_domain123/hda', > 'SystemCreationClassName': u'Xen_ComputerSystem'} This looks like you're hitting the caching issue in libvirt. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Aug 14 16:26:24 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 14 Aug 2008 09:26:24 -0700 Subject: [Libvirt-cim] libvirt-cim 0.5.1/configure fails with 'No package 'libvirt' found ' In-Reply-To: (U. Gopalakrishnan's message of "Thu, 14 Aug 2008 19:50:34 +0530") References: Message-ID: <87bpzvh8b3.fsf@caffeine.beaverton.ibm.com> UG> I have libvirt 0.3.3 installed in the system. Also I have open UG> pegasus 2.7 installed. You need libvirt-devel as well, in order to compile additional packages against it. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Thu Aug 14 16:32:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 14 Aug 2008 09:32:59 -0700 Subject: [Libvirt-cim] libvirt-cim 0.5.1/configure fails with 'No package 'libvirt' found ' In-Reply-To: References: Message-ID: <48A45E3B.4030309@linux.vnet.ibm.com> U Gopalakrishnan wrote: > > Hi, > Hello =) > > [root at pearl2-009002218157 libvirt-cim-0.5.1]# rpm -q libvirt > libvirt-0.3.3-7.el5 You'll also need the libvirt-devel package installed. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Aug 14 16:24:27 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 14 Aug 2008 09:24:27 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add test report generation In-Reply-To: <48A352D7.7000803@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Wed, 13 Aug 2008 14:32:07 -0700") References: <48A31003.6000802@linux.vnet.ibm.com> <87d4kcaijz.fsf@caffeine.beaverton.ibm.com> <48A352D7.7000803@linux.vnet.ibm.com> Message-ID: <87fxp7h8ec.fsf@caffeine.beaverton.ibm.com> KR> I think it works better to pad the string in this case; I came up with: KR> results += " %-10s: %d\n" % (type, val) Oh, right, I forgot that XFAIL was in there, and longer than the rest. This should help make test reporting easier. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Aug 15 16:23:15 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 15 Aug 2008 09:23:15 -0700 Subject: [Libvirt-cim] [PATCH] Remove hardcoded Xen prefix from VSMigrationService Message-ID: <69b76cf7611d1878d13a.1218817395@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1218817830 25200 # Node ID 69b76cf7611d1878d13af3218142b927afd509ca # Parent 86d7161daef682ba869fbae74133cfd811f1d306 Remove hardcoded Xen prefix from VSMigrationService Also fix prefix of MigrationJob to be that of the virt type. Removed unnecessary comments and fixed one comment that was over 80 chars in length. Signed-off-by: Kaitlin Rupert diff -r 86d7161daef6 -r 69b76cf7611d schema/VSMigrationService.mof --- a/schema/VSMigrationService.mof Thu Aug 14 07:28:22 2008 -0700 +++ b/schema/VSMigrationService.mof Fri Aug 15 09:30:30 2008 -0700 @@ -65,7 +65,7 @@ ); }; -class Virt_MigrationJob : CIM_ConcreteJob { +class Xen_MigrationJob : CIM_ConcreteJob { }; [Provider("cmpi::Virt_VSMigrationService")] diff -r 86d7161daef6 -r 69b76cf7611d src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Thu Aug 14 07:28:22 2008 -0700 +++ b/src/Virt_VSMigrationService.c Fri Aug 15 09:30:30 2008 -0700 @@ -722,8 +722,7 @@ ind_name = ind_type_to_name(ind_type); - /* FIXME: This is a hack until we un-Xenify this provider */ - ref = CMNewObjectPath(_BROKER, ns, "Xen_Foo", &s); + ref = CMGetObjectPath(inst, &s); if ((ref == NULL) || (s.rc != CMPI_RC_OK)) { CU_DEBUG("Failed to get job reference"); } else { @@ -734,15 +733,7 @@ } else { CU_DEBUG("Unable to get HostSystem properties"); } - } - /* FIXME: This should be merged with above once the job path is - * properly typed - */ - ref = CMGetObjectPath(inst, &s); - if ((ref == NULL) || (s.rc != CMPI_RC_OK)) { - CU_DEBUG("Failed to get job reference"); - } else { CMPIString *str; str = CMObjectPathToString(ref, &s); @@ -758,8 +749,7 @@ CMSetProperty(ind, "SourceInstance", (CMPIValue *)&inst, CMPI_instance); - /* Seems like this shouldn't be hardcoded. */ - type = get_typed_class("Xen", ind_name); + type = get_typed_class(CLASSNAME(ref), ind_name); s = stdi_raise_indication(_BROKER, context, type, ns, ind); @@ -770,33 +760,35 @@ static CMPIInstance *prepare_indication(const CMPIBroker *broker, CMPIInstance *inst, - char *ns, + struct migration_job *job, int ind_type, CMPIStatus *s) { const char *ind_name = NULL; CMPIInstance *ind = NULL; CMPIInstance *prev_inst = NULL; + const char *pfx = NULL; ind_name = ind_type_to_name(ind_type); CU_DEBUG("Creating indication."); - /* Prefix needs to be dynamic */ + + pfx = pfx_from_conn(job->conn); + ind = get_typed_instance(broker, - "Xen", + pfx, ind_name, - ns); - /* Prefix needs to be dynamic */ + job->ref_ns); if (ind == NULL) { CU_DEBUG("Failed to create ind, type '%s:%s_%s'", - ns, "Xen", ind_name); + job->ref_ns, pfx, ind_name); goto out; } if (ind_type == MIG_MODIFIED) { - /* Need to copy job inst before attaching as PreviousInstance because - otherwise the changes we are about to make to job inst are made - to PreviousInstance as well. */ + /* Need to copy job inst before attaching as PreviousInstance + because otherwise the changes we are about to make to job + inst are made to PreviousInstance as well. */ prev_inst = cu_dup_instance(_BROKER, inst, s); if (s->rc != CMPI_RC_OK || prev_inst == NULL) { CU_DEBUG("dup_instance failed (%i:%s)", s->rc, s->msg); @@ -816,15 +808,20 @@ CMPIStatus *s) { CMPIObjectPath *ref = NULL; + char *type; + + type = get_typed_class(job->ref_cn, "MigrationJob"); ref = CMNewObjectPath(_BROKER, job->ref_ns, - "Virt_MigrationJob", + type, s); - if (s->rc != CMPI_RC_OK) { + if (s->rc != CMPI_RC_OK) { CU_DEBUG("Failed to create job ref for update"); goto out; } + + free(type); CMSetNameSpace(ref, job->ref_ns); CMAddKey(ref, "InstanceID", (CMPIValue *)job->uuid, CMPI_chars); @@ -855,7 +852,7 @@ return; } - ind = prepare_indication(_BROKER, inst, job->ref_ns, MIG_DELETED, &s); + ind = prepare_indication(_BROKER, inst, job, MIG_DELETED, &s); rc = raise_indication(job->context, MIG_DELETED, job->ref_ns, inst, ind); @@ -886,7 +883,7 @@ return; } - ind = prepare_indication(_BROKER, inst, job->ref_ns, MIG_MODIFIED, &s); + ind = prepare_indication(_BROKER, inst, job, MIG_MODIFIED, &s); CMSetProperty(inst, "JobState", (CMPIValue *)&state, CMPI_uint16); @@ -1238,6 +1235,7 @@ CMPIDateTime *start; CMPIBoolean autodelete = true; uint16_t state = CIM_JOBSTATE_STARTING; + char *type = NULL; start = CMNewDateTime(_BROKER, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullObject(start)) { @@ -1246,9 +1244,10 @@ "Failed to get job start time"); goto out; } + + type = get_typed_class(job->ref_cn, "MigrationJob"); - jobinst = _migrate_job_new_instance("Virt_MigrationJob", - job->ref_ns); + jobinst = _migrate_job_new_instance(type, job->ref_ns); if (jobinst == NULL) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -1291,6 +1290,8 @@ CMSetNameSpace(*job_op, job->ref_ns); out: + free(type); + return s; } @@ -1362,7 +1363,7 @@ goto out; } - ind = prepare_indication(_BROKER, inst, job->ref_ns, MIG_CREATED, &s); + ind = prepare_indication(_BROKER, inst, job, MIG_CREATED, &s); rc = raise_indication(job->context, MIG_CREATED, job->ref_ns, inst, ind); if (!rc) From danms at us.ibm.com Fri Aug 15 16:33:03 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 15 Aug 2008 09:33:03 -0700 Subject: [Libvirt-cim] [PATCH] Override devices in reference configuration, where the ID is the same Message-ID: # HG changeset patch # User Dan Smith # Date 1218817591 25200 # Node ID df2834c111fe5cee0ec322d7a4f10a0083638eae # Parent 86d7161daef682ba869fbae74133cfd811f1d306 Override devices in reference configuration, where the ID is the same Currently, we depend on libvirt to return an error if the client's combination of ReferenceConfig and ResourceSettings results in a duplicate device. That error is non-obvious in origin. Since two devices that would result in the same InstanceID cannot be properly represented by the providers anyway, this patch adds some logic to properly override such a conflicting device. To do this, I had to make sure we set the ID in rasd_to_vdev, which wasn't previously required. The actual insertion of the device into the appropriate type list is done by a helper function which checks for (and overrides if appropriate) a duplicate before tacking the new instance on the end of the list. Signed-off-by: Dan Smith diff -r 86d7161daef6 -r df2834c111fe src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Thu Aug 14 07:28:22 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Fri Aug 15 09:26:31 2008 -0700 @@ -411,6 +411,9 @@ free(dev->dev.net.mac); dev->dev.net.mac = strdup(val); + free(dev->id); + dev->id = strdup(dev->dev.net.mac); + op = CMGetObjectPath(inst, NULL); if (op == NULL) { CU_DEBUG("Unable to get instance path"); @@ -449,6 +452,9 @@ dev->dev.disk.source = strdup(val); dev->dev.disk.disk_type = disk_type_from_file(val); + free(dev->id); + dev->id = strdup(dev->dev.disk.virtual_dev); + return NULL; } @@ -469,6 +475,9 @@ free(dev->dev.disk.source); dev->dev.disk.source = strdup(val); dev->dev.disk.disk_type = DISK_FS; + + free(dev->id); + dev->id = strdup(dev->dev.disk.virtual_dev); return NULL; } @@ -621,6 +630,33 @@ return true; } +static char *add_device_nodup(struct virt_device *dev, + struct virt_device *list, + int max, + int *index) +{ + int i; + + for (i = 0; i < *index; i++) { + struct virt_device *ptr = &list[i]; + + if (STREQC(ptr->id, dev->id)) { + CU_DEBUG("Overriding device %s from refconf", ptr->id); + cleanup_virt_device(ptr); + memcpy(ptr, dev, sizeof(*ptr)); + return NULL; + } + } + + if (*index == max) + return "Internal error: no more device slots"; + + memcpy(&list[*index], dev, sizeof(list[*index])); + *index += 1; + + return NULL; +} + static const char *classify_resources(CMPIArray *resources, const char *ns, struct domain *domain) @@ -678,15 +714,31 @@ &domain->dev_mem[0], ns); } else if (type == CIM_RES_TYPE_DISK) { + struct virt_device dev; + + memset(&dev, 0, sizeof(dev)); msg = rasd_to_vdev(inst, domain, - &domain->dev_disk[domain->dev_disk_ct++], + &dev, ns); + if (msg == NULL) + msg = add_device_nodup(&dev, + domain->dev_disk, + count, + &domain->dev_disk_ct); } else if (type == CIM_RES_TYPE_NET) { + struct virt_device dev; + + memset(&dev, 0, sizeof(dev)); msg = rasd_to_vdev(inst, domain, - &domain->dev_net[domain->dev_net_ct++], + &dev, ns); + if (msg == NULL) + msg = add_device_nodup(&dev, + domain->dev_net, + count, + &domain->dev_net_ct); } if (msg != NULL) return msg; From danms at us.ibm.com Fri Aug 15 16:43:00 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 15 Aug 2008 09:43:00 -0700 Subject: [Libvirt-cim] [PATCH] Remove hardcoded Xen prefix from VSMigrationService In-Reply-To: <69b76cf7611d1878d13a.1218817395@elm3b41.beaverton.ibm.com> (Kaitlin Rupert's message of "Fri, 15 Aug 2008 09:23:15 -0700") References: <69b76cf7611d1878d13a.1218817395@elm3b41.beaverton.ibm.com> Message-ID: <87skt6z0tn.fsf@caffeine.beaverton.ibm.com> KR> static CMPIInstance *prepare_indication(const CMPIBroker *broker, KR> CMPIInstance *inst, KR> - char *ns, KR> + struct migration_job *job, KR> int ind_type, KR> CMPIStatus *s) KR> { KR> const char *ind_name = NULL; KR> CMPIInstance *ind = NULL; KR> CMPIInstance *prev_inst = NULL; KR> + const char *pfx = NULL; KR> ind_name = ind_type_to_name(ind_type); KR> CU_DEBUG("Creating indication."); KR> - /* Prefix needs to be dynamic */ KR> + KR> + pfx = pfx_from_conn(job->conn); I think you leak 'pfx'. KR> @@ -816,15 +808,20 @@ KR> CMPIStatus *s) KR> { KR> CMPIObjectPath *ref = NULL; KR> + char *type; KR> + KR> + type = get_typed_class(job->ref_cn, "MigrationJob"); KR> ref = CMNewObjectPath(_BROKER, job-> ref_ns, KR> - "Virt_MigrationJob", KR> + type, KR> s); KR> - if (s->rc != CMPI_RC_OK) { KR> + if (s->rc != CMPI_RC_OK) { The only change to this line is the addition of some trailing whitespace. KR> CU_DEBUG("Failed to create job ref for update"); KR> goto out; KR> } KR> + KR> + free(type); It looks like you leak 'type' if you take the "goto out" in the context above. There may be other places too. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Aug 15 16:50:15 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 15 Aug 2008 09:50:15 -0700 Subject: [Libvirt-cim] [PATCH] Remove hardcoded Xen prefix from VSMigrationService In-Reply-To: <87skt6z0tn.fsf@caffeine.beaverton.ibm.com> References: <69b76cf7611d1878d13a.1218817395@elm3b41.beaverton.ibm.com> <87skt6z0tn.fsf@caffeine.beaverton.ibm.com> Message-ID: <48A5B3C7.7030409@linux.vnet.ibm.com> > KR> CMPIInstance *prev_inst = NULL; > KR> + const char *pfx = NULL; > > KR> + > KR> + pfx = pfx_from_conn(job->conn); > > I think you leak 'pfx'. pfx is const. > > KR> @@ -816,15 +808,20 @@ > KR> CMPIStatus *s) > KR> { > KR> CMPIObjectPath *ref = NULL; > KR> + char *type; > KR> + > KR> + type = get_typed_class(job->ref_cn, "MigrationJob"); > KR> ref = CMNewObjectPath(_BROKER, > job-> ref_ns, > KR> - "Virt_MigrationJob", > KR> + type, > KR> s); > KR> - if (s->rc != CMPI_RC_OK) { > KR> + if (s->rc != CMPI_RC_OK) { > > The only change to this line is the addition of some trailing > whitespace. Oops, missed that when I previewed the patch. > > KR> CU_DEBUG("Failed to create job ref for update"); > KR> goto out; > KR> } > KR> + > KR> + free(type); > > It looks like you leak 'type' if you take the "goto out" in the context > above. There may be other places too. Yikes - yep will resent with this and the above fixed. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From ugopalak at in.ibm.com Fri Aug 15 16:52:45 2008 From: ugopalak at in.ibm.com (U Gopalakrishnan) Date: Fri, 15 Aug 2008 22:22:45 +0530 Subject: [Libvirt-cim] libvirt-cim 0.5.1/configure fails with 'No package 'libvirt' found ' Message-ID: Thanks! Installed libvirt-devel and I don't get 'No package 'libvirt' found '. But now it fails with 'No package 'libcmpiutil' found'. I worked aorund the problem by setting the following environment variables LIBCU_CFLAGS=-I/usr/include/ LIBCU_LIBS="-L/usr/lib -lcmpiutil -lz -lm" and successfully built libvirt-cim. Thats probably not the correct way of solving this problem, I guess, is it? (Sorry for my ignorance I am more of Ant/Maven build person, and hasn't done lot of make builds :- ( ) I have downloaded libcmpiutil source tar from ftp://libvirt.org/libvirt/CIM/libcmpiutil-0.4.tar.gz and built it and installed. What is the correct way of solving the above mentioned problem? Is there a libcmpiutil-devel package that I should install? Thanks Gopal. -------------- next part -------------- An HTML attachment was scrubbed... URL: From danms at us.ibm.com Fri Aug 15 16:53:45 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 15 Aug 2008 09:53:45 -0700 Subject: [Libvirt-cim] [PATCH] Remove hardcoded Xen prefix from VSMigrationService In-Reply-To: <48A5B3C7.7030409@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Fri, 15 Aug 2008 09:50:15 -0700") References: <69b76cf7611d1878d13a.1218817395@elm3b41.beaverton.ibm.com> <87skt6z0tn.fsf@caffeine.beaverton.ibm.com> <48A5B3C7.7030409@linux.vnet.ibm.com> Message-ID: <87od3uz0bq.fsf@caffeine.beaverton.ibm.com> KR> pfx is const. Oh, right, from the connection. My bad :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Fri Aug 15 17:10:30 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 15 Aug 2008 10:10:30 -0700 Subject: [Libvirt-cim] libvirt-cim 0.5.1/configure fails with 'No package 'libvirt' found ' In-Reply-To: (U. Gopalakrishnan's message of "Fri, 15 Aug 2008 22:22:45 +0530") References: Message-ID: <87k5eiyzjt.fsf@caffeine.beaverton.ibm.com> UG> What is the correct way of solving the above mentioned problem? Is UG> there a libcmpiutil-devel package that I should install? If you had done PKG_CONFIG_PATH=/usr/local/lib/pkgconfig it should have found the library. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Aug 15 21:28:13 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 15 Aug 2008 14:28:13 -0700 Subject: [Libvirt-cim] [PATCH] Override devices in reference configuration, where the ID is the same In-Reply-To: References: Message-ID: <48A5F4ED.5060701@linux.vnet.ibm.com> > > +static char *add_device_nodup(struct virt_device *dev, > + struct virt_device *list, > + int max, > + int *index) > +{ > + int i; > + > + for (i = 0; i < *index; i++) { > + struct virt_device *ptr = &list[i]; > + > + if (STREQC(ptr->id, dev->id)) { > + CU_DEBUG("Overriding device %s from refconf", ptr->id); > + cleanup_virt_device(ptr); > + memcpy(ptr, dev, sizeof(*ptr)); > + return NULL; > + } > + } > + > + if (*index == max) > + return "Internal error: no more device slots"; I don't think this handles the case where the user supplies a disk/net RASD for the ResourceSettings that is different from the disk/net device specified in the ReferencedConfiguration guest. Let say the user only specifies the RefConfig plus an additional net device for the ResourceSettings. The value for count is 1 (because that's the size of the array passed in). The net device isn't a dup, so the value of index is bumped up to 1, and we return an error. Some debug I added: Virt_VirtualSystemManagementService.c(643): trying to add aa:aa:aa:00:00:00 - the value of refconf dev id is 11:22:33:aa:bb:cc Virt_VirtualSystemManagementService.c(652): *index is 1, max is 1 Virt_VirtualSystemManagementService.c(983): Failed to classify resources: Internal error: no more device slots -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Fri Aug 15 21:38:13 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 15 Aug 2008 14:38:13 -0700 Subject: [Libvirt-cim] [PATCH] Override devices in reference configuration, where the ID is the same In-Reply-To: <48A5F4ED.5060701@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Fri, 15 Aug 2008 14:28:13 -0700") References: <48A5F4ED.5060701@linux.vnet.ibm.com> Message-ID: <878wuyyn5m.fsf@caffeine.beaverton.ibm.com> KR> Let say the user only specifies the RefConfig plus an additional net KR> device for the ResourceSettings. The value for count is 1 (because KR> that's the size of the array passed in). The net device isn't a KR> dup, so the value of index is bumped up to 1, and we return an KR> error. Oh, right, hmm. That must have been broken with refconf before, I think. That scenario worked for me in my testing, but I think I actually lucked out because of the way I was doing my resources. Hrm, I'll have to think about the best way to fix up the list max length. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Aug 15 22:37:26 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 15 Aug 2008 15:37:26 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VSMS-10_hv_version.py to XFAIL status because that libvirt does not support virConnectGetVersion function In-Reply-To: <1f30a898cb2e30587ebf.1218679813@elm3b217.beaverton.ibm.com> References: <1f30a898cb2e30587ebf.1218679813@elm3b217.beaverton.ibm.com> Message-ID: <48A60526.4080700@linux.vnet.ibm.com> > > @do_main(sup_types) > def main(): > @@ -51,7 +52,7 @@ def main(): > if cim_ver != local_ver: > logger.error("CIM says version is `%s', but libvirt says `%s'" \ > % (cim_ver, local_ver)) > - return FAIL > + return XFAIL_RC(bug_libvirt) This should only XFAIL in the LXC case. For the other virt types, if cim_ver != local_ver, we need to return a FAIL. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Aug 15 22:54:42 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 15 Aug 2008 15:54:42 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Remove hardcoded Xen prefix from VSMigrationService Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1218817830 25200 # Node ID f40ac4d174324f9ee4c76a4a8832704d3439e7dd # Parent 86d7161daef682ba869fbae74133cfd811f1d306 (#2) Remove hardcoded Xen prefix from VSMigrationService Also fix prefix of MigrationJob to be that of the virt type. Removed unnecessary comments and fixed one comment that was over 80 chars in length. Updates: -Moved free(type) to after the out: in ref_from_job() to prevent memory leak Signed-off-by: Kaitlin Rupert diff -r 86d7161daef6 -r f40ac4d17432 schema/VSMigrationService.mof --- a/schema/VSMigrationService.mof Thu Aug 14 07:28:22 2008 -0700 +++ b/schema/VSMigrationService.mof Fri Aug 15 09:30:30 2008 -0700 @@ -65,7 +65,7 @@ ); }; -class Virt_MigrationJob : CIM_ConcreteJob { +class Xen_MigrationJob : CIM_ConcreteJob { }; [Provider("cmpi::Virt_VSMigrationService")] diff -r 86d7161daef6 -r f40ac4d17432 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Thu Aug 14 07:28:22 2008 -0700 +++ b/src/Virt_VSMigrationService.c Fri Aug 15 09:30:30 2008 -0700 @@ -722,8 +722,7 @@ ind_name = ind_type_to_name(ind_type); - /* FIXME: This is a hack until we un-Xenify this provider */ - ref = CMNewObjectPath(_BROKER, ns, "Xen_Foo", &s); + ref = CMGetObjectPath(inst, &s); if ((ref == NULL) || (s.rc != CMPI_RC_OK)) { CU_DEBUG("Failed to get job reference"); } else { @@ -734,15 +733,7 @@ } else { CU_DEBUG("Unable to get HostSystem properties"); } - } - /* FIXME: This should be merged with above once the job path is - * properly typed - */ - ref = CMGetObjectPath(inst, &s); - if ((ref == NULL) || (s.rc != CMPI_RC_OK)) { - CU_DEBUG("Failed to get job reference"); - } else { CMPIString *str; str = CMObjectPathToString(ref, &s); @@ -758,8 +749,7 @@ CMSetProperty(ind, "SourceInstance", (CMPIValue *)&inst, CMPI_instance); - /* Seems like this shouldn't be hardcoded. */ - type = get_typed_class("Xen", ind_name); + type = get_typed_class(CLASSNAME(ref), ind_name); s = stdi_raise_indication(_BROKER, context, type, ns, ind); @@ -770,33 +760,35 @@ static CMPIInstance *prepare_indication(const CMPIBroker *broker, CMPIInstance *inst, - char *ns, + struct migration_job *job, int ind_type, CMPIStatus *s) { const char *ind_name = NULL; CMPIInstance *ind = NULL; CMPIInstance *prev_inst = NULL; + const char *pfx = NULL; ind_name = ind_type_to_name(ind_type); CU_DEBUG("Creating indication."); - /* Prefix needs to be dynamic */ + + pfx = pfx_from_conn(job->conn); + ind = get_typed_instance(broker, - "Xen", + pfx, ind_name, - ns); - /* Prefix needs to be dynamic */ + job->ref_ns); if (ind == NULL) { CU_DEBUG("Failed to create ind, type '%s:%s_%s'", - ns, "Xen", ind_name); + job->ref_ns, pfx, ind_name); goto out; } if (ind_type == MIG_MODIFIED) { - /* Need to copy job inst before attaching as PreviousInstance because - otherwise the changes we are about to make to job inst are made - to PreviousInstance as well. */ + /* Need to copy job inst before attaching as PreviousInstance + because otherwise the changes we are about to make to job + inst are made to PreviousInstance as well. */ prev_inst = cu_dup_instance(_BROKER, inst, s); if (s->rc != CMPI_RC_OK || prev_inst == NULL) { CU_DEBUG("dup_instance failed (%i:%s)", s->rc, s->msg); @@ -816,10 +808,13 @@ CMPIStatus *s) { CMPIObjectPath *ref = NULL; + char *type; + + type = get_typed_class(job->ref_cn, "MigrationJob"); ref = CMNewObjectPath(_BROKER, job->ref_ns, - "Virt_MigrationJob", + type, s); if (s->rc != CMPI_RC_OK) { CU_DEBUG("Failed to create job ref for update"); @@ -833,6 +828,8 @@ CMGetCharPtr(CMObjectPathToString(ref, NULL))); out: + free(type); + return ref; } @@ -855,7 +852,7 @@ return; } - ind = prepare_indication(_BROKER, inst, job->ref_ns, MIG_DELETED, &s); + ind = prepare_indication(_BROKER, inst, job, MIG_DELETED, &s); rc = raise_indication(job->context, MIG_DELETED, job->ref_ns, inst, ind); @@ -886,7 +883,7 @@ return; } - ind = prepare_indication(_BROKER, inst, job->ref_ns, MIG_MODIFIED, &s); + ind = prepare_indication(_BROKER, inst, job, MIG_MODIFIED, &s); CMSetProperty(inst, "JobState", (CMPIValue *)&state, CMPI_uint16); @@ -1238,6 +1235,7 @@ CMPIDateTime *start; CMPIBoolean autodelete = true; uint16_t state = CIM_JOBSTATE_STARTING; + char *type = NULL; start = CMNewDateTime(_BROKER, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullObject(start)) { @@ -1246,9 +1244,10 @@ "Failed to get job start time"); goto out; } + + type = get_typed_class(job->ref_cn, "MigrationJob"); - jobinst = _migrate_job_new_instance("Virt_MigrationJob", - job->ref_ns); + jobinst = _migrate_job_new_instance(type, job->ref_ns); if (jobinst == NULL) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -1291,6 +1290,8 @@ CMSetNameSpace(*job_op, job->ref_ns); out: + free(type); + return s; } @@ -1362,7 +1363,7 @@ goto out; } - ind = prepare_indication(_BROKER, inst, job->ref_ns, MIG_CREATED, &s); + ind = prepare_indication(_BROKER, inst, job, MIG_CREATED, &s); rc = raise_indication(job->context, MIG_CREATED, job->ref_ns, inst, ind); if (!rc) From kaitlin at linux.vnet.ibm.com Fri Aug 15 23:20:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 15 Aug 2008 16:20:59 -0700 Subject: [Libvirt-cim] Cimtest Report for LXC on Fedora 9 (2008/08/13) In-Reply-To: References: Message-ID: <48A60F5B.3070107@linux.vnet.ibm.com> > > > > > > > > > rstest_domain > > > 80ccbf55-dba0-461b-b23f-90a335503680 > > > > > > /tmp/cimtest_lxc_init > > > > > > 524288 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This is missing a valid tty value. This should be: > > > > > > Do you test it with valid tty value? Acutally I used a valid tty value > and > tested yesterday, it still failed for me, the domain can't be started > yet. > > Thanks! > Can you run libvirtd in the foreground to see what error you get when attempting to start the guest? Also, do you see any provider debug that indicates the RequestStateChange() call failed? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Mon Aug 18 04:34:40 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 17 Aug 2008 21:34:40 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix VSMS-10_hv_version.py to XFAIL status because that libvirt does not support virConnectGetVersion function Message-ID: <6a75861bbe432d0cc8f1.1219034080@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1219034073 25200 # Node ID 6a75861bbe432d0cc8f143783cb5d00a75101ecb # Parent e630c2a2e032d2c6e5f6314790ad1601c1381480 [TEST] #2 Fix VSMS-10_hv_version.py to XFAIL status because that libvirt does not support virConnectGetVersion function Signed-off-by: Guolian Yun diff -r e630c2a2e032 -r 6a75861bbe43 suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Mon Aug 11 09:05:45 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Sun Aug 17 21:34:33 2008 -0700 @@ -26,9 +26,10 @@ from XenKvmLib import vsms from CimTest.Globals import do_main from CimTest.Globals import logger -from CimTest.ReturnCodes import FAIL, PASS +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +bug_libvirt = "00006" @do_main(sup_types) def main(): @@ -51,7 +52,10 @@ if cim_ver != local_ver: logger.error("CIM says version is `%s', but libvirt says `%s'" \ % (cim_ver, local_ver)) - return FAIL + if options.virt == 'LXC': + return XFAIL_RC(bug_libvirt) + else: + return FAIL else: logger.info("Verified %s == %s" % (cim_ver, local_ver)) except Exception, details: From yunguol at cn.ibm.com Mon Aug 18 05:44:08 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 18 Aug 2008 13:44:08 +0800 Subject: [Libvirt-cim] LXC on sfcb Test Run Summary for Aug 18 2008 Message-ID: ================================================= LXC on sfcb Test Run Summary for Aug 18 2008 ================================================= Distro: Fedora release 8.92 (Rawhide) Kernel: 2.6.26-rc2-mm1-netns libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.0 Libvirt-cim revision: 667 Libvirt-cim changeset: 86d7161daef6 ================================================= FAIL : 11 XFAIL : 1 SKIP : 36 PASS : 86 ----------------- Total : 134 ================================================= FAIL Test Summary: HostSystem - 04_hs_to_EAPF.py: FAIL VirtualSystemManagementService - 10_hv_version.py: FAIL VirtualSystemManagementService - 12_referenced_config.py: FAIL VirtualSystemMigrationCapabilities - 01_enum.py: FAIL VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: FAIL VirtualSystemMigrationSettingData - 01_enum.py: FAIL VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: FAIL VirtualSystemSnapshotService - 01_enum.py: FAIL VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL VirtualSystemSnapshotServiceCapabilities - 01_enum.py: FAIL VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: FAIL ================================================= XFAIL Test Summary: SettingsDefineCapabilities - 03_forward_errs.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 06_paused_active_suspend.py: SKIP ComputerSystem - 23_suspend_suspend.py: SKIP ComputerSystem - 32_start_reboot.py: SKIP ComputerSystem - 33_suspend_reboot.py: SKIP ComputerSystem - 35_start_reset.py: SKIP ComputerSystem - 40_RSC_start.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystemIndication - 01_created_indication.py: SKIP ElementAllocatedFromPool - 03_reverse_errs.py: SKIP ElementAllocatedFromPool - 04_forward_errs.py: SKIP HostedDependency - 03_enabledstate.py: SKIP LogicalDisk - 01_disk.py: SKIP LogicalDisk - 02_nodevs.py: SKIP LogicalDisk - 03_ld_gi_errs.py: SKIP NetworkPort - 01_netport.py: SKIP NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: SKIP Processor - 02_definesys_get_procs.py: SKIP Processor - 03_proc_gi_errs.py: SKIP Profile - 02_profile_to_elec.py: SKIP RASD - 04_disk_rasd_size.py: SKIP ResourceAllocationFromPool - 05_RAPF_err.py: SKIP ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemManagementService - 08_modifyresource.py: SKIP VirtualSystemManagementService - 09_procrasd_persist.py: SKIP VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: SKIP -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS ERROR - Exception: (1, u'Domain not running') InvokeMethod(RequestStateChange): Domain not running -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: SKIP -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS InvokeMethod(RequestStateChange): Domain not running -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: SKIP -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: SKIP -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: SKIP -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: SKIP -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: SKIP -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: FAIL ERROR - KeyError : u'LXC_ProcessorPool' Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 144, in do_try rc = f() File "04_hs_to_EAPF.py", line 255, in main in_pllist = pool_init_list(virt, pool, net_name, dpool_name) File "04_hs_to_EAPF.py", line 99, in pool_init_list if exp_pllist[CName] == InstID: KeyError: u'LXC_ProcessorPool' ERROR - None -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: SKIP -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: SKIP -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: SKIP -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: SKIP -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: SKIP -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: SKIP -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: SKIP -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: SKIP -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: SKIP -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: XFAIL ERROR - 'LXC_SettingsDefineCapabilities' association failed to generate an exception and 'WrongClassName' passed. ERROR - ------ FAILED: Invalid CCName Key Name.------ Bug:<> -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS InvokeMethod(DefineSystem): Unable to parse embedded object -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS InvokeMethod(DefineSystem): Unable to parse embedded object -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS ERROR - For Invalid Scenario 'noname' ERROR - For Invalid Scenario 'nonexistent' InvokeMethod(DestroySystem): Unable to retrieve domain name. InvokeMethod(DestroySystem): Failed to find domain -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS InvokeMethod(AddResourceSettings): Unable to parse embedded object -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: FAIL ERROR - CIM says version is `LXC 0.0.0', but libvirt says `libvir: error : this function is not supported by the hypervisor: virConnectGetVersion error: failed to get the hypervisor version' -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: FAIL ERROR - EnabledState is 3 instead of 2. ERROR - Try to increase the timeout and run the test again ERROR - Unable to start rstest_domain ERROR - Unable to start rstest_domain -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: FAIL ERROR - LXC_VirtualSystemMigrationCapabilities return 0 instances, excepted only 1 instance Provider not found or not loadable -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: FAIL Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: Invalid InstanceID Key Name.------ Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: Invalid InstanceID Key Value.------ -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: FAIL ERROR - LXC_VirtualSystemMigrationSettingData return 0 instances, excepted only 1 instance Provider not found or not loadable -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: FAIL Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: to check INVALID_Instid_KeyName.------ -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: FAIL ERROR - LXC_VirtualSystemSnapshotService return 0 instances, excepted only 1 instance Provider not found or not loadable -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: to check INVALID_CCName_KeyName.------ -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: FAIL ERROR - LXC_VirtualSystemSnapshotServiceCapabilities return 0 instances, excepted only 1 instance Provider not found or not loadable -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: FAIL Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit msg = self.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format return fmt.format(record) File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format record.message = record.getMessage() File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: to check INVALID_Instid_KeyName.------ -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 18 07:08:04 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 18 Aug 2008 15:08:04 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Aug 18 2008 Message-ID: ================================================= Xen on Pegasus Test Run Summary for Aug 18 2008 ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) Kernel: 2.6.18-92.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 667 Libvirt-cim changeset: 86d7161daef6 ================================================= FAIL : 6 XFAIL : 0 SKIP : 3 PASS : 125 ----------------- Total : 134 ================================================= FAIL Test Summary: LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL NetworkPort - 01_netport.py: FAIL VSSD - 02_bootldr.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 08_modifyresource.py: FAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain not running') InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: FAIL ERROR - Failed to get instance by the class of Xen_LogicalDisk ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/xvda)') -------------------------------------------------------------------- Memory - 01_memory.py: FAIL ERROR - Capacity should be 262144 MB instead of 131072 MB -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: FAIL ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)') -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS InvokeMethod(CreateResourcePool): CIM_ERR_NOT_SUPPORTED -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS InvokeMethod(CreateChildResourcePool): CIM_ERR_NOT_SUPPORTED -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS InvokeMethod(AddResourcesToResourcePool): CIM_ERR_FAILED: Unknown Method -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS InvokeMethod(RemoveResourcesFromResourcePool): CIM_ERR_NOT_SUPPORTED -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS InvokeMethod(DeleteResourcePool): CIM_ERR_NOT_SUPPORTED -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: FAIL ERROR - NameError : global name 'BaseException' is not defined Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 144, in do_try rc = f() File "02_bootldr.py", line 72, in main except BaseException, detail : NameError: global name 'BaseException' is not defined ERROR - None CIM_ERR_NOT_FOUND: No such instance (dom) -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS InvokeMethod(DefineSystem): CIM_ERR_FAILED: Unable to parse embedded object -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS InvokeMethod(DefineSystem): CIM_ERR_FAILED: Unable to parse embedded object -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS ERROR - For Invalid Scenario 'noname' ERROR - For Invalid Scenario 'nonexistent' InvokeMethod(DestroySystem): CIM_ERR_FAILED: Unable to retrieve domain name. InvokeMethod(DestroySystem): CIM_ERR_FAILED: Failed to find domain -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: FAIL ERROR - Error invoking AddRS: add_disk_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unable to parse embedded object -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: FAIL ERROR - Error invoking ModifyRS: mod_vcpu_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS InvokeMethod(CheckVirtualSystemIsMigratableToHost): CIM_ERR_FAILED: Missing key (Name) in ComputerSystem -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 18 07:40:56 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 18 Aug 2008 15:40:56 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Aug 18 2008 In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-18 15:08:04: > > ================================================= > Xen on Pegasus Test Run Summary for Aug 18 2008 > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) > Kernel: 2.6.18-92.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.0 > Libvirt-cim revision: 667 > Libvirt-cim changeset: 86d7161daef6 > ================================================= > FAIL : 6 > XFAIL : 0 > SKIP : 3 > PASS : 125 > ----------------- > Total : 134 > ================================================= All the following test pass when run manually. > FAIL Test Summary: > LogicalDisk - 03_ld_gi_errs.py: FAIL > Memory - 01_memory.py: FAIL > NetworkPort - 01_netport.py: FAIL > VSSD - 02_bootldr.py: FAIL > VirtualSystemManagementService - 06_addresource.py: FAIL > VirtualSystemManagementService - 08_modifyresource.py: FAIL > > ================================================= > SKIP Test Summary: > ComputerSystem - 02_nosystems.py: SKIP > LogicalDisk - 02_nodevs.py: SKIP > NetworkPort - 03_user_netport.py: SKIP > > ================================================= > Full report: > -------------------------------------------------------------------- > AllocationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 02_nosystems.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 03_defineVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 04_defineStartVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 05_activate_defined_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 06_paused_active_suspend.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 22_define_suspend.py: PASS > ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain notrunning') > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running > -------------------------------------------------------------------- > ComputerSystem - 23_suspend_suspend.py: PASS > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running > -------------------------------------------------------------------- > ComputerSystem - 27_define_suspend_errs.py: PASS > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running > -------------------------------------------------------------------- > ComputerSystem - 32_start_reboot.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 33_suspend_reboot.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 35_start_reset.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 40_RSC_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 41_cs_to_settingdefinestate.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 04_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementConforms - 03_ectp_fwd_errs.py: PASS > -------------------------------------------------------------------- > ElementConforms - 04_ectp_rev_errs.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: PASS > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: PASS > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: PASS > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > HostedDependency - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedDependency - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedDependency - 03_enabledstate.py: PASS > -------------------------------------------------------------------- > HostedDependency - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedService - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedService - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 01_disk.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 02_nodevs.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > LogicalDisk - 03_ld_gi_errs.py: FAIL > ERROR - Failed to get instance by the class of > Xen_LogicalDisk > ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such > instance (hd_domain/xvda)') > -------------------------------------------------------------------- > Memory - 01_memory.py: FAIL > ERROR - Capacity should be 262144 MB instead of 131072 MB > -------------------------------------------------------------------- > Memory - 02_defgetmem.py: PASS > -------------------------------------------------------------------- > Memory - 03_mem_gi_errs.py: PASS > -------------------------------------------------------------------- > NetworkPort - 01_netport.py: FAIL > ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such > instance (test_domain/00:11:22:33:44:55)') > -------------------------------------------------------------------- > NetworkPort - 02_np_gi_errors.py: PASS > -------------------------------------------------------------------- > NetworkPort - 03_user_netport.py: SKIP > -------------------------------------------------------------------- > Processor - 01_processor.py: PASS > -------------------------------------------------------------------- > Processor - 02_definesys_get_procs.py: PASS > -------------------------------------------------------------------- > Processor - 03_proc_gi_errs.py: PASS > -------------------------------------------------------------------- > Profile - 01_enum.py: PASS > -------------------------------------------------------------------- > Profile - 02_profile_to_elec.py: PASS > -------------------------------------------------------------------- > Profile - 03_rprofile_gi_errs.py: PASS > -------------------------------------------------------------------- > RASD - 01_verify_rasd_fields.py: PASS > -------------------------------------------------------------------- > RASD - 02_enum.py: PASS > -------------------------------------------------------------------- > RASD - 03_rasd_errs.py: PASS > -------------------------------------------------------------------- > RASD - 04_disk_rasd_size.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > -------------------------------------------------------------------- > ResourcePool - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePool - 02_rp_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > InvokeMethod(CreateResourcePool): CIM_ERR_NOT_SUPPORTED > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > InvokeMethod(CreateChildResourcePool): CIM_ERR_NOT_SUPPORTED > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > InvokeMethod(AddResourcesToResourcePool): CIM_ERR_FAILED: Unknown Method > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS > InvokeMethod(RemoveResourcesFromResourcePool): CIM_ERR_NOT_SUPPORTED > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > InvokeMethod(DeleteResourcePool): CIM_ERR_NOT_SUPPORTED > -------------------------------------------------------------------- > SettingsDefine - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 02_reverse.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 03_sds_fwd_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 04_sds_rev_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS > -------------------------------------------------------------------- > SystemDevice - 01_forward.py: PASS > -------------------------------------------------------------------- > SystemDevice - 02_reverse.py: PASS > -------------------------------------------------------------------- > SystemDevice - 03_fwderrs.py: PASS > -------------------------------------------------------------------- > VSSD - 01_enum.py: PASS > -------------------------------------------------------------------- > VSSD - 02_bootldr.py: FAIL > ERROR - NameError : global name 'BaseException' is > not defined > Traceback (most recent call last): > File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 144, in do_try > rc = f() > File "02_bootldr.py", line 72, in main > except BaseException, detail : > NameError: global name 'BaseException' is not defined > ERROR - None > CIM_ERR_NOT_FOUND: No such instance (dom) > -------------------------------------------------------------------- > VSSD - 03_vssd_gi_errs.py: PASS > -------------------------------------------------------------------- > VSSD - 04_vssd_to_rasd.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > InvokeMethod(DefineSystem): CIM_ERR_FAILED: Unable to parse embedded object > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > InvokeMethod(DefineSystem): CIM_ERR_FAILED: Unable to parse embedded object > -------------------------------------------------------------------- > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > ERROR - For Invalid Scenario 'noname' > ERROR - For Invalid Scenario 'nonexistent' > InvokeMethod(DestroySystem): CIM_ERR_FAILED: Unable to retrieve domain name. > InvokeMethod(DestroySystem): CIM_ERR_FAILED: Failed to find domain > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: FAIL > ERROR - Error invoking AddRS: add_disk_res > ERROR - (1, u"CIM_ERR_FAILED: Unknown system > `rstest_domain'") > InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unknown system > `rstest_domain' > -------------------------------------------------------------------- > VirtualSystemManagementService - 07_addresource_neg.py: PASS > InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unable to parse > embedded object > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: FAIL > ERROR - Error invoking ModifyRS: mod_vcpu_res > ERROR - (1, u"CIM_ERR_FAILED: Unknown system > `rstest_domain'") > InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Unknown system > `rstest_domain' > -------------------------------------------------------------------- > VirtualSystemManagementService - 09_procrasd_persist.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 10_hv_version.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 11_define_memrasdunits.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 12_referenced_config.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 01_migratable_host.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 02_host_migrate_type.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS > InvokeMethod(CheckVirtualSystemIsMigratableToHost): CIM_ERR_FAILED: > Missing key (Name) in ComputerSystem > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 01_forward.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 02_reverse.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS > -------------------------------------------------------------------- > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Aug 18 06:47:04 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 18 Aug 2008 14:47:04 +0800 Subject: [Libvirt-cim] LXC on sfcb Test Run Summary for Aug 18 2008 In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-18 13:44:08: > > ================================================= > LXC on sfcb Test Run Summary for Aug 18 2008 > ================================================= > Distro: Fedora release 8.92 (Rawhide) > Kernel: 2.6.26-rc2-mm1-netns > libvirt: 0.4.4 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.0 > Libvirt-cim revision: 667 > Libvirt-cim changeset: 86d7161daef6 > ================================================= > FAIL : 11 > XFAIL : 1 > SKIP : 36 > PASS : 86 > ----------------- > Total : 134 > ================================================= > FAIL Test Summary: > HostSystem - 04_hs_to_EAPF.py: FAIL > VirtualSystemManagementService - 10_hv_version.py: FAIL #2 patch on the way. > VirtualSystemManagementService - 12_referenced_config.py: FAIL Below test fail because that their providers are not installed successfully. > VirtualSystemMigrationCapabilities - 01_enum.py: FAIL > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: FAIL > VirtualSystemMigrationSettingData - 01_enum.py: FAIL > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: FAIL > VirtualSystemSnapshotService - 01_enum.py: FAIL > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: FAIL > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: FAIL > > ================================================= > XFAIL Test Summary: > SettingsDefineCapabilities - 03_forward_errs.py: XFAIL > > ================================================= > SKIP Test Summary: > ComputerSystem - 02_nosystems.py: SKIP > ComputerSystem - 06_paused_active_suspend.py: SKIP > ComputerSystem - 23_suspend_suspend.py: SKIP > ComputerSystem - 32_start_reboot.py: SKIP > ComputerSystem - 33_suspend_reboot.py: SKIP > ComputerSystem - 35_start_reset.py: SKIP > ComputerSystem - 40_RSC_start.py: SKIP > ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP > ComputerSystemIndication - 01_created_indication.py: SKIP > ElementAllocatedFromPool - 03_reverse_errs.py: SKIP > ElementAllocatedFromPool - 04_forward_errs.py: SKIP > HostedDependency - 03_enabledstate.py: SKIP > LogicalDisk - 01_disk.py: SKIP > LogicalDisk - 02_nodevs.py: SKIP > LogicalDisk - 03_ld_gi_errs.py: SKIP > NetworkPort - 01_netport.py: SKIP > NetworkPort - 03_user_netport.py: SKIP > Processor - 01_processor.py: SKIP > Processor - 02_definesys_get_procs.py: SKIP > Processor - 03_proc_gi_errs.py: SKIP > Profile - 02_profile_to_elec.py: SKIP > RASD - 04_disk_rasd_size.py: SKIP > ResourceAllocationFromPool - 05_RAPF_err.py: SKIP > ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP > VSSD - 02_bootldr.py: SKIP > VirtualSystemManagementService - 06_addresource.py: SKIP > VirtualSystemManagementService - 08_modifyresource.py: SKIP > VirtualSystemManagementService - 09_procrasd_persist.py: SKIP > VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > > ================================================= > Full report: > -------------------------------------------------------------------- > AllocationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 02_nosystems.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > ComputerSystem - 03_defineVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 04_defineStartVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 05_activate_defined_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 06_paused_active_suspend.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 22_define_suspend.py: PASS > ERROR - Exception: (1, u'Domain not running') > InvokeMethod(RequestStateChange): Domain not running > -------------------------------------------------------------------- > ComputerSystem - 23_suspend_suspend.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 27_define_suspend_errs.py: PASS > InvokeMethod(RequestStateChange): Domain not running > -------------------------------------------------------------------- > ComputerSystem - 32_start_reboot.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 33_suspend_reboot.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 35_start_reset.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 40_RSC_start.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: SKIP > -------------------------------------------------------------------- > ElementAllocatedFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 03_reverse_errs.py: SKIP > -------------------------------------------------------------------- > ElementAllocatedFromPool - 04_forward_errs.py: SKIP > -------------------------------------------------------------------- > ElementCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementConforms - 03_ectp_fwd_errs.py: PASS > -------------------------------------------------------------------- > ElementConforms - 04_ectp_rev_errs.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: PASS > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: PASS > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: FAIL > ERROR - KeyError : u'LXC_ProcessorPool' > Traceback (most recent call last): > File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 144, in do_try > rc = f() > File "04_hs_to_EAPF.py", line 255, in main > in_pllist = pool_init_list(virt, pool, net_name, dpool_name) > File "04_hs_to_EAPF.py", line 99, in pool_init_list > if exp_pllist[CName] == InstID: > KeyError: u'LXC_ProcessorPool' > ERROR - None > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > HostedDependency - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedDependency - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedDependency - 03_enabledstate.py: SKIP > -------------------------------------------------------------------- > HostedDependency - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedService - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedService - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 01_disk.py: SKIP > -------------------------------------------------------------------- > LogicalDisk - 02_nodevs.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > LogicalDisk - 03_ld_gi_errs.py: SKIP > -------------------------------------------------------------------- > Memory - 01_memory.py: PASS > -------------------------------------------------------------------- > Memory - 02_defgetmem.py: PASS > -------------------------------------------------------------------- > Memory - 03_mem_gi_errs.py: PASS > -------------------------------------------------------------------- > NetworkPort - 01_netport.py: SKIP > -------------------------------------------------------------------- > NetworkPort - 02_np_gi_errors.py: PASS > -------------------------------------------------------------------- > NetworkPort - 03_user_netport.py: SKIP > -------------------------------------------------------------------- > Processor - 01_processor.py: SKIP > -------------------------------------------------------------------- > Processor - 02_definesys_get_procs.py: SKIP > -------------------------------------------------------------------- > Processor - 03_proc_gi_errs.py: SKIP > -------------------------------------------------------------------- > Profile - 01_enum.py: PASS > -------------------------------------------------------------------- > Profile - 02_profile_to_elec.py: SKIP > -------------------------------------------------------------------- > Profile - 03_rprofile_gi_errs.py: PASS > -------------------------------------------------------------------- > RASD - 01_verify_rasd_fields.py: PASS > -------------------------------------------------------------------- > RASD - 02_enum.py: PASS > -------------------------------------------------------------------- > RASD - 03_rasd_errs.py: PASS > -------------------------------------------------------------------- > RASD - 04_disk_rasd_size.py: SKIP > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 05_RAPF_err.py: SKIP > -------------------------------------------------------------------- > ResourcePool - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePool - 02_rp_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP > -------------------------------------------------------------------- > SettingsDefine - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 02_reverse.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 03_sds_fwd_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 04_sds_rev_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 03_forward_errs.py: XFAIL > ERROR - 'LXC_SettingsDefineCapabilities' > association failed to generate an exception and 'WrongClassName' passed. > ERROR - ------ FAILED: Invalid CCName Key Name.------ > Bug:<> > -------------------------------------------------------------------- > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS > -------------------------------------------------------------------- > SystemDevice - 01_forward.py: PASS > -------------------------------------------------------------------- > SystemDevice - 02_reverse.py: PASS > -------------------------------------------------------------------- > SystemDevice - 03_fwderrs.py: PASS > -------------------------------------------------------------------- > VSSD - 01_enum.py: PASS > -------------------------------------------------------------------- > VSSD - 02_bootldr.py: SKIP > -------------------------------------------------------------------- > VSSD - 03_vssd_gi_errs.py: PASS > -------------------------------------------------------------------- > VSSD - 04_vssd_to_rasd.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > InvokeMethod(DefineSystem): Unable to parse embedded object > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > InvokeMethod(DefineSystem): Unable to parse embedded object > -------------------------------------------------------------------- > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > ERROR - For Invalid Scenario 'noname' > ERROR - For Invalid Scenario 'nonexistent' > InvokeMethod(DestroySystem): Unable to retrieve domain name. > InvokeMethod(DestroySystem): Failed to find domain > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 07_addresource_neg.py: PASS > InvokeMethod(AddResourceSettings): Unable to parse embedded object > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 09_procrasd_persist.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 10_hv_version.py: FAIL > ERROR - CIM says version is `LXC 0.0.0', but > libvirt says `libvir: error : this function is not supported by the > hypervisor: virConnectGetVersion > error: failed to get the hypervisor version' > -------------------------------------------------------------------- > VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 12_referenced_config.py: FAIL > ERROR - EnabledState is 3 instead of 2. > ERROR - Try to increase the timeout and run the test again > ERROR - Unable to start rstest_domain > ERROR - Unable to start rstest_domain > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 01_enum.py: FAIL > ERROR - LXC_VirtualSystemMigrationCapabilities > return 0 instances, excepted only 1 instance > Provider not found or not loadable > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: FAIL > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: Invalid InstanceID Key Name.------ > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: Invalid InstanceID Key Value.------ > -------------------------------------------------------------------- > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > -------------------------------------------------------------------- > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > -------------------------------------------------------------------- > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 01_enum.py: FAIL > ERROR - LXC_VirtualSystemMigrationSettingData > return 0 instances, excepted only 1 instance > Provider not found or not loadable > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: FAIL > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: to check INVALID_Instid_KeyName.------ > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 01_forward.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 02_reverse.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 01_enum.py: FAIL > ERROR - LXC_VirtualSystemSnapshotService return 0 > instances, excepted only 1 instance > Provider not found or not loadable > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: to check INVALID_CCName_KeyName.------ > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: FAIL > ERROR - > LXC_VirtualSystemSnapshotServiceCapabilities return 0 instances, > excepted only 1 instance > Provider not found or not loadable > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: FAIL > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.5/logging/__init__.py", line 744, in emit > msg = self.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 630, in format > return fmt.format(record) > File "/usr/lib64/python2.5/logging/__init__.py", line 418, in format > record.message = record.getMessage() > File "/usr/lib64/python2.5/logging/__init__.py", line 288, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: to check INVALID_Instid_KeyName.------ > -------------------------------------------------------------------- > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From danms at us.ibm.com Mon Aug 18 18:39:31 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 18 Aug 2008 11:39:31 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Override devices in reference configuration, where the ID is the same Message-ID: <80e6ea1a1a296d424e15.1219084771@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1219084718 25200 # Node ID 80e6ea1a1a296d424e15b3771d6753c3f8bbc5d1 # Parent f40ac4d174324f9ee4c76a4a8832704d3439e7dd (#2) Override devices in reference configuration, where the ID is the same Currently, we depend on libvirt to return an error if the client's combination of ReferenceConfig and ResourceSettings results in a duplicate device. That error is non-obvious in origin. Since two devices that would result in the same InstanceID cannot be properly represented by the providers anyway, this patch adds some logic to properly override such a conflicting device. To do this, I had to make sure we set the ID in rasd_to_vdev, which wasn't previously required. The actual insertion of the device into the appropriate type list is done by a helper function which checks for (and overrides if appropriate) a duplicate before tacking the new instance on the end of the list. Changes: We were already making the required space for the additional devices, but I didn't correctly specify the new size then calling add_device_nodup() function, resulting in a false failure. Side note: the classify_resources() function is really getting out of hand and could use some refactoring. Signed-off-by: Dan Smith diff -r f40ac4d17432 -r 80e6ea1a1a29 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Fri Aug 15 09:30:30 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Mon Aug 18 11:38:38 2008 -0700 @@ -411,6 +411,9 @@ free(dev->dev.net.mac); dev->dev.net.mac = strdup(val); + free(dev->id); + dev->id = strdup(dev->dev.net.mac); + op = CMGetObjectPath(inst, NULL); if (op == NULL) { CU_DEBUG("Unable to get instance path"); @@ -449,6 +452,9 @@ dev->dev.disk.source = strdup(val); dev->dev.disk.disk_type = disk_type_from_file(val); + free(dev->id); + dev->id = strdup(dev->dev.disk.virtual_dev); + return NULL; } @@ -469,6 +475,9 @@ free(dev->dev.disk.source); dev->dev.disk.source = strdup(val); dev->dev.disk.disk_type = DISK_FS; + + free(dev->id); + dev->id = strdup(dev->dev.disk.virtual_dev); return NULL; } @@ -621,6 +630,33 @@ return true; } +static char *add_device_nodup(struct virt_device *dev, + struct virt_device *list, + int max, + int *index) +{ + int i; + + for (i = 0; i < *index; i++) { + struct virt_device *ptr = &list[i]; + + if (STREQC(ptr->id, dev->id)) { + CU_DEBUG("Overriding device %s from refconf", ptr->id); + cleanup_virt_device(ptr); + memcpy(ptr, dev, sizeof(*ptr)); + return NULL; + } + } + + if (*index == max) + return "Internal error: no more device slots"; + + memcpy(&list[*index], dev, sizeof(list[*index])); + *index += 1; + + return NULL; +} + static const char *classify_resources(CMPIArray *resources, const char *ns, struct domain *domain) @@ -678,15 +714,33 @@ &domain->dev_mem[0], ns); } else if (type == CIM_RES_TYPE_DISK) { + struct virt_device dev; + int dcount = count + domain->dev_disk_ct; + + memset(&dev, 0, sizeof(dev)); msg = rasd_to_vdev(inst, domain, - &domain->dev_disk[domain->dev_disk_ct++], + &dev, ns); + if (msg == NULL) + msg = add_device_nodup(&dev, + domain->dev_disk, + dcount, + &domain->dev_disk_ct); } else if (type == CIM_RES_TYPE_NET) { + struct virt_device dev; + int ncount = count + domain->dev_net_ct; + + memset(&dev, 0, sizeof(dev)); msg = rasd_to_vdev(inst, domain, - &domain->dev_net[domain->dev_net_ct++], + &dev, ns); + if (msg == NULL) + msg = add_device_nodup(&dev, + domain->dev_net, + ncount, + &domain->dev_net_ct); } if (msg != NULL) return msg; From kaitlin at linux.vnet.ibm.com Mon Aug 18 20:18:32 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 18 Aug 2008 13:18:32 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix debug output Message-ID: <4cbb5bea5f3b72a7a716.1219090712@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219090696 25200 # Node ID 4cbb5bea5f3b72a7a716bb9d3c4b6e8d9c3f4596 # Parent 6a75861bbe432d0cc8f143783cb5d00a75101ecb [TEST] Fix debug output If the test passes, then there's no need to print debug output. Otherwise, negative test cases (that run in to intentional failures) might print confusing debug messages. Signed-off-by: Kaitlin Rupert diff -r 6a75861bbe43 -r 4cbb5bea5f3b lib/TestSuite.py --- a/lib/TestSuite.py Sun Aug 17 21:34:33 2008 -0700 +++ b/lib/TestSuite.py Mon Aug 18 13:18:16 2008 -0700 @@ -68,7 +68,7 @@ bug = err self.rep.results("%s - %s" % (group, test), status, bug) - if output: + if output and status != PASS: self.rep.debug(1, output) def debug(self, str): From kaitlin at linux.vnet.ibm.com Mon Aug 18 21:09:49 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 18 Aug 2008 14:09:49 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel Message-ID: <0ffa5529fe3bc599cba8.1219093789@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219093729 25200 # Node ID 0ffa5529fe3bc599cba875ac3927efe9e56b8626 # Parent 4cbb5bea5f3b72a7a716bb9d3c4b6e8d9c3f4596 [TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel. Signed-off-by: Kaitlin Rupert diff -r 4cbb5bea5f3b -r 0ffa5529fe3b suites/libvirt-cim/images/xmt-makefv.sh --- a/suites/libvirt-cim/images/xmt-makefv.sh Mon Aug 18 13:18:16 2008 -0700 +++ b/suites/libvirt-cim/images/xmt-makefv.sh Mon Aug 18 14:08:49 2008 -0700 @@ -85,7 +85,18 @@ kernel_path() { local prefix=$1 - find /boot | grep vmlinuz | grep -v xen | tail -n1 + local image=`find /boot | grep vmlinuz | grep -v xen | tail -n1` + + if [ -z $image ]; then + local dummy_path="cimtest-dummy-image" + + echo "No non-Xen kernel found. Creating a fake image.\n" + touch /boot/vmlinuz-$(dummy_path) + mkdir /lib/modules/$(dummy_path) + image="/boot/vmlinuz-$(dummy_path)" + fi + + echo $image } copy_in_kernel() { From kaitlin at linux.vnet.ibm.com Mon Aug 18 23:34:39 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 18 Aug 2008 16:34:39 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Override devices in reference configuration, where the ID is the same In-Reply-To: <80e6ea1a1a296d424e15.1219084771@guaranine.danplanet.com> References: <80e6ea1a1a296d424e15.1219084771@guaranine.danplanet.com> Message-ID: <48AA070F.6050902@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1219084718 25200 > # Node ID 80e6ea1a1a296d424e15b3771d6753c3f8bbc5d1 > # Parent f40ac4d174324f9ee4c76a4a8832704d3439e7dd > (#2) Override devices in reference configuration, where the ID is the same > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Aug 18 23:41:31 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 18 Aug 2008 16:41:31 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] RefConf dup ID test Message-ID: From kaitlin at linux.vnet.ibm.com Mon Aug 18 23:41:32 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 18 Aug 2008 16:41:32 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Add support for passed in parameters and RefConf to cim_define() In-Reply-To: Message-ID: <38154e9f4053f0264293.1219102892@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219102467 25200 # Node ID 38154e9f4053f0264293470b3346c52301bfed40 # Parent 0ffa5529fe3bc599cba875ac3927efe9e56b8626 [TEST] Add support for passed in parameters and RefConf to cim_define() Signed-off-by: Kaitlin Rupert diff -r 0ffa5529fe3b -r 38154e9f4053 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Aug 18 14:08:49 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Aug 18 16:34:27 2008 -0700 @@ -513,15 +513,23 @@ mallocunits=mem_allocunits, name=dom_name) - def cim_define(self, ip): + def cim_define(self, ip, params=None, ref_conf=None): service = vsms.get_vsms_class(self.virt)(ip) - sys_settings = str(self.vssd) - res_settings = [str(self.dasd), str(self.nasd), - str(self.pasd), str(self.masd)] + if params is None: + sys_settings = str(self.vssd) + res_settings = [str(self.dasd), str(self.nasd), + str(self.pasd), str(self.masd)] + else: + sys_settings = params['vssd'] + res_settings = params['rasds'] + + if ref_conf is None: + ref_conf = ' ' + try: service.DefineSystem(SystemSettings=sys_settings, ResourceSettings=res_settings, - ReferenceConfiguration=' ') + ReferenceConfiguration=ref_conf) except pywbem.CIMError, (rc, desc): logger.error('Got CIM error %s with return code %s' % (desc, rc)) return False From kaitlin at linux.vnet.ibm.com Mon Aug 18 23:41:33 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 18 Aug 2008 16:41:33 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Add RefConf test to verify dup IDs are removed In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1219102467 25200 # Node ID b6fe952171c0dc980779650057df711bf77f9faf # Parent 38154e9f4053f0264293470b3346c52301bfed40 [TEST] Add RefConf test to verify dup IDs are removed This is done before defining the guest. Signed-off-by: Kaitlin Rupert diff -r 38154e9f4053 -r b6fe952171c0 suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Mon Aug 18 16:34:27 2008 -0700 @@ -0,0 +1,166 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Kaitlin Rupert +# +# 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 +# + +import sys +import pywbem +from XenKvmLib.common_util import call_request_state_change, \ + poll_for_state_change, get_cs_instance +from XenKvmLib import vsms +from VirtLib import utils +from CimTest.Globals import logger, do_main +from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.test_doms import destroy_and_undefine_domain +from XenKvmLib.classes import get_typed_class +from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.vxml import get_class + +sup_types = ['Xen', 'XenFV', 'KVM'] +test_dom = 'rstest_domain' +test_dom2 = 'rstest_domain2' + +REQUESTED_STATE = 2 +TIME = "00000000000000.000000:000" + +def get_vssd_ref(ip, virt): + rc, cs = get_cs_instance(test_dom, ip, virt) + if rc != 0: + return None + + cn = "ComputerSystem" + ccn = get_typed_class(virt, cn) + vssd = AssociatorNames(ip, 'SettingsDefineState', cn, virt=virt, + Name = test_dom, CreationClassName = ccn) + + if len(vssd) != 1: + logger.error("Returned %i vssd insts for '%s'", len(vssd), test_dom) + return None + + return vssd[0] + +def verify_no_dups(ip, virt, cxml, dom): + + if cxml.xml_get_disk_source() != cxml.dasd.Address: + logger.error("%s: Exp disk source %s" % (dom, cxml.dasd.Address)) + return FAIL + + if cxml.xml_get_disk_dev() != cxml.dasd.VirtualDevice: + logger.error("%s: Exp disk dev %s" % (dom, cxml.dasd.VirtualDevice)) + return FAIL + + if cxml.xml_get_net_type() != cxml.nasd.NetworkType: + logger.error("%s: Exp net type %d" % (dom, cxml.nasd.NetworkType)) + return FAIL + + if cxml.xml_get_net_mac() != cxml.nasd.Address: + logger.error("%s: Exp net mac %s" % (dom, cxml.nasd.Address)) + return FAIL + + vcpus = cxml.xml_get_vcpu() + if not vcpus.isdigit(): + logger.error("Unable to get vcpus value for %s" % dom) + return FAIL + + if int(vcpus) != cxml.pasd.VirtualQuantity: + logger.error("%s: Exp vcpus %s" % (dom, cxml.pasd.VirtualQuantity)) + return FAIL + + mem = cxml.xml_get_mem() + if not mem.isdigit(): + logger.error("Unable to get mem value for %s" % dom) + return FAIL + + if cxml.masd.AllocationUnits == "Bytes": + shift = -10 + elif cxml.masd.AllocationUnits == "KiloBytes": + shift = 0 + elif cxml.masd.AllocationUnits == "MegaBytes": + shift = 10 + elif cxml.masd.AllocationUnits == "GigaBytes": + multi_by = 20 + else: + shift = 0 + + exp_mem = cxml.masd.VirtualQuantity + if shift < 0: + exp_mem >>= -shift + else: + exp_mem <<= shift + + print exp_mem + + if int(mem) != exp_mem: + logger.error("%s: Exp mem %s" % (dom, exp_mem)) + return FAIL + + return PASS + + at do_main(sup_types) +def main(): + options = main.options + + virt_xml = get_class(options.virt) + cxml = virt_xml(test_dom) + cxml2 = virt_xml(test_dom2) + + try: + rc = cxml.cim_define(options.ip) + if not rc: + logger.error("Unable define domain %s" % test_dom) + raise Exception("Unable to define domain %s" % test_dom) + + ref = get_vssd_ref(options.ip, options.virt) + if ref is None: + raise Exception("Unable to get %s reference" % test_dom) + + rc = cxml2.cim_define(options.ip, ref_conf=ref) + if not rc: + logger.error("Unable define domain %s" % test_dom2) + raise Exception("Unable to define %s" % test_dom2) + + rc = call_request_state_change(test_dom2, options.ip, + REQUESTED_STATE, TIME, options.virt) + if rc != 0: + raise Exception("Unable to start %s" % test_dom2) + + status, dom_cs = poll_for_state_change(options.ip, options.virt, + test_dom2, REQUESTED_STATE) + if status != PASS: + raise Exception("%s didn't change state as expected" % test_dom2) + + status = verify_no_dups(options.ip, options.virt, cxml2, test_dom2) + if status != PASS: + raise Exception("%s devices not defined as expected" % test_dom2) + + status = PASS + + except Exception, details: + logger.error(details) + status = FAIL + + destroy_and_undefine_domain(test_dom, options.ip, options.virt) + destroy_and_undefine_domain(test_dom2, options.ip, options.virt) + + return status + +if __name__ == "__main__": + sys.exit(main()) + From danms at us.ibm.com Tue Aug 19 15:42:11 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 19 Aug 2008 08:42:11 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Add support for passed in parameters and RefConf to cim_define() In-Reply-To: <38154e9f4053f0264293.1219102892@elm3b41.beaverton.ibm.com> (Kaitlin Rupert's message of "Mon, 18 Aug 2008 16:41:32 -0700") References: <38154e9f4053f0264293.1219102892@elm3b41.beaverton.ibm.com> Message-ID: <87ljytui3w.fsf@caffeine.beaverton.ibm.com> KR> - def cim_define(self, ip): KR> + def cim_define(self, ip, params=None, ref_conf=None): This is a class method, right? It seems weird to have a parameter to a class method that overrides the use of any of the class's private variables. AFAICT, this behaves like a class method when params=None and like a regular function when params is not None. Why not make cim_define() a regular function for the case where you need to pass in specific values and have the class method call it with the information from the class? KR> service = vsms.get_vsms_class(self.virt)(ip) KR> - sys_settings = str(self.vssd) KR> - res_settings = [str(self.dasd), str(self.nasd), KR> - str(self.pasd), str(self.masd)] KR> + if params is None: KR> + sys_settings = str(self.vssd) KR> + res_settings = [str(self.dasd), str(self.nasd), KR> + str(self.pasd), str(self.masd)] KR> + else: KR> + sys_settings = params['vssd'] KR> + res_settings = params['rasds'] For the record, I think that the current convention of passing in a dict with two specifically-named items instead of just another parameter to the method is pretty gross. Just in case you were wondering :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Tue Aug 19 20:02:12 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 19 Aug 2008 13:02:12 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] #2 Add support for refconf to cim_define() In-Reply-To: Message-ID: <909aac508b6834be6272.1219176132@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219102467 25200 # Node ID 909aac508b6834be6272aab635b991ca892e969d # Parent 0ffa5529fe3bc599cba875ac3927efe9e56b8626 [TEST] #2 Add support for refconf to cim_define() Updates: -Remove support for passing in VSSD / RASD params. Signed-off-by: Kaitlin Rupert diff -r 0ffa5529fe3b -r 909aac508b68 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Aug 18 14:08:49 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Aug 18 16:34:27 2008 -0700 @@ -513,15 +513,20 @@ mallocunits=mem_allocunits, name=dom_name) - def cim_define(self, ip): + + def cim_define(self, ip, ref_conf=None): service = vsms.get_vsms_class(self.virt)(ip) sys_settings = str(self.vssd) res_settings = [str(self.dasd), str(self.nasd), str(self.pasd), str(self.masd)] + + if ref_conf is None: + ref_conf = ' ' + try: service.DefineSystem(SystemSettings=sys_settings, ResourceSettings=res_settings, - ReferenceConfiguration=' ') + ReferenceConfiguration=ref_conf) except pywbem.CIMError, (rc, desc): logger.error('Got CIM error %s with return code %s' % (desc, rc)) return False From kaitlin at linux.vnet.ibm.com Tue Aug 19 20:02:13 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 19 Aug 2008 13:02:13 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Add RefConf test to verify dup IDs are removed In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1219102467 25200 # Node ID f3d5d3dbc1afd12a5714154f833d227c2515ebd3 # Parent 909aac508b6834be6272aab635b991ca892e969d [TEST] Add RefConf test to verify dup IDs are removed This is done before defining the guest. Signed-off-by: Kaitlin Rupert diff -r 909aac508b68 -r f3d5d3dbc1af suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Mon Aug 18 16:34:27 2008 -0700 @@ -0,0 +1,166 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Kaitlin Rupert +# +# 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 +# + +import sys +import pywbem +from XenKvmLib.common_util import call_request_state_change, \ + poll_for_state_change, get_cs_instance +from XenKvmLib import vsms +from VirtLib import utils +from CimTest.Globals import logger, do_main +from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.test_doms import destroy_and_undefine_domain +from XenKvmLib.classes import get_typed_class +from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.vxml import get_class + +sup_types = ['Xen', 'XenFV', 'KVM'] +test_dom = 'rstest_domain' +test_dom2 = 'rstest_domain2' + +REQUESTED_STATE = 2 +TIME = "00000000000000.000000:000" + +def get_vssd_ref(ip, virt): + rc, cs = get_cs_instance(test_dom, ip, virt) + if rc != 0: + return None + + cn = "ComputerSystem" + ccn = get_typed_class(virt, cn) + vssd = AssociatorNames(ip, 'SettingsDefineState', cn, virt=virt, + Name = test_dom, CreationClassName = ccn) + + if len(vssd) != 1: + logger.error("Returned %i vssd insts for '%s'", len(vssd), test_dom) + return None + + return vssd[0] + +def verify_no_dups(ip, virt, cxml, dom): + + if cxml.xml_get_disk_source() != cxml.dasd.Address: + logger.error("%s: Exp disk source %s" % (dom, cxml.dasd.Address)) + return FAIL + + if cxml.xml_get_disk_dev() != cxml.dasd.VirtualDevice: + logger.error("%s: Exp disk dev %s" % (dom, cxml.dasd.VirtualDevice)) + return FAIL + + if cxml.xml_get_net_type() != cxml.nasd.NetworkType: + logger.error("%s: Exp net type %d" % (dom, cxml.nasd.NetworkType)) + return FAIL + + if cxml.xml_get_net_mac() != cxml.nasd.Address: + logger.error("%s: Exp net mac %s" % (dom, cxml.nasd.Address)) + return FAIL + + vcpus = cxml.xml_get_vcpu() + if not vcpus.isdigit(): + logger.error("Unable to get vcpus value for %s" % dom) + return FAIL + + if int(vcpus) != cxml.pasd.VirtualQuantity: + logger.error("%s: Exp vcpus %s" % (dom, cxml.pasd.VirtualQuantity)) + return FAIL + + mem = cxml.xml_get_mem() + if not mem.isdigit(): + logger.error("Unable to get mem value for %s" % dom) + return FAIL + + if cxml.masd.AllocationUnits == "Bytes": + shift = -10 + elif cxml.masd.AllocationUnits == "KiloBytes": + shift = 0 + elif cxml.masd.AllocationUnits == "MegaBytes": + shift = 10 + elif cxml.masd.AllocationUnits == "GigaBytes": + multi_by = 20 + else: + shift = 0 + + exp_mem = cxml.masd.VirtualQuantity + if shift < 0: + exp_mem >>= -shift + else: + exp_mem <<= shift + + print exp_mem + + if int(mem) != exp_mem: + logger.error("%s: Exp mem %s" % (dom, exp_mem)) + return FAIL + + return PASS + + at do_main(sup_types) +def main(): + options = main.options + + virt_xml = get_class(options.virt) + cxml = virt_xml(test_dom) + cxml2 = virt_xml(test_dom2) + + try: + rc = cxml.cim_define(options.ip) + if not rc: + logger.error("Unable define domain %s" % test_dom) + raise Exception("Unable to define domain %s" % test_dom) + + ref = get_vssd_ref(options.ip, options.virt) + if ref is None: + raise Exception("Unable to get %s reference" % test_dom) + + rc = cxml2.cim_define(options.ip) + if not rc: + logger.error("Unable define domain %s" % test_dom2) + raise Exception("Unable to define %s" % test_dom2) + + rc = call_request_state_change(test_dom2, options.ip, + REQUESTED_STATE, TIME, options.virt) + if rc != 0: + raise Exception("Unable to start %s" % test_dom2) + + status, dom_cs = poll_for_state_change(options.ip, options.virt, + test_dom2, REQUESTED_STATE) + if status != PASS: + raise Exception("%s didn't change state as expected" % test_dom2) + + status = verify_no_dups(options.ip, options.virt, cxml2, test_dom2) + if status != PASS: + raise Exception("%s devices not defined as expected" % test_dom2) + + status = PASS + + except Exception, details: + logger.error(details) + status = FAIL + + destroy_and_undefine_domain(test_dom, options.ip, options.virt) + destroy_and_undefine_domain(test_dom2, options.ip, options.virt) + + return status + +if __name__ == "__main__": + sys.exit(main()) + From kaitlin at linux.vnet.ibm.com Tue Aug 19 20:02:11 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 19 Aug 2008 13:02:11 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] RefConf dup ID test Message-ID: From danms at us.ibm.com Tue Aug 19 21:14:03 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 19 Aug 2008 14:14:03 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] Reference SBLIM host system when possible Message-ID: This patch set (eventually) makes the providers return references to the SBLIM Linux_ComputerSystem instance, if that provider is available. This makes all of the Hosted* associations (and others) correctly point to the SBLIM provider when possible. As a fallback, we continue to return our fake instances if the SBLIM provider isn't installed. From danms at us.ibm.com Tue Aug 19 21:14:05 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 19 Aug 2008 14:14:05 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Make HostSystem return the SBLIM ComputerSystem, if present In-Reply-To: Message-ID: <304d6c3d06697f93c35b.1219180445@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1219180424 25200 # Node ID 304d6c3d06697f93c35b64c0b059090648de8e5e # Parent a55c6df52f5e8108d3e1dc978a2f3b8b32db71dc Make HostSystem return the SBLIM ComputerSystem, if present Signed-off-by: Dan Smith diff -r a55c6df52f5e -r 304d6c3d0669 src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Tue Aug 19 14:13:24 2008 -0700 +++ b/src/Virt_HostSystem.c Tue Aug 19 14:13:44 2008 -0700 @@ -57,11 +57,9 @@ return 1; } -CMPIStatus get_host(const CMPIBroker *broker, - const CMPIContext *context, - const CMPIObjectPath *reference, - CMPIInstance **_inst, - bool is_get_inst) +static CMPIStatus fake_host(const CMPIBroker *broker, + const CMPIObjectPath *reference, + CMPIInstance **_inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; @@ -69,10 +67,9 @@ conn = connect_by_classname(broker, CLASSNAME(reference), &s); if (conn == NULL) { - if (is_get_inst) - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "No such instance"); + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance"); goto out; } @@ -89,17 +86,71 @@ } set_host_system_properties(inst); + *_inst = inst; + out: + virConnectClose(conn); - if (is_get_inst) { - s = cu_validate_ref(broker, reference, inst); - if (s.rc != CMPI_RC_OK) - goto out; + return s; +} + +static CMPIStatus sblim_host(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *ref, + CMPIInstance **inst) +{ + CMPIObjectPath *path; + CMPIStatus s; + const char *cn = "Linux_ComputerSystem"; + char name[256]; + + if (gethostname(name, sizeof(name)) != 0) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get hostname: %m"); + return s; } - *_inst = inst; + path = CMNewObjectPath(broker, "root/cimv2", cn, &s); + if ((path == NULL) || (s.rc != CMPI_RC_OK)) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to create HostSystem path"); + return s; + } - out: - virConnectClose(conn); + CMAddKey(path, "CreationClassName", cn, CMPI_chars); + CMAddKey(path, "Name", name, CMPI_chars); + + *inst = CBGetInstance(broker, context, path, NULL, &s); + + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("SBLIM: %i %s", s.rc, CMGetCharPtr(s.msg)); + } else { + CU_DEBUG("SBLIM: Returned instance"); + } + + return s; +} + +CMPIStatus get_host(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIInstance **_inst, + bool is_get_inst) +{ + CMPIStatus s; + + s = sblim_host(broker, context, reference, _inst); + if (s.rc != CMPI_RC_OK) + s = fake_host(broker, reference, _inst); + + if (!is_get_inst && (s.rc == CMPI_RC_ERR_NOT_FOUND)) { + /* This is not an error */ + return (CMPIStatus){CMPI_RC_OK, NULL}; + } + + if ((s.rc == CMPI_RC_OK) && is_get_inst) + s = cu_validate_ref(broker, reference, *_inst); return s; } From danms at us.ibm.com Tue Aug 19 21:14:06 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 19 Aug 2008 14:14:06 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Make the EnumInstances and GetInstance logic in HostSystem SBLIM-aware In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1219180424 25200 # Node ID e216e19e47bcaf4dd299b10532808a8c7c994d73 # Parent 304d6c3d06697f93c35b64c0b059090648de8e5e Make the EnumInstances and GetInstance logic in HostSystem SBLIM-aware ...so that we don't return Linux_ComputerSystem instances if we found SBLIM ones Signed-off-by: Dan Smith diff -r 304d6c3d0669 -r e216e19e47bc src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Tue Aug 19 14:13:44 2008 -0700 +++ b/src/Virt_HostSystem.c Tue Aug 19 14:13:44 2008 -0700 @@ -163,9 +163,18 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; + CMPIObjectPath *path = NULL; s = get_host(_BROKER, context, reference, &inst, is_get_inst); if (s.rc != CMPI_RC_OK || inst == NULL) + goto out; + + path = CMGetObjectPath(inst, &s); + if ((path == NULL) || (s.rc != CMPI_RC_OK)) + return s; + + if (STARTS_WITH(CLASSNAME(path), "Linux_")) + /* Don't return SBLIM instances */ goto out; if (name_only) From danms at us.ibm.com Tue Aug 19 21:14:04 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 19 Aug 2008 14:14:04 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Add context pointer to get_host() and get_host_system_properties() In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1219180404 25200 # Node ID a55c6df52f5e8108d3e1dc978a2f3b8b32db71dc # Parent 80e6ea1a1a296d424e15b3771d6753c3f8bbc5d1 Add context pointer to get_host() and get_host_system_properties() ...and fix all the associated calls. Signed-off-by: Dan Smith diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_ComputerSystemIndication.c --- a/src/Virt_ComputerSystemIndication.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_ComputerSystemIndication.c Tue Aug 19 14:13:24 2008 -0700 @@ -193,6 +193,7 @@ } static void set_source_inst_props(const CMPIBroker *broker, + const CMPIContext *context, CMPIObjectPath *ref, CMPIInstance *ind) { @@ -209,7 +210,7 @@ (CMPIValue *)&str, CMPI_string); } - s = get_host_system_properties(&host, &hostccn, ref, broker); + s = get_host_system_properties(&host, &hostccn, ref, broker, context); if (s.rc != CMPI_RC_OK) { CU_DEBUG("Unable to get host properties (%s): %s", CLASSNAME(ref), CMGetCharPtr(s.msg)); @@ -276,7 +277,7 @@ break; } - set_source_inst_props(broker, affected_op, ind); + set_source_inst_props(broker, ctx, affected_op, ind); CU_DEBUG("Delivering Indication: %s", CMGetCharPtr(CMObjectPathToString(ind_op, NULL))); diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Tue Aug 19 14:13:24 2008 -0700 @@ -53,7 +53,8 @@ const static CMPIBroker *_BROKER; -static CMPIStatus validate_caps_get_service(const CMPIObjectPath *ref, +static CMPIStatus validate_caps_get_service(const CMPIContext *context, + const CMPIObjectPath *ref, CMPIInstance **inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -67,13 +68,13 @@ if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) goto out; - s = get_vsms(ref, &_inst, _BROKER, false); + s = get_vsms(ref, &_inst, _BROKER, context, false); } else if (STREQC(classname, "VirtualSystemMigrationCapabilities")) { s = get_migration_caps(ref, &_inst, _BROKER, true); if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) goto out; - s = get_migration_service(ref, &_inst, _BROKER, false); + s = get_migration_service(ref, &_inst, _BROKER, context, false); } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, @@ -90,7 +91,8 @@ return s; } -static CMPIStatus validate_service_get_caps(const CMPIObjectPath *ref, +static CMPIStatus validate_service_get_caps(const CMPIContext *context, + const CMPIObjectPath *ref, CMPIInstance **inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -100,13 +102,13 @@ classname = class_base_name(CLASSNAME(ref)); if (STREQC(classname, "VirtualSystemManagementService")) { - s = get_vsms(ref, &_inst, _BROKER, true); + s = get_vsms(ref, &_inst, _BROKER, context, true); if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) goto out; s = get_vsm_cap(_BROKER, ref, &_inst, false); } else if (STREQC(classname, "VirtualSystemMigrationService")) { - s = get_migration_service(ref, &_inst, _BROKER, true); + s = get_migration_service(ref, &_inst, _BROKER, context, true); if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) goto out; @@ -134,7 +136,7 @@ if (!match_hypervisor_prefix(ref, info)) goto out; - s = get_host(_BROKER, ref, &inst, true); + s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) goto out; @@ -165,14 +167,14 @@ if (!match_hypervisor_prefix(ref, info)) goto out; - s = validate_caps_get_service(ref, &inst); + s = validate_caps_get_service(info->context, ref, &inst); if (s.rc != CMPI_RC_OK) goto out; if (inst != NULL) inst_list_add(list, inst); - s = get_host(_BROKER, ref, &inst, false); + s = get_host(_BROKER, info->context, ref, &inst, false); if (s.rc != CMPI_RC_OK) goto out; @@ -192,7 +194,7 @@ if (!match_hypervisor_prefix(ref, info)) goto out; - s = validate_service_get_caps(ref, &inst); + s = validate_service_get_caps(info->context, ref, &inst); if (s.rc != CMPI_RC_OK) goto out; @@ -292,7 +294,7 @@ if ((ac == NULL) || (s.rc != CMPI_RC_OK)) goto out; - s = get_host(_BROKER, ref, &host, false); + s = get_host(_BROKER, info->context, ref, &host, false); if (s.rc != CMPI_RC_OK) goto out; diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_HostSystem.c Tue Aug 19 14:13:24 2008 -0700 @@ -58,6 +58,7 @@ } CMPIStatus get_host(const CMPIBroker *broker, + const CMPIContext *context, const CMPIObjectPath *reference, CMPIInstance **_inst, bool is_get_inst) @@ -103,7 +104,8 @@ return s; } -static CMPIStatus return_host(const CMPIObjectPath *reference, +static CMPIStatus return_host(const CMPIContext *context, + const CMPIObjectPath *reference, const CMPIResult *results, bool name_only, bool is_get_inst) @@ -111,7 +113,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; - s = get_host(_BROKER, reference, &inst, is_get_inst); + s = get_host(_BROKER, context, reference, &inst, is_get_inst); if (s.rc != CMPI_RC_OK || inst == NULL) goto out; @@ -127,12 +129,13 @@ CMPIStatus get_host_system_properties(const char **name, const char **ccname, const CMPIObjectPath *ref, - const CMPIBroker *broker) + const CMPIBroker *broker, + const CMPIContext *context) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *host = NULL; - s = get_host(broker, ref, &host, false); + s = get_host(broker, context, ref, &host, false); if (s.rc != CMPI_RC_OK || host == NULL) goto out; @@ -159,7 +162,7 @@ const CMPIResult *results, const CMPIObjectPath *reference) { - return return_host(reference, results, true, false); + return return_host(context, reference, results, true, false); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -169,7 +172,7 @@ const char **properties) { - return return_host(reference, results, false, false); + return return_host(context, reference, results, false, false); } static CMPIStatus GetInstance(CMPIInstanceMI *self, @@ -178,7 +181,7 @@ const CMPIObjectPath *reference, const char **properties) { - return return_host(reference, results, false, true); + return return_host(context, reference, results, false, true); } DEFAULT_CI(); diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_HostSystem.h --- a/src/Virt_HostSystem.h Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_HostSystem.h Tue Aug 19 14:13:24 2008 -0700 @@ -22,6 +22,7 @@ #define __VIRT_HOSTSYSTEM_H CMPIStatus get_host(const CMPIBroker *broker, + const CMPIContext *context, const CMPIObjectPath *reference, CMPIInstance **_inst, bool is_get_inst); @@ -29,6 +30,7 @@ CMPIStatus get_host_system_properties(const char **name, const char **ccname, const CMPIObjectPath *ref, - const CMPIBroker *broker); + const CMPIBroker *broker, + const CMPIContext *context); #endif diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_HostedDependency.c Tue Aug 19 14:13:24 2008 -0700 @@ -50,7 +50,7 @@ if (s.rc != CMPI_RC_OK) goto out; - s = get_host(_BROKER, ref, &instance, false); + s = get_host(_BROKER, info->context, ref, &instance, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, instance); @@ -68,7 +68,7 @@ if (!match_hypervisor_prefix(ref, info)) goto out; - s = get_host(_BROKER, ref, &instance, true); + s = get_host(_BROKER, info->context, ref, &instance, true); if (s.rc != CMPI_RC_OK) goto out; diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_HostedResourcePool.c Tue Aug 19 14:13:24 2008 -0700 @@ -52,7 +52,7 @@ if (s.rc != CMPI_RC_OK) goto out; - s = get_host(_BROKER, ref, &inst, false); + s = get_host(_BROKER, info->context, ref, &inst, false); if (s.rc != CMPI_RC_OK) goto out; @@ -72,7 +72,7 @@ if (!match_hypervisor_prefix(ref, info)) goto out; - s = get_host(_BROKER, ref, &inst, true); + s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) goto out; diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_HostedService.c --- a/src/Virt_HostedService.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_HostedService.c Tue Aug 19 14:13:24 2008 -0700 @@ -37,7 +37,8 @@ const static CMPIBroker *_BROKER; -static CMPIStatus validate_service_ref(const CMPIObjectPath *ref) +static CMPIStatus validate_service_ref(const CMPIContext *context, + const CMPIObjectPath *ref) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; @@ -46,11 +47,11 @@ classname = class_base_name(CLASSNAME(ref)); if (STREQC(classname, "VirtualSystemManagementService")) { - s = get_vsms(ref, &inst, _BROKER, true); + s = get_vsms(ref, &inst, _BROKER, context, true); } else if (STREQC(classname, "ResourcePoolConfigurationService")) { - s = get_rpcs(ref, &inst, _BROKER, true); + s = get_rpcs(ref, &inst, _BROKER, context, true); } else if (STREQC(classname, "VirtualSystemMigrationService")) { - s = get_migration_service(ref, &inst, _BROKER, true); + s = get_migration_service(ref, &inst, _BROKER, context, true); } free(classname); @@ -68,11 +69,11 @@ if (!match_hypervisor_prefix(ref, info)) return s; - s = validate_service_ref(ref); + s = validate_service_ref(info->context, ref); if (s.rc != CMPI_RC_OK) return s; - s = get_host(_BROKER, ref, &instance, false); + s = get_host(_BROKER, info->context, ref, &instance, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, instance); @@ -89,23 +90,23 @@ if (!match_hypervisor_prefix(ref, info)) return s; - s = get_host(_BROKER, ref, &inst, true); + s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) return s; - s = get_rpcs(ref, &inst, _BROKER, false); + s = get_rpcs(ref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_vsms(ref, &inst, _BROKER, false); + s = get_vsms(ref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_migration_service(ref, &inst, _BROKER, false); + s = get_migration_service(ref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.c Tue Aug 19 14:13:24 2008 -0700 @@ -97,6 +97,7 @@ CMPIStatus get_rpcs(const CMPIObjectPath *reference, CMPIInstance **_inst, const CMPIBroker *broker, + const CMPIContext *context, bool is_get_inst) { CMPIInstance *inst; @@ -129,7 +130,8 @@ s = get_host_system_properties(&name, &ccname, reference, - broker); + broker, + context); if (s.rc != CMPI_RC_OK) { cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, @@ -160,7 +162,8 @@ return s; } -static CMPIStatus return_rpcs(const CMPIResult *results, +static CMPIStatus return_rpcs(const CMPIContext *context, + const CMPIResult *results, const CMPIObjectPath *reference, bool names_only, bool is_get_inst) @@ -168,7 +171,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; - s = get_rpcs(reference, &inst, _BROKER, is_get_inst); + s = get_rpcs(reference, &inst, _BROKER, context, is_get_inst); if (s.rc != CMPI_RC_OK || inst == NULL) goto out; @@ -187,7 +190,7 @@ const CMPIObjectPath *reference, const char **properties) { - return return_rpcs(results, reference, false, true); + return return_rpcs(context, results, reference, false, true); } static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, @@ -195,7 +198,7 @@ const CMPIResult *results, const CMPIObjectPath *reference) { - return return_rpcs(results, reference, true, false); + return return_rpcs(context, results, reference, true, false); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -204,7 +207,7 @@ const CMPIObjectPath *reference, const char **properties) { - return return_rpcs(results, reference, false, false); + return return_rpcs(context, results, reference, false, false); } diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_ResourcePoolConfigurationService.h --- a/src/Virt_ResourcePoolConfigurationService.h Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.h Tue Aug 19 14:13:24 2008 -0700 @@ -22,6 +22,7 @@ CMPIStatus get_rpcs(const CMPIObjectPath *reference, CMPIInstance **_inst, const CMPIBroker *broker, + const CMPIContext *context, bool is_get_inst); /* diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_VSMigrationService.c Tue Aug 19 14:13:24 2008 -0700 @@ -726,7 +726,11 @@ if ((ref == NULL) || (s.rc != CMPI_RC_OK)) { CU_DEBUG("Failed to get job reference"); } else { - s = get_host_system_properties(&host, &ccname, ref, _BROKER); + s = get_host_system_properties(&host, + &ccname, + ref, + _BROKER, + context); if (s.rc == CMPI_RC_OK) { CMSetProperty(ind, "SourceInstanceHost", (CMPIValue *)host, CMPI_chars); @@ -1510,6 +1514,7 @@ CMPIStatus get_migration_service(const CMPIObjectPath *ref, CMPIInstance **_inst, const CMPIBroker *broker, + const CMPIContext *context, bool is_get_inst) { CMPIInstance *inst; @@ -1541,7 +1546,8 @@ s = get_host_system_properties(&name, &ccname, ref, - broker); + broker, + context); if (s.rc != CMPI_RC_OK) { cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, @@ -1576,7 +1582,8 @@ return s; } -static CMPIStatus return_vsms(const CMPIObjectPath *ref, +static CMPIStatus return_vsms(const CMPIContext *context, + const CMPIObjectPath *ref, const CMPIResult *results, bool name_only, bool is_get_inst) @@ -1584,7 +1591,7 @@ CMPIInstance *inst = NULL; CMPIStatus s; - s = get_migration_service(ref, &inst, _BROKER, is_get_inst); + s = get_migration_service(ref, &inst, _BROKER, context, is_get_inst); if ((s.rc != CMPI_RC_OK) || (inst == NULL)) goto out; @@ -1601,7 +1608,7 @@ const CMPIResult *results, const CMPIObjectPath *ref) { - return return_vsms(ref, results, true, false); + return return_vsms(context, ref, results, true, false); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -1611,7 +1618,7 @@ const char **properties) { - return return_vsms(ref, results, false, false); + return return_vsms(context, ref, results, false, false); } @@ -1621,7 +1628,7 @@ const CMPIObjectPath *ref, const char **properties) { - return return_vsms(ref, results, false, true); + return return_vsms(context, ref, results, false, true); } DEFAULT_CI(); diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_VSMigrationService.h --- a/src/Virt_VSMigrationService.h Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_VSMigrationService.h Tue Aug 19 14:13:24 2008 -0700 @@ -22,6 +22,7 @@ CMPIStatus get_migration_service(const CMPIObjectPath *reference, CMPIInstance **_inst, const CMPIBroker *broker, + const CMPIContext *context, bool is_get_inst); /* diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Tue Aug 19 14:13:24 2008 -0700 @@ -1800,6 +1800,7 @@ CMPIStatus get_vsms(const CMPIObjectPath *reference, CMPIInstance **_inst, const CMPIBroker *broker, + const CMPIContext *context, bool is_get_inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -1838,7 +1839,8 @@ s = get_host_system_properties(&name, &ccname, reference, - broker); + broker, + context); if (s.rc != CMPI_RC_OK) { cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, @@ -1902,7 +1904,8 @@ return s; } -static CMPIStatus return_vsms(const CMPIObjectPath *reference, +static CMPIStatus return_vsms(const CMPIContext *context, + const CMPIObjectPath *reference, const CMPIResult *results, bool name_only, bool is_get_inst) @@ -1910,7 +1913,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst; - s = get_vsms(reference, &inst, _BROKER, is_get_inst); + s = get_vsms(reference, &inst, _BROKER, context, is_get_inst); if (s.rc != CMPI_RC_OK || inst == NULL) goto out; @@ -1927,7 +1930,7 @@ const CMPIResult *results, const CMPIObjectPath *reference) { - return return_vsms(reference, results, true, false); + return return_vsms(context, reference, results, true, false); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -1937,7 +1940,7 @@ const char **properties) { - return return_vsms(reference, results, false, false); + return return_vsms(context, reference, results, false, false); } static CMPIStatus GetInstance(CMPIInstanceMI *self, @@ -1946,7 +1949,7 @@ const CMPIObjectPath *ref, const char **properties) { - return return_vsms(ref, results, false, true); + return return_vsms(context, ref, results, false, true); } DEFAULT_CI(); diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_VirtualSystemManagementService.h --- a/src/Virt_VirtualSystemManagementService.h Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.h Tue Aug 19 14:13:24 2008 -0700 @@ -22,4 +22,5 @@ CMPIStatus get_vsms(const CMPIObjectPath *reference, CMPIInstance **_inst, const CMPIBroker *broker, + const CMPIContext *context, bool is_get_inst); diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_VirtualSystemSnapshotService.c --- a/src/Virt_VirtualSystemSnapshotService.c Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_VirtualSystemSnapshotService.c Tue Aug 19 14:13:24 2008 -0700 @@ -602,6 +602,7 @@ _BROKER, libvirt_cim_init(), handlers); static CMPIStatus set_inst_properties(const CMPIBroker *broker, + const CMPIContext *context, const CMPIObjectPath *reference, CMPIInstance *inst) { @@ -612,7 +613,8 @@ s = get_host_system_properties(&name, &ccname, reference, - broker); + broker, + context); if (s.rc != CMPI_RC_OK) { cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, @@ -634,6 +636,7 @@ } CMPIStatus get_vsss(const CMPIBroker *broker, + const CMPIContext *context, const CMPIObjectPath *ref, CMPIInstance **_inst, bool is_get_inst) @@ -662,7 +665,7 @@ goto out; } - s = set_inst_properties(broker, ref, inst); + s = set_inst_properties(broker, context, ref, inst); if (is_get_inst) { s = cu_validate_ref(broker, ref, inst); @@ -677,7 +680,8 @@ return s; } -static CMPIStatus return_vsss(const CMPIObjectPath *ref, +static CMPIStatus return_vsss(const CMPIContext *context, + const CMPIObjectPath *ref, const CMPIResult *results, bool names_only, bool is_get_inst) @@ -685,7 +689,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; - s = get_vsss(_BROKER, ref, &inst, is_get_inst); + s = get_vsss(_BROKER, context, ref, &inst, is_get_inst); if ((s.rc != CMPI_RC_OK) || (inst == NULL)) goto out; @@ -702,7 +706,7 @@ const CMPIResult *results, const CMPIObjectPath *reference) { - return return_vsss(reference, results, true, false); + return return_vsss(context, reference, results, true, false); } static CMPIStatus EnumInstances(CMPIInstanceMI *self, @@ -712,7 +716,7 @@ const char **properties) { - return return_vsss(reference, results, false, false); + return return_vsss(context, reference, results, false, false); } static CMPIStatus GetInstance(CMPIInstanceMI *self, @@ -721,7 +725,7 @@ const CMPIObjectPath *reference, const char **properties) { - return return_vsss(reference, results, false, true); + return return_vsss(context, reference, results, false, true); } DEFAULT_CI(); diff -r 80e6ea1a1a29 -r a55c6df52f5e src/Virt_VirtualSystemSnapshotService.h --- a/src/Virt_VirtualSystemSnapshotService.h Mon Aug 18 11:38:38 2008 -0700 +++ b/src/Virt_VirtualSystemSnapshotService.h Tue Aug 19 14:13:24 2008 -0700 @@ -25,6 +25,7 @@ CMPIStatus vsss_delete_snapshot(const char *domname); CMPIStatus get_vsss(const CMPIBroker *broker, + const CMPIContext *context, const CMPIObjectPath *ref, CMPIInstance **_inst, bool is_get_inst); From yunguol at cn.ibm.com Wed Aug 20 05:58:16 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 20 Aug 2008 13:58:16 +0800 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Add RefConf test to verify dup IDs are removed In-Reply-To: Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-20 04:02:13: > # HG changeset patch > # User Kaitlin Rupert > # Date 1219102467 25200 > # Node ID f3d5d3dbc1afd12a5714154f833d227c2515ebd3 > # Parent 909aac508b6834be6272aab635b991ca892e969d > [TEST] Add RefConf test to verify dup IDs are removed > > This is done before defining the guest. > > Signed-off-by: Kaitlin Rupert > > diff -r 909aac508b68 -r f3d5d3dbc1af suites/libvirt- > cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs. > py Mon Aug 18 16:34:27 2008 -0700 > @@ -0,0 +1,166 @@ > +#!/usr/bin/python > +# > +# Copyright 2008 IBM Corp. > +# > +# Authors: > +# Kaitlin Rupert > +# > +# 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 > +# > + > +import sys > +import pywbem > +from XenKvmLib.common_util import call_request_state_change, \ > + poll_for_state_change, get_cs_instance > +from XenKvmLib import vsms > +from VirtLib import utils > +from CimTest.Globals import logger, do_main > +from CimTest.ReturnCodes import FAIL, PASS > +from XenKvmLib.test_doms import destroy_and_undefine_domain > +from XenKvmLib.classes import get_typed_class > +from XenKvmLib.assoc import AssociatorNames > +from XenKvmLib.vxml import get_class > + > +sup_types = ['Xen', 'XenFV', 'KVM'] > +test_dom = 'rstest_domain' > +test_dom2 = 'rstest_domain2' > + > +REQUESTED_STATE = 2 > +TIME = "00000000000000.000000:000" > + > +def get_vssd_ref(ip, virt): > + rc, cs = get_cs_instance(test_dom, ip, virt) > + if rc != 0: > + return None > + > + cn = "ComputerSystem" > + ccn = get_typed_class(virt, cn) > + vssd = AssociatorNames(ip, 'SettingsDefineState', cn, virt=virt, > + Name = test_dom, CreationClassName = ccn) > + > + if len(vssd) != 1: > + logger.error("Returned %i vssd insts for '%s'", len(vssd), test_dom) > + return None > + > + return vssd[0] > + > +def verify_no_dups(ip, virt, cxml, dom): > + > + if cxml.xml_get_disk_source() != cxml.dasd.Address: > + logger.error("%s: Exp disk source %s" % (dom, cxml.dasd.Address)) > + return FAIL > + > + if cxml.xml_get_disk_dev() != cxml.dasd.VirtualDevice: > + logger.error("%s: Exp disk dev %s" % (dom, cxml.dasd. > VirtualDevice)) > + return FAIL > + > + if cxml.xml_get_net_type() != cxml.nasd.NetworkType: > + logger.error("%s: Exp net type %d" % (dom, cxml.nasd. > NetworkType)) > + return FAIL > + > + if cxml.xml_get_net_mac() != cxml.nasd.Address: > + logger.error("%s: Exp net mac %s" % (dom, cxml.nasd.Address)) > + return FAIL > + > + vcpus = cxml.xml_get_vcpu() > + if not vcpus.isdigit(): > + logger.error("Unable to get vcpus value for %s" % dom) > + return FAIL > + > + if int(vcpus) != cxml.pasd.VirtualQuantity: > + logger.error("%s: Exp vcpus %s" % (dom, cxml.pasd. > VirtualQuantity)) > + return FAIL > + > + mem = cxml.xml_get_mem() > + if not mem.isdigit(): > + logger.error("Unable to get mem value for %s" % dom) > + return FAIL > + > + if cxml.masd.AllocationUnits == "Bytes": > + shift = -10 > + elif cxml.masd.AllocationUnits == "KiloBytes": > + shift = 0 > + elif cxml.masd.AllocationUnits == "MegaBytes": > + shift = 10 > + elif cxml.masd.AllocationUnits == "GigaBytes": > + multi_by = 20 > + else: > + shift = 0 > + > + exp_mem = cxml.masd.VirtualQuantity > + if shift < 0: > + exp_mem >>= -shift > + else: > + exp_mem <<= shift > + > + print exp_mem > + > + if int(mem) != exp_mem: > + logger.error("%s: Exp mem %s" % (dom, exp_mem)) > + return FAIL > + > + return PASS > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + virt_xml = get_class(options.virt) > + cxml = virt_xml(test_dom) > + cxml2 = virt_xml(test_dom2) > + > + try: > + rc = cxml.cim_define(options.ip) > + if not rc: > + logger.error("Unable define domain %s" % test_dom) > + raise Exception("Unable to define domain %s" % test_dom) > + > + ref = get_vssd_ref(options.ip, options.virt) > + if ref is None: > + raise Exception("Unable to get %s reference" % test_dom) > + > + rc = cxml2.cim_define(options.ip) > + if not rc: > + logger.error("Unable define domain %s" % test_dom2) > + raise Exception("Unable to define %s" % test_dom2) > + > + rc = call_request_state_change(test_dom2, options.ip, > + REQUESTED_STATE, TIME, options.virt) > + if rc != 0: > + raise Exception("Unable to start %s" % test_dom2) > + > + status, dom_cs = poll_for_state_change(options.ip, options.virt, > + test_dom2, REQUESTED_STATE) > + if status != PASS: > + raise Exception("%s didn't change state as expected" % test_dom2) > + > + status = verify_no_dups(options.ip, options.virt, cxml2, test_dom2) > + if status != PASS: > + raise Exception("%s devices not defined as expected" % test_dom2) > + > + status = PASS > + > + except Exception, details: > + logger.error(details) > + status = FAIL > + > + destroy_and_undefine_domain(test_dom, options.ip, options.virt) > + destroy_and_undefine_domain(test_dom2, options.ip, options.virt) > + > + return status > + > +if __name__ == "__main__": > + sys.exit(main()) > + > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Wed Aug 20 16:07:39 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 20 Aug 2008 09:07:39 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Make HostSystem return the SBLIM ComputerSystem, if present In-Reply-To: <304d6c3d06697f93c35b.1219180445@guaranine.danplanet.com> References: <304d6c3d06697f93c35b.1219180445@guaranine.danplanet.com> Message-ID: <48AC414B.3060503@linux.vnet.ibm.com> > + > + if (gethostname(name, sizeof(name)) != 0) { The node name on my system isn't a FQDN. It looks like the sblim providers use a FQDN. So even though I have the sblim providers installed, I still get back the faked HostSystem. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Aug 20 20:37:36 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 20 Aug 2008 13:37:36 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add checks for CIMOM and libvirtd Message-ID: <6d3fac9485bc4f4e259d.1219264656@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219263226 25200 # Node ID 6d3fac9485bc4f4e259d82af1c1fb7c0028b03ae # Parent 1364e9ddf32b315c7e752636b601fa54acd6e44d [TEST] Add checks for CIMOM and libvirtd. Also, clean up some old comments and remove some unneeded white space. Signed-off-by: Kaitlin Rupert diff -r 1364e9ddf32b -r 6d3fac9485bc suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Wed Aug 20 13:13:39 2008 -0700 +++ b/suites/libvirt-cim/main.py Wed Aug 20 13:13:46 2008 -0700 @@ -35,6 +35,7 @@ from XenKvmLib.classes import get_typed_class import ConfigParser from XenKvmLib.reporting import gen_report, send_report +from VirtLib import utils parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", @@ -84,6 +85,22 @@ status, output = commands.getstatusoutput(cmd) print "Cleaned log files." + +def pre_check(ip): + cmd = "ps -ef | grep -v grep | grep cimserver" + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + cmd = "ps -ef | grep -v grep | grep sfcbd" + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return "A supported CIMOM is not running" + + cmd = "ps -ef | grep -v grep | grep libvirtd" + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return "libvirtd is not running" + + return None def get_rcfile_vals(): if not os.access(CIMTEST_RCFILE, os.R_OK): @@ -135,21 +152,22 @@ parser.print_help() return 1 + env_ready = pre_check(options.ip) + if env_ready != None: + print "\n%s. Please check your environment.\n" % env_ready + return 1 + # HACK: Exporting CIMOM_PORT as an env var, to be able to test things - # on Director without having to change a lot of code. - # This will change soon + # with a different port if options.port: os.environ['CIMOM_PORT'] = str(options.port) - # if options.report: + to_addr = options.report from_addr, relay = get_rcfile_vals() - if from_addr == None or relay == None: return 1 - to_addr = options.report - testsuite = TestSuite.TestSuite(log=True) set_python_path() From kaitlin at linux.vnet.ibm.com Wed Aug 20 20:41:09 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 20 Aug 2008 13:41:09 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Move get_revision() from main.py to const.py In-Reply-To: Message-ID: <7d4ed16e284fe614f8f6.1219264869@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219263328 25200 # Node ID 7d4ed16e284fe614f8f61909850db14fec0070ab # Parent 6d3fac9485bc4f4e259d82af1c1fb7c0028b03ae [TEST] Move get_revision() from main.py to const.py This cleans up main.py and removes the need to pass the revision and changeset values as environment variables. Instead of accessing the revision and changeset values using CIM_REV and CIM_SET respectively, tests will need to call the get_provider_revision() function. Signed-off-by: Kaitlin Rupert diff -r 6d3fac9485bc -r 7d4ed16e284f suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Aug 20 13:13:46 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Aug 20 13:15:28 2008 -0700 @@ -22,20 +22,8 @@ import platform from VirtLib.live import fv_cap from CimTest.Globals import CIM_IP - -global CIM_REV -global CIM_SET - -rev = os.getenv("CIM_REV").strip("+") -if rev.isdigit(): - CIM_REV = int(rev) -else: - CIM_REV = 0 -CIM_SET = os.getenv("CIM_SET") - -if not CIM_REV or not CIM_SET: - CIM_REV = 0 - CIM_SET = 'Unknown' +from pywbem import WBEMConnection +from XenKvmLib.classes import get_typed_class # vxml.NetXML default_bridge_name = 'testbridge' @@ -91,3 +79,26 @@ LXC_default_mp = '/tmp' LXC_default_source = '/tmp/lxc_files' LXC_default_mac = '11:22:33:aa:bb:cc' + +def get_provider_version(virt, ip): + conn = WBEMConnection('http://%s' % ip, + (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), + os.getenv('CIM_NS')) + vsms_cn = get_typed_class(virt, 'VirtualSystemManagementService') + try: + inst = conn.EnumerateInstances(vsms_cn) + revision = inst[0]['Revision'] + changeset = inst[0]['Changeset'] + except Exception: + return 0, "Unknown" + + if revision is None or changeset is None: + return 0, "Unknown" + + revision.strip("+") + if revision.isdigit(): + revision = int(revision) + + return revision, changeset + + diff -r 6d3fac9485bc -r 7d4ed16e284f suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Wed Aug 20 13:13:46 2008 -0700 +++ b/suites/libvirt-cim/main.py Wed Aug 20 13:15:28 2008 -0700 @@ -25,15 +25,13 @@ from optparse import OptionParser import os import sys -from pywbem import WBEMConnection sys.path.append('../../lib') import TestSuite import commands from VirtLib import groups from CimTest.Globals import platform_sup +import ConfigParser sys.path.append('./lib') -from XenKvmLib.classes import get_typed_class -import ConfigParser from XenKvmLib.reporting import gen_report, send_report from VirtLib import utils @@ -124,22 +122,6 @@ return addr, relay -def get_version(virt, ip): - conn = WBEMConnection('http://%s' % ip, - (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), - os.getenv('CIM_NS')) - vsms_cn = get_typed_class(virt, 'VirtualSystemManagementService') - try: - inst = conn.EnumerateInstances(vsms_cn) - revision = inst[0]['Revision'] - changeset = inst[0]['Changeset'] - except Exception: - return '0', 'Unknown' - if revision is None: - revision = '0' - if changeset is None: - changeset = 'Unknown' - return revision, changeset def main(): (options, args) = parser.parse_args() @@ -191,8 +173,6 @@ else: dbg = "" - revision, changeset = get_version(options.virt, options.ip) - print "\nTesting " + options.virt + " hypervisor" for test in test_list: @@ -200,10 +180,9 @@ t_path = os.path.join(TEST_SUITE, test['group']) os.environ['CIM_TC'] = test['test'] cdto = 'cd %s' % t_path - env = 'CIM_REV=%s CIM_SET=%s' % (revision, changeset) run = 'python %s -i %s -v %s %s' % (test['test'], options.ip, options.virt, dbg) - cmd = cdto + ' && ' + env + ' ' + run + cmd = cdto + ' && ' + ' ' + run status, output = commands.getstatusoutput(cmd) os_status = os.WEXITSTATUS(status) From kaitlin at linux.vnet.ibm.com Wed Aug 20 20:41:10 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 20 Aug 2008 13:41:10 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Replace calls to CIM_REV with get_provider_revision() In-Reply-To: Message-ID: <3c67961e54f615da6fc8.1219264870@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219263328 25200 # Node ID 3c67961e54f615da6fc86862031f068cc8ed9745 # Parent 7d4ed16e284fe614f8f61909850db14fec0070ab [TEST] Replace calls to CIM_REV with get_provider_revision() Signed-off-by: Kaitlin Rupert diff -r 7d4ed16e284f -r 3c67961e54f6 suites/libvirt-cim/cimtest/NetworkPort/01_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Wed Aug 20 13:15:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Wed Aug 20 13:15:28 2008 -0700 @@ -39,11 +39,25 @@ from CimTest.Globals import logger from CimTest.Globals import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.const import get_provider_version sup_types = ['Xen', 'KVM', 'XenFV'] test_dom = "test_domain" test_mac = "00:11:22:33:44:55" + +def get_linktech(ip, virt): + rev, changeset = get_provider_version(virt, ip) + + net_rev = 599 + + # The value of LinkTechnology should be set to 0 for rev > 599 + # else, it should be set to 2 + if net_rev > rev: + return 0 + else: + return 2 + @do_main(sup_types) def main(): @@ -75,10 +89,12 @@ return FAIL status = PASS + + link_tech = get_linktech(options.ip, options.virt) - if dev.LinkTechnology != devices.LinkTechnology_Ethernet: + if dev.LinkTechnology != link_tech: logger.error("LinkTechnology should be set to `%i' instead of `%s'" % \ - (devices.LinkTechnology_Ethernet, dev.LinkTechnology)) + (link_tech, dev.LinkTechnology)) status = FAIL addrs = dev.NetworkAddresses diff -r 7d4ed16e284f -r 3c67961e54f6 suites/libvirt-cim/lib/XenKvmLib/devices.py --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Wed Aug 20 13:15:28 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Wed Aug 20 13:15:28 2008 -0700 @@ -26,19 +26,8 @@ from CimTest import CimExt from CimTest import Globals from XenKvmLib import assoc -from XenKvmLib.const import CIM_REV from XenKvmLib.classes import get_typed_class -net_rev = 599 - -# The branch has to be removed once the new rpm -# including the changes in revision 599 is available. -# The value of LinkTechnology should be set to 2 for -# network, bridge and ethernet type interfaces. -if net_rev > CIM_REV: - LinkTechnology_Ethernet = 0 -else: - LinkTechnology_Ethernet = 2 class CIM_Instance: def __init__(self, inst): diff -r 7d4ed16e284f -r 3c67961e54f6 suites/libvirt-cim/lib/XenKvmLib/reporting.py --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Wed Aug 20 13:15:28 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Wed Aug 20 13:15:28 2008 -0700 @@ -24,6 +24,7 @@ import smtplib from time import gmtime, strftime from VirtLib import utils +from XenKvmLib.const import get_provider_version def get_cmd_val(cmd, ip): rc, out = utils.run_remote(ip, cmd) @@ -67,7 +68,7 @@ return cimom, cimom_ver -def get_env_data(rev, changeset, ip): +def get_env_data(ip, virt): distro = get_cmd_val("cat /etc/issue | awk 'NR<=1'", ip) kernel_ver = get_cmd_val("uname -r", ip) @@ -77,6 +78,8 @@ env = "Distro: %s\nKernel: %s\nlibvirt: %s\nHypervisor: %s\nCIMOM: %s %s\n"\ % (distro, kernel_ver, libvirt_ver, hyp_ver, cimom, cimom_ver) + + rev, changeset = get_provider_version(virt, ip) lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \ (rev, changeset) @@ -129,13 +132,13 @@ return results, results_total, test_block -def gen_report(rev, changeset, virt, ip, log_file): +def gen_report(virt, ip, log_file): date = strftime("%b %d %Y", gmtime()) cimom, cimom_ver = get_cimom_ver(ip) heading = "%s on %s Test Run Summary for %s" % (virt, cimom, date) - sys_env = get_env_data(rev, changeset, ip) + sys_env = get_env_data(ip, virt) divider = "=================================================\n" diff -r 7d4ed16e284f -r 3c67961e54f6 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Wed Aug 20 13:15:28 2008 -0700 +++ b/suites/libvirt-cim/main.py Wed Aug 20 13:15:28 2008 -0700 @@ -192,8 +192,7 @@ testsuite.debug("%s\n" % div) testsuite.finish() - msg_body, heading = gen_report(revision, changeset, options.virt, - options.ip, testsuite.log_file) + msg_body, heading = gen_report(options.virt, options.ip, testsuite.log_file) if options.report: print "Sending mail from %s to %s using %s relay.\n" % \ From kaitlin at linux.vnet.ibm.com Wed Aug 20 20:41:08 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 20 Aug 2008 13:41:08 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] Re-org related provider version pieces Message-ID: From kaitlin at linux.vnet.ibm.com Wed Aug 20 21:30:46 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 20 Aug 2008 14:30:46 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add ref_conf arg to VSMS 13_refconfig_additional_devs.py Message-ID: <0e2058a0aa211370347e.1219267846@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219267836 25200 # Node ID 0e2058a0aa211370347e8617ca8a17437fa2c0b3 # Parent ea7a6b8cd1761c8fd0474f3dec615bf608973067 [TEST] Add ref_conf arg to VSMS 13_refconfig_additional_devs.py This arg was removed when I did the patch revisions and didn't make it back in before the patch went out. Signed-off-by: Kaitlin Rupert diff -r ea7a6b8cd176 -r 0e2058a0aa21 suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Wed Aug 20 13:15:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Wed Aug 20 14:30:36 2008 -0700 @@ -129,7 +129,7 @@ if ref is None: raise Exception("Unable to get %s reference" % test_dom) - rc = cxml2.cim_define(options.ip) + rc = cxml2.cim_define(options.ip, ref_conf=ref) if not rc: logger.error("Unable define domain %s" % test_dom2) raise Exception("Unable to define %s" % test_dom2) From danms at us.ibm.com Wed Aug 20 21:50:35 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 20 Aug 2008 14:50:35 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Make HostSystem return the SBLIM ComputerSystem, if present Message-ID: <08a4190517b844711aa4.1219269035@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1219269013 25200 # Node ID 08a4190517b844711aa4fd9dbebfdf894ae23a2b # Parent a55c6df52f5e8108d3e1dc978a2f3b8b32db71dc (#2) Make HostSystem return the SBLIM ComputerSystem, if present Changes: - Make sure we follow the same algorithm as SBLIM (although non-braindead) to arrive at the fully-qualified hostname. Also use this for the fake HostSystem for consistency. Signed-off-by: Dan Smith diff -r a55c6df52f5e -r 08a4190517b8 src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Tue Aug 19 14:13:24 2008 -0700 +++ b/src/Virt_HostSystem.c Wed Aug 20 14:50:13 2008 -0700 @@ -22,6 +22,8 @@ #include #include #include +#include +#include #include #include @@ -36,6 +38,39 @@ const static CMPIBroker *_BROKER; +static int resolve_host(char *host, char *buf, int size) +{ + struct hostent *he; + + he = gethostbyname(host); + if (he == NULL) { + CU_DEBUG("gethostbyname(%s): %m", host); + return -1; + } + + strncpy(buf, he->h_name, size); + + return 0; +} + +static int get_fqdn(char *buf, int size) +{ + char host[256]; + int ret = 0; + + if (gethostname(host, sizeof(host)) != 0) { + CU_DEBUG("gethostname(): %m"); + return -1; + } + + if (strchr(host, '.') != NULL) + strncpy(buf, host, size); + else + ret = resolve_host(host, buf, size); + + return 0; +} + static int set_host_system_properties(CMPIInstance *instance) { CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -48,7 +83,7 @@ (CMPIValue *)CLASSNAME(op), CMPI_chars); } - if (gethostname(hostname, sizeof(hostname) - 1) != 0) + if (get_fqdn(hostname, sizeof(hostname)) != 0) strcpy(hostname, "unknown"); CMSetProperty(instance, "Name", @@ -57,11 +92,9 @@ return 1; } -CMPIStatus get_host(const CMPIBroker *broker, - const CMPIContext *context, - const CMPIObjectPath *reference, - CMPIInstance **_inst, - bool is_get_inst) +static CMPIStatus fake_host(const CMPIBroker *broker, + const CMPIObjectPath *reference, + CMPIInstance **_inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; @@ -69,10 +102,9 @@ conn = connect_by_classname(broker, CLASSNAME(reference), &s); if (conn == NULL) { - if (is_get_inst) - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "No such instance"); + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance"); goto out; } @@ -89,17 +121,71 @@ } set_host_system_properties(inst); + *_inst = inst; + out: + virConnectClose(conn); - if (is_get_inst) { - s = cu_validate_ref(broker, reference, inst); - if (s.rc != CMPI_RC_OK) - goto out; + return s; +} + +static CMPIStatus sblim_host(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *ref, + CMPIInstance **inst) +{ + CMPIObjectPath *path; + CMPIStatus s; + const char *cn = "Linux_ComputerSystem"; + char name[256]; + + if (get_fqdn(name, sizeof(name)) != 0) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to get hostname: %m"); + return s; } - *_inst = inst; + path = CMNewObjectPath(broker, "root/cimv2", cn, &s); + if ((path == NULL) || (s.rc != CMPI_RC_OK)) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to create HostSystem path"); + return s; + } - out: - virConnectClose(conn); + CMAddKey(path, "CreationClassName", cn, CMPI_chars); + CMAddKey(path, "Name", name, CMPI_chars); + + *inst = CBGetInstance(broker, context, path, NULL, &s); + + if (s.rc != CMPI_RC_OK) { + CU_DEBUG("SBLIM: %i %s", s.rc, CMGetCharPtr(s.msg)); + } else { + CU_DEBUG("SBLIM: Returned instance"); + } + + return s; +} + +CMPIStatus get_host(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIInstance **_inst, + bool is_get_inst) +{ + CMPIStatus s; + + s = sblim_host(broker, context, reference, _inst); + if (s.rc != CMPI_RC_OK) + s = fake_host(broker, reference, _inst); + + if (!is_get_inst && (s.rc == CMPI_RC_ERR_NOT_FOUND)) { + /* This is not an error */ + return (CMPIStatus){CMPI_RC_OK, NULL}; + } + + if ((s.rc == CMPI_RC_OK) && is_get_inst) + s = cu_validate_ref(broker, reference, *_inst); return s; } From kaitlin at linux.vnet.ibm.com Wed Aug 20 22:14:54 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 20 Aug 2008 15:14:54 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Make HostSystem return the SBLIM ComputerSystem, if present In-Reply-To: <08a4190517b844711aa4.1219269035@guaranine.danplanet.com> References: <08a4190517b844711aa4.1219269035@guaranine.danplanet.com> Message-ID: <48AC975E.6040707@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1219269013 25200 > # Node ID 08a4190517b844711aa4fd9dbebfdf894ae23a2b > # Parent a55c6df52f5e8108d3e1dc978a2f3b8b32db71dc > (#2) Make HostSystem return the SBLIM ComputerSystem, if present > > Changes: > - Make sure we follow the same algorithm as SBLIM (although non-braindead) > to arrive at the fully-qualified hostname. Also use this for the fake > HostSystem for consistency. > > Signed-off-by: Dan Smith > +1 Plus, I had no complaints with the other patches in the set. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Aug 21 07:45:10 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 21 Aug 2008 17:45:10 +1000 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Aug 21 2008 Message-ID: <200808210745.m7L7jAlA008998@d23av04.au.ibm.com> ================================================= XenFV on Pegasus Test Run Summary for Aug 21 2008 ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) Kernel: 2.6.18-92.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 672 Libvirt-cim changeset: 90ac6766de08 ================================================= FAIL : 17 XFAIL : 0 SKIP : 4 PASS : 115 ----------------- Total : 136 ================================================= FAIL Test Summary: ComputerSystem - 03_defineVS.py: FAIL ComputerSystemIndication - 01_created_indication.py: FAIL ElementConforms - 01_forward.py: FAIL ElementSettingData - 01_forward.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL HostSystem - 04_hs_to_EAPF.py: FAIL LogicalDisk - 02_nodevs.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL NetworkPort - 01_netport.py: FAIL ResourceAllocationFromPool - 02_reverse.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 08_modifyresource.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL VirtualSystemSettingDataComponent - 01_forward.py: FAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP sys.exit(SKIP) NetworkPort - 03_user_netport.py: SKIP VSSD - 02_bootldr.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: FAIL ERROR - Failed to enumerate the class of Xen_ComputerSystem ERROR - Exception: No defined domain (domU1) is found ERROR - Error: property values are not set for VS domU1 -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain not running') InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain not running -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: FAIL ERROR - Need to give different bridge name since it already exists ERROR - SystemExit : 2 Traceback (most recent call last): File "/data/users/deepti/cimtest/lib/CimTest/Globals.py", line 144, in do_try rc = f() File "01_created_indication.py", line 188, in main destroy_netpool(options.ip, options.virt, test_network) File "/data/users/deepti/cimtest/suites/libvirt-cim/lib/XenKvmLib/common_util.py", line 404, in destroy_netpool netxml = NetXML(server, virt=virt, networkname=net_name) File "/data/users/deepti/cimtest/suites/libvirt-cim/lib/XenKvmLib/vxml.py", line 193, in __init__ sys.exit(SKIP) SystemExit: 2 ERROR - None -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - Failed to get associators information for ElementConformsToProfile ERROR - Exception: not enough arguments for format string -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS ERROR - Failed to get instance by the class of Xen_ComputerSystem ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (domgst).') ERROR - Failed to get instance by the class of Xen_ComputerSystem ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (domgst).') -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: FAIL ERROR - Expected at least one VirtualSystemSettingData instance CIM_ERR_NOT_FOUND: No such instance (esd_dom) -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: FAIL ERROR - Xen_HostSystem with CrossClass_GuestDom was not returned -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: FAIL ERROR - Xen_ElementAllocatedFromPool returned 0 Xen_DiskPool objects -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: FAIL ERROR - LogicalDisk returned 1 instead of empty list -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: FAIL ERROR - Failed to get instance by the class of Xen_LogicalDisk ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/hda)') -------------------------------------------------------------------- Memory - 01_memory.py: FAIL ERROR - Capacity should be 262144 MB instead of 131072 MB -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: FAIL ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)') -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: FAIL ERROR - No associated pool for RAFP_dom/00:11:22:33:44:aa CIM_ERR_FAILED: Unable to determine pool of `RAFP_dom/00:11:22:33:44:aa' -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS InvokeMethod(CreateResourcePool): CIM_ERR_NOT_SUPPORTED -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS InvokeMethod(CreateChildResourcePool): CIM_ERR_NOT_SUPPORTED -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS InvokeMethod(AddResourcesToResourcePool): CIM_ERR_FAILED: Unknown Method -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS InvokeMethod(RemoveResourcesFromResourcePool): CIM_ERR_NOT_SUPPORTED -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS InvokeMethod(DeleteResourcePool): CIM_ERR_NOT_SUPPORTED -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: FAIL ERROR - Xen_VirtualSystemSettingData with VSSDC_dom was not returned ERROR - Xen_VirtualSystemSettingData returned 0 VSSD objects, expected only 1 -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS InvokeMethod(DefineSystem): CIM_ERR_FAILED: Unable to parse embedded object -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS InvokeMethod(DefineSystem): CIM_ERR_FAILED: Unable to parse embedded object -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS ERROR - For Invalid Scenario 'noname' ERROR - For Invalid Scenario 'nonexistent' InvokeMethod(DestroySystem): CIM_ERR_FAILED: Unable to retrieve domain name. InvokeMethod(DestroySystem): CIM_ERR_FAILED: Failed to find domain -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: FAIL ERROR - Got 99:aa:bb:cc:ee:ff, exp 99:aa:bb:cc:ee:ff. Got None, exp default-net4. ERROR - Error invoking AddRS: add_net_res ERROR - Error adding rs for net mac -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unable to parse embedded object -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: FAIL ERROR - Got None, exp /tmp/default-kvm-dimage.2ND. ERROR - Error invoking ModifyRS: mod_disk_res ERROR - Error changing rs for disk path -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Virt_MigrationJob err: can't find expected job inst -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Virt_MigrationJob err: can't find expected job inst -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS InvokeMethod(CheckVirtualSystemIsMigratableToHost): CIM_ERR_FAILED: Missing key (Name) in ComputerSystem -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: FAIL ERROR - VSSD instance for VSSDC_dom not found CIM_ERR_NOT_FOUND: No such instance (VSSDC_dom) -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- From yunguol at cn.ibm.com Thu Aug 21 09:32:22 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 21 Aug 2008 17:32:22 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add checks for CIMOM and libvirtd In-Reply-To: <6d3fac9485bc4f4e259d.1219264656@elm3b41.beaverton.ibm.com> Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-21 04:37:36: > # HG changeset patch > # User Kaitlin Rupert > # Date 1219263226 25200 > # Node ID 6d3fac9485bc4f4e259d82af1c1fb7c0028b03ae > # Parent 1364e9ddf32b315c7e752636b601fa54acd6e44d > [TEST] Add checks for CIMOM and libvirtd. > > Also, clean up some old comments and remove some unneeded white space. > > Signed-off-by: Kaitlin Rupert > > diff -r 1364e9ddf32b -r 6d3fac9485bc suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Wed Aug 20 13:13:39 2008 -0700 > +++ b/suites/libvirt-cim/main.py Wed Aug 20 13:13:46 2008 -0700 > @@ -35,6 +35,7 @@ > from XenKvmLib.classes import get_typed_class > import ConfigParser > from XenKvmLib.reporting import gen_report, send_report > +from VirtLib import utils > > parser = OptionParser() > parser.add_option("-i", "--ip", dest="ip", default="localhost", > @@ -84,6 +85,22 @@ > status, output = commands.getstatusoutput(cmd) > > print "Cleaned log files." > + > +def pre_check(ip): > + cmd = "ps -ef | grep -v grep | grep cimserver" > + rc, out = utils.run_remote(ip, cmd) > + if rc != 0: > + cmd = "ps -ef | grep -v grep | grep sfcbd" > + rc, out = utils.run_remote(ip, cmd) > + if rc != 0: > + return "A supported CIMOM is not running" > + > + cmd = "ps -ef | grep -v grep | grep libvirtd" > + rc, out = utils.run_remote(ip, cmd) > + if rc != 0: > + return "libvirtd is not running" > + > + return None > > def get_rcfile_vals(): > if not os.access(CIMTEST_RCFILE, os.R_OK): > @@ -135,21 +152,22 @@ > parser.print_help() > return 1 > > + env_ready = pre_check(options.ip) > + if env_ready != None: > + print "\n%s. Please check your environment.\n" % env_ready > + return 1 > + > # HACK: Exporting CIMOM_PORT as an env var, to be able to test things > - # on Director without having to change a lot of code. > - # This will change soon > + # with a different port > if options.port: > os.environ['CIMOM_PORT'] = str(options.port) > - # > > if options.report: > + to_addr = options.report > from_addr, relay = get_rcfile_vals() > - > if from_addr == None or relay == None: > return 1 > > - to_addr = options.report > - > testsuite = TestSuite.TestSuite(log=True) > > set_python_path() > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Aug 21 09:34:13 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 21 Aug 2008 17:34:13 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add ref_conf arg to VSMS 13_refconfig_additional_devs.py In-Reply-To: <0e2058a0aa211370347e.1219267846@elm3b41.beaverton.ibm.com> Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-21 05:30:46: > # HG changeset patch > # User Kaitlin Rupert > # Date 1219267836 25200 > # Node ID 0e2058a0aa211370347e8617ca8a17437fa2c0b3 > # Parent ea7a6b8cd1761c8fd0474f3dec615bf608973067 > [TEST] Add ref_conf arg to VSMS 13_refconfig_additional_devs.py > > This arg was removed when I did the patch revisions and didn't make > it back in before the patch went out. > > Signed-off-by: Kaitlin Rupert > > diff -r ea7a6b8cd176 -r 0e2058a0aa21 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py > --- a/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs. > py Wed Aug 20 13:15:28 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs. > py Wed Aug 20 14:30:36 2008 -0700 > @@ -129,7 +129,7 @@ > if ref is None: > raise Exception("Unable to get %s reference" % test_dom) > > - rc = cxml2.cim_define(options.ip) > + rc = cxml2.cim_define(options.ip, ref_conf=ref) > if not rc: > logger.error("Unable define domain %s" % test_dom2) > raise Exception("Unable to define %s" % test_dom2) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Aug 21 09:49:47 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 21 Aug 2008 17:49:47 +0800 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Replace calls to CIM_REV with get_provider_revision() In-Reply-To: <3c67961e54f615da6fc8.1219264870@elm3b41.beaverton.ibm.com> Message-ID: +1 from me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-21 04:41:10: > # HG changeset patch > # User Kaitlin Rupert > # Date 1219263328 25200 > # Node ID 3c67961e54f615da6fc86862031f068cc8ed9745 > # Parent 7d4ed16e284fe614f8f61909850db14fec0070ab > [TEST] Replace calls to CIM_REV with get_provider_revision() > > Signed-off-by: Kaitlin Rupert > > diff -r 7d4ed16e284f -r 3c67961e54f6 suites/libvirt- > cim/cimtest/NetworkPort/01_netport.py > --- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Wed Aug > 20 13:15:28 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Wed Aug > 20 13:15:28 2008 -0700 > @@ -39,11 +39,25 @@ > from CimTest.Globals import logger > from CimTest.Globals import do_main > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > +from XenKvmLib.const import get_provider_version > > sup_types = ['Xen', 'KVM', 'XenFV'] > > test_dom = "test_domain" > test_mac = "00:11:22:33:44:55" > + > +def get_linktech(ip, virt): > + rev, changeset = get_provider_version(virt, ip) > + > + net_rev = 599 > + > + # The value of LinkTechnology should be set to 0 for rev > 599 > + # else, it should be set to 2 > + if net_rev > rev: > + return 0 > + else: > + return 2 > + > > @do_main(sup_types) > def main(): > @@ -75,10 +89,12 @@ > return FAIL > > status = PASS > + > + link_tech = get_linktech(options.ip, options.virt) > > - if dev.LinkTechnology != devices.LinkTechnology_Ethernet: > + if dev.LinkTechnology != link_tech: > logger.error("LinkTechnology should be set to `%i' instead > of `%s'" % \ > - (devices.LinkTechnology_Ethernet, dev.LinkTechnology)) > + (link_tech, dev.LinkTechnology)) > status = FAIL > > addrs = dev.NetworkAddresses > diff -r 7d4ed16e284f -r 3c67961e54f6 suites/libvirt- > cim/lib/XenKvmLib/devices.py > --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Wed Aug 20 13: > 15:28 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Wed Aug 20 13: > 15:28 2008 -0700 > @@ -26,19 +26,8 @@ > from CimTest import CimExt > from CimTest import Globals > from XenKvmLib import assoc > -from XenKvmLib.const import CIM_REV > from XenKvmLib.classes import get_typed_class > > -net_rev = 599 > - > -# The branch has to be removed once the new rpm > -# including the changes in revision 599 is available. > -# The value of LinkTechnology should be set to 2 for > -# network, bridge and ethernet type interfaces. > -if net_rev > CIM_REV: > - LinkTechnology_Ethernet = 0 > -else: > - LinkTechnology_Ethernet = 2 > > class CIM_Instance: > def __init__(self, inst): > diff -r 7d4ed16e284f -r 3c67961e54f6 suites/libvirt- > cim/lib/XenKvmLib/reporting.py > --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Wed Aug 20 13: > 15:28 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Wed Aug 20 13: > 15:28 2008 -0700 > @@ -24,6 +24,7 @@ > import smtplib > from time import gmtime, strftime > from VirtLib import utils > +from XenKvmLib.const import get_provider_version > > def get_cmd_val(cmd, ip): > rc, out = utils.run_remote(ip, cmd) > @@ -67,7 +68,7 @@ > return cimom, cimom_ver > > > -def get_env_data(rev, changeset, ip): > +def get_env_data(ip, virt): > distro = get_cmd_val("cat /etc/issue | awk 'NR<=1'", ip) > kernel_ver = get_cmd_val("uname -r", ip) > > @@ -77,6 +78,8 @@ > > env = "Distro: %s\nKernel: %s\nlibvirt: %s\nHypervisor: % > s\nCIMOM: %s %s\n"\ > % (distro, kernel_ver, libvirt_ver, hyp_ver, cimom, cimom_ver) > + > + rev, changeset = get_provider_version(virt, ip) > > lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \ > (rev, changeset) > @@ -129,13 +132,13 @@ > > return results, results_total, test_block > > -def gen_report(rev, changeset, virt, ip, log_file): > +def gen_report(virt, ip, log_file): > date = strftime("%b %d %Y", gmtime()) > > cimom, cimom_ver = get_cimom_ver(ip) > > heading = "%s on %s Test Run Summary for %s" % (virt, cimom, date) > - sys_env = get_env_data(rev, changeset, ip) > + sys_env = get_env_data(ip, virt) > > divider = "=================================================\n" > > diff -r 7d4ed16e284f -r 3c67961e54f6 suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Wed Aug 20 13:15:28 2008 -0700 > +++ b/suites/libvirt-cim/main.py Wed Aug 20 13:15:28 2008 -0700 > @@ -192,8 +192,7 @@ > testsuite.debug("%s\n" % div) > testsuite.finish() > > - msg_body, heading = gen_report(revision, changeset, options.virt, > - options.ip, testsuite.log_file) > + msg_body, heading = gen_report(options.virt, options.ip, > testsuite.log_file) > > if options.report: > print "Sending mail from %s to %s using %s relay.\n" % \ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Thu Aug 21 13:12:18 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 21 Aug 2008 18:42:18 +0530 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Aug 21 2008 In-Reply-To: <200808210745.m7L7jAlA008998@d23av04.au.ibm.com> References: <200808210745.m7L7jAlA008998@d23av04.au.ibm.com> Message-ID: <48AD69B2.7030303@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > ================================================= > XenFV on Pegasus Test Run Summary for Aug 21 2008 > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) > Kernel: 2.6.18-92.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.0 > Libvirt-cim revision: 672 > Libvirt-cim changeset: 90ac6766de08 > ================================================= > FAIL : 17 > XFAIL : 0 > SKIP : 4 > PASS : 115 > ----------------- > Total : 136 > ================================================= > FAIL Test Summary: > ComputerSystem - 03_defineVS.py: FAIL > ComputerSystemIndication - 01_created_indication.py: FAIL > ElementConforms - 01_forward.py: FAIL > ElementSettingData - 01_forward.py: FAIL > HostSystem - 02_hostsystem_to_rasd.py: FAIL > HostSystem - 04_hs_to_EAPF.py: FAIL > LogicalDisk - 02_nodevs.py: FAIL > LogicalDisk - 03_ld_gi_errs.py: FAIL > Memory - 01_memory.py: FAIL > NetworkPort - 01_netport.py: FAIL > ResourceAllocationFromPool - 02_reverse.py: FAIL > VSSD - 04_vssd_to_rasd.py: FAIL > VirtualSystemManagementService - 06_addresource.py: FAIL > VirtualSystemManagementService - 08_modifyresource.py: FAIL > VirtualSystemSettingDataComponent - 01_forward.py: FAIL > All of the above tc passed when run manually. > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > > The above tc are failing because of the InstanceID mismatch. > ================================================= > SKIP Test Summary: > ComputerSystem - 02_nosystems.py: SKIP > sys.exit(SKIP) > NetworkPort - 03_user_netport.py: SKIP > VSSD - 02_bootldr.py: SKIP > The above 3 tc are valid skip tc. > ================================================= > Full report: > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: PASS > ERROR - Failed to get instance by the class of Xen_ComputerSystem > ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (domgst).') > ERROR - Failed to get instance by the class of Xen_ComputerSystem > ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (domgst).') > > I was not able to reproduce this error. Thanks and Regards, Deepti. From danms at us.ibm.com Thu Aug 21 14:02:26 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 21 Aug 2008 07:02:26 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Make HostSystem return the SBLIM ComputerSystem, if present In-Reply-To: <48AC414B.3060503@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Wed, 20 Aug 2008 09:07:39 -0700") References: <304d6c3d06697f93c35b.1219180445@guaranine.danplanet.com> <48AC414B.3060503@linux.vnet.ibm.com> Message-ID: <87zln6lb4d.fsf@caffeine.beaverton.ibm.com> KR> The node name on my system isn't a FQDN. It looks like the sblim KR> providers use a FQDN. So even though I have the sblim providers KR> installed, I still get back the faked HostSystem. Yeah, they actually exec /bin/dnsdomainname, which does a lookup of the hostname if it's not fully-qualified. I've sent another patch that replicates this behavior (although not the exec, of course). -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From jfehlig at novell.com Thu Aug 21 17:05:49 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Thu, 21 Aug 2008 11:05:49 -0600 Subject: [Libvirt-cim] [PATCH 0 of 3] Reference SBLIM host system when possible In-Reply-To: References: Message-ID: <48ADA06D.4050607@novell.com> Dan Smith wrote: > This patch set (eventually) makes the providers return references to > the SBLIM Linux_ComputerSystem instance, if that provider is available. This > makes all of the Hosted* associations (and others) correctly point to the > SBLIM provider when possible. As a fallback, we continue to return our fake > instances if the SBLIM provider isn't installed. > Nice! As the SBLIM project evolves, I suspect libvirt-cim will be able to leverage more implementations there. E.g. where SVPC models reference SMWG or SMI-S models. Jim From danms at us.ibm.com Thu Aug 21 21:13:29 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 21 Aug 2008 14:13:29 -0700 Subject: [Libvirt-cim] [PATCH] Add ConcreteComponent with NetworkPool support Message-ID: <5f3be2816c7c7128d8bc.1219353209@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1219353207 25200 # Node ID 5f3be2816c7c7128d8bc6fc4aee5cadc4a9fa338 # Parent 90ac6766de08cb6f0beca7f7c4cba35331ac83a5 Add ConcreteComponent with NetworkPool support This adds the ConcreteComponent association, and hooks it up to NetworkPool for now. If you have sblim-cmpi-network on your system, this references the Linux_EthernetPort instance exposed by SBLIM for the bridge device associated with the network pool. Note that port_to_netpool() is untested and won't get called by the CIMOM because we're not registering this association in root/cimv2. I don't think it makes much sense for us to do that to support this backwards, so I'm content to leave this as kinda broken until someone comes up with a better idea, or complains. Signed-off-by: Dan Smith diff -r 90ac6766de08 -r 5f3be2816c7c Makefile.am --- a/Makefile.am Wed Aug 20 15:33:36 2008 -0700 +++ b/Makefile.am Thu Aug 21 14:13:27 2008 -0700 @@ -41,7 +41,8 @@ schema/VSMigrationService.mof \ schema/VSMigrationSettingData.mof \ schema/VirtualSystemSnapshotService.mof \ - schema/VirtualSystemSnapshotServiceCapabilities.mof + schema/VirtualSystemSnapshotServiceCapabilities.mof \ + schema/ConcreteComponent.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -88,7 +89,8 @@ schema/ElementConformsToProfile.registration \ schema/VSMigrationSettingData.registration \ schema/VirtualSystemSnapshotService.registration \ - schema/VirtualSystemSnapshotServiceCapabilities.registration + schema/VirtualSystemSnapshotServiceCapabilities.registration \ + schema/ConcreteComponent.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 90ac6766de08 -r 5f3be2816c7c schema/ConcreteComponent.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/ConcreteComponent.mof Thu Aug 21 14:13:27 2008 -0700 @@ -0,0 +1,5 @@ +// Copyright IBM Corp. 2008 + +class Xen_ConcreteComponent : CIM_ConcreteComponent { }; +class KVM_ConcreteComponent : CIM_ConcreteComponent { }; +class LXC_ConcreteComponent : CIM_ConcreteComponent { }; diff -r 90ac6766de08 -r 5f3be2816c7c schema/ConcreteComponent.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/ConcreteComponent.registration Thu Aug 21 14:13:27 2008 -0700 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2008 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association +KVM_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association +KVM_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association diff -r 90ac6766de08 -r 5f3be2816c7c src/Makefile.am --- a/src/Makefile.am Wed Aug 20 15:33:36 2008 -0700 +++ b/src/Makefile.am Thu Aug 21 14:13:27 2008 -0700 @@ -64,7 +64,8 @@ libVirt_ResourceAllocationFromPool.la \ libVirt_ElementAllocatedFromPool.la \ libVirt_HostedService.la \ - libVirt_ElementSettingData.la + libVirt_ElementSettingData.la \ + libVirt_ConcreteComponent.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_ComputerSystem_la_DEPENDENCIES = libVirt_VirtualSystemSnapshotService.la @@ -186,3 +187,7 @@ libVirt_VirtualSystemSnapshotServiceCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemSnapshotServiceCapabilities_la_SOURCES = Virt_VirtualSystemSnapshotServiceCapabilities.c libVirt_VirtualSystemSnapshotServiceCapabilities_la_LIBADD = + +libVirt_ConcreteComponent_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_ConcreteComponent_la_SOURCES = Virt_ConcreteComponent.c +libVirt_ConcreteComponent_la_LIBADD = -lVirt_HostSystem diff -r 90ac6766de08 -r 5f3be2816c7c src/Virt_ConcreteComponent.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_ConcreteComponent.c Thu Aug 21 14:13:27 2008 -0700 @@ -0,0 +1,243 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#include +#include +#include +#include + +#include + +#include "cmpidt.h" +#include "cmpift.h" +#include "cmpimacs.h" + +#include +#include +#include "misc_util.h" + +#include "Virt_HostSystem.h" +#include "Virt_DevicePool.h" + +const static CMPIBroker *_BROKER; + +static char *bridge_from_netpool(virConnectPtr conn, + const char *poolid) +{ + char *netname = NULL; + char *bridge = NULL; + virNetworkPtr net = NULL; + + netname = name_from_pool_id(poolid); + if (netname == NULL) { + CU_DEBUG("Unable to parse network pool id: %s", poolid); + goto out; + } + + net = virNetworkLookupByName(conn, netname); + if (net == NULL) { + CU_DEBUG("Unable to find network %s", netname); + goto out; + } + + bridge = virNetworkGetBridgeName(net); + out: + free(netname); + virNetworkFree(net); + + return bridge; +} + +static CMPIInstance *get_bridge_instance(const CMPIContext *context, + const CMPIObjectPath *ref, + const char *bridge, + CMPIStatus *s) +{ + CMPIObjectPath *path; + CMPIInstance *inst = NULL; + const char *cn = "Linux_EthernetPort"; + const char *sys = NULL; + const char *syscc = NULL; + + *s = get_host_system_properties(&sys, &syscc, ref, _BROKER, context); + if (s->rc != CMPI_RC_OK) + goto out; + + path = CMNewObjectPath(_BROKER, "root/cimv2", cn, s); + if ((path == NULL) || (s->rc != CMPI_RC_OK)) + goto out; + + CMAddKey(path, "CreationClassName", cn, CMPI_chars); + CMAddKey(path, "SystemName", sys, CMPI_chars); + CMAddKey(path, "SystemCreationClassName", syscc, CMPI_chars); + CMAddKey(path, "DeviceID", bridge, CMPI_chars); + + inst = CBGetInstance(_BROKER, context, path, NULL, s); + out: + return inst; +} + +static CMPIStatus netpool_to_port(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) +{ + virConnectPtr conn = NULL; + CMPIStatus s; + const char *poolid; + char *bridge = NULL; + CMPIInstance *inst; + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + return s; + + if (cu_get_str_path(ref, "InstanceID", &poolid) != CMPI_RC_OK) { + CU_DEBUG("Failed to get InstanceID from NetworkPool"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing InstanceID in NetworkPool"); + goto out; + } + + bridge = bridge_from_netpool(conn, poolid); + if (bridge == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "NetworkPool not found"); + goto out; + } + + inst = get_bridge_instance(info->context, ref, bridge, &s); + if (inst != NULL) + inst_list_add(list, inst); + + out: + free(bridge); + virConnectClose(conn); + + return s; +} + +static CMPIStatus port_to_netpool(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s; + const char *device; + virConnectPtr conn = NULL; + CMPIInstance *inst = NULL; + char *id = NULL; + + if (cu_get_str_path(ref, "DeviceID", &device) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing DeviceID from EthernetPort"); + return s; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + return s; + + if (asprintf(&id, "NetworkPool/%s", device) == -1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to format NetworkPool ID"); + goto out; + } + + s = get_pool_by_name(_BROKER, ref, id, &inst); + if ((inst != NULL) && (s.rc == CMPI_RC_OK)) + inst_list_add(list, inst); + out: + free(id); + virConnectClose(conn); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *GroupComponent[] = { + "Xen_NetworkPool", + "KVM_NetworkPool", + "LXC_NetworkPool", + NULL +}; + +static char *PartComponent[] = { + "Linux_EthernetPort", + NULL, +}; + +static char *assoc_classname[] = { + "Xen_ConcreteComponent", + "KVM_ConcreteComponent", + "LXC_ConcreteComponent", + NULL +}; + +static struct std_assoc _netpool_to_port = { + .source_class = (char **)&GroupComponent, + .source_prop = "GroupComponent", + + .target_class = (char **)&PartComponent, + .target_prop = "PartComponent", + + .assoc_class = (char **)&assoc_classname, + + .handler = netpool_to_port, + .make_ref = make_ref +}; + +static struct std_assoc _port_to_netpool = { + .source_class = (char **)&PartComponent, + .source_prop = "PartComponent", + + .target_class = (char **)&GroupComponent, + .target_prop = "GroupComponent", + + .assoc_class = (char **)&assoc_classname, + + .handler = port_to_netpool, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_netpool_to_port, + &_port_to_netpool, + NULL +}; + +STDA_AssocMIStub(, + Virt_ConcreteComponent, + _BROKER, + libvirt_cim_init(), + handlers); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ From yunguol at cn.ibm.com Fri Aug 22 01:37:14 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 22 Aug 2008 09:37:14 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix debug output In-Reply-To: <4cbb5bea5f3b72a7a716.1219090712@elm3b41.beaverton.ibm.com> Message-ID: +1 for me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-19 04:18:32: > # HG changeset patch > # User Kaitlin Rupert > # Date 1219090696 25200 > # Node ID 4cbb5bea5f3b72a7a716bb9d3c4b6e8d9c3f4596 > # Parent 6a75861bbe432d0cc8f143783cb5d00a75101ecb > [TEST] Fix debug output > > If the test passes, then there's no need to print debug output. > Otherwise, negative test cases (that run in to intentional failures) > might print confusing debug messages. > > Signed-off-by: Kaitlin Rupert > > diff -r 6a75861bbe43 -r 4cbb5bea5f3b lib/TestSuite.py > --- a/lib/TestSuite.py Sun Aug 17 21:34:33 2008 -0700 > +++ b/lib/TestSuite.py Mon Aug 18 13:18:16 2008 -0700 > @@ -68,7 +68,7 @@ > bug = err > > self.rep.results("%s - %s" % (group, test), status, bug) > - if output: > + if output and status != PASS: > self.rep.debug(1, output) > > def debug(self, str): > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Aug 22 01:47:46 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 22 Aug 2008 09:47:46 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel In-Reply-To: <0ffa5529fe3bc599cba8.1219093789@elm3b41.beaverton.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-19 05:09:49: > # HG changeset patch > # User Kaitlin Rupert > # Date 1219093729 25200 > # Node ID 0ffa5529fe3bc599cba875ac3927efe9e56b8626 > # Parent 4cbb5bea5f3b72a7a716bb9d3c4b6e8d9c3f4596 > [TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel. > > Signed-off-by: Kaitlin Rupert > > diff -r 4cbb5bea5f3b -r 0ffa5529fe3b suites/libvirt-cim/images/xmt-makefv.sh > --- a/suites/libvirt-cim/images/xmt-makefv.sh Mon Aug 18 13:18:16 2008 -0700 > +++ b/suites/libvirt-cim/images/xmt-makefv.sh Mon Aug 18 14:08:49 2008 -0700 > @@ -85,7 +85,18 @@ > kernel_path() { > local prefix=$1 > > - find /boot | grep vmlinuz | grep -v xen | tail -n1 > + local image=`find /boot | grep vmlinuz | grep -v xen | tail -n1` > + > + if [ -z $image ]; then > + local dummy_path="cimtest-dummy-image" > + > + echo "No non-Xen kernel found. Creating a fake image.\n" > + touch /boot/vmlinuz-$(dummy_path) > + mkdir /lib/modules/$(dummy_path) > + image="/boot/vmlinuz-$(dummy_path)" > + fi > + > + echo $image > } +1 for me. But I don't know whether we have to remove the fake image after test running, If so, how? Thanks! > > copy_in_kernel() { > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Fri Aug 22 09:06:58 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 22 Aug 2008 02:06:58 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Fixed 01_migratable_host.py and 02_host_migrate_type.py of VSMigrationService In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1219395997 25200 # Node ID f9e7b191ea7c33f5a0f0f63d03bb812f21c5e6e8 # Parent 9685653189eb23d669cd25de192b6cb80308439a [TEST] Fixed 01_migratable_host.py and 02_host_migrate_type.py of VSMigrationService. Signed-off-by: Deepti B. Kalakeri diff -r 9685653189eb -r f9e7b191ea7c suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Fri Aug 22 02:00:25 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Fri Aug 22 02:06:37 2008 -0700 @@ -68,6 +68,7 @@ def start_guest_get_ref(ip, guest_name, @do_main(sup_types) def main(): options = main.options + virt = options.virt status = PASS rc = -1 @@ -85,14 +86,13 @@ def main(): else: local_migrate = 0 - status, cs_ref, cxml = start_guest_get_ref(options.ip, dom_name, options.virt) + status, cs_ref, cxml = start_guest_get_ref(options.ip, dom_name, virt) if status != PASS: cxml.destroy(options.ip) cxml.undefine(options.ip) return FAIL guest_name = cs_ref['Name'] - status = check_possible_host_migration(service, cs_ref, target_ip) if status != PASS: cxml.destroy(options.ip) @@ -108,9 +108,8 @@ def main(): return status elif len(ret) == 2: id = ret[1]['Job'].keybindings['InstanceID'] - status = check_migration_job(options.ip, id, target_ip, - guest_name, local_migrate) + guest_name, local_migrate, virt) cxml.destroy(options.ip) cxml.undefine(options.ip) diff -r 9685653189eb -r f9e7b191ea7c suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Fri Aug 22 02:00:25 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Fri Aug 22 02:06:37 2008 -0700 @@ -29,7 +29,8 @@ from XenKvmLib.common_util import poll_f from XenKvmLib.common_util import poll_for_state_change from XenKvmLib import computersystem from XenKvmLib import vsmigrations -from XenKvmLib.vsmigrations import check_possible_host_migration, migrate_guest_to_host, check_migration_job +from XenKvmLib.vsmigrations import check_possible_host_migration, \ +migrate_guest_to_host, check_migration_job from XenKvmLib import enumclass from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL @@ -116,6 +117,7 @@ def main(): options = main.options status = PASS rc = -1 + virt = options.virt try: service = vsmigrations.Xen_VirtualSystemMigrationService(options.ip) @@ -136,7 +138,7 @@ def main(): ref_list = [] cs_ref = None - status, ref_list = setup_env(options.ip, mlist, local_migrate, options.virt) + status, ref_list = setup_env(options.ip, mlist, local_migrate, virt) if status != PASS or len(ref_list) < 1: return FAIL @@ -145,7 +147,7 @@ def main(): for type, item in mlist.iteritems(): guest_name = cs_ref['Name'] - status, cxml = start_guest(options.ip, guest_name, type, options.virt) + status, cxml = start_guest(options.ip, guest_name, type, virt) if status != PASS: break @@ -166,7 +168,7 @@ def main(): id = ret[1]['Job'].keybindings['InstanceID'] status = check_migration_job(options.ip, id, target_ip, - guest_name, local_migrate) + guest_name, local_migrate, virt) if status != PASS: break From deeptik at linux.vnet.ibm.com Fri Aug 22 09:06:56 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 22 Aug 2008 02:06:56 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] Fixed 01_migratable_host.py and 02_host_migrate_type.py of VSMigrationService. Message-ID: From deeptik at linux.vnet.ibm.com Fri Aug 22 09:06:57 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 22 Aug 2008 02:06:57 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Fixed enumclass.py and vsmigration.py to work with different Virt MigrationJob In-Reply-To: Message-ID: <9685653189eb23d669cd.1219396017@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1219395625 25200 # Node ID 9685653189eb23d669cd25de192b6cb80308439a # Parent a2d99551422607e336428ea36d23e5336042a847 [TEST] Fixed enumclass.py and vsmigration.py to work with different Virt MigrationJob. Remove hardcoded Virt prefix from VSMigrationJob and used the virt param. Signed-off-by: Deepti B. Kalakeri diff -r a2d995514226 -r 9685653189eb suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Aug 20 14:30:36 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Aug 22 02:00:25 2008 -0700 @@ -90,9 +90,13 @@ class CIM_DiskResourceAllocationSettingD class CIM_DiskResourceAllocationSettingData(CIM_MyClass): pass +class Xen_MigrationJob(CIM_MyClass): + pass +class KVM_MigrationJob(CIM_MyClass): + pass -class Virt_MigrationJob(CIM_MyClass): +class XenFV_MigrationJob(CIM_MyClass): pass class Xen_RegisteredProfile(CIM_RegisteredProfile): diff -r a2d995514226 -r 9685653189eb suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Aug 20 14:30:36 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Fri Aug 22 02:00:25 2008 -0700 @@ -26,6 +26,7 @@ from XenKvmLib.test_doms import destroy_ from XenKvmLib.test_doms import destroy_and_undefine_domain from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib import enumclass +from XenKvmLib.classes import get_typed_class from VirtLib.live import domain_list class CIM_VirtualSystemMigrationService(CIMMethodClass): @@ -100,22 +101,19 @@ def migrate_guest_to_host(service, ref, if len(ret) == 0: logger.error("MigrateVirtualSystemToHost returns an empty list") return FAIL, ret - return PASS, ret -def get_migration_job_instance(ip, id): +def get_migration_job_instance(ip, virt, id): job = [] key_list = ["instanceid"] - + mig_job_cn = get_typed_class(virt, 'MigrationJob') try: - #virt='Virt' is odd here. However, for MigrationJob, the - #provider is virtualization neutral. job = enumclass.enumerate(ip, - enumclass.Virt_MigrationJob, + mig_job_cn, key_list, - virt='Virt') + virt=virt) except Exception, details: - logger.error(CIM_ERROR_ENUMERATE, 'Virt_MigrationJob') + logger.error(CIM_ERROR_ENUMERATE, mig_job_cn) logger.error(details) return FAIL, None @@ -126,7 +124,7 @@ def get_migration_job_instance(ip, id): if job[i].InstanceID == id: break elif i == len(job)-1 and job[i].InstanceID != id: - logger.error("Virt_MigrationJob err: can't find expected job inst") + logger.error("%s err: can't find expected job inst", mig_job_cn) return FAIL, None return PASS, job[i] @@ -144,8 +142,8 @@ def verify_domain_list(list, local_migra return PASS -def check_migration_job(ip, id, target_ip, test_dom, local_migrate): - status, job_inst = get_migration_job_instance(ip, id) +def check_migration_job(ip, id, target_ip, test_dom, local_migrate, virt='Xen'): + status, job_inst = get_migration_job_instance(ip, virt, id) if status != PASS: return FAIL @@ -159,7 +157,7 @@ def check_migration_job(ip, id, target_i break elif job_inst.JobState == 4 and i < 49: time.sleep(3) - status, job_inst = get_migration_job_instance(ip, id) + status, job_inst = get_migration_job_instance(ip, virt, id) if status != PASS: return FAIL else: From danms at us.ibm.com Fri Aug 22 17:52:55 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 22 Aug 2008 10:52:55 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Add ConcreteComponent with NetworkPool support Message-ID: <794e7f3b23d0eef1231c.1219427575@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1219427442 25200 # Node ID 794e7f3b23d0eef1231cab33fc8df85f91d284b1 # Parent 90ac6766de08cb6f0beca7f7c4cba35331ac83a5 (#2) Add ConcreteComponent with NetworkPool support This adds the ConcreteComponent association, and hooks it up to NetworkPool for now. If you have sblim-cmpi-network on your system, this references the Linux_EthernetPort instance exposed by SBLIM for the bridge device associated with the network pool. Note that port_to_netpool() is untested and won't get called by the CIMOM because we're not registering this association in root/cimv2. I don't think it makes much sense for us to do that to support this backwards, so I'm content to leave this as kinda broken until someone comes up with a better idea, or complains. Changes: - Match the hypervisor prefix to avoid duplicate results - Rename GroupComponent and PartComponent to be more appropriate Signed-off-by: Dan Smith diff -r 90ac6766de08 -r 794e7f3b23d0 Makefile.am --- a/Makefile.am Wed Aug 20 15:33:36 2008 -0700 +++ b/Makefile.am Fri Aug 22 10:50:42 2008 -0700 @@ -41,7 +41,8 @@ schema/VSMigrationService.mof \ schema/VSMigrationSettingData.mof \ schema/VirtualSystemSnapshotService.mof \ - schema/VirtualSystemSnapshotServiceCapabilities.mof + schema/VirtualSystemSnapshotServiceCapabilities.mof \ + schema/ConcreteComponent.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -88,7 +89,8 @@ schema/ElementConformsToProfile.registration \ schema/VSMigrationSettingData.registration \ schema/VirtualSystemSnapshotService.registration \ - schema/VirtualSystemSnapshotServiceCapabilities.registration + schema/VirtualSystemSnapshotServiceCapabilities.registration \ + schema/ConcreteComponent.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 90ac6766de08 -r 794e7f3b23d0 schema/ConcreteComponent.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/ConcreteComponent.mof Fri Aug 22 10:50:42 2008 -0700 @@ -0,0 +1,5 @@ +// Copyright IBM Corp. 2008 + +class Xen_ConcreteComponent : CIM_ConcreteComponent { }; +class KVM_ConcreteComponent : CIM_ConcreteComponent { }; +class LXC_ConcreteComponent : CIM_ConcreteComponent { }; diff -r 90ac6766de08 -r 794e7f3b23d0 schema/ConcreteComponent.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/ConcreteComponent.registration Fri Aug 22 10:50:42 2008 -0700 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2008 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association +KVM_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association +KVM_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association diff -r 90ac6766de08 -r 794e7f3b23d0 src/Makefile.am --- a/src/Makefile.am Wed Aug 20 15:33:36 2008 -0700 +++ b/src/Makefile.am Fri Aug 22 10:50:42 2008 -0700 @@ -64,7 +64,8 @@ libVirt_ResourceAllocationFromPool.la \ libVirt_ElementAllocatedFromPool.la \ libVirt_HostedService.la \ - libVirt_ElementSettingData.la + libVirt_ElementSettingData.la \ + libVirt_ConcreteComponent.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_ComputerSystem_la_DEPENDENCIES = libVirt_VirtualSystemSnapshotService.la @@ -186,3 +187,7 @@ libVirt_VirtualSystemSnapshotServiceCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemSnapshotServiceCapabilities_la_SOURCES = Virt_VirtualSystemSnapshotServiceCapabilities.c libVirt_VirtualSystemSnapshotServiceCapabilities_la_LIBADD = + +libVirt_ConcreteComponent_la_DEPENDENCIES = libVirt_HostSystem.la libVirt_DevicePool.la +libVirt_ConcreteComponent_la_SOURCES = Virt_ConcreteComponent.c +libVirt_ConcreteComponent_la_LIBADD = -lVirt_HostSystem -lVirt_DevicePool diff -r 90ac6766de08 -r 794e7f3b23d0 src/Virt_ConcreteComponent.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_ConcreteComponent.c Fri Aug 22 10:50:42 2008 -0700 @@ -0,0 +1,246 @@ +/* + * Copyright IBM Corp. 2007 + * + * Authors: + * Dan Smith + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#include +#include +#include +#include + +#include + +#include "cmpidt.h" +#include "cmpift.h" +#include "cmpimacs.h" + +#include +#include +#include "misc_util.h" + +#include "Virt_HostSystem.h" +#include "Virt_DevicePool.h" + +const static CMPIBroker *_BROKER; + +static char *bridge_from_netpool(virConnectPtr conn, + const char *poolid) +{ + char *netname = NULL; + char *bridge = NULL; + virNetworkPtr net = NULL; + + netname = name_from_pool_id(poolid); + if (netname == NULL) { + CU_DEBUG("Unable to parse network pool id: %s", poolid); + goto out; + } + + net = virNetworkLookupByName(conn, netname); + if (net == NULL) { + CU_DEBUG("Unable to find network %s", netname); + goto out; + } + + bridge = virNetworkGetBridgeName(net); + out: + free(netname); + virNetworkFree(net); + + return bridge; +} + +static CMPIInstance *get_bridge_instance(const CMPIContext *context, + const CMPIObjectPath *ref, + const char *bridge, + CMPIStatus *s) +{ + CMPIObjectPath *path; + CMPIInstance *inst = NULL; + const char *cn = "Linux_EthernetPort"; + const char *sys = NULL; + const char *syscc = NULL; + + *s = get_host_system_properties(&sys, &syscc, ref, _BROKER, context); + if (s->rc != CMPI_RC_OK) + goto out; + + path = CMNewObjectPath(_BROKER, "root/cimv2", cn, s); + if ((path == NULL) || (s->rc != CMPI_RC_OK)) + goto out; + + CMAddKey(path, "CreationClassName", cn, CMPI_chars); + CMAddKey(path, "SystemName", sys, CMPI_chars); + CMAddKey(path, "SystemCreationClassName", syscc, CMPI_chars); + CMAddKey(path, "DeviceID", bridge, CMPI_chars); + + inst = CBGetInstance(_BROKER, context, path, NULL, s); + out: + return inst; +} + +static CMPIStatus netpool_to_port(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) +{ + virConnectPtr conn = NULL; + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *poolid; + char *bridge = NULL; + CMPIInstance *inst; + + if (!match_hypervisor_prefix(ref, info)) + return s; + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + return s; + + if (cu_get_str_path(ref, "InstanceID", &poolid) != CMPI_RC_OK) { + CU_DEBUG("Failed to get InstanceID from NetworkPool"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing InstanceID in NetworkPool"); + goto out; + } + + bridge = bridge_from_netpool(conn, poolid); + if (bridge == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "NetworkPool not found"); + goto out; + } + + inst = get_bridge_instance(info->context, ref, bridge, &s); + if (inst != NULL) + inst_list_add(list, inst); + + out: + free(bridge); + virConnectClose(conn); + + return s; +} + +static CMPIStatus port_to_netpool(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s; + const char *device; + virConnectPtr conn = NULL; + CMPIInstance *inst = NULL; + char *id = NULL; + + if (cu_get_str_path(ref, "DeviceID", &device) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing DeviceID from EthernetPort"); + return s; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + return s; + + if (asprintf(&id, "NetworkPool/%s", device) == -1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to format NetworkPool ID"); + goto out; + } + + s = get_pool_by_name(_BROKER, ref, id, &inst); + if ((inst != NULL) && (s.rc == CMPI_RC_OK)) + inst_list_add(list, inst); + out: + free(id); + virConnectClose(conn); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *netpool[] = { + "Xen_NetworkPool", + "KVM_NetworkPool", + "LXC_NetworkPool", + NULL +}; + +static char *ethernetport[] = { + "Linux_EthernetPort", + NULL, +}; + +static char *assoc_classname[] = { + "Xen_ConcreteComponent", + "KVM_ConcreteComponent", + "LXC_ConcreteComponent", + NULL +}; + +static struct std_assoc _netpool_to_port = { + .source_class = (char **)&netpool, + .source_prop = "GroupComponent", + + .target_class = (char **)ðernetport, + .target_prop = "PartComponent", + + .assoc_class = (char **)&assoc_classname, + + .handler = netpool_to_port, + .make_ref = make_ref +}; + +static struct std_assoc _port_to_netpool = { + .source_class = (char **)ðernetport, + .source_prop = "PartComponent", + + .target_class = (char **)&netpool, + .target_prop = "GroupComponent", + + .assoc_class = (char **)&assoc_classname, + + .handler = port_to_netpool, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_netpool_to_port, + &_port_to_netpool, + NULL +}; + +STDA_AssocMIStub(, + Virt_ConcreteComponent, + _BROKER, + libvirt_cim_init(), + handlers); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ From danms at us.ibm.com Fri Aug 22 17:53:05 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 22 Aug 2008 10:53:05 -0700 Subject: [Libvirt-cim] [PATCH] Add ConcreteComponent support for Processor Message-ID: # HG changeset patch # User Dan Smith # Date 1219427448 25200 # Node ID a8130304d2f225657fd8c58c0eedb5d0eea37b7f # Parent 794e7f3b23d0eef1231cab33fc8df85f91d284b1 Add ConcreteComponent support for Processor Signed-off-by: Dan Smith diff -r 794e7f3b23d0 -r a8130304d2f2 src/Virt_ConcreteComponent.c --- a/src/Virt_ConcreteComponent.c Fri Aug 22 10:50:42 2008 -0700 +++ b/src/Virt_ConcreteComponent.c Fri Aug 22 10:50:48 2008 -0700 @@ -138,6 +138,75 @@ return s; } +static CMPIStatus list_sblim_procs(const CMPIContext *context, + const CMPIObjectPath *ref, + struct inst_list *list) +{ + CMPIEnumeration *procs; + CMPIObjectPath *path; + CMPIStatus s; + + path = CMNewObjectPath(_BROKER, "root/cimv2", "Linux_Processor", &s); + if ((path == NULL) || (s.rc != CMPI_RC_OK)) + return s; + + procs = CBEnumInstances(_BROKER, context, path, NULL, &s); + if ((procs == NULL) || (s.rc != CMPI_RC_OK)) + return s; + + while (CMHasNext(procs, NULL)) { + CMPIData data = CMGetNext(procs, &s); + + if (data.type != CMPI_instance) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "SBLIM gave us back a non-instance"); + return s; + } + + inst_list_add(list, data.value.inst); + } + + return (CMPIStatus){CMPI_RC_OK, NULL}; +} + +static CMPIStatus procpool_to_proc(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) +{ + virConnectPtr conn = NULL; + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *poolid; + + if (!match_hypervisor_prefix(ref, info)) + return s; + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + return s; + + if (cu_get_str_path(ref, "InstanceID", &poolid) != CMPI_RC_OK) { + CU_DEBUG("Failed to get InstanceID from NetworkPool"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing InstanceID in NetworkPool"); + goto out; + } + + if (!STREQ(poolid, "ProcessorPool/0")) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Processor pool instance not found"); + goto out; + } + + s = list_sblim_procs(info->context, ref, list); + out: + virConnectClose(conn); + + return s; +} + static CMPIStatus port_to_netpool(const CMPIObjectPath *ref, struct std_assoc_info *info, struct inst_list *list) @@ -223,9 +292,35 @@ .make_ref = make_ref }; +static char *procpool[] = { + "Xen_ProcessorPool", + "KVM_ProcessorPool", + "LXC_ProcessorPool", + NULL +}; + +static char *proc[] = { + "Linux_Processor", + NULL +}; + +static struct std_assoc _procpool_to_proc = { + .source_class = (char **)&procpool, + .source_prop = "GroupComponent", + + .target_class = (char **)&proc, + .target_prop = "PartComponent", + + .assoc_class = (char **)&assoc_classname, + + .handler = procpool_to_proc, + .make_ref = make_ref +}; + static struct std_assoc *handlers[] = { &_netpool_to_port, &_port_to_netpool, + &_procpool_to_proc, NULL }; From kaitlin at linux.vnet.ibm.com Fri Aug 22 19:35:44 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 22 Aug 2008 12:35:44 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Fixed enumclass.py and vsmigration.py to work with different Virt MigrationJob In-Reply-To: <9685653189eb23d669cd.1219396017@elm3b217.beaverton.ibm.com> References: <9685653189eb23d669cd.1219396017@elm3b217.beaverton.ibm.com> Message-ID: <48AF1510.6020000@linux.vnet.ibm.com> > diff -r a2d995514226 -r 9685653189eb suites/libvirt-cim/lib/XenKvmLib/enumclass.py > --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Aug 20 14:30:36 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Aug 22 02:00:25 2008 -0700 > @@ -90,9 +90,13 @@ class CIM_DiskResourceAllocationSettingD > class CIM_DiskResourceAllocationSettingData(CIM_MyClass): > pass > > +class Xen_MigrationJob(CIM_MyClass): > + pass > > +class KVM_MigrationJob(CIM_MyClass): > + pass We don't currently support KVM migration. It's probably fine to leave this here, but just wanted to make the note so that no one mistakenly thinks that we do support it. > > -class Virt_MigrationJob(CIM_MyClass): > +class XenFV_MigrationJob(CIM_MyClass): The providers don't use a XenFV_ prefix. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Aug 25 06:34:26 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 25 Aug 2008 12:04:26 +0530 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Fixed enumclass.py and vsmigration.py to work with different Virt MigrationJob In-Reply-To: <48AF1510.6020000@linux.vnet.ibm.com> References: <9685653189eb23d669cd.1219396017@elm3b217.beaverton.ibm.com> <48AF1510.6020000@linux.vnet.ibm.com> Message-ID: <48B25272.4020402@linux.vnet.ibm.com> Kaitlin Rupert wrote: > > diff -r a2d995514226 -r 9685653189eb > suites/libvirt-cim/lib/XenKvmLib/enumclass.py >> --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Aug 20 >> 14:30:36 2008 -0700 >> +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Aug 22 >> 02:00:25 2008 -0700 >> @@ -90,9 +90,13 @@ class CIM_DiskResourceAllocationSettingD >> class CIM_DiskResourceAllocationSettingData(CIM_MyClass): >> pass >> >> +class Xen_MigrationJob(CIM_MyClass): >> + pass >> >> +class KVM_MigrationJob(CIM_MyClass): >> + pass > > We don't currently support KVM migration. It's probably fine to leave > this here, but just wanted to make the note so that no one mistakenly > thinks that we do support it. Ya thats true. Better I will remove this as of now. > >> >> -class Virt_MigrationJob(CIM_MyClass): >> +class XenFV_MigrationJob(CIM_MyClass): > > The providers don't use a XenFV_ prefix. Sorry, I did this by mistake. Thanks for the review. Regards, Deepti. From deeptik at linux.vnet.ibm.com Mon Aug 25 06:54:34 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 24 Aug 2008 23:54:34 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Fixed 01_migratable_host.py and 02_host_migrate_type.py of VSMigrationService. Message-ID: From deeptik at linux.vnet.ibm.com Mon Aug 25 06:54:35 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 24 Aug 2008 23:54:35 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] #2 Fixed enumclass.py and vsmigration.py to work with Xen and XenFV MigrationJob In-Reply-To: Message-ID: <931e44bc3fc5ae2aaa53.1219647275@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1219646646 25200 # Node ID 931e44bc3fc5ae2aaa536c288898e25ec7a8c218 # Parent 6fe50a81ce144056f1223f6af5f10804e915af37 [TEST] #2 Fixed enumclass.py and vsmigration.py to work with Xen and XenFV MigrationJob. Changes: -------- Patch 2: ------- 1) Removed the XenFV_MigrationJob entry in the enumclass.py which was added accidentally. 2) Removed the KVM_MigrationJob entry since it is not yet supported by the provider and can be added later once support is in the provider. Patch 1: ------- Removed hardcoded Virt prefix from VSMigrationJob and used the virt param to support Xen and XenFV. Signed-off-by: Deepti B. Kalakeri diff -r 6fe50a81ce14 -r 931e44bc3fc5 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Aug 20 14:28:01 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Sun Aug 24 23:44:06 2008 -0700 @@ -90,9 +90,7 @@ class CIM_DiskResourceAllocationSettingD class CIM_DiskResourceAllocationSettingData(CIM_MyClass): pass - - -class Virt_MigrationJob(CIM_MyClass): +class Xen_MigrationJob(CIM_MyClass): pass class Xen_RegisteredProfile(CIM_RegisteredProfile): diff -r 6fe50a81ce14 -r 931e44bc3fc5 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Aug 20 14:28:01 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Aug 24 23:44:06 2008 -0700 @@ -26,6 +26,7 @@ from XenKvmLib.test_doms import destroy_ from XenKvmLib.test_doms import destroy_and_undefine_domain from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib import enumclass +from XenKvmLib.classes import get_typed_class from VirtLib.live import domain_list class CIM_VirtualSystemMigrationService(CIMMethodClass): @@ -100,22 +101,19 @@ def migrate_guest_to_host(service, ref, if len(ret) == 0: logger.error("MigrateVirtualSystemToHost returns an empty list") return FAIL, ret - return PASS, ret -def get_migration_job_instance(ip, id): +def get_migration_job_instance(ip, virt, id): job = [] key_list = ["instanceid"] - + mig_job_cn = get_typed_class(virt, 'MigrationJob') try: - #virt='Virt' is odd here. However, for MigrationJob, the - #provider is virtualization neutral. job = enumclass.enumerate(ip, - enumclass.Virt_MigrationJob, + mig_job_cn, key_list, - virt='Virt') + virt=virt) except Exception, details: - logger.error(CIM_ERROR_ENUMERATE, 'Virt_MigrationJob') + logger.error(CIM_ERROR_ENUMERATE, mig_job_cn) logger.error(details) return FAIL, None @@ -126,7 +124,7 @@ def get_migration_job_instance(ip, id): if job[i].InstanceID == id: break elif i == len(job)-1 and job[i].InstanceID != id: - logger.error("Virt_MigrationJob err: can't find expected job inst") + logger.error("%s err: can't find expected job inst", mig_job_cn) return FAIL, None return PASS, job[i] @@ -144,8 +142,8 @@ def verify_domain_list(list, local_migra return PASS -def check_migration_job(ip, id, target_ip, test_dom, local_migrate): - status, job_inst = get_migration_job_instance(ip, id) +def check_migration_job(ip, id, target_ip, test_dom, local_migrate, virt='Xen'): + status, job_inst = get_migration_job_instance(ip, virt, id) if status != PASS: return FAIL @@ -159,7 +157,7 @@ def check_migration_job(ip, id, target_i break elif job_inst.JobState == 4 and i < 49: time.sleep(3) - status, job_inst = get_migration_job_instance(ip, id) + status, job_inst = get_migration_job_instance(ip, virt, id) if status != PASS: return FAIL else: From deeptik at linux.vnet.ibm.com Mon Aug 25 06:54:36 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 24 Aug 2008 23:54:36 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Fixed 01_migratable_host.py and 02_host_migrate_type.py of VSMigrationService In-Reply-To: Message-ID: <215d03bc99fcf8d6bc18.1219647276@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1219646701 25200 # Node ID 215d03bc99fcf8d6bc1887e9c74802d43cd33007 # Parent 931e44bc3fc5ae2aaa536c288898e25ec7a8c218 [TEST] Fixed 01_migratable_host.py and 02_host_migrate_type.py of VSMigrationService. Patch 2: No changes from patch 1 Patch 1: Supplied the virt param to check_migration_job() function. Signed-off-by: Deepti B. Kalakeri diff -r 931e44bc3fc5 -r 215d03bc99fc suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Sun Aug 24 23:44:06 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Sun Aug 24 23:45:01 2008 -0700 @@ -68,6 +68,7 @@ def start_guest_get_ref(ip, guest_name, @do_main(sup_types) def main(): options = main.options + virt = options.virt status = PASS rc = -1 @@ -85,14 +86,13 @@ def main(): else: local_migrate = 0 - status, cs_ref, cxml = start_guest_get_ref(options.ip, dom_name, options.virt) + status, cs_ref, cxml = start_guest_get_ref(options.ip, dom_name, virt) if status != PASS: cxml.destroy(options.ip) cxml.undefine(options.ip) return FAIL guest_name = cs_ref['Name'] - status = check_possible_host_migration(service, cs_ref, target_ip) if status != PASS: cxml.destroy(options.ip) @@ -108,9 +108,8 @@ def main(): return status elif len(ret) == 2: id = ret[1]['Job'].keybindings['InstanceID'] - status = check_migration_job(options.ip, id, target_ip, - guest_name, local_migrate) + guest_name, local_migrate, virt) cxml.destroy(options.ip) cxml.undefine(options.ip) diff -r 931e44bc3fc5 -r 215d03bc99fc suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Sun Aug 24 23:44:06 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Sun Aug 24 23:45:01 2008 -0700 @@ -29,7 +29,8 @@ from XenKvmLib.common_util import poll_f from XenKvmLib.common_util import poll_for_state_change from XenKvmLib import computersystem from XenKvmLib import vsmigrations -from XenKvmLib.vsmigrations import check_possible_host_migration, migrate_guest_to_host, check_migration_job +from XenKvmLib.vsmigrations import check_possible_host_migration, \ +migrate_guest_to_host, check_migration_job from XenKvmLib import enumclass from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL @@ -116,6 +117,7 @@ def main(): options = main.options status = PASS rc = -1 + virt = options.virt try: service = vsmigrations.Xen_VirtualSystemMigrationService(options.ip) @@ -136,7 +138,7 @@ def main(): ref_list = [] cs_ref = None - status, ref_list = setup_env(options.ip, mlist, local_migrate, options.virt) + status, ref_list = setup_env(options.ip, mlist, local_migrate, virt) if status != PASS or len(ref_list) < 1: return FAIL @@ -145,7 +147,7 @@ def main(): for type, item in mlist.iteritems(): guest_name = cs_ref['Name'] - status, cxml = start_guest(options.ip, guest_name, type, options.virt) + status, cxml = start_guest(options.ip, guest_name, type, virt) if status != PASS: break @@ -166,7 +168,7 @@ def main(): id = ret[1]['Job'].keybindings['InstanceID'] status = check_migration_job(options.ip, id, target_ip, - guest_name, local_migrate) + guest_name, local_migrate, virt) if status != PASS: break From kaitlin at linux.vnet.ibm.com Mon Aug 25 14:22:33 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 07:22:33 -0700 Subject: [Libvirt-cim] [PATCH 0 of 6] [TEST] Setup network pool for tests to use before tests begin running Message-ID: From kaitlin at linux.vnet.ibm.com Mon Aug 25 14:22:35 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 07:22:35 -0700 Subject: [Libvirt-cim] [PATCH 2 of 6] [TEST] Create a network pool before tests are run In-Reply-To: Message-ID: <254abd366384a00a88b3.1219674155@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219444184 25200 # Node ID 254abd366384a00a88b3042201c65bbb99d85a1f # Parent b445b3731ab95f0a00b0e9076f3be6adbb426562 [TEST] Create a network pool before tests are run. This ensures a network pool is available for the tests to use. Signed-off-by: Kaitlin Rupert diff -r b445b3731ab9 -r 254abd366384 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Fri Aug 22 15:29:43 2008 -0700 +++ b/suites/libvirt-cim/main.py Fri Aug 22 15:29:44 2008 -0700 @@ -34,6 +34,9 @@ sys.path.append('./lib') from XenKvmLib.reporting import gen_report, send_report from VirtLib import utils +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib import const +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", @@ -122,6 +125,22 @@ return addr, relay +def setup_env(ip, virt): + status, netpool = create_netpool_conf(ip, virt, + net_name=const.default_network_name) + if status != PASS: + print "\nUnable to create network pool %s" % const.default_network_name + return status + + return PASS + +def cleanup_env(ip, virt): + status = destroy_netpool(ip, virt, const.default_network_name) + if status != PASS: + print "Unable to destroy network pool %s." % const.default_network_name + return status + + return PASS def main(): (options, args) = parser.parse_args() @@ -173,6 +192,11 @@ else: dbg = "" + status = setup_env(options.ip, options.virt) + if status != PASS: + print "Please check your environment.\n" + return 1 + print "\nTesting " + options.virt + " hypervisor" for test in test_list: @@ -192,6 +216,10 @@ testsuite.debug("%s\n" % div) testsuite.finish() + status = cleanup_env(options.ip, options.virt) + if status != PASS: + print "Unable to clean up. Please check your environment.\n" + msg_body, heading = gen_report(options.virt, options.ip, testsuite.log_file) if options.report: From kaitlin at linux.vnet.ibm.com Mon Aug 25 14:22:34 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 07:22:34 -0700 Subject: [Libvirt-cim] [PATCH 1 of 6] [TEST] Add network pool name arg to create_netpool_conf() In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1219444183 25200 # Node ID b445b3731ab95f0a00b0e9076f3be6adbb426562 # Parent 6fe50a81ce144056f1223f6af5f10804e915af37 [TEST] Add network pool name arg to create_netpool_conf() Also, add a check to see if the network pool name supplied is one of the pools currently defined (if any are defined). Change default_network_pool to be a name that isn't likely to be in use (or at least, commonly used). Signed-off-by: Kaitlin Rupert diff -r 6fe50a81ce14 -r b445b3731ab9 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Aug 20 14:28:01 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Aug 22 15:29:43 2008 -0700 @@ -39,6 +39,8 @@ from VirtLib.live import diskpool_list, virsh_version, net_list, domain_list from XenKvmLib.vxml import PoolXML, NetXML from XenKvmLib.enumclass import getInstance +from VirtLib import utils +from XenKvmLib import const test_dpath = "foo" disk_file = '/etc/libvirt/diskpool.conf' @@ -373,7 +375,8 @@ return status, diskid -def create_netpool_conf(server, virt, use_existing=False): +def create_netpool_conf(server, virt, use_existing=False, + net_name=const.default_network_name): status = PASS test_network = None try: @@ -383,7 +386,14 @@ test_network = vir_network[0] if test_network == None: - net_name = "default-net" + str(random.randint(1, 100)) + cmd = "virsh -c %s net-list --all | grep %s" % \ + (utils.virt2uri(virt), net_name) + ret, out = utils.run_remote(server, cmd) + if out != "": + logger.error("Network pool with name '%s' already exists", + net_name) + return FAIL, "Unknown" + netxml = NetXML(server, virt=virt, networkname=net_name) ret = netxml.create_vnet() if not ret: diff -r 6fe50a81ce14 -r b445b3731ab9 suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Aug 20 14:28:01 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Aug 22 15:29:43 2008 -0700 @@ -27,7 +27,7 @@ # vxml.NetXML default_bridge_name = 'testbridge' -default_network_name = 'default-net' +default_network_name = 'cimtest-networkpool' default_net_type = 'network' #vxml.PoolXML From kaitlin at linux.vnet.ibm.com Mon Aug 25 14:22:38 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 07:22:38 -0700 Subject: [Libvirt-cim] [PATCH 5 of 6] [TEST] Make network related changes to CS tests In-Reply-To: Message-ID: <3c32f9334194cc6b8a8d.1219674158@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219433898 25200 # Node ID 3c32f9334194cc6b8a8d5300f994a71454369a81 # Parent 055021cae0200442791afada78d07ff3309a791c [TEST] Make network related changes to CS tests. Also tidy up import calls. Signed-off-by: Kaitlin Rupert diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Fri Aug 22 12:38:18 2008 -0700 @@ -50,7 +50,6 @@ from XenKvmLib.common_util import call_request_state_change, \ poll_for_state_change from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool sup_types = ['Xen', 'KVM', 'XenFV'] test_dom = "DomST1" @@ -67,9 +66,6 @@ virt = options.virt destroy_and_undefine_all(server) - status, test_network = create_netpool_conf(server, virt) - if status != PASS: - return FAIL cxml = vxml.get_class(virt)(test_dom, mem) @@ -88,7 +84,6 @@ if status != PASS: cxml.destroy(server) - destroy_netpool(server, virt, test_network) return status from_State = dom_cs.EnabledState @@ -100,7 +95,6 @@ logger.error("Unable to suspend dom '%s' using RequestedStateChange()", test_dom) cxml.destroy(server) - destroy_netpool(server, virt, test_network) return status #Polling for the value of EnabledState to be set to 9. @@ -111,7 +105,6 @@ if status != PASS: cxml.destroy(server) - destroy_netpool(server, virt, test_network) return status enabledState = dom_cs.EnabledState @@ -133,7 +126,6 @@ status = FAIL cxml.destroy(server) - destroy_netpool(server, virt, test_network) return status if __name__ == "__main__": diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Fri Aug 22 12:38:18 2008 -0700 @@ -36,8 +36,7 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import create_using_definesystem, \ - call_request_state_change, get_cs_instance, \ - create_netpool_conf, destroy_netpool + call_request_state_change, get_cs_instance sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "domgst" @@ -62,17 +61,12 @@ def main(): options = main.options - status, test_network = create_netpool_conf(options.ip, options.virt, False) - if status != PASS: - return FAIL - try: # define the vs status = create_using_definesystem(test_dom, options.ip, virt=options.virt) if status != PASS: logger.error("Unable to define %s using DefineSystem()" % test_dom) - destroy_netpool(options.ip, options.virt, test_network) return status # suspend the vs @@ -95,7 +89,6 @@ logger.error("Error: %s" % detail) status = FAIL - destroy_netpool(options.ip, options.virt, test_network) destroy_and_undefine_domain(test_dom, options.ip, options.virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Fri Aug 22 12:38:18 2008 -0700 @@ -44,11 +44,10 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import call_request_state_change -from XenKvmLib.common_util import try_request_state_change -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import create_using_definesystem, \ + call_request_state_change, \ + try_request_state_change, \ + poll_for_state_change sup_types = ['Xen', 'XenFV', 'KVM'] @@ -65,10 +64,6 @@ options = main.options server = options.ip virt = options.virt - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ ('Suspend', [SUSPND_STATE, SUSPND_STATE])] @@ -106,7 +101,6 @@ status = FAIL if status != PASS: - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status @@ -116,7 +110,6 @@ rq_state, TIME, err_no, err_desc, virt) - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Fri Aug 22 12:38:18 2008 -0700 @@ -42,9 +42,8 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import try_request_state_change -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import try_request_state_change, \ + create_using_definesystem sup_types = ['Xen', 'XenFV', 'LXC', 'KVM'] @@ -61,10 +60,6 @@ server = options.ip virt = options.virt status = FAIL - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL try: # define the vs @@ -76,7 +71,6 @@ except Exception, details: logger.error("Exception: %s", details) - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return FAIL @@ -87,7 +81,6 @@ if status != PASS: logger.error("Expected Defined -> Suspended state transition to fail") - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Fri Aug 22 12:38:18 2008 -0700 @@ -43,10 +43,9 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import call_request_state_change -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import create_using_definesystem, \ + call_request_state_change, \ + poll_for_state_change sup_types = ['Xen', 'XenFV', 'KVM'] @@ -62,10 +61,6 @@ status = FAIL server = options.ip virt = options.virt - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ ('Reboot', [ACTIVE_STATE, REBOOT_STATE])] @@ -105,7 +100,6 @@ logger.error("Exception: %s", detail) status = FAIL - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Fri Aug 22 12:38:18 2008 -0700 @@ -46,11 +46,10 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import call_request_state_change -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.common_util import try_request_state_change -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import create_using_definesystem, \ + call_request_state_change, \ + poll_for_state_change, \ + try_request_state_change sup_types = ['Xen', 'XenFV', 'KVM'] @@ -68,10 +67,6 @@ status = FAIL server = options.ip virt = options.virt - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), ('Suspend', [SUSPND_STATE, SUSPND_STATE]), @@ -111,7 +106,6 @@ logger.error("Exception: %s", detail) status = FAIL - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Fri Aug 22 12:38:18 2008 -0700 @@ -44,11 +44,9 @@ from CimTest.Globals import do_main, logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import get_cs_instance -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib.common_util import call_request_state_change -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import get_cs_instance, create_using_definesystem, \ + call_request_state_change, \ + poll_for_state_change sup_types = ['Xen', 'XenFV', 'KVM'] @@ -64,10 +62,6 @@ status = FAIL server = options.ip virt = options.virt - - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), ('Reset', [ACTIVE_STATE, RESET_STATE])] @@ -107,7 +101,6 @@ logger.error("Exception: %s", detail) status = FAIL - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status diff -r 055021cae020 -r 3c32f9334194 suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Fri Aug 22 12:38:18 2008 -0700 @@ -55,10 +55,6 @@ virt = options.virt status = FAIL - status, test_network = create_netpool_conf(server, virt, False) - if status != PASS: - return FAIL - try: rc = create_using_definesystem(default_dom, server, virt=virt) @@ -87,7 +83,6 @@ except Exception, detail: logger.error("Exception: %s", detail) - destroy_netpool(server, virt, test_network) destroy_and_undefine_domain(default_dom, server, virt) return status From kaitlin at linux.vnet.ibm.com Mon Aug 25 14:22:37 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 07:22:37 -0700 Subject: [Libvirt-cim] [PATCH 4 of 6] [TEST] Make network related changes to VSMS tests In-Reply-To: Message-ID: <055021cae0200442791a.1219674157@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219433898 25200 # Node ID 055021cae0200442791afada78d07ff3309a791c # Parent 1c707cb7dff491a986f74157d1ab698032e32975 [TEST] Make network related changes to VSMS tests Signed-off-by: Kaitlin Rupert diff -r 1c707cb7dff4 -r 055021cae020 suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/06_addresource.py Fri Aug 22 12:38:18 2008 -0700 @@ -22,6 +22,7 @@ # import sys +import random import pywbem from pywbem.cim_obj import CIMInstanceName from VirtLib import utils @@ -32,15 +33,15 @@ from CimTest.Globals import do_main from CimTest.ReturnCodes import FAIL, PASS from XenKvmLib import vsms_util -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.const import default_network_name sup_types = ['Xen', 'KVM', 'XenFV'] default_dom = 'rstest_domain' nmac = '99:aa:bb:cc:ee:ff' ntype = 'network' +npool_name = default_network_name + str(random.randint(1, 100)) -def cleanup_env(ip, virt, cxml, net_name): - destroy_netpool(ip, virt, net_name) +def cleanup_env(ip, virt, cxml): cxml.destroy(ip) cxml.undefine(ip) @@ -67,19 +68,13 @@ 'src_path' : cxml.secondary_disk_path } - status, net_name = create_netpool_conf(options.ip, options.virt, - use_existing=False) - if status != PASS: - logger.error('Unable to create network pool') - return FAIL - nasd = vsms.get_nasd_class(options.virt)(type=ntype, mac=nmac, name=default_dom, - virt_net=net_name) + virt_net=npool_name) net_attr = { 'ntype' : ntype, - 'net_name' : net_name, + 'net_name' : npool_name, 'nmac' : nmac } @@ -97,13 +92,13 @@ ret = cxml.define(options.ip) if not ret: logger.error("Failed to define the dom: %s", default_dom) - cleanup_env(options.ip, options.virt, cxml, net_name) + cleanup_env(options.ip, options.virt, cxml) return FAIL if case == "start": ret = cxml.start(options.ip) if not ret: logger.error("Failed to start the dom: %s", default_dom) - cleanup_env(options.ip, options.virt, cxml, net_name) + cleanup_env(options.ip, options.virt, cxml) return FAIL status = vsms_util.add_disk_res(options.ip, service, cxml, vssd_ref, @@ -116,7 +111,7 @@ if status != PASS: break - cleanup_env(options.ip, options.virt, cxml, net_name) + cleanup_env(options.ip, options.virt, cxml) return status diff -r 1c707cb7dff4 -r 055021cae020 suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Fri Aug 22 12:38:18 2008 -0700 @@ -32,8 +32,8 @@ from CimTest.Globals import logger from CimTest.Globals import do_main from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool from XenKvmLib import vsms_util +from XenKvmLib.const import default_network_name sup_types = ['Xen', 'KVM', 'XenFV'] default_dom = 'rstest_domain' @@ -42,8 +42,7 @@ ncpu = 1 nmem = 256 -def cleanup_env(ip, virt, cxml, net_name): - destroy_netpool(ip, virt, net_name) +def cleanup_env(ip, virt, cxml): cxml.destroy(ip) cxml.undefine(ip) @@ -58,16 +57,10 @@ source=ndpath, name=default_dom) - status, net_name = create_netpool_conf(options.ip, options.virt, - use_existing=False) - if status != PASS: - logger.error('Unable to find a network pool') - return FAIL - nasd = vsms.get_nasd_class(options.virt)(type=ntype, mac=cxml.xml_get_net_mac(), name=default_dom, - virt_net=net_name) + virt_net=default_network_name) masd = vsms.get_masd_class(options.virt)(megabytes=nmem, name=default_dom) pasd = vsms.get_pasd_class(options.virt)(vcpu=ncpu, name=default_dom) @@ -85,13 +78,13 @@ ret = cxml.define(options.ip) if not ret: logger.error("Failed to define the dom: %s", default_dom) - cleanup_env(options.ip, options.virt, cxml, net_name) + cleanup_env(options.ip, options.virt, cxml) return FAIL if case == "start": ret = cxml.start(options.ip) if not ret: logger.error("Failed to start the dom: %s", default_dom) - cleanup_env(options.ip, options.virt, cxml, net_name) + cleanup_env(options.ip, options.virt, cxml) return FAIL status = vsms_util.mod_vcpu_res(options.ip, service, cxml, pasd, ncpu, @@ -112,11 +105,11 @@ break status = vsms_util.mod_net_res(options.ip, service, options.virt, cxml, - nasd, ntype, net_name) + nasd, ntype, default_network_name) if status != PASS: break - cleanup_env(options.ip, options.virt, cxml, net_name) + cleanup_env(options.ip, options.virt, cxml) return status diff -r 1c707cb7dff4 -r 055021cae020 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Fri Aug 22 12:38:18 2008 -0700 @@ -30,7 +30,6 @@ from CimTest.Globals import do_main from CimTest.ReturnCodes import FAIL, PASS from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import create_netpool_conf, destroy_netpool sup_types = ['Xen', 'XenFV', 'KVM'] default_dom = 'rstest_domain' @@ -95,11 +94,6 @@ def main(): options = main.options - status, test_network = create_netpool_conf(options.ip, options.virt, False) - if status != PASS: - return FAIL - - status, vssd, rasd = setup_rasd_mof(options.ip, options.virt) if status != PASS: return status @@ -134,7 +128,6 @@ logger.error(details) status = FAIL - destroy_netpool(options.ip, options.virt, test_network) destroy_and_undefine_domain(default_dom, options.ip, options.virt) return status diff -r 1c707cb7dff4 -r 055021cae020 suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Fri Aug 22 12:38:18 2008 -0700 @@ -24,8 +24,7 @@ import pywbem from XenKvmLib.common_util import create_using_definesystem, \ call_request_state_change, \ - poll_for_state_change, get_cs_instance, \ - create_netpool_conf, destroy_netpool + poll_for_state_change, get_cs_instance from XenKvmLib import vsms from VirtLib import utils from CimTest.Globals import logger, do_main @@ -119,11 +118,6 @@ options = main.options try: - status, net_name = create_netpool_conf(options.ip, options.virt, False) - if status != PASS: - logger.error('Unable to find a network pool') - return FAIL - status = setup_first_guest(options.ip, options.virt) if status != PASS: raise Exception("Unable to start %s" % test_dom) @@ -164,7 +158,6 @@ logger.error(details) status = FAIL - destroy_netpool(options.ip, options.virt, net_name) destroy_and_undefine_domain(test_dom, options.ip, options.virt) destroy_and_undefine_domain(test_dom2, options.ip, options.virt) From kaitlin at linux.vnet.ibm.com Mon Aug 25 14:22:39 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 07:22:39 -0700 Subject: [Libvirt-cim] [PATCH 6 of 6] [TEST] Misc test updates - fix related network calls In-Reply-To: Message-ID: <622266af7ac6bea051d5.1219674159@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219433898 25200 # Node ID 622266af7ac6bea051d5694b3bb71846d2a55e75 # Parent 3c32f9334194cc6b8a8d5300f994a71454369a81 [TEST] Misc test updates - fix related network calls Signed-off-by: Kaitlin Rupert diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Fri Aug 22 12:38:18 2008 -0700 @@ -31,8 +31,7 @@ from CimTest.Globals import do_main from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, platform_sup from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf, \ - create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -93,23 +92,15 @@ cleanup_restore(options.ip, options.virt) return FAIL - status, test_network = create_netpool_conf(options.ip, options.virt) - if status != PASS: - cleanup_restore(options.ip, options.virt) - destroy_netpool(options.ip, options.virt, test_network) - return FAIL - pools, ac = enum_pools_and_ac(options.ip, options.virt, cn) if len(pools) < 4: logger.error("Only %d pools returned, expected at least 4" % len(pools)) cleanup_restore(options.ip, options.virt) - destroy_netpool(options.ip, options.virt, test_network) return FAIL status = compare_pool_to_ac(ac, pools, cn) cleanup_restore(options.ip, options.virt) - destroy_netpool(options.ip, options.virt, test_network) return status diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py --- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Fri Aug 22 12:38:18 2008 -0700 @@ -29,8 +29,7 @@ from CimTest.Globals import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import create_using_definesystem, \ - call_request_state_change, \ - create_netpool_conf, destroy_netpool + call_request_state_change from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.classes import get_typed_class from XenKvmLib.indication_tester import CIMIndicationSubscription @@ -144,10 +143,6 @@ options = main.options status = FAIL - status, test_network = create_netpool_conf(options.ip, options.virt) - if status != PASS: - return FAIL - sub_list, ind_names, dict = sub_ind(options.ip, options.virt) ind_list = ["define", "start", "destroy"] @@ -185,7 +180,6 @@ sub.unsubscribe(dict['default_auth']) logger.info("Cancelling subscription for %s" % ind_names[ind]) - destroy_netpool(options.ip, options.virt, test_network) destroy_and_undefine_domain(test_dom, options.ip, options.virt) return status diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Fri Aug 22 12:38:18 2008 -0700 @@ -41,6 +41,7 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import cleanup_restore, test_dpath, \ create_diskpool_file +from XenKvmLib.const import default_network_name sup_types = ['Xen', 'KVM', 'XenFV'] bug_no = "88651" @@ -507,7 +508,7 @@ if status != PASS: return status - bridge = vsxml.set_vbridge(options.ip) + bridge = vsxml.set_vbridge(options.ip, default_network_name) ret = vsxml.define(options.ip) if not ret: logger.error("Failed to define the dom: %s", test_dom) diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Aug 22 12:38:18 2008 -0700 @@ -59,8 +59,7 @@ from CimTest.ReturnCodes import PASS, FAIL, SKIP from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.logicaldevices import verify_device_values -from XenKvmLib.common_util import cleanup_restore, \ -create_diskpool_conf, destroy_netpool +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -249,7 +248,6 @@ if status != PASS: vsxml.undefine(server) cleanup_restore(server, virt=virt) - destroy_netpool(server, virt, net_name) return status in_pllist = pool_init_list(virt, pool, net_name, dpool_name) @@ -259,13 +257,11 @@ if status != PASS: vsxml.undefine(server) cleanup_restore(server, virt=virt) - destroy_netpool(server, virt, net_name) return FAIL status = verify_eafp_values(server, in_pllist, virt, test_disk) vsxml.undefine(server) cleanup_restore(server, virt=virt) - destroy_netpool(server, virt, net_name) return status if __name__ == "__main__": sys.exit(main()) diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/RASD/02_enum.py --- a/suites/libvirt-cim/cimtest/RASD/02_enum.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/02_enum.py Fri Aug 22 12:38:18 2008 -0700 @@ -39,6 +39,7 @@ from XenKvmLib import rasd from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ verify_diskrasd_values, verify_memrasd_values, rasd_init_list +from XenKvmLib.const import default_network_name sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -128,7 +129,7 @@ else: vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, mac = test_mac, disk = test_disk) - vsxml.set_vbridge(server) + vsxml.set_vbridge(server, default_network_name) class_list = [ get_typed_class(virt, rasd.dasd_cn), get_typed_class(virt, rasd.masd_cn), get_typed_class(virt, rasd.pasd_cn), diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py --- a/suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/03_rasd_errs.py Fri Aug 22 12:38:18 2008 -0700 @@ -62,6 +62,7 @@ from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, CIM_ERROR_GETINSTANCE from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.const import default_network_name sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -141,7 +142,7 @@ vcpus = test_vcpus, \ mac = test_mac, \ disk = test_disk) - bridge = vsxml.set_vbridge(server) + bridge = vsxml.set_vbridge(server, default_network_name) try: ret = vsxml.define(options.ip) if not ret: diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri Aug 22 12:38:18 2008 -0700 @@ -32,8 +32,8 @@ from CimTest import Globals from CimTest.Globals import logger, do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL -from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf, \ -create_netpool_conf, destroy_netpool +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf +from XenKvmLib.const import default_network_name sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -41,6 +41,7 @@ test_vcpus = 1 test_mem = 128 test_mac = "00:11:22:33:44:aa" +test_npool = default_network_name def setup_env(server, virt): destroy_and_undefine_all(server) @@ -58,20 +59,19 @@ else: vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, mac = test_mac, disk = test_disk, - ntype='network') + ntype='network', net_name = test_npool) - test_network = vsxml.xml_get_net_network() try: ret = vsxml.define(server) if not ret: logger.error("Failed to Define the domain: %s", test_dom) - return FAIL, vsxml, test_disk, test_network + return FAIL, vsxml, test_disk except Exception, details: logger.error("Exception : %s", details) - return FAIL, vsxml, test_disk, test_network + return FAIL, vsxml, test_disk - return PASS, vsxml, test_disk, test_network + return PASS, vsxml, test_disk def get_instance(server, pool, list, virt='Xen'): try: @@ -114,16 +114,14 @@ status = PASS - status, vsxml, test_disk, test_network = setup_env(options.ip, options.virt) + status, vsxml, test_disk = setup_env(options.ip, options.virt) if status != PASS: - destroy_netpool(options.ip, options.virt, test_network) vsxml.undefine(options.ip) return status status, diskid = create_diskpool_conf(options.ip, options.virt) if status != PASS: cleanup_restore(options.ip, options.virt) - destroy_netpool(options.ip, options.virt, test_network) vsxml.undefine(options.ip) return status @@ -135,7 +133,7 @@ "ProcessorPool" : {'InstanceID' : "ProcessorPool/0"}, "DiskPool" : {'InstanceID' : diskid}, "NetworkPool" : {'InstanceID' : "NetworkPool/%s" \ - % test_network }} + % test_npool }} rasd = { "MemoryPool" : "%s/mem" % test_dom, "ProcessorPool" : "%s/proc" % test_dom, "DiskPool" : "%s/%s" %(test_dom, test_disk), @@ -152,7 +150,6 @@ break cleanup_restore(options.ip, options.virt) - destroy_netpool(options.ip, options.virt, test_network) vsxml.undefine(options.ip) return status diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri Aug 22 12:38:18 2008 -0700 @@ -33,15 +33,15 @@ from CimTest.Globals import logger, do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib import enumclass -from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf, \ -create_netpool_conf, destroy_netpool - +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf +from XenKvmLib.const import default_network_name sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "RAFP_dom" test_vcpus = 1 test_mem = 128 test_mac = "00:11:22:33:44:aa" +test_npool = default_network_name def setup_env(server, virt): destroy_and_undefine_all(server) @@ -57,21 +57,20 @@ else: vsxml = virtxml(test_dom, mem=test_mem, vcpus = test_vcpus, mac = test_mac, disk = test_disk, - ntype = 'network') - test_network = vsxml.xml_get_net_network() + ntype = 'network', net_name = test_npool) try: ret = vsxml.define(server) if not ret: logger.error("Failed to Define the domain: %s", test_dom) - return FAIL, vsxml, test_disk, test_network + return FAIL, vsxml, test_disk except Exception, details: logger.error("Exception : %s", details) - return FAIL, vsxml, test_disk, test_network + return FAIL, vsxml, test_disk - return PASS, vsxml, test_disk, test_network + return PASS, vsxml, test_disk -def init_list(test_disk, diskid, test_network, virt='Xen'): +def init_list(test_disk, diskid, virt='Xen'): proc = { 'rasd_id' : '%s/%s' % (test_dom, 'proc'), 'pool_id' : 'ProcessorPool/0' @@ -83,7 +82,7 @@ net = { 'rasd_id' : '%s/%s' % (test_dom, test_mac), - 'pool_id' : 'NetworkPool/%s' %test_network + 'pool_id' : 'NetworkPool/%s' % test_npool } disk = { 'rasd_id' : '%s/%s' % (test_dom, test_disk), @@ -165,19 +164,17 @@ server = options.ip virt = options.virt - status, vsxml, test_disk, test_network = setup_env(server, virt) + status, vsxml, test_disk = setup_env(server, virt) if status != PASS: - destroy_netpool(server, virt, test_network) vsxml.undefine(server) return status status, diskid = create_diskpool_conf(server, virt) if status != PASS: - destroy_netpool(server, virt, test_network) vsxml.undefine(server) return status - cn_id_list = init_list(test_disk, diskid, test_network, options.virt) + cn_id_list = init_list(test_disk, diskid, options.virt) for rasd_cn, id_info in cn_id_list.iteritems(): status = get_rasdinst_verify_pool_from_RAFP(server, virt, vsxml, @@ -186,7 +183,6 @@ return status cleanup_restore(server, virt) - destroy_netpool(server, virt, test_network) vsxml.undefine(server) return status diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Fri Aug 22 12:38:18 2008 -0700 @@ -63,13 +63,14 @@ CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf, \ -create_netpool_conf, destroy_netpool -from XenKvmLib.common_util import print_field_error + print_field_error +from XenKvmLib.const import default_network_name platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] memid = "%s/%s" % ("MemoryPool", 0) procid = "%s/%s" % ("ProcessorPool", 0) +test_npool = default_network_name def get_or_bail(virt, ip, id, pool_class): """ @@ -84,8 +85,7 @@ logger.error("Exception: %s", detail) cleanup_restore(ip, virt) sys.exit(FAIL) - return instance - + return instance def init_list(virt, pool): """ @@ -140,25 +140,20 @@ mpool = get_pool_info(virt, server, memid, poolname= "MemoryPool") ppool = get_pool_info(virt, server, procid, poolname= "ProcessorPool") - status, test_network = create_netpool_conf(server, virt) - if status != PASS: - return status, pool_set, test_network - - netid = "%s/%s" % ("NetworkPool", test_network) + netid = "%s/%s" % ("NetworkPool", test_npool) npool = get_pool_info(virt, server, netid, poolname= "NetworkPool") if dpool.InstanceID == None or mpool.InstanceID == None \ or npool.InstanceID == None or ppool.InstanceID == None: logger.error("Get pool None") cleanup_restore(server, virt) - destroy_netpool(server, virt, test_network) return FAIL else: pool_set = [dpool, mpool, ppool, npool] except Exception, detail: logger.error("Exception: %s", detail) - return FAIL, pool_set, test_network + return FAIL, pool_set - return PASS, pool_set, test_network + return PASS, pool_set def verify_rasd_fields(loop, assoc_info, cllist, rtype, rangelist): for inst in assoc_info: @@ -207,15 +202,14 @@ server = options.ip virt = options.virt - status, pool, test_network = get_pool_details(virt, server) + status, pool = get_pool_details(virt, server) if status != PASS: cleanup_restore(server, virt) - destroy_netpool(server, virt, test_network) return FAIL status = verify_sdc_with_ac(virt, server, pool) + cleanup_restore(server, virt) - destroy_netpool(server, virt, test_network) return status if __name__ == "__main__": diff -r 3c32f9334194 -r 622266af7ac6 suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py --- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Aug 22 12:38:18 2008 -0700 @@ -54,6 +54,7 @@ from XenKvmLib import rasd from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ verify_diskrasd_values, verify_memrasd_values, rasd_init_list +from XenKvmLib.const import default_network_name sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -71,7 +72,7 @@ vsxml_info = virt_xml(test_dom, mem=test_mem, vcpus = test_vcpus, mac = test_mac, disk = test_disk) try: - bridge = vsxml_info.set_vbridge(server) + bridge = vsxml_info.set_vbridge(server, default_network_name) except Exception, details: logger.error("Exception : %s", details) return FAIL, vsxml_info From kaitlin at linux.vnet.ibm.com Mon Aug 25 14:22:36 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 07:22:36 -0700 Subject: [Libvirt-cim] [PATCH 3 of 6] [TEST] Remove network pool creation from vxml In-Reply-To: Message-ID: <1c707cb7dff491a986f7.1219674156@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219433898 25200 # Node ID 1c707cb7dff491a986f74157d1ab698032e32975 # Parent 254abd366384a00a88b3042201c65bbb99d85a1f [TEST] Remove network pool creation from vxml. A network pool is now created before any of the tests run. If an additonal pool is needed, it can be created by the test itself, instead of the XML class creating it. Signed-off-by: Kaitlin Rupert diff -r 254abd366384 -r 1c707cb7dff4 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Aug 22 15:29:44 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Aug 22 12:38:18 2008 -0700 @@ -441,21 +441,8 @@ return br - def _set_vbridge(self, ip, virt_type): - network_list = live.net_list(ip, virt=virt_type) - if len(network_list) > 0: - vbr = live.get_bridge_from_network_xml(network_list[0], ip, - virt = virt_type) - else: - logger.info('No virutal network found') - logger.info('Trying to create one ......') - netxml = NetXML(ip, virt=virt_type) - ret = netxml.create_vnet() - if not ret: - logger.error('Failed to create the virtual network "%s"', - netxml.net_name) - sys.exit(SKIP) - vbr = netxml.vbr + def _set_vbridge(self, ip, virt_type, net_name): + vbr = live.get_bridge_from_network_xml(net_name, ip, virt=virt_type) interface = self.get_node('/domain/devices/interface') interface.setAttribute('type', 'bridge') @@ -463,13 +450,14 @@ return vbr - def set_interface_details(self, devices, net_mac, net_type, virt_type): + def set_interface_details(self, devices, net_mac, net_type, net_name, + virt_type): interface = self.add_sub_node(devices, 'interface', type=net_type) self.add_sub_node(interface, 'mac', address=net_mac) if net_type == 'bridge': - self._set_vbridge(CIM_IP, virt_type) + self._set_vbridge(CIM_IP, virt_type, net_name) elif net_type == 'network': - self.set_vnetwork(interface, virt_type) + self.add_sub_node(interface, 'source', network=net_name) elif net_type == 'ethernet': pass elif net_type == 'user': @@ -477,23 +465,6 @@ else: logger.error("%s is not a valid network type", net_type) sys.exit(1) - - def set_vnetwork(self, interface, virt_type): - network_list = live.net_list(CIM_IP, virt_type) - if len(network_list) > 0: - nname = network_list[0] - else: - logger.info('No virutal network found') - logger.info('Trying to create one ......') - netxml = NetXML(CIM_IP, virt=virt_type) - ret = netxml.create_vnet() - if not ret: - logger.error('Failed to create the virtual network "%s"', - netxml.net_name) - sys.exit(SKIP) - nname = netxml.xml_get_netpool_name() - self.add_sub_node(interface, 'source', network=nname) - class VirtCIM: @@ -564,7 +535,8 @@ mac=const.Xen_default_mac, disk_file_path=const.Xen_disk_path, disk=const.Xen_default_disk_dev, - ntype=const.default_net_type): + ntype=const.default_net_type, + net_name=const.default_network_name): if not (os.path.exists(const.Xen_kernel_path) \ and os.path.exists(const.Xen_init_path)): logger.error('ERROR: Either the kernel image ' @@ -572,7 +544,7 @@ sys.exit(1) VirtXML.__init__(self, 'xen', test_dom, set_uuid(), mem, vcpus) self._os(const.Xen_kernel_path, const.Xen_init_path) - self._devices(disk_file_path, disk, ntype, mac) + self._devices(disk_file_path, disk, ntype, mac, net_name) VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path, ntype, mac, vcpus, mem, mem_allocunits) @@ -584,14 +556,14 @@ self.add_sub_node(os, 'initrd', os_initrd) self.add_sub_node(os, 'cmdline', 'TERM=xterm') - def _devices(self, disk_img, disk_dev, net_type, net_mac): + def _devices(self, disk_img, disk_dev, net_type, net_mac, net_name): devices = self.get_node('/domain/devices') disk = self.add_sub_node(devices, 'disk', type='file', device='disk') self.add_sub_node(disk, 'driver', name='file') self.add_sub_node(disk, 'source', file=disk_img) self.add_sub_node(disk, 'target', dev=disk_dev) - self.set_interface_details(devices, net_mac, net_type, virt_type='Xen') + self.set_interface_details(devices, net_mac, net_type, net_name, 'Xen') def set_bootloader(self, ip, gtype=0): bldr = live.bootloader(ip, gtype) @@ -603,9 +575,9 @@ self.nasd.NetworkType = 'bridge' return self._set_bridge(ip) - def set_vbridge(self, ip): + def set_vbridge(self, ip, net_name): self.nasd.NetworkType = 'bridge' - return self._set_vbridge(ip, 'Xen') + return self._set_vbridge(ip, 'Xen', net_name) class KVMXML(VirtXML, VirtCIM): @@ -619,7 +591,8 @@ mac=const.KVM_default_mac, disk_file_path=const.KVM_disk_path, disk=const.KVM_default_disk_dev, - ntype=const.default_net_type): + ntype=const.default_net_type, + net_name=const.default_network_name): if not os.path.exists(disk_file_path): logger.error('Error: Disk image does not exist') sys.exit(1) @@ -628,13 +601,13 @@ ntype, mac, vcpus, mem, mem_allocunits) self._os() self._devices(const.KVM_default_emulator, ntype, - disk_file_path, disk, mac) + disk_file_path, disk, mac, net_name) def _os(self): self.add_sub_node('/domain/os', 'type', 'hvm') - def _devices(self, emu, net_type, disk_img, disk_dev, net_mac): + def _devices(self, emu, net_type, disk_img, disk_dev, net_mac, net_name): devices = self.get_node('/domain/devices') self.add_sub_node(devices, 'emulator', emu) @@ -642,7 +615,7 @@ self.add_sub_node(disk, 'source', file=disk_img) self.add_sub_node(disk, 'target', dev=disk_dev) - self.set_interface_details(devices, net_mac, net_type, virt_type='KVM') + self.set_interface_details(devices, net_mac, net_type, net_name, 'KVM') def set_emulator(self, emu): return self._set_emulator(emu) @@ -650,8 +623,8 @@ def set_bridge(self, ip): return self._set_bridge(ip) - def set_vbridge(self, ip): - return self._set_vbridge(ip, 'KVM') + def set_vbridge(self, ip, net_name): + return self._set_vbridge(ip, 'KVM', net_name) class XenFVXML(VirtXML, VirtCIM): @@ -665,7 +638,8 @@ mac=const.XenFV_default_mac, disk_file_path=const.XenFV_disk_path, disk=const.XenFV_default_disk_dev, - ntype=const.default_net_type): + ntype=const.default_net_type, + net_name=const.default_network_name): if not os.path.exists(disk_file_path): logger.error('Error: Disk image does not exist') sys.exit(1) @@ -675,7 +649,7 @@ self._features() self._os(const.XenFV_default_loader) self._devices(const.XenFV_default_emulator, - ntype, mac, disk_file_path, disk) + ntype, mac, net_name, disk_file_path, disk) def _features(self): features = self.get_node('/domain/features') @@ -689,7 +663,7 @@ self.add_sub_node(os, 'loader', os_loader) self.add_sub_node(os, 'boot', dev='hd') - def _devices(self, emu, net_type, net_mac, disk_img, disk_dev): + def _devices(self, emu, net_type, net_mac, net_name, disk_img, disk_dev): devices = self.get_node('/domain/devices') self.add_sub_node(devices, 'emulator', emu) @@ -699,7 +673,7 @@ disk = self.add_sub_node(devices, 'disk', type='file') self.add_sub_node(disk, 'source', file=disk_img) self.add_sub_node(disk, 'target', dev=disk_dev) - self.set_interface_details(devices, net_mac, net_type, virt_type='XenFV') + self.set_interface_details(devices, net_mac, net_type, net_name, 'Xen') def set_emulator(self, emu): return self._set_emulator(emu) @@ -707,8 +681,8 @@ def set_bridge(self, ip): return self._set_bridge(ip) - def set_vbridge(self, ip): - return self._set_vbridge(ip, 'XenFV') + def set_vbridge(self, ip, net_name): + return self._set_vbridge(ip, 'XenFV', net_name) class LXCXML(VirtXML): @@ -717,19 +691,20 @@ vcpus=const.default_vcpus, mac=const.LXC_default_mac, ntype=const.default_net_type, + net_name=const.default_network_name, tty=const.LXC_default_tty): VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus) self._os(const.LXC_init_path) - self._devices(mac, ntype, const.LXC_default_tty) + self._devices(mac, ntype, net_name, const.LXC_default_tty) self.create_lxc_file(CIM_IP, const.LXC_init_path) def _os(self, os_init): os = self.get_node('/domain/os') self.add_sub_node(os, 'init', os_init) - def _devices(self, net_mac, net_type, tty_set): + def _devices(self, net_mac, net_type, net_name, tty_set): devices = self.get_node('/domain/devices') - self.set_interface_details(devices, net_mac, net_type, virt_type='LXC') + self.set_interface_details(devices, net_mac, net_type, net_name, 'LXC') interface = self.add_sub_node(devices, 'console', tty = tty_set) def create_lxc_file(self, ip, lxc_file): From kaitlin at linux.vnet.ibm.com Mon Aug 25 14:31:13 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 07:31:13 -0700 Subject: [Libvirt-cim] [PATCH] Add ConcreteComponent support for Processor In-Reply-To: References: Message-ID: <48B2C231.2070405@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1219427448 25200 > # Node ID a8130304d2f225657fd8c58c0eedb5d0eea37b7f > # Parent 794e7f3b23d0eef1231cab33fc8df85f91d284b1 > Add ConcreteComponent support for Processor > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Aug 25 14:32:47 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 07:32:47 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Add ConcreteComponent with NetworkPool support In-Reply-To: <794e7f3b23d0eef1231c.1219427575@guaranine.danplanet.com> References: <794e7f3b23d0eef1231c.1219427575@guaranine.danplanet.com> Message-ID: <48B2C28F.7060700@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1219427442 25200 > # Node ID 794e7f3b23d0eef1231cab33fc8df85f91d284b1 > # Parent 90ac6766de08cb6f0beca7f7c4cba35331ac83a5 > (#2) Add ConcreteComponent with NetworkPool support > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Aug 25 17:55:56 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 10:55:56 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Clean up xmt-makefvt.sh Message-ID: <85122957b3b312709d5b.1219686956@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219686894 25200 # Node ID 85122957b3b312709d5b0d558e36cbe1d75203c1 # Parent 622266af7ac6bea051d5694b3bb71846d2a55e75 [TEST] Clean up xmt-makefvt.sh Add logic to remove dummy kernel. Signed-off-by: Kaitlin Rupert diff -r 622266af7ac6 -r 85122957b3b3 suites/libvirt-cim/images/xmt-makefv.sh --- a/suites/libvirt-cim/images/xmt-makefv.sh Fri Aug 22 12:38:18 2008 -0700 +++ b/suites/libvirt-cim/images/xmt-makefv.sh Mon Aug 25 10:54:54 2008 -0700 @@ -16,6 +16,7 @@ SIZE=16 QEMU_VER=082 QEMU_FILE="" +DUMMY_PATH="cimtest-dummy-image" if [ -e "/usr/lib64/xen/bin/qemu-dm" ]; then QEMU_FILE="/usr/lib64/xen/bin/qemu-dm" @@ -88,12 +89,9 @@ local image=`find /boot | grep vmlinuz | grep -v xen | tail -n1` if [ -z $image ]; then - local dummy_path="cimtest-dummy-image" - - echo "No non-Xen kernel found. Creating a fake image.\n" - touch /boot/vmlinuz-$(dummy_path) - mkdir /lib/modules/$(dummy_path) - image="/boot/vmlinuz-$(dummy_path)" + touch /boot/vmlinuz-$DUMMY_PATH + mkdir /lib/modules/$DUMMY_PATH + image="/boot/vmlinuz-$DUMMY_PATH" fi echo $image @@ -112,6 +110,12 @@ cp $kernel ${target}/vmlinuz mkinitrd --preload ata_piix ${target}/initrd $ver + + if [ $ver == $DUMMY_PATH ]; then + echo "No non-Xen kernel found. Using a fake image." + rm /boot/vmlinuz-$DUMMY_PATH + rm -rf /lib/modules/$DUMMY_PATH + fi } grub_image() { From kaitlin at linux.vnet.ibm.com Mon Aug 25 17:57:58 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 10:57:58 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel In-Reply-To: References: Message-ID: <48B2F2A6.2090200@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-08-19 05:09:49: > > > # HG changeset patch > > # User Kaitlin Rupert > > # Date 1219093729 25200 > > # Node ID 0ffa5529fe3bc599cba875ac3927efe9e56b8626 > > # Parent 4cbb5bea5f3b72a7a716bb9d3c4b6e8d9c3f4596 > > [TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel. > > > > Signed-off-by: Kaitlin Rupert > > > > diff -r 4cbb5bea5f3b -r 0ffa5529fe3b > suites/libvirt-cim/images/xmt-makefv.sh > > +1 for me. > > But I don't know whether we have to remove the fake image after test > running, If so, how? > You wouldn't want to clean the fake image up after running a test. The fake image is made when all the other images are made - prior to running the test suite. This should be done after we build the new image. I've worked up a patch for this. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Aug 26 00:25:31 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 25 Aug 2008 17:25:31 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Remove referenced to log_param Message-ID: <36799a1d7469a97fe7ee.1219710331@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219709719 25200 # Node ID 36799a1d7469a97fe7ee115565c7fd666df86b43 # Parent 0aa0202d972f967d4d255ec247e4ef26c713090c [TEST] Remove referenced to log_param. Tests no longer need to call log_param. Because of this, the debug param of log_param() in Globals.py is no longer needed (was a temporary hack). Add log_level and log_file params incase other suites using the infrastructure want to use a different log level or file name. Also, change log file from vsmtest.log to cimtest.log. Signed-off-by: Kaitlin Rupert diff -r 0aa0202d972f -r 36799a1d7469 lib/CimTest/Globals.py --- a/lib/CimTest/Globals.py Mon Aug 25 14:28:30 2008 -0700 +++ b/lib/CimTest/Globals.py Mon Aug 25 17:15:19 2008 -0700 @@ -89,38 +89,27 @@ CIM_IP = "localhost" -def log_param(debug=None): - #FIXME debug=None is a temporary work around to avoid duplicate - # logging in vsmtest.log because we have log_param in both the - # do_main decorator and the test case's main function. - # We can safely delete the if branch here after all test cases - # have removed the log_param invoke. - if debug == None: - return - else: - logger.setLevel(logging.DEBUG) - #create console handler and set level to debug - ch = logging.StreamHandler() - if debug: - ch.setLevel(logging.ERROR) - else: - ch.setLevel(int(CIM_LEVEL)) - #create file handler and set level to debug - fh = logging.FileHandler("vsmtest.log") - fh.setLevel(logging.DEBUG) - #create formatter - formatter = logging.Formatter(\ - "%(asctime)s:%(name)s:%(levelname)s \t- %(message)s", - datefmt="%a, %d %b %Y %H:%M:%S") - #add formatter to handlers - fh.setFormatter(formatter) - formatter = logging.Formatter("%(levelname)s \t- %(message)s") - ch.setFormatter(formatter) - #add handlers to logger - logger.addHandler(fh) - logger.addHandler(ch) - #Print header - logger.info("====%s Log====", CIM_TC) +def log_param(log_level=logging.ERROR, file_name="cimtest.log"): + logger.setLevel(logging.DEBUG) + #create console handler and set level to debug + ch = logging.StreamHandler() + ch.setLevel(log_level) + #create file handler and set level to debug + fh = logging.FileHandler(file_name) + fh.setLevel(logging.DEBUG) + #create formatter + formatter = logging.Formatter(\ + "%(asctime)s:%(name)s:%(levelname)s \t- %(message)s", + datefmt="%a, %d %b %Y %H:%M:%S") + #add formatter to handlers + fh.setFormatter(formatter) + formatter = logging.Formatter("%(levelname)s \t- %(message)s") + ch.setFormatter(formatter) + #add handlers to logger + logger.addHandler(fh) + logger.addHandler(ch) + #Print header + logger.info("====%s Log====", CIM_TC) def log_bug(bug_num): logger.info("Known Bug:%s" % bug_num) @@ -136,7 +125,7 @@ else: def do_try(): try: - log_param(options.debug==True) + log_param() from VirtLib.utils import setup_ssh_key from XenKvmLib.test_doms import destroy_and_undefine_all setup_ssh_key() diff -r 0aa0202d972f -r 36799a1d7469 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Aug 25 14:28:30 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Aug 25 17:15:19 2008 -0700 @@ -33,7 +33,7 @@ from pywbem.cim_obj import CIMInstanceName from XenKvmLib.devices import CIM_Instance from XenKvmLib.classes import get_typed_class -from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE, \ +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, \ CIM_ERROR_GETINSTANCE from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from VirtLib.live import diskpool_list, virsh_version, net_list, domain_list diff -r 0aa0202d972f -r 36799a1d7469 suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Mon Aug 25 14:28:30 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Mon Aug 25 17:15:19 2008 -0700 @@ -21,7 +21,7 @@ # import sys -from CimTest.Globals import log_param, logger +from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS from XenKvmLib import vxml from XenKvmLib.classes import get_typed_class diff -r 0aa0202d972f -r 36799a1d7469 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Mon Aug 25 14:28:30 2008 -0700 +++ b/suites/libvirt-cim/main.py Mon Aug 25 17:15:19 2008 -0700 @@ -82,7 +82,7 @@ for group in group_list: g_path = os.path.join(TEST_SUITE, group) - cmd = "cd %s rm && rm %s" % (g_path, "vsmtest.log") + cmd = "cd %s && rm -f %s" % (g_path, "cimtest.log") status, output = commands.getstatusoutput(cmd) print "Cleaned log files." From yunguol at cn.ibm.com Tue Aug 26 01:59:43 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 26 Aug 2008 09:59:43 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Aug 26 2008 Message-ID: ================================================= Xen on Pegasus Test Run Summary for Aug 26 2008 ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) Kernel: 2.6.18-92.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 672 Libvirt-cim changeset: 90ac6766de08 ================================================= FAIL : 7 XFAIL : 0 SKIP : 3 PASS : 125 ----------------- Total : 135 ================================================= FAIL Test Summary: LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL NetworkPort - 01_netport.py: FAIL VSSD - 02_bootldr.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 08_modifyresource.py: FAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: FAIL ERROR - Failed to get instance by the class of Xen_LogicalDisk ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/xvda)') -------------------------------------------------------------------- Memory - 01_memory.py: FAIL ERROR - Capacity should be 262144 MB instead of 131072 MB -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: FAIL ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)') -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: FAIL ERROR - NameError : global name 'BaseException' is not defined Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 144, in do_try rc = f() File "02_bootldr.py", line 72, in main except BaseException, detail : NameError: global name 'BaseException' is not defined ERROR - None CIM_ERR_NOT_FOUND: No such instance (dom) -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: FAIL ERROR - Xen_VirtualSystemSettingData with VSSDC_dom was not returned ERROR - Xen_VirtualSystemSettingData returned 0 VSSD objects, expected only 1 -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: FAIL ERROR - Error invoking AddRS: add_disk_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: FAIL ERROR - Error invoking ModifyRS: mod_vcpu_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Tue Aug 26 02:01:20 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 26 Aug 2008 10:01:20 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel In-Reply-To: <48B2F2A6.2090200@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-26 01:57:58: > Guo Lian Yun wrote: > > > > libvirt-cim-bounces at redhat.com wrote on 2008-08-19 05:09:49: > > > > > # HG changeset patch > > > # User Kaitlin Rupert > > > # Date 1219093729 25200 > > > # Node ID 0ffa5529fe3bc599cba875ac3927efe9e56b8626 > > > # Parent 4cbb5bea5f3b72a7a716bb9d3c4b6e8d9c3f4596 > > > [TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel. > > > > > > Signed-off-by: Kaitlin Rupert > > > > > > diff -r 4cbb5bea5f3b -r 0ffa5529fe3b > > suites/libvirt-cim/images/xmt-makefv.sh > > > > > +1 for me. > > > > But I don't know whether we have to remove the fake image after test > > running, If so, how? > > > > You wouldn't want to clean the fake image up after running a test. The > fake image is made when all the other images are made - prior to running > the test suite. > > This should be done after we build the new image. I've worked up a > patch for this. Thanks for your reply =) > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Tue Aug 26 02:05:33 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 26 Aug 2008 10:05:33 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Clean up xmt-makefvt.sh In-Reply-To: <85122957b3b312709d5b.1219686956@elm3b41.beaverton.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-26 01:55:56: > # HG changeset patch > # User Kaitlin Rupert > # Date 1219686894 25200 > # Node ID 85122957b3b312709d5b0d558e36cbe1d75203c1 > # Parent 622266af7ac6bea051d5694b3bb71846d2a55e75 > [TEST] Clean up xmt-makefvt.sh > > Add logic to remove dummy kernel. > > Signed-off-by: Kaitlin Rupert > > diff -r 622266af7ac6 -r 85122957b3b3 suites/libvirt-cim/images/xmt-makefv.sh > --- a/suites/libvirt-cim/images/xmt-makefv.sh Fri Aug 22 12:38:18 2008 -0700 > +++ b/suites/libvirt-cim/images/xmt-makefv.sh Mon Aug 25 10:54:54 2008 -0700 > @@ -16,6 +16,7 @@ > SIZE=16 > QEMU_VER=082 > QEMU_FILE="" > +DUMMY_PATH="cimtest-dummy-image" > > if [ -e "/usr/lib64/xen/bin/qemu-dm" ]; then > QEMU_FILE="/usr/lib64/xen/bin/qemu-dm" > @@ -88,12 +89,9 @@ > local image=`find /boot | grep vmlinuz | grep -v xen | tail -n1` > > if [ -z $image ]; then > - local dummy_path="cimtest-dummy-image" > - > - echo "No non-Xen kernel found. Creating a fake image.\n" > - touch /boot/vmlinuz-$(dummy_path) > - mkdir /lib/modules/$(dummy_path) > - image="/boot/vmlinuz-$(dummy_path)" > + touch /boot/vmlinuz-$DUMMY_PATH > + mkdir /lib/modules/$DUMMY_PATH > + image="/boot/vmlinuz-$DUMMY_PATH" > fi > > echo $image > @@ -112,6 +110,12 @@ > cp $kernel ${target}/vmlinuz > > mkinitrd --preload ata_piix ${target}/initrd $ver > + > + if [ $ver == $DUMMY_PATH ]; then > + echo "No non-Xen kernel found. Using a fake image." > + rm /boot/vmlinuz-$DUMMY_PATH > + rm -rf /lib/modules/$DUMMY_PATH > + fi > } +1 for me =) > > grub_image() { > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Tue Aug 26 05:34:07 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 26 Aug 2008 13:34:07 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Remove referenced to log_param In-Reply-To: <36799a1d7469a97fe7ee.1219710331@elm3b41.beaverton.ibm.com> Message-ID: +1 from me Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-26 08:25:31: > # HG changeset patch > # User Kaitlin Rupert > # Date 1219709719 25200 > # Node ID 36799a1d7469a97fe7ee115565c7fd666df86b43 > # Parent 0aa0202d972f967d4d255ec247e4ef26c713090c > [TEST] Remove referenced to log_param. > > Tests no longer need to call log_param. Because of this, the debug > param of log_param() in Globals.py is no longer needed (was a > temporary hack). Add log_level and log_file params incase other > suites using the infrastructure want to use a different log level orfile name. > > Also, change log file from vsmtest.log to cimtest.log. > > Signed-off-by: Kaitlin Rupert > > diff -r 0aa0202d972f -r 36799a1d7469 lib/CimTest/Globals.py > --- a/lib/CimTest/Globals.py Mon Aug 25 14:28:30 2008 -0700 > +++ b/lib/CimTest/Globals.py Mon Aug 25 17:15:19 2008 -0700 > @@ -89,38 +89,27 @@ > CIM_IP = "localhost" > > > -def log_param(debug=None): > - #FIXME debug=None is a temporary work around to avoid duplicate > - # logging in vsmtest.log because we have log_param in both the > - # do_main decorator and the test case's main function. > - # We can safely delete the if branch here after all test cases > - # have removed the log_param invoke. > - if debug == None: > - return > - else: > - logger.setLevel(logging.DEBUG) > - #create console handler and set level to debug > - ch = logging.StreamHandler() > - if debug: > - ch.setLevel(logging.ERROR) > - else: > - ch.setLevel(int(CIM_LEVEL)) > - #create file handler and set level to debug > - fh = logging.FileHandler("vsmtest.log") > - fh.setLevel(logging.DEBUG) > - #create formatter > - formatter = logging.Formatter(\ > - "%(asctime)s:%(name)s:%(levelname)s \t- %(message)s", > - datefmt="%a, %d %b %Y %H:%M:%S") > - #add formatter to handlers > - fh.setFormatter(formatter) > - formatter = logging.Formatter("%(levelname)s \t- %(message)s") > - ch.setFormatter(formatter) > - #add handlers to logger > - logger.addHandler(fh) > - logger.addHandler(ch) > - #Print header > - logger.info("====%s Log====", CIM_TC) > +def log_param(log_level=logging.ERROR, file_name="cimtest.log"): > + logger.setLevel(logging.DEBUG) > + #create console handler and set level to debug > + ch = logging.StreamHandler() > + ch.setLevel(log_level) > + #create file handler and set level to debug > + fh = logging.FileHandler(file_name) > + fh.setLevel(logging.DEBUG) > + #create formatter > + formatter = logging.Formatter(\ > + "%(asctime)s:%(name)s:%(levelname)s \t- > %(message)s", > + datefmt="%a, %d %b %Y %H:%M:%S") > + #add formatter to handlers > + fh.setFormatter(formatter) > + formatter = logging.Formatter("%(levelname)s \t- %(message)s") > + ch.setFormatter(formatter) > + #add handlers to logger > + logger.addHandler(fh) > + logger.addHandler(ch) > + #Print header > + logger.info("====%s Log====", CIM_TC) > > def log_bug(bug_num): > logger.info("Known Bug:%s" % bug_num) > @@ -136,7 +125,7 @@ > else: > def do_try(): > try: > - log_param(options.debug==True) > + log_param() > from VirtLib.utils import setup_ssh_key > from XenKvmLib.test_doms import destroy_and_undefine_all > setup_ssh_key() > diff -r 0aa0202d972f -r 36799a1d7469 suites/libvirt- > cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Aug 25 > 14:28:30 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Aug 25 > 17:15:19 2008 -0700 > @@ -33,7 +33,7 @@ > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib.devices import CIM_Instance > from XenKvmLib.classes import get_typed_class > -from CimTest.Globals import logger, log_param, CIM_ERROR_ENUMERATE, \ > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, \ > CIM_ERROR_GETINSTANCE > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from VirtLib.live import diskpool_list, virsh_version, net_list, domain_list > diff -r 0aa0202d972f -r 36799a1d7469 suites/libvirt-cim/lib/XenKvmLib/rasd.py > --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Mon Aug 25 14:28:302008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Mon Aug 25 17:15:192008 -0700 > @@ -21,7 +21,7 @@ > # > > import sys > -from CimTest.Globals import log_param, logger > +from CimTest.Globals import logger > from CimTest.ReturnCodes import FAIL, PASS > from XenKvmLib import vxml > from XenKvmLib.classes import get_typed_class > diff -r 0aa0202d972f -r 36799a1d7469 suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Mon Aug 25 14:28:30 2008 -0700 > +++ b/suites/libvirt-cim/main.py Mon Aug 25 17:15:19 2008 -0700 > @@ -82,7 +82,7 @@ > > for group in group_list: > g_path = os.path.join(TEST_SUITE, group) > - cmd = "cd %s rm && rm %s" % (g_path, "vsmtest.log") > + cmd = "cd %s && rm -f %s" % (g_path, "cimtest.log") > status, output = commands.getstatusoutput(cmd) > > print "Cleaned log files." > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From danms at us.ibm.com Tue Aug 26 14:07:28 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 26 Aug 2008 07:07:28 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Clean up xmt-makefvt.sh In-Reply-To: <85122957b3b312709d5b.1219686956@elm3b41.beaverton.ibm.com> (Kaitlin Rupert's message of "Mon, 25 Aug 2008 10:55:56 -0700") References: <85122957b3b312709d5b.1219686956@elm3b41.beaverton.ibm.com> Message-ID: <87wsi3euov.fsf@caffeine.beaverton.ibm.com> KR> + touch /boot/vmlinuz-$DUMMY_PATH KR> + mkdir /lib/modules/$DUMMY_PATH KR> + image="/boot/vmlinuz-$DUMMY_PATH" I know I didn't comment on this when the function was added, but I think this is a bad idea. I know I've suggested touching a kernelish file in /boot to fool this script in the past, but this self-hacking behavior seems like the wrong way to solve this problem. If the xen kernel really isn't there, I think our stuff should fake it in the image, instead of our script faking the system so the other parts of the script work unmodified. I think that fooling this and other scripts on the system into thinking there is a xen kernel image available is a bad precedent to set. What do you think? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From yunguol at cn.ibm.com Wed Aug 27 02:19:27 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 27 Aug 2008 10:19:27 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Aug 27 2008 (without sblim-cmpi-base providers installed) Message-ID: ================================================= Xen on Pegasus Test Run Summary for Aug 27 2008 ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) Kernel: 2.6.18-92.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 674 Libvirt-cim changeset: a8130304d2f2 ================================================= FAIL : 7 XFAIL : 0 SKIP : 3 PASS : 125 ----------------- Total : 135 ================================================= FAIL Test Summary: HostedDependency - 01_forward.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL NetworkPort - 01_netport.py: FAIL VSSD - 02_bootldr.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 08_modifyresource.py: FAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: FAIL ERROR - Failed to enumerate the class of ComputerSystem ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (CrossClass_GuestDom).') -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: FAIL ERROR - Failed to get instance by the class of Xen_LogicalDisk ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/xvda)') -------------------------------------------------------------------- Memory - 01_memory.py: FAIL ERROR - Capacity should be 262144 MB instead of 131072 MB -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: FAIL ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)') -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: FAIL ERROR - NameError : global name 'BaseException' is not defined Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 133, in do_try rc = f() File "02_bootldr.py", line 72, in main except BaseException, detail : NameError: global name 'BaseException' is not defined ERROR - None CIM_ERR_NOT_FOUND: No such instance (dom) -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: FAIL ERROR - Error invoking AddRS: add_disk_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: FAIL ERROR - Error invoking ModifyRS: mod_vcpu_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Aug 27 02:39:04 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 27 Aug 2008 10:39:04 +0800 Subject: [Libvirt-cim] Test failures result with and without sblim-cmpi-base provider Message-ID: Hi, I send the test report to the mailing list with and without sblim-cmpi-bae provider. The test is done for Xen on RHEL5.2 with latest sources. There are total 7 failures without sblim-cmpi-base provider, 29 failed when running with sblim-cmpi-base provider installed. FAIL Test Summary without sblim-cmpi-base(7): HostedDependency - 01_forward.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL Memory - 01_memory.py: FAIL NetworkPort - 01_netport.py: FAIL VSSD - 02_bootldr.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 08_modifyresource.py: FAIL FAIL Test Summary with sblim-cmpi-base(29): ElementCapabilities - 01_forward.py: FAIL ElementCapabilities - 02_reverse.py: FAIL ElementCapabilities - 05_hostsystem_cap.py: FAIL ElementConforms - 01_forward.py: FAIL ElementConforms - 02_reverse.py: FAIL HostSystem - 01_enum.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL HostSystem - 03_hs_to_settdefcap.py: FAIL HostSystem - 04_hs_to_EAPF.py: FAIL HostSystem - 05_hs_gi_errs.py: FAIL HostSystem - 06_hs_to_vsms.py: FAIL HostedDependency - 01_forward.py: FAIL HostedDependency - 02_reverse.py: FAIL HostedDependency - 03_enabledstate.py: FAIL HostedDependency - 04_reverse_errs.py: FAIL HostedResourcePool - 01_forward.py: FAIL HostedResourcePool - 02_reverse.py: FAIL HostedResourcePool - 03_forward_errs.py: FAIL HostedService - 01_forward.py: FAIL HostedService - 02_reverse.py: FAIL HostedService - 03_forward_errs.py: FAIL HostedService - 04_reverse_errs.py: FAIL ResourcePoolConfigurationService - 01_enum.py: FAIL ResourcePoolConfigurationService - 02_rcps_gi_errors.py: FAIL VSSD - 02_bootldr.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 08_modifyresource.py: FAIL VirtualSystemSnapshotService - 01_enum.py: FAIL VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL From the test summary we can say that sblim-cmpi-base installation result in a number of tests are failing, but it also fix some tests. Except the HostSystem related failures due to sblim-cmpi-base, there are 3 tests failing actually as follows: 1) VSSD - 02_bootldr.py: FAIL ERROR - NameError : global name 'BaseException' is not defined Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 133, in do_try rc = f() File "02_bootldr.py", line 72, in main except BaseException, detail : NameError: global name 'BaseException' is not defined ERROR - None CIM_ERR_NOT_FOUND: No such instance (dom) 2)VirtualSystemManagementService - 06_addresource.py: FAIL ERROR - Error invoking AddRS: add_disk_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' 3)VirtualSystemManagementService - 08_modifyresource.py: FAIL ERROR - Error invoking ModifyRS: mod_vcpu_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Aug 27 03:01:42 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 27 Aug 2008 11:01:42 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Aug 27 2008 with sblim-cmpi-base provider Message-ID: ================================================= Xen on Pegasus Test Run Summary for Aug 27 2008 ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) Kernel: 2.6.18-92.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 672 (I update the libvirt-cim to the latest revision of 674 and install, but I don't know why the revision number is still 672) Libvirt-cim changeset: 90ac6766de08 ================================================= FAIL : 29 XFAIL : 0 SKIP : 3 PASS : 103 ----------------- Total : 135 ================================================= FAIL Test Summary: ElementCapabilities - 01_forward.py: FAIL ElementCapabilities - 02_reverse.py: FAIL ElementCapabilities - 05_hostsystem_cap.py: FAIL ElementConforms - 01_forward.py: FAIL ElementConforms - 02_reverse.py: FAIL HostSystem - 01_enum.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL HostSystem - 03_hs_to_settdefcap.py: FAIL HostSystem - 04_hs_to_EAPF.py: FAIL HostSystem - 05_hs_gi_errs.py: FAIL HostSystem - 06_hs_to_vsms.py: FAIL HostedDependency - 01_forward.py: FAIL HostedDependency - 02_reverse.py: FAIL HostedDependency - 03_enabledstate.py: FAIL HostedDependency - 04_reverse_errs.py: FAIL HostedResourcePool - 01_forward.py: FAIL HostedResourcePool - 02_reverse.py: FAIL HostedResourcePool - 03_forward_errs.py: FAIL HostedService - 01_forward.py: FAIL HostedService - 02_reverse.py: FAIL HostedService - 03_forward_errs.py: FAIL HostedService - 04_reverse_errs.py: FAIL ResourcePoolConfigurationService - 01_enum.py: FAIL ResourcePoolConfigurationService - 02_rcps_gi_errors.py: FAIL VSSD - 02_bootldr.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 08_modifyresource.py: FAIL VirtualSystemSnapshotService - 01_enum.py: FAIL VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: FAIL ERROR - Failed to enumerate the class of Xen_HostSystem -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: FAIL ERROR - Expected 1 host, got 0 -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - ElementConformsToProfile returned 0 RegisteredProfile objects -------------------------------------------------------------------- ElementConforms - 02_reverse.py: FAIL ERROR - ERROR: Enumerate returned 0 host instances -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: FAIL ERROR - Expected 1 Xen_HostSystem instance returned -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range ERROR - Hostname mismatch Xen_HostSystem : elm3b217.beaverton.ibm.com -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range ERROR - Did not get the expected MigrationService record -------------------------------------------------------------------- HostedDependency - 01_forward.py: FAIL ERROR - Failed to enumerate the class of Hostsystem ERROR - Exception: list index out of range -------------------------------------------------------------------- HostedDependency - 02_reverse.py: FAIL ERROR - list index out of range -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range ERROR - Failed to get host info -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range ERROR - --- FAILED: Invalid Name Key Name.--- ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range ERROR - --- FAILED: Invalid Name Key Value.--- ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range ERROR - --- FAILED: Invalid CreationClassName Key Name--- ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range ERROR - --- FAILED: Invalid CreationClassName Key Value--- -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: FAIL ERROR - Failed to enumerate the class of Xen_HostSystem -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: FAIL ERROR - Failed to enumerate the class of Xen_HostSystem -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: FAIL ERROR - Failed to enumerate the class of Xen_HostSystem -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: FAIL ERROR - UnboundLocalError : local variable 'host_sys' referenced before assignment Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 133, in do_try rc = f() File "01_forward.py", line 42, in main logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) UnboundLocalError: local variable 'host_sys' referenced before assignment ERROR - None -------------------------------------------------------------------- HostedService - 02_reverse.py: FAIL ERROR - UnboundLocalError : local variable 'host_sys' referenced before assignment Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 133, in do_try rc = f() File "02_reverse.py", line 42, in main logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.CreationClassName) UnboundLocalError: local variable 'host_sys' referenced before assignment ERROR - None -------------------------------------------------------------------- HostedService - 03_forward_errs.py: FAIL ERROR - UnboundLocalError : local variable 'host_sys' referenced before assignment Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 133, in do_try rc = f() File "03_forward_errs.py", line 46, in main logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) UnboundLocalError: local variable 'host_sys' referenced before assignment ERROR - None -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: FAIL ERROR - UnboundLocalError : local variable 'host_sys' referenced before assignment Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 133, in do_try rc = f() File "04_reverse_errs.py", line 46, in main logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) UnboundLocalError: local variable 'host_sys' referenced before assignment ERROR - None -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: FAIL ERROR - Failed to enumerate the class of Xen_HostSystem -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range ERROR - Problem getting host information -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: FAIL ERROR - NameError : global name 'BaseException' is not defined Traceback (most recent call last): File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 133, in do_try rc = f() File "02_bootldr.py", line 72, in main except BaseException, detail : NameError: global name 'BaseException' is not defined ERROR - None CIM_ERR_NOT_FOUND: No such instance (dom) -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: FAIL ERROR - Error invoking AddRS: add_disk_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: FAIL ERROR - Error invoking ModifyRS: mod_vcpu_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL ERROR - Failed to enumerate the class of HostSystem ERROR - Exception: list index out of range -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Aug 27 03:08:56 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 27 Aug 2008 11:08:56 +0800 Subject: [Libvirt-cim] Test failures result with and without sblim-cmpi-base provider In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-27 10:39:04: > > Hi, > > I send the test report to the mailing list with and without sblim- > cmpi-bae provider. > The test is done for Xen on RHEL5.2 with latest sources. There are > total 7 failures without sblim-cmpi-base provider, 29 failed when > running with sblim-cmpi-base provider installed. > > FAIL Test Summary without sblim-cmpi-base(7): > > HostedDependency - 01_forward.py: FAIL > LogicalDisk - 03_ld_gi_errs.py: FAIL > Memory - 01_memory.py: FAIL > NetworkPort - 01_netport.py: FAIL > VSSD - 02_bootldr.py: FAIL > VirtualSystemManagementService - 06_addresource.py: FAIL > VirtualSystemManagementService - 08_modifyresource.py: FAIL > > FAIL Test Summary with sblim-cmpi-base(29): > > ElementCapabilities - 01_forward.py: FAIL > ElementCapabilities - 02_reverse.py: FAIL > ElementCapabilities - 05_hostsystem_cap.py: FAIL > ElementConforms - 01_forward.py: FAIL > ElementConforms - 02_reverse.py: FAIL > HostSystem - 01_enum.py: FAIL > HostSystem - 02_hostsystem_to_rasd.py: FAIL > HostSystem - 03_hs_to_settdefcap.py: FAIL > HostSystem - 04_hs_to_EAPF.py: FAIL > HostSystem - 05_hs_gi_errs.py: FAIL > HostSystem - 06_hs_to_vsms.py: FAIL > HostedDependency - 01_forward.py: FAIL > HostedDependency - 02_reverse.py: FAIL > HostedDependency - 03_enabledstate.py: FAIL > HostedDependency - 04_reverse_errs.py: FAIL > HostedResourcePool - 01_forward.py: FAIL > HostedResourcePool - 02_reverse.py: FAIL > HostedResourcePool - 03_forward_errs.py: FAIL > HostedService - 01_forward.py: FAIL > HostedService - 02_reverse.py: FAIL > HostedService - 03_forward_errs.py: FAIL > HostedService - 04_reverse_errs.py: FAIL > ResourcePoolConfigurationService - 01_enum.py: FAIL > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: FAIL > VSSD - 02_bootldr.py: FAIL > VirtualSystemManagementService - 06_addresource.py: FAIL > VirtualSystemManagementService - 08_modifyresource.py: FAIL > VirtualSystemSnapshotService - 01_enum.py: FAIL > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL > > From the test summary we can say that sblim-cmpi-base installation > result in a number of tests are failing, but it also fix some tests. > Except the HostSystem related failures due to sblim-cmpi-base, there > are 3 tests failing actually as follows: > > > 1) VSSD - 02_bootldr.py: FAIL > ERROR - NameError : global name 'BaseException' is not defined > Traceback (most recent call last): > File "/data/users/daisy/cimtest/lib/CimTest/Globals.py", line 133,in do_try > rc = f() > File "02_bootldr.py", line 72, in main > except BaseException, detail : > NameError: global name 'BaseException' is not defined > ERROR - None > CIM_ERR_NOT_FOUND: No such instance (dom) > > 2)VirtualSystemManagementService - 06_addresource.py: FAIL > ERROR - Error invoking AddRS: add_disk_res > ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") > InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unknown system > `rstest_domain' > > 3)VirtualSystemManagementService - 08_modifyresource.py: FAIL > ERROR - Error invoking ModifyRS: mod_vcpu_res > ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") > InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Unknown system > `rstest_domain' > > All this test pass when I run manually whatever with and without sblim-cmpi-base provider. > > > Best, > Regards > > Daisy (???) > VSM Team, China Systems & Technology Labs (CSTL) > E-mail: yunguol at cn.ibm.com > TEL: (86)-21-60922403 > Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Wed Aug 27 05:15:04 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 27 Aug 2008 10:45:04 +0530 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Aug 27 2008 with sblim-cmpi-base provider In-Reply-To: References: Message-ID: <48B4E2D8.9050203@linux.vnet.ibm.com> Guo Lian Yun wrote: > > ================================================= > Xen on Pegasus Test Run Summary for Aug 27 2008 > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) > Kernel: 2.6.18-92.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.0 > Libvirt-cim revision: 672 (I update the libvirt-cim to the latest > revision of 674 and install, but I don't know why the revision number > is still 672) Restarting the cimserver should help reflect the revision no. Even if this does not help, then do a make clean and then a make and then install the bits. Regards, Deepti. From yunguol at cn.ibm.com Wed Aug 27 06:20:19 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 27 Aug 2008 14:20:19 +0800 Subject: [Libvirt-cim] [PATCH 0 of 6] [TEST] Setup network pool for tests to use before tests begin running In-Reply-To: Message-ID: +1 from me! Do you think is it a good idea to create a disk pool before any of the tests run? If so, would you like to cook it up? Otherwise?I'm glad to take it up. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 Kaitlin Rupert Sent by: libvirt-cim-bounces at redhat.com 2008-08-25 22:22 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH 0 of 6] [TEST] Setup network pool for tests to use before tests begin running _______________________________________________ Libvirt-cim mailing list Libvirt-cim at redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Aug 27 06:46:31 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 26 Aug 2008 23:46:31 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add HRP.01~04 to support disk and net pool Message-ID: # HG changeset patch # User Guolian Yun # Date 1219819585 25200 # Node ID e981649cf307110ea3045b2aa114bf187566a126 # Parent 6995ae30dc81d2c8cbd78f0b669244d28116dbc2 [TEST] Add HRP.01~04 to support disk and net pool Signed-off-by: Guolian Yun diff -r 6995ae30dc81 -r e981649cf307 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Mon Aug 25 17:15:19 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Tue Aug 26 23:46:25 2008 -0700 @@ -31,12 +31,19 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import do_main from XenKvmLib.classes import get_typed_class +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) def main(): options = main.options status = FAIL + + status, dpool_name = create_diskpool_conf(options.ip, options.virt) + if status != PASS: + logger.error("Failed to create diskpool") + return FAIL + try: host_sys = hostsystem.enumerate(options.ip, options.virt)[0] except Exception: @@ -69,7 +76,12 @@ def main(): status = PASS if cname.find("ProcessorPool") >=0 and items['InstanceID'] == "ProcessorPool/0": status = PASS - + if cname.find("NetworkPool") >=0 and items['InstanceID'] == "NetworkPool/cimtest-networkpool": + status = PASS + if cname.find("DiskPool") >=0 and items['InstanceID'] == "DiskPool/foo": + status = PASS + + cleanup_restore(options.ip, options.virt) return status if __name__ == "__main__": sys.exit(main()) diff -r 6995ae30dc81 -r e981649cf307 suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Mon Aug 25 17:15:19 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Tue Aug 26 23:46:25 2008 -0700 @@ -30,6 +30,7 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import do_main from XenKvmLib.classes import get_typed_class +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf sup_types=['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) @@ -42,10 +43,23 @@ def main(): host_cn = get_typed_class(options.virt, "HostSystem") logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn) return FAIL + + status, dpool_name = create_diskpool_conf(options.ip, options.virt) + if status != PASS: + logger.error("Failed to create diskpool") + return FAIL + assoc_cn = get_typed_class(options.virt, "HostedResourcePool") proc_cn = get_typed_class(options.virt, "ProcessorPool") mem_cn = get_typed_class(options.virt, "MemoryPool") - poollist = { mem_cn : "MemoryPool/0", proc_cn : "ProcessorPool/0"} + net_cn = get_typed_class(options.virt, "NetworkPool") + disk_cn = get_typed_class(options.virt, "DiskPool") + poollist = { + mem_cn : "MemoryPool/0", + proc_cn : "ProcessorPool/0", + net_cn : "NetworkPool/cimtest-networkpool", + disk_cn : "DiskPool/foo" + } for k, v in poollist.items(): try: @@ -62,7 +76,8 @@ def main(): logger.error("Pool association returned wrong CreationClassName") status = FAIL if status != PASS: - break + break + cleanup_restore(options.ip, options.virt) return status if __name__ == "__main__": sys.exit(main()) diff -r 6995ae30dc81 -r e981649cf307 suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Mon Aug 25 17:15:19 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Tue Aug 26 23:46:25 2008 -0700 @@ -30,6 +30,7 @@ from CimTest.ReturnCodes import PASS from CimTest.ReturnCodes import PASS from CimTest.Globals import do_main from XenKvmLib.classes import get_typed_class +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] expr_values = { @@ -48,14 +49,27 @@ def main(): options = main.options status = PASS + status, dpool_name = create_diskpool_conf(options.ip, options.virt) + if status != PASS: + logger.error("Failed to create diskpool") + return FAIL + assoc_classname = get_typed_class(options.virt, "HostedResourcePool") proc_cn = get_typed_class(options.virt, "ProcessorPool") mem_cn = get_typed_class(options.virt, "MemoryPool") + net_cn = get_typed_class(options.virt, "NetworkPool") + disk_cn = get_typed_class(options.virt, "DiskPool") + conn = assoc.myWBEMConnection('http://%s' % options.ip, (Globals.CIM_USER, Globals.CIM_PASS), Globals.CIM_NS) - poollist = {mem_cn : "MemoryPool/0", proc_cn : "ProcessorPool/0"} + poollist = { + mem_cn : "MemoryPool/0", + proc_cn : "ProcessorPool/0", + net_cn : "NetworkPool/cimtest-networkpool", + disk_cn : "DiskPool/foo" + } for k, v in poollist.items(): keys = { "Wrong" : v} ret = try_assoc(conn, k, assoc_classname, keys, "InstanceID", \ @@ -73,6 +87,7 @@ def main(): logger.error("------ FAILED: Invalid Name Key Value.------") status = ret + cleanup_restore(options.ip, options.virt) return status if __name__ == "__main__": sys.exit(main()) From yunguol at cn.ibm.com Wed Aug 27 08:05:08 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 27 Aug 2008 01:05:08 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] [TEST] Move hostsystem.py behavior to enumclass.py In-Reply-To: Message-ID: <9c6b62d1feca39dc45b4.1219824308@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1219821984 25200 # Node ID 9c6b62d1feca39dc45b47e8ac0619f98227df78b # Parent 6995ae30dc81d2c8cbd78f0b669244d28116dbc2 [TEST] Move hostsystem.py behavior to enumclass.py Signed-off-by: Guolian Yun diff -r 6995ae30dc81 -r 9c6b62d1feca suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Mon Aug 25 17:15:19 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Aug 27 00:26:24 2008 -0700 @@ -45,6 +45,9 @@ class CIM_MyClass(CIM_Instance): CIM_Instance.__init__(self, inst) +class CIM_System(CIM_MyClass): + pass + class CIM_AllocationCapabilities(CIM_MyClass): pass @@ -88,6 +91,15 @@ class CIM_ProcResourceAllocationSettingD pass class CIM_DiskResourceAllocationSettingData(CIM_MyClass): + pass + +class Xen_HostSystem(CIM_System): + pass + +class KVM_HostSystem(CIM_System): + pass + +class LXC_HostSystem(CIM_System): pass class Xen_MigrationJob(CIM_MyClass): From yunguol at cn.ibm.com Wed Aug 27 08:05:09 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 27 Aug 2008 01:05:09 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] [TEST] Make hostsystem.py related changes to all tests In-Reply-To: Message-ID: <868a63afd7a8089124a3.1219824309@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1219823887 25200 # Node ID 868a63afd7a8089124a3fc1b94aefbd5d958947b # Parent 9c6b62d1feca39dc45b47e8ac0619f98227df78b [TEST] Make hostsystem.py related changes to all tests Signed-off-by: Guolian Yun diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Aug 27 00:58:07 2008 -0700 @@ -24,7 +24,7 @@ from VirtLib import utils from VirtLib import utils from VirtLib import live from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest import Globals from CimTest.Globals import do_main, logger, CIM_ERROR_ASSOCIATORNAMES, \ @@ -60,9 +60,9 @@ def main(): options = main.options server = options.ip virt = options.virt - + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(server, virt)[0] + host_sys = enumclass.enumerate(server, 'HostSystem', keys, virt)[0] except Exception: logger.error(CIM_ERROR_ENUMERATE, get_typed_class(virt, 'HostSystem')) return FAIL diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Aug 27 00:58:07 2008 -0700 @@ -25,7 +25,7 @@ from VirtLib import utils from VirtLib import utils from VirtLib import live from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib import vsms from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORNAMES @@ -64,8 +64,9 @@ def verify_host(inst_list, ip, virt="Xen return status inst = list[0] + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(ip, virt)[0] + host_sys = enumclass.enumerate(ip, 'HostSystem', keys, virt)[0] except Exception: logger.error(CIM_ERROR_ENUMERATE, 'HostSystem') return FAIL diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Wed Aug 27 00:58:07 2008 -0700 @@ -24,7 +24,7 @@ import pywbem import pywbem from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest import Globals from CimTest.Globals import logger, do_main diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Wed Aug 27 00:58:07 2008 -0700 @@ -43,7 +43,7 @@ from CimTest import Globals from CimTest import Globals from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS from CimTest.Globals import do_main -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib import computersystem from XenKvmLib import assoc from XenKvmLib.test_doms import destroy_and_undefine_all @@ -105,10 +105,10 @@ def main(): return FAIL inst_list.append(sys) - + keys = ['Name', 'CreationClassName'] try: #Getting the hostname, to verify with the value returned by the assoc. - host_sys = hostsystem.enumerate(options.ip, options.virt) + host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) if len(host_sys) < 1: logger.error("ERROR: Enumerate returned 0 host instances") diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Wed Aug 27 00:58:07 2008 -0700 @@ -26,7 +26,7 @@ # and verifies the hostname returned by the provider import sys -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from VirtLib import live from VirtLib import utils @@ -41,8 +41,9 @@ def main(): host = live.hostname(options.ip) status = FAIL + keys = ['Name', 'CreationClassName'] try: - hs = hostsystem.enumerate(options.ip, options.virt) + hs = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) name = get_typed_class(options.virt, 'HostSystem') if len(hs) != 1: diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostedDependency/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Wed Aug 27 00:58:07 2008 -0700 @@ -49,7 +49,7 @@ from XenKvmLib import vxml from XenKvmLib import vxml from XenKvmLib import computersystem from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib.classes import get_class_basename from CimTest import Globals from CimTest.Globals import do_main @@ -75,9 +75,9 @@ def main(): Globals.logger.error("Failed to Create the dom: %s", test_dom) status = FAIL return status - + keys = ['Name', 'CreationClassName'] try: - host = hostsystem.enumerate(options.ip, options.virt)[0] + host = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception,detail: Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, 'Hostsystem') Globals.logger.error("Exception: %s", detail) diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Wed Aug 27 00:58:07 2008 -0700 @@ -43,7 +43,7 @@ import sys import sys from VirtLib import utils from XenKvmLib import vxml -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib import computersystem from XenKvmLib import assoc from XenKvmLib.classes import get_class_basename @@ -71,9 +71,9 @@ def main(): logger.error("ERROR: Failed to Create the dom: %s" % test_dom) status = FAIL return status - + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(options.ip, options.virt) + host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) if host_sys[0].Name == "": raise Exception("HostName seems to be empty") else: diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Aug 27 00:58:07 2008 -0700 @@ -25,7 +25,7 @@ import sys from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL @@ -37,8 +37,9 @@ def main(): def main(): options = main.options status = FAIL + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(options.ip, options.virt)[0] + host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception: host_cn = get_typed_class(options.virt, "HostSystem") logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn) diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Wed Aug 27 00:58:07 2008 -0700 @@ -24,7 +24,7 @@ import sys from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL @@ -36,8 +36,9 @@ def main(): def main(): options = main.options status = PASS + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(options.ip, options.virt)[0] + host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception: host_cn = get_typed_class(options.virt, "HostSystem") logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn) diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Wed Aug 27 00:58:07 2008 -0700 @@ -24,7 +24,7 @@ import sys import sys import pywbem from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib.common_util import try_assoc from CimTest import Globals from CimTest.Globals import logger @@ -41,9 +41,9 @@ def main(): def main(): options = main.options status = PASS - + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(options.ip, options.virt)[0] + host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception: host_cn = get_typed_class(options.virt, "HostSystem") logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn) diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostedService/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Wed Aug 27 00:58:07 2008 -0700 @@ -24,7 +24,7 @@ import sys import sys from VirtLib import utils from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest import Globals from CimTest.Globals import do_main @@ -36,8 +36,9 @@ sup_types = ['Xen', 'XenFV', 'KVM', 'LXC @do_main(sup_types) def main(): options = main.options + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(options.ip, options.virt)[0] + host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception: logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) return FAIL diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostedService/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Wed Aug 27 00:58:07 2008 -0700 @@ -24,7 +24,7 @@ import sys import sys from VirtLib import utils from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest import Globals from CimTest.Globals import do_main @@ -36,8 +36,9 @@ sup_types = ['Xen', 'XenFV', 'KVM', 'LXC @do_main(sup_types) def main(): options = main.options + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(options.ip, options.virt)[0] + host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception: logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.CreationClassName) return FAIL diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Wed Aug 27 00:58:07 2008 -0700 @@ -24,7 +24,7 @@ import pywbem import pywbem from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest import Globals from CimTest.Globals import logger, do_main @@ -39,9 +39,9 @@ def main(): options = main.options rc = -1 status = FAIL - + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(options.ip, options.virt)[0] + host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception: logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) return FAIL diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Wed Aug 27 00:58:07 2008 -0700 @@ -24,7 +24,7 @@ import pywbem import pywbem from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest import Globals from CimTest.Globals import logger, do_main @@ -39,9 +39,9 @@ def main(): options = main.options rc = -1 status = FAIL - + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(options.ip, options.virt)[0] + host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception: logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) return FAIL diff -r 9c6b62d1feca -r 868a63afd7a8 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Wed Aug 27 00:26:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Wed Aug 27 00:58:07 2008 -0700 @@ -23,7 +23,7 @@ # import sys -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from XenKvmLib import rpcs from CimTest import Globals from CimTest.ReturnCodes import PASS, FAIL @@ -38,8 +38,9 @@ def main(): options = main.options server = options.ip classname = get_typed_class(options.virt, "ResourcePoolConfigurationService") + keys = ['Name', 'CreationClassName'] try: - host_sys = hostsystem.enumerate(server, options.virt)[0] + host_sys = enumclass.enumerate(server, 'HostSystem', keys, options.virt)[0] except Exception: host_cn = get_typed_class(options.virt, "HostSystem") logger.error(Globals.CIM_ERROR_ENUMERATE % host_cn) From yunguol at cn.ibm.com Wed Aug 27 08:05:10 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 27 Aug 2008 01:05:10 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] [TEST] Update common_util.py to reflect hostsystem changes In-Reply-To: Message-ID: # HG changeset patch # User Guolian Yun # Date 1219824097 25200 # Node ID bbc51fedc22665157ea83df962bb0866ec1b3ae6 # Parent 868a63afd7a8089124a3fc1b94aefbd5d958947b [TEST] Update common_util.py to reflect hostsystem changes Signed-off-by: Guolian Yun diff -r 868a63afd7a8 -r bbc51fedc226 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Aug 27 00:58:07 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Aug 27 01:01:37 2008 -0700 @@ -29,7 +29,7 @@ from XenKvmLib.test_doms import * from XenKvmLib.test_doms import * from XenKvmLib import vsms from XenKvmLib import computersystem -from XenKvmLib import hostsystem +from XenKvmLib import enumclass from pywbem.cim_obj import CIMInstanceName from XenKvmLib.devices import CIM_Instance from XenKvmLib.classes import get_typed_class @@ -196,8 +196,9 @@ def get_host_info(server, virt="Xen"): status = PASS host_name = '' host_ccn = '' + keys = ['Name', 'CreationClassName'] try : - host_sys = hostsystem.enumerate(server, virt) + host_sys = enumclass.enumerate(server, 'HostSystem', keys, virt) if host_sys[0].Name == "": logger.error("HostName seems to be empty") status = FAIL From yunguol at cn.ibm.com Wed Aug 27 08:05:11 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 27 Aug 2008 01:05:11 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST] Remove hostsystem.py from lib In-Reply-To: Message-ID: <8b663ceb3a38795f8b7d.1219824311@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1219824271 25200 # Node ID 8b663ceb3a38795f8b7d99b58aab9bcfd8643907 # Parent bbc51fedc22665157ea83df962bb0866ec1b3ae6 [TEST] Remove hostsystem.py from lib Signed-off-by: Guolian Yun diff -r bbc51fedc226 -r 8b663ceb3a38 suites/libvirt-cim/lib/XenKvmLib/hostsystem.py --- a/suites/libvirt-cim/lib/XenKvmLib/hostsystem.py Wed Aug 27 01:01:37 2008 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -# -# Copyright 2008 IBM Corp. -# -# Authors: -# Dan Smith -# Guolian Yun -# Kaitlin Rupert -# -# 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 -# -import pywbem -from pywbem.cim_obj import CIMInstanceName -from CimTest import CimExt -from CimTest import Globals -from XenKvmLib.devices import CIM_Instance -from XenKvmLib.classes import get_typed_class - -class CIM_System(CIM_Instance): - def __init__(self, server, name): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings={"Name":name, - "CreationClassName": classname}) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - CIM_Instance.__init__(self, inst) - -class Xen_HostSystem(CIM_System): - pass - -class KVM_HostSystem(CIM_System): - pass - -class LXC_HostSystem(CIM_System): - pass - - -def enumerate(server, virt='Xen'): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - if virt == 'XenFV': - virt = 'Xen' - - classname = get_typed_class(virt, 'HostSystem') - - try: - instances = conn.EnumerateInstances(classname) - except pywbem.CIMError, arg: - print arg[1] - return [] - - list = [] - - for instance in instances: - list.append(eval(classname)(server, instance["Name"])) - - return list From yunguol at cn.ibm.com Wed Aug 27 08:05:07 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 27 Aug 2008 01:05:07 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] [TEST] Remove hostsystem.py - this behavior is covered by enumclass Message-ID: Signed-off-by: Guolian Yun The same update should be done to computersystem.py, I will send this patch later From kaitlin at linux.vnet.ibm.com Wed Aug 27 16:44:28 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 27 Aug 2008 09:44:28 -0700 Subject: [Libvirt-cim] Test failures result with and without sblim-cmpi-base provider In-Reply-To: References: Message-ID: <48B5846C.80409@linux.vnet.ibm.com> > > *FAIL Test Summary with sblim-cmpi-base(29):* Thanks Daisy for doing this test run. Can you look into fixing these tests? > > ElementCapabilities - 01_forward.py: FAIL > ElementCapabilities - 02_reverse.py: FAIL > ElementCapabilities - 05_hostsystem_cap.py: FAIL > ElementConforms - 01_forward.py: FAIL > ElementConforms - 02_reverse.py: FAIL > HostSystem - 01_enum.py: FAIL > HostSystem - 02_hostsystem_to_rasd.py: FAIL > HostSystem - 03_hs_to_settdefcap.py: FAIL > HostSystem - 04_hs_to_EAPF.py: FAIL > HostSystem - 05_hs_gi_errs.py: FAIL > HostSystem - 06_hs_to_vsms.py: FAIL > HostedDependency - 01_forward.py: FAIL > HostedDependency - 02_reverse.py: FAIL > HostedDependency - 03_enabledstate.py: FAIL > HostedDependency - 04_reverse_errs.py: FAIL > HostedResourcePool - 01_forward.py: FAIL > HostedResourcePool - 02_reverse.py: FAIL > HostedResourcePool - 03_forward_errs.py: FAIL > HostedService - 01_forward.py: FAIL > HostedService - 02_reverse.py: FAIL > HostedService - 03_forward_errs.py: FAIL > HostedService - 04_reverse_errs.py: FAIL > ResourcePoolConfigurationService - 01_enum.py: FAIL > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: FAIL > VSSD - 02_bootldr.py: FAIL > VirtualSystemManagementService - 06_addresource.py: FAIL > VirtualSystemManagementService - 08_modifyresource.py: FAIL > VirtualSystemSnapshotService - 01_enum.py: FAIL > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL > > From the test summary we can say that sblim-cmpi-base installation > result in a number of tests are failing, but it also fix some tests. > Except the HostSystem related failures due to sblim-cmpi-base, there are > 3 tests failing actually as follows: What's probably happening here is that the timing of the test execution is changing because of the number of failing tests. The libvirt caching issue is timing related - it takes awhile for libvirt to update its domain list. When the HostSystem tests are fixed, you'll probably see more failures related to the caching issue. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Aug 27 23:53:20 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 27 Aug 2008 16:53:20 -0700 Subject: [Libvirt-cim] [PATCH 0 of 6] [TEST] Setup network pool for tests to use before tests begin running In-Reply-To: References: Message-ID: <48B5E8F0.3010406@linux.vnet.ibm.com> Guo Lian Yun wrote: > > +1 from me! > > Do you think is it a good idea to create a disk pool before any of the > tests run? If so, would you like to cook it up? Otherwise,I'm glad to > take it up. Thanks for the review! Good call! I was planning to also add a diskpool. This patch set was pretty large, so I wanted the diskpool changes to be separate. If you are interested in working on it, please feel free to take it up. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Aug 28 00:02:56 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 27 Aug 2008 17:02:56 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add HRP.01~04 to support disk and net pool In-Reply-To: References: Message-ID: <48B5EB30.8090400@linux.vnet.ibm.com> > + > + status, dpool_name = create_diskpool_conf(options.ip, options.virt) > + if status != PASS: > + logger.error("Failed to create diskpool") > + return FAIL > + > try: > host_sys = hostsystem.enumerate(options.ip, options.virt)[0] > except Exception: > @@ -69,7 +76,12 @@ def main(): > status = PASS > if cname.find("ProcessorPool") >=0 and items['InstanceID'] == "ProcessorPool/0": > status = PASS > - > + if cname.find("NetworkPool") >=0 and items['InstanceID'] == "NetworkPool/cimtest-networkpool": Instead of hard coding the name of the network pool, it'd be a good idea to use default_network_name from const.py. That way, if the network pool name changes, we don't have to modify the individual tests. > + status = PASS > + if cname.find("DiskPool") >=0 and items['InstanceID'] == "DiskPool/foo": Instead of hard coding this value, use the value returned by dpool_name. For version of libvirt that don't have disk pool support, we use "foo" as the InstanceID. But for versions of libvirt that support storage pools, the name of the pool is different. > + status = PASS > + > + cleanup_restore(options.ip, options.virt) > return status > if __name__ == "__main__": > sys.exit(main()) > diff -r 6995ae30dc81 -r e981649cf307 suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py > diff -r 6995ae30dc81 -r e981649cf307 suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py The same comment for these two tests. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Thu Aug 28 01:38:15 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 28 Aug 2008 09:38:15 +0800 Subject: [Libvirt-cim] [PATCH 0 of 6] [TEST] Setup network pool for tests to use before tests begin running In-Reply-To: <48B5E8F0.3010406@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-08-28 07:53:20: > Guo Lian Yun wrote: > > > > +1 from me! > > > > Do you think is it a good idea to create a disk pool before any of the > > tests run? If so, would you like to cook it up? Otherwise,I'm glad to > > take it up. > > Thanks for the review! > > Good call! I was planning to also add a diskpool. This patch set was > pretty large, so I wanted the diskpool changes to be separate. If you > are interested in working on it, please feel free to take it up. =) > Since it's already in your plan, I'm going to work on other items. On the next, I will start to remove computersystem.py and update related tests. Thanks! > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Thu Aug 28 06:46:44 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 28 Aug 2008 16:46:44 +1000 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Aug 28 2008 Message-ID: <200808280646.m7S6ki4e006977@d23av04.au.ibm.com> ================================================= XenFV on Pegasus Test Run Summary for Aug 28 2008 ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) Kernel: 2.6.18-92.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 674 Libvirt-cim changeset: a8130304d2f2 ================================================= FAIL : 11 XFAIL : 0 SKIP : 4 PASS : 120 ----------------- Total : 135 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL ElementConforms - 02_reverse.py: FAIL ElementConforms - 03_ectp_fwd_errs.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL Profile - 01_enum.py: FAIL Profile - 02_profile_to_elec.py: FAIL Profile - 03_rprofile_gi_errs.py: FAIL ReferencedProfile - 01_verify_refprof.py: FAIL ReferencedProfile - 02_refprofile_errs.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP VSSD - 02_bootldr.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - ElementConformsToProfile returned 0 RegisteredProfile objects CIM_ERR_INVALID_PARAMETER: Xen_RegisteredProfile.InstanceID="CIM:DSP1057-VirtualSystem-1.0.0a" -------------------------------------------------------------------- ElementConforms - 02_reverse.py: FAIL ERROR - ElementConformsToProfile assoc failed CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile CIM_ERR_FAILED: Can't create RegisteredProfile instance -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: FAIL Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: INVALID_InstID_Keyname------ Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: INVALID_InstID_Keyvalue------ Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: INVALID_InstID_Keyname------ Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: INVALID_InstID_Keyvalue------ -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: FAIL ERROR - Failed to get instance by the class of Xen_LogicalDisk ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/hda)') -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: FAIL ERROR - Profile CIM:DSP1042-SystemVirtualization-1.0.0 is not found ERROR - Properties check for RegisteredProfile failed CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: FAIL ERROR - Xen_RegisteredProfile with Virtual System Profile was not returned CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: FAIL Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: Invalid InstanceID Key Value.------ Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: Invalid InstanceID Key Name.------ Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string Traceback (most recent call last): File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit msg = self.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format return fmt.format(record) File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format record.message = record.getMessage() File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage msg = msg % self.args TypeError: not enough arguments for format string ERROR - ------ FAILED: Invalid InstanceID Key Name.------ -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: FAIL ERROR - Xen_RegisteredProfile returned 0 Profile objects, expected atleast 5 CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: FAIL ERROR - Xen_RegisteredProfile returned 0 Profile objects, expected atleast 5 CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: FAIL ERROR - Xen_VirtualSystemSettingData with VSSDC_dom was not returned ERROR - Xen_VirtualSystemSettingData returned 0 VSSD objects, expected only 1 -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: FAIL ERROR - Error invoking AddRS: add_disk_res ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- From deeptik at linux.vnet.ibm.com Thu Aug 28 09:02:42 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 28 Aug 2008 14:32:42 +0530 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Aug 28 2008 In-Reply-To: <200808280646.m7S6ki4e006977@d23av04.au.ibm.com> References: <200808280646.m7S6ki4e006977@d23av04.au.ibm.com> Message-ID: <48B669B2.4010003@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > ================================================= > XenFV on Pegasus Test Run Summary for Aug 28 2008 > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.2 (Tikanga) > Kernel: 2.6.18-92.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.0 > Libvirt-cim revision: 674 > Libvirt-cim changeset: a8130304d2f2 > ================================================= > FAIL : 11 > XFAIL : 0 > SKIP : 4 > PASS : 120 > ----------------- > Total : 135 > ================================================= > FAIL Test Summary: > ElementConforms - 01_forward.py: FAIL > ElementConforms - 02_reverse.py: FAIL > ElementConforms - 03_ectp_fwd_errs.py: FAIL > Profile - 01_enum.py: FAIL > Profile - 02_profile_to_elec.py: FAIL > Profile - 03_rprofile_gi_errs.py: FAIL > ReferencedProfile - 01_verify_refprof.py: FAIL > ReferencedProfile - 02_refprofile_errs.py: FAIL > All the above tc failed since the RegisteredProfile , ElementConformsToProfile and ReferencedProfile were not registered in the interop namespace. I registered the above classes manually by running : sh provider-register.sh -v -t pegasus -n root/interop -r schema/RegisteredProfile.registration schema/ElementConformsToProfile.registration schema/ReferencedProfile.registration -m schema/ComputerSystem.mof schema/HostSystem.mof schema/RegisteredProfile.mof schema/ElementConformsToProfile.mof schema/ReferencedProfile.mof After this all the tc passed. > LogicalDisk - 03_ld_gi_errs.py: FAIL > VSSD - 04_vssd_to_rasd.py: FAIL > VirtualSystemManagementService - 06_addresource.py: FAIL > > All the test cases passed when run manually. Thanks and Regards, Deepti. > ================================================= > SKIP Test Summary: > ComputerSystem - 02_nosystems.py: SKIP > LogicalDisk - 02_nodevs.py: SKIP > NetworkPort - 03_user_netport.py: SKIP > VSSD - 02_bootldr.py: SKIP > > ================================================= > Full report: > -------------------------------------------------------------------- > AllocationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 02_nosystems.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 03_defineVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 04_defineStartVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 05_activate_defined_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 06_paused_active_suspend.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 22_define_suspend.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 23_suspend_suspend.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 27_define_suspend_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 32_start_reboot.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 33_suspend_reboot.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 35_start_reset.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 40_RSC_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 41_cs_to_settingdefinestate.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 04_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: FAIL > ERROR - ElementConformsToProfile returned 0 RegisteredProfile objects > CIM_ERR_INVALID_PARAMETER: Xen_RegisteredProfile.InstanceID="CIM:DSP1057-VirtualSystem-1.0.0a" > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: FAIL > ERROR - ElementConformsToProfile assoc failed > CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile > CIM_ERR_FAILED: Can't create RegisteredProfile instance > -------------------------------------------------------------------- > ElementConforms - 03_ectp_fwd_errs.py: FAIL > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: INVALID_InstID_Keyname------ > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: INVALID_InstID_Keyvalue------ > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: INVALID_InstID_Keyname------ > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: INVALID_InstID_Keyvalue------ > -------------------------------------------------------------------- > ElementConforms - 04_ectp_rev_errs.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: PASS > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: PASS > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: PASS > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > HostedDependency - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedDependency - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedDependency - 03_enabledstate.py: PASS > -------------------------------------------------------------------- > HostedDependency - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedService - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedService - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 01_disk.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 02_nodevs.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > LogicalDisk - 03_ld_gi_errs.py: FAIL > ERROR - Failed to get instance by the class of Xen_LogicalDisk > ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (hd_domain/hda)') > -------------------------------------------------------------------- > Memory - 01_memory.py: PASS > -------------------------------------------------------------------- > Memory - 02_defgetmem.py: PASS > -------------------------------------------------------------------- > Memory - 03_mem_gi_errs.py: PASS > -------------------------------------------------------------------- > NetworkPort - 01_netport.py: PASS > -------------------------------------------------------------------- > NetworkPort - 02_np_gi_errors.py: PASS > -------------------------------------------------------------------- > NetworkPort - 03_user_netport.py: SKIP > -------------------------------------------------------------------- > Processor - 01_processor.py: PASS > -------------------------------------------------------------------- > Processor - 02_definesys_get_procs.py: PASS > -------------------------------------------------------------------- > Processor - 03_proc_gi_errs.py: PASS > -------------------------------------------------------------------- > Profile - 01_enum.py: FAIL > ERROR - Profile CIM:DSP1042-SystemVirtualization-1.0.0 is not found > ERROR - Properties check for RegisteredProfile failed > CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile > -------------------------------------------------------------------- > Profile - 02_profile_to_elec.py: FAIL > ERROR - Xen_RegisteredProfile with Virtual System Profile was not returned > CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile > -------------------------------------------------------------------- > Profile - 03_rprofile_gi_errs.py: FAIL > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: Invalid InstanceID Key Value.------ > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: Invalid InstanceID Key Name.------ > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > Traceback (most recent call last): > File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit > msg = self.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format > return fmt.format(record) > File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format > record.message = record.getMessage() > File "/usr/lib64/python2.4/logging/__init__.py", line 276, in getMessage > msg = msg % self.args > TypeError: not enough arguments for format string > ERROR - ------ FAILED: Invalid InstanceID Key Name.------ > -------------------------------------------------------------------- > RASD - 01_verify_rasd_fields.py: PASS > -------------------------------------------------------------------- > RASD - 02_enum.py: PASS > -------------------------------------------------------------------- > RASD - 03_rasd_errs.py: PASS > -------------------------------------------------------------------- > RASD - 04_disk_rasd_size.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: FAIL > ERROR - Xen_RegisteredProfile returned 0 Profile objects, expected atleast 5 > CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: FAIL > ERROR - Xen_RegisteredProfile returned 0 Profile objects, expected atleast 5 > CIM_ERR_INVALID_CLASS: Xen_RegisteredProfile > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > -------------------------------------------------------------------- > ResourcePool - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePool - 02_rp_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 02_reverse.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 03_sds_fwd_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 04_sds_rev_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS > -------------------------------------------------------------------- > SystemDevice - 01_forward.py: PASS > -------------------------------------------------------------------- > SystemDevice - 02_reverse.py: PASS > -------------------------------------------------------------------- > SystemDevice - 03_fwderrs.py: PASS > -------------------------------------------------------------------- > VSSD - 01_enum.py: PASS > -------------------------------------------------------------------- > VSSD - 02_bootldr.py: SKIP > -------------------------------------------------------------------- > VSSD - 03_vssd_gi_errs.py: PASS > -------------------------------------------------------------------- > VSSD - 04_vssd_to_rasd.py: FAIL > ERROR - Xen_VirtualSystemSettingData with VSSDC_dom was not returned > ERROR - Xen_VirtualSystemSettingData returned 0 VSSD objects, expected only 1 > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: FAIL > ERROR - Error invoking AddRS: add_disk_res > ERROR - (1, u"CIM_ERR_FAILED: Unknown system `rstest_domain'") > InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unknown system `rstest_domain' > -------------------------------------------------------------------- > VirtualSystemManagementService - 07_addresource_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 09_procrasd_persist.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 10_hv_version.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 11_define_memrasdunits.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 12_referenced_config.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 01_migratable_host.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 02_host_migrate_type.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 01_forward.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 02_reverse.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS > -------------------------------------------------------------------- > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Thu Aug 28 09:35:46 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 28 Aug 2008 15:05:46 +0530 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Aug 28 2008 Message-ID: <48B67172.7020300@linux.vnet.ibm.com> ================================================= KVM on Pegasus Test Run Summary for Aug 28 2008 ================================================= Distro: Fedora release 8.92 (Rawhide) Kernel: 2.6.25-0.121.rc5.git4.fc9 libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 674 Libvirt-cim changeset: a8130304d2f2 ================================================= FAIL : 0 XFAIL : 2 SKIP : 4 PASS : 129 ----------------- Total : 135 ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: PASS -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- From kaitlin at linux.vnet.ibm.com Thu Aug 28 15:09:13 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 28 Aug 2008 08:09:13 -0700 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Aug 28 2008 In-Reply-To: <48B669B2.4010003@linux.vnet.ibm.com> References: <200808280646.m7S6ki4e006977@d23av04.au.ibm.com> <48B669B2.4010003@linux.vnet.ibm.com> Message-ID: <48B6BF99.4070307@linux.vnet.ibm.com> > All the above tc failed since the RegisteredProfile , > ElementConformsToProfile and ReferencedProfile were not registered in > the interop namespace. > I registered the above classes manually by running : > sh provider-register.sh -v -t pegasus -n root/interop -r > schema/RegisteredProfile.registration > schema/ElementConformsToProfile.registration > schema/ReferencedProfile.registration -m schema/ComputerSystem.mof > schema/HostSystem.mof schema/RegisteredProfile.mof > schema/ElementConformsToProfile.mof schema/ReferencedProfile.mof I'd thought this issue was fixed. Did you run a make preinstall before running make install && make postinstall? >> -------------------------------------------------------------------- >> ElementConforms - 03_ectp_fwd_errs.py: FAIL >> Traceback (most recent call last): >> File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit >> msg = self.format(record) >> File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format >> return fmt.format(record) >> File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format >> record.message = record.getMessage() >> File "/usr/lib64/python2.4/logging/__init__.py", line 276, in >> -------------------------------------------------------------------- >> Profile - 03_rprofile_gi_errs.py: FAIL >> Traceback (most recent call last): >> File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit >> msg = self.format(record) >> File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format >> return fmt.format(record) >> File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format >> record.message = record.getMessage() >> File "/usr/lib64/python2.4/logging/__init__.py", line 276, in >> getMessage Even if these tests fail, they shouldn't dump Python messages like this. Do you know if these tests aren't trapping an exception of some sort properly? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Aug 28 20:57:23 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 28 Aug 2008 13:57:23 -0700 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Aug 27 2008 with sblim-cmpi-base provider In-Reply-To: <48B4E2D8.9050203@linux.vnet.ibm.com> (Deepti B. Kalakeri's message of "Wed, 27 Aug 2008 10:45:04 +0530") References: <48B4E2D8.9050203@linux.vnet.ibm.com> Message-ID: <873akoc0y4.fsf@caffeine.beaverton.ibm.com> DK> Restarting the cimserver should help reflect the revision no. Even DK> if this does not help, then do a make clean and then a make and then DK> install the bits. Also make sure you don't have any stale provider .so files in /usr/local/lib/cmpi or the like. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Thu Aug 28 21:09:06 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 28 Aug 2008 14:09:06 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Move libvirt-cim specific bits from lib/CimTest/Globals.py to XenKvmLib In-Reply-To: Message-ID: <187c2bd619db911505c1.1219957746@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1219718483 25200 # Node ID 187c2bd619db911505c1e5460050e6dc47dab180 # Parent a9978826a31d881a7fcaa2ca277a44322511a624 [TEST] Move libvirt-cim specific bits from lib/CimTest/Globals.py to XenKvmLib. The main libraries for cimtest should be libvirt-cim independent. Once all tests are converted, follow up with a patch to remove the libvirt-cim specific pieces from Globals.py Signed-off-by: Kaitlin Rupert diff -r a9978826a31d -r 187c2bd619db suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Mon Aug 25 19:41:23 2008 -0700 @@ -20,10 +20,16 @@ import os import platform +import traceback +from optparse import OptionParser from VirtLib.live import fv_cap from CimTest.Globals import CIM_IP from pywbem import WBEMConnection from XenKvmLib.classes import get_typed_class + +platform_sup = ["Xen", "KVM", "XenFV"] + +VIRSH_ERROR_DEFINE = "Failed to define a domain with the name %s from virsh" # vxml.NetXML default_bridge_name = 'testbridge' @@ -80,6 +86,42 @@ LXC_default_source = '/tmp/lxc_files' LXC_default_mac = '11:22:33:aa:bb:cc' +parser = OptionParser() +parser.add_option("-i", "--ip", dest="ip", default="localhost", + help="IP address of machine to test, default: localhost") +parser.add_option("-v", "--virt", dest="virt", type="choice", + choices=['Xen', 'KVM', 'XenFV', 'LXC'], default="Xen", + help="Virt type, select from: 'Xen' & 'KVM' & 'XenFV' & 'LXC', default: Xen") +parser.add_option("-d", "--debug-output", action="store_true", dest="debug", + help="Duplicate the output to stderr") + + +def do_main(types=['Xen'], p=parser): + def do_type(f): + import sys + from ReturnCodes import SKIP, FAIL + (options, args) = p.parse_args() + if options.virt not in types: + return lambda:SKIP + else: + def do_try(): + try: + log_param() + from VirtLib.utils import setup_ssh_key + from XenKvmLib.test_doms import destroy_and_undefine_all + setup_ssh_key() + destroy_and_undefine_all(options.ip, options.virt) + rc = f() + except Exception, e: + logger.error('%s : %s' % (e.__class__.__name__, e)) + logger.error("%s" % traceback.print_exc()) + rc = FAIL + return rc + setattr(do_try, 'options', options) + return do_try + return do_type + + def get_provider_version(virt, ip): conn = WBEMConnection('http://%s' % ip, (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), From kaitlin at linux.vnet.ibm.com Thu Aug 28 21:09:05 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 28 Aug 2008 14:09:05 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Clean up Globals.py Message-ID: More cleanup patches related to this change to follow. From kaitlin at linux.vnet.ibm.com Thu Aug 28 21:09:07 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 28 Aug 2008 14:09:07 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Update AC and CS tests to use do_main from const.py In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1219957645 25200 # Node ID ebbc54d7a01db890ce35054bab15d7ee4de9df5b # Parent 187c2bd619db911505c1e5460050e6dc47dab180 [TEST] Update AC and CS tests to use do_main from const.py Signed-off-by: Kaitlin Rupert diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Thu Aug 28 14:07:25 2008 -0700 @@ -28,8 +28,8 @@ import sys from VirtLib.live import virsh_version from XenKvmLib import enumclass -from CimTest.Globals import do_main -from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, platform_sup +from XenKvmLib.const import do_main, platform_sup +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Thu Aug 28 14:07:25 2008 -0700 @@ -60,7 +60,7 @@ from VirtLib.live import net_list from XenKvmLib.test_xml import netxml from XenKvmLib.test_doms import create_vnet -from CimTest.Globals import do_main, platform_sup +from XenKvmLib.const import do_main, platform_sup from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import cleanup_restore, test_dpath, \ create_diskpool_file diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Thu Aug 28 14:07:25 2008 -0700 @@ -23,7 +23,7 @@ # import sys -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib import computersystem from VirtLib import live from VirtLib import utils diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Thu Aug 28 14:07:25 2008 -0700 @@ -28,7 +28,7 @@ from VirtLib import live from VirtLib import utils from CimTest.Globals import logger, CIM_ERROR_ENUMERATE -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP sup_types = ['KVM', 'LXC'] diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Thu Aug 28 14:07:25 2008 -0700 @@ -32,7 +32,7 @@ from XenKvmLib.classes import get_typed_class from VirtLib import utils from CimTest import Globals -from CimTest.Globals import do_main +from XenKvmLib.const import do_main, VIRSH_ERROR_DEFINE from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -46,7 +46,7 @@ cxml = vxml.get_class(options.virt)(test_dom) rc = cxml.define(options.ip) if not rc: - Globals.logger.error(Globals.VIRSH_ERROR_DEFINE % test_dom) + Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom) return status try: diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Thu Aug 28 14:07:25 2008 -0700 @@ -35,7 +35,7 @@ from XenKvmLib import computersystem from CimTest import Globals from XenKvmLib.classes import get_typed_class -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Thu Aug 28 14:07:25 2008 -0700 @@ -46,7 +46,7 @@ from XenKvmLib import vxml from VirtLib import utils from CimTest.Globals import logger -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.common_util import call_request_state_change from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Thu Aug 28 14:07:25 2008 -0700 @@ -46,7 +46,7 @@ from VirtLib import utils from XenKvmLib.test_doms import destroy_and_undefine_all from CimTest.Globals import logger -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.common_util import call_request_state_change, \ poll_for_state_change from CimTest.ReturnCodes import PASS, FAIL diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Thu Aug 28 14:07:25 2008 -0700 @@ -33,7 +33,8 @@ from VirtLib import utils from XenKvmLib import vxml from XenKvmLib.test_doms import destroy_and_undefine_domain -from CimTest.Globals import do_main, logger +from CimTest.Globals import logger +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import create_using_definesystem, \ call_request_state_change, get_cs_instance diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/23_suspend_suspend.py Thu Aug 28 14:07:25 2008 -0700 @@ -41,7 +41,8 @@ import sys import pywbem from VirtLib import utils -from CimTest.Globals import do_main, logger +from CimTest.Globals import logger +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import create_using_definesystem, \ diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Thu Aug 28 14:07:25 2008 -0700 @@ -39,7 +39,8 @@ import sys import pywbem from VirtLib import utils -from CimTest.Globals import do_main, logger +from CimTest.Globals import logger +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import try_request_state_change, \ diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Thu Aug 28 14:07:25 2008 -0700 @@ -40,7 +40,8 @@ import sys from VirtLib import utils -from CimTest.Globals import do_main, logger +from CimTest.Globals import logger +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import create_using_definesystem, \ diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Thu Aug 28 14:07:25 2008 -0700 @@ -43,7 +43,8 @@ import sys import pywbem from VirtLib import utils -from CimTest.Globals import do_main, logger +from CimTest.Globals import logger +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import create_using_definesystem, \ diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Thu Aug 28 14:07:25 2008 -0700 @@ -41,7 +41,8 @@ import sys from VirtLib import utils -from CimTest.Globals import do_main, logger +from CimTest.Globals import logger +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import get_cs_instance, create_using_definesystem, \ diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Thu Aug 28 14:07:25 2008 -0700 @@ -39,7 +39,7 @@ from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.common_util import * from CimTest.Globals import logger -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'KVM', 'XenFV'] diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Thu Aug 28 14:07:25 2008 -0700 @@ -65,7 +65,7 @@ from XenKvmLib.assoc import Associators, AssociatorNames from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ CIM_ERROR_ASSOCIATORS -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib import rasd from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py Thu Aug 28 14:07:25 2008 -0700 @@ -79,8 +79,8 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import try_getinstance from CimTest.ReturnCodes import PASS, FAIL -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, VIRSH_ERROR_DEFINE -from CimTest.Globals import do_main +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS +from XenKvmLib.const import do_main, VIRSH_ERROR_DEFINE sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Aug 28 14:07:25 2008 -0700 @@ -99,13 +99,14 @@ def do_main(types=['Xen'], p=parser): def do_type(f): import sys - from ReturnCodes import SKIP, FAIL + from CimTest.ReturnCodes import SKIP, FAIL (options, args) = p.parse_args() if options.virt not in types: return lambda:SKIP else: def do_try(): try: + from CimTest.Globals import logger, log_param log_param() from VirtLib.utils import setup_ssh_key from XenKvmLib.test_doms import destroy_and_undefine_all diff -r 187c2bd619db -r ebbc54d7a01d suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Mon Aug 25 19:41:23 2008 -0700 +++ b/suites/libvirt-cim/main.py Thu Aug 28 14:07:25 2008 -0700 @@ -29,13 +29,12 @@ import TestSuite import commands from VirtLib import groups -from CimTest.Globals import platform_sup import ConfigParser sys.path.append('./lib') +from XenKvmLib.const import platform_sup, default_network_name from XenKvmLib.reporting import gen_report, send_report from VirtLib import utils from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib import const from XenKvmLib.common_util import create_netpool_conf, destroy_netpool parser = OptionParser() @@ -127,17 +126,17 @@ def setup_env(ip, virt): status, netpool = create_netpool_conf(ip, virt, - net_name=const.default_network_name) + net_name=default_network_name) if status != PASS: - print "\nUnable to create network pool %s" % const.default_network_name + print "\nUnable to create network pool %s" % default_network_name return status return PASS def cleanup_env(ip, virt): - status = destroy_netpool(ip, virt, const.default_network_name) + status = destroy_netpool(ip, virt, default_network_name) if status != PASS: - print "Unable to destroy network pool %s." % const.default_network_name + print "Unable to destroy network pool %s." % default_network_name return status return PASS From yunguol at cn.ibm.com Fri Aug 29 04:37:17 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 28 Aug 2008 21:37:17 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Add HRP.01~04 to support disk and net pool, user default or return name instead of hard code Message-ID: <10fde478001991f40209.1219984637@elm3b41.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1219984629 25200 # Node ID 10fde478001991f40209fb6e18aca5231c41cc14 # Parent a9978826a31d881a7fcaa2ca277a44322511a624 [TEST]#2 Add HRP.01~04 to support disk and net pool, user default or return name instead of hard code Signed-off-by: Guolian Yun diff -r a9978826a31d -r 10fde4780019 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Thu Aug 28 21:37:09 2008 -0700 @@ -26,17 +26,25 @@ import sys from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.const import default_network_name from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import do_main from XenKvmLib.classes import get_typed_class +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) def main(): options = main.options status = FAIL + + status, dpool_name = create_diskpool_conf(options.ip, options.virt) + if status != PASS: + logger.error("Failed to create diskpool") + return FAIL + keys = ['Name', 'CreationClassName'] try: host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] @@ -70,6 +78,13 @@ status = PASS if cname.find("ProcessorPool") >=0 and items['InstanceID'] == "ProcessorPool/0": status = PASS + if cname.find("NetworkPool") >=0 and \ + items['InstanceID'] == "NetworkPool/%s" %default_network_name: + status = PASS + if cname.find("DiskPool") >=0 and items['InstanceID'] == "DiskPool/%s" %dpool_name: + status = PASS + + cleanup_restore(options.ip, options.virt) return status if __name__ == "__main__": diff -r a9978826a31d -r 10fde4780019 suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Thu Aug 28 21:37:09 2008 -0700 @@ -25,17 +25,25 @@ import sys from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.const import default_network_name from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import do_main from XenKvmLib.classes import get_typed_class +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf sup_types=['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) def main(): options = main.options status = PASS + + status, dpool_name = create_diskpool_conf(options.ip, options.virt) + if status != PASS: + logger.error("Failed to create diskpool") + return FAIL + keys = ['Name', 'CreationClassName'] try: host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] @@ -46,7 +54,14 @@ assoc_cn = get_typed_class(options.virt, "HostedResourcePool") proc_cn = get_typed_class(options.virt, "ProcessorPool") mem_cn = get_typed_class(options.virt, "MemoryPool") - poollist = { mem_cn : "MemoryPool/0", proc_cn : "ProcessorPool/0"} + net_cn = get_typed_class(options.virt, "NetworkPool") + disk_cn = get_typed_class(options.virt, "DiskPool") + poollist = { + mem_cn : "MemoryPool/0", + proc_cn : "ProcessorPool/0", + net_cn : "NetworkPool/%s" %default_network_name, + disk_cn : "DiskPool/%s" %dpool_name + } for k, v in poollist.items(): try: @@ -64,6 +79,7 @@ status = FAIL if status != PASS: break + cleanup_restore(options.ip, options.virt) return status if __name__ == "__main__": sys.exit(main()) diff -r a9978826a31d -r 10fde4780019 suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Thu Aug 28 21:37:09 2008 -0700 @@ -24,12 +24,14 @@ import sys import pywbem from XenKvmLib import assoc +from XenKvmLib.const import default_network_name from XenKvmLib.common_util import try_assoc from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS from CimTest.Globals import do_main from XenKvmLib.classes import get_typed_class +from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] expr_values = { @@ -48,14 +50,26 @@ options = main.options status = PASS + status, dpool_name = create_diskpool_conf(options.ip, options.virt) + if status != PASS: + logger.error("Failed to create diskpool") + return FAIL + assoc_classname = get_typed_class(options.virt, "HostedResourcePool") proc_cn = get_typed_class(options.virt, "ProcessorPool") mem_cn = get_typed_class(options.virt, "MemoryPool") + net_cn = get_typed_class(options.virt, "NetworkPool") + disk_cn = get_typed_class(options.virt, "DiskPool") conn = assoc.myWBEMConnection('http://%s' % options.ip, (Globals.CIM_USER, Globals.CIM_PASS), Globals.CIM_NS) - poollist = {mem_cn : "MemoryPool/0", proc_cn : "ProcessorPool/0"} + poollist = { + mem_cn : "MemoryPool/0", + proc_cn : "ProcessorPool/0", + net_cn : "NetworkPool/%s" %default_network_name, + disk_cn : "DiskPool/%s" %dpool_name + } for k, v in poollist.items(): keys = { "Wrong" : v} ret = try_assoc(conn, k, assoc_classname, keys, "InstanceID", \ @@ -73,6 +87,7 @@ logger.error("------ FAILED: Invalid Name Key Value.------") status = ret + cleanup_restore(options.ip, options.virt) return status if __name__ == "__main__": sys.exit(main()) From yunguol at cn.ibm.com Fri Aug 29 04:35:10 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 29 Aug 2008 12:35:10 +0800 Subject: [Libvirt-cim] [PATCH 0 of 2] Clean up Globals.py In-Reply-To: Message-ID: +1 from me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2008-08-29 05:09:05: > More cleanup patches related to this change to follow. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Fri Aug 29 04:52:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 29 Aug 2008 10:22:09 +0530 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Aug 28 2008 In-Reply-To: <48B6BF99.4070307@linux.vnet.ibm.com> References: <200808280646.m7S6ki4e006977@d23av04.au.ibm.com> <48B669B2.4010003@linux.vnet.ibm.com> <48B6BF99.4070307@linux.vnet.ibm.com> Message-ID: <48B78079.2060006@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> All the above tc failed since the RegisteredProfile , >> ElementConformsToProfile and ReferencedProfile were not registered >> in the interop namespace. >> I registered the above classes manually by running : >> sh provider-register.sh -v -t pegasus -n root/interop -r >> schema/RegisteredProfile.registration >> schema/ElementConformsToProfile.registration >> schema/ReferencedProfile.registration -m schema/ComputerSystem.mof >> schema/HostSystem.mof schema/RegisteredProfile.mof >> schema/ElementConformsToProfile.mof schema/ReferencedProfile.mof > > I'd thought this issue was fixed. Did you run a make preinstall > before running make install && make postinstall? Yes, I did a make preuninstall before the make postinstall. > >>> -------------------------------------------------------------------- >>> ElementConforms - 03_ectp_fwd_errs.py: FAIL >>> Traceback (most recent call last): >>> File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit >>> msg = self.format(record) >>> File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format >>> return fmt.format(record) >>> File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format >>> record.message = record.getMessage() >>> File "/usr/lib64/python2.4/logging/__init__.py", line 276, in > > >>> -------------------------------------------------------------------- >>> Profile - 03_rprofile_gi_errs.py: FAIL >>> Traceback (most recent call last): >>> File "/usr/lib64/python2.4/logging/__init__.py", line 731, in emit >>> msg = self.format(record) >>> File "/usr/lib64/python2.4/logging/__init__.py", line 617, in format >>> return fmt.format(record) >>> File "/usr/lib64/python2.4/logging/__init__.py", line 405, in format >>> record.message = record.getMessage() >>> File "/usr/lib64/python2.4/logging/__init__.py", line 276, in >>> getMessage > > Even if these tests fail, they shouldn't dump Python messages like > this. Do you know if these tests aren't trapping an exception of some > sort properly? I will look into this. Thanks and Regards, Deepti. From yunguol at cn.ibm.com Fri Aug 29 05:08:56 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 28 Aug 2008 22:08:56 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Use enumclass.py to cover computersystem.py behavior and update CS tests Message-ID: # HG changeset patch # User Guolian Yun # Date 1219986526 25200 # Node ID a10801bed98fb176effa2ccc9eb3fe3765a1ea14 # Parent a9978826a31d881a7fcaa2ca277a44322511a624 [TEST] Use enumclass.py to cover computersystem.py behavior and update CS tests More update patches related to this change to follow, and at last remove computersystem.py Signed-off-by: Guolian Yun diff -r a9978826a31d -r a10801bed98f suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Thu Aug 28 22:08:46 2008 -0700 @@ -24,7 +24,7 @@ import sys from CimTest.Globals import do_main -from XenKvmLib import computersystem +from XenKvmLib import enumclass from VirtLib import live from VirtLib import utils from CimTest import Globals @@ -36,9 +36,10 @@ def main(): options = main.options status = PASS - + + keys = ['Name', 'CreationClassName'] try: - cs = computersystem.enumerate(options.ip, options.virt) + cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) live_cs = live.domain_list(options.ip, options.virt) for system in cs: name = system.name diff -r a9978826a31d -r a10801bed98f suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Thu Aug 28 22:08:46 2008 -0700 @@ -24,7 +24,7 @@ import sys import pywbem -from XenKvmLib import computersystem +from XenKvmLib import enumclass from VirtLib import live from VirtLib import utils from CimTest.Globals import logger, CIM_ERROR_ENUMERATE @@ -49,9 +49,9 @@ return SKIP cn = "%s_ComputerSystem" % options.virt - + keys = ['Name', 'CreationClassName'] try: - cs = computersystem.enumerate(options.ip, options.virt) + cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) except Exception, details: logger.error(CIM_ERROR_ENUMERATE, cn) diff -r a9978826a31d -r a10801bed98f suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Thu Aug 28 22:08:46 2008 -0700 @@ -27,7 +27,7 @@ # 26-Sep-2007 import sys -from XenKvmLib import computersystem +from XenKvmLib import enumclass from XenKvmLib import vxml from XenKvmLib.classes import get_typed_class from VirtLib import utils @@ -49,8 +49,9 @@ Globals.logger.error(Globals.VIRSH_ERROR_DEFINE % test_dom) return status + keys = ['Name', 'CreationClassName'] try: - cs = computersystem.enumerate(options.ip, options.virt) + cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) if len(cs) == 0: raise Exception('No cs instance returned') for dom in cs: diff -r a9978826a31d -r a10801bed98f suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Thu Aug 28 22:08:46 2008 -0700 @@ -32,7 +32,7 @@ import sys from time import sleep from XenKvmLib import vxml -from XenKvmLib import computersystem +from XenKvmLib import enumclass from CimTest import Globals from XenKvmLib.classes import get_typed_class from CimTest.Globals import do_main @@ -62,7 +62,7 @@ # otherwise. for i in range(1, (timeout + 1)): sleep(1) - cs = computersystem.get_cs_class(options.virt)(options.ip, + cs = enumclass.get_cs_class(options.virt)(options.ip, test_dom) if cs.Name != test_dom: Globals.logger.error("VS %s is not defined" % test_dom) diff -r a9978826a31d -r a10801bed98f suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Thu Aug 28 22:08:46 2008 -0700 @@ -42,7 +42,7 @@ # Date : 17-10-2007 import sys -from XenKvmLib import computersystem +from XenKvmLib import enumclass from XenKvmLib import vxml from VirtLib import utils from CimTest.Globals import logger @@ -73,7 +73,7 @@ logger.error("ERROR: VS %s was not defined" % test_dom) return status - cs = computersystem.get_cs_class(options.virt)(options.ip, test_dom) + cs = enumclass.get_cs_class(options.virt)(options.ip, test_dom) if cs.Name == test_dom: from_State = cs.EnabledState else: @@ -95,7 +95,7 @@ #Get the value of the EnabledState property and RequestedState property. try: - cs = computersystem.get_cs_class(options.virt)(options.ip, test_dom) + cs = enumclass.get_cs_class(options.virt)(options.ip, test_dom) if cs.Name == test_dom: to_RequestedState = cs.RequestedState enabledState = cs.EnabledState diff -r a9978826a31d -r a10801bed98f suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Thu Aug 28 22:08:46 2008 -0700 @@ -41,7 +41,6 @@ # Date :18-10-2007 import sys -from XenKvmLib import computersystem from XenKvmLib import vxml from VirtLib import utils from XenKvmLib.test_doms import destroy_and_undefine_all diff -r a9978826a31d -r a10801bed98f suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Thu Aug 28 22:08:46 2008 -0700 @@ -29,7 +29,6 @@ # Date: 14-12-2007 import sys -from XenKvmLib import computersystem from VirtLib import utils from XenKvmLib import vxml from XenKvmLib.test_doms import destroy_and_undefine_domain diff -r a9978826a31d -r a10801bed98f suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Thu Aug 28 22:08:46 2008 -0700 @@ -58,7 +58,6 @@ import sys from VirtLib import utils -from XenKvmLib import computersystem from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class from XenKvmLib.test_doms import destroy_and_undefine_all diff -r a9978826a31d -r a10801bed98f suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Aug 28 22:08:46 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from pywbem.cim_obj import CIMInstanceName from XenKvmLib.devices import CIM_Instance -from XenKvmLib.classes import get_typed_class +from XenKvmLib.classes import get_typed_class, virt_types from CimTest import Globals class CIM_MyClass(CIM_Instance): @@ -45,7 +45,32 @@ CIM_Instance.__init__(self, inst) + def __invoke(self, method, params): + try: + return self.conn.InvokeMethod(method, + self.ref, + **params) + except pywbem.CIMError, arg: + print 'InvokeMethod(%s): %s' % (method, arg[1]) + raise + + def __getattr__(self, attr): + if self.inst.has_key(attr): + return self.inst[attr] + else: + return CimExt._Method(self.__invoke, attr) + + class CIM_System(CIM_MyClass): + pass + +class Xen_ComputerSystem(CIM_System): + pass + +class KVM_ComputerSystem(CIM_System): + pass + +class LXC_ComputerSystem(CIM_System): pass class CIM_AllocationCapabilities(CIM_MyClass): @@ -357,3 +382,12 @@ return None return inst + +def get_cs_class(virt): + if virt in virt_types: + return eval(get_typed_class(virt, 'ComputerSystem')) + +def system_of(server, iname): + t = eval(iname["CreationClassName"]) + + return t(server, iname["Name"]) From deeptik at linux.vnet.ibm.com Fri Aug 29 05:10:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 29 Aug 2008 10:40:09 +0530 Subject: [Libvirt-cim] Build error on with the librvirt-cim provider Message-ID: <48B784B1.2030302@linux.vnet.ibm.com> Hi, I notice the following errors for postinstall with the new libvirt-cim providers: 1) device_parsing.c: In function '_change_device': device_parsing.c:943: warning: assignment from incompatible pointer type device_parsing.c:945: warning: assignment from incompatible pointer type make[3]: *** [device_parsing.lo] Error 1 make[3]: Leaving directory `/usr/src/deepti/libvirt-cim/libxkutil' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/usr/src/deepti/libvirt-cim/libxkutil' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/src/deepti/libvirt-cim' make: *** [all] Error 2 I continue to see the above errors, and I use --diable-werror to supress this. When can we expect this to be resolved? 2) Registering providers with active cimserver Warning: CIMMethod MigrateVirtualSystemToHost already exists for CIMClass CIM_VirtualSystemMigrationService Parsing error: parse error: Error adding an instance: CIM_ERR_FAILED: A provider is already registered for the specified capability. make: *** [postinstall] Error 250 The above error according to me was beacuse there were two enteries with the MigrateVirtualSystemToHost() function name in the mof file. uint32 MigrateVirtualSystemToHost( [In] CIM_ComputerSystem REF ComputerSystem, [In] string DestinationHost, [In, EmbeddedInstance("CIM_SettingData")] string MigrationSettingData, [In, EmbeddedInstance("CIM_VirtualSystemSettingData")] string NewSystemSettingData, [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")] string NewResourceSettingData[], [Out] CIM_ConcreteJob REF Job ); uint32 MigrateVirtualSystemToHost( [In] CIM_ComputerSystem REF ComputerSystem, [In] CIM_System REF DestinationSystem, [In, EmbeddedInstance("CIM_SettingData")] string MigrationSettingData, [In, EmbeddedInstance("CIM_VirtualSystemSettingData")] string NewSystemSettingData, [In, EmbeddedInstance("CIM_ResourceAllocationSettingData")] string NewResourceSettingData[], [Out] CIM_ConcreteJob REF Job ); I verified this with the Virt_VSMigrationService.c file and I thought that the second MigrateVirtualSystemToHost() function should have been MigrateVirtualSystemToSystem(), and after making the changes the above error was resolved. Apart from this I see one last error at the end of postinstall. I used to see this error long back, which was not seen for sometime. I have not checked how I can fix this. Registering providers with active cimserver Parsing error: parse error: Error adding an instance: CIM_ERR_FAILED: A provider is already registered for the specified capability. make: *** [postinstall] Error 250 One more thing, Since the postinstall was not successful the RegisteredProfile , ElementConformsToProfile and ReferencedProfile were not registered and hence lots of tc failed.I registered these manually and they worked fine. Thanks and Regards, Deepti. From yunguol at cn.ibm.com Fri Aug 29 05:17:57 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 28 Aug 2008 22:17:57 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update commom_util.py to call from enumclass not computersystem Message-ID: <6c04dcf4211c9d244a77.1219987077@elm3b41.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1219987072 25200 # Node ID 6c04dcf4211c9d244a77595ce207c78af7899f09 # Parent a9978826a31d881a7fcaa2ca277a44322511a624 [TEST] Update commom_util.py to call from enumclass not computersystem Signed-off-by: Guolian Yun diff -r a9978826a31d -r 6c04dcf4211c suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Aug 27 01:04:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Aug 28 22:17:52 2008 -0700 @@ -28,7 +28,7 @@ from XenKvmLib.test_xml import * from XenKvmLib.test_doms import * from XenKvmLib import vsms -from XenKvmLib import computersystem +from XenKvmLib import enumclass from XenKvmLib import enumclass from pywbem.cim_obj import CIMInstanceName from XenKvmLib.devices import CIM_Instance @@ -54,7 +54,7 @@ def get_cs_instance(domain_name, ip, virt='Xen'): cs = None try: - cs = computersystem.get_cs_class(virt)(ip, domain_name) + cs = enumclass.get_cs_class(virt)(ip, domain_name) if cs.Name != domain_name: logger.error("VS %s is not found" % domain_name) @@ -169,7 +169,7 @@ def poll_for_state_change(server, virt, dom, exp_state, timeout=30): dom_cs = None - cs = computersystem.get_cs_class(virt) + cs = enumclass.get_cs_class(virt) try: for i in range(1, (timeout + 1)): From danms at us.ibm.com Fri Aug 29 13:43:07 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 29 Aug 2008 06:43:07 -0700 Subject: [Libvirt-cim] Build error on with the librvirt-cim provider In-Reply-To: <48B784B1.2030302@linux.vnet.ibm.com> (Deepti B. Kalakeri's message of "Fri, 29 Aug 2008 10:40:09 +0530") References: <48B784B1.2030302@linux.vnet.ibm.com> Message-ID: <87y72g9btg.fsf@caffeine.beaverton.ibm.com> DK> device_parsing.c: In function '_change_device': DK> device_parsing.c:943: warning: assignment from incompatible pointer DK> type DK> device_parsing.c:945: warning: assignment from incompatible pointer DK> type DK> make[3]: *** [device_parsing.lo] Error 1 DK> make[3]: Leaving directory `/usr/src/deepti/libvirt-cim/libxkutil' DK> make[2]: *** [all-recursive] Error 1 DK> make[2]: Leaving directory `/usr/src/deepti/libvirt-cim/libxkutil' DK> make[1]: *** [all-recursive] Error 1 DK> make[1]: Leaving directory `/usr/src/deepti/libvirt-cim' DK> make: *** [all] Error 2 DK> I continue to see the above errors, and I use --diable-werror to DK> supress this. When can we expect this to be resolved? You're on RHEL5.2ish, right? The libvirt-0.3.3 in RHEL has been patched to fix a bug, but the version number was not updated. In the code, we alter our expected definition of a libvirt function based on the version number to avoid this warning. However, this will always fail on RHEL 5.2. Just use --disable-werror when working on systems with a patched libvirt-0.3.3. DK> The above error according to me was beacuse there were two enteries DK> with the MigrateVirtualSystemToHost() function name in the mof file. Ah yes, I noticed this the other day, but forgot to fix it. This is definitely a problem, but I'm confused about why it is fatal for you. I get a warning, but the registration process proceeds. DK> Registering providers with active cimserver Parsing error: parse DK> error: Error adding an instance: CIM_ERR_FAILED: A provider is DK> already registered for the specified capability. make: *** DK> [postinstall] Error 250 This may be caused by some cruft in your repository. You might try nuking our namespace and trying again. To do that, do something like: rm -Rf /usr/lib64/Pegasus/repository/root\#virt -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From danms at us.ibm.com Fri Aug 29 14:44:54 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 29 Aug 2008 07:44:54 -0700 Subject: [Libvirt-cim] [PATCH] Fix VSMigrationService schema to remove duplicate method name Message-ID: # HG changeset patch # User Dan Smith # Date 1220021032 25200 # Node ID e2c21aedef202a43dfc29f64d4849589ca581292 # Parent a8130304d2f225657fd8c58c0eedb5d0eea37b7f Fix VSMigrationService schema to remove duplicate method name Signed-off-by: Dan Smith diff -r a8130304d2f2 -r e2c21aedef20 schema/VSMigrationService.mof --- a/schema/VSMigrationService.mof Fri Aug 22 10:50:48 2008 -0700 +++ b/schema/VSMigrationService.mof Fri Aug 29 07:43:52 2008 -0700 @@ -49,7 +49,7 @@ CIM_ConcreteJob REF Job ); - uint32 MigrateVirtualSystemToHost( + uint32 MigrateVirtualSystemToSystem( [In] CIM_ComputerSystem REF ComputerSystem, [In] From danms at us.ibm.com Fri Aug 29 15:17:10 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 29 Aug 2008 08:17:10 -0700 Subject: [Libvirt-cim] [PATCH] Fix ConcreteComponent schema Message-ID: <2db1158cea318cfee11a.1220023030@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1220023016 25200 # Node ID 2db1158cea318cfee11a77724c97a0b4758ffb2c # Parent e2c21aedef202a43dfc29f64d4849589ca581292 Fix ConcreteComponent schema The registration file mentions KVM_ twice instead of LXC. This was causing pegasus to complain on postinstall, but *only* if the CIMOM was running at the time. If it was not running, it didn't complain. Signed-off-by: Dan Smith diff -r e2c21aedef20 -r 2db1158cea31 schema/ConcreteComponent.registration --- a/schema/ConcreteComponent.registration Fri Aug 29 07:43:52 2008 -0700 +++ b/schema/ConcreteComponent.registration Fri Aug 29 08:16:56 2008 -0700 @@ -2,4 +2,4 @@ # Classname Namespace ProviderName ProviderModule ProviderTypes Xen_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association KVM_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association -KVM_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association +LXC_ConcreteComponent root/virt Virt_ConcreteComponent Virt_ConcreteComponent association From kaitlin at linux.vnet.ibm.com Fri Aug 29 15:14:25 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 08:14:25 -0700 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Aug 28 2008 In-Reply-To: <48B78079.2060006@linux.vnet.ibm.com> References: <200808280646.m7S6ki4e006977@d23av04.au.ibm.com> <48B669B2.4010003@linux.vnet.ibm.com> <48B6BF99.4070307@linux.vnet.ibm.com> <48B78079.2060006@linux.vnet.ibm.com> Message-ID: <48B81251.5080407@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Kaitlin Rupert wrote: >>> All the above tc failed since the RegisteredProfile , >>> ElementConformsToProfile and ReferencedProfile were not registered >>> in the interop namespace. >>> I registered the above classes manually by running : >>> sh provider-register.sh -v -t pegasus -n root/interop -r >>> schema/RegisteredProfile.registration >>> schema/ElementConformsToProfile.registration >>> schema/ReferencedProfile.registration -m schema/ComputerSystem.mof >>> schema/HostSystem.mof schema/RegisteredProfile.mof >>> schema/ElementConformsToProfile.mof schema/ReferencedProfile.mof >> >> I'd thought this issue was fixed. Did you run a make preinstall >> before running make install && make postinstall? > Yes, I did a make preuninstall before the make postinstall. make preinstall is a different target than make preuninstall. make preinstall should register the base schema. It's interesting you're not seeing errors regarding the registration of the interop providers. So it's probably likely that the base schema is registered properly and you're hitting some other kind of issue. I'll see if I can reproduce this. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Aug 29 15:26:03 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 08:26:03 -0700 Subject: [Libvirt-cim] [PATCH] Fix VSMigrationService schema to remove duplicate method name In-Reply-To: References: Message-ID: <48B8150B.8030805@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1220021032 25200 > # Node ID e2c21aedef202a43dfc29f64d4849589ca581292 > # Parent a8130304d2f225657fd8c58c0eedb5d0eea37b7f > Fix VSMigrationService schema to remove duplicate method name > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Aug 29 16:03:14 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 09:03:14 -0700 Subject: [Libvirt-cim] [PATCH] Fix ConcreteComponent schema In-Reply-To: <2db1158cea318cfee11a.1220023030@guaranine.danplanet.com> References: <2db1158cea318cfee11a.1220023030@guaranine.danplanet.com> Message-ID: <48B81DC2.9070800@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1220023016 25200 > # Node ID 2db1158cea318cfee11a77724c97a0b4758ffb2c > # Parent e2c21aedef202a43dfc29f64d4849589ca581292 > Fix ConcreteComponent schema > > The registration file mentions KVM_ twice instead of LXC. This was causing > pegasus to complain on postinstall, but *only* if the CIMOM was running at > the time. If it was not running, it didn't complain. > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Aug 29 16:14:00 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 09:14:00 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Use enumclass.py to cover computersystem.py behavior and update CS tests In-Reply-To: References: Message-ID: <48B82048.9020100@linux.vnet.ibm.com> > class CIM_AllocationCapabilities(CIM_MyClass): > @@ -357,3 +382,12 @@ > return None > > return inst > + > +def get_cs_class(virt): > + if virt in virt_types: > + return eval(get_typed_class(virt, 'ComputerSystem')) This function is no longer needed. The tests can use get_typed_class for this. > + > +def system_of(server, iname): > + t = eval(iname["CreationClassName"]) > + > + return t(server, iname["Name"]) > Only one test is using this function. Instead of putting it in a library, it can be moved to the specific test case instead. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Aug 29 16:14:48 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 09:14:48 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update commom_util.py to call from enumclass not computersystem In-Reply-To: <6c04dcf4211c9d244a77.1219987077@elm3b41.beaverton.ibm.com> References: <6c04dcf4211c9d244a77.1219987077@elm3b41.beaverton.ibm.com> Message-ID: <48B82078.5050005@linux.vnet.ibm.com> > @@ -54,7 +54,7 @@ > def get_cs_instance(domain_name, ip, virt='Xen'): > cs = None > try: > - cs = computersystem.get_cs_class(virt)(ip, domain_name) > + cs = enumclass.get_cs_class(virt)(ip, domain_name) > > if cs.Name != domain_name: > logger.error("VS %s is not found" % domain_name) > @@ -169,7 +169,7 @@ > > def poll_for_state_change(server, virt, dom, exp_state, timeout=30): > dom_cs = None > - cs = computersystem.get_cs_class(virt) > + cs = enumclass.get_cs_class(virt) Instead of get_cs_class(), I'd use get_typed_class() and remove get_cs_class(). -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Aug 29 20:26:41 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 13:26:41 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] Update test cases to use do_main from const.py Message-ID: From kaitlin at linux.vnet.ibm.com Fri Aug 29 20:26:44 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 13:26:44 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] [TEST] Update ESD, ELEC, and HD to use do_main from const.py In-Reply-To: Message-ID: <8c056f2d614a9bf26ed8.1220041604@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1220041564 25200 # Node ID 8c056f2d614a9bf26ed8154a7a355f9c9551ab22 # Parent d722b79c405442082ccd02dbf1e50f0542a3344b [TEST] Update ESD, ELEC, and HD to use do_main from const.py Signed-off-by: Kaitlin Rupert diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri Aug 29 13:25:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri Aug 29 13:26:04 2008 -0700 @@ -52,10 +52,10 @@ from XenKvmLib.enumclass import getInstance from XenKvmLib.assoc import Associators, compare_all_prop from XenKvmLib.classes import get_typed_class -from CimTest.Globals import do_main, logger, CIM_ERROR_ASSOCIATORS +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.vxml import get_class -from XenKvmLib import const +from XenKvmLib.const import do_main sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py --- a/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Fri Aug 29 13:25:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Fri Aug 29 13:26:04 2008 -0700 @@ -55,7 +55,7 @@ from XenKvmLib import assoc from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ CIM_ERROR_ASSOCIATORS -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.common_util import try_assoc from XenKvmLib.classes import get_typed_class from CimTest.ReturnCodes import PASS, FAIL diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri Aug 29 13:25:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri Aug 29 13:26:04 2008 -0700 @@ -25,7 +25,7 @@ from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest import Globals -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from VirtLib import live from VirtLib import utils diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py Fri Aug 29 13:25:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py Fri Aug 29 13:26:04 2008 -0700 @@ -56,7 +56,8 @@ from XenKvmLib.vxml import XenXML, KVMXML, get_class from XenKvmLib.classes import get_typed_class from CimTest.ReturnCodes import PASS, FAIL -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS +from XenKvmLib.const import do_main sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/HostedDependency/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Aug 29 13:25:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Aug 29 13:26:04 2008 -0700 @@ -52,7 +52,7 @@ from XenKvmLib import enumclass from XenKvmLib.classes import get_class_basename from CimTest import Globals -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Aug 29 13:25:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Aug 29 13:26:04 2008 -0700 @@ -47,7 +47,8 @@ from XenKvmLib import computersystem from XenKvmLib import assoc from XenKvmLib.classes import get_class_basename -from CimTest.Globals import logger, do_main +from CimTest.Globals import logger +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py --- a/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Fri Aug 29 13:25:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Fri Aug 29 13:26:04 2008 -0700 @@ -40,7 +40,7 @@ from XenKvmLib.classes import get_class_basename from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, \ CIM_ERROR_GETINSTANCE -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.devices import CIM_Instance from CimTest.ReturnCodes import PASS, FAIL diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Fri Aug 29 13:25:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Fri Aug 29 13:26:04 2008 -0700 @@ -33,7 +33,7 @@ from XenKvmLib import assoc from XenKvmLib import vxml from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import get_host_info, try_assoc from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC From kaitlin at linux.vnet.ibm.com Fri Aug 29 20:26:42 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 13:26:42 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] [TEST] Update CSI and EAFP tests to use do_main from const.py In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1220041472 25200 # Node ID bc9a4f35b1b48b6111f12d86925c1fbec09780a0 # Parent 946fd46b96866adaab356876f9c8bbf937f0b3d6 [TEST] Update CSI and EAFP tests to use do_main from const.py Signed-off-by: Kaitlin Rupert diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py --- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Thu Aug 28 14:07:25 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Fri Aug 29 13:24:32 2008 -0700 @@ -26,7 +26,7 @@ import time from pywbem.cim_obj import CIMInstanceName from CimTest.Globals import logger -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import create_using_definesystem, \ call_request_state_change diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Thu Aug 28 14:07:25 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Fri Aug 29 13:24:32 2008 -0700 @@ -51,7 +51,8 @@ from XenKvmLib.common_util import create_diskpool_conf, cleanup_restore from XenKvmLib.classes import get_typed_class from XenKvmLib.logicaldevices import field_err -from CimTest.Globals import do_main, logger +from CimTest.Globals import logger +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Thu Aug 28 14:07:25 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Fri Aug 29 13:24:32 2008 -0700 @@ -49,7 +49,8 @@ import pywbem from XenKvmLib.assoc import Associators from XenKvmLib.vxml import get_class -from CimTest.Globals import do_main, logger, CIM_ERROR_ASSOCIATORS +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.classes import get_typed_class diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Thu Aug 28 14:07:25 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Fri Aug 29 13:24:32 2008 -0700 @@ -35,7 +35,8 @@ from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.common_util import try_assoc from CimTest.ReturnCodes import PASS, FAIL -from CimTest.Globals import do_main, platform_sup, logger +from CimTest.Globals import logger +from XenKvmLib.const import do_main, platform_sup from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import cleanup_restore, test_dpath, \ diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Thu Aug 28 14:07:25 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Fri Aug 29 13:24:32 2008 -0700 @@ -36,7 +36,7 @@ from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from CimTest.Globals import do_main, platform_sup +from XenKvmLib.const import do_main, platform_sup from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import cleanup_restore, test_dpath, \ From kaitlin at linux.vnet.ibm.com Fri Aug 29 20:26:43 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 13:26:43 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] [TEST] Update ElementCapabilities and ElementConforms to use do_main from const.py In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1220041548 25200 # Node ID d722b79c405442082ccd02dbf1e50f0542a3344b # Parent bc9a4f35b1b48b6111f12d86925c1fbec09780a0 [TEST] Update ElementCapabilities and ElementConforms to use do_main from const.py Signed-off-by: Kaitlin Rupert diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Aug 29 13:24:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Aug 29 13:25:48 2008 -0700 @@ -26,9 +26,9 @@ from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class -from CimTest import Globals -from CimTest.Globals import do_main, logger, CIM_ERROR_ASSOCIATORNAMES, \ -CIM_ERROR_ENUMERATE +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ + CIM_ERROR_ENUMERATE +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP from XenKvmLib.enumclass import enumerate @@ -113,7 +113,7 @@ Name = system, CreationClassName = ccn) except Exception: - logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % system) + logger.error(CIM_ERROR_ASSOCIATORNAMES % system) return FAIL cn = get_typed_class(virt, "EnabledLogicalElementCapabilities") if elec[0].classname != cn: diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Aug 29 13:24:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Aug 29 13:25:48 2008 -0700 @@ -29,7 +29,7 @@ from XenKvmLib import vsms from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORNAMES -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Aug 29 13:24:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Aug 29 13:25:48 2008 -0700 @@ -26,8 +26,8 @@ from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class -from CimTest import Globals -from CimTest.Globals import logger, do_main +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -37,8 +37,8 @@ def try_assoc(ref, ref_class, exp_rc, exp_desc, options): conn = assoc.myWBEMConnection('http://%s' % options.ip, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) + (CIM_USER, CIM_PASS), + CIM_NS) status = FAIL rc = -1 names = [] diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Fri Aug 29 13:24:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Fri Aug 29 13:25:48 2008 -0700 @@ -25,8 +25,8 @@ from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc from XenKvmLib.classes import get_typed_class -from CimTest import Globals -from CimTest.Globals import logger, do_main +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -36,8 +36,8 @@ def try_assoc(ref, ref_class, exp_rc, exp_desc, options): conn = assoc.myWBEMConnection('http://%s' % options.ip, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) + (CIM_USER, CIM_PASS), + CIM_NS) status = FAIL rc = -1 names = [] diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Aug 29 13:24:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Aug 29 13:25:48 2008 -0700 @@ -53,7 +53,7 @@ from XenKvmLib.common_util import get_host_info from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Aug 29 13:24:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Aug 29 13:25:48 2008 -0700 @@ -38,8 +38,9 @@ from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml -from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, do_main from CimTest import Globals +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Aug 29 13:24:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Aug 29 13:25:48 2008 -0700 @@ -42,7 +42,7 @@ from VirtLib import utils from CimTest import Globals from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib import enumclass from XenKvmLib import computersystem from XenKvmLib import assoc diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py --- a/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Fri Aug 29 13:24:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Fri Aug 29 13:25:48 2008 -0700 @@ -58,7 +58,8 @@ from XenKvmLib.classes import get_typed_class from CimTest.ReturnCodes import PASS, FAIL from CimTest import Globals -from CimTest.Globals import logger, CIM_USER, CIM_PASS, do_main +from CimTest.Globals import logger, CIM_USER, CIM_PASS +from XenKvmLib.const import do_main sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri Aug 29 13:24:32 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri Aug 29 13:25:48 2008 -0700 @@ -87,7 +87,8 @@ from XenKvmLib.common_util import try_assoc from XenKvmLib.test_doms import destroy_and_undefine_all from CimTest.ReturnCodes import PASS, FAIL -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS +from XenKvmLib.const import do_main sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] From kaitlin at linux.vnet.ibm.com Fri Aug 29 20:26:45 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 29 Aug 2008 13:26:45 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST] Update HostSystem, HostedService, and HRP to use do_main from const.py In-Reply-To: Message-ID: <90ff66d2baee23319d29.1220041605@elm3b41.beaverton.ibm.com> # HG changeset patch # User Kaitlin Rupert # Date 1220041572 25200 # Node ID 90ff66d2baee23319d29727d61fa9cf5d8f64f27 # Parent 8c056f2d614a9bf26ed8154a7a355f9c9551ab22 [TEST] Update HostSystem, HostedService, and HRP to use do_main from const.py Signed-off-by: Kaitlin Rupert diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Aug 29 13:26:12 2008 -0700 @@ -30,7 +30,8 @@ from XenKvmLib.classes import get_typed_class from VirtLib import live from VirtLib import utils -from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, do_main +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC'] diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Aug 29 13:26:12 2008 -0700 @@ -47,7 +47,7 @@ # Date : 29.01.2008 import sys -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class from XenKvmLib.test_doms import destroy_and_undefine_all diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Aug 29 13:26:12 2008 -0700 @@ -45,7 +45,8 @@ from XenKvmLib.assoc import Associators from XenKvmLib.vxml import XenXML, KVMXML, get_class from XenKvmLib.classes import get_typed_class -from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, do_main +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.test_xml import testxml from XenKvmLib.test_doms import destroy_and_undefine_all diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Aug 29 13:26:12 2008 -0700 @@ -51,7 +51,7 @@ from VirtLib import utils from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ CIM_ERROR_ASSOCIATORS -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.vxml import XenXML, KVMXML, get_class from XenKvmLib.assoc import AssociatorNames, Associators from XenKvmLib.common_util import get_host_info diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py --- a/suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py Fri Aug 29 13:26:12 2008 -0700 @@ -79,7 +79,8 @@ from XenKvmLib.classes import get_typed_class from optparse import OptionParser from CimTest.ReturnCodes import PASS, FAIL -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS +from XenKvmLib.const import do_main sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py --- a/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Aug 29 13:26:12 2008 -0700 @@ -45,7 +45,7 @@ # Date : 28.03.2008 import sys -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.classes import get_typed_class from XenKvmLib.assoc import Associators, AssociatorNames from XenKvmLib.common_util import get_host_info diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Aug 29 13:26:12 2008 -0700 @@ -30,7 +30,7 @@ from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Aug 29 13:26:12 2008 -0700 @@ -29,7 +29,7 @@ from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri Aug 29 13:26:12 2008 -0700 @@ -29,7 +29,7 @@ from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.classes import get_typed_class expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \ diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Fri Aug 29 13:26:12 2008 -0700 @@ -29,7 +29,7 @@ from CimTest import Globals from CimTest.Globals import logger from CimTest.ReturnCodes import PASS -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedService/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Aug 29 13:26:12 2008 -0700 @@ -27,7 +27,7 @@ from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest import Globals -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedService/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Fri Aug 29 13:26:12 2008 -0700 @@ -27,7 +27,7 @@ from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest import Globals -from CimTest.Globals import do_main +from XenKvmLib.const import do_main from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Fri Aug 29 13:26:12 2008 -0700 @@ -26,8 +26,9 @@ from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class -from CimTest import Globals -from CimTest.Globals import logger, do_main +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ + CIM_PASS, CIM_NS +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -43,13 +44,13 @@ try: host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) + logger.error(CIM_ERROR_ENUMERATE % host_sys.name) return FAIL conn = assoc.myWBEMConnection('http://%s' % options.ip, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) + (CIM_USER, CIM_PASS), + CIM_NS) instanceref = CIMInstanceName(get_typed_class(options.virt, "HostSystem"), keybindings = {"Wrong" : "wrong", "CreationClassName" : host_sys.CreationClassName}) diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Fri Aug 29 13:26:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Fri Aug 29 13:26:12 2008 -0700 @@ -26,8 +26,9 @@ from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class -from CimTest import Globals -from CimTest.Globals import logger, do_main +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ + CIM_PASS, CIM_NS +from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -43,7 +44,7 @@ try: host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) + logger.error(CIM_ERROR_ENUMERATE % host_sys.name) return FAIL @@ -53,8 +54,8 @@ conn = assoc.myWBEMConnection('http://%s' % options.ip, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) + (CIM_USER, CIM_PASS), + CIM_NS) for k, v in servicelist.items(): instanceref = CIMInstanceName(k, keybindings = {"Wrong" : v, From deeptik at linux.vnet.ibm.com Sun Aug 31 17:37:21 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Sun, 31 Aug 2008 23:07:21 +0530 Subject: [Libvirt-cim] [PATCH 1 of 4] [TEST] Update CSI and EAFP tests to use do_main from const.py In-Reply-To: References: Message-ID: <48BAD6D1.9060208@linux.vnet.ibm.com> +1 for me. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1220041472 25200 > # Node ID bc9a4f35b1b48b6111f12d86925c1fbec09780a0 > # Parent 946fd46b96866adaab356876f9c8bbf937f0b3d6 > [TEST] Update CSI and EAFP tests to use do_main from const.py > > Signed-off-by: Kaitlin Rupert > > diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py > --- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Thu Aug 28 14:07:25 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Fri Aug 29 13:24:32 2008 -0700 > @@ -26,7 +26,7 @@ > import time > from pywbem.cim_obj import CIMInstanceName > from CimTest.Globals import logger > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.common_util import create_using_definesystem, \ > call_request_state_change > diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Thu Aug 28 14:07:25 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Fri Aug 29 13:24:32 2008 -0700 > @@ -51,7 +51,8 @@ > from XenKvmLib.common_util import create_diskpool_conf, cleanup_restore > from XenKvmLib.classes import get_typed_class > from XenKvmLib.logicaldevices import field_err > -from CimTest.Globals import do_main, logger > +from CimTest.Globals import logger > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Thu Aug 28 14:07:25 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Fri Aug 29 13:24:32 2008 -0700 > @@ -49,7 +49,8 @@ > import pywbem > from XenKvmLib.assoc import Associators > from XenKvmLib.vxml import get_class > -from CimTest.Globals import do_main, logger, CIM_ERROR_ASSOCIATORS > +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib.classes import get_typed_class > diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py > --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Thu Aug 28 14:07:25 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Fri Aug 29 13:24:32 2008 -0700 > @@ -35,7 +35,8 @@ > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib.common_util import try_assoc > from CimTest.ReturnCodes import PASS, FAIL > -from CimTest.Globals import do_main, platform_sup, logger > +from CimTest.Globals import logger > +from XenKvmLib.const import do_main, platform_sup > from XenKvmLib.vxml import get_class > from XenKvmLib.classes import get_typed_class > from XenKvmLib.common_util import cleanup_restore, test_dpath, \ > diff -r 946fd46b9686 -r bc9a4f35b1b4 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py > --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Thu Aug 28 14:07:25 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Fri Aug 29 13:24:32 2008 -0700 > @@ -36,7 +36,7 @@ > from CimTest import Globals > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > -from CimTest.Globals import do_main, platform_sup > +from XenKvmLib.const import do_main, platform_sup > from XenKvmLib.vxml import get_class > from XenKvmLib.classes import get_typed_class > from XenKvmLib.common_util import cleanup_restore, test_dpath, \ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Sun Aug 31 17:44:06 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Sun, 31 Aug 2008 23:14:06 +0530 Subject: [Libvirt-cim] [PATCH 2 of 4] [TEST] Update ElementCapabilities and ElementConforms to use do_main from const.py In-Reply-To: References: Message-ID: <48BAD866.7020002@linux.vnet.ibm.com> +1 for me Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1220041548 25200 > # Node ID d722b79c405442082ccd02dbf1e50f0542a3344b > # Parent bc9a4f35b1b48b6111f12d86925c1fbec09780a0 > [TEST] Update ElementCapabilities and ElementConforms to use do_main from const.py > > Signed-off-by: Kaitlin Rupert > > diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Aug 29 13:24:32 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Aug 29 13:25:48 2008 -0700 > @@ -26,9 +26,9 @@ > from XenKvmLib import assoc > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > -from CimTest import Globals > -from CimTest.Globals import do_main, logger, CIM_ERROR_ASSOCIATORNAMES, \ > -CIM_ERROR_ENUMERATE > +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ > + CIM_ERROR_ENUMERATE > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, SKIP > from XenKvmLib.enumclass import enumerate > > @@ -113,7 +113,7 @@ > Name = system, > CreationClassName = ccn) > except Exception: > - logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % system) > + logger.error(CIM_ERROR_ASSOCIATORNAMES % system) > return FAIL > cn = get_typed_class(virt, "EnabledLogicalElementCapabilities") > if elec[0].classname != cn: > diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Aug 29 13:24:32 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Aug 29 13:25:48 2008 -0700 > @@ -29,7 +29,7 @@ > from XenKvmLib import vsms > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORNAMES > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, SKIP > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Aug 29 13:24:32 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Fri Aug 29 13:25:48 2008 -0700 > @@ -26,8 +26,8 @@ > from XenKvmLib import assoc > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > -from CimTest import Globals > -from CimTest.Globals import logger, do_main > +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > @@ -37,8 +37,8 @@ > > def try_assoc(ref, ref_class, exp_rc, exp_desc, options): > conn = assoc.myWBEMConnection('http://%s' % options.ip, > - (Globals.CIM_USER, Globals.CIM_PASS), > - Globals.CIM_NS) > + (CIM_USER, CIM_PASS), > + CIM_NS) > status = FAIL > rc = -1 > names = [] > diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Fri Aug 29 13:24:32 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/04_reverse_errs.py Fri Aug 29 13:25:48 2008 -0700 > @@ -25,8 +25,8 @@ > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib import assoc > from XenKvmLib.classes import get_typed_class > -from CimTest import Globals > -from CimTest.Globals import logger, do_main > +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, SKIP > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > @@ -36,8 +36,8 @@ > > def try_assoc(ref, ref_class, exp_rc, exp_desc, options): > conn = assoc.myWBEMConnection('http://%s' % options.ip, > - (Globals.CIM_USER, Globals.CIM_PASS), > - Globals.CIM_NS) > + (CIM_USER, CIM_PASS), > + CIM_NS) > status = FAIL > rc = -1 > names = [] > diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Aug 29 13:24:32 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Aug 29 13:25:48 2008 -0700 > @@ -53,7 +53,7 @@ > from XenKvmLib.common_util import get_host_info > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Aug 29 13:24:32 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Aug 29 13:25:48 2008 -0700 > @@ -38,8 +38,9 @@ > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib.classes import get_typed_class > from XenKvmLib import vxml > -from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, do_main > from CimTest import Globals > +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Aug 29 13:24:32 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Aug 29 13:25:48 2008 -0700 > @@ -42,7 +42,7 @@ > from VirtLib import utils > from CimTest import Globals > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib import enumclass > from XenKvmLib import computersystem > from XenKvmLib import assoc > diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Fri Aug 29 13:24:32 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/03_ectp_fwd_errs.py Fri Aug 29 13:25:48 2008 -0700 > @@ -58,7 +58,8 @@ > from XenKvmLib.classes import get_typed_class > from CimTest.ReturnCodes import PASS, FAIL > from CimTest import Globals > -from CimTest.Globals import logger, CIM_USER, CIM_PASS, do_main > +from CimTest.Globals import logger, CIM_USER, CIM_PASS > +from XenKvmLib.const import do_main > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > diff -r bc9a4f35b1b4 -r d722b79c4054 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri Aug 29 13:24:32 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Fri Aug 29 13:25:48 2008 -0700 > @@ -87,7 +87,8 @@ > from XenKvmLib.common_util import try_assoc > from XenKvmLib.test_doms import destroy_and_undefine_all > from CimTest.ReturnCodes import PASS, FAIL > -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main > +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > +from XenKvmLib.const import do_main > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Sun Aug 31 17:49:28 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Sun, 31 Aug 2008 23:19:28 +0530 Subject: [Libvirt-cim] [PATCH 3 of 4] [TEST] Update ESD, ELEC, and HD to use do_main from const.py In-Reply-To: <8c056f2d614a9bf26ed8.1220041604@elm3b41.beaverton.ibm.com> References: <8c056f2d614a9bf26ed8.1220041604@elm3b41.beaverton.ibm.com> Message-ID: <48BAD9A8.3030306@linux.vnet.ibm.com> +1 for me. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1220041564 25200 > # Node ID 8c056f2d614a9bf26ed8154a7a355f9c9551ab22 > # Parent d722b79c405442082ccd02dbf1e50f0542a3344b > [TEST] Update ESD, ELEC, and HD to use do_main from const.py > > Signed-off-by: Kaitlin Rupert > > diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri Aug 29 13:25:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri Aug 29 13:26:04 2008 -0700 > @@ -52,10 +52,10 @@ > from XenKvmLib.enumclass import getInstance > from XenKvmLib.assoc import Associators, compare_all_prop > from XenKvmLib.classes import get_typed_class > -from CimTest.Globals import do_main, logger, CIM_ERROR_ASSOCIATORS > +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.vxml import get_class > -from XenKvmLib import const > +from XenKvmLib.const import do_main > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py > --- a/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Fri Aug 29 13:25:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Fri Aug 29 13:26:04 2008 -0700 > @@ -55,7 +55,7 @@ > from XenKvmLib import assoc > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ > CIM_ERROR_ASSOCIATORS > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.common_util import try_assoc > from XenKvmLib.classes import get_typed_class > from CimTest.ReturnCodes import PASS, FAIL > diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py > --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri Aug 29 13:25:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri Aug 29 13:26:04 2008 -0700 > @@ -25,7 +25,7 @@ > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > from CimTest import Globals > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from VirtLib import live > from VirtLib import utils > > diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py > --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py Fri Aug 29 13:25:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/02_elecap_gi_errs.py Fri Aug 29 13:26:04 2008 -0700 > @@ -56,7 +56,8 @@ > from XenKvmLib.vxml import XenXML, KVMXML, get_class > from XenKvmLib.classes import get_typed_class > from CimTest.ReturnCodes import PASS, FAIL > -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main > +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > +from XenKvmLib.const import do_main > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > > diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/HostedDependency/01_forward.py > --- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Aug 29 13:25:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Aug 29 13:26:04 2008 -0700 > @@ -52,7 +52,7 @@ > from XenKvmLib import enumclass > from XenKvmLib.classes import get_class_basename > from CimTest import Globals > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py > --- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Aug 29 13:25:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Aug 29 13:26:04 2008 -0700 > @@ -47,7 +47,8 @@ > from XenKvmLib import computersystem > from XenKvmLib import assoc > from XenKvmLib.classes import get_class_basename > -from CimTest.Globals import logger, do_main > +from CimTest.Globals import logger > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py > --- a/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Fri Aug 29 13:25:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Fri Aug 29 13:26:04 2008 -0700 > @@ -40,7 +40,7 @@ > from XenKvmLib.classes import get_class_basename > from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, \ > CIM_ERROR_GETINSTANCE > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.devices import CIM_Instance > from CimTest.ReturnCodes import PASS, FAIL > > diff -r d722b79c4054 -r 8c056f2d614a suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py > --- a/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Fri Aug 29 13:25:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Fri Aug 29 13:26:04 2008 -0700 > @@ -33,7 +33,7 @@ > from XenKvmLib import assoc > from XenKvmLib import vxml > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.classes import get_typed_class > from XenKvmLib.common_util import get_host_info, try_assoc > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Sun Aug 31 17:55:08 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Sun, 31 Aug 2008 23:25:08 +0530 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST] Update HostSystem, HostedService, and HRP to use do_main from const.py In-Reply-To: <90ff66d2baee23319d29.1220041605@elm3b41.beaverton.ibm.com> References: <90ff66d2baee23319d29.1220041605@elm3b41.beaverton.ibm.com> Message-ID: <48BADAFC.3090804@linux.vnet.ibm.com> +1 for me. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1220041572 25200 > # Node ID 90ff66d2baee23319d29727d61fa9cf5d8f64f27 > # Parent 8c056f2d614a9bf26ed8154a7a355f9c9551ab22 > [TEST] Update HostSystem, HostedService, and HRP to use do_main from const.py > > Signed-off-by: Kaitlin Rupert > > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/01_enum.py > --- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Aug 29 13:26:12 2008 -0700 > @@ -30,7 +30,8 @@ > from XenKvmLib.classes import get_typed_class > from VirtLib import live > from VirtLib import utils > -from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, do_main > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > > SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC'] > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py > --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Aug 29 13:26:12 2008 -0700 > @@ -47,7 +47,7 @@ > # Date : 29.01.2008 > > import sys > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.vxml import get_class > from XenKvmLib.classes import get_typed_class > from XenKvmLib.test_doms import destroy_and_undefine_all > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py > --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Aug 29 13:26:12 2008 -0700 > @@ -45,7 +45,8 @@ > from XenKvmLib.assoc import Associators > from XenKvmLib.vxml import XenXML, KVMXML, get_class > from XenKvmLib.classes import get_typed_class > -from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, do_main > +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.test_xml import testxml > from XenKvmLib.test_doms import destroy_and_undefine_all > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py > --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Aug 29 13:26:12 2008 -0700 > @@ -51,7 +51,7 @@ > from VirtLib import utils > from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ > CIM_ERROR_ASSOCIATORS > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.vxml import XenXML, KVMXML, get_class > from XenKvmLib.assoc import AssociatorNames, Associators > from XenKvmLib.common_util import get_host_info > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py > --- a/suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py Fri Aug 29 13:26:12 2008 -0700 > @@ -79,7 +79,8 @@ > from XenKvmLib.classes import get_typed_class > from optparse import OptionParser > from CimTest.ReturnCodes import PASS, FAIL > -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, do_main > +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > +from XenKvmLib.const import do_main > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py > --- a/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Aug 29 13:26:12 2008 -0700 > @@ -45,7 +45,7 @@ > # Date : 28.03.2008 > > import sys > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.classes import get_typed_class > from XenKvmLib.assoc import Associators, AssociatorNames > from XenKvmLib.common_util import get_host_info > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Aug 29 13:26:12 2008 -0700 > @@ -30,7 +30,7 @@ > from CimTest import Globals > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.classes import get_typed_class > from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf > > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Aug 29 13:26:12 2008 -0700 > @@ -29,7 +29,7 @@ > from CimTest import Globals > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.classes import get_typed_class > from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf > > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri Aug 29 13:26:12 2008 -0700 > @@ -29,7 +29,7 @@ > from CimTest import Globals > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.classes import get_typed_class > > expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \ > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/04_reverse_errs.py Fri Aug 29 13:26:12 2008 -0700 > @@ -29,7 +29,7 @@ > from CimTest import Globals > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from XenKvmLib.classes import get_typed_class > from XenKvmLib.common_util import cleanup_restore, create_diskpool_conf > > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedService/01_forward.py > --- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Aug 29 13:26:12 2008 -0700 > @@ -27,7 +27,7 @@ > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > from CimTest import Globals > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL, XFAIL > > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedService/02_reverse.py > --- a/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Fri Aug 29 13:26:12 2008 -0700 > @@ -27,7 +27,7 @@ > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > from CimTest import Globals > -from CimTest.Globals import do_main > +from XenKvmLib.const import do_main > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL, XFAIL > > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Fri Aug 29 13:26:12 2008 -0700 > @@ -26,8 +26,9 @@ > from XenKvmLib import assoc > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > -from CimTest import Globals > -from CimTest.Globals import logger, do_main > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ > + CIM_PASS, CIM_NS > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, XFAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > @@ -43,13 +44,13 @@ > try: > host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] > except Exception: > - logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) > + logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > return FAIL > > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > - (Globals.CIM_USER, Globals.CIM_PASS), > - Globals.CIM_NS) > + (CIM_USER, CIM_PASS), > + CIM_NS) > instanceref = CIMInstanceName(get_typed_class(options.virt, "HostSystem"), > keybindings = {"Wrong" : "wrong", "CreationClassName" : host_sys.CreationClassName}) > > diff -r 8c056f2d614a -r 90ff66d2baee suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py > --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Fri Aug 29 13:26:04 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Fri Aug 29 13:26:12 2008 -0700 > @@ -26,8 +26,9 @@ > from XenKvmLib import assoc > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > -from CimTest import Globals > -from CimTest.Globals import logger, do_main > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ > + CIM_PASS, CIM_NS > +from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, XFAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > @@ -43,7 +44,7 @@ > try: > host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] > except Exception: > - logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) > + logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > return FAIL > > > @@ -53,8 +54,8 @@ > > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > - (Globals.CIM_USER, Globals.CIM_PASS), > - Globals.CIM_NS) > + (CIM_USER, CIM_PASS), > + CIM_NS) > for k, v in servicelist.items(): > instanceref = CIMInstanceName(k, > keybindings = {"Wrong" : v, > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Sun Aug 31 18:07:01 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Sun, 31 Aug 2008 23:37:01 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update commom_util.py to call from enumclass not computersystem In-Reply-To: <6c04dcf4211c9d244a77.1219987077@elm3b41.beaverton.ibm.com> References: <6c04dcf4211c9d244a77.1219987077@elm3b41.beaverton.ibm.com> Message-ID: <48BADDC5.8060301@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1219987072 25200 > # Node ID 6c04dcf4211c9d244a77595ce207c78af7899f09 > # Parent a9978826a31d881a7fcaa2ca277a44322511a624 > [TEST] Update commom_util.py to call from enumclass not computersystem > > Signed-off-by: Guolian Yun > > diff -r a9978826a31d -r 6c04dcf4211c suites/libvirt-cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Aug 27 01:04:31 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Aug 28 22:17:52 2008 -0700 > @@ -28,7 +28,7 @@ > from XenKvmLib.test_xml import * > from XenKvmLib.test_doms import * > from XenKvmLib import vsms > -from XenKvmLib import computersystem > +from XenKvmLib import enumclass > from XenKvmLib import enumclass > enumclass already present , need not have to include it > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib.devices import CIM_Instance > @@ -54,7 +54,7 @@ > def get_cs_instance(domain_name, ip, virt='Xen'): > cs = None > try: > - cs = computersystem.get_cs_class(virt)(ip, domain_name) > + cs = enumclass.get_cs_class(virt)(ip, domain_name) > > if cs.Name != domain_name: > logger.error("VS %s is not found" % domain_name) > @@ -169,7 +169,7 @@ > > def poll_for_state_change(server, virt, dom, exp_state, timeout=30): > dom_cs = None > - cs = computersystem.get_cs_class(virt) > + cs = enumclass.get_cs_class(virt) > > try: > for i in range(1, (timeout + 1)): > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim >