From deeptik at linux.vnet.ibm.com Wed Oct 1 06:46:59 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 30 Sep 2008 23:46:59 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Modifying assoc.py to accomodate Association parameter changes In-Reply-To: Message-ID: <41c2dc5b6a669fa923a5.1222843619@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1222841815 25200 # Node ID 41c2dc5b6a669fa923a51c441de9604e1f8c5cf2 # Parent 0ecb3a22c3617eaa4298dfd9cd3b7b27b9846110 [TEST] Modifying assoc.py to accomodate Association parameter changes . 1) Made the Associators() and AssociatorNames() calls to accept the classname and association classname. This will allow us to support other SBLIM classnames (besides just Linux_ComputerSystem), any changes to the association classname and anything else we need to support in the future. 2) Removed the virt param. Tested with Xen, XenFV, KVM on current sources and with/without sblim-base-provider installed. Signed-off-by: Deepti B. Kalakeri diff -r 0ecb3a22c361 -r 41c2dc5b6a66 suites/libvirt-cim/lib/XenKvmLib/assoc.py --- a/suites/libvirt-cim/lib/XenKvmLib/assoc.py Fri Sep 26 02:44:52 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/assoc.py Tue Sep 30 23:16:55 2008 -0700 @@ -30,68 +30,44 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger -def AssociatorNames(host, basetype, baseobj, virt="Xen", **keys): +def AssociatorNames(host, assoc_cn, classname, **keys): '''Resolve the association specified by @type, given the known @obj and @keys. Return a list of CIMInstanceName objects, if an valid @keys is provided, or CIMClassName objects, if no @keys is provided, or None on failure''' - #FIXME - Remove once all tests are converted for KVM - basetype = "%s" % basetype - type = basetype.split('_') - if len(type) == 2: - basetype = type[1] - - obj = baseobj.split('_') - if len(type) == 2: - baseobj = obj[1] - - type = get_typed_class(virt, basetype) - obj = get_typed_class(virt, baseobj) conn = myWBEMConnection('http://%s' % host, (Globals.CIM_USER, Globals.CIM_PASS), Globals.CIM_NS) - instanceref = CIMInstanceName(obj, keybindings=keys) + instanceref = CIMInstanceName(classname, keybindings=keys) names = [] try: - names = conn.AssociatorNames(instanceref, AssocClass=type) + names = conn.AssociatorNames(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] return names return names -def Associators(host, basetype, baseobj, virt="Xen", **keys): +def Associators(host, assoc_cn, classname, **keys): '''Resolve the association specified by @type, given the known @obj and @keys. Return a list of CIMInstanceName objects, if an valid @keys is provided, or CIMClassName objects, if no @keys is provided, or None on failure''' - #FIXME - Remove once all tests are converted for KVM - basetype = "%s" % basetype - type = basetype.split('_') - if len(type) == 2: - basetype = type[1] - - obj = baseobj.split('_') - if len(obj) == 2: - baseobj = obj[1] - - type = get_typed_class(virt, basetype) - obj = get_typed_class(virt, baseobj) conn = myWBEMConnection('http://%s' % host, (Globals.CIM_USER, Globals.CIM_PASS), Globals.CIM_NS) - instanceref = CIMInstanceName(obj, keybindings=keys) + instanceref = CIMInstanceName(classname, keybindings=keys) names = [] try: - names = conn.Associators(instanceref, AssocClass=type) + names = conn.Associators(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] From deeptik at linux.vnet.ibm.com Wed Oct 1 06:47:00 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 30 Sep 2008 23:47:00 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Fixing and updating 02_reverse.py and 03_enabledstate.py of HostedDependency to work with and without sblim-base-provider In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1222843581 25200 # Node ID f97dd6bf14b97cea6492aabb540628f11c5abd91 # Parent 41c2dc5b6a669fa923a51c441de9604e1f8c5cf2 [TEST] Fixing and updating 02_reverse.py and 03_enabledstate.py of HostedDependency to work with and without sblim-base-provider. Changes for 02_reverse.py ------------------------- 1) Updated the tc to work with/without sblim-base-provider. 2) Updated the tc to use cim_define(). 3) Updated call_request_state_change() to start the domain. 3) Included the bug no 00007. 4) Used get_host_info() for getting the host information. Changes for 03_enabledstate.py ------------------------------- 1) Updated the tc to work with/without sblim-base-provider. 2) Updated the tc to use cim_define(). 3) Updated call_request_state_change() to start the domain. 3) Included the bug no 00007. 4) Used get_host_info() for getting the host information. 5) Included library function print_field_error() to print error msg. 6) Included poll_for_state_change() to verify the EnabledState value. Tested with Xen, XenFV, KVM on current sources and with/without sblim-base-provider installed. Signed-off-by: Deepti B. Kalakeri diff -r 41c2dc5b6a66 -r f97dd6bf14b9 suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Tue Sep 30 23:16:55 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Tue Sep 30 23:46:21 2008 -0700 @@ -29,7 +29,7 @@ # Example cli command is # wbemcli ain -ac Xen_HostedDependency # 'http://localhost:5988/root/virt: -# Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="mx3650b.in.ibm.com"' +# Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="3650b"' # # For which we get the following output # localhost:5988/root/virt:Xen_ComputerSystem. @@ -45,44 +45,53 @@ from XenKvmLib import vxml from XenKvmLib import vxml from XenKvmLib import enumclass from XenKvmLib import assoc -from XenKvmLib.classes import get_class_basename +from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger from XenKvmLib.const import do_main -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.common_util import get_host_info, call_request_state_change sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "hd_domain" test_mac = "00:11:22:33:44:55" +TIME = "00000000000000.000000:000" +bug_sblim = "00007" @do_main(sup_types) def main(): options = main.options + virt = options.virt + server = options.ip status = PASS - virtxml = vxml.get_class(options.virt) - if options.virt == "LXC": + virtxml = vxml.get_class(virt) + if virt == "LXC": cxml = virtxml(test_dom) else: cxml = virtxml(test_dom, mac = test_mac) - ret = cxml.create(options.ip) + ret = cxml.cim_define(server) if not ret: - logger.error("ERROR: Failed to Create the dom: %s" % test_dom) - status = FAIL - return status - keys = ['Name', 'CreationClassName'] + logger.error("Failed to define the dom: %s" % test_dom) + return FAIL + + rc = call_request_state_change(test_dom, server, 2, TIME, virt) + if rc != 0: + logger.error("Failed to start the dom: %s" % test_dom) + cxml.undefine(server) + return FAIL + try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) - if host_sys[0].Name == "": - raise Exception("HostName seems to be empty") - else: - # Instance of the HostSystem - host_sys = host_sys[0] + status, host_name, host_ccn = get_host_info(server, virt) + if status != PASS: + cxml.destroy(server) + cxml.undefine(server) + return status keys = ['Name', 'CreationClassName'] - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) - if options.virt == 'Xen' or options.virt == 'XenFV': + cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt) + if virt == 'Xen' or options.virt == 'XenFV': # Xen honors additional domain-0 cs_list_len = 2 else: @@ -94,19 +103,23 @@ def main(): # ComputerSystem.EnumerateInstances() cs_names = [x.name for x in cs] + assoc_cn = get_typed_class(virt, "HostedDependency") + # Get a list of ComputerSystem instances from the HostSystem instace - host_ccn = host_sys.CreationClassName - systems = assoc.AssociatorNames(options.ip, "HostedDependency", - get_class_basename(host_ccn), - options.virt, + systems = assoc.AssociatorNames(server, assoc_cn, host_ccn, CreationClassName=host_ccn, - Name=host_sys.Name) + Name=host_name) + # Compare each returned instance to make sure it's in the list # that ComputerSystem.EnumerateInstances() returned if len(systems) < 1: - raise Exception("HostedDependency returned %d, expected at least 1" % - len(systems)) + logger.error("HostedDependency returned %d, expected at least 1", + len(systems)) + cxml.destroy(server) + cxml.undefine(server) + return XFAIL_RC(bug_sblim) + ccn = cs[0].CreationClassName for guest in systems: @@ -119,7 +132,7 @@ def main(): # checking the CreationClassName returned is Xen_ComputerSystem if ccn != guest["CreationClassName"]: - logger.error("ERROR: CreationClassName does not match") + logger.error("CreationClassName does not match") status = FAIL # Go through anything remaining in the @@ -131,15 +144,12 @@ def main(): guest["Name"]) status = FAIL - except (UnboundLocalError, NameError), detail: - logger.error("Exception: %s" % detail) - except Exception, detail: - logger.error(detail) + logger.error("Exception: %s", detail) status = FAIL - cxml.destroy(options.ip) - cxml.undefine(options.ip) + cxml.destroy(server) + cxml.undefine(server) return status if __name__ == "__main__": diff -r 41c2dc5b6a66 -r f97dd6bf14b9 suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py --- a/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Tue Sep 30 23:16:55 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/03_enabledstate.py Tue Sep 30 23:46:21 2008 -0700 @@ -37,120 +37,127 @@ from XenKvmLib import enumclass from XenKvmLib import enumclass from XenKvmLib import assoc from XenKvmLib.classes import get_typed_class -from XenKvmLib.common_util import get_host_info +from XenKvmLib.common_util import get_host_info, print_field_error, \ +poll_for_state_change, call_request_state_change from XenKvmLib.classes import get_class_basename from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, \ CIM_ERROR_GETINSTANCE from XenKvmLib.const import do_main from XenKvmLib.devices import CIM_Instance -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC sup_types = ['Xen', 'KVM', 'XenFV'] +TIME = "00000000000000.000000:000" test_dom = "hd_domain1" test_mac = "00:11:22:33:44:55" +bug_sblim = "00007" def create_list(instance): new_list = { - 'CreationClassName': instance.CreationClassName, \ - 'EnabledState' : instance.EnabledState, \ - 'Name' : instance.Name, \ + 'CreationClassName': instance.CreationClassName, + 'EnabledState' : instance.EnabledState, + 'Name' : instance.Name, 'RequestedState' : instance.RequestedState } return new_list -def print_error(field, ret_val, req_val): - logger.error("%s Mismatch", field) - logger.error("Returned %s instead of %s", ret_val, req_val) def poll_for_enabledstate_value(server, virt): status = PASS dom_field_list = {} - check_reqstate_value = None timeout = 10 try: - for i in range(1, (timeout + 1)): - sleep(1) - ccn = get_typed_class(virt, 'ComputerSystem') - keys = { - 'Name' : test_dom, - 'CreationClassName' : ccn - } - dom_cs = enumclass.getInstance(server, 'ComputerSystem', keys, virt) - if dom_cs.EnabledState == "" or dom_cs.CreationClassName == "" or \ - dom_cs.Name == "" or dom_cs.RequestedState == "": - logger.error("Empty EnabledState field.") - status = FAIL - return status, [] + status, dom_cs = poll_for_state_change(server, virt, test_dom, 9, + timeout) + if status != PASS: + logger.error("Attributes for dom '%s' is not set as expected.", + test_dom) + return FAIL, [] - dom_field_list = create_list(dom_cs) - check_reqstate_value = dom_field_list['EnabledState'] - if check_reqstate_value == 9: - break + dom_field_list = create_list(dom_cs) except Exception, detail: logger.error(CIM_ERROR_GETINSTANCE, 'ComputerSystem') logger.error("Exception: %s" % detail) status = FAIL - if check_reqstate_value != 9: - logger.error("EnabledState has %i instead of 9.", check_reqstate_value) - logger.error("Try to increase the timeout and run the test again") - status = FAIL - return status, dom_field_list -class HsError(Exception): - pass +def verify_fields(hs_ret_values, exp_hs_values): + try: + field_names = exp_hs_values.keys() + for field in field_names: + if hs_ret_values[field] != exp_hs_values[field]: + print_field_error(field, hs_ret_values[field], + exp_hs_values[field]) + return FAIL + except Exception, details: + logger.error("Exception: In fn verify_fields() %s", details) + return FAIL + + return PASS + @do_main(sup_types) def main(): options = main.options + virt = options.virt + server = options.ip status = PASS - virtxml = vxml.get_class(options.virt) + virtxml = vxml.get_class(virt) cxml = virtxml(test_dom, mac = test_mac) - ret = cxml.create(options.ip) + ret = cxml.cim_define(server) if not ret: - logger.error("Failed to Create the dom: %s" % test_dom) - status = FAIL - return status + logger.error("Failed to define the dom: %s" % test_dom) + return FAIL - ret = cxml.run_virsh_cmd(options.ip, "suspend") + rc = call_request_state_change(test_dom, server, 2, TIME, virt) + if rc != 0: + logger.error("Failed to start the dom: %s" % test_dom) + cxml.undefine(server) + return FAIL - if not ret: + rc = call_request_state_change(test_dom, server, 9, TIME, virt) + if rc != 0: logger.error("Failed to suspend the dom: %s" % test_dom) - cxml.destroy(options.ip) - cxml.undefine(options.ip) - status = FAIL - return status + cxml.destroy(server) + cxml.undefine(server) + return FAIL - status, host_name, host_ccn = get_host_info(options.ip, options.virt) + status, host_name, host_ccn = get_host_info(server, virt) if status != PASS: logger.error("Failed to get host info") - cxml.destroy(options.ip) - cxml.undefine(options.ip) + cxml.destroy(server) + cxml.undefine(server) return status try: -#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. + #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. dom_field_list = {} - status, dom_field_list = poll_for_enabledstate_value(options.ip, - options.virt) + status, dom_field_list = poll_for_enabledstate_value(server, virt) if status != PASS or len(dom_field_list) == 0: - raise HsError("Failed to poll for enabled state value") + logger.error("Failed to poll for enabled state value") + cxml.destroy(server) + cxml.undefine(server) + return FAIL - hs = assoc.Associators(options.ip, "HostedDependency", - get_class_basename(host_ccn), options.virt, + assoc_cn = get_typed_class(virt, "HostedDependency") + + hs = assoc.Associators(server, assoc_cn, host_ccn, CreationClassName=host_ccn, Name=host_name) if len(hs) == 0: - raise HsError("HostedDependency didn't return any instances.") + logger.error("HostedDependency didn't return any instances.") + cxml.destroy(server) + cxml.undefine(server) + return XFAIL_RC(bug_sblim) hs_field_list = [] for hsi in hs: @@ -158,35 +165,20 @@ def main(): hs_field_list = create_list(CIM_Instance(hsi)) if len(hs_field_list) == 0: - raise HsError("Association did not return expected guest instance.") + logger.error("Association did not return expected guest instance.") + cxml.destroy(server) + cxml.undefine(server) + return FAIL - if dom_field_list['CreationClassName'] != hs_field_list['CreationClassName']: - print_error('CreationClassName', hs_field_list['CreationClassName'], \ - dom_field_list['CreationClassName']) - status = FAIL - if dom_field_list['Name'] != hs_field_list['Name']: - print_error('Name', hs_field_list['Name'], \ - dom_field_list['Name']) - status = FAIL - - if dom_field_list['RequestedState'] != hs_field_list['RequestedState']: - print_error('RequestedState', hs_field_list['RequestedState'], \ - dom_field_list['RequestedState']) - status = FAIL - if dom_field_list['EnabledState'] != hs_field_list['EnabledState']: - print_error('EnabledState', hs_field_list['EnabledState'], \ - dom_field_list['EnabledState']) - status = FAIL - except HsError, detail: - status = FAIL - logger.error(detail) + status = verify_fields(hs_field_list, dom_field_list) + except Exception, detail: logger.error(CIM_ERROR_ASSOCIATORS,'HostedDependency') logger.error("Exception: %s" % detail) status = FAIL - cxml.destroy(options.ip) - cxml.undefine(options.ip) + cxml.destroy(server) + cxml.undefine(server) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Wed Oct 1 06:46:58 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 30 Sep 2008 23:46:58 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] Association parameter changes and fixing HostedDependency tc to work with sblim-base-providers.wq Message-ID: Signed-off-by: Deepti B. Kalakeri From deeptik at linux.vnet.ibm.com Wed Oct 1 17:04:51 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 01 Oct 2008 10:04:51 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Fixing and updating 01_forward.py of ElementCapabilities to work with and without sblim-base-provider In-Reply-To: Message-ID: <530d3dab93cd36a2b68e.1222880691@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1222853363 25200 # Node ID 530d3dab93cd36a2b68e1fb42c71c9a1cfe755fc # Parent fb10c72ed404aa96715e2d013b0ee3502046496f [TEST] Fixing and updating 01_forward.py of ElementCapabilities to work with and without sblim-base-provider. 1) Updated the tc to work with/without sblim-base-provider. 2) Updated the tc to use cim_define(). This is req bcs the association of ElementCapabilities with the CS would not be excercised for KVM. 3) Included the bug no 00007. Included XFAIL . 4) Used get_host_info() for getting the host information. 5) Updated the tc to use cim.undefine(). Tested with Xen, XenFV, KVM on current sources and with/without sblim-base-provider installed. Signed-off-by: Deepti B. Kalakeri diff -r fb10c72ed404 -r 530d3dab93cd suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 01 02:22:53 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 01 02:29:23 2008 -0700 @@ -23,16 +23,19 @@ import sys import sys from VirtLib import utils from VirtLib import live +from XenKvmLib import vxml from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class -from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ - CIM_ERROR_ENUMERATE +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main -from CimTest.ReturnCodes import PASS, FAIL, SKIP +from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC from XenKvmLib.enumclass import enumerate +from XenKvmLib.common_util import get_host_info sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +test_dom = "dom_elecap" +bug_sblim = "00007" def append_to_list(server, virt, poolname, valid_elc_id): keys_list = ['InstanceID'] @@ -61,21 +64,21 @@ def main(): server = options.ip virt = options.virt keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(server, 'HostSystem', keys, virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE, get_typed_class(virt, 'HostSystem')) - return FAIL + + + status, host_name, host_ccn = get_host_info(server, virt) + if status != PASS: + logger.error("Failed to get host info") + return status + + assoc_cn = get_typed_class(virt, "ElementCapabilities") try: - elc = assoc.AssociatorNames(server, - "ElementCapabilities", - "HostSystem", - virt, - Name = host_sys.Name, - CreationClassName = host_sys.CreationClassName) + elc = assoc.AssociatorNames(server, assoc_cn, host_ccn, + Name = host_name, + CreationClassName = host_ccn) except Exception: - logger.error(CIM_ERROR_ASSOCIATORNAMES % host_sys.Name) + logger.error(CIM_ERROR_ASSOCIATORNAMES, assoc_cn) return FAIL @@ -91,38 +94,52 @@ def main(): return status if len(elc) == 0: - logger.error("ElementCapabilities association failed, excepted at least one instance") - return FAIL + logger.error("'%s' association failed, excepted at least one instance", + assoc_cn) + if host_ccn == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + return FAIL for i in elc: if i.classname not in valid_elc_name: - logger.error("ElementCapabilities association classname error") + logger.error("'%s' association classname error", assoc_cn) return FAIL if i['InstanceID'] not in valid_elc_id: - logger.error("ElementCapabilities association InstanceID error ") + logger.error("'%s' association InstanceID error ", assoc_cn) return FAIL + + virtxml = vxml.get_class(virt) + cxml = virtxml(test_dom) + ret = cxml.cim_define(server) + if not ret: + logger.error("Failed to define the dom: %s", test_dom) + status = FAIL + return status cs = live.domain_list(server, virt) ccn = get_typed_class(virt, "ComputerSystem") for system in cs: try: - elec = assoc.AssociatorNames(server, - "ElementCapabilities", - "ComputerSystem", - virt, + elec = assoc.AssociatorNames(server, assoc_cn, ccn, Name = system, CreationClassName = ccn) - except Exception: + except Exception: logger.error(CIM_ERROR_ASSOCIATORNAMES % system) + cxml.undefine(server) return FAIL + cn = get_typed_class(virt, "EnabledLogicalElementCapabilities") if elec[0].classname != cn: - logger.error("ElementCapabilities association classname error") + cxml.undefine(server) + logger.error("'%s' association classname error", assoc_cn) return FAIL elif elec[0].keybindings['InstanceID'] != system: - logger.error("ElementCapabilities association InstanceID error") + cxml.undefine(server) + logger.error("'%s' association InstanceID error", assoc_cn) return FAIL + cxml.undefine(server) return PASS if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Wed Oct 1 17:04:50 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 01 Oct 2008 10:04:50 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] Association parameter changes and fixing ElementCapabilities tc to work with sblim-base-providers Message-ID: Signed-off-by: Deepti B. Kalakeri From deeptik at linux.vnet.ibm.com Wed Oct 1 17:04:52 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 01 Oct 2008 10:04:52 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Fixing and updating 02_reverse.py of ElementCapabilities to work with and without sblim-base-provider In-Reply-To: Message-ID: <1da63a856b8307cf4479.1222880692@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1222880651 25200 # Node ID 1da63a856b8307cf4479da63ff4ed5ec5b666d2b # Parent 530d3dab93cd36a2b68e1fb42c71c9a1cfe755fc [TEST] Fixing and updating 02_reverse.py of ElementCapabilities to work with and without sblim-base-provider. 1) Fixed the return statement , this was causing the tc to pass with a false positive. 2) Updated the tc to work with/without sblim-base-provider. 3) Updated the tc to use cim_define(). This is req bcs the association of ElementCapabilities with the EnabledLogicalElementCapabilities would not be excercised for KVM. 4) Used get_host_info() for getting the host information. 5) Updated the tc to use cim.undefine(). 6) Added verification of the VirtualSystemMigrationService service. 7) Updated enumclas to support VirtualSystemMigrationService and VirtualSystemManagementService. 8) Removed Enumerate instance and used getInstance instead to verify the VirtualSystemMigrationService and VirtualSystemManagementService values in the association. Tested with Xen, XenFV, KVM on current sources and with/without sblim-base-provider installed. Signed-off-by: Deepti B. Kalakeri diff -r 530d3dab93cd -r 1da63a856b83 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Oct 01 02:29:23 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Oct 01 10:04:11 2008 -0700 @@ -26,26 +26,30 @@ from VirtLib import live from VirtLib import live from XenKvmLib import assoc 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 +from XenKvmLib import vxml +from XenKvmLib.classes import get_typed_class +from XenKvmLib.classes import get_class_basename +from XenKvmLib.common_util import get_host_info +from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, \ +CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.enumclass import getInstance sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +test_dom = "dom_elecap" def call_assoc(ip, cn, id, virt="Xen"): status = PASS ec_ele = [] + assoc_cn = get_typed_class(virt, "ElementCapabilities") try: ec_ele = assoc.AssociatorNames(ip, - "ElementCapabilities", + assoc_cn, cn, - virt, InstanceID = id) except Exception: - logger.error(CIM_ERROR_ASSOCIATORNAMES, - 'ElementCapabilities') + logger.error(CIM_ERROR_ASSOCIATORNAMES, assoc_cn) status = FAIL return status, ec_ele @@ -57,102 +61,126 @@ def filter(list, cn, exp_result): return FAIL, new_list return PASS, new_list -def verify_host(inst_list, ip, virt="Xen"): - hs = get_typed_class(virt, 'HostSystem') - status, list = filter(inst_list, hs, 1) +def verify_host(inst_list, host_name, host_ccn): + status, list = filter(inst_list, host_ccn, 1) if status != PASS: return status inst = list[0] - keys = ['Name', 'CreationClassName'] + creationclassname = inst.keybindings['CreationClassName'] + name = inst.keybindings['Name'] + + if creationclassname != host_ccn: + logger.error("CreationClassName doesn't match") + return FAIL + + if name != host_name: + logger.error("Name doesn't match") + return FAIL + + return PASS + +def verify_service(inst_list, ip, virt, host_name, host_ccn, + name=" ", ser_cn=""): + status, list = filter(inst_list, ser_cn, 1) + if status != PASS: + return status + + inst = list[0] + keys = { + 'CreationClassName' : ser_cn, + 'Name' : name, + 'SystemName' : host_name, + 'SystemCreationClassName' : host_ccn + } try: - host_sys = enumclass.enumerate(ip, 'HostSystem', keys, virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE, 'HostSystem') + basename = get_class_basename(ser_cn) + service = getInstance(ip, basename, keys, virt) + except Exception, detail: + logger.error(CIM_ERROR_GETINSTANCE, ser_cn) + logger.error("Exeption : %s", detail) return FAIL creationclassname = inst.keybindings['CreationClassName'] name = inst.keybindings['Name'] - if creationclassname != host_sys.CreationClassName: + if creationclassname != service.CreationClassName: logger.error("CreationClassName doesn't match") return FAIL - elif name != host_sys.Name: - logger.error("Name doesn't match") - return FAIL - return PASS - -def verify_service(inst_list, ip, virt): - service = get_typed_class(virt, "VirtualSystemManagementService") - status, list = filter(inst_list, service, 1) - if status != PASS: - return status - - inst = list[0] - try: - service = vsms.enumerate_instances(ip, virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE, - 'VirtualSystemManagementService') - return FAIL - - creationclassname = inst.keybindings['CreationClassName'] - name = inst.keybindings['Name'] - - if creationclassname != service['CreationClassName']: - logger.error("CreationClassName doesn't match") - return FAIL - elif name != service['Name']: + if name != service.Name: logger.error("InstanceID doesn't match") return FAIL - return PASS @do_main(sup_types) def main(): options = main.options - + cap_list = {"VirtualSystemManagementCapabilities" : "ManagementCapabilities", - "VirtualSystemMigrationCapabilities" : "MigrationCapabilities"} - import pdb - #pdb.set_trace() + "VirtualSystemMigrationCapabilities" : "MigrationCapabilities"} + + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Failed to get host info") + return status + for k, v in cap_list.iteritems(): - status, ec_ele = call_assoc(options.ip, k, v, options.virt) + cn = get_typed_class(options.virt, k) + status, ec_ele = call_assoc(options.ip, cn, v, options.virt) if status != PASS: - return - - status = verify_host(ec_ele, options.ip, options.virt) + return FAIL + + status = verify_host(ec_ele, host_name, host_ccn) if status != PASS: return status - + if v == 'ManagementCapabilities': - status = verify_service(ec_ele, options.ip, options.virt) - if status != PASS: - return status + cn = get_typed_class(options.virt, "VirtualSystemManagementService") + status = verify_service(ec_ele, options.ip, options.virt, + host_name, host_ccn, + name="Management Service", ser_cn=cn) + else: + cn = get_typed_class(options.virt, "VirtualSystemMigrationService") + status = verify_service(ec_ele, options.ip, options.virt, + host_name, host_ccn, + name="MigrationService", ser_cn=cn) + if status != PASS: + return status + + virtxml = vxml.get_class(options.virt) + cxml = virtxml(test_dom) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s" % test_dom) + return FAIL cs = live.domain_list(options.ip, options.virt) for system in cs: - status, elec_cs = call_assoc(options.ip, - "EnabledLogicalElementCapabilities", - system, - options.virt) + cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities") + status, elec_cs = call_assoc(options.ip, cn, system, options.virt) if status != PASS: - return + return FAIL if len(elec_cs) < 1: logger.error("No ELEC instances returned") + cxml.undefine(options.ip) return FAIL - if elec_cs[0].keybindings['CreationClassName'] != get_typed_class(options.virt, "ComputerSystem"): - logger.error("Excpeted CreationClassName %s, got %s" % - ("ComputerSystem", - elec_cs[0].keybindings['CreationClassName'])) - return FAIL - elif elec_cs[0].keybindings['Name'] != system: - logger.error("ElementCapabilities association Name error") + if elec_cs[0].keybindings['CreationClassName'] != \ + get_typed_class(options.virt, "ComputerSystem"): + logger.error("Excpeted CreationClassName %s, got %s", + "ComputerSystem", + elec_cs[0].keybindings['CreationClassName']) + cxml.undefine(options.ip) return FAIL + if elec_cs[0].keybindings['Name'] != system: + logger.error("ElementCapabilities association Name error") + cxml.undefine(options.ip) + return FAIL + + cxml.undefine(options.ip) return PASS if __name__ == "__main__": diff -r 530d3dab93cd -r 1da63a856b83 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Oct 01 02:29:23 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Oct 01 10:04:11 2008 -0700 @@ -336,6 +336,25 @@ class KVM_DiskResourceAllocationSettingD class KVM_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData): pass +class KVM_VirtualSystemMigrationService(CIM_MyClass): + pass + +class Xen_VirtualSystemMigrationService(CIM_MyClass): + pass + +class LXC_VirtualSystemMigrationService(CIM_MyClass): + pass + +class Xen_VirtualSystemManagementService(CIM_MyClass): + pass + +class KVM_VirtualSystemManagementService(CIM_MyClass): + pass + +class LXC_VirtualSystemManagementService(CIM_MyClass): + pass + + # Generic function which can be used to get the enumerate instances of any # class when the following fields are specified # classname = any class for which we want obtain the instances From deeptik at linux.vnet.ibm.com Wed Oct 1 17:01:33 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 01 Oct 2008 22:31:33 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing and updating 02_reverse.py of HostedDependency to work with sblim-base-provider In-Reply-To: <48E2AA78.1070704@linux.vnet.ibm.com> References: <74c27c6878537864db0d.1222777529@elm3b217.beaverton.ibm.com> <48E2AA78.1070704@linux.vnet.ibm.com> Message-ID: <48E3ACED.3090406@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> - virtxml = vxml.get_class(options.virt) >> - if options.virt == "LXC": >> + virtxml = vxml.get_class(virt) >> + if virt == "LXC": >> cxml = virtxml(test_dom) >> else: >> cxml = virtxml(test_dom, mac = test_mac) >> - ret = cxml.create(options.ip) >> >> + ret = cxml.cim_define(server) >> if not ret: >> - logger.error("ERROR: Failed to Create the dom: %s" % test_dom) >> - status = FAIL >> - return status >> - keys = ['Name', 'CreationClassName'] >> + logger.error("Failed to define the dom: %s" % test_dom) >> + return FAIL >> + >> + rc = call_request_state_change(test_dom, server, 2, TIME, virt) >> + if rc != 0: >> + logger.error("Failed to start the dom: %s" % test_dom) >> + cxml.undefine(server) >> + return FAIL > > What we really want to do here is implement cim_start(). You're > welcome to leave this as is, but eventually we'll need to replace this > (and the cxml.start() calls) with a cim_start() call. > > This will be more uniform than using cim_define() to define a guest > and then using a non-vxml related function to change the guest's > state. But cim_start() (or cim_state_change(), whichever way you > think is best) can be added at some later time. I will modify these to use the cim_start in the next iterations, as I would like to spend time in completing to support the tc to work with the SBLIM changes. Thanks and Regards, Deepti. From kaitlin at linux.vnet.ibm.com Wed Oct 1 20:01:42 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 01 Oct 2008 13:01:42 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing and updating 02_reverse.py of HostedDependency to work with sblim-base-provider In-Reply-To: <48E3ACED.3090406@linux.vnet.ibm.com> References: <74c27c6878537864db0d.1222777529@elm3b217.beaverton.ibm.com> <48E2AA78.1070704@linux.vnet.ibm.com> <48E3ACED.3090406@linux.vnet.ibm.com> Message-ID: <48E3D726.1000908@linux.vnet.ibm.com> >> >> What we really want to do here is implement cim_start(). You're >> welcome to leave this as is, but eventually we'll need to replace this >> (and the cxml.start() calls) with a cim_start() call. >> >> This will be more uniform than using cim_define() to define a guest >> and then using a non-vxml related function to change the guest's >> state. But cim_start() (or cim_state_change(), whichever way you >> think is best) can be added at some later time. > > I will modify these to use the cim_start in the next iterations, as I > would like to spend time in completing to support the tc to work with > the SBLIM changes. > Yep, that's fine by me. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Oct 1 20:42:09 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 01 Oct 2008 13:42:09 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] Association parameter changes and fixing HostedDependency tc to work with sblim-base-providers.wq In-Reply-To: References: Message-ID: <48E3E0A1.1000806@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > Signed-off-by: Deepti B. Kalakeri > This set looks good. However, since the association related patch breaks all of the tests that call Associators() and AssociatorNames() using the old parameters, I will wait to apply this set. Can you generate a patchset that fixes all of the tests that call Associators() and AssociatorNames()? I'll apply this set and the EC patchset, as well as the set that fixes all the calls to Associators() and AssociatorNames() all at once so that there's nothing breaks in the process. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 2 16:56:31 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 02 Oct 2008 09:56:31 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add ServiceAffectsElement provider. Message-ID: From kaitlin at linux.vnet.ibm.com Thu Oct 2 16:56:33 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 02 Oct 2008 09:56:33 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Add ServiceAffectsElement provider In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1221516893 25200 # Node ID d5fea4a670a29b95ef8b7ed46a375a172e8104a7 # Parent 7c499018323cafaead848167d42acb0688ee5acd Add ServiceAffectsElement provider. This provider exposes the association between RedirectionService to ComputerSystem. Signed-off-by: Kaitlin Rupert diff -r 7c499018323c -r d5fea4a670a2 src/Virt_ServiceAffectsElement.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_ServiceAffectsElement.c Mon Sep 15 15:14:53 2008 -0700 @@ -0,0 +1,149 @@ +/* + * Copyright IBM Corp. 2008 + * + * Authors: + * Kaitlin Rupert + * + * 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 + +#include +#include +#include "misc_util.h" + +#include "Virt_ComputerSystem.h" +#include "Virt_ConsoleRedirectionService.h" + +const static CMPIBroker *_BROKER; + +static CMPIStatus service_to_cs(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + if (!match_hypervisor_prefix(ref, info)) + return s; + + s = get_console_rs(ref, &instance, _BROKER, info->context, true); + if (s.rc != CMPI_RC_OK) + return s; + + s = enum_domains(_BROKER, ref, list); + + return s; +} + +static CMPIStatus cs_to_service(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst = NULL; + + if (!match_hypervisor_prefix(ref, info)) + return s; + + s = get_domain_by_ref(_BROKER, ref, &inst); + if (s.rc != CMPI_RC_OK) + return s; + + s = get_console_rs(ref, &inst, _BROKER, info->context, false); + if (s.rc != CMPI_RC_OK) + return s; + if (!CMIsNullObject(inst)) + inst_list_add(list, inst); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char* antecedent[] = { + "Xen_ComputerSystem", + "KVM_ComputerSystem", + "LXC_ComputerSystem", + NULL +}; + +static char* dependent[] = { + "Xen_ConsoleRedirectionService", + "KVM_ConsoleRedirectionService", + "LXC_ConsoleRedirectionService", + NULL +}; + +static char* assoc_classname[] = { + "Xen_ServiceAffectsElement", + "KVM_ServiceAffectsElement", + "LXC_ServiceAffectsElement", + NULL +}; + +static struct std_assoc _cs_to_service = { + .source_class = (char**)&antecedent, + .source_prop = "Antecedent", + + .target_class = (char**)&dependent, + .target_prop = "Dependent", + + .assoc_class = (char**)&assoc_classname, + + .handler = cs_to_service, + .make_ref = make_ref +}; + +static struct std_assoc _service_to_cs = { + .source_class = (char**)&dependent, + .source_prop = "Dependent", + + .target_class = (char**)&antecedent, + .target_prop = "Antecedent", + + .assoc_class = (char**)&assoc_classname, + + .handler = service_to_cs, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_cs_to_service, + &_service_to_cs, + NULL +}; + +STDA_AssocMIStub(, + Virt_ServiceAffectsElement, + _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 kaitlin at linux.vnet.ibm.com Thu Oct 2 16:56:32 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 02 Oct 2008 09:56:32 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Schema related changes for ServiceAffectsElement provider In-Reply-To: Message-ID: <7c499018323cafaead84.1222966592@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1221515077 25200 # Node ID 7c499018323cafaead848167d42acb0688ee5acd # Parent d6aa7cb561858b94c40ba55abafde597949b7478 Schema related changes for ServiceAffectsElement provider. Signed-off-by: Kaitlin Rupert diff -r d6aa7cb56185 -r 7c499018323c Makefile.am --- a/Makefile.am Mon Sep 29 18:08:15 2008 -0700 +++ b/Makefile.am Mon Sep 15 14:44:37 2008 -0700 @@ -44,7 +44,8 @@ schema/VirtualSystemSnapshotServiceCapabilities.mof \ schema/ConcreteComponent.mof \ schema/ConsoleRedirectionService.mof \ - schema/ConsoleRedirectionServiceCapabilities.mof + schema/ConsoleRedirectionServiceCapabilities.mof \ + schema/ServiceAffectsElement.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -99,7 +100,8 @@ schema/VirtualSystemSnapshotServiceCapabilities.registration \ schema/ConcreteComponent.registration \ schema/ConsoleRedirectionService.registration \ - schema/ConsoleRedirectionServiceCapabilities.registration + schema/ConsoleRedirectionServiceCapabilities.registration \ + schema/ServiceAffectsElement.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r d6aa7cb56185 -r 7c499018323c src/Makefile.am --- a/src/Makefile.am Mon Sep 29 18:08:15 2008 -0700 +++ b/src/Makefile.am Mon Sep 15 14:44:37 2008 -0700 @@ -68,7 +68,8 @@ libVirt_ElementAllocatedFromPool.la \ libVirt_HostedService.la \ libVirt_ElementSettingData.la \ - libVirt_ConcreteComponent.la + libVirt_ConcreteComponent.la \ + libVirt_ServiceAffectsElement.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_ComputerSystem_la_DEPENDENCIES = libVirt_VirtualSystemSnapshotService.la @@ -201,3 +202,7 @@ libVirt_ConsoleRedirectionServiceCapabilities_la_SOURCES = Virt_ConsoleRedirectionServiceCapabilities.c +libVirt_ServiceAffectsElement_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_ConsoleRedirectionService.la +libVirt_ServiceAffectsElement_la_SOURCES = Virt_ServiceAffectsElement.c +libVirt_ServiceAffectsElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_ConsoleRedirectionService + From kaitlin at linux.vnet.ibm.com Thu Oct 2 18:05:25 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 02 Oct 2008 11:05:25 -0700 Subject: [Libvirt-cim] [PATCH] Remove sdc_rasd_prop structs from SDC Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1222970713 25200 # Node ID a2759cb96488a8079a24d8c47223ca5c7c7f3524 # Parent cbe9f59669b6b9342cf14db087139a302a1bff12 Remove sdc_rasd_prop structs from SDC Instead, a pointer to CMPIInstance can be passed to the <>_template() functions, and the functional can be responsible for setting the properties directly. Also, the functions will now return a CMPIStatus value instead of a sdc_rasd_prop struct. This is more useful than structs because some of the property values may differ between the virtualization types. Signed-off-by: Kaitlin Rupert diff -r cbe9f59669b6 -r a2759cb96488 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Mon Sep 15 14:44:37 2008 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Thu Oct 02 11:05:13 2008 -0700 @@ -249,68 +249,13 @@ return s; } -static bool rasd_prop_copy_value(struct sdc_rasd_prop src, - struct sdc_rasd_prop *dest) +static CMPIStatus mem_template(const CMPIObjectPath *ref, + int template_type, + CMPIInstance *inst) { - bool rc = true; - - CU_DEBUG("Copying '%s'", src.field); - if (src.type & CMPI_string) { - dest->value = (CMPIValue *)strdup((char *)src.value); - } else if (src.type & CMPI_INTEGER) { - dest->value = malloc(sizeof(CMPIValue)); - memcpy(dest->value, src.value, sizeof(CMPIValue)); - } else { - rc = false; - } - - return rc; -} - -static bool dup_rasd_prop_list(struct sdc_rasd_prop *src, - struct sdc_rasd_prop **dest) -{ - int count, i; - bool ret; - *dest = NULL; - - for (i = 0, count = 1; src[i].field != NULL; i++, count++) { - *dest = realloc(*dest, count * sizeof(struct sdc_rasd_prop)); - (*dest)[i].field = strdup(src[i].field); - ret = rasd_prop_copy_value(src[i], &(*dest)[i]); - (*dest)[i].type = src[i].type; - } - - /* Make sure to terminate the list. */ - *dest = realloc(*dest, count * sizeof(struct sdc_rasd_prop)); - (*dest)[i] = (struct sdc_rasd_prop)PROP_END; - - return true; -} - -static void free_rasd_prop_list(struct sdc_rasd_prop *prop_list) -{ - int i; - - if (!prop_list) - return; - - for (i = 0; prop_list[i].field != NULL; i++) { - free(prop_list[i].field); - free(prop_list[i].value); - } - - free (prop_list); -} - -static struct sdc_rasd_prop *mem_template(const CMPIObjectPath *ref, - int template_type, - CMPIStatus *s) -{ - bool ret; uint64_t mem_size; const char *id; - struct sdc_rasd_prop *rasd = NULL; + CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { case SDC_RASD_MIN: @@ -330,28 +275,20 @@ id = "Default"; break; default: - cu_statusf(_BROKER, s, + cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Unsupported sdc_rasd type"); goto out; } - struct sdc_rasd_prop tmp[] = { - {"InstanceID", (CMPIValue *)id, CMPI_chars}, - {"AllocationUnits", (CMPIValue *)"KiloBytes", CMPI_chars}, - {"VirtualQuantity", (CMPIValue *)&mem_size, CMPI_uint64}, - PROP_END - }; - - ret = dup_rasd_prop_list(tmp, &rasd); - if (!ret) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not copy RASD"); - } + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "AllocationUnits", + (CMPIValue *)"KiloBytes", CMPI_chars); + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&mem_size, CMPI_uint64); out: - return rasd; + return s; } static bool get_max_procs(const CMPIObjectPath *ref, @@ -377,14 +314,14 @@ return ret; } -static struct sdc_rasd_prop *proc_template(const CMPIObjectPath *ref, - int template_type, - CMPIStatus *s) +static CMPIStatus proc_template(const CMPIObjectPath *ref, + int template_type, + CMPIInstance *inst) { bool ret; uint64_t num_procs; const char *id; - struct sdc_rasd_prop *rasd = NULL; + CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { case SDC_RASD_MIN: @@ -392,7 +329,7 @@ id = "Minimum"; break; case SDC_RASD_MAX: - ret = get_max_procs(ref, &num_procs, s); + ret = get_max_procs(ref, &num_procs, &s); if (!ret) goto out; id = "Maximum"; @@ -406,29 +343,20 @@ id = "Default"; break; default: - cu_statusf(_BROKER, s, + cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Unsupported sdc_rasd type"); goto out; } - struct sdc_rasd_prop tmp[] = { - {"InstanceID", (CMPIValue *)id, CMPI_chars}, - {"AllocationUnits", (CMPIValue *)"Processors", CMPI_chars}, - {"VirtualQuantity", (CMPIValue *)&num_procs, CMPI_uint64}, - PROP_END - }; - - ret = dup_rasd_prop_list(tmp, &rasd); - if (!ret) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not copy RASD"); - } + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "AllocationUnits", + (CMPIValue *)"Processors", CMPI_chars); + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&num_procs, CMPI_uint64); out: - - return rasd; + return s; } static uint64_t net_max_xen(const CMPIObjectPath *ref, @@ -508,14 +436,14 @@ return ret; } -static struct sdc_rasd_prop *net_template(const CMPIObjectPath *ref, - int template_type, - CMPIStatus *s) +static CMPIStatus net_template(const CMPIObjectPath *ref, + int template_type, + CMPIInstance *inst) { bool ret; uint64_t num_nics; const char *id; - struct sdc_rasd_prop *rasd = NULL; + CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { case SDC_RASD_MIN: @@ -523,7 +451,7 @@ id = "Minimum"; break; case SDC_RASD_MAX: - ret = get_max_nics(ref, &num_nics, s); + ret = get_max_nics(ref, &num_nics, &s); if (!ret) goto out; id = "Maximum"; @@ -537,27 +465,18 @@ id = "Default"; break; default: - cu_statusf(_BROKER, s, + cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Unsupported sdc_rasd type"); goto out; } - struct sdc_rasd_prop tmp[] = { - {"InstanceID", (CMPIValue *)id, CMPI_chars}, - {"VirtualQuantity", (CMPIValue *)&num_nics, CMPI_uint64}, - PROP_END - }; - - ret = dup_rasd_prop_list(tmp, &rasd); - if (!ret) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not copy RASD"); - } + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&num_nics, CMPI_uint64); out: - return rasd; + return s; } static int get_disk_freespace(const CMPIObjectPath *ref, @@ -606,14 +525,14 @@ return ret; } -static struct sdc_rasd_prop *disk_template(const CMPIObjectPath *ref, - int template_type, - CMPIStatus *s) +static CMPIStatus disk_template(const CMPIObjectPath *ref, + int template_type, + CMPIInstance *inst) { bool ret; uint64_t disk_size; const char *id; - struct sdc_rasd_prop *rasd = NULL; + CMPIStatus s = {CMPI_RC_OK, NULL}; switch(template_type) { case SDC_RASD_MIN: @@ -621,7 +540,7 @@ id = "Minimum"; break; case SDC_RASD_MAX: - ret = get_disk_freespace(ref, s, &disk_size); + ret = get_disk_freespace(ref, &s, &disk_size); if (!ret) goto out; id = "Maximum"; @@ -635,28 +554,20 @@ id = "Default"; break; default: - cu_statusf(_BROKER, s, + cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Unsupported sdc_rasd type"); goto out; } - struct sdc_rasd_prop tmp[] = { - {"InstanceID", (CMPIValue *)id, CMPI_chars}, - {"AllocationQuantity", (CMPIValue *)"MegaBytes", CMPI_chars}, - {"VirtualQuantity", (CMPIValue *)&disk_size, CMPI_uint64}, - PROP_END - }; - - ret = dup_rasd_prop_list(tmp, &rasd); - if (!ret) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not copy RASD"); - } + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "AllocationQuantity", + (CMPIValue *)"MegaBytes", CMPI_chars); + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&disk_size, CMPI_uint64); out: - return rasd; + return s; } static CMPIInstance *sdc_rasd_inst(CMPIStatus *s, @@ -665,26 +576,7 @@ uint16_t resource_type) { CMPIInstance *inst = NULL; - struct sdc_rasd_prop *prop_list = NULL; - int i; const char *base = NULL; - - if (resource_type == CIM_RES_TYPE_MEM) - prop_list = mem_template(ref, type, s); - else if (resource_type == CIM_RES_TYPE_PROC) - prop_list = proc_template(ref, type, s); - else if (resource_type == CIM_RES_TYPE_NET) - prop_list = net_template(ref, type, s); - else if (resource_type == CIM_RES_TYPE_DISK) - prop_list = disk_template(ref, type, s); - else { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Unsupported resource type"); - } - - if (s->rc != CMPI_RC_OK) - goto out; if (rasd_classname_from_type(resource_type, &base) != CMPI_RC_OK) { cu_statusf(_BROKER, s, @@ -697,17 +589,27 @@ CLASSNAME(ref), base, NAMESPACE(ref)); - + + if (resource_type == CIM_RES_TYPE_MEM) + *s = mem_template(ref, type, inst); + else if (resource_type == CIM_RES_TYPE_PROC) + *s = proc_template(ref, type, inst); + else if (resource_type == CIM_RES_TYPE_NET) + *s = net_template(ref, type, inst); + else if (resource_type == CIM_RES_TYPE_DISK) + *s = disk_template(ref, type, inst); + else { + cu_statusf(_BROKER, s, + CMPI_RC_ERR_FAILED, + "Unsupported resource type"); + } + + if (s->rc != CMPI_RC_OK) + goto out; + CMSetProperty(inst, "ResourceType", &resource_type, CMPI_uint16); - for (i = 0; prop_list[i].field != NULL; i++) { - CU_DEBUG("Setting property '%s'", prop_list[i].field); - CMSetProperty(inst, prop_list[i].field, - prop_list[i].value, prop_list[i].type); - } - out: - free_rasd_prop_list(prop_list); return inst; } @@ -726,7 +628,7 @@ goto out; } CU_DEBUG("Got inst"); - if (inst != NULL) { + if ((s.rc == CMPI_RC_OK) && (inst != NULL)) { inst_list_add(list, inst); CU_DEBUG("Added inst"); } else { diff -r cbe9f59669b6 -r a2759cb96488 src/Virt_SettingsDefineCapabilities.h --- a/src/Virt_SettingsDefineCapabilities.h Mon Sep 15 14:44:37 2008 -0700 +++ b/src/Virt_SettingsDefineCapabilities.h Thu Oct 02 11:05:13 2008 -0700 @@ -44,12 +44,6 @@ SDC_RANGE_INC = 3, } range; -struct sdc_rasd_prop { - char *field; - CMPIValue *value; - CMPIType type; -}; - /* * Local Variables: * mode: C From kaitlin at linux.vnet.ibm.com Thu Oct 2 19:48:46 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 02 Oct 2008 12:48:46 -0700 Subject: [Libvirt-cim] [PATCH] Add ServiceAffectsElement schema Message-ID: <0a1c174ed64d24a9e308.1222976926@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1222976893 25200 # Node ID 0a1c174ed64d24a9e30872a86e2c206e5789d821 # Parent a2759cb96488a8079a24d8c47223ca5c7c7f3524 Add ServiceAffectsElement schema Signed-off-by: Kaitlin Rupert diff -r a2759cb96488 -r 0a1c174ed64d schema/ServiceAffectsElement.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/ServiceAffectsElement.mof Thu Oct 02 12:48:13 2008 -0700 @@ -0,0 +1,22 @@ +// Copyright IBM Corp. 2008 + +[Association, + Provider("cmpi::Virt_ServiceAffectsElement") +] +class Xen_ServiceAffectsElement : CIM_ServiceAffectsElement +{ +}; + +[Association, + Provider("cmpi::Virt_ServiceAffectsElement") +] +class KVM_ServiceAffectsElement : CIM_ServiceAffectsElement +{ +}; + +[Association, + Provider("cmpi::Virt_ServiceAffectsElement") +] +class LXC_ServiceAffectsElement : CIM_ServiceAffectsElement +{ +}; diff -r a2759cb96488 -r 0a1c174ed64d schema/ServiceAffectsElement.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/ServiceAffectsElement.registration Thu Oct 02 12:48:13 2008 -0700 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_ServiceAffectsElement root/virt Virt_ServiceAffectsElement Virt_ServiceAffectsElement association +KVM_ServiceAffectsElement root/virt Virt_ServiceAffectsElement Virt_ServiceAffectsElement association +LXC_ServiceAffectsElement root/virt Virt_ServiceAffectsElement Virt_ServiceAffectsElement association From danms at us.ibm.com Thu Oct 2 21:11:47 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 02 Oct 2008 14:11:47 -0700 Subject: [Libvirt-cim] [PATCH] Add obligatory LXC console Message-ID: <7244474e5d2e118316e1.1222981907@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1222981899 25200 # Node ID 7244474e5d2e118316e1636b06f99acb54062489 # Parent ed51b685c0027aa4a80aab53b96451dbd8084c44 Add obligatory LXC console This will become less naive when we get real modeling for this, but it needs to be there for general usefulness in the time being. For now, just assume a sane default. Signed-off-by: Dan Smith diff -r ed51b685c002 -r 7244474e5d2e libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Thu Oct 02 12:54:29 2008 -0700 +++ b/libxkutil/xmlgen.c Thu Oct 02 14:11:39 2008 -0700 @@ -617,6 +617,16 @@ return strdup("\n"); } +static int console_xml(struct domain *dominfo, + char **xml) +{ + if (dominfo->type == DOMAIN_LXC) { + astrcat(xml, "\n"); + } + + return 0; +} + char *system_to_xml(struct domain *dominfo) { char *devxml = strdup(""); @@ -668,6 +678,8 @@ 1, graphics_to_xml); + console_xml(dominfo, &devxml); + concat_devxml(&sysdevxml, dominfo->dev_mem, dominfo->dev_mem_ct, From jfehlig at novell.com Thu Oct 2 21:08:34 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Thu, 02 Oct 2008 15:08:34 -0600 Subject: [Libvirt-cim] [PATCH] Add ServiceAffectsElement schema In-Reply-To: <0a1c174ed64d24a9e308.1222976926@localhost.localdomain> References: <0a1c174ed64d24a9e308.1222976926@localhost.localdomain> Message-ID: <48E53852.8040309@novell.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1222976893 25200 > # Node ID 0a1c174ed64d24a9e30872a86e2c206e5789d821 > # Parent a2759cb96488a8079a24d8c47223ca5c7c7f3524 > Add ServiceAffectsElement schema > +1. Needed to fix 'make dist' after related patches were pushed :-). Jim From kaitlin at linux.vnet.ibm.com Thu Oct 2 22:19:22 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 02 Oct 2008 15:19:22 -0700 Subject: [Libvirt-cim] [PATCH] Add obligatory LXC console In-Reply-To: <7244474e5d2e118316e1.1222981907@guaranine.danplanet.com> References: <7244474e5d2e118316e1.1222981907@guaranine.danplanet.com> Message-ID: <48E548EA.2000202@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1222981899 25200 > # Node ID 7244474e5d2e118316e1636b06f99acb54062489 > # Parent ed51b685c0027aa4a80aab53b96451dbd8084c44 > Add obligatory LXC console > > This will become less naive when we get real modeling for this, but it > needs to be there for general usefulness in the time being. For now, > just assume a sane default. +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:10 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:10 -0700 Subject: [Libvirt-cim] [PATCH 02 of 10] [TEST] Updating ElementCapabilities 05_hostsystem_cap.py tc for Association parameter changes In-Reply-To: Message-ID: <01ae33b1d27a009ef040.1223037550@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1223019216 25200 # Node ID 01ae33b1d27a009ef0401cd55797825ff7771a72 # Parent 2705a9d336f7b6285cc4c7500002c8efcd1c53ba [TEST] Updating ElementCapabilities 05_hostsystem_cap.py tc for Association parameter changes . Signed-off-by: Deepti B. Kalakeri diff -r 2705a9d336f7 -r 01ae33b1d27a suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Oct 03 00:31:46 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Fri Oct 03 00:33:36 2008 -0700 @@ -88,7 +88,6 @@ def get_assoc_info(server, cn, an, qcn, assoc_info = AssociatorNames(server, an, cn, - virt, CreationClassName = cn, Name = name,) if len(assoc_info) < 1: @@ -112,7 +111,6 @@ def get_association_info(server, service assoc_info = AssociatorNames(server, an, cn, - virt, CreationClassName = cn, Name = name, SystemCreationClassName=sccname, From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:12 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:12 -0700 Subject: [Libvirt-cim] [PATCH 04 of 10] [TEST] Fixed and updating ElementSettingData tc for Association parameter changes In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1223022789 25200 # Node ID fae408bcf9a3cac00a84499ea01b9606ca51defa # Parent fb25a0a695a9389ee4608d1b61a9c39b2f84644c [TEST] Fixed and updating ElementSettingData tc for Association parameter changes 1) Fixed the log stmt of 01_forward.py tc and updated it for Association parameter changes 2) updated 03_esd_assoc_with_rasd_errs.py for Association parameter changes Signed-off-by: Deepti B. Kalakeri diff -r fb25a0a695a9 -r fae408bcf9a3 suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri Oct 03 00:43:08 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Fri Oct 03 01:33:09 2008 -0700 @@ -83,21 +83,22 @@ def get_inst(ip, virt, cn, key): def test_assoc(host, acn, cn, virt, inst): id = inst.InstanceID - + acn = get_typed_class(virt, acn) + cn = get_typed_class(virt, cn) try: - ret_inst = Associators(host, acn, cn, virt, InstanceID=id) + ret_inst = Associators(host, acn, cn, InstanceID=id) except Exception: logger.error(CIM_ERROR_ASSOCIATORS, acn) return FAIL if len(ret_inst) != 1: - logger.error("%s returned %i %s instances" % (an, len(ret_inst), cn)) + logger.error("%s returned %i %s instances", acn, len(ret_inst), cn) return FAIL ret_id = ret_inst[0]['InstanceID'] if ret_id != id: - logger.error("%s returned %s inst with wrong id %s" % (acn, cn, ret_id)) + logger.error("%s returned %s inst with wrong id %s", acn, cn, ret_id) return FAIL status = compare_all_prop(ret_inst[0], inst) diff -r fb25a0a695a9 -r fae408bcf9a3 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 Oct 03 00:43:08 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Fri Oct 03 01:33:09 2008 -0700 @@ -94,11 +94,12 @@ def main(): if options.virt == "XenFV": options.virt = "Xen" try: + an = get_typed_class(options.virt, vssdc_cn) + cn = get_typed_class(options.virt, vssd_cn) instid = '%s:%s' % (options.virt, test_dom) - rasd_list = assoc.Associators(options.ip, vssdc_cn, vssd_cn, - options.virt, InstanceID=instid) + rasd_list = assoc.Associators(options.ip, an, cn, InstanceID=instid) except Exception: - logger.error(CIM_ERROR_ASSOCIATORS, vssdc_cn) + logger.error(CIM_ERROR_ASSOCIATORS, an) cxml.destroy(options.ip) cxml.undefine(options.ip) return FAIL From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:11 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:11 -0700 Subject: [Libvirt-cim] [PATCH 03 of 10] [TEST] Updating ElementConforms 02_reverse.py tc for Association parameter changes In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1223019788 25200 # Node ID fb25a0a695a9389ee4608d1b61a9c39b2f84644c # Parent 01ae33b1d27a009ef0401cd55797825ff7771a72 [TEST] Updating ElementConforms 02_reverse.py tc for Association parameter changes Signed-off-by: Deepti B. Kalakeri diff -r 01ae33b1d27a -r fb25a0a695a9 suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Oct 03 00:33:36 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Oct 03 00:43:08 2008 -0700 @@ -143,10 +143,10 @@ def main(): for item in inst_list: cn = item.CreationClassName name = item.Name + an = get_typed_class(options.virt, "ElementConformsToProfile") profs = assoc.Associators(options.ip, - "ElementConformsToProfile", + an, cn, - options.virt, CreationClassName=cn, Name=name) if len(profs) != 1: From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:13 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:13 -0700 Subject: [Libvirt-cim] [PATCH 05 of 10] [TEST] Updating HS tc's for Association parameter changes In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1223024080 25200 # Node ID c005ad2d0cd20f21ea75ec35b0476a9ea98a36ce # Parent fae408bcf9a3cac00a84499ea01b9606ca51defa [TEST] Updating HS tc's for Association parameter changes Updated 02_hostsystem_to_rasd.py, 03_hs_to_settdefcap.py, 04_hs_to_EAPF.py, 06_hs_to_vsms.py for Association parameter changes. Signed-off-by: Deepti B. Kalakeri diff -r fae408bcf9a3 -r c005ad2d0cd2 suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Oct 03 01:33:09 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Fri Oct 03 01:54:40 2008 -0700 @@ -119,7 +119,6 @@ def get_assoc_info(server, cn, an, qcn, assoc_info = AssociatorNames(server, an, cn, - virt, CreationClassName = cn, Name = name) if len(assoc_info) < 1: @@ -157,7 +156,6 @@ def verify_RASD_values(server, sd_assoc_ assoc_info = Associators(server, an, cn, - virt, DeviceID = devid, CreationClassName = cn, SystemName = test_dom, diff -r fae408bcf9a3 -r c005ad2d0cd2 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Oct 03 01:33:09 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Fri Oct 03 01:54:40 2008 -0700 @@ -128,7 +128,6 @@ def get_hostrespool(server, hostsys, cls assoc_info = Associators(server, an1, ccn1, - virt, CreationClassName = clsname, Name = hostsys) if len(assoc_info) < 4: @@ -167,10 +166,9 @@ def get_alloccap(server, devpool, virt=" for inst in devpool: try: assoc_info = Associators(server, - an, - inst.classname, - virt, - InstanceID = inst['InstanceID']) + an, + inst.classname, + InstanceID = inst['InstanceID']) if len(assoc_info) < 1: logger.error("ElementCapabilities has returned %i objects", len(assoc_info)) @@ -221,7 +219,6 @@ def get_rasddetails(server, alloccap, vi assoc_info = Associators(server, an, ccn, - virt, InstanceID = ap['InstanceID']) if len(assoc_info) != 4: diff -r fae408bcf9a3 -r c005ad2d0cd2 suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Oct 03 01:33:09 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Oct 03 01:54:40 2008 -0700 @@ -154,7 +154,6 @@ def get_assocname_info(server, cn, an, q assoc_info = AssociatorNames(server, an, cn, - virt, CreationClassName=cn, Name = hostname) if len(assoc_info) < 1: @@ -184,7 +183,7 @@ def verify_eafp_values(server, in_pllist for cn, instid in sorted(in_pllist.items()): qcn = cn try: - assoc_info = Associators(server, an, cn, virt, InstanceID = instid) + assoc_info = Associators(server, an, cn, InstanceID = instid) inst_list = get_inst_for_dom(assoc_info) status = check_len(an, inst_list, qcn, exp_len) if status != PASS: diff -r fae408bcf9a3 -r c005ad2d0cd2 suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py --- a/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Oct 03 01:33:09 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/06_hs_to_vsms.py Fri Oct 03 01:54:40 2008 -0700 @@ -85,9 +85,11 @@ def get_assocnames_info(server, cn, an, status = PASS assoc_info = [] try: - assoc_info = AssociatorNames(server, an, cn, virt, Name = name, CreationClassName = cn) + assoc_info = AssociatorNames(server, an, cn, Name = name, + CreationClassName = cn) if len(assoc_info) < 0 : - logger.error("%s returned %i %s objects, expected atleast 3", an, len(assoc_info), qcn) + logger.error("%s returned %i %s objects, expected atleast 3", + an, len(assoc_info), qcn) status = FAIL except Exception, detail: print_err(CIM_ERROR_ASSOCIATORNAMES, detail, an) @@ -120,8 +122,10 @@ def get_vsmcap_from_ec(vsms_list): sccn = vsms_info['SystemCreationClassName'] assoc_info = [] try: - assoc_info = AssociatorNames(server, assoc_name, cn, virt, CreationClassName = cn, - SystemName = sn, Name = name, SystemCreationClassName = sccn) + assoc_info = AssociatorNames(server, assoc_name, cn, + CreationClassName = cn, + SystemName = sn, Name = name, + SystemCreationClassName = sccn) if len(assoc_info) != 1: logger.error("%s returned %i %s objects, expected only 1", assoc_name, len(assoc_info), req_cn) status = FAIL @@ -139,10 +143,11 @@ def get_vsmsd_from_sdc(vsmsd_list): instid = vsmsd_info['InstanceID'] assoc_info = [] try: - assoc_info = Associators(server, assoc_name, cn, virt, CreationClassName = cn, - InstanceID = instid) + assoc_info = Associators(server, assoc_name, cn, + CreationClassName = cn, InstanceID = instid) if len(assoc_info) != 1: - logger.error("%s returned %i %s objects, expected only 1", assoc_name, len(assoc_info), req_cn) + logger.error("%s returned %i %s objects, expected only 1", + assoc_name, len(assoc_info), req_cn) status = FAIL except Exception, detail: From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:14 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:14 -0700 Subject: [Libvirt-cim] [PATCH 06 of 10] [TEST] Fixing and Updating HostedDependency and HostedService tc for Association parameter changes In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1223027430 25200 # Node ID f3b93c41440495aca1d37f6a135ebe0644a3a574 # Parent c005ad2d0cd20f21ea75ec35b0476a9ea98a36ce [TEST] Fixing and Updating HostedDependency and HostedService tc for Association parameter changes 1) Upated HostedDependency - 01_forward.py for Association parameter changes. 2) Fixed HostedService - 01_forward.py to include the ConsoleRedirectionService. Included get_host_info() to get the host information. Included check to verify if the service and the list used for the verification is the same. Updated it for Association parameter changes. 333) Fixed HostedService - 02_reverse.py log stmt Included get_host_info() to get the host information. Updated it for Association parameter changes. Signed-off-by: Deepti B. Kalakeri diff -r c005ad2d0cd2 -r f3b93c414404 suites/libvirt-cim/cimtest/HostedDependency/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Oct 03 01:54:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Oct 03 02:50:30 2008 -0700 @@ -49,7 +49,7 @@ from XenKvmLib import vxml from XenKvmLib import vxml from XenKvmLib import assoc from XenKvmLib import enumclass -from XenKvmLib.classes import get_class_basename +from XenKvmLib.classes import get_typed_class from CimTest.Globals import CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS, logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL @@ -92,12 +92,12 @@ def main(): cxml.undefine(server) return FAIL - hs_cn = "HostedDependency" + hs_cn = get_typed_class(virt, "HostedDependency") try: for system in cs: - ccn = get_class_basename(system.CreationClassName) - hs = assoc.Associators(server, hs_cn, ccn, virt, - CreationClassName=system.CreationClassName, + ccn = system.CreationClassName + hs = assoc.Associators(server, hs_cn, ccn, + CreationClassName=ccn, Name=system.name) if not hs: diff -r c005ad2d0cd2 -r f3b93c414404 suites/libvirt-cim/cimtest/HostedService/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Oct 03 01:54:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Oct 03 02:50:30 2008 -0700 @@ -30,40 +30,52 @@ from XenKvmLib.const import do_main from XenKvmLib.const import do_main from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL +from XenKvmLib.common_util import get_host_info sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @do_main(sup_types) def main(): options = main.options - keys = ['Name', 'CreationClassName'] + virt = options.virt try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] - except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.name) - return FAIL - try: + status, host_name, host_ccn = get_host_info(options.ip, virt) + if status != PASS: + logger.error("Failed to get host info.") + return status + + an = get_typed_class(virt, "HostedService") service = assoc.AssociatorNames(options.ip, - "HostedService", - "HostSystem", - options.virt, - CreationClassName = host_sys.CreationClassName, - Name = host_sys.Name) - except Exception: - logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % host_sys.Name) + an, host_ccn, + CreationClassName = host_ccn, + Name = host_name) + except Exception, deatils: + logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % host_name) + logger.error("Exception: details %s", details) return FAIL if service == None: logger.error("No association return") return FAIL - valid_services = [get_typed_class(options.virt, "ResourcePoolConfigurationService"), - get_typed_class(options.virt, "VirtualSystemManagementService"), - get_typed_class(options.virt, "VirtualSystemMigrationService")] + valid_services = [get_typed_class(virt, "ResourcePoolConfigurationService"), + get_typed_class(virt, "VirtualSystemManagementService"), + get_typed_class(virt, "VirtualSystemMigrationService"), + get_typed_class(virt, "ConsoleRedirectionService")] + + ccn_list = [] for item in service: - ccn = item.keybindings["CreationClassName"] + ccn_list.append(item.keybindings["CreationClassName"]) + + if len(ccn_list) != len(valid_services): + logger.error("'%s' returned %d, expected %d", + an, len(valid_services), len(ccn_list)) + return FAIL + + for ccn in ccn_list: if ccn not in valid_services: - logger.error("HostedService association to associate HostSystem and %s is wrong " % ccn) + logger.error("Invalid Value '%s' returned for association '%s'", + ccn, an) return FAIL diff -r c005ad2d0cd2 -r f3b93c414404 suites/libvirt-cim/cimtest/HostedService/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Fri Oct 03 01:54:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Fri Oct 03 02:50:30 2008 -0700 @@ -30,47 +30,49 @@ from XenKvmLib.const import do_main from XenKvmLib.const import do_main from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL +from XenKvmLib.common_util import get_host_info sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @do_main(sup_types) def main(): options = main.options - keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] - except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % host_sys.CreationClassName) - return FAIL + virt = options.virt + servicelist = {"ResourcePoolConfigurationService" : "RPCS", "VirtualSystemManagementService" : "Management Service", "VirtualSystemMigrationService" : "MigrationService"} + + status, host_name, host_ccn = get_host_info(options.ip, virt) + if status != PASS: + logger.error("Failed to get host info.") + return status + an = get_typed_class(virt, "HostedService") for k, v in servicelist.iteritems(): + cn = get_typed_class(virt, k) try: - assoc_host = assoc.AssociatorNames(options.ip, - "HostedService", - k, - options.virt, + assoc_host = assoc.AssociatorNames(options.ip, an, cn, Name = v, - CreationClassName = get_typed_class(options.virt, k), - SystemCreationClassName = host_sys.CreationClassName, - SystemName = host_sys.Name) + CreationClassName = cn, + SystemCreationClassName = host_ccn, + SystemName = host_name) except Exception: - logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % item) + logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, an) return FAIL if len(assoc_host) != 1: - logger.error("Too many hosts error") + logger.error("Too many hosts") return FAIL ccn = assoc_host[0].keybindings['CreationClassName'] name = assoc_host[0].keybindings['Name'] - if ccn != get_typed_class(options.virt, "HostSystem"): + if ccn != host_ccn: logger.error("CreationClassName Error") return FAIL - elif name != host_sys.Name: + + elif name != host_name: logger.error("CCN Error") return FAIL From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:16 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:16 -0700 Subject: [Libvirt-cim] [PATCH 08 of 10] [TEST] Updated RASD, ReferencedProfile, RAFP tc for Association parameter changes In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1223029001 25200 # Node ID ea47af48530d8cdfe804deb7367e0e586a2df0d7 # Parent 84f0b85c6afc80ac8f54dbea8713503e695bdcd1 [TEST] Updated RASD, ReferencedProfile, RAFP tc for Association parameter changes Updated the following tc for Association parameter changes RASD/01_verify_rasd_fields.py ReferencedProfile/01_verify_refprof.py ResourceAllocationFromPool/01_forward.py ResourceAllocationFromPool/02_reverse.py Signed-off-by: Deepti B. Kalakeri diff -r 84f0b85c6afc -r ea47af48530d suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py --- a/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Fri Oct 03 02:56:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Fri Oct 03 03:16:41 2008 -0700 @@ -113,15 +113,17 @@ def assoc_values(assoc_info, xml, disk, @do_main(sup_types) def main(): options = main.options + virt = options.virt status = PASS + destroy_and_undefine_all(options.ip) - if options.virt == 'Xen': + if virt == 'Xen': test_disk = 'xvda' else: test_disk = 'hda' - virt_xml = vxml.get_class(options.virt) - if options.virt == 'LXC': + virt_xml = vxml.get_class(virt) + if virt == 'LXC': cxml = virt_xml(test_dom) else: cxml = virt_xml(test_dom, mem=test_mem, vcpus = test_vcpus, @@ -133,21 +135,20 @@ def main(): if status == 1: destroy_and_undefine_all(options.ip) return FAIL - if options.virt == "XenFV": + if virt == "XenFV": instIdval = "Xen:%s" % test_dom else: - instIdval = "%s:%s" % (options.virt, test_dom) + instIdval = "%s:%s" % (virt, test_dom) - vssdc_cn = 'VirtualSystemSettingDataComponent' - vssd_cn = 'VirtualSystemSettingData' + vssdc_cn = get_typed_class(virt, 'VirtualSystemSettingDataComponent') + vssd_cn = get_typed_class(virt, 'VirtualSystemSettingData') try: assoc_info = assoc.Associators(options.ip, vssdc_cn, vssd_cn, - options.virt, InstanceID = instIdval) - status = assoc_values(assoc_info, cxml, test_disk, options.virt) + status = assoc_values(assoc_info, cxml, test_disk, virt) except Exception, details: logger.error(Globals.CIM_ERROR_ASSOCIATORS, - get_typed_class(options.virt, vssdc_cn)) + get_typed_class(virt, vssdc_cn)) logger.error("Exception : %s" % details) status = FAIL diff -r 84f0b85c6afc -r ea47af48530d suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py --- a/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Fri Oct 03 02:56:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Fri Oct 03 03:16:41 2008 -0700 @@ -138,7 +138,7 @@ def get_refprof_verify_info(proflist): for instid in proflist: try: assoc_info = Associators(server, assoc_name, reg_classname, - virt, InstanceID = instid, + InstanceID = instid, CreationClassName = reg_classname) if len(assoc_info) < 1: logger.error("%s returned %i %s objects, expected atleast 1", diff -r 84f0b85c6afc -r ea47af48530d suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri Oct 03 02:56:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Fri Oct 03 03:16:41 2008 -0700 @@ -86,10 +86,10 @@ def get_instance(server, pool, list, vir def verify_rasd(server, assoc_cn, cn, virt, list, rasd): try: + assoc_cn = get_typed_class(virt, assoc_cn) data = assoc.AssociatorNames(server, assoc_cn, - cn, - virt, + get_typed_class(virt, cn), InstanceID=list) except Exception: logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % cn) diff -r 84f0b85c6afc -r ea47af48530d suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri Oct 03 02:56:24 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Fri Oct 03 03:16:41 2008 -0700 @@ -116,8 +116,9 @@ def verify_pool_from_RAFP(server, virt, def verify_pool_from_RAFP(server, virt, inst, pool_id, cn): pool = [] try: - pool = assoc.AssociatorNames(server, "ResourceAllocationFromPool", - cn, virt, InstanceID = inst.InstanceID) + an = get_typed_class(virt, "ResourceAllocationFromPool") + cn = get_typed_class(virt, cn) + pool = assoc.AssociatorNames(server, an, cn, InstanceID=inst.InstanceID) except Exception: logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES, inst.InstanceID) return FAIL From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:15 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:15 -0700 Subject: [Libvirt-cim] [PATCH 07 of 10] [TEST] Updated devices.py for Association parameter changes In-Reply-To: Message-ID: <84f0b85c6afc80ac8f54.1223037555@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1223027784 25200 # Node ID 84f0b85c6afc80ac8f54dbea8713503e695bdcd1 # Parent f3b93c41440495aca1d37f6a135ebe0644a3a574 [TEST] Updated devices.py for Association parameter changes Signed-off-by: Deepti B. Kalakeri diff -r f3b93c414404 -r 84f0b85c6afc suites/libvirt-cim/lib/XenKvmLib/devices.py --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Fri Oct 03 02:50:30 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Fri Oct 03 02:56:24 2008 -0700 @@ -137,13 +137,10 @@ def device_of(server, key_list): return t(server, key_list) def get_dom_devs(vs_type, ip, dom_name): - cn = "ComputerSystem" - - devs = assoc.AssociatorNames(ip, "SystemDevice", - cn, - vs_type, - Name=dom_name, - CreationClassName= get_typed_class(vs_type, cn)) + cn = get_typed_class(vs_type, "ComputerSystem") + an = get_typed_class(vs_type, "SystemDevice") + devs = assoc.AssociatorNames(ip, an, cn, Name=dom_name, + CreationClassName= cn) if devs == None: Globals.logger.error("System association failed") return 1 From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:18 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:18 -0700 Subject: [Libvirt-cim] [PATCH 10 of 10] [TEST] Updating VSSD, VSMS, ElementCapabilities, ElementConforms tc for Association parameter changes In-Reply-To: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1223037335 25200 # Node ID e437224852a71d5123f66c998a15d7893e1528dc # Parent 93041fa7f05b5db0ef3aeb9fbcf072c5d427454f [TEST] Updating VSSD, VSMS, ElementCapabilities, ElementConforms tc for Association parameter changes 1) updated 04_vssd_to_rasd.py for Association parameter changes 2) updated 12_referenced_config.py, 13_refconfig_additional_devs.py for Association parameter changes 3) updated VirtualSystemSettingDataComponent - 01_forward.py, 02_reverse.py for Association parameter changes. 4) updated ElementCapabilities - 01_forward.py for Association parameter changes 5) updated ElementConforms - 01_forward.py for Association parameter changes Signed-off-by: Deepti B. Kalakeri diff -r 93041fa7f05b -r e437224852a7 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Oct 03 03:37:16 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Oct 03 05:35:35 2008 -0700 @@ -31,6 +31,7 @@ from XenKvmLib.const import do_main from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP from XenKvmLib.enumclass import enumerate +from XenKvmLib.common_util import get_host_info sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -60,22 +61,21 @@ def main(): options = main.options server = options.ip virt = options.virt - keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(server, 'HostSystem', keys, virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE, get_typed_class(virt, 'HostSystem')) - return FAIL + + status, host_name, host_ccn = get_host_info(server, virt) + if status != PASS: + logger.error("Failed to get host info") + return status + try: + an = get_typed_class(virt, "ElementCapabilities") elc = assoc.AssociatorNames(server, - "ElementCapabilities", - "HostSystem", - virt, - Name = host_sys.Name, - CreationClassName = host_sys.CreationClassName) + an, host_ccn, + Name = host_name, + CreationClassName = host_ccn) except Exception: - logger.error(CIM_ERROR_ASSOCIATORNAMES % host_sys.Name) + logger.error(CIM_ERROR_ASSOCIATORNAMES, an) return FAIL @@ -107,10 +107,7 @@ def main(): for system in cs: try: elec = assoc.AssociatorNames(server, - "ElementCapabilities", - "ComputerSystem", - virt, - Name = system, + an, ccn, Name = system, CreationClassName = ccn) except Exception: logger.error(CIM_ERROR_ASSOCIATORNAMES % system) diff -r 93041fa7f05b -r e437224852a7 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Oct 03 03:37:16 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Oct 03 05:35:35 2008 -0700 @@ -160,8 +160,8 @@ def get_proflist(server, reg_classname, def verify_ectp_assoc(server, virt): - reg_classname = "RegisteredProfile" - an = "ElementConformsToProfile" + reg_classname = get_typed_class(virt, "RegisteredProfile") + an = get_typed_class(virt,"ElementConformsToProfile") status, inst_lst = get_proflist(server, reg_classname, virt) if status != PASS: @@ -174,7 +174,6 @@ def verify_ectp_assoc(server, virt): assoc_info = assoc.Associators(server, an, reg_classname, - virt, InstanceID = devid) if len(assoc_info) < 1: status = FAIL diff -r 93041fa7f05b -r e437224852a7 suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py --- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Oct 03 03:37:16 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Oct 03 05:35:35 2008 -0700 @@ -145,12 +145,14 @@ def get_rasd_values_from_vssdc_assoc(vss qcn = vssd_values[0].classname assoc_cname = get_typed_class(virt, 'VirtualSystemSettingDataComponent') try: - vssdc_assoc_info = assoc.Associators(server, assoc_cname, qcn, virt, InstanceID = instIdval) + vssdc_assoc_info = assoc.Associators(server, assoc_cname, qcn, + InstanceID = instIdval) if len(vssdc_assoc_info) == 1 and \ vssdc_assoc_info[0].classname == 'LXC_MemResourceAllocationSettingData': logger.info("%s returned expect objects" % assoc_cname) elif len(vssdc_assoc_info) < 4: - logger.error("%s returned %i %s objects, expected 4" % (assoc_cname, len(vssdc_assoc_info), qcn)) + logger.error("%s returned %i %s objects, expected 4", + assoc_cname, len(vssdc_assoc_info), qcn) status = FAIL except Exception, details: diff -r 93041fa7f05b -r e437224852a7 suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Fri Oct 03 03:37:16 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/12_referenced_config.py Fri Oct 03 05:35:35 2008 -0700 @@ -69,8 +69,8 @@ def get_vssd_ref(ip, virt): cn = "ComputerSystem" ccn = get_typed_class(virt, cn) - vssd = AssociatorNames(ip, 'SettingsDefineState', cn, virt=virt, - Name = test_dom, CreationClassName = ccn) + an = get_typed_class(virt, 'SettingsDefineState') + vssd = AssociatorNames(ip, an, ccn, Name = test_dom, CreationClassName = ccn) if len(vssd) != 1: logger.error("Returned %i vssd insts for '%s'", len(vssd), test_dom) diff -r 93041fa7f05b -r e437224852a7 suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Fri Oct 03 03:37:16 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Fri Oct 03 05:35:35 2008 -0700 @@ -48,8 +48,8 @@ def get_vssd_ref(ip, virt): cn = "ComputerSystem" ccn = get_typed_class(virt, cn) - vssd = AssociatorNames(ip, 'SettingsDefineState', cn, virt=virt, - Name = test_dom, CreationClassName = ccn) + an = get_typed_class(virt, 'SettingsDefineState') + vssd = AssociatorNames(ip, an, ccn, Name = test_dom, CreationClassName = ccn) if len(vssd) != 1: logger.error("Returned %i vssd insts for '%s'", len(vssd), test_dom) diff -r 93041fa7f05b -r e437224852a7 suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Fri Oct 03 03:37:16 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Fri Oct 03 05:35:35 2008 -0700 @@ -166,8 +166,9 @@ def main(): # Xen_VirtualSystemSettingDataComponent with each class in RASD_cllist an = get_typed_class(options.virt, 'VirtualSystemSettingDataComponent') for rasd_cname, prop in prop_list.iteritems(): + logger.error("DEBUG rasd_cname is %s", rasd_cname) assoc_info = assoc.Associators(options.ip, an, rasd_cname, - options.virt, InstanceID = prop) + InstanceID = prop) # Verify the association fields returned for particular rasd_cname. status = assoc_values(options.ip, assoc_info, rasd_cname, an, vssd) diff -r 93041fa7f05b -r e437224852a7 suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Fri Oct 03 03:37:16 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py Fri Oct 03 05:35:35 2008 -0700 @@ -156,10 +156,9 @@ def main(): instIdval = "%s:%s" % (options.virt, test_dom) try: - assoc_info = assoc.AssociatorNames(options.ip, - 'VirtualSystemSettingDataComponent', - 'VirtualSystemSettingData', - options.virt, + an = get_typed_class(options.virt, 'VirtualSystemSettingDataComponent') + cn = get_typed_class(options.virt, 'VirtualSystemSettingData') + assoc_info = assoc.AssociatorNames(options.ip, an, cn, InstanceID = instIdval) status = assoc_values(options.ip, assoc_info, options.virt) except Exception, detail : From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:17 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:17 -0700 Subject: [Libvirt-cim] [PATCH 09 of 10] [TEST] Fixing and updating SettingDefine and SystemDevice tc for Association parameter changes In-Reply-To: Message-ID: <93041fa7f05b5db0ef3a.1223037557@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1223030236 25200 # Node ID 93041fa7f05b5db0ef3aeb9fbcf072c5d427454f # Parent ea47af48530d8cdfe804deb7367e0e586a2df0d7 [TEST] Fixing and updating SettingDefine and SystemDevice tc for Association parameter changes 1) updated 01_forward.py for Association parameter changes 2) updated 02_reverse.py for Association parameter changes Fixed BaseException, included Exception instead 3) updated SystemDevice 01_forward.py for Association parameter changes 4) updated SystemDevice 02_reverse.py for Association parameter changes Signed-off-by: Deepti B. Kalakeri diff -r ea47af48530d -r 93041fa7f05b suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Fri Oct 03 03:16:41 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Fri Oct 03 03:37:16 2008 -0700 @@ -111,9 +111,8 @@ def main(): for cn in logelelst.keys(): try: ccn = get_typed_class(options.virt, cn) - assoc_info = assoc.AssociatorNames(options.ip, - 'SettingsDefineState', - cn, virt=options.virt, + an = get_typed_class(options.virt, 'SettingsDefineState') + assoc_info = assoc.AssociatorNames(options.ip, an, ccn, DeviceID = logelelst[cn], CreationClassName = ccn, SystemName = test_dom, diff -r ea47af48530d -r 93041fa7f05b suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Fri Oct 03 03:16:41 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Fri Oct 03 03:37:16 2008 -0700 @@ -74,10 +74,10 @@ def call_assoc(ip, inst, exp_id, ccn, vi return FAIL try: - associnf = assoc.Associators(ip, 'SettingsDefineState', - ccn, virt, - InstanceID = exp_id) - except BaseException, detail : + an = get_typed_class(virt, 'SettingsDefineState') + ccn = get_typed_class(virt, ccn) + associnf = assoc.Associators(ip, an, ccn, InstanceID = exp_id) + except Exception, detail : logger.error("Exception %s " % detail) logger.error("Error while associating Xen_SettingsDefineState with %s" % ccn) @@ -108,7 +108,7 @@ def VSSDCAssoc(ip, assocn, virt): logger.error("Mistmatching value for VSSDComponent association") break - except BaseException, detail : + except Exception, detail : logger.error("Exception in VSSDCAssoc function: %s" % detail) status = FAIL @@ -142,7 +142,7 @@ def SettingsDefineStateAssoc(ip, associn logger.error("Mistmatching value for SettingsDefineState assoc") break - except BaseException, detail : + except Exception, detail : logger.error("Exception in SettingsDefineStateAssoc function: %s" % detail) status = FAIL @@ -201,12 +201,11 @@ def main(): try: assocn = assoc.AssociatorNames(options.ip, vssdc_cn, vssd_cn, - virt = options.virt, InstanceID = instIdval) status = VSSDCAssoc(options.ip, assocn, options.virt) - except BaseException, detail : + except Exception, detail : logger.error(Globals.CIM_ERROR_ASSOCIATORS, vssdc_cn) logger.error("Exception : %s" % detail) status = FAIL diff -r ea47af48530d -r 93041fa7f05b suites/libvirt-cim/cimtest/SystemDevice/01_forward.py --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Fri Oct 03 03:16:41 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Fri Oct 03 03:37:16 2008 -0700 @@ -64,7 +64,6 @@ def main(): cs_classname = get_typed_class(options.virt, 'ComputerSystem') devs = assoc.AssociatorNames(options.ip, sd_classname, cs_classname, - virt=options.virt, Name=test_dom, CreationClassName=cs_classname) if devs == None: logger.error("System association failed") diff -r ea47af48530d -r 93041fa7f05b suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py --- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri Oct 03 03:16:41 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri Oct 03 03:37:16 2008 -0700 @@ -33,6 +33,7 @@ from CimTest.Globals import logger from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.common_util import get_typed_class sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -70,12 +71,13 @@ def main(): continue try: - systems = assoc.AssociatorNames(options.ip, - "SystemDevice", items, virt=options.virt, - DeviceID=dev.DeviceID, - CreationClassName=dev.CreationClassName, - SystemName=dev.SystemName, - SystemCreationClassName=dev.SystemCreationClassName) + an = get_typed_class(options.virt, "SystemDevice") + cn = dev.CreationClassName + systems = assoc.AssociatorNames(options.ip, an, cn, + DeviceID=dev.DeviceID, + CreationClassName=cn, + SystemName=dev.SystemName, + SystemCreationClassName=dev.SystemCreationClassName) except Exception, detail: logger.error("Exception: %s" % detail) cxml.destroy(options.ip) From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:08 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:08 -0700 Subject: [Libvirt-cim] [PATCH 00 of 10] [TEST] Association parameter changes. Message-ID: This patchset contains changes to around 27 test cases for Association parameter changes. The changes have been tested with Xen, XenFV( with current sources on RHEL5.2) and with KVM (currents sources, F9). Signed-off-by: Deepti B. Kalakeri From deeptik at linux.vnet.ibm.com Fri Oct 3 12:39:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 05:39:09 -0700 Subject: [Libvirt-cim] [PATCH 01 of 10] [TEST] Updating 02_reverse.py of EAFP for Association parameter changes In-Reply-To: Message-ID: <2705a9d336f7b6285cc4.1223037549@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1223019106 25200 # Node ID 2705a9d336f7b6285cc4c7500002c8efcd1c53ba # Parent 0f1b710a1eb30ca3721930575b59db37a924c6f0 [TEST] Updating 02_reverse.py of EAFP for Association parameter changes . Signed-off-by: Deepti B. Kalakeri diff -r 0f1b710a1eb3 -r 2705a9d336f7 suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Fri Oct 03 00:30:03 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Fri Oct 03 00:31:46 2008 -0700 @@ -137,7 +137,7 @@ def verify_eafp_values(server, virt, in_ an = get_typed_class(virt, "ElementAllocatedFromPool") for cn, instid in sorted(in_pllist.iteritems()): try: - assoc_info = Associators(server, an, cn, virt, InstanceID = instid) + assoc_info = Associators(server, an, cn, InstanceID = instid) assoc_inst_list = get_inst_for_dom(assoc_info) if len(assoc_inst_list) < 1 : logger.error("'%s' with '%s' did not return any records for" From deeptik at linux.vnet.ibm.com Fri Oct 3 12:38:38 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 03 Oct 2008 18:08:38 +0530 Subject: [Libvirt-cim] make error Message-ID: <48E6124E.8010508@linux.vnet.ibm.com> Hi, With the latest libvirt-cim provider sources(revision:704) I see the following error during make. cd .libs && rm -f libVirt_ServiceAffectsElement.la && ln -s ../libVirt_ServiceAffectsElement.la libVirt_ServiceAffectsElement.la) make[3]: Leaving directory `/home/VSM/SRC/libvirt-cim/src' make[2]: Leaving directory `/home/VSM/SRC/libvirt-cim/src' Making all in doc make[2]: Entering directory `/home/VSM/SRC/libvirt-cim/doc' Generating the Web pages make[2]: Leaving directory `/home/VSM/SRC/libvirt-cim/doc' Making all in base_schema make[2]: Entering directory `/home/VSM/SRC/libvirt-cim/base_schema' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/home/VSM/SRC/libvirt-cim/base_schema' make[2]: Entering directory `/home/VSM/SRC/libvirt-cim' make[2]: *** No rule to make target ` ', needed by `all-am'. Stop. make[2]: Leaving directory `/home/VSM/SRC/libvirt-cim' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/VSM/SRC/libvirt-cim' make: *** [all] Error 2 This error is seen on F10 , RHEL5.2 and F9. For now I deleted the Makefile entry for ServiceAffectsElement.mof and the make works fine for me. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Fri Oct 3 13:03:29 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 03 Oct 2008 18:33:29 +0530 Subject: [Libvirt-cim] Extra param in the provider query gives output. Message-ID: <48E61821.3050907@linux.vnet.ibm.com> Hi, I am able to get valid output when I query the providers with the fields other than the key fields. For ex: wbemcli ai -ac Xen_SettingsDefineState 'http://root:P at localhost:5988/root/virt:Xen_Processor.CreationClassName="Xen_Processor",SystemName="Domain-0",DeviceID="Domain-0/0",SystemCreationClassName="Xen_ComputerSystem",*virtinvalid="Xen"*' localhost:5988/root/virt:Xen_ProcResourceAllocationSettingData.InstanceID="Domain-0/proc" -Caption -Description -InstanceID="Domain-0/proc" -ElementName -ConfigurationName -ChangeableType -ResourceType=3 -OtherResourceType -ResourceSubType -PoolID -ConsumerVisibility -HostResource -AllocationUnits -VirtualQuantity=16 -Reservation -Limit=0 -Weight=0 -AutomaticAllocation -AutomaticDeallocation -Parent -Connection -Address -MappingBehavior In the above query I supplied invalid parameter *virtinvalid="Xen" *which is not part of the key fields for querying the provider. I think we should be checking our providers to take only the required key fields. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Fri Oct 3 13:34:52 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 03 Oct 2008 06:34:52 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating some more tc for for Association parameter changes Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1223040869 25200 # Node ID a2cbe9ff6889c49c9a4478a592d3a10b55e64c1a # Parent e437224852a71d5123f66c998a15d7893e1528dc [TEST] Updating some more tc for for Association parameter changes 1) updated CS 41_cs_to_settingdefinestate.py tc. 2) updated HostedResourcePool/01_forward.py 3) updated HostedResourcePool/02_reverse.py 4) SettingsDefineCapabilities/01_forward.py 5) SettingsDefineCapabilities/04_forward_vsmsdata.py Signed-off-by: Deepti B. Kalakeri diff -r e437224852a7 -r a2cbe9ff6889 suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Fri Oct 03 05:35:35 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Fri Oct 03 06:34:29 2008 -0700 @@ -150,8 +150,7 @@ def get_associatornames_info(server, vir an, cn, CreationClassName=cn, - Name = name, - virt=virt) + Name = name) if len(assoc_info) < 1: logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) status = FAIL @@ -171,8 +170,7 @@ def get_associators_info(server, virt, v assoc_info = Associators(server, an, cn, - InstanceID = instid, - virt=virt) + InstanceID = instid) if len(assoc_info) < 1: logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) @@ -239,8 +237,7 @@ def get_SDS_verify_RASD_build_vssdc_inpu DeviceID = devid, CreationClassName = cn, SystemName = test_dom, - SystemCreationClassName = sccn, - virt=virt) + SystemCreationClassName = sccn) # we expect only one RASD record to be returned for each device that is used to # query with the SettingsDefineState association. diff -r e437224852a7 -r a2cbe9ff6889 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Oct 03 05:35:35 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Oct 03 06:34:29 2008 -0700 @@ -52,8 +52,7 @@ def main(): assoc_cn, host_sys.CreationClassName, Name = host_sys.Name, - CreationClassName = host_sys.CreationClassName, - virt = options.virt) + CreationClassName = host_sys.CreationClassName) except Exception, details: logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn) logger.error("Exception:", details) diff -r e437224852a7 -r a2cbe9ff6889 suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Oct 03 05:35:35 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Fri Oct 03 06:34:29 2008 -0700 @@ -59,8 +59,7 @@ def main(): for k, v in poollist.items(): try: - assoc_host = assoc.AssociatorNames(options.ip, assoc_cn, k, InstanceID = v, \ - virt = options.virt) + assoc_host = assoc.AssociatorNames(options.ip, assoc_cn, k, InstanceID = v) except Exception: logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % v) return FAIL diff -r e437224852a7 -r a2cbe9ff6889 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Fri Oct 03 05:35:35 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Fri Oct 03 06:34:29 2008 -0700 @@ -167,7 +167,7 @@ def verify_sdc_with_ac(virt, server, poo for instid in sorted(instlist): try: assoc_info = assoc.Associators(server, assoc_cname, cn, - InstanceID = instid, virt=virt) + InstanceID = instid) if len(assoc_info) != 4: logger.error("%s returned %i ResourcePool objects" "instead 4", assoc_cname, len(assoc_info)) diff -r e437224852a7 -r a2cbe9ff6889 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/04_forward_vsmsdata.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/04_forward_vsmsdata.py Fri Oct 03 05:35:35 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/04_forward_vsmsdata.py Fri Oct 03 06:34:29 2008 -0700 @@ -55,8 +55,7 @@ def main(): qcn = get_typed_class(options.virt, 'VirtualSystemMigrationCapabilities') instid = 'MigrationSettingData' try: - assoc_info = assoc.Associators(server, an, cn, InstanceID = instid, - virt=options.virt) + assoc_info = assoc.Associators(server, an, cn, InstanceID = instid) if len(assoc_info) != 1: logger.error("%s returned %i %s objects", an, len(assoc_info), qcn) return FAIL diff -r e437224852a7 -r a2cbe9ff6889 suites/libvirt-cim/lib/XenKvmLib/assoc.py --- a/suites/libvirt-cim/lib/XenKvmLib/assoc.py Fri Oct 03 05:35:35 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/assoc.py Fri Oct 03 06:34:29 2008 -0700 @@ -45,6 +45,7 @@ def AssociatorNames(host, assoc_cn, clas names = [] try: + logger.error("DEBUG instanceref, is %s", instanceref) names = conn.AssociatorNames(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] @@ -67,6 +68,7 @@ def Associators(host, assoc_cn, classnam names = [] try: + logger.error("DEBUG instanceref, is %s", instanceref) names = conn.Associators(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] From deeptik at linux.vnet.ibm.com Fri Oct 3 13:26:33 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 03 Oct 2008 18:56:33 +0530 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] Association parameter changes and fixing HostedDependency tc to work with sblim-base-providers.wq In-Reply-To: <48E3E0A1.1000806@linux.vnet.ibm.com> References: <48E3E0A1.1000806@linux.vnet.ibm.com> Message-ID: <48E61D89.9050602@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B. Kalakeri wrote: >> Signed-off-by: Deepti B. Kalakeri >> > > This set looks good. However, since the association related patch > breaks all of the tests that call Associators() and AssociatorNames() > using the old parameters, I will wait to apply this set. > > Can you generate a patchset that fixes all of the tests that call > Associators() and AssociatorNames()? I'll apply this set and the EC > patchset, as well as the set that fixes all the calls to Associators() > and AssociatorNames() all at once so that there's nothing breaks in > the process. > > Thanks! After running the test suite and verifying the test cases for associators related changes , total of 35 test cases needed changes to accommodate the associator functions Associators() and AssociatorNames() changes. I have sent the patch set modifying all except for the following tc. HostedDependency - 02_reverse.py HostedDependency - 03_enabledstate.py This is because the changes for the above is already sent as part of the patch set "Association parameter changes and fixing HostedDependency tc to work with sblim-base-providers". Also, for the below tc Memory - 02_defgetmem.py Processor - 02_definesys_get_procs.py The devices.py library needed changes which I submitted with the patch set. Thanks and Regards, Deepti. From danms at us.ibm.com Fri Oct 3 13:56:16 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 03 Oct 2008 06:56:16 -0700 Subject: [Libvirt-cim] [PATCH] Add ServiceAffectsElement schema In-Reply-To: <48E53852.8040309@novell.com> (Jim Fehlig's message of "Thu\, 02 Oct 2008 15\:08\:34 -0600") References: <0a1c174ed64d24a9e308.1222976926@localhost.localdomain> <48E53852.8040309@novell.com> Message-ID: <87fxndvl33.fsf@caffeine.danplanet.com> JF> Needed to fix 'make dist' after related patches were pushed :-). Yeah, that was my fault for not checking the build :D -- 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: 196 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Oct 3 14:25:46 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 07:25:46 -0700 Subject: [Libvirt-cim] make error In-Reply-To: <48E6124E.8010508@linux.vnet.ibm.com> References: <48E6124E.8010508@linux.vnet.ibm.com> Message-ID: <48E62B6A.1020205@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > Hi, > > With the latest libvirt-cim provider sources(revision:704) I see the > following error during make. > > > cd .libs && rm -f libVirt_ServiceAffectsElement.la && ln -s > ../libVirt_ServiceAffectsElement.la libVirt_ServiceAffectsElement.la) > make[3]: Leaving directory `/home/VSM/SRC/libvirt-cim/src' > make[2]: Leaving directory `/home/VSM/SRC/libvirt-cim/src' > Making all in doc > make[2]: Entering directory `/home/VSM/SRC/libvirt-cim/doc' > Generating the Web pages > make[2]: Leaving directory `/home/VSM/SRC/libvirt-cim/doc' > Making all in base_schema > make[2]: Entering directory `/home/VSM/SRC/libvirt-cim/base_schema' > make[2]: Nothing to be done for `all'. > make[2]: Leaving directory `/home/VSM/SRC/libvirt-cim/base_schema' > make[2]: Entering directory `/home/VSM/SRC/libvirt-cim' > make[2]: *** No rule to make target ` ', needed by `all-am'. Stop. > make[2]: Leaving directory `/home/VSM/SRC/libvirt-cim' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/home/VSM/SRC/libvirt-cim' > make: *** [all] Error 2 > > This error is seen on F10 , RHEL5.2 and F9. > For now I deleted the Makefile entry for ServiceAffectsElement.mof and > the make works fine for me. Yes, this was an error on my part. I forgot to include the SAE mof and registration file with my SAE patchset. This issue was resolved by the "Add ServiceAffectsElement schema" patch that I submitted Thursday afternoon. It's in the tree now. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 3 16:47:46 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 09:47:46 -0700 Subject: [Libvirt-cim] [PATCH] Set additional properties of template RASDs Message-ID: <2952b0fb0fef8e77b34c.1223052466@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223052389 25200 # Node ID 2952b0fb0fef8e77b34c04a779ac44b1d092876f # Parent 7244474e5d2e118316e1636b06f99acb54062489 Set additional properties of template RASDs. For Proc: -Set Limit and Weight For Mem: -Set Limit - use same values set for VirtualQuantity For Net: -Set address - get a default mac address For Disk: -Set VirtualDevice, Address, and Mountpoint properties -For Xen, the default is xvda, which is accurate for paravirt, but not for full virt. Signed-off-by: Kaitlin Rupert diff -r 7244474e5d2e -r 2952b0fb0fef src/Makefile.am --- a/src/Makefile.am Thu Oct 02 14:11:39 2008 -0700 +++ b/src/Makefile.am Fri Oct 03 09:46:29 2008 -0700 @@ -131,12 +131,13 @@ -lVirt_VSMigrationService \ -lVirt_DevicePool -libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la +libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la libVirt_VirtualSystemManagementService.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c libVirt_SettingsDefineCapabilities_la_LIBADD = -lVirt_RASD \ -lVirt_DevicePool \ -lVirt_VSMigrationCapabilities \ - -lVirt_VSMigrationSettingData + -lVirt_VSMigrationSettingData \ + -lVirt_VirtualSystemManagementService libVirt_RegisteredProfile_la_SOURCES = Virt_RegisteredProfile.c diff -r 7244474e5d2e -r 2952b0fb0fef src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Thu Oct 02 14:11:39 2008 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Fri Oct 03 09:46:29 2008 -0700 @@ -46,6 +46,7 @@ #include "Virt_RASD.h" #include "Virt_VSMigrationCapabilities.h" #include "Virt_VSMigrationSettingData.h" +#include "Virt_VirtualSystemManagementService.h" const static CMPIBroker *_BROKER; @@ -249,12 +250,38 @@ return s; } +static CMPIInstance *sdc_rasd_inst(CMPIStatus *s, + const CMPIObjectPath *ref, + uint16_t resource_type) +{ + CMPIInstance *inst = NULL; + const char *base = NULL; + + if (rasd_classname_from_type(resource_type, &base) != CMPI_RC_OK) { + cu_statusf(_BROKER, s, + CMPI_RC_ERR_FAILED, + "Resource type not known"); + goto out; + } + + inst = get_typed_instance(_BROKER, + CLASSNAME(ref), + base, + NAMESPACE(ref)); + + CMSetProperty(inst, "ResourceType", &resource_type, CMPI_uint16); + + out: + return inst; +} + static CMPIStatus mem_template(const CMPIObjectPath *ref, int template_type, - CMPIInstance *inst) + struct inst_list *list) { uint64_t mem_size; const char *id; + CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { @@ -281,11 +308,17 @@ goto out; } + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_MEM); + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "AllocationUnits", (CMPIValue *)"KiloBytes", CMPI_chars); CMSetProperty(inst, "VirtualQuantity", (CMPIValue *)&mem_size, CMPI_uint64); + CMSetProperty(inst, "Limit", + (CMPIValue *)&mem_size, CMPI_uint64); + + inst_list_add(list, inst); out: return s; @@ -316,30 +349,41 @@ static CMPIStatus proc_template(const CMPIObjectPath *ref, int template_type, - CMPIInstance *inst) + struct inst_list *list) { bool ret; uint64_t num_procs; + uint64_t limit; + uint32_t weight; const char *id; + CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { case SDC_RASD_MIN: num_procs = 0; + limit = 1; + weight = MIN_XEN_WEIGHT; id = "Minimum"; break; case SDC_RASD_MAX: ret = get_max_procs(ref, &num_procs, &s); if (!ret) goto out; + limit = 0; + weight = MAX_XEN_WEIGHT; id = "Maximum"; break; case SDC_RASD_INC: num_procs = 1; + limit = 50; + weight = INC_XEN_WEIGHT; id = "Increment"; break; case SDC_RASD_DEF: num_procs = 1; + limit = 0; + weight = DEFAULT_XEN_WEIGHT; id = "Default"; break; default: @@ -349,11 +393,21 @@ goto out; } + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_PROC); + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "AllocationUnits", (CMPIValue *)"Processors", CMPI_chars); CMSetProperty(inst, "VirtualQuantity", (CMPIValue *)&num_procs, CMPI_uint64); + + if (STARTS_WITH(CLASSNAME(ref), "Xen")) { + CMSetProperty(inst, "Limit", (CMPIValue *)&limit, CMPI_uint64); + CMSetProperty(inst, "Weight", + (CMPIValue *)&weight, CMPI_uint32); + } + + inst_list_add(list, inst); out: return s; @@ -438,11 +492,13 @@ static CMPIStatus net_template(const CMPIObjectPath *ref, int template_type, - CMPIInstance *inst) + struct inst_list *list) { bool ret; uint64_t num_nics; const char *id; + const char *mac; + CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { @@ -471,9 +527,22 @@ goto out; } + mac = _net_rand_mac(_BROKER); + if (mac == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to generate a MAC address"); + goto out; + } + + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_NET); + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "VirtualQuantity", (CMPIValue *)&num_nics, CMPI_uint64); + CMSetProperty(inst, "Address", (CMPIValue *)mac, CMPI_chars); + + inst_list_add(list, inst); out: return s; @@ -525,13 +594,64 @@ return ret; } +static CMPIStatus set_disk_props(int type, + const CMPIObjectPath *ref, + const char *id, + uint64_t disk_size, + struct inst_list *list) +{ + const char *addr; + const char *dev; + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (type == DOMAIN_LXC) { + addr = "/tmp"; + dev = "/lxc_mnt/tmp"; + } + else { + dev = "hda"; + addr = "/dev/null"; + } + + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); + + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "AllocationQuantity", + (CMPIValue *)"MegaBytes", CMPI_chars); + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&disk_size, CMPI_uint64); + CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars); + + if (type == DOMAIN_LXC) + CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); + else { + if (type == DOMAIN_XENPV) { + dev = "xvda"; + CMSetProperty(inst, "Caption", + (CMPIValue *)"PV disk", CMPI_chars); + } else if (type, DOMAIN_XENFV) { + CMSetProperty(inst, "Caption", + (CMPIValue *)"FV disk", CMPI_chars); + } + + CMSetProperty(inst, "VirtualDevice", + (CMPIValue *)dev, CMPI_chars); + } + + inst_list_add(list, inst); + + return s; +} + static CMPIStatus disk_template(const CMPIObjectPath *ref, int template_type, - CMPIInstance *inst) + struct inst_list *list) { bool ret; + char *pfx; + const char *id; uint64_t disk_size; - const char *id; CMPIStatus s = {CMPI_RC_OK, NULL}; switch(template_type) { @@ -560,57 +680,27 @@ goto out; } - CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); - CMSetProperty(inst, "AllocationQuantity", - (CMPIValue *)"MegaBytes", CMPI_chars); - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&disk_size, CMPI_uint64); + pfx = class_prefix_name(CLASSNAME(ref)); + + if (STREQ(pfx, "Xen")) { + s = set_disk_props(DOMAIN_XENPV, ref, id, disk_size, list); + + if (s.rc != CMPI_RC_OK) + goto out; + + s = set_disk_props(DOMAIN_XENFV, ref, id, disk_size, list); + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, ref, id, disk_size, list); + } else if (STREQ(pfx, "LXC")) { + s = set_disk_props(DOMAIN_LXC, ref, id, disk_size, list); + } else { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported virtualization type"); + } out: return s; -} - -static CMPIInstance *sdc_rasd_inst(CMPIStatus *s, - const CMPIObjectPath *ref, - sdc_rasd_type type, - uint16_t resource_type) -{ - CMPIInstance *inst = NULL; - const char *base = NULL; - - if (rasd_classname_from_type(resource_type, &base) != CMPI_RC_OK) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Resource type not known"); - goto out; - } - - inst = get_typed_instance(_BROKER, - CLASSNAME(ref), - base, - NAMESPACE(ref)); - - if (resource_type == CIM_RES_TYPE_MEM) - *s = mem_template(ref, type, inst); - else if (resource_type == CIM_RES_TYPE_PROC) - *s = proc_template(ref, type, inst); - else if (resource_type == CIM_RES_TYPE_NET) - *s = net_template(ref, type, inst); - else if (resource_type == CIM_RES_TYPE_DISK) - *s = disk_template(ref, type, inst); - else { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Unsupported resource type"); - } - - if (s->rc != CMPI_RC_OK) - goto out; - - CMSetProperty(inst, "ResourceType", &resource_type, CMPI_uint16); - - out: - return inst; } static CMPIStatus sdc_rasds_for_type(const CMPIObjectPath *ref, @@ -618,21 +708,26 @@ uint16_t type) { CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *inst; int i; for (i = SDC_RASD_MIN; i <= SDC_RASD_INC; i++) { - inst = sdc_rasd_inst(&s, ref, i, type); + if (type == CIM_RES_TYPE_MEM) + s = mem_template(ref, i, list); + else if (type == CIM_RES_TYPE_PROC) + s = proc_template(ref, i, list); + else if (type == CIM_RES_TYPE_NET) + s = net_template(ref, i, list); + else if (type == CIM_RES_TYPE_DISK) + s = disk_template(ref, i, list); + else { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported resource type"); + } + if (s.rc != CMPI_RC_OK) { - CU_DEBUG("Problem getting inst"); + CU_DEBUG("Problem getting inst list"); goto out; - } - CU_DEBUG("Got inst"); - if ((s.rc == CMPI_RC_OK) && (inst != NULL)) { - inst_list_add(list, inst); - CU_DEBUG("Added inst"); - } else { - CU_DEBUG("Inst is null, not added"); } } diff -r 7244474e5d2e -r 2952b0fb0fef src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Thu Oct 02 14:11:39 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Fri Oct 03 09:46:29 2008 -0700 @@ -321,7 +321,7 @@ return poolid; } -static const char *_net_rand_mac(void) +const char *_net_rand_mac(const CMPIBroker *broker) { int r; int ret; @@ -344,7 +344,7 @@ if (ret == -1) goto out; - str = CMNewString(_BROKER, mac, &status); + str = CMNewString(broker, mac, &status); if ((str == NULL) || (status.rc != CMPI_RC_OK)) { str = NULL; CU_DEBUG("Failed to create string"); @@ -369,7 +369,7 @@ const char *msg = NULL; if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) { - val = _net_rand_mac(); + val = _net_rand_mac(_BROKER); if (val == NULL) { msg = "Unable to generate a MAC address"; goto out; diff -r 7244474e5d2e -r 2952b0fb0fef src/Virt_VirtualSystemManagementService.h --- a/src/Virt_VirtualSystemManagementService.h Thu Oct 02 14:11:39 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.h Fri Oct 03 09:46:29 2008 -0700 @@ -19,8 +19,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define MIN_XEN_WEIGHT 1 +#define MAX_XEN_WEIGHT 65535 +#define INC_XEN_WEIGHT MAX_XEN_WEIGHT / 2 +#define DEFAULT_XEN_WEIGHT 1024 + CMPIStatus get_vsms(const CMPIObjectPath *reference, CMPIInstance **_inst, const CMPIBroker *broker, const CMPIContext *context, bool is_get_inst); + +const char *_net_rand_mac(const CMPIBroker *broker); From kaitlin at linux.vnet.ibm.com Fri Oct 3 16:48:28 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 09:48:28 -0700 Subject: [Libvirt-cim] [PATCH] Have DefineSystem() return error if VirtualQuantity of proc/mem RASD isn't set Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1223052487 25200 # Node ID cc78b9491823c2cb3db064039c48cb980ab28ee7 # Parent 2952b0fb0fef8e77b34c04a779ac44b1d092876f Have DefineSystem() return error if VirtualQuantity of proc/mem RASD isn't set Signed-off-by: Kaitlin Rupert diff -r 2952b0fb0fef -r cc78b9491823 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Fri Oct 03 09:46:29 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Fri Oct 03 09:48:07 2008 -0700 @@ -450,10 +450,16 @@ struct virt_device *dev) { const char *units; + CMPIrc ret; int shift; - cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.mem.size); - cu_get_u64_prop(inst, "Reservation", &dev->dev.mem.size); + ret = cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.mem.size); + if (ret != CMPI_RC_OK) + ret = cu_get_u64_prop(inst, "Reservation", &dev->dev.mem.size); + + if (ret != CMPI_RC_OK) + return "Missing `VirtualQuantity' field in Memory RASD"; + dev->dev.mem.maxsize = dev->dev.mem.size; cu_get_u64_prop(inst, "Limit", &dev->dev.mem.maxsize); @@ -492,7 +498,9 @@ uint32_t def_weight = 0; uint64_t def_limit = 0; - cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.vcpu.quantity); + rc = cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.vcpu.quantity); + if (rc != CMPI_RC_OK) + return "Missing `VirtualQuantity' field in Processor RASD"; op = CMGetObjectPath(inst, NULL); if (op == NULL) { From danms at us.ibm.com Fri Oct 3 17:45:02 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 03 Oct 2008 10:45:02 -0700 Subject: [Libvirt-cim] [PATCH] Set additional properties of template RASDs In-Reply-To: <2952b0fb0fef8e77b34c.1223052466@localhost.localdomain> (Kaitlin Rupert's message of "Fri\, 03 Oct 2008 09\:47\:46 -0700") References: <2952b0fb0fef8e77b34c.1223052466@localhost.localdomain> Message-ID: <874p3ttvxd.fsf@caffeine.danplanet.com> KR> For Net: KR> -Set address - get a default mac address I think we've had this discussion in the past, and decided it was better to not offer generated mac addresses in the template instances. Since resolving the association is the act of allocation (or pre-allocation), there's no easy way to say "I need three NICs" and get back unique MACs for each. Because of this lack of a formal allocation step, I think it's likely that clients would grab a template RASD and offer it multiple times in the DefineSystem() call, which wouldn't result in a valid domain configuration. The concession was that we would let the client leave out the MAC and assign one for it during DefineSystem(). That way if they want to specify a MAC, they can, but we don't have to deal with the other issues. So, I definitely think that the fields you're adding for the other templates are good, but I'd rather leave this one out of it, if possible. Thoughts? -- 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: 196 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Oct 3 18:42:18 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 11:42:18 -0700 Subject: [Libvirt-cim] [PATCH] Set additional properties of template RASDs In-Reply-To: <874p3ttvxd.fsf@caffeine.danplanet.com> References: <2952b0fb0fef8e77b34c.1223052466@localhost.localdomain> <874p3ttvxd.fsf@caffeine.danplanet.com> Message-ID: <48E6678A.4080707@linux.vnet.ibm.com> Dan Smith wrote: > KR> For Net: > KR> -Set address - get a default mac address > > I think we've had this discussion in the past, and decided it was > better to not offer generated mac addresses in the template > instances. We did, and it completely slipped my mind. > > Since resolving the association is the act of allocation (or > pre-allocation), there's no easy way to say "I need three NICs" and > get back unique MACs for each. Because of this lack of a formal > allocation step, I think it's likely that clients would grab a > template RASD and offer it multiple times in the DefineSystem() call, > which wouldn't result in a valid domain configuration. > > The concession was that we would let the client leave out the MAC and > assign one for it during DefineSystem(). That way if they want to > specify a MAC, they can, but we don't have to deal with the other > issues. > > So, I definitely think that the fields you're adding for the other > templates are good, but I'd rather leave this one out of it, if > possible. > Yes, since the DefineSystem() call sets a MAC in the case its not supplied in the RASD, then I think it is fine to not advertise it in the template. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 3 19:02:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 12:02:59 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Set additional properties of template RASDs Message-ID: <860849c8b19a91e80b12.1223060579@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223059644 25200 # Node ID 860849c8b19a91e80b126e57fdc9ceddfa91566e # Parent 7244474e5d2e118316e1636b06f99acb54062489 (#2) Set additional properties of template RASDs. For Proc: -Set Limit and Weight For Mem: -Set Limit - use same values set for VirtualQuantity For Disk: -Set VirtualDevice, Address, and Mountpoint properties -For Xen, the default is xvda, which is accurate for paravirt, but not for full virt. Updates: -Don't expose a default MAC address - DefineSystem() will set one if its not supplied Signed-off-by: Kaitlin Rupert diff -r 7244474e5d2e -r 860849c8b19a src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Thu Oct 02 14:11:39 2008 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Fri Oct 03 11:47:24 2008 -0700 @@ -46,6 +46,7 @@ #include "Virt_RASD.h" #include "Virt_VSMigrationCapabilities.h" #include "Virt_VSMigrationSettingData.h" +#include "Virt_VirtualSystemManagementService.h" const static CMPIBroker *_BROKER; @@ -249,12 +250,38 @@ return s; } +static CMPIInstance *sdc_rasd_inst(CMPIStatus *s, + const CMPIObjectPath *ref, + uint16_t resource_type) +{ + CMPIInstance *inst = NULL; + const char *base = NULL; + + if (rasd_classname_from_type(resource_type, &base) != CMPI_RC_OK) { + cu_statusf(_BROKER, s, + CMPI_RC_ERR_FAILED, + "Resource type not known"); + goto out; + } + + inst = get_typed_instance(_BROKER, + CLASSNAME(ref), + base, + NAMESPACE(ref)); + + CMSetProperty(inst, "ResourceType", &resource_type, CMPI_uint16); + + out: + return inst; +} + static CMPIStatus mem_template(const CMPIObjectPath *ref, int template_type, - CMPIInstance *inst) + struct inst_list *list) { uint64_t mem_size; const char *id; + CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { @@ -281,11 +308,17 @@ goto out; } + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_MEM); + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "AllocationUnits", (CMPIValue *)"KiloBytes", CMPI_chars); CMSetProperty(inst, "VirtualQuantity", (CMPIValue *)&mem_size, CMPI_uint64); + CMSetProperty(inst, "Limit", + (CMPIValue *)&mem_size, CMPI_uint64); + + inst_list_add(list, inst); out: return s; @@ -316,30 +349,41 @@ static CMPIStatus proc_template(const CMPIObjectPath *ref, int template_type, - CMPIInstance *inst) + struct inst_list *list) { bool ret; uint64_t num_procs; + uint64_t limit; + uint32_t weight; const char *id; + CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { case SDC_RASD_MIN: num_procs = 0; + limit = 1; + weight = MIN_XEN_WEIGHT; id = "Minimum"; break; case SDC_RASD_MAX: ret = get_max_procs(ref, &num_procs, &s); if (!ret) goto out; + limit = 0; + weight = MAX_XEN_WEIGHT; id = "Maximum"; break; case SDC_RASD_INC: num_procs = 1; + limit = 50; + weight = INC_XEN_WEIGHT; id = "Increment"; break; case SDC_RASD_DEF: num_procs = 1; + limit = 0; + weight = DEFAULT_XEN_WEIGHT; id = "Default"; break; default: @@ -349,11 +393,21 @@ goto out; } + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_PROC); + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "AllocationUnits", (CMPIValue *)"Processors", CMPI_chars); CMSetProperty(inst, "VirtualQuantity", (CMPIValue *)&num_procs, CMPI_uint64); + + if (STARTS_WITH(CLASSNAME(ref), "Xen")) { + CMSetProperty(inst, "Limit", (CMPIValue *)&limit, CMPI_uint64); + CMSetProperty(inst, "Weight", + (CMPIValue *)&weight, CMPI_uint32); + } + + inst_list_add(list, inst); out: return s; @@ -438,11 +492,12 @@ static CMPIStatus net_template(const CMPIObjectPath *ref, int template_type, - CMPIInstance *inst) + struct inst_list *list) { bool ret; uint64_t num_nics; const char *id; + CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; switch (template_type) { @@ -471,9 +526,13 @@ goto out; } + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_NET); + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "VirtualQuantity", (CMPIValue *)&num_nics, CMPI_uint64); + + inst_list_add(list, inst); out: return s; @@ -525,13 +584,64 @@ return ret; } +static CMPIStatus set_disk_props(int type, + const CMPIObjectPath *ref, + const char *id, + uint64_t disk_size, + struct inst_list *list) +{ + const char *addr; + const char *dev; + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (type == DOMAIN_LXC) { + addr = "/tmp"; + dev = "/lxc_mnt/tmp"; + } + else { + dev = "hda"; + addr = "/dev/null"; + } + + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); + + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "AllocationQuantity", + (CMPIValue *)"MegaBytes", CMPI_chars); + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&disk_size, CMPI_uint64); + CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars); + + if (type == DOMAIN_LXC) + CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); + else { + if (type == DOMAIN_XENPV) { + dev = "xvda"; + CMSetProperty(inst, "Caption", + (CMPIValue *)"PV disk", CMPI_chars); + } else if (type, DOMAIN_XENFV) { + CMSetProperty(inst, "Caption", + (CMPIValue *)"FV disk", CMPI_chars); + } + + CMSetProperty(inst, "VirtualDevice", + (CMPIValue *)dev, CMPI_chars); + } + + inst_list_add(list, inst); + + return s; +} + static CMPIStatus disk_template(const CMPIObjectPath *ref, int template_type, - CMPIInstance *inst) + struct inst_list *list) { bool ret; + char *pfx; + const char *id; uint64_t disk_size; - const char *id; CMPIStatus s = {CMPI_RC_OK, NULL}; switch(template_type) { @@ -560,57 +670,27 @@ goto out; } - CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); - CMSetProperty(inst, "AllocationQuantity", - (CMPIValue *)"MegaBytes", CMPI_chars); - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&disk_size, CMPI_uint64); + pfx = class_prefix_name(CLASSNAME(ref)); + + if (STREQ(pfx, "Xen")) { + s = set_disk_props(DOMAIN_XENPV, ref, id, disk_size, list); + + if (s.rc != CMPI_RC_OK) + goto out; + + s = set_disk_props(DOMAIN_XENFV, ref, id, disk_size, list); + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, ref, id, disk_size, list); + } else if (STREQ(pfx, "LXC")) { + s = set_disk_props(DOMAIN_LXC, ref, id, disk_size, list); + } else { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported virtualization type"); + } out: return s; -} - -static CMPIInstance *sdc_rasd_inst(CMPIStatus *s, - const CMPIObjectPath *ref, - sdc_rasd_type type, - uint16_t resource_type) -{ - CMPIInstance *inst = NULL; - const char *base = NULL; - - if (rasd_classname_from_type(resource_type, &base) != CMPI_RC_OK) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Resource type not known"); - goto out; - } - - inst = get_typed_instance(_BROKER, - CLASSNAME(ref), - base, - NAMESPACE(ref)); - - if (resource_type == CIM_RES_TYPE_MEM) - *s = mem_template(ref, type, inst); - else if (resource_type == CIM_RES_TYPE_PROC) - *s = proc_template(ref, type, inst); - else if (resource_type == CIM_RES_TYPE_NET) - *s = net_template(ref, type, inst); - else if (resource_type == CIM_RES_TYPE_DISK) - *s = disk_template(ref, type, inst); - else { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Unsupported resource type"); - } - - if (s->rc != CMPI_RC_OK) - goto out; - - CMSetProperty(inst, "ResourceType", &resource_type, CMPI_uint16); - - out: - return inst; } static CMPIStatus sdc_rasds_for_type(const CMPIObjectPath *ref, @@ -618,21 +698,26 @@ uint16_t type) { CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *inst; int i; for (i = SDC_RASD_MIN; i <= SDC_RASD_INC; i++) { - inst = sdc_rasd_inst(&s, ref, i, type); + if (type == CIM_RES_TYPE_MEM) + s = mem_template(ref, i, list); + else if (type == CIM_RES_TYPE_PROC) + s = proc_template(ref, i, list); + else if (type == CIM_RES_TYPE_NET) + s = net_template(ref, i, list); + else if (type == CIM_RES_TYPE_DISK) + s = disk_template(ref, i, list); + else { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported resource type"); + } + if (s.rc != CMPI_RC_OK) { - CU_DEBUG("Problem getting inst"); + CU_DEBUG("Problem getting inst list"); goto out; - } - CU_DEBUG("Got inst"); - if ((s.rc == CMPI_RC_OK) && (inst != NULL)) { - inst_list_add(list, inst); - CU_DEBUG("Added inst"); - } else { - CU_DEBUG("Inst is null, not added"); } } diff -r 7244474e5d2e -r 860849c8b19a src/Virt_VirtualSystemManagementService.h --- a/src/Virt_VirtualSystemManagementService.h Thu Oct 02 14:11:39 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.h Fri Oct 03 11:47:24 2008 -0700 @@ -19,6 +19,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define MIN_XEN_WEIGHT 1 +#define MAX_XEN_WEIGHT 65535 +#define INC_XEN_WEIGHT MAX_XEN_WEIGHT / 2 +#define DEFAULT_XEN_WEIGHT 1024 + CMPIStatus get_vsms(const CMPIObjectPath *reference, CMPIInstance **_inst, const CMPIBroker *broker, From kaitlin at linux.vnet.ibm.com Fri Oct 3 19:39:47 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 12:39:47 -0700 Subject: [Libvirt-cim] Extra param in the provider query gives output. In-Reply-To: <48E61821.3050907@linux.vnet.ibm.com> References: <48E61821.3050907@linux.vnet.ibm.com> Message-ID: <48E67503.2030002@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > Hi, > > I am able to get valid output when I query the providers with the fields > other than the key fields. > > For ex: > wbemcli ai -ac Xen_SettingsDefineState > 'http://root:P at localhost:5988/root/virt:Xen_Processor.CreationClassName="Xen_Processor",SystemName="Domain-0",DeviceID="Domain-0/0",SystemCreationClassName="Xen_ComputerSystem",*virtinvalid="Xen"*' wbemcli allows properties to specified along with the reference for certain queries. > > In the above query I supplied invalid parameter *virtinvalid="Xen" > *which is not part of the key fields for querying the provider. > I think we should be checking our providers to take only the required > key fields. We don't currently support property validation in any of the providers. You can try a similar query with GetInstance: wbemcli gi 'http://root:P at localhost:5988/root/virt:Xen_Processor.CreationClassName="Xen_Processor",SystemName="Domain-0",DeviceID="Domain-0/0",SystemCreationClassName="Xen_ComputerSystem",virtinvalid="Xen"' We should be returning the instance that not only matches the keys specified, but the properties as well. In this case, the query will return an instance even though the virtinvalid property doesn't exist. This is something we'll want to fix in the future. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Fri Oct 3 20:14:54 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 03 Oct 2008 13:14:54 -0700 Subject: [Libvirt-cim] Extra param in the provider query gives output. References: <48E61821.3050907@linux.vnet.ibm.com> <48E67503.2030002@linux.vnet.ibm.com> Message-ID: <874p3tsaf5.fsf@caffeine.danplanet.com> KR> We should be returning the instance that not only matches the keys KR> specified, but the properties as well. In this case, the query KR> will return an instance even though the virtinvalid property KR> doesn't exist. KR> This is something we'll want to fix in the future. Eh? IMHO, this is not really the job of the providers. We're definitely not equipped to be enforcing schema in the same way that the CIMOM is. I'd say that if the CIMOM isn't going to prevent you from inserting completely invalid keys into a reference, that it doesn't make sense for us to do anything other than ignore them as well. -- 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: 196 bytes Desc: not available URL: From kaitlin at linux.vnet.ibm.com Fri Oct 3 20:49:48 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 13:49:48 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Fixing and updating 01_forward.py of ElementCapabilities to work with and without sblim-base-provider In-Reply-To: <530d3dab93cd36a2b68e.1222880691@elm3b217.beaverton.ibm.com> References: <530d3dab93cd36a2b68e.1222880691@elm3b217.beaverton.ibm.com> Message-ID: <48E6856C.8040306@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1222853363 25200 > # Node ID 530d3dab93cd36a2b68e1fb42c71c9a1cfe755fc > # Parent fb10c72ed404aa96715e2d013b0ee3502046496f > [TEST] Fixing and updating 01_forward.py of ElementCapabilities to work with and without sblim-base-provider. > > 1) Updated the tc to work with/without sblim-base-provider. > 2) Updated the tc to use cim_define(). This is req bcs the association of ElementCapabilities with the CS would not be excercised for KVM. > 3) Included the bug no 00007. Included XFAIL . > 4) Used get_host_info() for getting the host information. > 5) Updated the tc to use cim.undefine(). > > Tested with Xen, XenFV, KVM on current sources and with/without sblim-base-provider installed. > > Signed-off-by: Deepti B. Kalakeri > > diff -r fb10c72ed404 -r 530d3dab93cd suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py This patch no longer applies for me. Can you rebase this set on the updated tree and resend? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 3 21:41:18 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 14:41:18 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add KVMRedirectionSAP schema In-Reply-To: Message-ID: <3e983c320ee1354ffe89.1223070078@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223069399 25200 # Node ID 3e983c320ee1354ffe8921e2f082abcecec53957 # Parent 7244474e5d2e118316e1636b06f99acb54062489 Add KVMRedirectionSAP schema Signed-off-by: Kaitlin Rupert diff -r 7244474e5d2e -r 3e983c320ee1 Makefile.am --- a/Makefile.am Thu Oct 02 14:11:39 2008 -0700 +++ b/Makefile.am Fri Oct 03 14:29:59 2008 -0700 @@ -45,7 +45,8 @@ schema/ConcreteComponent.mof \ schema/ConsoleRedirectionService.mof \ schema/ConsoleRedirectionServiceCapabilities.mof \ - schema/ServiceAffectsElement.mof + schema/ServiceAffectsElement.mof \ + schema/KVMRedirectionSAP.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -101,7 +102,8 @@ schema/ConcreteComponent.registration \ schema/ConsoleRedirectionService.registration \ schema/ConsoleRedirectionServiceCapabilities.registration \ - schema/ServiceAffectsElement.registration + schema/ServiceAffectsElement.registration \ + schema/KVMRedirectionSAP.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 7244474e5d2e -r 3e983c320ee1 schema/KVMRedirectionSAP.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/KVMRedirectionSAP.mof Fri Oct 03 14:29:59 2008 -0700 @@ -0,0 +1,16 @@ +// Copyright IBM Corp. 2007 + +[Provider("cmpi::Virt_KVMRedirectionSAP")] +class Xen_KVMRedirectionSAP : CIM_KVMRedirectionSAP +{ +}; + +[Provider("cmpi::Virt_KVMRedirectionSAP")] +class KVM_KVMRedirectionSAP : CIM_KVMRedirectionSAP +{ +}; + +[Provider("cmpi::Virt_ConsoleRedirectionService")] +class LXC_KVMRedirectionSAP : CIM_KVMRedirectionSAP +{ +}; diff -r 7244474e5d2e -r 3e983c320ee1 schema/KVMRedirectionSAP.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/KVMRedirectionSAP.registration Fri Oct 03 14:29:59 2008 -0700 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP method instance +KVM_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP method instance +LXC_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP method instance diff -r 7244474e5d2e -r 3e983c320ee1 src/Makefile.am --- a/src/Makefile.am Thu Oct 02 14:11:39 2008 -0700 +++ b/src/Makefile.am Fri Oct 03 14:29:59 2008 -0700 @@ -57,6 +57,7 @@ libVirt_VSMigrationService.la \ libVirt_ConsoleRedirectionService.la \ libVirt_ConsoleRedirectionServiceCapabilities.la \ + libVirt_KVMRedirectionSAP.la \ libVirt_SettingsDefineCapabilities.la \ libVirt_HostedDependency.la \ libVirt_ElementConformsToProfile.la \ @@ -206,3 +207,5 @@ libVirt_ServiceAffectsElement_la_SOURCES = Virt_ServiceAffectsElement.c libVirt_ServiceAffectsElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_ConsoleRedirectionService +libVirt_KVMRedirectionSAP_la_SOURCES = Virt_KVMRedirectionSAP.c + From kaitlin at linux.vnet.ibm.com Fri Oct 3 21:41:17 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 14:41:17 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add KVMRedirectionSAP provider Message-ID: This provider represents the console redirection session. From kaitlin at linux.vnet.ibm.com Fri Oct 3 21:41:19 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 03 Oct 2008 14:41:19 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Add KVMRedirectionSAP provider In-Reply-To: Message-ID: <1cd2a2b6bce28c4174b8.1223070079@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223069399 25200 # Node ID 1cd2a2b6bce28c4174b8db3b020a83e936012c43 # Parent 3e983c320ee1354ffe8921e2f082abcecec53957 Add KVMRedirectionSAP provider. The profile calls for a distinction between an active session (where the redirection is currently being used) and an available session (a redirection is in place, but not currently in use). There's not an easy way to detect this, so the session will be set to active all the time. Signed-off-by: Kaitlin Rupert diff -r 3e983c320ee1 -r 1cd2a2b6bce2 src/Virt_KVMRedirectionSAP.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_KVMRedirectionSAP.c Fri Oct 03 14:29:59 2008 -0700 @@ -0,0 +1,343 @@ +/* + * Copyright IBM Corp. 2008 + * + * Authors: + * Kaitlin Rupert + * + * 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 "misc_util.h" +#include "svpc_types.h" +#include "device_parsing.h" +#include "cs_util.h" + +#include +#include +#include + +#include "Virt_KVMRedirectionSAP.h" + +const static CMPIBroker *_BROKER; + +static int inst_from_dom(const CMPIBroker *broker, + const CMPIObjectPath *ref, + struct domain *dominfo, + CMPIInstance *inst) +{ + char *sccn = NULL; + char *id = NULL; + char *pfx = NULL; + uint16_t prop_val; + int ret = 1; + + if (asprintf(&id, "%s:%s", dominfo->name, + dominfo->dev_graphics->dev.graphics.type) == -1) { + CU_DEBUG("Unable to format name"); + ret = 0; + goto out; + } + + pfx = class_prefix_name(CLASSNAME(ref)); + sccn = get_typed_class(pfx, "ComputerSystem"); + + CMSetProperty(inst, "Name", + (CMPIValue *)id, CMPI_chars); + + CMSetProperty(inst, "SystemName", + (CMPIValue *)dominfo->name, CMPI_chars); + + CMSetProperty(inst, "SystemCreationClassName", + (CMPIValue *)sccn, CMPI_chars); + + CMSetProperty(inst, "ElementName", + (CMPIValue *)id, CMPI_chars); + + if (STREQ(dominfo->dev_graphics->dev.graphics.type, "vnc")) + prop_val = (uint16_t)CIM_CRS_VNC; + else + prop_val = (uint16_t)CIM_CRS_OTHER; + + CMSetProperty(inst, "KVMProtocol", + (CMPIValue *)&prop_val, CMPI_uint16); + + /* Need to replace this with a check that determines whether + the console session is enabled (in use) or available (not actively + in use). + */ + prop_val = (uint16_t)CIM_CRS_ENABLED_STATE; + CMSetProperty(inst, "EnabledState", + (CMPIValue *)&prop_val, CMPI_uint16); + + out: + free(pfx); + free(id); + free(sccn); + + return ret; +} + +static CMPIInstance *get_console_sap(const CMPIBroker *broker, + const CMPIObjectPath *reference, + virConnectPtr conn, + struct domain *dominfo, + CMPIStatus *s) + +{ + CMPIInstance *inst = NULL; + + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "KVMRedirectionSAP", + NAMESPACE(reference)); + + if (inst == NULL) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to create instance"); + goto out; + } + + if (inst_from_dom(broker, reference, dominfo, inst) != 1) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get instance from domain"); + } + + out: + return inst; +} + +static bool check_graphics(virDomainPtr dom, + struct domain **dominfo) +{ + int ret = 0; + + ret = get_dominfo(dom, dominfo); + if (!ret) { + CU_DEBUG("Unable to get domain info"); + return false; + } + + if ((*dominfo)->dev_graphics == NULL) { + CU_DEBUG("No graphics device associated with guest"); + return false; + } + + return true; +} + +static CMPIStatus return_console_sap(const CMPIObjectPath *ref, + const CMPIResult *results, + bool names_only) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn; + virDomainPtr *domain_list; + struct domain *dominfo = NULL; + struct inst_list list; + int count; + int i; + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + if (conn == NULL) + return s; + + inst_list_init(&list); + + count = get_domain_list(conn, &domain_list); + if (count < 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to enumerate domains"); + goto out; + } else if (count == 0) + goto out; + + for (i = 0; i < count; i++) { + CMPIInstance *inst = NULL; + + if (!check_graphics(domain_list[i], &dominfo)) { + virDomainFree(domain_list[i]); + cleanup_dominfo(&dominfo); + continue; + } + + inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); + + virDomainFree(domain_list[i]); + cleanup_dominfo(&dominfo); + + if (inst != NULL) + inst_list_add(&list, inst); + } + + if (names_only) + cu_return_instance_names(results, &list); + else + cu_return_instances(results, &list); + + out: + free(domain_list); + inst_list_free(&list); + + return s; +} + +CMPIStatus get_console_sap_by_name(const CMPIBroker *broker, + const CMPIObjectPath *ref, + const char *name, + CMPIInstance **_inst) +{ + virConnectPtr conn; + virDomainPtr dom; + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst = NULL; + struct domain *dominfo = NULL; + + conn = connect_by_classname(broker, CLASSNAME(ref), &s); + if (conn == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance"); + goto out; + } + + dom = virDomainLookupByName(conn, name); + if (dom == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (%s)", + name); + goto out; + } + + if (!check_graphics(dom, &dominfo)) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "No console device for this guest"); + } + + inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); + + virDomainFree(dom); + + if (s.rc != CMPI_RC_OK) + goto out; + + *_inst = inst; + + out: + virConnectClose(conn); + + return s; +} + +CMPIStatus get_console_sap_by_ref(const CMPIBroker *broker, + const CMPIObjectPath *reference, + CMPIInstance **_inst) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst = NULL; + const char *sys = NULL; + + if (cu_get_str_path(reference, "System", &sys) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (System)"); + goto out; + } + + s = get_console_sap_by_name(broker, reference, sys, &inst); + if (s.rc != CMPI_RC_OK) + goto out; + + s = cu_validate_ref(broker, reference, inst); + if (s.rc != CMPI_RC_OK) + goto out; + + *_inst = inst; + + out: + return s; +} + +static CMPIStatus EnumInstanceNames(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + return return_console_sap(reference, results, true); +} + +static CMPIStatus EnumInstances(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + + return return_console_sap(reference, results, false); +} + +static CMPIStatus GetInstance(CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *ref, + const char **properties) +{ + CMPIStatus s; + CMPIInstance *inst = NULL; + + s = get_console_sap_by_ref(_BROKER, ref, &inst); + if (s.rc != CMPI_RC_OK) + goto out; + + CMReturnInstance(results, inst); + + out: + return s; +} + +DEFAULT_CI(); +DEFAULT_MI(); +DEFAULT_DI(); +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, + Virt_KVMRedirectionSAP, + _BROKER, + libvirt_cim_init()); + + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff -r 3e983c320ee1 -r 1cd2a2b6bce2 src/Virt_KVMRedirectionSAP.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_KVMRedirectionSAP.h Fri Oct 03 14:29:59 2008 -0700 @@ -0,0 +1,40 @@ +/* + * Copyright IBM Corp. 2008 + * + * Authors: + * Kaitlin Rupert + * + * 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 + */ + +CMPIStatus get_console_sap_by_name(const CMPIBroker *broker, + const CMPIObjectPath *ref, + const char *name, + CMPIInstance **_inst); + +CMPIStatus get_console_sap_by_ref(const CMPIBroker *broker, + const CMPIObjectPath *reference, + CMPIInstance **_inst); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ + diff -r 3e983c320ee1 -r 1cd2a2b6bce2 src/svpc_types.h --- a/src/svpc_types.h Fri Oct 03 14:29:59 2008 -0700 +++ b/src/svpc_types.h Fri Oct 03 14:29:59 2008 -0700 @@ -56,6 +56,9 @@ #define CIM_CRS_ENABLED_STATE 2 #define CIM_CRS_REQUESTED_STATE 12 +#define CIM_CRS_OTHER 1 +#define CIM_CRS_VNC 4 + #include #include From yunguol at cn.ibm.com Mon Oct 6 02:15:22 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 6 Oct 2008 10:15:22 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Oct 06 2008 Message-ID: ================================================= Xen on Pegasus Test Run Summary for Oct 06 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: 708+ Libvirt-cim changeset: 3ff9257bc87a+ ================================================= FAIL : 3 XFAIL : 0 SKIP : 3 PASS : 129 ----------------- Total : 135 ================================================= FAIL Test Summary: HostSystem - 03_hs_to_settdefcap.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL SettingsDefineCapabilities - 01_forward.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: FAIL ERROR - DEBUG instanceref, is Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="elm3b217.beaverton.ibm.com" ERROR - DEBUG instanceref, is Xen_ProcessorPool.InstanceID="ProcessorPool/0" ERROR - DEBUG instanceref, is Xen_MemoryPool.InstanceID="MemoryPool/0" ERROR - DEBUG instanceref, is Xen_NetworkPool.InstanceID="NetworkPool/cimtest-networkpool" ERROR - DEBUG instanceref, is Xen_NetworkPool.InstanceID="NetworkPool/default" ERROR - DEBUG instanceref, is Xen_DiskPool.InstanceID="DiskPool/cimtest-diskpool" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="MemoryPool/0" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="NetworkPool/cimtest-networkpool" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="NetworkPool/default" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="DiskPool/cimtest-diskpool" ERROR - SettingsDefineCapabilities returned 8 ResourcePool objects instead of 4 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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 (no domain for hd_domain/xvda)') -------------------------------------------------------------------- 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: 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: FAIL ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="DiskPool/cimtest-diskpool" ERROR - Xen_SettingsDefineCapabilities returned 8 ResourcePool objectsinstead 4 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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: 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 Mon Oct 6 02:39:43 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 05 Oct 2008 19:39:43 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix LogicalDisk-03_ld_gi_errs.py by using cim_define() function Message-ID: <29da4cc05673c815d082.1223260783@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223260772 25200 # Node ID 29da4cc05673c815d082af768eca278bd5b6b28b # Parent b710ecb26adf500caa6b801fdf10e4efbed3877e [TEST] Fix LogicalDisk-03_ld_gi_errs.py by using cim_define() function Signed-off-by: Guolian Yun diff -r b710ecb26adf -r 29da4cc05673 suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Fri Oct 03 06:34:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Sun Oct 05 19:39:32 2008 -0700 @@ -186,7 +186,7 @@ def main(): test_disk = 'hda' vsxml = get_class(options.virt)(test_dom, disk=test_disk) - ret = vsxml.define(options.ip) + ret = vsxml.cim_define(options.ip) if not ret: logger.error("Failed to Define the dom: %s", test_dom) return FAIL From yunguol at cn.ibm.com Mon Oct 6 02:32:38 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 6 Oct 2008 10:32:38 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Oct 06 2008 In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-06 10:15:22: > > ================================================= > Xen on Pegasus Test Run Summary for Oct 06 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: 708+ > Libvirt-cim changeset: 3ff9257bc87a+ > ================================================= > FAIL : 3 > XFAIL : 0 > SKIP : 3 > PASS : 129 > ----------------- > Total : 135 > ================================================= > FAIL Test Summary: > HostSystem - 03_hs_to_settdefcap.py: FAIL > LogicalDisk - 03_ld_gi_errs.py: FAIL > SettingsDefineCapabilities - 01_forward.py: FAIL LogicalDisk - 03_ld_gi_errs.py is fixed by using cim_define(). I will look into the other test failures. Thanks! > > ================================================= > 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: FAIL > ERROR - DEBUG instanceref, is Xen_HostSystem. > CreationClassName="Xen_HostSystem",Name="elm3b217.beaverton.ibm.com" > ERROR - DEBUG instanceref, is Xen_ProcessorPool. > InstanceID="ProcessorPool/0" > ERROR - DEBUG instanceref, is Xen_MemoryPool. > InstanceID="MemoryPool/0" > ERROR - DEBUG instanceref, is Xen_NetworkPool. > InstanceID="NetworkPool/cimtest-networkpool" > ERROR - DEBUG instanceref, is Xen_NetworkPool. > InstanceID="NetworkPool/default" > ERROR - DEBUG instanceref, is Xen_DiskPool. > InstanceID="DiskPool/cimtest-diskpool" > ERROR - DEBUG instanceref, is > Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" > ERROR - DEBUG instanceref, is > Xen_AllocationCapabilities.InstanceID="MemoryPool/0" > ERROR - DEBUG instanceref, is > Xen_AllocationCapabilities.InstanceID="NetworkPool/cimtest-networkpool" > ERROR - DEBUG instanceref, is > Xen_AllocationCapabilities.InstanceID="NetworkPool/default" > ERROR - DEBUG instanceref, is > Xen_AllocationCapabilities.InstanceID="DiskPool/cimtest-diskpool" > ERROR - SettingsDefineCapabilities returned 8 > ResourcePool objects instead of 4 > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > -------------------------------------------------------------------- > 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 (no domain for hd_domain/xvda)') > -------------------------------------------------------------------- > 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: 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: FAIL > ERROR - DEBUG instanceref, is > Xen_AllocationCapabilities.InstanceID="DiskPool/cimtest-diskpool" > ERROR - Xen_SettingsDefineCapabilities returned 8 > ResourcePool objectsinstead 4 > -------------------------------------------------------------------- > 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: PASS > -------------------------------------------------------------------- > 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: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Oct 6 05:52:24 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 05 Oct 2008 22:52:24 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed Message-ID: # HG changeset patch # User Guolian Yun # Date 1223272339 25200 # Node ID bdb5911993d5e56c6398a447b3e5eabc5d41f83d # Parent b710ecb26adf500caa6b801fdf10e4efbed3877e [TEST] #4 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed Updates from 3 to 4: 1) Update the tc to verify the case when we pass Invalid CreationClassName 2) Verify the complete exception instead of just verifying part of it Signed-off-by: Guolian Yun diff -r b710ecb26adf -r bdb5911993d5 suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Fri Oct 03 06:34:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Sun Oct 05 22:52:19 2008 -0700 @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ CIM_PASS, CIM_NS @@ -33,7 +34,8 @@ from CimTest.ReturnCodes import PASS, FA sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] exp_rc = 6 #CIM_ERR_NOT_FOUND -exp_desc = "No such instance" +exp_desc = ["No such instance (Name)", + "No such instance (CreationClassName)"] @do_main(sup_types) def main(): @@ -41,37 +43,41 @@ def main(): rc = -1 status = FAIL keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL - conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) - instanceref = CIMInstanceName(get_typed_class(options.virt, "HostSystem"), - keybindings = {"Wrong" : "wrong", "CreationClassName" : host_sys.CreationClassName}) - + hostsystem = get_typed_class(options.virt, "HostSystem") + instanceref = [CIMInstanceName(hostsystem, + keybindings = {"Wrong" : "wrong", "CreationClassName" : host_ccn}), + CIMInstanceName(hostsystem, + keybindings = {"Name" : host_name, "Wrong" : "wrong"})] + names = [] - try: - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) - rc = 0 - except pywbem.CIMError, (rc, desc): - if rc == exp_rc and desc.find(exp_desc) >= 0: - logger.info("Got excepted rc code and error string") - status = PASS - else: - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) - except Exception, details: - logger.error("Unknown exception happened") - logger.error(details) + hostedservice = get_typed_class(options.virt, "HostedService") + for i in range(0, len(instanceref)): + try: + names = conn.AssociatorNames(instanceref[i], AssocClass = hostedservice) + rc = 0 + except pywbem.CIMError, (rc, desc): + if rc == exp_rc and desc.find(exp_desc[i]) >= 0: + logger.info("Got excepted rc code and error string") + status = PASS + else: + logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) + except Exception, details: + logger.error("Unknown exception happened") + logger.error(details) - if rc == 0: - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of HostSystem input") - status = FAIL + if rc == 0: + logger.error("HostedService associator should NOT return excepted result\ + with a wrong key name and value of HostSystem input") + status = FAIL return status From yunguol at cn.ibm.com Mon Oct 6 06:06:09 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 05 Oct 2008 23:06:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix HostedService-04_reverse_errs.py to work with sblim base provider installed Message-ID: <3e0a467ec1227d04e247.1223273169@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223273159 25200 # Node ID 3e0a467ec1227d04e2478ff7c10447a00459d246 # Parent b710ecb26adf500caa6b801fdf10e4efbed3877e [TEST] #4 Fix HostedService-04_reverse_errs.py to work with sblim base provider installed Updates form 3 to 4: verifying the complete exception instead of just verifying part of it Follow up patch will to verify other exceptions except invalid Name Signed-off-by: Guolian Yun diff -r b710ecb26adf -r 3e0a467ec122 suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Fri Oct 03 06:34:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Sun Oct 05 23:05:59 2008 -0700 @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ CIM_PASS, CIM_NS @@ -33,20 +34,17 @@ from CimTest.ReturnCodes import PASS, FA sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] exp_rc = 6 #CIM_ERR_NOT_FOUND -exp_desc = "No such instance" +exp_desc = "No such instance (Name)" @do_main(sup_types) def main(): options = main.options rc = -1 status = FAIL - keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL - servicelist = {get_typed_class(options.virt, "ResourcePoolConfigurationService") : "RPCS", get_typed_class(options.virt, "VirtualSystemManagementService") : "Management Service", @@ -59,13 +57,14 @@ def main(): for k, v in servicelist.items(): instanceref = CIMInstanceName(k, keybindings = {"Wrong" : v, - "CreationClassName" : "wrong", - "SystemCreationClassName" : host_sys.CreationClassName, - "SystemName" : host_sys.Name}) + "CreationClassName" : k, + "SystemCreationClassName" : host_ccn, + "SystemName" : host_name}) names = [] - + + assoc_class = get_typed_class(options.virt, "HostedService") try: - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) + names = conn.AssociatorNames(instanceref, AssocClass = assoc_class) rc = 0 except pywbem.CIMError, (rc, desc): if rc == exp_rc and desc.find(exp_desc) >= 0: @@ -78,7 +77,8 @@ def main(): logger.error(details) if rc == 0: - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of %s input" % k) + logger.error("HostedService associator should NOT return excepted result\ + with a wrong key name and value of %s input" % k) status = FAIL return status From yunguol at cn.ibm.com Mon Oct 6 05:54:52 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 6 Oct 2008 13:54:52 +0800 Subject: [Libvirt-cim] [PATCH] [TEST]#3 Fix HostedService.02, 03&04 to work with sblim base provider installed In-Reply-To: <48E0BDB4.5040502@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-09-29 19:36:20: > > > yunguol at cn.ibm.com wrote: > > > > diff -r 0ecb3a22c361 -r 145cde258442 suites/libvirt- > cim/cimtest/HostedService/03_forward_errs.py > > --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py > Fri Sep 26 02:44:52 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py > Fri Sep 26 19:29:43 2008 -0700 > > @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa > > from pywbem.cim_obj import CIMInstanceName > > from XenKvmLib import assoc > > from XenKvmLib import enumclass > > +from XenKvmLib.common_util import get_host_info > > from XenKvmLib.classes import get_typed_class > > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ > > CIM_PASS, CIM_NS > > @@ -40,24 +41,22 @@ def main(): > > options = main.options > > rc = -1 > > status = FAIL > > - keys = ['Name', 'CreationClassName'] > > - try: > > - host_sys = enumclass.enumerate(options.ip, 'HostSystem', > keys, options.virt)[0] > > - except Exception: > > - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > > + status, host_name, host_ccn = get_host_info(options.ip, options.virt) > > + if status != PASS: > > + logger.error("Error in calling get_host_info function") > > return FAIL > > - > > - > > + > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > > (CIM_USER, CIM_PASS), > > CIM_NS) > > instanceref = CIMInstanceName(get_typed_class(options.virt, > "HostSystem"), > > - keybindings = {"Wrong" : > "wrong", "CreationClassName" : host_sys.CreationClassName}) > > + keybindings = {"Wrong" : "wrong", \ > > + "CreationClassName" : host_ccn}) > > > > names = [] > > - > > + assoc_class = get_typed_class(options.virt, "HostedService") > > try: > > - names = conn.AssociatorNames(instanceref, AssocClass = > get_typed_class(options.virt, "HostedService")) > > + names = conn.AssociatorNames(instanceref, AssocClass = assoc_class) > > rc = 0 > > except pywbem.CIMError, (rc, desc): > > if rc == exp_rc and desc.find(exp_desc) >= 0: > > @@ -70,7 +69,8 @@ def main(): > > logger.error(details) > > > > if rc == 0: > > - logger.error("HostedService associator should NOT return > excepted result with a wrong key name and value of HostSystem input") > > + logger.error("HostedService associator should NOT return > excepted result\ > > + with a wrong key name and value of HostSystem input") > > status = FAIL > > > > return status > > > The above test case passes with false positive. > The existing test case is intended to verify for exception when a wrong > Name is passed as a parameter. > _ > For ex: without the sblim-base-provider the tc would be checking_ > wbemcli ain -ac Xen_HostedService > 'http://root:p at localhost:5988/root/virt:Xen_HostSystem. > CreationClassName="Xen_HostSystem",Wrong="wrong"' > * > * wbemcli: Cim: (6) CIM_ERR_NOT_FOUND: No such instance (Name) > * > > _But with the sblim-base-provider installed the tc would be checking_ > > wbemcli ain -ac Xen_HostedService > 'http://root:P at localhost:5988/root/virt:Xen_HostSystem. > CreationClassName="Linux_ComputerSystem",Wrong="wrong"' > * > * wbemcli: Cim: (6) CIM_ERR_NOT_FOUND: No such instance (CreationClassName) > * > > though getting the exception for Linux_ComputerSystem in the second case > is valid for now, as the query with the Linux_CS does not work yet, > but this is not the expected behavior of the test case. > > The tc just verifies only "No such instance " string which is present in > both the exceptions and hence passes. > 1) This test cannot be supported to work with sblim-base-provider > installed yet. > 2) We need to update the tc to verify the case where we pass Invalid > CreationClassName. > 3) We need to be verifying the complete exception instead of just > verifying part of it. > Good catch - Deepti. I have update the tc to verify the complete exceptions for both HostedService03&04, also HostedService-03 to verify the case when we pass invalid CreationClassName. On HostedService-04, follow patch will to verify other invalid properties except invalid Name. Thanks! > 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 Mon Oct 6 06:57:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 05 Oct 2008 23:57:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying the log message in assoc.py Message-ID: <58722293be09f1a91181.1223276229@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1223276200 25200 # Node ID 58722293be09f1a91181a388dd3b073de0c8e10d # Parent b710ecb26adf500caa6b801fdf10e4efbed3877e [TEST] Modifying the log message in assoc.py Signed-off-by: Deepti B. Kalakeri diff -r b710ecb26adf -r 58722293be09 suites/libvirt-cim/lib/XenKvmLib/assoc.py --- a/suites/libvirt-cim/lib/XenKvmLib/assoc.py Fri Oct 03 06:34:29 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/assoc.py Sun Oct 05 23:56:40 2008 -0700 @@ -45,7 +45,7 @@ names = [] try: - logger.error("DEBUG instanceref, is %s", instanceref) + logger.info("DEBUG instanceref, is %s", instanceref) names = conn.AssociatorNames(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] @@ -68,7 +68,7 @@ names = [] try: - logger.error("DEBUG instanceref, is %s", instanceref) + logger.info("DEBUG instanceref, is %s", instanceref) names = conn.Associators(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] From deeptik at linux.vnet.ibm.com Mon Oct 6 07:14:58 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 06 Oct 2008 12:44:58 +0530 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Oct 06 2008 Message-ID: <48E9BAF2.9070708@linux.vnet.ibm.com> ================================================= KVM on Pegasus Test Run Summary for Oct 06 2008 ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.26-rc2-mm1-netns libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 708 Libvirt-cim changeset: 3ff9257bc87a ================================================= FAIL : 0 XFAIL : 2 SKIP : 6 PASS : 127 ----------------- Total : 135 ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP 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: 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: 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: 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: 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 -------------------------------------------------------------------- Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Mon Oct 6 07:18:04 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 06 Oct 2008 12:48:04 +0530 Subject: [Libvirt-cim] Re: KVM on Pegasus Test Run Summary for Oct 06 2008 In-Reply-To: <48E9BAF2.9070708@linux.vnet.ibm.com> References: <48E9BAF2.9070708@linux.vnet.ibm.com> Message-ID: <48E9BBAC.6070608@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > KVM on Pegasus Test Run Summary for Oct 06 2008 > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.26-rc2-mm1-netns > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: Pegasus 2.7.1 > Libvirt-cim revision: 708 > Libvirt-cim changeset: 3ff9257bc87a > ================================================= > FAIL : 0 > XFAIL : 2 > SKIP : 6 > PASS : 127 > ----------------- > Total : 135 > ================================================= > XFAIL Test Summary: > ComputerSystem - 32_start_reboot.py: XFAIL > ComputerSystem - 33_suspend_reboot.py: XFAIL > > ================================================= > SKIP Test Summary: > ComputerSystem - 02_nosystems.py: SKIP > LogicalDisk - 02_nodevs.py: SKIP The above two test cases were skipped because there were defined domains on the machine. The tc passed when run manually without any domains on the machine. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Mon Oct 6 07:27:56 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 06 Oct 2008 12:57:56 +0530 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Oct 06 2008 Message-ID: <48E9BDFC.6090905@linux.vnet.ibm.com> ================================================= XenFV on Pegasus Test Run Summary for Oct 06 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: 708 Libvirt-cim changeset: 3ff9257bc87a ================================================= FAIL : 3 XFAIL : 0 SKIP : 4 PASS : 128 ----------------- Total : 135 ================================================= FAIL Test Summary: HostSystem - 03_hs_to_settdefcap.py: FAIL LogicalDisk - 03_ld_gi_errs.py: FAIL SettingsDefineCapabilities - 01_forward.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: 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: FAIL ERROR - DEBUG instanceref, is Xen_HostSystem.CreationClassName="Xen_HostSystem",Name="elm3b217.beaverton.ibm.com" ERROR - DEBUG instanceref, is Xen_ProcessorPool.InstanceID="ProcessorPool/0" ERROR - DEBUG instanceref, is Xen_MemoryPool.InstanceID="MemoryPool/0" ERROR - DEBUG instanceref, is Xen_NetworkPool.InstanceID="NetworkPool/cimtest-networkpool" ERROR - DEBUG instanceref, is Xen_NetworkPool.InstanceID="NetworkPool/default" ERROR - DEBUG instanceref, is Xen_DiskPool.InstanceID="DiskPool/cimtest-diskpool" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="ProcessorPool/0" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="MemoryPool/0" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="NetworkPool/cimtest-networkpool" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="NetworkPool/default" ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="DiskPool/cimtest-diskpool" ERROR - SettingsDefineCapabilities returned 8 ResourcePool objects instead of 4 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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 (no domain for 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: 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: FAIL ERROR - DEBUG instanceref, is Xen_AllocationCapabilities.InstanceID="DiskPool/cimtest-diskpool" ERROR - Xen_SettingsDefineCapabilities returned 8 ResourcePool objectsinstead 4 -------------------------------------------------------------------- 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: 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 -------------------------------------------------------------------- Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Mon Oct 6 11:11:23 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 06 Oct 2008 04:11:23 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating enumclass.py library and Rebasing, Fixing and updating ElementCapabilities tc to work with and without sblim-base-provider Message-ID: <13af302129be5d68230f.1223291483@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1223289748 25200 # Node ID 13af302129be5d68230f6eabf2a268eb5f17f1e3 # Parent b710ecb26adf500caa6b801fdf10e4efbed3877e [TEST] Updating enumclass.py library and Rebasing, Fixing and updating ElementCapabilities tc to work with and without sblim-base-provider. changes to 01_forward.py: ------------------------- 1) Rebased and Updated the tc to work with/without sblim-base-provider. 2) Updated the tc to use cim_define(). This is req bcs the association of ElementCapabilities with the CS would not be excercised for KVM. 3) Included the bug no 00007. Included XFAIL . 4) Updated the tc to use cim.undefine(). changes to 02_reverse.py: ------------------------- 1) Fixed the return statement, this was causing the tc to pass with a false positive. 2) Updated the tc to work with/without sblim-base-provider. 3) Updated the tc to use cim_define(). This is req bcs the association of ElementCapabilities with the EnabledLogicalElementCapabilities would not be excercised for KVM. 4) Updated the tc to use cim.undefine(). 5) Added verification of the VirtualSystemMigrationService service. 6) Updated enumclas to support VirtualSystemMigrationService and VirtualSystemManagementService. 7) Removed Enumerate instance and used getInstance instead to verify the VirtualSystemMigrationService and VirtualSystemManagementService values in the association. Tested with Xen, XenFV, KVM on current sources and with/without sblim-base-provider installed. Signed-off-by: Deepti B. Kalakeri diff -r b710ecb26adf -r 13af302129be suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Oct 03 06:34:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Mon Oct 06 03:42:28 2008 -0700 @@ -23,17 +23,19 @@ import sys from VirtLib import utils from VirtLib import live +from XenKvmLib import vxml from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class -from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ - CIM_ERROR_ENUMERATE +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main -from CimTest.ReturnCodes import PASS, FAIL, SKIP +from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC from XenKvmLib.enumclass import enumerate from XenKvmLib.common_util import get_host_info sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +test_dom = "dom_elecap" +bug_sblim = "00007" def append_to_list(server, virt, poolname, valid_elc_id): keys_list = ['InstanceID'] @@ -67,7 +69,6 @@ logger.error("Failed to get host info") return status - try: an = get_typed_class(virt, "ElementCapabilities") elc = assoc.AssociatorNames(server, @@ -91,35 +92,52 @@ return status if len(elc) == 0: - logger.error("ElementCapabilities association failed, excepted at least one instance") - return FAIL + logger.error("'%s' association failed, excepted at least one instance", + an) + if host_ccn == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + return FAIL for i in elc: if i.classname not in valid_elc_name: - logger.error("ElementCapabilities association classname error") + logger.error("'%s' association classname error", an) return FAIL if i['InstanceID'] not in valid_elc_id: - logger.error("ElementCapabilities association InstanceID error ") + logger.error("'%s' association InstanceID error ", an) return FAIL + + virtxml = vxml.get_class(virt) + cxml = virtxml(test_dom) + ret = cxml.cim_define(server) + if not ret: + logger.error("Failed to define the dom: %s", test_dom) + status = FAIL + return status cs = live.domain_list(server, virt) ccn = get_typed_class(virt, "ComputerSystem") for system in cs: try: - elec = assoc.AssociatorNames(server, - an, ccn, Name = system, + elec = assoc.AssociatorNames(server, an, ccn, Name = system, CreationClassName = ccn) except Exception: logger.error(CIM_ERROR_ASSOCIATORNAMES % system) + cxml.undefine(server) return FAIL + cn = get_typed_class(virt, "EnabledLogicalElementCapabilities") if elec[0].classname != cn: - logger.error("ElementCapabilities association classname error") + cxml.undefine(server) + logger.error("'%s' association classname error", an) return FAIL elif elec[0].keybindings['InstanceID'] != system: logger.error("ElementCapabilities association InstanceID error") + cxml.undefine(server) + logger.error("'%s' association InstanceID error", an) return FAIL + cxml.undefine(server) return PASS if __name__ == "__main__": diff -r b710ecb26adf -r 13af302129be suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Oct 03 06:34:29 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Mon Oct 06 03:42:28 2008 -0700 @@ -26,26 +26,30 @@ from VirtLib import live from XenKvmLib import assoc 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 +from XenKvmLib import vxml +from XenKvmLib.classes import get_typed_class +from XenKvmLib.classes import get_class_basename +from XenKvmLib.common_util import get_host_info +from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, \ +CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.enumclass import getInstance sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +test_dom = "dom_elecap" def call_assoc(ip, cn, id, virt="Xen"): status = PASS ec_ele = [] + assoc_cn = get_typed_class(virt, "ElementCapabilities") try: ec_ele = assoc.AssociatorNames(ip, - "ElementCapabilities", + assoc_cn, cn, - virt, InstanceID = id) except Exception: - logger.error(CIM_ERROR_ASSOCIATORNAMES, - 'ElementCapabilities') + logger.error(CIM_ERROR_ASSOCIATORNAMES, assoc_cn) status = FAIL return status, ec_ele @@ -57,102 +61,126 @@ return FAIL, new_list return PASS, new_list -def verify_host(inst_list, ip, virt="Xen"): - hs = get_typed_class(virt, 'HostSystem') - status, list = filter(inst_list, hs, 1) +def verify_host(inst_list, host_name, host_ccn): + status, list = filter(inst_list, host_ccn, 1) if status != PASS: return status inst = list[0] - keys = ['Name', 'CreationClassName'] + creationclassname = inst.keybindings['CreationClassName'] + name = inst.keybindings['Name'] + + if creationclassname != host_ccn: + logger.error("CreationClassName doesn't match") + return FAIL + + if name != host_name: + logger.error("Name doesn't match") + return FAIL + + return PASS + +def verify_service(inst_list, ip, virt, host_name, host_ccn, + name=" ", ser_cn=""): + status, list = filter(inst_list, ser_cn, 1) + if status != PASS: + return status + + inst = list[0] + keys = { + 'CreationClassName' : ser_cn, + 'Name' : name, + 'SystemName' : host_name, + 'SystemCreationClassName' : host_ccn + } try: - host_sys = enumclass.enumerate(ip, 'HostSystem', keys, virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE, 'HostSystem') + basename = get_class_basename(ser_cn) + service = getInstance(ip, basename, keys, virt) + except Exception, detail: + logger.error(CIM_ERROR_GETINSTANCE, ser_cn) + logger.error("Exeption : %s", detail) return FAIL creationclassname = inst.keybindings['CreationClassName'] name = inst.keybindings['Name'] - if creationclassname != host_sys.CreationClassName: + if creationclassname != service.CreationClassName: logger.error("CreationClassName doesn't match") return FAIL - elif name != host_sys.Name: - logger.error("Name doesn't match") - return FAIL - return PASS - -def verify_service(inst_list, ip, virt): - service = get_typed_class(virt, "VirtualSystemManagementService") - status, list = filter(inst_list, service, 1) - if status != PASS: - return status - - inst = list[0] - try: - service = vsms.enumerate_instances(ip, virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE, - 'VirtualSystemManagementService') - return FAIL - - creationclassname = inst.keybindings['CreationClassName'] - name = inst.keybindings['Name'] - - if creationclassname != service['CreationClassName']: - logger.error("CreationClassName doesn't match") - return FAIL - elif name != service['Name']: + if name != service.Name: logger.error("InstanceID doesn't match") return FAIL - return PASS @do_main(sup_types) def main(): options = main.options - + cap_list = {"VirtualSystemManagementCapabilities" : "ManagementCapabilities", - "VirtualSystemMigrationCapabilities" : "MigrationCapabilities"} - import pdb - #pdb.set_trace() + "VirtualSystemMigrationCapabilities" : "MigrationCapabilities"} + + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Failed to get host info") + return status + for k, v in cap_list.iteritems(): - status, ec_ele = call_assoc(options.ip, k, v, options.virt) + cn = get_typed_class(options.virt, k) + status, ec_ele = call_assoc(options.ip, cn, v, options.virt) if status != PASS: - return - - status = verify_host(ec_ele, options.ip, options.virt) + return FAIL + + status = verify_host(ec_ele, host_name, host_ccn) if status != PASS: return status - + if v == 'ManagementCapabilities': - status = verify_service(ec_ele, options.ip, options.virt) - if status != PASS: - return status + cn = get_typed_class(options.virt, "VirtualSystemManagementService") + status = verify_service(ec_ele, options.ip, options.virt, + host_name, host_ccn, + name="Management Service", ser_cn=cn) + else: + cn = get_typed_class(options.virt, "VirtualSystemMigrationService") + status = verify_service(ec_ele, options.ip, options.virt, + host_name, host_ccn, + name="MigrationService", ser_cn=cn) + if status != PASS: + return status + + virtxml = vxml.get_class(options.virt) + cxml = virtxml(test_dom) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s" % test_dom) + return FAIL cs = live.domain_list(options.ip, options.virt) for system in cs: - status, elec_cs = call_assoc(options.ip, - "EnabledLogicalElementCapabilities", - system, - options.virt) + cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities") + status, elec_cs = call_assoc(options.ip, cn, system, options.virt) if status != PASS: - return + return FAIL if len(elec_cs) < 1: logger.error("No ELEC instances returned") + cxml.undefine(options.ip) return FAIL - if elec_cs[0].keybindings['CreationClassName'] != get_typed_class(options.virt, "ComputerSystem"): - logger.error("Excpeted CreationClassName %s, got %s" % - ("ComputerSystem", - elec_cs[0].keybindings['CreationClassName'])) - return FAIL - elif elec_cs[0].keybindings['Name'] != system: - logger.error("ElementCapabilities association Name error") + if elec_cs[0].keybindings['CreationClassName'] != \ + get_typed_class(options.virt, "ComputerSystem"): + logger.error("Excpeted CreationClassName %s, got %s", + "ComputerSystem", + elec_cs[0].keybindings['CreationClassName']) + cxml.undefine(options.ip) return FAIL + if elec_cs[0].keybindings['Name'] != system: + logger.error("ElementCapabilities association Name error") + cxml.undefine(options.ip) + return FAIL + + cxml.undefine(options.ip) return PASS if __name__ == "__main__": diff -r b710ecb26adf -r 13af302129be suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Oct 03 06:34:29 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Mon Oct 06 03:42:28 2008 -0700 @@ -336,6 +336,25 @@ class KVM_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData): pass +class KVM_VirtualSystemMigrationService(CIM_MyClass): + pass + +class Xen_VirtualSystemMigrationService(CIM_MyClass): + pass + +class LXC_VirtualSystemMigrationService(CIM_MyClass): + pass + +class Xen_VirtualSystemManagementService(CIM_MyClass): + pass + +class KVM_VirtualSystemManagementService(CIM_MyClass): + pass + +class LXC_VirtualSystemManagementService(CIM_MyClass): + pass + + # Generic function which can be used to get the enumerate instances of any # class when the following fields are specified # classname = any class for which we want obtain the instances From deeptik at linux.vnet.ibm.com Mon Oct 6 12:08:27 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 06 Oct 2008 17:38:27 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix LogicalDisk-03_ld_gi_errs.py by using cim_define() function In-Reply-To: <29da4cc05673c815d082.1223260783@elm3b217.beaverton.ibm.com> References: <29da4cc05673c815d082.1223260783@elm3b217.beaverton.ibm.com> Message-ID: <48E9FFBB.2020504@linux.vnet.ibm.com> +1 for me yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223260772 25200 > # Node ID 29da4cc05673c815d082af768eca278bd5b6b28b > # Parent b710ecb26adf500caa6b801fdf10e4efbed3877e > [TEST] Fix LogicalDisk-03_ld_gi_errs.py by using cim_define() function > > Signed-off-by: Guolian Yun > > diff -r b710ecb26adf -r 29da4cc05673 suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py > --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Fri Oct 03 06:34:29 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Sun Oct 05 19:39:32 2008 -0700 > @@ -186,7 +186,7 @@ def main(): > test_disk = 'hda' > > vsxml = get_class(options.virt)(test_dom, disk=test_disk) > - ret = vsxml.define(options.ip) > + ret = vsxml.cim_define(options.ip) > if not ret: > logger.error("Failed to Define the dom: %s", test_dom) > return FAIL > > _______________________________________________ > 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 Oct 6 12:03:57 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 06 Oct 2008 17:33:57 +0530 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Fixing and updating 01_forward.py of ElementCapabilities to work with and without sblim-base-provider In-Reply-To: <48E6856C.8040306@linux.vnet.ibm.com> References: <530d3dab93cd36a2b68e.1222880691@elm3b217.beaverton.ibm.com> <48E6856C.8040306@linux.vnet.ibm.com> Message-ID: <48E9FEAD.4070607@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B. Kalakeri wrote: >> # HG changeset patch >> # User Deepti B. Kalakeri >> # Date 1222853363 25200 >> # Node ID 530d3dab93cd36a2b68e1fb42c71c9a1cfe755fc >> # Parent fb10c72ed404aa96715e2d013b0ee3502046496f >> [TEST] Fixing and updating 01_forward.py of ElementCapabilities to >> work with and without sblim-base-provider. >> >> 1) Updated the tc to work with/without sblim-base-provider. >> 2) Updated the tc to use cim_define(). This is req bcs the >> association of ElementCapabilities with the CS would not be >> excercised for KVM. >> 3) Included the bug no 00007. Included XFAIL . >> 4) Used get_host_info() for getting the host information. >> 5) Updated the tc to use cim.undefine(). >> >> Tested with Xen, XenFV, KVM on current sources and with/without >> sblim-base-provider installed. >> >> Signed-off-by: Deepti B. Kalakeri >> >> diff -r fb10c72ed404 -r 530d3dab93cd >> suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py > > This patch no longer applies for me. Can you rebase this set on the > updated tree and resend? > > Thanks! > I have rebased this patch set and resubmitted it again. Regards, Deepti. From deeptik at linux.vnet.ibm.com Mon Oct 6 12:55:58 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 06 Oct 2008 18:25:58 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix HostedService-04_reverse_errs.py to work with sblim base provider installed In-Reply-To: <3e0a467ec1227d04e247.1223273169@elm3b217.beaverton.ibm.com> References: <3e0a467ec1227d04e247.1223273169@elm3b217.beaverton.ibm.com> Message-ID: <48EA0ADE.3010106@linux.vnet.ibm.com> An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Oct 6 13:29:45 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 06 Oct 2008 18:59:45 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed In-Reply-To: References: Message-ID: <48EA12C9.2050901@linux.vnet.ibm.com> An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Mon Oct 6 21:30:29 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Oct 2008 14:30:29 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed In-Reply-To: References: Message-ID: <48EA8375.4090505@linux.vnet.ibm.com> > > - try: > - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) > - rc = 0 > - except pywbem.CIMError, (rc, desc): > - if rc == exp_rc and desc.find(exp_desc) >= 0: > - logger.info("Got excepted rc code and error string") > - status = PASS > - else: > - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) > - except Exception, details: > - logger.error("Unknown exception happened") > - logger.error(details) > + hostedservice = get_typed_class(options.virt, "HostedService") > + for i in range(0, len(instanceref)): If you use a for loop, it's better to use: for inst in instanceref: > + try: > + names = conn.AssociatorNames(instanceref[i], AssocClass = hostedservice) > + rc = 0 > + except pywbem.CIMError, (rc, desc): > + if rc == exp_rc and desc.find(exp_desc[i]) >= 0: Using exp_desc[i] isn't very clear. It's not obvious which exception corresponds to which reference. I'd use a list or some other way to make it obvious which exception you're expecting in a given case. > + logger.info("Got excepted rc code and error string") > + status = PASS > + else: > + logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) > + except Exception, details: > + logger.error("Unknown exception happened") > + logger.error(details) > > - if rc == 0: > - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of HostSystem input") > - status = FAIL > + if rc == 0: > + logger.error("HostedService associator should NOT return excepted result\ > + with a wrong key name and value of HostSystem input") This is an existing typo, but can you change "HostedService associator should NOT return excepted result" to "HostedService associator should NOT return expected result" And its better to fix this in the following manner: logger.error("HostedService associator should NOT return excepted result" "with a wrong key name and value of HostSystem input") -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Oct 6 21:51:43 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Oct 2008 14:51:43 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating enumclass.py library and Rebasing, Fixing and updating ElementCapabilities tc to work with and without sblim-base-provider In-Reply-To: <13af302129be5d68230f.1223291483@localhost.localdomain> References: <13af302129be5d68230f.1223291483@localhost.localdomain> Message-ID: <48EA886F.10301@linux.vnet.ibm.com> > - logger.error("ElementCapabilities association failed, excepted at least one instance") > - return FAIL > + logger.error("'%s' association failed, excepted at least one instance", > + an) I know this is an existing issue, but there's a typo.. can you change "excepted" to "expected". > + virtxml = vxml.get_class(virt) > + cxml = virtxml(test_dom) > + ret = cxml.cim_define(server) > + if not ret: > + logger.error("Failed to define the dom: %s", test_dom) > + status = FAIL > + return status Can just have "return FAIL" here. > > if __name__ == "__main__": > diff -r b710ecb26adf -r 13af302129be suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Oct 03 06:34:29 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Mon Oct 06 03:42:28 2008 -0700 > @@ -26,26 +26,30 @@ > from VirtLib import live > from XenKvmLib import assoc > 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 > +from XenKvmLib import vxml > +from XenKvmLib.classes import get_typed_class > +from XenKvmLib.classes import get_class_basename > +from XenKvmLib.common_util import get_host_info > +from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, \ > +CIM_ERROR_ASSOCIATORNAMES Can you indent this so it's lined up under "logger"? Make the import block a little easier to read. > +def verify_service(inst_list, ip, virt, host_name, host_ccn, > + name=" ", ser_cn=""): There probably won't be a type where you won't pass in values for name and ser_cn. So I'd change this to: def verify_service(inst_list, ip, virt, host_name, host_ccn, name, ser_cn): This makes it so that you can call verify_service() without having to specify name="foo", ser_cn="bar". > + > + virtxml = vxml.get_class(options.virt) > + cxml = virtxml(test_dom) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to define the dom: %s" % test_dom) > + return FAIL > > cs = live.domain_list(options.ip, options.virt) > for system in cs: > - status, elec_cs = call_assoc(options.ip, > - "EnabledLogicalElementCapabilities", > - system, > - options.virt) > + cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities") > + status, elec_cs = call_assoc(options.ip, cn, system, options.virt) > if status != PASS: > - return > + return FAIL You'll need to undefine the domain before the return. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Oct 6 21:56:29 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Oct 2008 14:56:29 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] Modify AC 01_enumpy to use new EnumInstance() call In-Reply-To: Message-ID: <6927f0fc1112e53ef7b8.1223330189@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1222912864 25200 # Node ID 6927f0fc1112e53ef7b8f75885aff8e602eb03b7 # Parent 66508277e8139993c9fb8bcc0368a77f8f597052 [TEST] Modify AC 01_enumpy to use new EnumInstance() call. Signed-off-by: Kaitlin Rupert diff -r 66508277e813 -r 6927f0fc1112 suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Mon Oct 06 14:53:47 2008 -0700 +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Wed Oct 01 19:01:04 2008 -0700 @@ -26,42 +26,40 @@ # import sys -from VirtLib.live import virsh_version -from XenKvmLib import enumclass +from XenKvmLib.enumclass import EnumInstances from XenKvmLib.const import do_main, platform_sup from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.const import default_pool_name +from XenKvmLib.common_util import cleanup_restore +from XenKvmLib.classes import get_typed_class sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] -def enum_pools_and_ac(ip, virt, cn): +def enum_pools_and_ac(ip, ac_cn, p_names): pools = {} ac = [] - pt = ['MemoryPool', 'ProcessorPool', 'DiskPool', 'NetworkPool'] + try: + ac = EnumInstances(ip, ac_cn) - try: - key = ["InstanceID"] - ac = enumclass.enumerate(ip, cn, key, virt) - - for p in pt: - enum_list = enumclass.enumerate(ip, p, key, virt) + for p_cn in p_names: + + enum_list = EnumInstances(ip, p_cn) if len(enum_list) < 1: - logger.error("%s did not return any instances" % p) + logger.error("%s did not return any instances" % p_cn) return pools, ac for pool in enum_list: pools[pool.InstanceID] = pool except Exception, details: - logger.error(CIM_ERROR_ENUMERATE, cn) + logger.error(CIM_ERROR_ENUMERATE, ac_cn) logger.error(details) return pools, ac if len(ac) != len(pools): - logger.error("%s returned %s instances, expected %s" % (cn, len(ac), + logger.error("%s returned %s instances, expected %s" % (ac_cn, len(ac), len(pools))) return pools, ac @@ -85,9 +83,13 @@ def main(): options = main.options - cn = 'AllocationCapabilities' + cn = get_typed_class(options.virt, 'AllocationCapabilities') + pt = [get_typed_class(options.virt, 'MemoryPool'), + get_typed_class(options.virt, 'ProcessorPool'), + get_typed_class(options.virt, 'DiskPool'), + get_typed_class(options.virt, 'NetworkPool')] - pools, ac = enum_pools_and_ac(options.ip, options.virt, cn) + pools, ac = enum_pools_and_ac(options.ip, cn, pt) if len(pools) < 4: logger.error("Only %d pools returned, expected at least 4" % len(pools)) cleanup_restore(options.ip, options.virt) From kaitlin at linux.vnet.ibm.com Mon Oct 6 21:56:27 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Oct 2008 14:56:27 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] Update enumclass to improve enumerate() calls. Message-ID: From kaitlin at linux.vnet.ibm.com Mon Oct 6 21:56:30 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Oct 2008 14:56:30 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] Modify ESD 01_forward.py to use new GetInstance() call In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1222912864 25200 # Node ID b66e4ffc75b323c9b0e40c8ae99563bd97cb7065 # Parent 6927f0fc1112e53ef7b8f75885aff8e602eb03b7 [TEST] Modify ESD 01_forward.py to use new GetInstance() call. Signed-off-by: Kaitlin Rupert diff -r 6927f0fc1112 -r b66e4ffc75b3 suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Wed Oct 01 19:01:04 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Wed Oct 01 19:01:04 2008 -0700 @@ -49,7 +49,7 @@ import sys from VirtLib import utils -from XenKvmLib.enumclass import getInstance +from XenKvmLib.enumclass import GetInstance from XenKvmLib.assoc import Associators, compare_all_prop from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS @@ -62,13 +62,13 @@ test_dom = "esd_dom" vmac = "00:11:22:33:44:aa" -def get_inst(ip, virt, cn, key): +def get_inst(ip, cn, key): inst = None try: key_list = {"InstanceID" : key } - inst = getInstance(ip, cn, key_list, virt) + inst = GetInstance(ip, cn, key_list) except Exception, details: logger.error("Exception %s" % details) @@ -143,7 +143,8 @@ inst_list = {} for cn, k in keys.iteritems(): - inst_list[cn] = get_inst(options.ip, options.virt, cn, k) + classname = get_typed_class(options.virt, cn); + inst_list[cn] = get_inst(options.ip, classname, k) if inst_list[cn] is None: cxml.undefine(options.ip) return FAIL From kaitlin at linux.vnet.ibm.com Mon Oct 6 21:56:28 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 06 Oct 2008 14:56:28 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] Add new enumerate infrastructure In-Reply-To: Message-ID: <66508277e8139993c9fb.1223330188@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223330027 25200 # Node ID 66508277e8139993c9fb8bcc0368a77f8f597052 # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 [TEST] Add new enumerate infrastructure... CIM_CimtestClass, EnumNames, EnumInstances, and GetInstance will replace the existing CIM_MyClass, enumerate, enumerate_inst, and getInstance. Since there are a lot of tests to change, the original infrastructure is left in place. This should be removed once the tests are updated to use the new infrastructure. There's a few problems with the existing infrastructure. These replacesments aim to remove these issues: -A new classes require an entry in enumclass.py for each virt type. These changes remove the requirement. -A key_list is a necessary parameter to the enumerate calls. This goes against the extrinsic API definitions - the CIM API does not include an equivallent paremeter for the enumerate calls. -The enumerate() call currently takes a base classname, and a virt type. Really, the just the classname (complete with prefix) should be passed in. This way, SBLIM classes are supported in a more natrual way. Signed-off-by: Kaitlin Rupert diff -r 311bf6eda378 -r 66508277e813 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Mon Oct 06 14:53:47 2008 -0700 @@ -28,6 +28,8 @@ from XenKvmLib.devices import CIM_Instance from XenKvmLib.classes import get_typed_class from CimTest import Globals, CimExt +from VirtLib import utils +from CimTest.Globals import logger class CIM_MyClass(CIM_Instance): def __init__(self, server, keys): @@ -405,3 +407,86 @@ return None return inst + +class CIM_CimtestClass(CIM_Instance): + def __init__(self, host, ref): + + conn = pywbem.WBEMConnection('http://%s' % host, + (Globals.CIM_USER, Globals.CIM_PASS), + Globals.CIM_NS) + try: + inst = conn.GetInstance(ref) + except pywbem.CIMError, arg: + raise arg + + self.conn = conn + self.inst = inst + self.ref = ref + + 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) + +def EnumNames(host, cn): + '''Resolve the enumeration given the @cn. + Return a list of CIMInstanceName objects.''' + + conn = pywbem.WBEMConnection('http://%s' % host, + (Globals.CIM_USER, Globals.CIM_PASS), + Globals.CIM_NS) + + names = [] + + try: + names = conn.EnumerateInstanceNames(cn) + except pywbem.CIMError, arg: + print arg[1] + return names + + return names + +def EnumInstances(host, cn): + '''Resolve the enumeration given the @cn. + Return a list of CIMInstance objects.''' + + refs = [] + + try: + refs = EnumNames(host, cn) + except pywbem.CIMError, arg: + print arg[1] + + list = [] + + for name in refs: + list.append(CIM_CimtestClass(host, name)) + + return list + +def GetInstance(host, cn, keys): + '''Resolve the enumeration given the @cn. + Return a list of CIMInstance objects.''' + + ref = CIMInstanceName(cn, keybindings=keys) + inst = None + + try: + inst = CIM_CimtestClass(host, ref) + except pywbem.CIMError, arg: + print arg[1] + + return inst + From yunguol at cn.ibm.com Tue Oct 7 02:55:29 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 06 Oct 2008 19:55:29 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed Message-ID: <617b6fb544d62f056f28.1223348129@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223348123 25200 # Node ID 617b6fb544d62f056f281e75c15d2fcbebe3dac0 # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 [TEST] #5 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed Updats from 4 to 5: Using try_assoc() function to verify the exceptions for the associtations Signed-off-by: Guolian Yun diff -r 311bf6eda378 -r 617b6fb544d6 suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Mon Oct 06 19:55:23 2008 -0700 @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info, try_assoc from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ CIM_PASS, CIM_NS @@ -32,8 +33,12 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL, XFAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] -exp_rc = 6 #CIM_ERR_NOT_FOUND -exp_desc = "No such instance" +exp_values = { + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (CreationClassName)"}, + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (Name)"} + } @do_main(sup_types) def main(): @@ -41,38 +46,31 @@ def main(): rc = -1 status = FAIL keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) - instanceref = CIMInstanceName(get_typed_class(options.virt, "HostSystem"), - keybindings = {"Wrong" : "wrong", "CreationClassName" : host_sys.CreationClassName}) + assoc_classname = get_typed_class(options.virt, "HostedService") + classname = get_typed_class(options.virt, "HostSystem") + + keys = {"Wrong" : host_name, "CreationClassName": host_ccn} + ret = try_assoc(conn, host_ccn, assoc_classname, keys, "Name", exp_values['invalid_name'], bug_no="00007") + if ret != PASS and host_ccn == classname: + logger.error("------ FAILED: Invalid Name Key Name.------") + status = ret - names = [] + keys = {"Name" : host_name, "Wrong" : host_ccn} + ret = try_assoc(conn, host_ccn, assoc_classname, keys, "CreationClassName", exp_values['invalid_ccname'], bug_no="00007") + if ret != PASS and host_ccn == classname: + logger.error("------ FAILED: Invalid CreationClassName Key Name.------") + status = ret - try: - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) - rc = 0 - except pywbem.CIMError, (rc, desc): - if rc == exp_rc and desc.find(exp_desc) >= 0: - logger.info("Got excepted rc code and error string") - status = PASS - else: - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) - except Exception, details: - logger.error("Unknown exception happened") - logger.error(details) - if rc == 0: - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of HostSystem input") - status = FAIL - return status if __name__ == "__main__": From yunguol at cn.ibm.com Tue Oct 7 03:13:22 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 06 Oct 2008 20:13:22 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed Message-ID: <4650104669be81d74b92.1223349202@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223349190 25200 # Node ID 4650104669be81d74b92db23176fbc3ea36a8829 # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 [TEST] #5 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed Updats from 4 to 5: Using try_assoc() function to verify the exceptions for the associtations Signed-off-by: Guolian Yun diff -r 311bf6eda378 -r 4650104669be suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Mon Oct 06 20:13:10 2008 -0700 @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info, try_assoc from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ CIM_PASS, CIM_NS @@ -32,8 +33,12 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL, XFAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] -exp_rc = 6 #CIM_ERR_NOT_FOUND -exp_desc = "No such instance" +exp_values = { + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (CreationClassName)"}, + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (Name)"} + } @do_main(sup_types) def main(): @@ -41,45 +46,38 @@ def main(): rc = -1 status = FAIL keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL - - servicelist = {get_typed_class(options.virt, "ResourcePoolConfigurationService") : "RPCS", - get_typed_class(options.virt, "VirtualSystemManagementService") : "Management Service", - get_typed_class(options.virt, "VirtualSystemMigrationService") : "MigrationService"} + rpcs = get_typed_class(options.virt, "ResourcePoolConfigurationService") + vsms = get_typed_class(options.virt, "VirtualSystemManagementService") + vsmigrations = get_typed_class(options.virt, "VirtualSystemMigrationService") + + servicelist = {rpcs : "RPCS", + vsms : "Management Service", + vsmigrations : "MigrationService"} conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) + assoc_classname = get_typed_class(options.virt, "HostedService") for k, v in servicelist.items(): - instanceref = CIMInstanceName(k, - keybindings = {"Wrong" : v, - "CreationClassName" : "wrong", - "SystemCreationClassName" : host_sys.CreationClassName, - "SystemName" : host_sys.Name}) - names = [] - try: - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) - rc = 0 - except pywbem.CIMError, (rc, desc): - if rc == exp_rc and desc.find(exp_desc) >= 0: - logger.info("Got excepted rc code and error string") - status = PASS - else: - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) - except Exception, details: - logger.error("Unknown exception happened") - logger.error(details) + keys = {"Wrong" : v, "CreationClassName": k, \ + "SystemCreationClassName": host_ccn, "SystemName" : host_name} + ret = try_assoc(conn, k, assoc_classname, keys, "Name", exp_values['invalid_name'], bug_no="") + if ret != PASS: + logger.error("------ FAILED: Invalid Name Key Name.------") + status = ret - if rc == 0: - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of %s input" % k) - status = FAIL + keys = {"Name" : v, "Wrong": k, "SystemCreationClassName": host_ccn, "SystemName" : host_name} + ret = try_assoc(conn, k, assoc_classname, keys, "Name", exp_values['invalid_ccname'], bug_no="") + if ret != PASS: + logger.error("------ FAILED: Invalid Name Key Name.------") + status = ret return status From yunguol at cn.ibm.com Tue Oct 7 02:57:55 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 7 Oct 2008 10:57:55 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix HostedService-04_reverse_errs.py to work with sblim base provider installed In-Reply-To: <48EA0ADE.3010106@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-06 20:55:58: > > > yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223273159 25200 > # Node ID 3e0a467ec1227d04e2478ff7c10447a00459d246 > # Parent b710ecb26adf500caa6b801fdf10e4efbed3877e > [TEST] #4 Fix HostedService-04_reverse_errs.py to work with sblim > base provider installed > > Updates form 3 to 4: > > verifying the complete exception instead of just verifying part of it > > Follow up patch will to verify other exceptions except invalid Name > > Signed-off-by: Guolian Yun > > diff -r b710ecb26adf -r 3e0a467ec122 suites/libvirt- > cim/cimtest/HostedService/04_reverse_errs.py > --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py > Fri Oct 03 06:34:29 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py > Sun Oct 05 23:05:59 2008 -0700 > @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ > CIM_PASS, CIM_NS > @@ -33,20 +34,17 @@ from CimTest.ReturnCodes import PASS, FA > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > exp_rc = 6 #CIM_ERR_NOT_FOUND > -exp_desc = "No such instance" > +exp_desc = "No such instance (Name)" > > @do_main(sup_types) > def main(): > options = main.options > rc = -1 > status = FAIL > - keys = ['Name', 'CreationClassName'] > - try: > - host_sys = enumclass.enumerate(options.ip, 'HostSystem', > keys, options.virt)[0] > - except Exception: > - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > + status, host_name, host_ccn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > return FAIL > - > > servicelist = {get_typed_class(options.virt, > "ResourcePoolConfigurationService") : "RPCS", > get_typed_class(options.virt, > "VirtualSystemManagementService") : "Management Service", > > We should indent the lines to 80 columns. > @@ -59,13 +57,14 @@ def main(): > for k, v in servicelist.items(): > instanceref = CIMInstanceName(k, > keybindings = {"Wrong" : v, > - > "CreationClassName" : "wrong", > - > "SystemCreationClassName" : host_sys.CreationClassName, > - "SystemName" : > host_sys.Name}) > + "CreationClassName" : k, > + > "SystemCreationClassName" : host_ccn, > > Wrap this line to 80 columns. > + "SystemName" : > host_name}) > names = [] > - > + > + assoc_class = get_typed_class(options.virt, "HostedService") > try: > - names = conn.AssociatorNames(instanceref, AssocClass = > get_typed_class(options.virt, "HostedService")) > + names = conn.AssociatorNames(instanceref, AssocClass = > assoc_class) > rc = 0 > except pywbem.CIMError, (rc, desc): > if rc == exp_rc and desc.find(exp_desc) >= 0: > @@ -78,7 +77,8 @@ def main(): > logger.error(details) > > if rc == 0: > - logger.error("HostedService associator should NOT > return excepted result with a wrong key name and value of %s input" % k) > + logger.error("HostedService associator should NOT > return excepted result\ > + with a wrong key name and value of %s input" % k) > > Need to align this log msg as this will give lot of space between > result and with as below: > HostedService associator should NOT return excepted result > with a wrong key name and value of Xen_ResourcePoolConfigurationService input > Also, you can use the association name variable assoc_class instead > of hardcoding it as below: > logger.error("'%s' associator should NOT return records " > "with a wrong key name and CreationClassName value of % > s input", assoc_class, k) > > status = FAIL > > return status > Misplaced return statement , this will exit after checking for RPCS > and the loop will not execute the VirtualSystemMigrationService and > VirtualSystemManagementService checks. > Also, you can replace calling Associators() and verifications, with > the library function try_assoc() of common_util.py to verify the > exceptions for the associtations. I replace it using try_assoc() function to verify the exceptions. Thanks! > > This is not related to your changes, but can you change the following log msg > logger.error("Unknown exception happened") > to > logger.error("Unknown exception") > > > _______________________________________________ > 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 yunguol at cn.ibm.com Tue Oct 7 02:58:48 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 7 Oct 2008 10:58:48 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed In-Reply-To: <48EA12C9.2050901@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-06 21:29:45: > > > yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223272339 25200 > # Node ID bdb5911993d5e56c6398a447b3e5eabc5d41f83d > # Parent b710ecb26adf500caa6b801fdf10e4efbed3877e > [TEST] #4 Fix HostedService - 03_forward_errs.py to work with sblim > base provider installed > > Updates from 3 to 4: > > 1) Update the tc to verify the case when we pass Invalid CreationClassName > 2) Verify the complete exception instead of just verifying part of it > > Signed-off-by: Guolian Yun > > diff -r b710ecb26adf -r bdb5911993d5 suites/libvirt- > cim/cimtest/HostedService/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py > Fri Oct 03 06:34:29 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py > Sun Oct 05 22:52:19 2008 -0700 > @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ > CIM_PASS, CIM_NS > @@ -33,7 +34,8 @@ from CimTest.ReturnCodes import PASS, FA > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > exp_rc = 6 #CIM_ERR_NOT_FOUND > -exp_desc = "No such instance" > +exp_desc = ["No such instance (Name)", > + "No such instance (CreationClassName)"] > > @do_main(sup_types) > def main(): > @@ -41,37 +43,41 @@ def main(): > rc = -1 > status = FAIL > keys = ['Name', 'CreationClassName'] > - try: > - host_sys = enumclass.enumerate(options.ip, 'HostSystem', > keys, options.virt)[0] > - except Exception: > - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > + status, host_name, host_ccn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > return FAIL > - > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > (CIM_USER, CIM_PASS), > CIM_NS) > - instanceref = CIMInstanceName(get_typed_class(options.virt, > "HostSystem"), > - keybindings = {"Wrong" : "wrong", > "CreationClassName" : host_sys.CreationClassName}) > - > + hostsystem = get_typed_class(options.virt, "HostSystem") > + instanceref = [CIMInstanceName(hostsystem, > + keybindings = {"Wrong" : "wrong", > "CreationClassName" : host_ccn}), > + CIMInstanceName(hostsystem, > + keybindings = {"Name" : > host_name, "Wrong" : "wrong"})] > + > > The instanceref[0] will produce unexpected result as below and not > the required exception > > DEBUG instanceref is Xen_HostSystem. > CreationClassName="Linux_ComputerSystem",Wrong="wrong" > Unexpected rc code 6 and description CIM_ERR_NOT_FOUND: No such > instance (CreationClassName) > > > Replace CIMInstanceName(hostsystem, of instanceref[0] with > CIMInstanceName(host_ccn, otherwise it the instanceref will give > unexpected exception as above when sblim-base-provider is installed. > names = [] > > - try: > - names = conn.AssociatorNames(instanceref, AssocClass = > get_typed_class(options.virt, "HostedService")) > - rc = 0 > - except pywbem.CIMError, (rc, desc): > - if rc == exp_rc and desc.find(exp_desc) >= 0: > - logger.info("Got excepted rc code and error string") > - status = PASS > - else: > - logger.error("Unexpected rc code %s and description % > s\n" %(rc, desc)) > - except Exception, details: > - logger.error("Unknown exception happened") > - logger.error(details) > + hostedservice = get_typed_class(options.virt, "HostedService") > + for i in range(0, len(instanceref)): > + try: > + names = conn.AssociatorNames(instanceref[i], AssocClass > = hostedservice) > + rc = 0 > + except pywbem.CIMError, (rc, desc): > + if rc == exp_rc and desc.find(exp_desc[i]) >= 0: > + logger.info("Got excepted rc code and error string") > + status = PASS > + else: > + logger.error("Unexpected rc code %s and description > %s\n" %(rc, desc)) > + except Exception, details: > + logger.error("Unknown exception happened") > + logger.error(details) > > - if rc == 0: > - logger.error("HostedService associator should NOT return > excepted result with a wrong key name and value of HostSystem input") > - status = FAIL > + if rc == 0: > + logger.error("HostedService associator should NOT > return excepted result\ > + with a wrong key name and value of > HostSystem input") > + status = FAIL > > This does not exit the test case even when it fails. > Return appropriate return value here directly, for sblim-base- > provider we need to return XFAIL. > > return status > > > You can replace calling Associators() and verifications, with the > library function try_assoc() of common_util.py to verify the > exceptions for the associtations. #5 patch on the way. Thanks for your good point. > > This is not related to your changes, but can you change the following log msg > logger.error("Unknown exception happened") > to > logger.error("Unknown exception") > > _______________________________________________ > 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 yunguol at cn.ibm.com Tue Oct 7 03:10:56 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 7 Oct 2008 11:10:56 +0800 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] Add new enumerate infrastructure In-Reply-To: <66508277e8139993c9fb.1223330188@localhost.localdomain> Message-ID: +1 from me for the patch set =) libvirt-cim-bounces at redhat.com wrote on 2008-10-07 05:56:28: > # HG changeset patch > # User Kaitlin Rupert > # Date 1223330027 25200 > # Node ID 66508277e8139993c9fb8bcc0368a77f8f597052 > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > [TEST] Add new enumerate infrastructure... > > CIM_CimtestClass, EnumNames, EnumInstances, and GetInstance will > replace the existing CIM_MyClass, enumerate, enumerate_inst, and > getInstance. Since there are a lot of tests to change, the original > infrastructure is left in place. This should be removed once the > tests are updated to use the new infrastructure. > > There's a few problems with the existing infrastructure. These > replacesments aim to remove these issues: > > -A new classes require an entry in enumclass.py for each virt type. > These changes remove the requirement. > > -A key_list is a necessary parameter to the enumerate calls. This > goes against the extrinsic API definitions - the CIM API does not > include an equivallent paremeter for the enumerate calls. > > -The enumerate() call currently takes a base classname, and a virt > type. Really, the just the classname (complete with prefix) should > be passed in. This way, SBLIM classes are supported in a more natrual way. > > Signed-off-by: Kaitlin Rupert > > diff -r 311bf6eda378 -r 66508277e813 suites/libvirt- > cim/lib/XenKvmLib/enumclass.py > --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Sun Oct 05 23: > 56:40 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Mon Oct 06 14: > 53:47 2008 -0700 > @@ -28,6 +28,8 @@ > from XenKvmLib.devices import CIM_Instance > from XenKvmLib.classes import get_typed_class > from CimTest import Globals, CimExt > +from VirtLib import utils > +from CimTest.Globals import logger > > class CIM_MyClass(CIM_Instance): > def __init__(self, server, keys): > @@ -405,3 +407,86 @@ > return None > > return inst > + > +class CIM_CimtestClass(CIM_Instance): > + def __init__(self, host, ref): > + > + conn = pywbem.WBEMConnection('http://%s' % host, > + (Globals.CIM_USER, Globals.CIM_PASS), > + Globals.CIM_NS) > + try: > + inst = conn.GetInstance(ref) > + except pywbem.CIMError, arg: > + raise arg > + > + self.conn = conn > + self.inst = inst > + self.ref = ref > + > + 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) > + > +def EnumNames(host, cn): > + '''Resolve the enumeration given the @cn. > + Return a list of CIMInstanceName objects.''' > + > + conn = pywbem.WBEMConnection('http://%s' % host, > + (Globals.CIM_USER, Globals.CIM_PASS), > + Globals.CIM_NS) > + > + names = [] > + > + try: > + names = conn.EnumerateInstanceNames(cn) > + except pywbem.CIMError, arg: > + print arg[1] > + return names > + > + return names > + > +def EnumInstances(host, cn): > + '''Resolve the enumeration given the @cn. > + Return a list of CIMInstance objects.''' > + > + refs = [] > + > + try: > + refs = EnumNames(host, cn) > + except pywbem.CIMError, arg: > + print arg[1] > + > + list = [] > + > + for name in refs: > + list.append(CIM_CimtestClass(host, name)) > + > + return list > + > +def GetInstance(host, cn, keys): > + '''Resolve the enumeration given the @cn. > + Return a list of CIMInstance objects.''' > + > + ref = CIMInstanceName(cn, keybindings=keys) > + inst = None > + > + try: > + inst = CIM_CimtestClass(host, ref) > + except pywbem.CIMError, arg: > + print arg[1] > + > + return inst > + > > _______________________________________________ > 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 Oct 7 05:25:41 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 7 Oct 2008 13:25:41 +0800 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Oct 06 2008 In-Reply-To: <48E9BDFC.6090905@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-06 15:27:56: > ================================================= > XenFV on Pegasus Test Run Summary for Oct 06 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: 708 > Libvirt-cim changeset: 3ff9257bc87a > ================================================= > FAIL : 3 > XFAIL : 0 > SKIP : 4 > PASS : 128 > ----------------- > Total : 135 > ================================================= > FAIL Test Summary: > HostSystem - 03_hs_to_settdefcap.py: FAIL > LogicalDisk - 03_ld_gi_errs.py: FAIL > SettingsDefineCapabilities - 01_forward.py: FAIL > Hi Deepti, The fail test for XenFV is the same with Xen. I fix LogicalDisk - 03_ld_gi_errs.py, it pass for Xen and XenFV. You said you prepared to look into the other two tc failure yesterday, do you work them out? Thanks! > ================================================= > 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: 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: FAIL > ERROR - DEBUG instanceref, is Xen_HostSystem. > CreationClassName="Xen_HostSystem",Name="elm3b217.beaverton.ibm.com" > ERROR - DEBUG instanceref, is Xen_ProcessorPool. > InstanceID="ProcessorPool/0" > ERROR - DEBUG instanceref, is Xen_MemoryPool.InstanceID="MemoryPool/0" > ERROR - DEBUG instanceref, is Xen_NetworkPool. > InstanceID="NetworkPool/cimtest-networkpool" > ERROR - DEBUG instanceref, is Xen_NetworkPool. > InstanceID="NetworkPool/default" > ERROR - DEBUG instanceref, is Xen_DiskPool. > InstanceID="DiskPool/cimtest-diskpool" > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > InstanceID="ProcessorPool/0" > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > InstanceID="MemoryPool/0" > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > InstanceID="NetworkPool/cimtest-networkpool" > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > InstanceID="NetworkPool/default" > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > InstanceID="DiskPool/cimtest-diskpool" > ERROR - SettingsDefineCapabilities returned 8 ResourcePool > objects instead of 4 > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > -------------------------------------------------------------------- > 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 (no > domain for 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: 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: FAIL > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > InstanceID="DiskPool/cimtest-diskpool" > ERROR - Xen_SettingsDefineCapabilities returned 8 ResourcePool > objectsinstead 4 > -------------------------------------------------------------------- > 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: 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 > -------------------------------------------------------------------- > > 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 yunguol at cn.ibm.com Tue Oct 7 06:02:11 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 06 Oct 2008 23:02:11 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/01_forward.py to work with sblim base provider installed Message-ID: # HG changeset patch # User Guolian Yun # Date 1223359324 25200 # Node ID d81c2122fff796c7a08eb45cfe679f2e690e27bf # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 [TEST] Fix HostedResourcePool/01_forward.py to work with sblim base provider installed Signed-off-by: Guolian Yun diff -r 311bf6eda378 -r d81c2122fff7 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Mon Oct 06 23:02:04 2008 -0700 @@ -26,13 +26,15 @@ import sys import sys from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info from XenKvmLib.const import default_network_name from CimTest import Globals from CimTest.Globals import logger -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.const import do_main, default_pool_name from XenKvmLib.classes import get_typed_class +bug = '00007' sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) def main(): @@ -40,19 +42,17 @@ def main(): status = FAIL keys = ['Name', 'CreationClassName'] - try: - 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) + status, host_sys, host_cn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL try: assoc_cn = get_typed_class(options.virt, "HostedResourcePool") pool = assoc.AssociatorNames(options.ip, assoc_cn, - host_sys.CreationClassName, - Name = host_sys.Name, - CreationClassName = host_sys.CreationClassName) + host_cn, + Name = host_sys, + CreationClassName = host_cn) except Exception, details: logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn) logger.error("Exception:", details) @@ -62,8 +62,11 @@ def main(): logger.error("System association failed") return FAIL elif len(pool) == 0: - logger.error("No pool returned") - return FAIL + if host_cn == 'Linux_ComputerSystem': + return XFAIL_RC(bug) + else: + logger.error("No pool returned") + return FAIL for items in pool: cname = items.classname From yunguol at cn.ibm.com Tue Oct 7 06:09:59 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 06 Oct 2008 23:09:59 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed Message-ID: <0b599308e31a1865ab47.1223359799@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223359792 25200 # Node ID 0b599308e31a1865ab47b1c2d44d0887c409e139 # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 [TEST] Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed Signed-off-by: Guolian Yun diff -r 311bf6eda378 -r 0b599308e31a suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Mon Oct 06 23:09:52 2008 -0700 @@ -25,6 +25,7 @@ import sys import sys from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info from XenKvmLib.const import default_network_name from CimTest import Globals from CimTest.Globals import logger @@ -39,12 +40,11 @@ def main(): status = PASS keys = ['Name', 'CreationClassName'] - try: - 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) - return FAIL + status, host_sys, host_cn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") + 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") @@ -64,10 +64,10 @@ def main(): logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % v) return FAIL if len(assoc_host) == 1: - if assoc_host[0].keybindings['Name'] != host_sys.Name: + if assoc_host[0].keybindings['Name'] != host_sys: logger.error("Pool association returned wrong hostsystem") status = FAIL - if assoc_host[0].keybindings['CreationClassName'] != host_sys.CreationClassName: + if assoc_host[0].keybindings['CreationClassName'] != host_cn: logger.error("Pool association returned wrong CreationClassName") status = FAIL if status != PASS: From deeptik at linux.vnet.ibm.com Tue Oct 7 06:15:14 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Oct 2008 11:45:14 +0530 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Oct 06 2008 In-Reply-To: References: Message-ID: <48EAFE72.6080201@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-10-06 15:27:56: > > > ================================================= > > XenFV on Pegasus Test Run Summary for Oct 06 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: 708 > > Libvirt-cim changeset: 3ff9257bc87a > > ================================================= > > FAIL : 3 > > XFAIL : 0 > > SKIP : 4 > > PASS : 128 > > ----------------- > > Total : 135 > > ================================================= > > FAIL Test Summary: > > HostSystem - 03_hs_to_settdefcap.py: FAIL > > LogicalDisk - 03_ld_gi_errs.py: FAIL > > SettingsDefineCapabilities - 01_forward.py: FAIL > > > Hi Deepti, > > The fail test for XenFV is the same with Xen. I fix LogicalDisk - > 03_ld_gi_errs.py, it pass > for Xen and XenFV. You said you prepared to look into the other two > tc failure yesterday, do > you work them out? > Daisy, Since I ran out of time yesterday I was not able to look into the same. Ya I compared the test results yesterday and found the similarity in the results. Let me know if you have already started looking into it. Thanks and Regards, Deepti. > Thanks! > > > ================================================= > > 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: 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: FAIL > > ERROR - DEBUG instanceref, is Xen_HostSystem. > > CreationClassName="Xen_HostSystem",Name="elm3b217.beaverton.ibm.com" > > ERROR - DEBUG instanceref, is Xen_ProcessorPool. > > InstanceID="ProcessorPool/0" > > ERROR - DEBUG instanceref, is > Xen_MemoryPool.InstanceID="MemoryPool/0" > > ERROR - DEBUG instanceref, is Xen_NetworkPool. > > InstanceID="NetworkPool/cimtest-networkpool" > > ERROR - DEBUG instanceref, is Xen_NetworkPool. > > InstanceID="NetworkPool/default" > > ERROR - DEBUG instanceref, is Xen_DiskPool. > > InstanceID="DiskPool/cimtest-diskpool" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="ProcessorPool/0" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="MemoryPool/0" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="NetworkPool/cimtest-networkpool" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="NetworkPool/default" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="DiskPool/cimtest-diskpool" > > ERROR - SettingsDefineCapabilities returned 8 ResourcePool > > objects instead of 4 > > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > > -------------------------------------------------------------------- > > 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 (no > > domain for 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: 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: FAIL > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="DiskPool/cimtest-diskpool" > > ERROR - Xen_SettingsDefineCapabilities returned 8 ResourcePool > > objectsinstead 4 > > -------------------------------------------------------------------- > > 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: 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 > > -------------------------------------------------------------------- > > > > Thanks and Regards, > > Deepti. > > > > > > _______________________________________________ > > 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 From yunguol at cn.ibm.com Tue Oct 7 06:34:48 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 06 Oct 2008 23:34:48 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed Message-ID: <628b846c366a0c97fa97.1223361288@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223361281 25200 # Node ID 628b846c366a0c97fa97c18a5a7e2185c265188f # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 [TEST] Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed Signed-off-by: Guolian Yun diff -r 311bf6eda378 -r 628b846c366a suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Mon Oct 06 23:34:41 2008 -0700 @@ -25,16 +25,21 @@ import pywbem import pywbem from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info from XenKvmLib.common_util import try_assoc from CimTest import Globals from CimTest.Globals import logger -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.const import do_main from XenKvmLib.classes import get_typed_class -expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \ - "desc" : "No such instance" - } +bug = "00007" +expr_values = { + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (CreationClassName)"}, + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (Name)"} + } sup_types=['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) @@ -42,30 +47,36 @@ def main(): options = main.options status = PASS keys = ['Name', 'CreationClassName'] - try: - 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) + status, host_sys, host_cn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL conn = assoc.myWBEMConnection('http://%s' % options.ip, (Globals.CIM_USER, Globals.CIM_PASS), Globals.CIM_NS) - classname = host_sys.CreationClassName + classname = host_cn assoc_classname = get_typed_class(options.virt, "HostedResourcePool") - keys = {"Name" : "wrong", "CreationClassName" : host_sys.CreationClassName} - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") + keys = {"Name" : host_sys, "CreationClassName" : "wrong"} + ret = try_assoc(conn, classname, assoc_classname, keys, \ + "Name", expr_values['invalid_ccname'], bug_no="") if ret != PASS: - logger.error("------ FAILED: Invalid Name Key Name.------") - status = ret + if host_cn == 'Linux_ComputerSystem': + return XFAIL_RC(bug) + else: + logger.error("------ FAILED: Invalid CreationClassName Key Value.------") + status = ret - keys = {"Wrong" : host_sys.Name, "CreationClassName" : host_sys.CreationClassName} - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") + keys = {"Name" : "wrong", "CreationClassName" : host_cn} + ret = try_assoc(conn, classname, assoc_classname, keys, \ + "CreationClassName", expr_values['invalid_name'], bug_no="") if ret != PASS: - logger.error("------ FAILED: Invalid Name Key Value.------") - status = ret + if host_cn == 'Linux_ComputerSystem': + return XFAIL_RC(bug) + else: + logger.error("------ FAILED: Invalid Name Key Value.------") + status = ret return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Tue Oct 7 07:26:20 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 07 Oct 2008 00:26:20 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Updating enumclass.py library and Rebasing, Fixing and updating ElementCapabilities tc to work with and without sblim-base-provider Message-ID: <459e07fb1d302923d273.1223364380@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1223364340 25200 # Node ID 459e07fb1d302923d2734ce96d92839f0d5b370c # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 [TEST]#2 Updating enumclass.py library and Rebasing, Fixing and updating ElementCapabilities tc to work with and without sblim-base-provider. Changes from patch 1 to 2: -------------------------- 1) In 01_forward.py Fixed the typo error from excepted to expected. Returned FAIL instead of assigning it to status and then returning 2) In 02_reverse.py Indented the import block Removed the param intialisation in the verify_service fn, and changed the way verify_service() for the param change. included the missing undefine of the guest. changes to 01_forward.py: ------------------------- 1) Rebased and Updated the tc to work with/without sblim-base-provider. 2) Updated the tc to use cim_define(). This is req bcs the association of ElementCapabilities with the CS would not be excercised for KVM. 3) Included the bug no 00007. Included XFAIL . 4) Updated the tc to use cim.undefine(). changes to 02_reverse.py: ------------------------- 1) Fixed the return statement, this was causing the tc to pass with a false positive. 2) Updated the tc to work with/without sblim-base-provider. 3) Updated the tc to use cim_define(). This is req bcs the association of ElementCapabilities with the EnabledLogicalElementCapabilities would not be excercised for KVM. 4) Updated the tc to use cim.undefine(). 5) Added verification of the VirtualSystemMigrationService service. 6) Updated enumclas to support VirtualSystemMigrationService and VirtualSystemManagementService. 7) Removed Enumerate instance and used getInstance instead to verify the VirtualSystemMigrationService and VirtualSystemManagementService values in the association. Tested with Xen, XenFV, KVM on current sources and with/without sblim-base-provider installed. Signed-off-by: Deepti B. Kalakeri diff -r 311bf6eda378 -r 459e07fb1d30 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Tue Oct 07 00:25:40 2008 -0700 @@ -23,17 +23,19 @@ import sys from VirtLib import utils from VirtLib import live +from XenKvmLib import vxml from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class -from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ - CIM_ERROR_ENUMERATE +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main -from CimTest.ReturnCodes import PASS, FAIL, SKIP +from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC from XenKvmLib.enumclass import enumerate from XenKvmLib.common_util import get_host_info sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +test_dom = "dom_elecap" +bug_sblim = "00007" def append_to_list(server, virt, poolname, valid_elc_id): keys_list = ['InstanceID'] @@ -67,7 +69,6 @@ logger.error("Failed to get host info") return status - try: an = get_typed_class(virt, "ElementCapabilities") elc = assoc.AssociatorNames(server, @@ -91,35 +92,52 @@ return status if len(elc) == 0: - logger.error("ElementCapabilities association failed, excepted at least one instance") - return FAIL + logger.error("'%s' association failed, expected at least one instance", + an) + if host_ccn == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + return FAIL for i in elc: if i.classname not in valid_elc_name: - logger.error("ElementCapabilities association classname error") + logger.error("'%s' association classname error", an) return FAIL if i['InstanceID'] not in valid_elc_id: - logger.error("ElementCapabilities association InstanceID error ") + logger.error("'%s' association InstanceID error ", an) return FAIL + + virtxml = vxml.get_class(virt) + cxml = virtxml(test_dom) + ret = cxml.cim_define(server) + if not ret: + logger.error("Failed to define the dom: %s", test_dom) + return FAIL cs = live.domain_list(server, virt) ccn = get_typed_class(virt, "ComputerSystem") for system in cs: try: - elec = assoc.AssociatorNames(server, - an, ccn, Name = system, + elec = assoc.AssociatorNames(server, an, ccn, Name = system, CreationClassName = ccn) except Exception: logger.error(CIM_ERROR_ASSOCIATORNAMES % system) + cxml.undefine(server) return FAIL + cn = get_typed_class(virt, "EnabledLogicalElementCapabilities") if elec[0].classname != cn: - logger.error("ElementCapabilities association classname error") - return FAIL - elif elec[0].keybindings['InstanceID'] != system: - logger.error("ElementCapabilities association InstanceID error") + cxml.undefine(server) + logger.error("'%s' association classname error", an) return FAIL + if elec[0].keybindings['InstanceID'] != system: + logger.error("ElementCapabilities association InstanceID error") + cxml.undefine(server) + logger.error("'%s' association InstanceID error", an) + return FAIL + + cxml.undefine(server) return PASS if __name__ == "__main__": diff -r 311bf6eda378 -r 459e07fb1d30 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Tue Oct 07 00:25:40 2008 -0700 @@ -26,26 +26,30 @@ from VirtLib import live from XenKvmLib import assoc 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 +from XenKvmLib import vxml +from XenKvmLib.classes import get_typed_class +from XenKvmLib.classes import get_class_basename +from XenKvmLib.common_util import get_host_info +from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, \ + CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.enumclass import getInstance sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +test_dom = "dom_elecap" def call_assoc(ip, cn, id, virt="Xen"): status = PASS ec_ele = [] + assoc_cn = get_typed_class(virt, "ElementCapabilities") try: ec_ele = assoc.AssociatorNames(ip, - "ElementCapabilities", + assoc_cn, cn, - virt, InstanceID = id) except Exception: - logger.error(CIM_ERROR_ASSOCIATORNAMES, - 'ElementCapabilities') + logger.error(CIM_ERROR_ASSOCIATORNAMES, assoc_cn) status = FAIL return status, ec_ele @@ -57,102 +61,127 @@ return FAIL, new_list return PASS, new_list -def verify_host(inst_list, ip, virt="Xen"): - hs = get_typed_class(virt, 'HostSystem') - status, list = filter(inst_list, hs, 1) +def verify_host(inst_list, host_name, host_ccn): + status, list = filter(inst_list, host_ccn, 1) if status != PASS: return status inst = list[0] - keys = ['Name', 'CreationClassName'] + creationclassname = inst.keybindings['CreationClassName'] + name = inst.keybindings['Name'] + + if creationclassname != host_ccn: + logger.error("CreationClassName doesn't match") + return FAIL + + if name != host_name: + logger.error("Name doesn't match") + return FAIL + + return PASS + +def verify_service(inst_list, ip, virt, host_name, host_ccn, + name, ser_cn): + status, list = filter(inst_list, ser_cn, 1) + if status != PASS: + return status + + inst = list[0] + keys = { + 'CreationClassName' : ser_cn, + 'Name' : name, + 'SystemName' : host_name, + 'SystemCreationClassName' : host_ccn + } try: - host_sys = enumclass.enumerate(ip, 'HostSystem', keys, virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE, 'HostSystem') + basename = get_class_basename(ser_cn) + service = getInstance(ip, basename, keys, virt) + except Exception, detail: + logger.error(CIM_ERROR_GETINSTANCE, ser_cn) + logger.error("Exeption : %s", detail) return FAIL creationclassname = inst.keybindings['CreationClassName'] name = inst.keybindings['Name'] - if creationclassname != host_sys.CreationClassName: + if creationclassname != service.CreationClassName: logger.error("CreationClassName doesn't match") return FAIL - elif name != host_sys.Name: - logger.error("Name doesn't match") - return FAIL - return PASS - -def verify_service(inst_list, ip, virt): - service = get_typed_class(virt, "VirtualSystemManagementService") - status, list = filter(inst_list, service, 1) - if status != PASS: - return status - - inst = list[0] - try: - service = vsms.enumerate_instances(ip, virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE, - 'VirtualSystemManagementService') - return FAIL - - creationclassname = inst.keybindings['CreationClassName'] - name = inst.keybindings['Name'] - - if creationclassname != service['CreationClassName']: - logger.error("CreationClassName doesn't match") - return FAIL - elif name != service['Name']: + if name != service.Name: logger.error("InstanceID doesn't match") return FAIL - return PASS @do_main(sup_types) def main(): options = main.options - + cap_list = {"VirtualSystemManagementCapabilities" : "ManagementCapabilities", - "VirtualSystemMigrationCapabilities" : "MigrationCapabilities"} - import pdb - #pdb.set_trace() + "VirtualSystemMigrationCapabilities" : "MigrationCapabilities"} + + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Failed to get host info") + return status + for k, v in cap_list.iteritems(): - status, ec_ele = call_assoc(options.ip, k, v, options.virt) + cn = get_typed_class(options.virt, k) + status, ec_ele = call_assoc(options.ip, cn, v, options.virt) if status != PASS: - return - - status = verify_host(ec_ele, options.ip, options.virt) + return FAIL + + status = verify_host(ec_ele, host_name, host_ccn) if status != PASS: return status - + if v == 'ManagementCapabilities': - status = verify_service(ec_ele, options.ip, options.virt) - if status != PASS: - return status + cn = get_typed_class(options.virt, "VirtualSystemManagementService") + status = verify_service(ec_ele, options.ip, options.virt, + host_name, host_ccn, + "Management Service", cn) + else: + cn = get_typed_class(options.virt, "VirtualSystemMigrationService") + status = verify_service(ec_ele, options.ip, options.virt, + host_name, host_ccn, + "MigrationService", cn) + if status != PASS: + return status + + virtxml = vxml.get_class(options.virt) + cxml = virtxml(test_dom) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s" % test_dom) + return FAIL cs = live.domain_list(options.ip, options.virt) for system in cs: - status, elec_cs = call_assoc(options.ip, - "EnabledLogicalElementCapabilities", - system, - options.virt) + cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities") + status, elec_cs = call_assoc(options.ip, cn, system, options.virt) if status != PASS: - return + cxml.undefine(options.ip) + return FAIL if len(elec_cs) < 1: logger.error("No ELEC instances returned") + cxml.undefine(options.ip) return FAIL - if elec_cs[0].keybindings['CreationClassName'] != get_typed_class(options.virt, "ComputerSystem"): - logger.error("Excpeted CreationClassName %s, got %s" % - ("ComputerSystem", - elec_cs[0].keybindings['CreationClassName'])) - return FAIL - elif elec_cs[0].keybindings['Name'] != system: - logger.error("ElementCapabilities association Name error") + if elec_cs[0].keybindings['CreationClassName'] != \ + get_typed_class(options.virt, "ComputerSystem"): + logger.error("Excpeted CreationClassName %s, got %s", + "ComputerSystem", + elec_cs[0].keybindings['CreationClassName']) + cxml.undefine(options.ip) return FAIL + if elec_cs[0].keybindings['Name'] != system: + logger.error("ElementCapabilities association Name error") + cxml.undefine(options.ip) + return FAIL + + cxml.undefine(options.ip) return PASS if __name__ == "__main__": diff -r 311bf6eda378 -r 459e07fb1d30 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Tue Oct 07 00:25:40 2008 -0700 @@ -336,6 +336,25 @@ class KVM_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData): pass +class KVM_VirtualSystemMigrationService(CIM_MyClass): + pass + +class Xen_VirtualSystemMigrationService(CIM_MyClass): + pass + +class LXC_VirtualSystemMigrationService(CIM_MyClass): + pass + +class Xen_VirtualSystemManagementService(CIM_MyClass): + pass + +class KVM_VirtualSystemManagementService(CIM_MyClass): + pass + +class LXC_VirtualSystemManagementService(CIM_MyClass): + pass + + # Generic function which can be used to get the enumerate instances of any # class when the following fields are specified # classname = any class for which we want obtain the instances From deeptik at linux.vnet.ibm.com Tue Oct 7 07:52:49 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Oct 2008 13:22:49 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed In-Reply-To: <617b6fb544d62f056f28.1223348129@elm3b217.beaverton.ibm.com> References: <617b6fb544d62f056f28.1223348129@elm3b217.beaverton.ibm.com> Message-ID: <48EB1551.7050407@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223348123 25200 > # Node ID 617b6fb544d62f056f281e75c15d2fcbebe3dac0 > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > [TEST] #5 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed > > Updats from 4 to 5: > > Using try_assoc() function to verify the exceptions for the associtations > > Signed-off-by: Guolian Yun > > diff -r 311bf6eda378 -r 617b6fb544d6 suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Sun Oct 05 23:56:40 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Mon Oct 06 19:55:23 2008 -0700 > @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info, try_assoc > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ > CIM_PASS, CIM_NS > @@ -32,8 +33,12 @@ from CimTest.ReturnCodes import PASS, FA > from CimTest.ReturnCodes import PASS, FAIL, XFAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > -exp_rc = 6 #CIM_ERR_NOT_FOUND > -exp_desc = "No such instance" > +exp_values = { > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (CreationClassName)"}, > Wrap it to 80 columns. > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (Name)"} > + } > > @do_main(sup_types) > def main(): > @@ -41,38 +46,31 @@ def main(): > rc = -1 > status = FAIL > keys = ['Name', 'CreationClassName'] > - try: > - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] > - except Exception: > - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > + status, host_name, host_ccn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > return FAIL > > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > (CIM_USER, CIM_PASS), > CIM_NS) > - instanceref = CIMInstanceName(get_typed_class(options.virt, "HostSystem"), > - keybindings = {"Wrong" : "wrong", "CreationClassName" : host_sys.CreationClassName}) > + assoc_classname = get_typed_class(options.virt, "HostedService") > + classname = get_typed_class(options.virt, "HostSystem") > Hard coding classanme to HostSystem will work only for non-sblim-base-provider case. what about the sblim-base-provider installed case ? get_typed_class(options.virt, "HostSystem") is not required, host_ccn above gives you the value you are looking for. > + > + keys = {"Wrong" : host_name, "CreationClassName": host_ccn} > + ret = try_assoc(conn, host_ccn, assoc_classname, keys, "Name", exp_values['invalid_name'], bug_no="00007") > wrap it to 80 coulmns. > + if ret != PASS and host_ccn == classname: > + logger.error("------ FAILED: Invalid Name Key Name.------") > + status = ret > > - names = [] > + keys = {"Name" : host_name, "Wrong" : host_ccn} > + ret = try_assoc(conn, host_ccn, assoc_classname, keys, "CreationClassName", exp_values['invalid_ccname'], bug_no="00007") > wrap it to 80 coulmns. > + if ret != PASS and host_ccn == classname: > + logger.error("------ FAILED: Invalid CreationClassName Key Name.------") > + status = ret > > This tc is returning false positive. Though ret is returning FAIL the check host_ccn == classname returns false and hence the status is not getting assigned appropriate value and the tc passes because of the previously assigned status value. We dont need to verify host_ccn == classname condition just verifying ret!=PASS is fine, any specific reason for doing it which I am missing ? Also, here you need to return XFAIL for sblim-base-provider installed machine. You can return directly from the ret!=PASS check. > - try: > - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) > - rc = 0 > - except pywbem.CIMError, (rc, desc): > - if rc == exp_rc and desc.find(exp_desc) >= 0: > - logger.info("Got excepted rc code and error string") > - status = PASS > - else: > - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) > - except Exception, details: > - logger.error("Unknown exception happened") > - logger.error(details) > > - if rc == 0: > - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of HostSystem input") > - status = FAIL > - > return status > > if __name__ == "__main__": > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Oct 7 08:50:55 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Oct 2008 14:20:55 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed In-Reply-To: <4650104669be81d74b92.1223349202@elm3b217.beaverton.ibm.com> References: <4650104669be81d74b92.1223349202@elm3b217.beaverton.ibm.com> Message-ID: <48EB22EF.3010700@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223349190 25200 > # Node ID 4650104669be81d74b92db23176fbc3ea36a8829 > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > [TEST] #5 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed > > Updats from 4 to 5: > > Using try_assoc() function to verify the exceptions for the associtations > > Signed-off-by: Guolian Yun > > diff -r 311bf6eda378 -r 4650104669be suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py > --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Sun Oct 05 23:56:40 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Mon Oct 06 20:13:10 2008 -0700 > @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info, try_assoc > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ > CIM_PASS, CIM_NS > @@ -32,8 +33,12 @@ from CimTest.ReturnCodes import PASS, FA > from CimTest.ReturnCodes import PASS, FAIL, XFAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > -exp_rc = 6 #CIM_ERR_NOT_FOUND > -exp_desc = "No such instance" > +exp_values = { > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (CreationClassName)"}, > Wrap it to 80 columns. > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (Name)"} > + } > > @do_main(sup_types) > def main(): > @@ -41,45 +46,38 @@ def main(): > rc = -1 > status = FAIL > keys = ['Name', 'CreationClassName'] > - try: > - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] > - except Exception: > - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > + status, host_name, host_ccn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > return FAIL > > - > - servicelist = {get_typed_class(options.virt, "ResourcePoolConfigurationService") : "RPCS", > - get_typed_class(options.virt, "VirtualSystemManagementService") : "Management Service", > - get_typed_class(options.virt, "VirtualSystemMigrationService") : "MigrationService"} > + rpcs = get_typed_class(options.virt, "ResourcePoolConfigurationService") > + vsms = get_typed_class(options.virt, "VirtualSystemManagementService") > + vsmigrations = get_typed_class(options.virt, "VirtualSystemMigrationService") > + > + servicelist = {rpcs : "RPCS", > + vsms : "Management Service", > + vsmigrations : "MigrationService"} > > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > (CIM_USER, CIM_PASS), > CIM_NS) > + assoc_classname = get_typed_class(options.virt, "HostedService") > for k, v in servicelist.items(): > - instanceref = CIMInstanceName(k, > - keybindings = {"Wrong" : v, > - "CreationClassName" : "wrong", > - "SystemCreationClassName" : host_sys.CreationClassName, > - "SystemName" : host_sys.Name}) > - names = [] > > - try: > - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) > - rc = 0 > - except pywbem.CIMError, (rc, desc): > - if rc == exp_rc and desc.find(exp_desc) >= 0: > - logger.info("Got excepted rc code and error string") > - status = PASS > - else: > - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) > - except Exception, details: > - logger.error("Unknown exception happened") > - logger.error(details) > + keys = {"Wrong" : v, "CreationClassName": k, \ > you can remove the slash here. > + "SystemCreationClassName": host_ccn, "SystemName" : host_name} > + ret = try_assoc(conn, k, assoc_classname, keys, "Name", exp_values['invalid_name'], bug_no="") > Wrap to 80 columns > + if ret != PASS: > + logger.error("------ FAILED: Invalid Name Key Name.------") > + status = ret > return FAIL directly dont have to assign ret to status. > - if rc == 0: > - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of %s input" % k) > - status = FAIL > + keys = {"Name" : v, "Wrong": k, "SystemCreationClassName": host_ccn, "SystemName" : host_name} > + ret = try_assoc(conn, k, assoc_classname, keys, "Name", exp_values['invalid_ccname'], bug_no="") > Wrap to 80 columns > + if ret != PASS: > + logger.error("------ FAILED: Invalid Name Key Name.------") > + status = ret > return FAIL directly dont have to assign ret to status. > > return status > This return statement should be outside the for loop otherwise the vsms, vsmigrations wont get excetued. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From yunguol at cn.ibm.com Tue Oct 7 09:42:10 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 07 Oct 2008 02:42:10 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #6 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed Message-ID: <7111776695d084f03187.1223372530@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223372522 25200 # Node ID 7111776695d084f031873ca00c4e9a966ec41b7d # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 [TEST] #6 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed Signed-off-by: Guolian Yun diff -r 311bf6eda378 -r 7111776695d0 suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Tue Oct 07 02:42:02 2008 -0700 @@ -25,15 +25,21 @@ from pywbem.cim_obj import CIMInstanceNa from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info, try_assoc from XenKvmLib.classes import get_typed_class 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 +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +bug = '00007' sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] -exp_rc = 6 #CIM_ERR_NOT_FOUND -exp_desc = "No such instance" +exp_values = { + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (CreationClassName)"}, + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (Name)"} + } @do_main(sup_types) def main(): @@ -41,38 +47,38 @@ def main(): rc = -1 status = FAIL keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) - instanceref = CIMInstanceName(get_typed_class(options.virt, "HostSystem"), - keybindings = {"Wrong" : "wrong", "CreationClassName" : host_sys.CreationClassName}) + assoc_classname = get_typed_class(options.virt, "HostedService") + + keys = {"Wrong" : host_name, "CreationClassName": host_ccn} + ret = try_assoc(conn, host_ccn, assoc_classname, keys, "Name", \ + exp_values['invalid_name'], bug_no="") + if ret != PASS: + if host_ccn == 'Linux_ComputerSystem': + return XFAIL_RC(bug) + else: + logger.error("------ FAILED: Invalid Name Key Name.------") + return FAIL - names = [] + keys = {"Name" : host_name, "Wrong" : host_ccn} + ret = try_assoc(conn, host_ccn, assoc_classname, keys, "CreationClassName", \ + exp_values['invalid_ccname'], bug_no="") + if ret != PASS: + if host_ccn == 'Linux_ComputerSystem': + return XFAIL_RC(bug) + else: + logger.error("------ FAILED: Invalid CreationClassName Key Name.------") + return FAIL - try: - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) - rc = 0 - except pywbem.CIMError, (rc, desc): - if rc == exp_rc and desc.find(exp_desc) >= 0: - logger.info("Got excepted rc code and error string") - status = PASS - else: - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) - except Exception, details: - logger.error("Unknown exception happened") - logger.error(details) - if rc == 0: - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of HostSystem input") - status = FAIL - return status if __name__ == "__main__": From yunguol at cn.ibm.com Tue Oct 7 09:54:09 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 07 Oct 2008 02:54:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#6 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed Message-ID: # HG changeset patch # User Guolian Yun # Date 1223373237 25200 # Node ID bc0dc02df8c3f5ac46d251c2b6534feb8a927011 # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 [TEST]#6 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed Signed-off-by: Guolian Yun diff -r 311bf6eda378 -r bc0dc02df8c3 suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Sun Oct 05 23:56:40 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Tue Oct 07 02:53:57 2008 -0700 @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info, try_assoc from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ CIM_PASS, CIM_NS @@ -32,8 +33,12 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL, XFAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] -exp_rc = 6 #CIM_ERR_NOT_FOUND -exp_desc = "No such instance" +exp_values = { + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (CreationClassName)"}, + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (Name)"} + } @do_main(sup_types) def main(): @@ -41,45 +46,41 @@ def main(): rc = -1 status = FAIL keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL - - servicelist = {get_typed_class(options.virt, "ResourcePoolConfigurationService") : "RPCS", - get_typed_class(options.virt, "VirtualSystemManagementService") : "Management Service", - get_typed_class(options.virt, "VirtualSystemMigrationService") : "MigrationService"} + rpcs = get_typed_class(options.virt, "ResourcePoolConfigurationService") + vsms = get_typed_class(options.virt, "VirtualSystemManagementService") + vsmigrations = get_typed_class(options.virt, "VirtualSystemMigrationService") + + servicelist = {rpcs : "RPCS", + vsms : "Management Service", + vsmigrations : "MigrationService"} conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) + assoc_classname = get_typed_class(options.virt, "HostedService") for k, v in servicelist.items(): - instanceref = CIMInstanceName(k, - keybindings = {"Wrong" : v, - "CreationClassName" : "wrong", - "SystemCreationClassName" : host_sys.CreationClassName, - "SystemName" : host_sys.Name}) - names = [] - try: - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) - rc = 0 - except pywbem.CIMError, (rc, desc): - if rc == exp_rc and desc.find(exp_desc) >= 0: - logger.info("Got excepted rc code and error string") - status = PASS - else: - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) - except Exception, details: - logger.error("Unknown exception happened") - logger.error(details) + keys = {"Wrong" : v, "CreationClassName": k,\ + "SystemCreationClassName": host_ccn, "SystemName" : host_name} + ret = try_assoc(conn, k, assoc_classname, keys, "Name",\ + exp_values['invalid_name'], bug_no="") + if ret != PASS: + logger.error("------ FAILED: Invalid Name Key Name.------") + return FAIL - if rc == 0: - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of %s input" % k) - status = FAIL + keys = {"Name" : v, "Wrong": k, "SystemCreationClassName":\ + host_ccn, "SystemName" : host_name} + ret = try_assoc(conn, k, assoc_classname, keys, "Name",\ + exp_values['invalid_ccname'], bug_no="") + if ret != PASS: + logger.error("------ FAILED: Invalid Name Key Name.------") + return FAIL return status From yunguol at cn.ibm.com Tue Oct 7 09:41:36 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 7 Oct 2008 17:41:36 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed In-Reply-To: <48EB1551.7050407@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-07 15:52:49: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1223348123 25200 > > # Node ID 617b6fb544d62f056f281e75c15d2fcbebe3dac0 > > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > > [TEST] #5 Fix HostedService - 03_forward_errs.py to work with > sblim base provider installed > > > > Updats from 4 to 5: > > > > Using try_assoc() function to verify the exceptions for the associtations > > > > Signed-off-by: Guolian Yun > > > > diff -r 311bf6eda378 -r 617b6fb544d6 suites/libvirt- > cim/cimtest/HostedService/03_forward_errs.py > > --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py > Sun Oct 05 23:56:40 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py > Mon Oct 06 19:55:23 2008 -0700 > > @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa > > from pywbem.cim_obj import CIMInstanceName > > from XenKvmLib import assoc > > from XenKvmLib import enumclass > > +from XenKvmLib.common_util import get_host_info, try_assoc > > from XenKvmLib.classes import get_typed_class > > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ > > CIM_PASS, CIM_NS > > @@ -32,8 +33,12 @@ from CimTest.ReturnCodes import PASS, FA > > from CimTest.ReturnCodes import PASS, FAIL, XFAIL > > > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > -exp_rc = 6 #CIM_ERR_NOT_FOUND > > -exp_desc = "No such instance" > > +exp_values = { > > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > + "desc" : "No such instance > (CreationClassName)"}, > > > Wrap it to 80 columns. > > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > + "desc" : "No such instance (Name)"} > > + } > > > > @do_main(sup_types) > > def main(): > > @@ -41,38 +46,31 @@ def main(): > > rc = -1 > > status = FAIL > > keys = ['Name', 'CreationClassName'] > > - try: > > - host_sys = enumclass.enumerate(options.ip, 'HostSystem', > keys, options.virt)[0] > > - except Exception: > > - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > > + status, host_name, host_ccn = get_host_info(options.ip, options.virt) > > + if status != PASS: > > + logger.error("Error in calling get_host_info function") > > return FAIL > > > > > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > > (CIM_USER, CIM_PASS), > > CIM_NS) > > - instanceref = CIMInstanceName(get_typed_class(options.virt, > "HostSystem"), > > - keybindings = {"Wrong" : > "wrong", "CreationClassName" : host_sys.CreationClassName}) > > + assoc_classname = get_typed_class(options.virt, "HostedService") > > + classname = get_typed_class(options.virt, "HostSystem") > > > Hard coding classanme to HostSystem will work only for non-sblim- > base-provider case. what about the sblim-base-provider installed case ? > get_typed_class(options.virt, "HostSystem") is not required, > host_ccn above gives you the value you are looking for. > > > + > > + keys = {"Wrong" : host_name, "CreationClassName": host_ccn} > > + ret = try_assoc(conn, host_ccn, assoc_classname, keys, > "Name", exp_values['invalid_name'], bug_no="00007") > > > wrap it to 80 coulmns. > > + if ret != PASS and host_ccn == classname: > > + logger.error("------ FAILED: Invalid Name Key Name.------") > > + status = ret > > > > - names = [] > > + keys = {"Name" : host_name, "Wrong" : host_ccn} > > + ret = try_assoc(conn, host_ccn, assoc_classname, keys, > "CreationClassName", exp_values['invalid_ccname'], bug_no="00007") > > > wrap it to 80 coulmns. > > + if ret != PASS and host_ccn == classname: > > + logger.error("------ FAILED: Invalid CreationClassName > Key Name.------") > > + status = ret > > > > > This tc is returning false positive. Though ret is returning FAIL the > check host_ccn == classname returns false and hence the status is not > getting assigned appropriate value and the tc passes because of the > previously assigned status value. > We dont need to verify host_ccn == classname condition just verifying > ret!=PASS is fine, any specific reason for doing it which I am missing ? I update the tc, if ret!=PASS and host_ccn = "Linux_ComputerSystem", it return XFAIL, otherwise it has to return FAIL without sblim-base provider installed. Thanks! > Also, here you need to return XFAIL for sblim-base-provider installed > machine. > You can return directly from the ret!=PASS check. > > - try: > > - names = conn.AssociatorNames(instanceref, AssocClass = > get_typed_class(options.virt, "HostedService")) > > - rc = 0 > > - except pywbem.CIMError, (rc, desc): > > - if rc == exp_rc and desc.find(exp_desc) >= 0: > > - logger.info("Got excepted rc code and error string") > > - status = PASS > > - else: > > - logger.error("Unexpected rc code %s and description % > s\n" %(rc, desc)) > > - except Exception, details: > > - logger.error("Unknown exception happened") > > - logger.error(details) > > > > - if rc == 0: > > - logger.error("HostedService associator should NOT return > excepted result with a wrong key name and value of HostSystem input") > > - status = FAIL > > - > > return status > > > > if __name__ == "__main__": > > > > _______________________________________________ > > 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 Tue Oct 7 11:49:24 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Oct 2008 17:19:24 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/01_forward.py to work with sblim base provider installed In-Reply-To: References: Message-ID: <48EB4CC4.4040105@linux.vnet.ibm.com> +1 for the changes in this patch. Daisy, I have some more comments on the tc which is not part of the changes you have made. At the end of the tc we have a for loop to verify the resourcepool details. With the existing changes we might get a false positive because before entering the loop the status is already assigned to PASS by get_host_info() call if it succeeds. After entering the for loop even when none of the if conditions match we will still have the status set to PASS and there are possibilities of the tc returning false positives because of the status already being set to PASS. Can you change the below in the tc : for items in pool: cname = items.classname if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": 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" % default_pool_name: status = PASS To status = FAIL for items in pool: cname = items.classname if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": 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" % default_pool_name: status = PASS if status != PASS: logger.error("HostedResourcePool information error") return status If you have anyother better ideas, you are welcome to do the changes accordingly. Thanks and Regards, Deepti. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223359324 25200 > # Node ID d81c2122fff796c7a08eb45cfe679f2e690e27bf > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > [TEST] Fix HostedResourcePool/01_forward.py to work with sblim base provider installed > > Signed-off-by: Guolian Yun > > diff -r 311bf6eda378 -r d81c2122fff7 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Sun Oct 05 23:56:40 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Mon Oct 06 23:02:04 2008 -0700 > @@ -26,13 +26,15 @@ import sys > import sys > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info > from XenKvmLib.const import default_network_name > from CimTest import Globals > from CimTest.Globals import logger > -from CimTest.ReturnCodes import PASS, FAIL > +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.const import do_main, default_pool_name > from XenKvmLib.classes import get_typed_class > > +bug = '00007' > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > @do_main(sup_types) > def main(): > @@ -40,19 +42,17 @@ def main(): > status = FAIL > > keys = ['Name', 'CreationClassName'] > - try: > - 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) > + status, host_sys, host_cn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > return FAIL > try: > assoc_cn = get_typed_class(options.virt, "HostedResourcePool") > pool = assoc.AssociatorNames(options.ip, > assoc_cn, > - host_sys.CreationClassName, > - Name = host_sys.Name, > - CreationClassName = host_sys.CreationClassName) > + host_cn, > + Name = host_sys, > + CreationClassName = host_cn) > except Exception, details: > logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn) > logger.error("Exception:", details) > @@ -62,8 +62,11 @@ def main(): > logger.error("System association failed") > return FAIL > elif len(pool) == 0: > - logger.error("No pool returned") > - return FAIL > + if host_cn == 'Linux_ComputerSystem': > + return XFAIL_RC(bug) > + else: > + logger.error("No pool returned") > + return FAIL > > for items in pool: > cname = items.classname > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Oct 7 11:56:23 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Oct 2008 17:26:23 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed In-Reply-To: <0b599308e31a1865ab47.1223359799@elm3b217.beaverton.ibm.com> References: <0b599308e31a1865ab47.1223359799@elm3b217.beaverton.ibm.com> Message-ID: <48EB4E67.4090801@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223359792 25200 > # Node ID 0b599308e31a1865ab47b1c2d44d0887c409e139 > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > [TEST] Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed > > Signed-off-by: Guolian Yun > > diff -r 311bf6eda378 -r 0b599308e31a suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Sun Oct 05 23:56:40 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Mon Oct 06 23:09:52 2008 -0700 > @@ -25,6 +25,7 @@ import sys > import sys > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info > from XenKvmLib.const import default_network_name > from CimTest import Globals > from CimTest.Globals import logger > @@ -39,12 +40,11 @@ def main(): > status = PASS > > keys = ['Name', 'CreationClassName'] > - try: > - 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) > - return FAIL > + status, host_sys, host_cn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > + 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") > @@ -64,10 +64,10 @@ def main(): > logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % v) > This should be logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn) > return FAIL > if len(assoc_host) == 1: > - if assoc_host[0].keybindings['Name'] != host_sys.Name: > + if assoc_host[0].keybindings['Name'] != host_sys: > logger.error("Pool association returned wrong hostsystem") > status = FAIL > - if assoc_host[0].keybindings['CreationClassName'] != host_sys.CreationClassName: > + if assoc_host[0].keybindings['CreationClassName'] != host_cn: > logger.error("Pool association returned wrong CreationClassName") > status = FAIL > if status != 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 Tue Oct 7 12:02:13 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Oct 2008 17:32:13 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed In-Reply-To: <628b846c366a0c97fa97.1223361288@elm3b217.beaverton.ibm.com> References: <628b846c366a0c97fa97.1223361288@elm3b217.beaverton.ibm.com> Message-ID: <48EB4FC5.7080307@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223361281 25200 > # Node ID 628b846c366a0c97fa97c18a5a7e2185c265188f > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > [TEST] Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed > > Signed-off-by: Guolian Yun > > diff -r 311bf6eda378 -r 628b846c366a suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Sun Oct 05 23:56:40 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Mon Oct 06 23:34:41 2008 -0700 > @@ -25,16 +25,21 @@ import pywbem > import pywbem > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info > from XenKvmLib.common_util import try_assoc > from CimTest import Globals > from CimTest.Globals import logger > -from CimTest.ReturnCodes import PASS, FAIL > +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.const import do_main > from XenKvmLib.classes import get_typed_class > > -expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \ > - "desc" : "No such instance" > - } > +bug = "00007" > +expr_values = { > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (CreationClassName)"}, > Wrap it to 80 columns > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (Name)"} > + } > > sup_types=['Xen', 'KVM', 'XenFV', 'LXC'] > @do_main(sup_types) > @@ -42,30 +47,36 @@ def main(): > options = main.options > status = PASS > You can remove the status = PASS statement since the first access to status by get_host_sys() function will assign value to it. > keys = ['Name', 'CreationClassName'] > - try: > - 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) > + status, host_sys, host_cn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > return FAIL > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > (Globals.CIM_USER, Globals.CIM_PASS), > Globals.CIM_NS) > - classname = host_sys.CreationClassName > + classname = host_cn > assoc_classname = get_typed_class(options.virt, "HostedResourcePool") > > - keys = {"Name" : "wrong", "CreationClassName" : host_sys.CreationClassName} > - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") > + keys = {"Name" : host_sys, "CreationClassName" : "wrong"} > + ret = try_assoc(conn, classname, assoc_classname, keys, \ > + "Name", expr_values['invalid_ccname'], bug_no="") > if ret != PASS: > - logger.error("------ FAILED: Invalid Name Key Name.------") > - status = ret > + if host_cn == 'Linux_ComputerSystem': > + return XFAIL_RC(bug) > + else: > + logger.error("------ FAILED: Invalid CreationClassName Key Value.------") > + status = ret > No need to assign the ret to status, you can directly call return FAIL. > - keys = {"Wrong" : host_sys.Name, "CreationClassName" : host_sys.CreationClassName} > - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") > + keys = {"Name" : "wrong", "CreationClassName" : host_cn} > + ret = try_assoc(conn, classname, assoc_classname, keys, \ > + "CreationClassName", expr_values['invalid_name'], bug_no="") > if ret != PASS: > - logger.error("------ FAILED: Invalid Name Key Value.------") > - status = ret > + if host_cn == 'Linux_ComputerSystem': > + return XFAIL_RC(bug) > + else: > + logger.error("------ FAILED: Invalid Name Key Value.------") > + status = ret > > No need to assign the ret to status, you can directly call return FAIL. > return status > Can call return PASS here. > if __name__ == "__main__": > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Oct 7 12:15:04 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Oct 2008 17:45:04 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #6 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed In-Reply-To: <7111776695d084f03187.1223372530@elm3b217.beaverton.ibm.com> References: <7111776695d084f03187.1223372530@elm3b217.beaverton.ibm.com> Message-ID: <48EB52C8.9090301@linux.vnet.ibm.com> +1 for me. but I have some comments though. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223372522 25200 > # Node ID 7111776695d084f031873ca00c4e9a966ec41b7d > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > [TEST] #6 Fix HostedService - 03_forward_errs.py to work with sblim base provider installed > > Signed-off-by: Guolian Yun > > diff -r 311bf6eda378 -r 7111776695d0 suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Sun Oct 05 23:56:40 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/03_forward_errs.py Tue Oct 07 02:42:02 2008 -0700 > @@ -25,15 +25,21 @@ from pywbem.cim_obj import CIMInstanceNa > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info, try_assoc > from XenKvmLib.classes import get_typed_class > 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 > +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > > +bug = '00007' > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > -exp_rc = 6 #CIM_ERR_NOT_FOUND > -exp_desc = "No such instance" > +exp_values = { > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (CreationClassName)"}, > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (Name)"} > + } > You dont have to use a slash after the comma, we need to use slash only in case where we want to continue some sentence or string into the next line. This is fine for now and is Just FYI. > @do_main(sup_types) > def main(): > @@ -41,38 +47,38 @@ def main(): > rc = -1 > status = FAIL > keys = ['Name', 'CreationClassName'] > - try: > - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] > - except Exception: > - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > + status, host_name, host_ccn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > return FAIL > > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > (CIM_USER, CIM_PASS), > CIM_NS) > - instanceref = CIMInstanceName(get_typed_class(options.virt, "HostSystem"), > - keybindings = {"Wrong" : "wrong", "CreationClassName" : host_sys.CreationClassName}) > + assoc_classname = get_typed_class(options.virt, "HostedService") > + > + keys = {"Wrong" : host_name, "CreationClassName": host_ccn} > + ret = try_assoc(conn, host_ccn, assoc_classname, keys, "Name", \ > + exp_values['invalid_name'], bug_no="") > You dont have to use a slash after the comma, we need to use slash only in case where we want to continue some sentence or string into the next line. This is fine for now and is Just FYI. > + if ret != PASS: > + if host_ccn == 'Linux_ComputerSystem': > + return XFAIL_RC(bug) > + else: > + logger.error("------ FAILED: Invalid Name Key Name.------") > + return FAIL > > - names = [] > + keys = {"Name" : host_name, "Wrong" : host_ccn} > + ret = try_assoc(conn, host_ccn, assoc_classname, keys, "CreationClassName", \ > + exp_values['invalid_ccname'], bug_no="") > You dont have to use a slash after the comma, we need to use slash only in case where we want to continue some sentence or string into the next line. This is fine for now and is Just FYI. > + if ret != PASS: > + if host_ccn == 'Linux_ComputerSystem': > + return XFAIL_RC(bug) > + else: > + logger.error("------ FAILED: Invalid CreationClassName Key Name.------") > + return FAIL > > - try: > - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) > - rc = 0 > - except pywbem.CIMError, (rc, desc): > - if rc == exp_rc and desc.find(exp_desc) >= 0: > - logger.info("Got excepted rc code and error string") > - status = PASS > - else: > - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) > - except Exception, details: > - logger.error("Unknown exception happened") > - logger.error(details) > > - if rc == 0: > - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of HostSystem input") > - status = FAIL > - > return status You can return PASS directly, but this is fine for now. > > > if __name__ == "__main__": > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Oct 7 12:26:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 07 Oct 2008 17:56:09 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#6 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed In-Reply-To: References: Message-ID: <48EB5561.9000807@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223373237 25200 > # Node ID bc0dc02df8c3f5ac46d251c2b6534feb8a927011 > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > [TEST]#6 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed > > Signed-off-by: Guolian Yun > > diff -r 311bf6eda378 -r bc0dc02df8c3 suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py > --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Sun Oct 05 23:56:40 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Tue Oct 07 02:53:57 2008 -0700 > @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa > from pywbem.cim_obj import CIMInstanceName > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info, try_assoc > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ > CIM_PASS, CIM_NS > @@ -32,8 +33,12 @@ from CimTest.ReturnCodes import PASS, FA > from CimTest.ReturnCodes import PASS, FAIL, XFAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > -exp_rc = 6 #CIM_ERR_NOT_FOUND > -exp_desc = "No such instance" > +exp_values = { > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (CreationClassName)"}, > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (Name)"} > + } > > @do_main(sup_types) > def main(): > @@ -41,45 +46,41 @@ def main(): > rc = -1 > status = FAIL > keys = ['Name', 'CreationClassName'] > - try: > - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] > - except Exception: > - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) > + status, host_name, host_ccn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > return FAIL > > - > - servicelist = {get_typed_class(options.virt, "ResourcePoolConfigurationService") : "RPCS", > - get_typed_class(options.virt, "VirtualSystemManagementService") : "Management Service", > - get_typed_class(options.virt, "VirtualSystemMigrationService") : "MigrationService"} > + rpcs = get_typed_class(options.virt, "ResourcePoolConfigurationService") > + vsms = get_typed_class(options.virt, "VirtualSystemManagementService") > + vsmigrations = get_typed_class(options.virt, "VirtualSystemMigrationService") > + > + servicelist = {rpcs : "RPCS", > + vsms : "Management Service", > + vsmigrations : "MigrationService"} > > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > (CIM_USER, CIM_PASS), > CIM_NS) > + assoc_classname = get_typed_class(options.virt, "HostedService") > for k, v in servicelist.items(): > - instanceref = CIMInstanceName(k, > - keybindings = {"Wrong" : v, > - "CreationClassName" : "wrong", > - "SystemCreationClassName" : host_sys.CreationClassName, > - "SystemName" : host_sys.Name}) > - names = [] > > - try: > - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) > - rc = 0 > - except pywbem.CIMError, (rc, desc): > - if rc == exp_rc and desc.find(exp_desc) >= 0: > - logger.info("Got excepted rc code and error string") > - status = PASS > - else: > - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) > - except Exception, details: > - logger.error("Unknown exception happened") > - logger.error(details) > + keys = {"Wrong" : v, "CreationClassName": k,\ > + "SystemCreationClassName": host_ccn, "SystemName" : host_name} > + ret = try_assoc(conn, k, assoc_classname, keys, "Name",\ > + exp_values['invalid_name'], bug_no="") > + if ret != PASS: > + logger.error("------ FAILED: Invalid Name Key Name.------") > + return FAIL > > - if rc == 0: > - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of %s input" % k) > - status = FAIL > + keys = {"Name" : v, "Wrong": k, "SystemCreationClassName":\ > + host_ccn, "SystemName" : host_name} > + ret = try_assoc(conn, k, assoc_classname, keys, "Name",\ > + exp_values['invalid_ccname'], bug_no="") > + if ret != PASS: > + logger.error("------ FAILED: Invalid Name Key Name.------") > + return FAIL > > return status > Daisy, I think you missed noticing my comment on the return status part in the previous 2 patches of yours. Never mind, Can you please change the last return status value and put it outside the for loop, otherwise the verification of the remaining information in the servicelist vsms : "Management Service" and vsmigrations : "MigrationService" will not get executed and the loop will exit immediately after verifying for the RPCS. Also, You can minimize the use of slash whenever not required. Thanks and Regards, Deepti. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From kaitlin at linux.vnet.ibm.com Tue Oct 7 17:24:54 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 07 Oct 2008 10:24:54 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/01_forward.py to work with sblim base provider installed In-Reply-To: <48EB4CC4.4040105@linux.vnet.ibm.com> References: <48EB4CC4.4040105@linux.vnet.ibm.com> Message-ID: <48EB9B66.8000401@linux.vnet.ibm.com> > status = FAIL > for items in pool: > cname = items.classname > if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": > 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" % default_pool_name: > status = PASS > if status != PASS: > logger.error("HostedResourcePool information error") > return status > If you hit an error condition, the test should return - no point in checking the other conditions when we already know we've failed. Plus, the error log message is really vague. Instead, you could do something like: try: for items in pool: cname = items.classname if cname.find("MemoryPool") >=0 and items['InstanceID'] != "MemoryPool/0": raise Exception("%s does not match MemoryPool/0", items['InstanceID']) elif cname.find("ProcessorPool") >=0 and items['InstanceID'] != "ProcessorPool/0": raise Exception("%s does not match ProcessorPool/0", items['InstanceID']) elif cname.find("NetworkPool") >= 0 and \ items['InstanceID'] != "NetworkPool/%s" %default_network_name: raise Exception("%s does not match NetworkPool/%s", items['InstanceID'], default_network_name) elif cname.find("DiskPool") >= 0 and \ items['InstanceID'] != "DiskPool/%s" % default_pool_name: raise Exception("%s does not match DiskPool/%s", items['InstanceID'], default_pool_name) except Exception, details: logger.error(details) return FAIL return PASS -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 7 19:27:11 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 07 Oct 2008 12:27:11 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#6 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed In-Reply-To: <48EB5561.9000807@linux.vnet.ibm.com> References: <48EB5561.9000807@linux.vnet.ibm.com> Message-ID: <48EBB80F.5070704@linux.vnet.ibm.com> >> >> sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] >> -exp_rc = 6 #CIM_ERR_NOT_FOUND >> -exp_desc = "No such instance" >> +exp_values = { >> + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ >> + "desc" : "No such instance (CreationClassName)"}, >> + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ >> + "desc" : "No such instance (Name)"} >> + } Can you align all of the colons so that the list reads like: exp_values = { "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, "desc" : "No such instance (CreationClassName)"}, "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, "desc" : "No such instance (Name)"} } Also, no need for the slashes. >> >> @do_main(sup_types) >> def main(): >> @@ -41,45 +46,41 @@ def main(): >> rc = -1 This value is no longer used - can you remove it? >> + rpcs = get_typed_class(options.virt, >> "ResourcePoolConfigurationService") >> + vsms = get_typed_class(options.virt, >> "VirtualSystemManagementService") >> + vsmigrations = get_typed_class(options.virt, >> "VirtualSystemMigrationService") This line is longer than 80 characters - can you shorten the variable name some? >> + if ret != PASS: >> + logger.error("------ FAILED: Invalid Name Key Name.------") >> + return FAIL >> return status > Daisy, I think you missed noticing my comment on the return status part > in the previous 2 patches of yours. > Never mind, Can you please change the last return status value and put > it outside the for loop, otherwise the verification of the remaining > information in the servicelist > vsms : "Management Service" and vsmigrations : "MigrationService" will > not get executed and the loop will exit immediately after verifying for > the RPCS. > Also, You can minimize the use of slash whenever not required. Agreed - can you move return status so that it is not part of the for loop? It should be indented in so far. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Oct 8 09:51:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 08 Oct 2008 02:51:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing and updating 03_hs_to_settdefcap.py of HS Message-ID: <814a0e67bb1023607349.1223459469@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1223459421 25200 # Node ID 814a0e67bb1023607349ecc9b95a4636aabcc24d # Parent 98c505b354576e9150943b9f7f1bfd4a70347dab [TEST] Fixing and updating 03_hs_to_settdefcap.py of HS. 1) Fixed the tc which was failing for Xen and XenFV bcs of the changes as part of "Add condensed template functions, update sdc_rasds_for_type() & sdc_rasd_inst()" 2) Updated the tc to use cim_define. 3) updated the bug no for sblim-base-provider 4) Removed the rangelist param since it was not being used, we can verify the RASD specific things which are available when queried with SDC in the SDC/01_forward.py tc. Signed-off-by: Deepti B. Kalakeri diff -r 98c505b35457 -r 814a0e67bb10 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Oct 07 02:42:02 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Wed Oct 08 02:50:21 2008 -0700 @@ -47,13 +47,14 @@ from XenKvmLib.classes import get_typed_ from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.test_xml import testxml from XenKvmLib.test_doms import destroy_and_undefine_all sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] -test_dom = "domgst" +test_dom = "domgst_test" test_vcpus = 1 +bug_sblim='00007' def setup_env(server, virt="Xen"): status = PASS @@ -63,7 +64,7 @@ def setup_env(server, virt="Xen"): else: vsxml = get_class(virt)(test_dom, vcpus=test_vcpus) - ret = vsxml.define(server) + ret = vsxml.cim_define(server) if not ret: logger.error("Failed to define the dom: %s", test_dom) status = FAIL @@ -95,7 +96,6 @@ def get_inst_from_list(cn, qcn, list, fi return status, inst def get_hostsys(server, virt="Xen"): - cn = '%s_HostSystem' % virt status = PASS host = live.hostname(server) @@ -103,7 +103,7 @@ def get_hostsys(server, virt="Xen"): status, hostname, clsname = get_host_info(server, virt) if hostname != host: status = FAIL - logger.error("Hostname mismatch %s : %s" % (cn, host)) + logger.error("Hostname mismatch") except Exception, detail: logger.error("Exception in %s : %s" % (cn, detail)) @@ -112,8 +112,7 @@ def get_hostsys(server, virt="Xen"): return status, hostname, clsname def get_hostrespool(server, hostsys, clsname, virt="Xen"): - ccn1 = '%s_HostSystem' % virt - an1 = '%s_HostedResourcePool' % virt + an1 = get_typed_class(virt, "HostedResourcePool") status = PASS devpool = [] @@ -127,14 +126,16 @@ def get_hostrespool(server, hostsys, cls try: assoc_info = Associators(server, an1, - ccn1, + clsname, CreationClassName = clsname, Name = hostsys) if len(assoc_info) < 4: - logger.error("HostedResourcePool has returned %i instances, expected 4 \ -instances", len(assoc_info)) - status = FAIL - return status, devpool + if clsname == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim), devpool + else: + logger.error("'%s' has returned %i instances, expected 4" + " instances", an1, len(assoc_info)) + return FAIL, devpool for inst in assoc_info: for a, val in ccnlist.items(): @@ -143,14 +144,14 @@ instances", len(assoc_info)) devpool.append(inst) except Exception, detail: - print_err(CIM_ERROR_ASSOCIATORNAMES, detail, ccn1) + print_err(CIM_ERROR_ASSOCIATORNAMES, detail, clsname) status = FAIL return status, devpool def get_alloccap(server, devpool, virt="Xen"): - an = '%s_ElementCapabilities' % virt - cn = '%s_AllocationCapabilities' % virt + an = get_typed_class(virt, 'ElementCapabilities') + cn = get_typed_class(virt, 'AllocationCapabilities') status = FAIL alloccap = [] filter = {"key" : "ResourceType"} @@ -171,7 +172,7 @@ def get_alloccap(server, devpool, virt=" InstanceID = inst['InstanceID']) if len(assoc_info) < 1: - logger.error("ElementCapabilities has returned %i objects", len(assoc_info)) + logger.error("'%s' has returned %i objects", an, len(assoc_info)) status = FAIL return status, alloccap @@ -195,8 +196,8 @@ def get_rasddetails(server, alloccap, vi def get_rasddetails(server, alloccap, virt="Xen"): status = PASS - ccn = '%s_AllocationCapabilities' % virt - an = '%s_SettingsDefineCapabilities' % virt + ccn = get_typed_class(virt, 'AllocationCapabilities') + an = get_typed_class(virt, 'SettingsDefineCapabilities') if virt == 'LXC': rtype = { "%s_MemResourceAllocationSettingData" % virt : 4 } @@ -207,13 +208,6 @@ def get_rasddetails(server, alloccap, vi "%s_NetResourceAllocationSettingData" % virt : 10, \ "%s_ProcResourceAllocationSettingData" % virt : 3 } - rangelist = { - "Default" : 0, \ - "Minimum" : 1, \ - "Maximum" : 2, \ - "Increment" : 3 - } - try: for ap in alloccap: assoc_info = Associators(server, @@ -221,19 +215,26 @@ def get_rasddetails(server, alloccap, vi ccn, InstanceID = ap['InstanceID']) - if len(assoc_info) != 4: - logger.error("SettingsDefineCapabilities returned %i ResourcePool \ -objects instead of 4", len(assoc_info)) + if 'DiskPool' in ap['InstanceID'] and virt =='Xen': + # For Diskpool, we have info 1 for each of Min, Max, + # default, Increment and 1 for each of PV and FV + # hence 4 * 2 = 8 records + exp_len = 8 + else: + exp_len = 4 + + if len(assoc_info) != exp_len: + logger.error("'%s' returned %i ResourcePool" + " objects instead of 4", an, len(assoc_info)) return FAIL for inst in assoc_info: cn = inst.classname if cn in rtype: - status = check_rasd_vals(inst, cn, rtype[cn], rangelist) + status = check_rasd_vals(inst, rtype[cn]) if status != PASS: return status - else: logger.error("Unexpected instance type %s" % cn) return FAIL @@ -244,12 +245,11 @@ objects instead of 4", len(assoc_info)) return status -def check_rasd_vals(inst, cn, rt, rangelist): +def check_rasd_vals(inst, rt): try: if inst['ResourceType'] != rt: logger.error("In ResourceType for %s " % rt) return FAIL - except Exception, detail: logger.error("Error checking RASD attribute values %s" % detail) return FAIL From deeptik at linux.vnet.ibm.com Wed Oct 8 09:40:53 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 08 Oct 2008 15:10:53 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing and updating 03_hs_to_settdefcap.py of HS In-Reply-To: <814a0e67bb1023607349.1223459469@elm3b217.beaverton.ibm.com> References: <814a0e67bb1023607349.1223459469@elm3b217.beaverton.ibm.com> Message-ID: <48EC8025.9040001@linux.vnet.ibm.com> The changes have been tested for Xen, XenFV and KVM with current sources. The tc needs to be verified with LCX. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Wed Oct 8 10:03:42 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 08 Oct 2008 03:03:42 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 01_forward.py of SDC Message-ID: <91c75d1ff10baa5fcb70.1223460222@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1223460217 25200 # Node ID 91c75d1ff10baa5fcb705384549210648b4ad7a5 # Parent 814a0e67bb1023607349ecc9b95a4636aabcc24d [TEST] Fixing 01_forward.py of SDC. Tested with Xen, XenFV, KVM with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 814a0e67bb10 -r 91c75d1ff10b suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 08 02:50:21 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 08 03:03:37 2008 -0700 @@ -168,7 +168,16 @@ def verify_sdc_with_ac(virt, server, poo try: assoc_info = assoc.Associators(server, assoc_cname, cn, InstanceID = instid) - if len(assoc_info) != 4: + + if 'DiskPool' in instid and (virt =='Xen' or virt == 'XenFV'): + # For Diskpool, we have info 1 for each of Min, Max, + # default, Increment and 1 for each of PV and FV + # hence 4 * 2 = 8 records + exp_len = 8 + else: + exp_len = 4 + + if len(assoc_info) != exp_len: logger.error("%s returned %i ResourcePool objects" "instead 4", assoc_cname, len(assoc_info)) status = FAIL From deeptik at linux.vnet.ibm.com Wed Oct 8 09:55:43 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 08 Oct 2008 15:25:43 +0530 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Oct 06 2008 In-Reply-To: References: Message-ID: <48EC839F.4090606@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-10-06 15:27:56: > > > ================================================= > > XenFV on Pegasus Test Run Summary for Oct 06 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: 708 > > Libvirt-cim changeset: 3ff9257bc87a > > ================================================= > > FAIL : 3 > > XFAIL : 0 > > SKIP : 4 > > PASS : 128 > > ----------------- > > Total : 135 > > ================================================= > > FAIL Test Summary: > > HostSystem - 03_hs_to_settdefcap.py: FAIL > > LogicalDisk - 03_ld_gi_errs.py: FAIL > > SettingsDefineCapabilities - 01_forward.py: FAIL > > > Hi Deepti, > > The fail test for XenFV is the same with Xen. I fix LogicalDisk - > 03_ld_gi_errs.py, it pass > for Xen and XenFV. You said you prepared to look into the other two > tc failure yesterday, do > you work them out? > > Thanks! Fix for the following has been sent. HostSystem - 03_hs_to_settdefcap.py: FAIL SettingsDefineCapabilities - 01_forward.py: FAIL 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: 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: FAIL > > ERROR - DEBUG instanceref, is Xen_HostSystem. > > CreationClassName="Xen_HostSystem",Name="elm3b217.beaverton.ibm.com" > > ERROR - DEBUG instanceref, is Xen_ProcessorPool. > > InstanceID="ProcessorPool/0" > > ERROR - DEBUG instanceref, is > Xen_MemoryPool.InstanceID="MemoryPool/0" > > ERROR - DEBUG instanceref, is Xen_NetworkPool. > > InstanceID="NetworkPool/cimtest-networkpool" > > ERROR - DEBUG instanceref, is Xen_NetworkPool. > > InstanceID="NetworkPool/default" > > ERROR - DEBUG instanceref, is Xen_DiskPool. > > InstanceID="DiskPool/cimtest-diskpool" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="ProcessorPool/0" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="MemoryPool/0" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="NetworkPool/cimtest-networkpool" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="NetworkPool/default" > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="DiskPool/cimtest-diskpool" > > ERROR - SettingsDefineCapabilities returned 8 ResourcePool > > objects instead of 4 > > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > > -------------------------------------------------------------------- > > 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 (no > > domain for 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: 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: FAIL > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > InstanceID="DiskPool/cimtest-diskpool" > > ERROR - Xen_SettingsDefineCapabilities returned 8 ResourcePool > > objectsinstead 4 > > -------------------------------------------------------------------- > > 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: 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 > > -------------------------------------------------------------------- > > > > Thanks and Regards, > > Deepti. > > > > > > _______________________________________________ > > 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 From danms at us.ibm.com Wed Oct 8 17:32:24 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 08 Oct 2008 10:32:24 -0700 Subject: [Libvirt-cim] [PATCH] Make MOF parser ignore NULL properties Message-ID: <5fbf96fedcf7df32fccc.1223487144@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1223487138 25200 # Node ID 5fbf96fedcf7df32fccc3f989aa4520af8c9a264 # Parent 36c97d5c8c9f0eea12a87eae4e01bb80c9840ece Make MOF parser ignore NULL properties This just adds enough to the parser to allow something like: Foo = NULL; in the MOF object. It's just ignored, as would be expected. Signed-off-by: Dan Smith diff -r 36c97d5c8c9f -r 5fbf96fedcf7 eo_util_lexer.l --- a/eo_util_lexer.l Wed Sep 03 11:35:13 2008 -0700 +++ b/eo_util_lexer.l Wed Oct 08 10:32:18 2008 -0700 @@ -72,6 +72,12 @@ return(BOOLEAN); } +null | +Null | +NULL { + return(CIMNULL); + } + {INTEGER} { eo_parse_lval.sint64 = atoll(eo_parse_text); return(INTEGER); diff -r 36c97d5c8c9f -r 5fbf96fedcf7 eo_util_parser.y --- a/eo_util_parser.y Wed Sep 03 11:35:13 2008 -0700 +++ b/eo_util_parser.y Wed Oct 08 10:32:18 2008 -0700 @@ -60,6 +60,7 @@ %token STRING %token BOOLEAN %token INTEGER +%token CIMNULL %% @@ -126,6 +127,13 @@ CMSetProperty(*_INSTANCE, $1, &($3), CMPI_boolean); free($1); } + + | PROPERTYNAME '=' CIMNULL ';' + { + EOTRACE("propertyname = %s\n" + "\ttype = NULL\n", $1); + free($1); + } ; /* END OF RULES SECTION */ From kaitlin at linux.vnet.ibm.com Wed Oct 8 18:40:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 08 Oct 2008 11:40:21 -0700 Subject: [Libvirt-cim] [PATCH] Make MOF parser ignore NULL properties In-Reply-To: <5fbf96fedcf7df32fccc.1223487144@guaranine.danplanet.com> References: <5fbf96fedcf7df32fccc.1223487144@guaranine.danplanet.com> Message-ID: <48ECFE95.1010303@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1223487138 25200 > # Node ID 5fbf96fedcf7df32fccc3f989aa4520af8c9a264 > # Parent 36c97d5c8c9f0eea12a87eae4e01bb80c9840ece > Make MOF parser ignore NULL properties > > This just adds enough to the parser to allow something like: > > Foo = NULL; > > in the MOF object. It's just ignored, as would be expected. > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Oct 8 19:59:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 08 Oct 2008 12:59:59 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add NETNS toggle to const.py; update LXC define system bits Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1223495957 25200 # Node ID c2c64b0ee95d55ac09375f0a3518d60fd569ee7d # Parent 98c505b354576e9150943b9f7f1bfd4a70347dab [TEST] Add NETNS toggle to const.py; update LXC define system bits. Added LXC_netns_support to const.py - right now, this is hardcoded to False. In the future, this will dynamically detect whether the kernel supports NETNS (which is needed to create containers guests with network support). Cleanup default_vssd_rasd_str() so that class_dasd() is used to create a Disk RASD for LXC guests, as well as KVM/Xen. On undefine/destroy of LXC guests, don't remove the file at LXC_init_path Extend LXCXML to subclass VirtCIM - this allows cim_define() to be called for LXC guests. Signed-off-by: Kaitlin Rupert diff -r 98c505b35457 -r c2c64b0ee95d suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Oct 07 02:42:02 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Oct 08 12:59:17 2008 -0700 @@ -85,6 +85,7 @@ LXC_default_mp = '/tmp' LXC_default_source = '/tmp/lxc_files' LXC_default_mac = '11:22:33:aa:bb:cc' +LXC_netns_support = False parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", diff -r 98c505b35457 -r c2c64b0ee95d suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Oct 07 02:42:02 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 08 12:59:17 2008 -0700 @@ -241,30 +241,25 @@ class_vssd = get_vssd_class(virt) vssd = class_vssd(name=dom_name, virt=virt) - # LXC only takes disk and memory device for now. - # Only disk __init__ takes different params. - if virt == 'LXC': - d = LXC_DiskResourceAllocationSettingData( - mountpoint=const.LXC_default_mp, - source=const.LXC_default_source, name=dom_name) - else: - class_dasd = get_dasd_class(virt) - if virt == 'KVM': - disk_dev = 'hda' - disk_source = const.KVM_disk_path - elif virt == 'XenFV': - disk_dev = 'hda' - disk_source = const.XenFV_disk_path - d = class_dasd( - dev=disk_dev, - source=disk_source, - name=dom_name) + class_dasd = get_dasd_class(virt) + if virt == 'KVM': + disk_dev = 'hda' + disk_source = const.KVM_disk_path + elif virt == 'XenFV': + disk_dev = 'hda' + disk_source = const.XenFV_disk_path + elif virt == 'LXC': + disk_dev = const.LXC_default_mp + disk_source = const.LXC_default_source + d = class_dasd(disk_dev, disk_source, dom_name) class_masd = get_masd_class(virt) m = class_masd( megabytes=mem_mb, mallocunits=malloc_units, name=dom_name) + + # LXC only takes disk and memory device for now. if virt == 'LXC': return vssd.mof(), [d.mof(), m.mof()] diff -r 98c505b35457 -r c2c64b0ee95d suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Oct 07 02:42:02 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 08 12:59:17 2008 -0700 @@ -328,8 +328,6 @@ return self.run(ip, 'define', self.xml_string) def undefine(self, ip): - if os.path.exists(const.LXC_init_path): - os.remove(const.LXC_init_path) return self.run(ip, 'undefine', self.dname) def start(self, ip): @@ -339,8 +337,6 @@ return self.run(ip, 'stop', self.dname) def destroy(self, ip): - if os.path.exists(const.LXC_init_path): - os.remove(const.LXC_init_path) return self.run(ip, 'destroy', self.dname) def create(self, ip): @@ -471,9 +467,7 @@ self.virt = virt self.domain_name = dom_name self.vssd = vsms.get_vssd_class(virt)(name=dom_name, virt=virt) - self.dasd = vsms.get_dasd_class(virt)(dev=disk_dev, - source=disk_source, - name=dom_name) + self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name) self.nasd = vsms.get_nasd_class(virt)(type=net_type, mac=net_mac, name=dom_name, @@ -487,8 +481,11 @@ 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 self.virt == 'LXC' and const.LXC_netns_support is False: + res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] + else: + res_settings = [str(self.dasd), str(self.nasd), + str(self.pasd), str(self.masd)] if ref_conf is None: ref_conf = ' ' @@ -683,7 +680,7 @@ def set_vbridge(self, ip, net_name): return self._set_vbridge(ip, 'XenFV', net_name) -class LXCXML(VirtXML): +class LXCXML(VirtXML, VirtCIM): def __init__(self, test_dom=const.default_domname, mem=const.default_memory, @@ -693,6 +690,9 @@ net_name=const.default_network_name, tty=const.LXC_default_tty): VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus) + VirtCIM.__init__(self, 'LXC', test_dom, const.LXC_default_mp, + const.LXC_default_source, ntype, net_name, mac, vcpus, + mem, const.default_mallocunits) self._os(const.LXC_init_path) self._devices(mac, ntype, net_name, const.LXC_default_tty) self.create_lxc_file(CIM_IP, const.LXC_init_path) @@ -704,8 +704,12 @@ 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, net_name, 'LXC') - interface = self.add_sub_node(devices, 'console', tty = tty_set) + + if const.LXC_netns_support is True: + self.set_interface_details(devices, net_mac, net_type, + net_name, 'LXC') + + self.add_sub_node(devices, 'console', tty = tty_set) def create_lxc_file(self, ip, lxc_file): try: From yunguol at cn.ibm.com Thu Oct 9 01:38:10 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 08 Oct 2008 18:38:10 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix a false positive in HostedResourcePool/01_forward.py Message-ID: <32b6d72c7eed7a92cfc8.1223516290@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223516283 25200 # Node ID 32b6d72c7eed7a92cfc82c2f6fda973885eb9fcc # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 [TEST] Fix a false positive in HostedResourcePool/01_forward.py Signed-off-by: Guolian Yun diff -r 285bc0174fb3 -r 32b6d72c7eed suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 03:03:37 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 18:38:03 2008 -0700 @@ -67,7 +67,8 @@ def main(): else: logger.error("No pool returned") return FAIL - + + status = FAIL for items in pool: cname = items.classname if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": @@ -80,6 +81,9 @@ def main(): if cname.find("DiskPool") >=0 and \ items['InstanceID'] == "DiskPool/%s" % default_pool_name: status = PASS + if status != PASS: + logger.error("HostedResourcePool information error") + return FAIL return status From yunguol at cn.ibm.com Thu Oct 9 01:22:09 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 9 Oct 2008 09:22:09 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/01_forward.py to work with sblim base provider installed In-Reply-To: <48EB4CC4.4040105@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-07 19:49:24: > +1 for the changes in this patch. > Daisy, I have some more comments on the tc which is not part of the > changes you have made. > At the end of the tc we have a for loop to verify the resourcepool details. > With the existing changes we might get a false positive because before > entering the loop the status is already assigned to PASS by > get_host_info() call if it succeeds. > After entering the for loop even when none of the if conditions match we > will still have the status set to PASS and there are possibilities of > the tc returning false positives because of the > status already being set to PASS. > Can you change the below in the tc : > > for items in pool: > cname = items.classname > if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": > 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" % default_pool_name: > status = PASS > To > > > > status = FAIL > for items in pool: > cname = items.classname > if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": > 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" % default_pool_name: > status = PASS > if status != PASS: > logger.error("HostedResourcePool information error") > return status > > If you have anyother better ideas, you are welcome to do the changes > accordingly. Your idea sounds good to me. I cook up a patch for it. Thanks! > > Thanks and Regards, > Deepti. > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1223359324 25200 > > # Node ID d81c2122fff796c7a08eb45cfe679f2e690e27bf > > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > > [TEST] Fix HostedResourcePool/01_forward.py to work with sblim > base provider installed > > > > Signed-off-by: Guolian Yun > > > > diff -r 311bf6eda378 -r d81c2122fff7 suites/libvirt- > cim/cimtest/HostedResourcePool/01_forward.py > > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py > Sun Oct 05 23:56:40 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py > Mon Oct 06 23:02:04 2008 -0700 > > @@ -26,13 +26,15 @@ import sys > > import sys > > from XenKvmLib import assoc > > from XenKvmLib import enumclass > > +from XenKvmLib.common_util import get_host_info > > from XenKvmLib.const import default_network_name > > from CimTest import Globals > > from CimTest.Globals import logger > > -from CimTest.ReturnCodes import PASS, FAIL > > +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > > from XenKvmLib.const import do_main, default_pool_name > > from XenKvmLib.classes import get_typed_class > > > > +bug = '00007' > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > > @do_main(sup_types) > > def main(): > > @@ -40,19 +42,17 @@ def main(): > > status = FAIL > > > > keys = ['Name', 'CreationClassName'] > > - try: > > - 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) > > + status, host_sys, host_cn = get_host_info(options.ip, options.virt) > > + if status != PASS: > > + logger.error("Error in calling get_host_info function") > > return FAIL > > try: > > assoc_cn = get_typed_class(options.virt, "HostedResourcePool") > > pool = assoc.AssociatorNames(options.ip, > > assoc_cn, > > - host_sys.CreationClassName, > > - Name = host_sys.Name, > > - CreationClassName = > host_sys.CreationClassName) > > + host_cn, > > + Name = host_sys, > > + CreationClassName = host_cn) > > except Exception, details: > > logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn) > > logger.error("Exception:", details) > > @@ -62,8 +62,11 @@ def main(): > > logger.error("System association failed") > > return FAIL > > elif len(pool) == 0: > > - logger.error("No pool returned") > > - return FAIL > > + if host_cn == 'Linux_ComputerSystem': > > + return XFAIL_RC(bug) > > + else: > > + logger.error("No pool returned") > > + return FAIL > > > > for items in pool: > > cname = items.classname > > > > _______________________________________________ > > 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 yunguol at cn.ibm.com Thu Oct 9 01:46:55 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 08 Oct 2008 18:46:55 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed Message-ID: # HG changeset patch # User Guolian Yun # Date 1223516805 25200 # Node ID fb1e4aac03bb7c31ad393080fa84b355231f6127 # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 [TEST]#2 Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed Updates from 1 to 2: Chage error description in log error Signed-off-by: Guolian Yun diff -r 285bc0174fb3 -r fb1e4aac03bb suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Wed Oct 08 03:03:37 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py Wed Oct 08 18:46:45 2008 -0700 @@ -25,6 +25,7 @@ import sys import sys from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info from XenKvmLib.const import default_network_name from CimTest import Globals from CimTest.Globals import logger @@ -39,12 +40,11 @@ def main(): status = PASS keys = ['Name', 'CreationClassName'] - try: - 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) - return FAIL + status, host_sys, host_cn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") + 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") @@ -61,13 +61,13 @@ def main(): try: assoc_host = assoc.AssociatorNames(options.ip, assoc_cn, k, InstanceID = v) except Exception: - logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % v) + logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn) return FAIL if len(assoc_host) == 1: - if assoc_host[0].keybindings['Name'] != host_sys.Name: + if assoc_host[0].keybindings['Name'] != host_sys: logger.error("Pool association returned wrong hostsystem") status = FAIL - if assoc_host[0].keybindings['CreationClassName'] != host_sys.CreationClassName: + if assoc_host[0].keybindings['CreationClassName'] != host_cn: logger.error("Pool association returned wrong CreationClassName") status = FAIL if status != PASS: From yunguol at cn.ibm.com Thu Oct 9 01:30:44 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 9 Oct 2008 09:30:44 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/02_reverse.py to work with sblim cmpi base provider installed In-Reply-To: <48EB4E67.4090801@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-07 19:56:23: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1223359792 25200 > > # Node ID 0b599308e31a1865ab47b1c2d44d0887c409e139 > > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > > [TEST] Fix HostedResourcePool/02_reverse.py to work with sblim > cmpi base provider installed > > > > Signed-off-by: Guolian Yun > > > > diff -r 311bf6eda378 -r 0b599308e31a suites/libvirt- > cim/cimtest/HostedResourcePool/02_reverse.py > > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py > Sun Oct 05 23:56:40 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/02_reverse.py > Mon Oct 06 23:09:52 2008 -0700 > > @@ -25,6 +25,7 @@ import sys > > import sys > > from XenKvmLib import assoc > > from XenKvmLib import enumclass > > +from XenKvmLib.common_util import get_host_info > > from XenKvmLib.const import default_network_name > > from CimTest import Globals > > from CimTest.Globals import logger > > @@ -39,12 +40,11 @@ def main(): > > status = PASS > > > > keys = ['Name', 'CreationClassName'] > > - try: > > - 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) > > - return FAIL > > + status, host_sys, host_cn = get_host_info(options.ip, options.virt) > > + if status != PASS: > > + logger.error("Error in calling get_host_info function") > > + 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") > > @@ -64,10 +64,10 @@ def main(): > > logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % v) > > > This should be > > logger.error(Globals.CIM_ERROR_ASSOCIATORNAMES % assoc_cn) > Good catch. #2 patch on the way. Thanks! > > return FAIL > > if len(assoc_host) == 1: > > - if assoc_host[0].keybindings['Name'] != host_sys.Name: > > + if assoc_host[0].keybindings['Name'] != host_sys: > > logger.error("Pool association returned wrong hostsystem") > > status = FAIL > > - if assoc_host[0].keybindings['CreationClassName'] != > host_sys.CreationClassName: > > + if assoc_host[0].keybindings['CreationClassName'] != host_cn: > > logger.error("Pool association returned wrong > CreationClassName") > > status = FAIL > > if status != PASS: > > > > _______________________________________________ > > 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 yunguol at cn.ibm.com Thu Oct 9 01:35:06 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 9 Oct 2008 09:35:06 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix a false positive in HostedResourcePool/01_forward.py In-Reply-To: <32b6d72c7eed7a92cfc8.1223516290@elm3b217.beaverton.ibm.com> Message-ID: Please ignore this patch. 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 Guo Lian Yun/China/IBM at IBMCN Sent by: libvirt-cim-bounces at redhat.com 2008-10-09 09:38 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH] [TEST] Fix a false positive in HostedResourcePool/01_forward.py # HG changeset patch # User Guolian Yun # Date 1223516283 25200 # Node ID 32b6d72c7eed7a92cfc82c2f6fda973885eb9fcc # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 [TEST] Fix a false positive in HostedResourcePool/01_forward.py Signed-off-by: Guolian Yun diff -r 285bc0174fb3 -r 32b6d72c7eed suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 03:03:37 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 18:38:03 2008 -0700 @@ -67,7 +67,8 @@ def main(): else: logger.error("No pool returned") return FAIL - + + status = FAIL for items in pool: cname = items.classname if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": @@ -80,6 +81,9 @@ def main(): if cname.find("DiskPool") >=0 and \ items['InstanceID'] == "DiskPool/%s" % default_pool_name: status = PASS + if status != PASS: + logger.error("HostedResourcePool information error") + return FAIL 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 Thu Oct 9 01:57:36 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 08 Oct 2008 18:57:36 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix a false positive in HostedResourcePool/01_forward.py Message-ID: # HG changeset patch # User Guolian Yun # Date 1223517447 25200 # Node ID fb14259f2f490a27cc3b7714ae8ad7968004fa74 # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 [TEST] #2 Fix a false positive in HostedResourcePool/01_forward.py Signed-off-by: Guolian Yun diff -r 285bc0174fb3 -r fb14259f2f49 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 03:03:37 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 18:57:27 2008 -0700 @@ -67,20 +67,22 @@ def main(): else: logger.error("No pool returned") return FAIL - - for items in pool: - cname = items.classname - if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": - 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" % default_pool_name: - status = PASS - + try: + for items in pool: + cname = items.classname + if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": + status = PASS + elif cname.find("ProcessorPool") >=0 and items['InstanceID'] == "ProcessorPool/0": + status = PASS + elif cname.find("NetworkPool") >=0 and \ + items['InstanceID'] == "NetworkPool/%s" %default_network_name: + status = PASS + elif cname.find("DiskPool") >=0 and \ + items['InstanceID'] == "DiskPool/%s" % default_pool_name: + status = PASS + except Exception, details: + logger.error(details) + return FAIL return status if __name__ == "__main__": From yunguol at cn.ibm.com Thu Oct 9 01:41:11 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 9 Oct 2008 09:41:11 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/01_forward.py to work with sblim base provider installed In-Reply-To: <48EB9B66.8000401@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-08 01:24:54: > > status = FAIL > > for items in pool: > > cname = items.classname > > if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": > > 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" % default_pool_name: > > status = PASS > > if status != PASS: > > logger.error("HostedResourcePool information error") > > return status > > > > If you hit an error condition, the test should return - no point in > checking the other conditions when we already know we've failed. Plus, > the error log message is really vague. > > Instead, you could do something like: > > try: > for items in pool: > cname = items.classname > if cname.find("MemoryPool") >=0 and items['InstanceID'] != > "MemoryPool/0": > raise Exception("%s does not match MemoryPool/0", > items['InstanceID']) > > elif cname.find("ProcessorPool") >=0 and items['InstanceID'] != > "ProcessorPool/0": > raise Exception("%s does not match ProcessorPool/0", > items['InstanceID']) > > elif cname.find("NetworkPool") >= 0 and \ > items['InstanceID'] != "NetworkPool/%s" %default_network_name: > raise Exception("%s does not match NetworkPool/%s", > items['InstanceID'], default_network_name) > > elif cname.find("DiskPool") >= 0 and \ > items['InstanceID'] != "DiskPool/%s" % default_pool_name: > raise Exception("%s does not match DiskPool/%s", > items['InstanceID'], default_pool_name) > > except Exception, details: > logger.error(details) > return FAIL > > return PASS > > Kaitlin - That sounds good to me. 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 Thu Oct 9 02:25:20 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 08 Oct 2008 19:25:20 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed Message-ID: # HG changeset patch # User Guolian Yun # Date 1223519114 25200 # Node ID d9fd2890416a6f6c591431fb8e966df949d9c4d7 # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 [TEST] #2 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed Signed-off-by: Guolian Yun diff -r 285bc0174fb3 -r d9fd2890416a suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Wed Oct 08 03:03:37 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Wed Oct 08 19:25:14 2008 -0700 @@ -25,48 +25,57 @@ import pywbem import pywbem from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info from XenKvmLib.common_util import try_assoc from CimTest import Globals from CimTest.Globals import logger -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.const import do_main from XenKvmLib.classes import get_typed_class -expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \ - "desc" : "No such instance" - } +bug = "00007" +expr_values = { + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (CreationClassName)"}, + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ + "desc" : "No such instance (Name)"} + } sup_types=['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) def main(): options = main.options - status = PASS keys = ['Name', 'CreationClassName'] - try: - 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) + status, host_sys, host_cn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL conn = assoc.myWBEMConnection('http://%s' % options.ip, (Globals.CIM_USER, Globals.CIM_PASS), Globals.CIM_NS) - classname = host_sys.CreationClassName + classname = host_cn assoc_classname = get_typed_class(options.virt, "HostedResourcePool") + keys = {"Name" : host_sys, "CreationClassName" : "wrong"} + ret = try_assoc(conn, classname, assoc_classname, keys, \ + "Name", expr_values['invalid_ccname'], bug_no="") + if ret != PASS: + if host_cn == 'Linux_ComputerSystem': + return XFAIL_RC(bug) + else: + logger.error("------ FAILED: Invalid CreationClassName Key Value.------") + return FAIL - keys = {"Name" : "wrong", "CreationClassName" : host_sys.CreationClassName} - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") + keys = {"Name" : "wrong", "CreationClassName" : host_cn} + ret = try_assoc(conn, classname, assoc_classname, keys, \ + "CreationClassName", expr_values['invalid_name'], bug_no="") if ret != PASS: - logger.error("------ FAILED: Invalid Name Key Name.------") - status = ret + if host_cn == 'Linux_ComputerSystem': + return XFAIL_RC(bug) + else: + logger.error("------ FAILED: Invalid Name Key Value.------") + return FAIL - keys = {"Wrong" : host_sys.Name, "CreationClassName" : host_sys.CreationClassName} - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") - if ret != PASS: - logger.error("------ FAILED: Invalid Name Key Value.------") - status = ret - - return status + return PASS if __name__ == "__main__": sys.exit(main()) From yunguol at cn.ibm.com Thu Oct 9 02:08:57 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 9 Oct 2008 10:08:57 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed In-Reply-To: <48EB4FC5.7080307@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-07 20:02:13: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1223361281 25200 > > # Node ID 628b846c366a0c97fa97c18a5a7e2185c265188f > > # Parent 311bf6eda3786eb8e47ede06c4da6dc1570aff61 > > [TEST] Fix HostedResourcePool/03_forward_errs.py to work with > sblim cmpi base provider installed > > > > Signed-off-by: Guolian Yun > > > > diff -r 311bf6eda378 -r 628b846c366a suites/libvirt- > cim/cimtest/HostedResourcePool/03_forward_errs.py > > --- a/suites/libvirt- > cim/cimtest/HostedResourcePool/03_forward_errs.py Sun Oct 05 23: > 56:40 2008 -0700 > > +++ b/suites/libvirt- > cim/cimtest/HostedResourcePool/03_forward_errs.py Mon Oct 06 23: > 34:41 2008 -0700 > > @@ -25,16 +25,21 @@ import pywbem > > import pywbem > > from XenKvmLib import assoc > > from XenKvmLib import enumclass > > +from XenKvmLib.common_util import get_host_info > > from XenKvmLib.common_util import try_assoc > > from CimTest import Globals > > from CimTest.Globals import logger > > -from CimTest.ReturnCodes import PASS, FAIL > > +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > > from XenKvmLib.const import do_main > > from XenKvmLib.classes import get_typed_class > > > > -expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > - "desc" : "No such instance" > > - } > > +bug = "00007" > > +expr_values = { > > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > + "desc" : "No such instance > (CreationClassName)"}, > > > Wrap it to 80 columns > > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > + "desc" : "No such instance (Name)"} > > + } > > > > sup_types=['Xen', 'KVM', 'XenFV', 'LXC'] > > @do_main(sup_types) > > @@ -42,30 +47,36 @@ def main(): > > options = main.options > > status = PASS > > > You can remove the status = PASS statement since the first access to > status by get_host_sys() function will assign value to it. > > > keys = ['Name', 'CreationClassName'] > > - try: > > - 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) > > + status, host_sys, host_cn = get_host_info(options.ip, options.virt) > > + if status != PASS: > > + logger.error("Error in calling get_host_info function") > > return FAIL > > > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > > (Globals.CIM_USER, Globals.CIM_PASS), > > Globals.CIM_NS) > > - classname = host_sys.CreationClassName > > + classname = host_cn > > assoc_classname = get_typed_class(options.virt, "HostedResourcePool") > > > > - keys = {"Name" : "wrong", "CreationClassName" : host_sys. > CreationClassName} > > - ret = try_assoc(conn, classname, assoc_classname, keys, > "Name", expr_values, bug_no="") > > + keys = {"Name" : host_sys, "CreationClassName" : "wrong"} > > + ret = try_assoc(conn, classname, assoc_classname, keys, \ > > + "Name", expr_values['invalid_ccname'], bug_no="") > > if ret != PASS: > > - logger.error("------ FAILED: Invalid Name Key Name.------") > > - status = ret > > + if host_cn == 'Linux_ComputerSystem': > > + return XFAIL_RC(bug) > > + else: > > + logger.error("------ FAILED: Invalid > CreationClassName Key Value.------") > > + status = ret > > > No need to assign the ret to status, you can directly call return FAIL. > > - keys = {"Wrong" : host_sys.Name, "CreationClassName" : > host_sys.CreationClassName} > > - ret = try_assoc(conn, classname, assoc_classname, keys, > "Name", expr_values, bug_no="") > > + keys = {"Name" : "wrong", "CreationClassName" : host_cn} > > + ret = try_assoc(conn, classname, assoc_classname, keys, \ > > + "CreationClassName", > expr_values['invalid_name'], bug_no="") > > if ret != PASS: > > - logger.error("------ FAILED: Invalid Name Key Value.------") > > - status = ret > > + if host_cn == 'Linux_ComputerSystem': > > + return XFAIL_RC(bug) > > + else: > > + logger.error("------ FAILED: Invalid Name Key Value.------") > > + status = ret > > > > > No need to assign the ret to status, you can directly call return FAIL. > > return status > > > Can call return PASS here. > > if __name__ == "__main__": Thanks! #2 patch on the way. > > > > _______________________________________________ > > 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 yunguol at cn.ibm.com Thu Oct 9 02:38:37 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 08 Oct 2008 19:38:37 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed Message-ID: <9d21f0fe6973b74e4ac3.1223519917@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223519910 25200 # Node ID 9d21f0fe6973b74e4ac3d776e481be016661192f # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 [TEST] #7 Fix HostedService - 04_reverse_errs.py to work with sblim base provider installed Signed-off-by: Guolian Yun diff -r 285bc0174fb3 -r 9d21f0fe6973 suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Wed Oct 08 03:03:37 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/04_reverse_errs.py Wed Oct 08 19:38:30 2008 -0700 @@ -25,6 +25,7 @@ from pywbem.cim_obj import CIMInstanceNa from pywbem.cim_obj import CIMInstanceName from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info, try_assoc from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_USER, \ CIM_PASS, CIM_NS @@ -32,56 +33,55 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL, XFAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] -exp_rc = 6 #CIM_ERR_NOT_FOUND -exp_desc = "No such instance" +exp_values = { + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, + "desc" : "No such instance (CreationClassName)"}, + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, + "desc" : "No such instance (Name)"} + } @do_main(sup_types) def main(): options = main.options - rc = -1 status = FAIL keys = ['Name', 'CreationClassName'] - try: - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt)[0] - except Exception: - logger.error(CIM_ERROR_ENUMERATE % host_sys.name) + status, host_name, host_ccn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL - - servicelist = {get_typed_class(options.virt, "ResourcePoolConfigurationService") : "RPCS", - get_typed_class(options.virt, "VirtualSystemManagementService") : "Management Service", - get_typed_class(options.virt, "VirtualSystemMigrationService") : "MigrationService"} + rpcs = get_typed_class(options.virt, "ResourcePoolConfigurationService") + vsms = get_typed_class(options.virt, "VirtualSystemManagementService") + migrate = get_typed_class(options.virt, "VirtualSystemMigrationService") + + servicelist = {rpcs : "RPCS", + vsms : "Management Service", + migrate : "MigrationService"} conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) + assoc_classname = get_typed_class(options.virt, "HostedService") for k, v in servicelist.items(): - instanceref = CIMInstanceName(k, - keybindings = {"Wrong" : v, - "CreationClassName" : "wrong", - "SystemCreationClassName" : host_sys.CreationClassName, - "SystemName" : host_sys.Name}) - names = [] - try: - names = conn.AssociatorNames(instanceref, AssocClass = get_typed_class(options.virt, "HostedService")) - rc = 0 - except pywbem.CIMError, (rc, desc): - if rc == exp_rc and desc.find(exp_desc) >= 0: - logger.info("Got excepted rc code and error string") - status = PASS - else: - logger.error("Unexpected rc code %s and description %s\n" %(rc, desc)) - except Exception, details: - logger.error("Unknown exception happened") - logger.error(details) + keys = {"Wrong" : v, "CreationClassName": k,\ + "SystemCreationClassName": host_ccn, "SystemName" : host_name} + ret = try_assoc(conn, k, assoc_classname, keys, "Name",\ + exp_values['invalid_name'], bug_no="") + if ret != PASS: + logger.error("------ FAILED: Invalid Name Key Name.------") + return FAIL - if rc == 0: - logger.error("HostedService associator should NOT return excepted result with a wrong key name and value of %s input" % k) - status = FAIL + keys = {"Name" : v, "Wrong": k, "SystemCreationClassName":\ + host_ccn, "SystemName" : host_name} + ret = try_assoc(conn, k, assoc_classname, keys, "Name",\ + exp_values['invalid_ccname'], bug_no="") + if ret != PASS: + logger.error("------ FAILED: Invalid Name Key Name.------") + return FAIL - return status + return status if __name__ == "__main__": From yunguol at cn.ibm.com Thu Oct 9 02:32:00 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 9 Oct 2008 10:32:00 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add NETNS toggle to const.py; update LXC define system bits 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 Kaitlin Rupert Sent by: libvirt-cim-bounces at redhat.com 2008-10-09 03:59 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH] [TEST] Add NETNS toggle to const.py; update LXC define system bits # HG changeset patch # User Kaitlin Rupert # Date 1223495957 25200 # Node ID c2c64b0ee95d55ac09375f0a3518d60fd569ee7d # Parent 98c505b354576e9150943b9f7f1bfd4a70347dab [TEST] Add NETNS toggle to const.py; update LXC define system bits. Added LXC_netns_support to const.py - right now, this is hardcoded to False. In the future, this will dynamically detect whether the kernel supports NETNS (which is needed to create containers guests with network support). Cleanup default_vssd_rasd_str() so that class_dasd() is used to create a Disk RASD for LXC guests, as well as KVM/Xen. On undefine/destroy of LXC guests, don't remove the file at LXC_init_path Extend LXCXML to subclass VirtCIM - this allows cim_define() to be called for LXC guests. Signed-off-by: Kaitlin Rupert diff -r 98c505b35457 -r c2c64b0ee95d suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Oct 07 02:42:02 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Oct 08 12:59:17 2008 -0700 @@ -85,6 +85,7 @@ LXC_default_mp = '/tmp' LXC_default_source = '/tmp/lxc_files' LXC_default_mac = '11:22:33:aa:bb:cc' +LXC_netns_support = False parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", diff -r 98c505b35457 -r c2c64b0ee95d suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Oct 07 02:42:02 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 08 12:59:17 2008 -0700 @@ -241,30 +241,25 @@ class_vssd = get_vssd_class(virt) vssd = class_vssd(name=dom_name, virt=virt) - # LXC only takes disk and memory device for now. - # Only disk __init__ takes different params. - if virt == 'LXC': - d = LXC_DiskResourceAllocationSettingData( - mountpoint=const.LXC_default_mp, - source=const.LXC_default_source, name=dom_name) - else: - class_dasd = get_dasd_class(virt) - if virt == 'KVM': - disk_dev = 'hda' - disk_source = const.KVM_disk_path - elif virt == 'XenFV': - disk_dev = 'hda' - disk_source = const.XenFV_disk_path - d = class_dasd( - dev=disk_dev, - source=disk_source, - name=dom_name) + class_dasd = get_dasd_class(virt) + if virt == 'KVM': + disk_dev = 'hda' + disk_source = const.KVM_disk_path + elif virt == 'XenFV': + disk_dev = 'hda' + disk_source = const.XenFV_disk_path + elif virt == 'LXC': + disk_dev = const.LXC_default_mp + disk_source = const.LXC_default_source + d = class_dasd(disk_dev, disk_source, dom_name) class_masd = get_masd_class(virt) m = class_masd( megabytes=mem_mb, mallocunits=malloc_units, name=dom_name) + + # LXC only takes disk and memory device for now. if virt == 'LXC': return vssd.mof(), [d.mof(), m.mof()] diff -r 98c505b35457 -r c2c64b0ee95d suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Oct 07 02:42:02 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 08 12:59:17 2008 -0700 @@ -328,8 +328,6 @@ return self.run(ip, 'define', self.xml_string) def undefine(self, ip): - if os.path.exists(const.LXC_init_path): - os.remove(const.LXC_init_path) return self.run(ip, 'undefine', self.dname) def start(self, ip): @@ -339,8 +337,6 @@ return self.run(ip, 'stop', self.dname) def destroy(self, ip): - if os.path.exists(const.LXC_init_path): - os.remove(const.LXC_init_path) return self.run(ip, 'destroy', self.dname) def create(self, ip): @@ -471,9 +467,7 @@ self.virt = virt self.domain_name = dom_name self.vssd = vsms.get_vssd_class(virt)(name=dom_name, virt=virt) - self.dasd = vsms.get_dasd_class(virt)(dev=disk_dev, - source=disk_source, - name=dom_name) + self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name) self.nasd = vsms.get_nasd_class(virt)(type=net_type, mac=net_mac, name=dom_name, @@ -487,8 +481,11 @@ 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 self.virt == 'LXC' and const.LXC_netns_support is False: + res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] + else: + res_settings = [str(self.dasd), str(self.nasd), + str(self.pasd), str(self.masd)] if ref_conf is None: ref_conf = ' ' @@ -683,7 +680,7 @@ def set_vbridge(self, ip, net_name): return self._set_vbridge(ip, 'XenFV', net_name) -class LXCXML(VirtXML): +class LXCXML(VirtXML, VirtCIM): def __init__(self, test_dom=const.default_domname, mem=const.default_memory, @@ -693,6 +690,9 @@ net_name=const.default_network_name, tty=const.LXC_default_tty): VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus) + VirtCIM.__init__(self, 'LXC', test_dom, const.LXC_default_mp, + const.LXC_default_source, ntype, net_name, mac, vcpus, + mem, const.default_mallocunits) self._os(const.LXC_init_path) self._devices(mac, ntype, net_name, const.LXC_default_tty) self.create_lxc_file(CIM_IP, const.LXC_init_path) @@ -704,8 +704,12 @@ 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, net_name, 'LXC') - interface = self.add_sub_node(devices, 'console', tty = tty_set) + + if const.LXC_netns_support is True: + self.set_interface_details(devices, net_mac, net_type, + net_name, 'LXC') + + self.add_sub_node(devices, 'console', tty = tty_set) def create_lxc_file(self, ip, lxc_file): try: _______________________________________________ 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 Oct 9 02:57:46 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 9 Oct 2008 10:57:46 +0800 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Oct 06 2008 In-Reply-To: <48EC839F.4090606@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-08 17:55:43: > > > Guo Lian Yun wrote: > > > > libvirt-cim-bounces at redhat.com wrote on 2008-10-06 15:27:56: > > > > > ================================================= > > > XenFV on Pegasus Test Run Summary for Oct 06 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: 708 > > > Libvirt-cim changeset: 3ff9257bc87a > > > ================================================= > > > FAIL : 3 > > > XFAIL : 0 > > > SKIP : 4 > > > PASS : 128 > > > ----------------- > > > Total : 135 > > > ================================================= > > > FAIL Test Summary: > > > HostSystem - 03_hs_to_settdefcap.py: FAIL > > > LogicalDisk - 03_ld_gi_errs.py: FAIL > > > SettingsDefineCapabilities - 01_forward.py: FAIL > > > > > Hi Deepti, > > > > The fail test for XenFV is the same with Xen. I fix LogicalDisk - > > 03_ld_gi_errs.py, it pass > > for Xen and XenFV. You said you prepared to look into the other two > > tc failure yesterday, do > > you work them out? > > > > Thanks! > Fix for the following has been sent. > HostSystem - 03_hs_to_settdefcap.py: FAIL > SettingsDefineCapabilities - 01_forward.py: FAIL Cool. All tc pass for me for Xen with latest src. And I've sent the test report. Thanks for your hard work! > > 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: 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: FAIL > > > ERROR - DEBUG instanceref, is Xen_HostSystem. > > > CreationClassName="Xen_HostSystem",Name="elm3b217.beaverton.ibm.com" > > > ERROR - DEBUG instanceref, is Xen_ProcessorPool. > > > InstanceID="ProcessorPool/0" > > > ERROR - DEBUG instanceref, is > > Xen_MemoryPool.InstanceID="MemoryPool/0" > > > ERROR - DEBUG instanceref, is Xen_NetworkPool. > > > InstanceID="NetworkPool/cimtest-networkpool" > > > ERROR - DEBUG instanceref, is Xen_NetworkPool. > > > InstanceID="NetworkPool/default" > > > ERROR - DEBUG instanceref, is Xen_DiskPool. > > > InstanceID="DiskPool/cimtest-diskpool" > > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > > InstanceID="ProcessorPool/0" > > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > > InstanceID="MemoryPool/0" > > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > > InstanceID="NetworkPool/cimtest-networkpool" > > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > > InstanceID="NetworkPool/default" > > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > > InstanceID="DiskPool/cimtest-diskpool" > > > ERROR - SettingsDefineCapabilities returned 8 ResourcePool > > > objects instead of 4 > > > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > > > -------------------------------------------------------------------- > > > 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 (no > > > domain for 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: 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: FAIL > > > ERROR - DEBUG instanceref, is Xen_AllocationCapabilities. > > > InstanceID="DiskPool/cimtest-diskpool" > > > ERROR - Xen_SettingsDefineCapabilities returned 8 ResourcePool > > > objectsinstead 4 > > > -------------------------------------------------------------------- > > > 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: 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 > > > -------------------------------------------------------------------- > > > > > > Thanks and Regards, > > > Deepti. > > > > > > > > > _______________________________________________ > > > 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 > > _______________________________________________ > 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 Oct 9 02:55:10 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 9 Oct 2008 10:55:10 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Oct 09 2008 Message-ID: ================================================= Xen on Pegasus Test Run Summary for Oct 09 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: 714 Libvirt-cim changeset: f7b995404a9c ================================================= FAIL : 0 XFAIL : 0 SKIP : 3 PASS : 132 ----------------- Total : 135 ================================================= 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: 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: 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: PASS -------------------------------------------------------------------- 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: 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 kaitlin at linux.vnet.ibm.com Thu Oct 9 15:09:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Oct 2008 08:09:59 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix a false positive in HostedResourcePool/01_forward.py In-Reply-To: References: Message-ID: <48EE1EC7.60303@linux.vnet.ibm.com> > + try: > + for items in pool: > + cname = items.classname > + if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": > + status = PASS > + elif cname.find("ProcessorPool") >=0 and items['InstanceID'] == "ProcessorPool/0": > + status = PASS > + elif cname.find("NetworkPool") >=0 and \ > + items['InstanceID'] == "NetworkPool/%s" %default_network_name: > + status = PASS > + elif cname.find("DiskPool") >=0 and \ > + items['InstanceID'] == "DiskPool/%s" % default_pool_name: > + status = PASS > + except Exception, details: > + logger.error(details) > + return FAIL > If one of the if conditions fail, you'll want to return from the test instead of checking the next condition. So you can change this to something like: try: for items in pool: cname = items.classname if cname.find("MemoryPool") >=0 and items['InstanceID'] != "MemoryPool/0": raise Exception("%s does not match MemoryPool/0", items['InstanceID']) elif cname.find("ProcessorPool") >=0 and items['InstanceID'] != "ProcessorPool/0": raise Exception("%s does not match ProcessorPool/0", items['InstanceID']) elif cname.find("NetworkPool") >= 0 and \ items['InstanceID'] != "NetworkPool/%s" %default_network_name: raise Exception("%s does not match NetworkPool/%s", items['InstanceID'], default_network_name) elif cname.find("DiskPool") >= 0 and \ items['InstanceID'] != "DiskPool/%s" % default_pool_name: raise Exception("%s does not match DiskPool/%s", items['InstanceID'], default_pool_name) except Exception, details: logger.error(details) return FAIL return PASS -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 9 15:15:10 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Oct 2008 08:15:10 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed In-Reply-To: References: Message-ID: <48EE1FFE.1040100@linux.vnet.ibm.com> > +bug = "00007" > +expr_values = { > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (CreationClassName)"}, > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > + "desc" : "No such instance (Name)"} > + } Can you align the lines so that the colons line up. Like: "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ "desc" : "No such instance (CreationClassName)"}, Also, remove the \ at the end of these lines above. > + ret = try_assoc(conn, classname, assoc_classname, keys, \ Remove \ at the end of the line. > + ret = try_assoc(conn, classname, assoc_classname, keys, \ Same here - remove the \ at the end of the line. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 9 15:54:48 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Oct 2008 08:54:48 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] Add RASD template functions, VSMS 14_define_sys_disk.py Message-ID: This patchset adds functions to get the template RASDs from SDC. These functions should be used to construct the RASDs passed to define system (instead of using the classes defined in vsms.py). This patchset is dependent on a recent version of pywbem. From kaitlin at linux.vnet.ibm.com Thu Oct 9 15:54:49 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Oct 2008 08:54:49 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Add get_default_rasds() and get_rasd_templates() to rasd.py In-Reply-To: Message-ID: <25b12a8b5257cd983e49.1223567689@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223515128 25200 # Node ID 25b12a8b5257cd983e4926875dc619812fc1ce88 # Parent c2c64b0ee95d55ac09375f0a3518d60fd569ee7d [TEST] Add get_default_rasds() and get_rasd_templates() to rasd.py NOTE: This patch only works with recent versions of pywbem (svn checkout of 09/04/2008 or later). These functions can be used to get the template RASD instances. Instead of building instances by hand (see default_vssd_rasd_str()), the test cases should be using the template RASDs provided by the SettingsDefineCapabilities association. get_rasd_templates() - returns the min, max, increment, and default template RASD instances for a given AllocationCapabilities instance. get_default_rasds() - returns just the default template RASD instances for the resource pools. Add inst_to_mof() to convert instances to mof format. This is only needed for libcmpiutil version 0.4 and older. Add get_default_rasd_mofs() - returns default template RASDs in mof format. Signed-off-by: Kaitlin Rupert diff -r c2c64b0ee95d -r 25b12a8b5257 suites/libvirt-cim/lib/XenKvmLib/classes.py --- a/suites/libvirt-cim/lib/XenKvmLib/classes.py Wed Oct 08 12:59:17 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py Wed Oct 08 18:18:48 2008 -0700 @@ -44,3 +44,18 @@ return cn[dash_index+1:] +#FIXME This function is only needed for libcmpiutil versions 0.4 and later. +#Once version 0.4 is obsolete, this function should be removed. +def inst_to_mof(inst): + mof_str = inst.tomof() + + mof_inst = "" + + for str in mof_str.splitlines(): + if str.endswith('{') or not str.endswith('NULL;'): + mof_inst += "%s\n" % str + elif str.endswith('};'): + mof_inst += "%s\n" % str + + return mof_inst + diff -r c2c64b0ee95d -r 25b12a8b5257 suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Oct 08 12:59:17 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Oct 08 18:18:48 2008 -0700 @@ -24,8 +24,11 @@ from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS from XenKvmLib import vxml -from XenKvmLib.classes import get_typed_class - +from XenKvmLib import const +from XenKvmLib.classes import get_typed_class, get_class_type +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.assoc import Associators +from XenKvmLib.const import default_pool_name, default_network_name pasd_cn = 'ProcResourceAllocationSettingData' nasd_cn = 'NetResourceAllocationSettingData' @@ -165,3 +168,63 @@ memrasd_list['VirtualQuantity']) status = FAIL return status + +def get_rasd_templates(host_ip, type, pool_id): + ac_cn = get_typed_class(type, "AllocationCapabilities") + an_cn = get_typed_class(type, "SettingsDefineCapabilities") + + templates = [] + + try: + key_list = {"InstanceID" : pool_id } + + inst = GetInstance(host_ip, ac_cn, key_list) + + temps = Associators(host_ip, an_cn, ac_cn, InstanceID=inst.InstanceID) + + for temp in temps: + templates.append(temp) + + except Exception, detail: + logger.error("Exception: %s", detail) + + return templates + +def get_default_rasds(host_ip, type): + ac_id_list = [ "MemoryPool/0", + "DiskPool/%s" % default_pool_name, + ] + + if type == "LXC": + if const.LXC_netns_support is True: + ac_id_list.append("NetworkPool/%s" % default_network_name) + else: + ac_id_list.append("NetworkPool/%s" % default_network_name) + ac_id_list.append("ProcessorPool/0") + + templates = [] + + for id in ac_id_list: + rasd_list = get_rasd_templates(host_ip, type, id) + if len(rasd_list) < 1: + logger.info("No RASD templates returned for %s", id) + return [] + + for rasd in rasd_list: + if rasd['InstanceID'] == "Default": + templates.append(rasd) + + return templates + +def get_default_rasd_mofs(host_ip, type): + rasds = get_default_rasds(ip, virt) + + rasd_mofs = [] + + #FIXME for libcmpiutil versions 0.4 and later, inst_to_mof() is needed. + #This should be changed to rasd.tomof() once version 0.4 is obsolete. + for rasd in rasds: + rasd_mofs.append(inst_to_mof(rasd)) + + return rasd_mofs + From kaitlin at linux.vnet.ibm.com Thu Oct 9 15:54:50 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 09 Oct 2008 08:54:50 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Add VirtualSystemManagementService - 14_define_sys_disk.py In-Reply-To: Message-ID: <1b152e5e9a47ec932b5c.1223567690@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223567675 25200 # Node ID 1b152e5e9a47ec932b5c18bb26f226d5896b5432 # Parent 25b12a8b5257cd983e4926875dc619812fc1ce88 [TEST] Add VirtualSystemManagementService - 14_define_sys_disk.py This test defines a guest with a very large disk image. This test can be updated in the future to include other disk specific DefineSystem() tests. Signed-off-by: Kaitlin Rupert diff -r 25b12a8b5257 -r 1b152e5e9a47 suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Thu Oct 09 08:54:35 2008 -0700 @@ -0,0 +1,103 @@ +#!/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 os +from VirtLib.utils import run_remote +from CimTest.Globals import logger +from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.const import do_main, _image_dir +from XenKvmLib.common_util import create_using_definesystem +from XenKvmLib.test_doms import destroy_and_undefine_domain +from XenKvmLib.classes import get_typed_class, inst_to_mof +from XenKvmLib.rasd import get_default_rasds +from XenKvmLib.vsms import get_vssd_class, default_vssd_rasd_str + +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +test_dom = 'rstest_disk_domain' + +def make_long_disk_path(ip): + path = os.path.join(_image_dir, 'cimtest_large_image') + + cmd = "dd if=/dev/zero of=%s bs=1M count=1 seek=8192" % path + + rc, out = run_remote(ip, cmd) + if rc != 0: + logger.error("Unable to create large disk image") + logger.error(out) + return None + + return path + +def get_vssd_rasd(ip, virt, addr): + class_vssd = get_vssd_class(virt) + vssd = class_vssd(test_dom, virt) + + vssd, rasd = default_vssd_rasd_str( + dom_name=test_dom, virt=virt) + + rasds = get_default_rasds(ip, virt) + + for i in range(0, len(rasds)): + if rasds[i]['PoolID'].find('DiskPool') >= 0: + rasds[i]['Address'] = addr + rasds[i] = inst_to_mof(rasds[i]) + + params = { 'vssd' : vssd, + 'rasd' : rasds + } + + return params + + at do_main(sup_types) +def main(): + options = main.options + + try: + addr = make_long_disk_path(options.ip) + if addr is None: + raise Exception("Unable to create large disk image") + + define_params = get_vssd_rasd(options.ip, options.virt, addr) + if len(define_params) != 2: + raise Exception("Unable to get VSSD and RASDs for %s" % test_dom) + + status = create_using_definesystem(test_dom, options.ip, + params=define_params, ref_config="", + virt=options.virt) + if status != PASS: + raise Exception("Unable to define %s" % test_dom) + + except Exception, details: + logger.error(details) + status = FAIL + + if os.path.exists(addr): + os.remove(addr) + + destroy_and_undefine_domain(test_dom, options.ip, options.virt) + + return status + +if __name__ == "__main__": + sys.exit(main()) + From veillard at redhat.com Thu Oct 9 16:00:22 2008 From: veillard at redhat.com (Daniel Veillard) Date: Thu, 9 Oct 2008 18:00:22 +0200 Subject: [Libvirt-cim] Libvirt.org will be down in an hour till tomorrow morning Message-ID: <20081009160022.GC2064@redhat.com> There is major electric change at the hosting place for libvirt.org and the server will need to be shutdown for the night (french time, i.e. beginning of the afternoon US EST time). Hopefully the services will be restarted tomorrow morning, sorry for the disruption and the late announcement, I just learned about it... Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From yunguol at cn.ibm.com Fri Oct 10 01:41:47 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 10 Oct 2008 09:41:47 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed In-Reply-To: <48EE1FFE.1040100@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-09 23:15:10: > > +bug = "00007" > > +expr_values = { > > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > + "desc" : "No such instance (CreationClassName)"}, > > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > + "desc" : "No such instance (Name)"} > > + } > > Can you align the lines so that the colons line up. Like: Sure. I will rewrite it. > > "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > "desc" : "No such instance (CreationClassName)"}, > > Also, remove the \ at the end of these lines above. > > > + ret = try_assoc(conn, classname, assoc_classname, keys, \ > > Remove \ at the end of the line. > > > + ret = try_assoc(conn, classname, assoc_classname, keys, \ > > Same here - remove the \ at the end of the line. > Would you please tell me when I have to add \ at the end of line? And when it doesn't need. 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 fujimura.toshifumi at np.css.fujitsu.com Fri Oct 10 01:53:49 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Fri, 10 Oct 2008 10:53:49 +0900 Subject: [Libvirt-cim] Ttouble in cimtest setup Message-ID: <48EEB5AD.20209@np.css.fujitsu.com> Hello. I try to do cimtest setup instructions (http://wiki.libvirt.org/page/Cimtest_setup) on Fedora10-beta. But I met a trouble in the cimtest automation step with following messages ================================================ ERROR - Disk pool with name 'cimtest-diskpool' already exists Unable to create disk pool cimtest-diskpool Please check your environment. ================================================ Would you give me a suggestion? Thanks. Toshoifumi Fujimura. From yunguol at cn.ibm.com Fri Oct 10 01:54:27 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 10 Oct 2008 09:54:27 +0800 Subject: [Libvirt-cim] Ttouble in cimtest setup In-Reply-To: <48EEB5AD.20209@np.css.fujitsu.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-10 09:53:49: > Hello. > > I try to do cimtest setup instructions > (http://wiki.libvirt.org/page/Cimtest_setup) on Fedora10-beta. > But I met a trouble in the cimtest automation step with following messages > ================================================ > ERROR - Disk pool with name 'cimtest-diskpool' already exists > > Unable to create disk pool cimtest-diskpool > Please check your environment. > ================================================ > Would you give me a suggestion? You can restart libvirt and test again, if it doesn't work yet, please destroy the exist disk pool as follows: #virsh -c xen:/// (or virsh -c qemu:///system), which depends on your hypervisor. #pool-destroy cimtest-diskpool Thanks! > > Thanks. > Toshoifumi Fujimura. > > _______________________________________________ > 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 fujimura.toshifumi at np.css.fujitsu.com Fri Oct 10 04:17:33 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Fri, 10 Oct 2008 13:17:33 +0900 Subject: [Libvirt-cim] Ttouble in cimtest setup In-Reply-To: References: Message-ID: <48EED75D.9040001@np.css.fujitsu.com> Thanks to your reply. After investigating this problem, it turned out to be a SSH auth problem. Not diskpool problem. The command "virsh -c qemu:///system disk-pool --all" says Warning message because "id_rsa" does not exist It seems that I need to generate rsa key in addition to generate dsa key. So it needs to add RSA key generation to the instruction "http://wiki.libvirt.org/page/Cimtest_setup". Thanks Toshifumi Fujimura. > > libvirt-cim-bounces at redhat.com wrote on 2008-10-10 09:53:49: > > > Hello. > > > > I try to do cimtest setup instructions > > (http://wiki.libvirt.org/page/Cimtest_setup) on Fedora10-beta. > > But I met a trouble in the cimtest automation step with following > messages > > ================================================ > > ERROR - Disk pool with name 'cimtest-diskpool' already exists > > > > Unable to create disk pool cimtest-diskpool > > Please check your environment. > > ================================================ > > Would you give me a suggestion? > > You can restart libvirt and test again, if it doesn't work yet, please > destroy the exist disk pool as follows: > > #virsh -c xen:/// (or virsh -c qemu:///system), which depends on > your hypervisor. > #pool-destroy cimtest-diskpool > > Thanks! > > > > > Thanks. > > Toshoifumi Fujimura. > > > > _______________________________________________ > > 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 From deeptik at linux.vnet.ibm.com Fri Oct 10 06:11:37 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 10 Oct 2008 11:41:37 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed In-Reply-To: References: Message-ID: <48EEF219.2070803@linux.vnet.ibm.com> An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Fri Oct 10 08:03:42 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 10 Oct 2008 16:03:42 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider installed In-Reply-To: <48EEF219.2070803@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-10 14:11:37: > > > Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-10-09 23:15:10: > > > > +bug = "00007" > > > +expr_values = { > > > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > > + "desc" : "No such instance (CreationClassName)"}, > > > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > > + "desc" : "No such instance (Name)"} > > > + } > > > > Can you align the lines so that the colons line up. Like: > > Sure. I will rewrite it. > > > > "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, \ > > "desc" : "No such instance (CreationClassName)"}, > > > > Also, remove the \ at the end of these lines above. > > > > > + ret = try_assoc(conn, classname, assoc_classname, keys, \ > > > > Remove \ at the end of the line. > > > > > + ret = try_assoc(conn, classname, assoc_classname, keys, \ > > > > Same here - remove the \ at the end of the line. > > > Would you please tell me when I have to add \ at the end of line? > And when it doesn't > need. > > It would be easy to tell you where we need not have to add a \ than > where to add it :). > We dont have to add a \ after a comma in case of functions or in > case of lists or dictionary above. > for ex in case of the above try_assoc() we do not need a \ after the > keys param. > We need to add a \ at the end of the line only in case we cannot > complete the statement within 80 columns. > > For ex: > logger.error("HostedService associator should NOT return excepted > result with a wrong key name and value of %s input" % k) > > The above log stmt would not fit in the 80 columns in a single line > and hence we would require the stmt to be continued on the next > line, we can do it using the \ as below: > > logger.error("HostedService associator should NOT return excepted > result with \ > a wrong key name and value of %s input" % k) > > But in case you do not want to use the \ you can write the above in > the following way > > logger.error("HostedService associator should NOT return excepted > result with " > "a wrong key name and value of %s input" % k) > > The same thing applies if the element of the list does not > accommodate in a single line within 80 columns. > > For ex: > > expr_values = { "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, > "desc": "No such instance "\ > (CreationClassName)"}} > > For ex above we do not need a \ after the value pywbem. > CIM_ERR_NOT_FOUND of rc key in the list. But we would require a \ to > complete the value "No such instance (CreationClassName)" > of the key desc above. > Again, as in the logger stmt we can write the above without the \ as follows: > > expr_values = { "invalid_ccname" : { "rc" : pywbem.CIM_ERR_NOT_FOUND, > "desc" : "No such instance " > "(CreationClassName)"}} > > The rule of using \ applies almost like in the C language, for ex in > the pre processor stmts we make use of the \ if we are not able to > complete the stmt in a single line. > But we dont use it in case of function parameters distributed over 2 > different lines. > > Hope this helps. Deepti, I'm much grateful of your explanation. It's really helpful to me. Thanks! > > Thanks and Regards, > Deepti. > > 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 > > > _______________________________________________ > 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 yunguol at cn.ibm.com Fri Oct 10 09:01:18 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Fri, 10 Oct 2008 02:01:18 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider Message-ID: # HG changeset patch # User Guolian Yun # Date 1223629268 25200 # Node ID f34ca6c26d7a0ffc457b256a8ba839d35bf141e8 # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 [TEST] #3 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider Line up the colons and remove slash Signed-off-by: Guolian Yun diff -r 285bc0174fb3 -r f34ca6c26d7a suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Wed Oct 08 03:03:37 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri Oct 10 02:01:08 2008 -0700 @@ -25,48 +25,57 @@ import pywbem import pywbem from XenKvmLib import assoc from XenKvmLib import enumclass +from XenKvmLib.common_util import get_host_info from XenKvmLib.common_util import try_assoc from CimTest import Globals from CimTest.Globals import logger -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.const import do_main from XenKvmLib.classes import get_typed_class -expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \ - "desc" : "No such instance" - } +bug = "00007" +expr_values = { + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, + "desc" : "No such instance (CreationClassName)"}, + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, + "desc" : "No such instance (Name)"} + } sup_types=['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) def main(): options = main.options - status = PASS keys = ['Name', 'CreationClassName'] - try: - 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) + status, host_sys, host_cn = get_host_info(options.ip, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") return FAIL conn = assoc.myWBEMConnection('http://%s' % options.ip, (Globals.CIM_USER, Globals.CIM_PASS), Globals.CIM_NS) - classname = host_sys.CreationClassName + classname = host_cn assoc_classname = get_typed_class(options.virt, "HostedResourcePool") + keys = {"Name" : host_sys, "CreationClassName" : "wrong"} + ret = try_assoc(conn, classname, assoc_classname, keys, + "Name", expr_values['invalid_ccname'], bug_no="") + if ret != PASS: + if host_cn == 'Linux_ComputerSystem': + return XFAIL_RC(bug) + else: + logger.error("------ FAILED: Invalid CreationClassName Key Value.------") + return FAIL - keys = {"Name" : "wrong", "CreationClassName" : host_sys.CreationClassName} - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") + keys = {"Name" : "wrong", "CreationClassName" : host_cn} + ret = try_assoc(conn, classname, assoc_classname, keys, + "CreationClassName", expr_values['invalid_name'], bug_no="") if ret != PASS: - logger.error("------ FAILED: Invalid Name Key Name.------") - status = ret + if host_cn == 'Linux_ComputerSystem': + return XFAIL_RC(bug) + else: + logger.error("------ FAILED: Invalid Name Key Value.------") + return FAIL - keys = {"Wrong" : host_sys.Name, "CreationClassName" : host_sys.CreationClassName} - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") - if ret != PASS: - logger.error("------ FAILED: Invalid Name Key Value.------") - status = ret - - return status + return PASS if __name__ == "__main__": sys.exit(main()) From yunguol at cn.ibm.com Fri Oct 10 10:08:20 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Fri, 10 Oct 2008 03:08:20 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix a false positive in HostedResourcePool/01_forward.py Message-ID: <387761e3c93111fd1b73.1223633300@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223633292 25200 # Node ID 387761e3c93111fd1b73c0becda45ff1c261ce3a # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 [TEST] #3 Fix a false positive in HostedResourcePool/01_forward.py Signed-off-by: Guolian Yun diff -r 285bc0174fb3 -r 387761e3c931 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 03:03:37 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Oct 10 03:08:12 2008 -0700 @@ -39,7 +39,6 @@ sup_types = ['Xen', 'KVM', 'XenFV', 'LXC @do_main(sup_types) def main(): options = main.options - status = FAIL keys = ['Name', 'CreationClassName'] status, host_sys, host_cn = get_host_info(options.ip, options.virt) @@ -68,20 +67,30 @@ def main(): logger.error("No pool returned") return FAIL - for items in pool: - cname = items.classname - if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": - 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" % default_pool_name: - status = PASS + try: + for items in pool: + cname = items.classname + if cname.find("MemoryPool") >=0 and items['InstanceID'] != \ + "MemoryPool/0": + raise Exception("%s does not match MemoryPool/0", + items['InstanceID']) + elif cname.find("ProcessorPool") >=0 and items['InstanceID'] != \ + "ProcessorPool/0": + raise Exception("%s does not match ProcessorPool/0", + items['InstanceID']) + elif cname.find("NetworkPool") >=0 and items['InstanceID'] != \ + "NetworkPool/%s" %default_network_name: + raise Exception("%s does not match NetworkPool/%s", + items['InstanceID'], default_network_name) + elif cname.find("DiskPool") >=0 and items['InstanceID'] != \ + "DiskPool/%s" % default_pool_name: + raise Exception("%s does not match DiskPool/%s", + items['InstanceID'], default_pool_name) + except Exception, details: + logger.error(details) + return FAIL - return status + return PASS if __name__ == "__main__": sys.exit(main()) From yunguol at cn.ibm.com Fri Oct 10 09:53:30 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 10 Oct 2008 17:53:30 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix a false positive in HostedResourcePool/01_forward.py In-Reply-To: <387761e3c93111fd1b73.1223633300@elm3b217.beaverton.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-10 18:08:20: > # HG changeset patch > # User Guolian Yun > # Date 1223633292 25200 > # Node ID 387761e3c93111fd1b73c0becda45ff1c261ce3a > # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 > [TEST] #3 Fix a false positive in HostedResourcePool/01_forward.py > > Signed-off-by: Guolian Yun > > diff -r 285bc0174fb3 -r 387761e3c931 suites/libvirt- > cim/cimtest/HostedResourcePool/01_forward.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py > Wed Oct 08 03:03:37 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py > Fri Oct 10 03:08:12 2008 -0700 > @@ -39,7 +39,6 @@ sup_types = ['Xen', 'KVM', 'XenFV', 'LXC > @do_main(sup_types) > def main(): > options = main.options > - status = FAIL > > keys = ['Name', 'CreationClassName'] > status, host_sys, host_cn = get_host_info(options.ip, options.virt) > @@ -68,20 +67,30 @@ def main(): > logger.error("No pool returned") > return FAIL > > - for items in pool: > - cname = items.classname > - if cname.find("MemoryPool") >=0 and items['InstanceID'] == > "MemoryPool/0": > - 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" % default_pool_name: > - status = PASS > + try: > + for items in pool: > + cname = items.classname > + if cname.find("MemoryPool") >=0 and items['InstanceID'] != \ Is it necessary slash \ here, it will report syntax error if I remove it. > + "MemoryPool/0": > + raise Exception("%s does not match MemoryPool/0", > + items['InstanceID']) > + elif cname.find("ProcessorPool") >=0 and items['InstanceID'] != \ > + "ProcessorPool/0": > + raise Exception("%s does not match ProcessorPool/0", > + items['InstanceID']) > + elif cname.find("NetworkPool") >=0 and items['InstanceID'] != \ > + "NetworkPool/%s" %default_network_name: > + raise Exception("%s does not match NetworkPool/%s", > + items['InstanceID'], default_network_name) > + elif cname.find("DiskPool") >=0 and items['InstanceID'] != \ > + "DiskPool/%s" % default_pool_name: > + raise Exception("%s does not match DiskPool/%s", > + items['InstanceID'], default_pool_name) > + except Exception, details: > + logger.error(details) > + return FAIL > > > - return status > + return PASS > 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 Fri Oct 10 10:45:55 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 10 Oct 2008 16:15:55 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix a false positive in HostedResourcePool/01_forward.py In-Reply-To: References: Message-ID: <48EF3263.6030803@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-10-10 18:08:20: > > > # HG changeset patch > > # User Guolian Yun > > # Date 1223633292 25200 > > # Node ID 387761e3c93111fd1b73c0becda45ff1c261ce3a > > # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 > > [TEST] #3 Fix a false positive in HostedResourcePool/01_forward.py > > > > Signed-off-by: Guolian Yun > > > > diff -r 285bc0174fb3 -r 387761e3c931 suites/libvirt- > > cim/cimtest/HostedResourcePool/01_forward.py > > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py > > Wed Oct 08 03:03:37 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py > > Fri Oct 10 03:08:12 2008 -0700 > > @@ -39,7 +39,6 @@ sup_types = ['Xen', 'KVM', 'XenFV', 'LXC > > @do_main(sup_types) > > def main(): > > options = main.options > > - status = FAIL > > > > keys = ['Name', 'CreationClassName'] > > status, host_sys, host_cn = get_host_info(options.ip, options.virt) > > @@ -68,20 +67,30 @@ def main(): > > logger.error("No pool returned") > > return FAIL > > > > - for items in pool: > > - cname = items.classname > > - if cname.find("MemoryPool") >=0 and items['InstanceID'] == > > "MemoryPool/0": > > - 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" % default_pool_name: > > - status = PASS > > + try: > > + for items in pool: > > + cname = items.classname > > + if cname.find("MemoryPool") >=0 and items['InstanceID'] > != \ > > Is it necessary slash \ here, it will report syntax error if I > remove it. Yes the \ is necessary here as we logical comparision cannot be completed in the single line. > > > + "MemoryPool/0": > > + raise Exception("%s does not match MemoryPool/0", > > + items['InstanceID']) > > + elif cname.find("ProcessorPool") >=0 and > items['InstanceID'] != \ > > + "ProcessorPool/0": > > + raise Exception("%s does not match ProcessorPool/0", > > + items['InstanceID']) > > + elif cname.find("NetworkPool") >=0 and > items['InstanceID'] != \ > > + "NetworkPool/%s" %default_network_name: > > + raise Exception("%s does not match NetworkPool/%s", > > + items['InstanceID'], default_network_name) > > + elif cname.find("DiskPool") >=0 and items['InstanceID'] > != \ > > + "DiskPool/%s" % default_pool_name: > > + raise Exception("%s does not match DiskPool/%s", > > + items['InstanceID'], default_pool_name) > > + except Exception, details: > > + logger.error(details) > > + return FAIL > > > > > > - return status > > + return PASS > > if __name__ == "__main__": > > sys.exit(main()) > > > > _______________________________________________ > > 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 From deeptik at linux.vnet.ibm.com Fri Oct 10 10:48:34 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 10 Oct 2008 16:18:34 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider In-Reply-To: References: Message-ID: <48EF3302.3020700@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223629268 25200 > # Node ID f34ca6c26d7a0ffc457b256a8ba839d35bf141e8 > # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 > [TEST] #3 Fix HostedResourcePool/03_forward_errs.py to work with sblim cmpi base provider > > Line up the colons and remove slash > > Signed-off-by: Guolian Yun > > diff -r 285bc0174fb3 -r f34ca6c26d7a suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Wed Oct 08 03:03:37 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/03_forward_errs.py Fri Oct 10 02:01:08 2008 -0700 > @@ -25,48 +25,57 @@ import pywbem > import pywbem > from XenKvmLib import assoc > from XenKvmLib import enumclass > +from XenKvmLib.common_util import get_host_info > from XenKvmLib.common_util import try_assoc > from CimTest import Globals > from CimTest.Globals import logger > -from CimTest.ReturnCodes import PASS, FAIL > +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.const import do_main > from XenKvmLib.classes import get_typed_class > > -expr_values = { "rc" : pywbem.CIM_ERR_NOT_FOUND, \ > - "desc" : "No such instance" > - } > +bug = "00007" > +expr_values = { > + "invalid_ccname" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, > + "desc" : "No such instance (CreationClassName)"}, > + "invalid_name" : {"rc" : pywbem.CIM_ERR_NOT_FOUND, > + "desc" : "No such instance (Name)"} > + } > > sup_types=['Xen', 'KVM', 'XenFV', 'LXC'] > @do_main(sup_types) > def main(): > options = main.options > - status = PASS > keys = ['Name', 'CreationClassName'] > - try: > - 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) > + status, host_sys, host_cn = get_host_info(options.ip, options.virt) > + if status != PASS: > + logger.error("Error in calling get_host_info function") > return FAIL > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > (Globals.CIM_USER, Globals.CIM_PASS), > Globals.CIM_NS) > - classname = host_sys.CreationClassName > + classname = host_cn > assoc_classname = get_typed_class(options.virt, "HostedResourcePool") > + keys = {"Name" : host_sys, "CreationClassName" : "wrong"} > + ret = try_assoc(conn, classname, assoc_classname, keys, > + "Name", expr_values['invalid_ccname'], bug_no="") > + if ret != PASS: > + if host_cn == 'Linux_ComputerSystem': > + return XFAIL_RC(bug) > + else: > + logger.error("------ FAILED: Invalid CreationClassName Key Value.------") > + return FAIL > > - keys = {"Name" : "wrong", "CreationClassName" : host_sys.CreationClassName} > - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") > + keys = {"Name" : "wrong", "CreationClassName" : host_cn} > + ret = try_assoc(conn, classname, assoc_classname, keys, > + "CreationClassName", expr_values['invalid_name'], bug_no="") > if ret != PASS: > - logger.error("------ FAILED: Invalid Name Key Name.------") > - status = ret > + if host_cn == 'Linux_ComputerSystem': > + return XFAIL_RC(bug) > + else: > + logger.error("------ FAILED: Invalid Name Key Value.------") > + return FAIL > > - keys = {"Wrong" : host_sys.Name, "CreationClassName" : host_sys.CreationClassName} > - ret = try_assoc(conn, classname, assoc_classname, keys, "Name", expr_values, bug_no="") > - if ret != PASS: > - logger.error("------ FAILED: Invalid Name Key Value.------") > - status = ret > - > - return status > + return PASS > if __name__ == "__main__": > sys.exit(main()) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Fri Oct 10 10:51:06 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 10 Oct 2008 16:21:06 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix a false positive in HostedResourcePool/01_forward.py In-Reply-To: <387761e3c93111fd1b73.1223633300@elm3b217.beaverton.ibm.com> References: <387761e3c93111fd1b73.1223633300@elm3b217.beaverton.ibm.com> Message-ID: <48EF339A.3010001@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223633292 25200 > # Node ID 387761e3c93111fd1b73c0becda45ff1c261ce3a > # Parent 285bc0174fb36512228e1cfcaba2186a0aa112c5 > [TEST] #3 Fix a false positive in HostedResourcePool/01_forward.py > > Signed-off-by: Guolian Yun > > diff -r 285bc0174fb3 -r 387761e3c931 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py > --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 08 03:03:37 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Oct 10 03:08:12 2008 -0700 > @@ -39,7 +39,6 @@ sup_types = ['Xen', 'KVM', 'XenFV', 'LXC > @do_main(sup_types) > def main(): > options = main.options > - status = FAIL > > keys = ['Name', 'CreationClassName'] > status, host_sys, host_cn = get_host_info(options.ip, options.virt) > @@ -68,20 +67,30 @@ def main(): > logger.error("No pool returned") > return FAIL > > - for items in pool: > - cname = items.classname > - if cname.find("MemoryPool") >=0 and items['InstanceID'] == "MemoryPool/0": > - 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" % default_pool_name: > - status = PASS > + try: > + for items in pool: > + cname = items.classname > + if cname.find("MemoryPool") >=0 and items['InstanceID'] != \ > + "MemoryPool/0": > + raise Exception("%s does not match MemoryPool/0", > + items['InstanceID']) > + elif cname.find("ProcessorPool") >=0 and items['InstanceID'] != \ > + "ProcessorPool/0": > + raise Exception("%s does not match ProcessorPool/0", > + items['InstanceID']) > + elif cname.find("NetworkPool") >=0 and items['InstanceID'] != \ > + "NetworkPool/%s" %default_network_name: > + raise Exception("%s does not match NetworkPool/%s", > + items['InstanceID'], default_network_name) > + elif cname.find("DiskPool") >=0 and items['InstanceID'] != \ > + "DiskPool/%s" % default_pool_name: > + raise Exception("%s does not match DiskPool/%s", > + items['InstanceID'], default_pool_name) > + except Exception, details: > + logger.error(details) > + return FAIL > > > - return status > + return PASS > if __name__ == "__main__": > sys.exit(main()) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From kaitlin at linux.vnet.ibm.com Fri Oct 10 15:59:24 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 10 Oct 2008 08:59:24 -0700 Subject: [Libvirt-cim] Ttouble in cimtest setup In-Reply-To: <48EED75D.9040001@np.css.fujitsu.com> References: <48EED75D.9040001@np.css.fujitsu.com> Message-ID: <48EF7BDC.8080003@linux.vnet.ibm.com> Hi there =) > > After investigating this problem, it turned out to be a SSH auth problem. > > Not diskpool problem. > The command "virsh -c qemu:///system disk-pool --all" says Warning message > because "id_rsa" does not exist This might be a typo, but the proper virsh command is: virsh -c qemu:///system pool-list --all What warning message do you see? > > It seems that I need to generate rsa key in addition to generate dsa key. > So it needs to add RSA key generation to the instruction > "http://wiki.libvirt.org/page/Cimtest_setup". I've updated the cimtest wiki page to include some clarification with the key setup. Let us know if this doesn't solve the issue you're seeing. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 10 20:30:14 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 10 Oct 2008 13:30:14 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] Add VSMS 15_mod_system_settings.py In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1223669037 25200 # Node ID caea4cf97fcb3b095761496bc8d76502fd0039af # Parent 3e4bbcff3c709620d9d86860b417be4a9b563842 [TEST] Add VSMS 15_mod_system_settings.py This test verifies the ModifySystemSettings() call. Signed-off-by: Kaitlin Rupert diff -r 3e4bbcff3c70 -r caea4cf97fcb suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py Fri Oct 10 13:03:57 2008 -0700 @@ -0,0 +1,133 @@ +#!/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 import vsms +from XenKvmLib import vxml +from CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.const import do_main, default_network_name +from XenKvmLib.classes import get_typed_class, inst_to_mof +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.common_util import poll_for_state_change + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] +default_dom = 'rstest_domain' +cpu = 2 +RECOVERY_VAL = 3 +DEFINED_STATE = 3 + +def cleanup_env(ip, virt, cxml): + cxml.cim_destroy(ip) + cxml.undefine(ip) + +def get_vssd(ip, virt, get_cim_inst): + cn = get_typed_class(virt, "VirtualSystemSettingData") + inst = None + + try: + if virt == "XenFV": + virt = "Xen" + + key_list = {"InstanceID" : "%s:%s" % (virt, default_dom) } + inst = GetInstance(ip, cn, key_list, get_cim_inst) + + except Exception, details: + logger.error(details) + return FAIL, inst + + if inst is None: + return FAIL, inst + + return PASS, inst + + at do_main(sup_types) +def main(): + options = main.options + + test_cases = ["define", "start"] + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) + service = vsms.get_vsms_class(options.virt)(options.ip) + + for case in test_cases: + #Each time through, define guest using a default XML + cxml.undefine(options.ip) + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + 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 %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + status, inst = get_vssd(options.ip, options.virt, True) + if status != PASS: + logger.error("Failed to get the VSSD instance for %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + inst['AutomaticRecoveryAction'] = pywbem.cim_types.Uint16(RECOVERY_VAL) + vssd = inst_to_mof(inst) + + ret = service.ModifySystemSettings(SystemSettings=vssd) + if ret[0] != 0: + logger.error("Failed to modify dom: %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + if case == "start": + #This should be replaced with a RSC to shutdownt he guest + cxml.destroy(options.ip) + status, cs = poll_for_state_change(options.ip, options.virt, + default_dom, DEFINED_STATE) + if status != PASS: + logger.error("Failed to destroy %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + status, inst = get_vssd(options.ip, options.virt, False) + if status != PASS: + logger.error("Failed to get the VSSD instance for %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + if inst.AutomaticRecoveryAction != RECOVERY_VAL: + logger.error("%s not updated properly.", default_dom) + logger.error("Exp AutomaticRecoveryAction=%d, got %d", RECOVERY_VAL, + inst.AutomaticRecoveryAction) + #cleanup_env(options.ip, options.virt, cxml) + return FAIL + + cleanup_env(options.ip, options.virt, cxml) + + return PASS + +if __name__ == "__main__": + sys.exit(main()) + From kaitlin at linux.vnet.ibm.com Fri Oct 10 20:30:12 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 10 Oct 2008 13:30:12 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] Fix cim_define() for LXC In-Reply-To: Message-ID: <419ea0c270bf4be5be59.1223670612@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223669821 25200 # Node ID 419ea0c270bf4be5be590e68edc96f0311df7d03 # Parent 1b152e5e9a47ec932b5c18bb26f226d5896b5432 [TEST] Fix cim_define() for LXC LXC guests only support Memory and Disk RASDS currently. Signed-off-by: Kaitlin Rupert diff -r 1b152e5e9a47 -r 419ea0c270bf suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Oct 09 08:54:35 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Oct 10 13:17:01 2008 -0700 @@ -482,7 +482,7 @@ service = vsms.get_vsms_class(self.virt)(ip) sys_settings = str(self.vssd) if self.virt == 'LXC' and const.LXC_netns_support is False: - res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] + res_settings = [str(self.dasd), str(self.masd)] else: res_settings = [str(self.dasd), str(self.nasd), str(self.pasd), str(self.masd)] From kaitlin at linux.vnet.ibm.com Fri Oct 10 20:30:11 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 10 Oct 2008 13:30:11 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] [TEST] Add a test to verify ModifySystemSettings() Message-ID: From kaitlin at linux.vnet.ibm.com Fri Oct 10 20:30:13 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 10 Oct 2008 13:30:13 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] Update inst_to_mof() to convert CIM_CimtestClass instances to inst In-Reply-To: Message-ID: <3e4bbcff3c709620d9d8.1223670613@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223669037 25200 # Node ID 3e4bbcff3c709620d9d86860b417be4a9b563842 # Parent 419ea0c270bf4be5be590e68edc96f0311df7d03 [TEST] Update inst_to_mof() to convert CIM_CimtestClass instances to inst Also update GetInstance so it returns both CIMInstance and CIM_CimtestClass objects. Signed-off-by: Kaitlin Rupert diff -r 419ea0c270bf -r 3e4bbcff3c70 suites/libvirt-cim/lib/XenKvmLib/classes.py --- a/suites/libvirt-cim/lib/XenKvmLib/classes.py Fri Oct 10 13:17:01 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py Fri Oct 10 13:03:57 2008 -0700 @@ -18,6 +18,7 @@ # 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 virt_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -47,6 +48,9 @@ #FIXME This function is only needed for libcmpiutil versions 0.4 and later. #Once version 0.4 is obsolete, this function should be removed. def inst_to_mof(inst): + if not isinstance(inst, pywbem.cim_obj.CIMInstance): + inst = inst.inst + mof_str = inst.tomof() mof_inst = "" diff -r 419ea0c270bf -r 3e4bbcff3c70 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Oct 10 13:17:01 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Oct 10 13:03:57 2008 -0700 @@ -495,7 +495,7 @@ return list -def GetInstance(host, cn, keys): +def GetInstance(host, cn, keys, ret_cim_inst=False): '''Resolve the enumeration given the @cn. Return a list of CIMInstance objects.''' @@ -504,6 +504,9 @@ try: inst = CIM_CimtestClass(host, ref) + + if ret_cim_inst: + inst = inst.inst except pywbem.CIMError, arg: print arg[1] From kaitlin at linux.vnet.ibm.com Fri Oct 10 20:31:55 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 10 Oct 2008 13:31:55 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] [TEST] Add a test to verify ModifySystemSettings() In-Reply-To: References: Message-ID: <48EFBBBB.7020409@linux.vnet.ibm.com> This test currently fails on LXC - will send a separate patch to fix that issue. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 10 20:30:14 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 10 Oct 2008 13:30:14 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] Add VSMS 15_mod_system_settings.py In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1223669037 25200 # Node ID caea4cf97fcb3b095761496bc8d76502fd0039af # Parent 3e4bbcff3c709620d9d86860b417be4a9b563842 [TEST] Add VSMS 15_mod_system_settings.py This test verifies the ModifySystemSettings() call. Signed-off-by: Kaitlin Rupert diff -r 3e4bbcff3c70 -r caea4cf97fcb suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py Fri Oct 10 13:03:57 2008 -0700 @@ -0,0 +1,133 @@ +#!/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 import vsms +from XenKvmLib import vxml +from CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.const import do_main, default_network_name +from XenKvmLib.classes import get_typed_class, inst_to_mof +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.common_util import poll_for_state_change + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] +default_dom = 'rstest_domain' +cpu = 2 +RECOVERY_VAL = 3 +DEFINED_STATE = 3 + +def cleanup_env(ip, virt, cxml): + cxml.cim_destroy(ip) + cxml.undefine(ip) + +def get_vssd(ip, virt, get_cim_inst): + cn = get_typed_class(virt, "VirtualSystemSettingData") + inst = None + + try: + if virt == "XenFV": + virt = "Xen" + + key_list = {"InstanceID" : "%s:%s" % (virt, default_dom) } + inst = GetInstance(ip, cn, key_list, get_cim_inst) + + except Exception, details: + logger.error(details) + return FAIL, inst + + if inst is None: + return FAIL, inst + + return PASS, inst + + at do_main(sup_types) +def main(): + options = main.options + + test_cases = ["define", "start"] + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) + service = vsms.get_vsms_class(options.virt)(options.ip) + + for case in test_cases: + #Each time through, define guest using a default XML + cxml.undefine(options.ip) + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + 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 %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + status, inst = get_vssd(options.ip, options.virt, True) + if status != PASS: + logger.error("Failed to get the VSSD instance for %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + inst['AutomaticRecoveryAction'] = pywbem.cim_types.Uint16(RECOVERY_VAL) + vssd = inst_to_mof(inst) + + ret = service.ModifySystemSettings(SystemSettings=vssd) + if ret[0] != 0: + logger.error("Failed to modify dom: %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + if case == "start": + #This should be replaced with a RSC to shutdownt he guest + cxml.destroy(options.ip) + status, cs = poll_for_state_change(options.ip, options.virt, + default_dom, DEFINED_STATE) + if status != PASS: + logger.error("Failed to destroy %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + status, inst = get_vssd(options.ip, options.virt, False) + if status != PASS: + logger.error("Failed to get the VSSD instance for %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + if inst.AutomaticRecoveryAction != RECOVERY_VAL: + logger.error("%s not updated properly.", default_dom) + logger.error("Exp AutomaticRecoveryAction=%d, got %d", RECOVERY_VAL, + inst.AutomaticRecoveryAction) + #cleanup_env(options.ip, options.virt, cxml) + return FAIL + + cleanup_env(options.ip, options.virt, cxml) + + return PASS + +if __name__ == "__main__": + sys.exit(main()) + From yunguol at cn.ibm.com Mon Oct 13 02:08:49 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 13 Oct 2008 10:08:49 +0800 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] Add VSMS 15_mod_system_settings.py In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-11 04:30:14: > # HG changeset patch > # User Kaitlin Rupert > # Date 1223669037 25200 > # Node ID caea4cf97fcb3b095761496bc8d76502fd0039af > # Parent 3e4bbcff3c709620d9d86860b417be4a9b563842 > [TEST] Add VSMS 15_mod_system_settings.py > > This test verifies the ModifySystemSettings() call. > > Signed-off-by: Kaitlin Rupert > > diff -r 3e4bbcff3c70 -r caea4cf97fcb suites/libvirt- > cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py > Fri Oct 10 13:03:57 2008 -0700 > @@ -0,0 +1,133 @@ > +#!/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 import vsms > +from XenKvmLib import vxml > +from CimTest.Globals import logger > +from CimTest.ReturnCodes import PASS, FAIL > +from XenKvmLib.const import do_main, default_network_name > +from XenKvmLib.classes import get_typed_class, inst_to_mof > +from XenKvmLib.enumclass import GetInstance > +from XenKvmLib.common_util import poll_for_state_change > + > +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > +default_dom = 'rstest_domain' > +cpu = 2 > +RECOVERY_VAL = 3 > +DEFINED_STATE = 3 > + > +def cleanup_env(ip, virt, cxml): > + cxml.cim_destroy(ip) > + cxml.undefine(ip) Can you remove 'virt' parameter here? It isn't used in cleanup_env() function. I'm not sure if you have any plans on it. Thanks! > + > +def get_vssd(ip, virt, get_cim_inst): > + cn = get_typed_class(virt, "VirtualSystemSettingData") > + inst = None > + > + try: > + if virt == "XenFV": > + virt = "Xen" > + > + key_list = {"InstanceID" : "%s:%s" % (virt, default_dom) } > + inst = GetInstance(ip, cn, key_list, get_cim_inst) > + > + except Exception, details: > + logger.error(details) > + return FAIL, inst > + > + if inst is None: > + return FAIL, inst > + > + return PASS, inst > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + test_cases = ["define", "start"] > + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) > + service = vsms.get_vsms_class(options.virt)(options.ip) > + > + for case in test_cases: > + #Each time through, define guest using a default XML > + cxml.undefine(options.ip) > + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to define the dom: %s", default_dom) > + 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 %s", default_dom) > + cleanup_env(options.ip, options.virt, cxml) > + return FAIL > + > + status, inst = get_vssd(options.ip, options.virt, True) > + if status != PASS: > + logger.error("Failed to get the VSSD instance for %s", > default_dom) > + cleanup_env(options.ip, options.virt, cxml) > + return FAIL > + > + inst['AutomaticRecoveryAction'] = pywbem.cim_types. > Uint16(RECOVERY_VAL) > + vssd = inst_to_mof(inst) > + > + ret = service.ModifySystemSettings(SystemSettings=vssd) > + if ret[0] != 0: > + logger.error("Failed to modify dom: %s", default_dom) > + cleanup_env(options.ip, options.virt, cxml) > + return FAIL > + > + if case == "start": > + #This should be replaced with a RSC to shutdownt he guest > + cxml.destroy(options.ip) > + status, cs = poll_for_state_change(options.ip, options.virt, > + default_dom, DEFINED_STATE) > + if status != PASS: > + logger.error("Failed to destroy %s", default_dom) > + cleanup_env(options.ip, options.virt, cxml) > + return FAIL > + > + status, inst = get_vssd(options.ip, options.virt, False) > + if status != PASS: > + logger.error("Failed to get the VSSD instance for %s", > default_dom) > + cleanup_env(options.ip, options.virt, cxml) > + return FAIL > + > + if inst.AutomaticRecoveryAction != RECOVERY_VAL: > + logger.error("%s not updated properly.", default_dom) > + logger.error("Exp AutomaticRecoveryAction=%d, got %d", > RECOVERY_VAL, > + inst.AutomaticRecoveryAction) > + #cleanup_env(options.ip, options.virt, cxml) > + return FAIL > + > + cleanup_env(options.ip, options.virt, cxml) > + > + return PASS > + > +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 Oct 13 02:29:09 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 13 Oct 2008 10:29:09 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 13 2008 Message-ID: ================================================= KVM on sfcb Test Run Summary for Oct 13 2008 ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 714 Libvirt-cim changeset: f7b995404a9c ================================================= FAIL : 11 XFAIL : 3 SKIP : 4 PASS : 117 ----------------- Total : 135 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.py: FAIL VirtualSystemManagementCapabilities - 01_enum.py: FAIL VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.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: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL SettingsDefineCapabilities - 03_forward_errs.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'Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): Domain Operation Failed Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Exception: (1, u'Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'test_domain' using RequestedStateChange() 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: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: FAIL ERROR - Exception: not enough arguments for format string Got indication: KVM_ComputerSystemCreatedIndication ERROR - Received indication error: 256 ERROR - Exception: not enough arguments for format string Got indication: KVM_ComputerSystemCreatedIndication ERROR - Received indication error: 256 -------------------------------------------------------------------- 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: XFAIL 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 -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: FAIL ERROR - 'KVM_VirtualSystemManagementCapabilities' returned '0' instance, excepted only 1 Provider not found or not loadable -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: FAIL ERROR - Unexpected rc code 5 and description Provider not found or not loadable ERROR - ------ FAILED: Invalid InstanceID Key Value.------ ERROR - Unexpected rc code 5 and description Provider not found or not loadable ERROR - ------ FAILED: Invalid InstanceID Key Name.------ -------------------------------------------------------------------- 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: FAIL ERROR - KVM_VirtualSystemMigrationCapabilities return 0 instances, excepted only 1 instance Provider not found or not loadable -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: FAIL ERROR - Unexpected rc code 5 and description Provider not found or not loadable ERROR - ------ FAILED: Invalid InstanceID Key Name.------ ERROR - Unexpected rc code 5 and description Provider not found or not loadable 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 - KVM_VirtualSystemMigrationSettingData return 0 instances, excepted only 1 instance Provider not found or not loadable -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: FAIL ERROR - Unexpected rc code 5 and description Provider not found or not loadable 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 - KVM_VirtualSystemSnapshotService return 0 instances, excepted only 1 instance Class not found Class not found Provider not found or not loadable -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL ERROR - Unexpected rc code 5 and description Provider not found or not loadable ERROR - ------ FAILED: to check INVALID_CCName_KeyName.------ Class not found Class not found -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: FAIL ERROR - KVM_VirtualSystemSnapshotServiceCapabilities return 0 instances, excepted only 1 instance Provider not found or not loadable -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: FAIL ERROR - Unexpected rc code 5 and description Provider not found or not loadable ERROR - ------ FAILED: to check INVALID_Instid_KeyName.------ -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Oct 13 02:36:57 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 13 Oct 2008 10:36:57 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 13 2008 In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-13 10:29:09: > > > ================================================= > KVM on sfcb Test Run Summary for Oct 13 2008 > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 714 > Libvirt-cim changeset: f7b995404a9c > ================================================= > FAIL : 11 > XFAIL : 3 > SKIP : 4 > PASS : 117 > ----------------- > Total : 135 > ================================================= > FAIL Test Summary: > ComputerSystemIndication - 01_created_indication.py: FAIL > VirtualSystemManagementCapabilities - 01_enum.py: FAIL > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.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 All the failure except ComputerSystemIndication due to providers failing to load. Kaitlin configures sfcb to allow up to 64 provide processes on test machine several days ago, and she fixed this issue. I will look into why these happen again. Thanks! > > ================================================= > XFAIL Test Summary: > ComputerSystem - 32_start_reboot.py: XFAIL > ComputerSystem - 33_suspend_reboot.py: XFAIL > SettingsDefineCapabilities - 03_forward_errs.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'Domain Operation Failed') > ERROR - Unable to 'Reboot' dom 'cs_test_domain' > using RequestedStateChange() > InvokeMethod(RequestStateChange): Domain Operation Failed > Bug:<00005> > -------------------------------------------------------------------- > ComputerSystem - 33_suspend_reboot.py: XFAIL > ERROR - Exception: (1, u'Domain Operation Failed') > ERROR - Unable to 'Reboot' dom 'test_domain' using > RequestedStateChange() > 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: PASS > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: FAIL > ERROR - Exception: not enough arguments for format string > Got indication: KVM_ComputerSystemCreatedIndication > ERROR - Received indication error: 256 > ERROR - Exception: not enough arguments for format string > Got indication: KVM_ComputerSystemCreatedIndication > ERROR - Received indication error: 256 > -------------------------------------------------------------------- > 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: XFAIL > 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 > -------------------------------------------------------------------- > VSSD - 04_vssd_to_rasd.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: FAIL > ERROR - 'KVM_VirtualSystemManagementCapabilities' > returned '0' instance, excepted only 1 > Provider not found or not loadable > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: FAIL > ERROR - Unexpected rc code 5 and description > Provider not found or not loadable > > ERROR - ------ FAILED: Invalid InstanceID Key Value.------ > ERROR - Unexpected rc code 5 and description > Provider not found or not loadable > > ERROR - ------ FAILED: Invalid InstanceID Key Name.------ > -------------------------------------------------------------------- > 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: FAIL > ERROR - KVM_VirtualSystemMigrationCapabilities > return 0 instances, excepted only 1 instance > Provider not found or not loadable > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: FAIL > ERROR - Unexpected rc code 5 and description > Provider not found or not loadable > > ERROR - ------ FAILED: Invalid InstanceID Key Name.------ > ERROR - Unexpected rc code 5 and description > Provider not found or not loadable > > 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 - KVM_VirtualSystemMigrationSettingData > return 0 instances, excepted only 1 instance > Provider not found or not loadable > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: FAIL > ERROR - Unexpected rc code 5 and description > Provider not found or not loadable > > 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 - KVM_VirtualSystemSnapshotService return 0 > instances, excepted only 1 instance > Class not found > Class not found > Provider not found or not loadable > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL > ERROR - Unexpected rc code 5 and description > Provider not found or not loadable > > ERROR - ------ FAILED: to check INVALID_CCName_KeyName.------ > Class not found > Class not found > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: FAIL > ERROR - > KVM_VirtualSystemSnapshotServiceCapabilities return 0 instances, > excepted only 1 instance > Provider not found or not loadable > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: FAIL > ERROR - Unexpected rc code 5 and description > Provider not found or not loadable > > 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 yunguol at cn.ibm.com Mon Oct 13 03:04:47 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 13 Oct 2008 11:04:47 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Oct 13 2008 Message-ID: ================================================= Xen on Pegasus Test Run Summary for Oct 13 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: 714 Libvirt-cim changeset: f7b995404a9c ================================================= FAIL : 0 XFAIL : 0 SKIP : 3 PASS : 132 ----------------- Total : 135 ================================================= 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: 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: 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: PASS -------------------------------------------------------------------- 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: 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 Mon Oct 13 07:59:04 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 00:59:04 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify EC 01_forward.py&02_reverse.py to use new EnumInstances call Message-ID: <4cfe13e4605c2252569a.1223884744@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223884738 25200 # Node ID 4cfe13e4605c2252569ac4d76d6453f586f273ce # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Modify EC 01_forward.py&02_reverse.py to use new EnumInstances call Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 4cfe13e4605c suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Mon Oct 13 00:58:58 2008 -0700 @@ -49,7 +49,7 @@ from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, CIM_ERROR_ENUMERATE from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.enumclass import enumerate +from XenKvmLib.enumclass import EnumInstances from XenKvmLib.const import default_network_name, default_pool_name @@ -139,8 +139,7 @@ profiles_instid_list = [] status = PASS try: - key_list = ["InstanceID"] - proflist = enumerate(server, reg_classname, key_list, virt) + proflist = EnumInstances(server, reg_classname) if len(proflist) < 7: logger.error("'%s' returned '%d' '%s' objects, expected atleast 7", reg_classname, len(proflist), 'Profile') diff -r c7eaf17bd591 -r 4cfe13e4605c suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Mon Oct 13 00:58:58 2008 -0700 @@ -43,7 +43,6 @@ from CimTest import Globals from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS from XenKvmLib.const import do_main -from XenKvmLib import enumclass from XenKvmLib import assoc from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.test_doms import destroy_and_undefine_all @@ -104,10 +103,10 @@ return FAIL inst_list.append(sys) - keys = ['Name', 'CreationClassName'] try: #Getting the hostname, to verify with the value returned by the assoc. - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) + hs = get_typed_class(options.virt, 'HostSystem') + host_sys = enumclass.EnumInstances(options.ip, hs) if len(host_sys) < 1: logger.error("ERROR: Enumerate returned 0 host instances") @@ -123,14 +122,10 @@ Globals.CIM_NS = 'root/interop' try: - key_list = ["InstanceID"] - proflist = enumclass.enumerate(options.ip, - "RegisteredProfile", - key_list, - options.virt) + profile_cn = get_typed_class(options.virt, "RegisteredProfile") + proflist = enumclass.EnumInstances(options.ip, profile_cn) except Exception, details: - logger.error(CIM_ERROR_ENUMERATE, - get_typed_class(options.virt, 'RegisteredProfile')) + logger.error(CIM_ERROR_ENUMERATE, profile_cn) logger.error("Exception: %s", details) return status From yunguol at cn.ibm.com Mon Oct 13 08:07:14 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 01:07:14 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call Message-ID: <2bcf4547d32b7f64e750.1223885234@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223885227 25200 # Node ID 2bcf4547d32b7f64e750e5b65405bcbae9edc3f0 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 2bcf4547d32b suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py --- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Mon Oct 13 01:07:07 2008 -0700 @@ -99,7 +99,8 @@ 'Name': systems[0]['Name'], 'CreationClassName': systems[0]['CreationClassName'] } - system = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) + cs = get_typed_class(options.virt, 'ComputerSystem') + system = enumclass.GetInstance(options.ip, cs, keys) if system.Name == test_dom: status = PASS From yunguol at cn.ibm.com Mon Oct 13 08:17:10 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 01:17:10 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify Profile-01_enum.py to call new EnumInstances call Message-ID: <9d1cd338c971cec2d2cc.1223885830@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223885824 25200 # Node ID 9d1cd338c971cec2d2cca516e328b5d71a5a8620 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Modify Profile-01_enum.py to call new EnumInstances call Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 9d1cd338c971 suites/libvirt-cim/cimtest/Profile/01_enum.py --- a/suites/libvirt-cim/cimtest/Profile/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Profile/01_enum.py Mon Oct 13 01:17:04 2008 -0700 @@ -44,15 +44,14 @@ 'System Virtualization', '1.0.0'], ['CIM:DSP1057-VirtualSystem-1.0.0a', 2, 'Virtual System Profile', '1.0.0a']] - cn = 'RegisteredProfile' + cn = get_typed_class(options.virt, 'RegisteredProfile') status = PASS prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' try: - key_list = ["InstanceID"] - proflist = enumclass.enumerate(options.ip, cn, key_list, options.virt) + proflist = enumclass.EnumInstances(options.ip, cn) except Exception, detail: logger.error(CIM_ERROR_ENUMERATE, get_typed_class(options.virt, cn)) From yunguol at cn.ibm.com Mon Oct 13 08:29:27 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 01:29:27 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify HostedDependency.01&02 to call new EnumInstances Message-ID: <88ef09807e84f327743b.1223886567@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223886561 25200 # Node ID 88ef09807e84f327743be1f7b51718af9526dea5 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Modify HostedDependency.01&02 to call new EnumInstances Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 88ef09807e84 suites/libvirt-cim/cimtest/HostedDependency/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Mon Oct 13 01:29:21 2008 -0700 @@ -82,10 +82,10 @@ if status != PASS: cxml.undefine(server) return status - - keys = ['Name', 'CreationClassName'] + + cs_class = get_typed_class(options.virt, 'ComputerSystem') try: - cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt) + cs = enumclass.EnumInstances(server, cs_class) except Exception,detail: logger.error(CIM_ERROR_ENUMERATE, 'ComputerSystem') logger.error("Exception: %s", detail) diff -r c7eaf17bd591 -r 88ef09807e84 suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Mon Oct 13 01:29:21 2008 -0700 @@ -89,8 +89,8 @@ cxml.undefine(server) return status - keys = ['Name', 'CreationClassName'] - cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt) + cs_class = get_typed_class(options.virt, 'ComputerSystem') + cs = enumclass.EnumInstances(server, cs_class) if virt == 'Xen' or options.virt == 'XenFV': # Xen honors additional domain-0 cs_list_len = 2 From yunguol at cn.ibm.com Mon Oct 13 08:36:50 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 01:36:50 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify VSSD.01&04 to call new EnumInstances and EnumNames Message-ID: <889637339f4dad55b11e.1223887010@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223887006 25200 # Node ID 889637339f4dad55b11e7ee153cd4f1ba89eac85 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Modify VSSD.01&04 to call new EnumInstances and EnumNames Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 889637339f4d suites/libvirt-cim/cimtest/VSSD/01_enum.py --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 13 01:36:46 2008 -0700 @@ -31,6 +31,7 @@ from XenKvmLib import enumclass from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.vxml import get_class +from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL @@ -53,9 +54,8 @@ try: live_cs = live.domain_list(options.ip, options.virt) - key_list = ["InstanceID"] - syslst = enumclass.enumerate(options.ip, "VirtualSystemSettingData", - key_list, options.virt) + vssd_class = get_typed_class(options.virt, 'VirtualSystemSettingData') + syslst = enumclass.EnumInstances(options.ip, vssd_class) found = 0 for vssd in syslst : diff -r c7eaf17bd591 -r 889637339f4d suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py --- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Mon Oct 13 01:36:46 2008 -0700 @@ -117,7 +117,7 @@ status = PASS try: classname = get_typed_class(virt, 'VirtualSystemSettingData') - vssd = enumclass.enumerate_inst(server, eval('enumclass.' + classname), virt) + vssd = enumclass.EnumNames(server, classname) if len(vssd) < 1 : logger.error("%s returned %i %s objects, expected atleast 1" % (classname, len(vssd), 'VSSD')) status = FAIL From yunguol at cn.ibm.com Mon Oct 13 08:45:57 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 01:45:57 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update ComputerSystem.01, 02, 03&05 to call new Enum* and GetInstance Message-ID: <6c36af362f520ca37f84.1223887557@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223887550 25200 # Node ID 6c36af362f520ca37f8440a78f850520d6758dcf # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Update ComputerSystem.01,02,03&05 to call new Enum* and GetInstance Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Oct 13 01:45:50 2008 -0700 @@ -26,6 +26,7 @@ from XenKvmLib.const import do_main from XenKvmLib import enumclass from VirtLib import live +from XenKvmLib.classes import get_typed_class from VirtLib import utils from CimTest import Globals from CimTest.ReturnCodes import PASS, FAIL @@ -37,9 +38,9 @@ options = main.options status = PASS - keys = ['Name', 'CreationClassName'] + cs_class = get_typed_class(options.virt, 'ComputerSystem') try: - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) + cs = enumclass.EnumInstances(options.ip, cs_class) live_cs = live.domain_list(options.ip, options.virt) for system in cs: name = system.name diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Mon Oct 13 01:45:50 2008 -0700 @@ -27,6 +27,7 @@ from XenKvmLib import enumclass from VirtLib import live from VirtLib import utils +from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP @@ -48,11 +49,10 @@ logger.error("System has defined domains; unable to run") return SKIP - cn = "%s_ComputerSystem" % options.virt + cn = get_typed_class(options.virt, 'ComputerSystem') - keys = ['Name', 'CreationClassName'] try: - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) + cs = enumclass.EnumInstances(options.ip, cn) except Exception, details: logger.error(CIM_ERROR_ENUMERATE, cn) diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Mon Oct 13 01:45:50 2008 -0700 @@ -49,9 +49,9 @@ Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom) return status - keys = ['Name', 'CreationClassName'] + cs_class = get_typed_class(options.virt, 'ComputerSystem') try: - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) + cs = enumclass.EnumInstances(options.ip, cs_class) if len(cs) == 0: raise Exception('No cs instance returned') for dom in cs: diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Mon Oct 13 01:45:50 2008 -0700 @@ -78,7 +78,8 @@ 'Name' : test_dom, 'CreationClassName' : get_typed_class(options.virt, 'ComputerSystem') } - cs = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) + cs_class = get_typed_class(options.virt, 'ComputerSystem') + cs = enumclass.GetInstance(options.ip, cs_class, keys) if cs.Name == test_dom: from_State = cs.EnabledState @@ -101,7 +102,7 @@ #Get the value of the EnabledState property and RequestedState property. try: - cs= enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) + cs= enumclass.GetInstance(options.ip, cs_class, keys) if cs.Name == test_dom: to_RequestedState = cs.RequestedState enabledState = cs.EnabledState From yunguol at cn.ibm.com Mon Oct 13 09:08:27 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 02:08:27 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update VirtualSystemSnapshotServiceCapabilities to call new EnumNames Message-ID: # HG changeset patch # User Guolian Yun # Date 1223888901 25200 # Node ID ee167e13cc264b576786bcd83483df912db4a775 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Update VirtualSystemSnapshotServiceCapabilities to call new EnumNames Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r ee167e13cc26 suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Mon Oct 13 02:08:21 2008 -0700 @@ -40,11 +40,9 @@ # Expected results from enumeration cn = get_typed_class(options.virt, "VirtualSystemSnapshotServiceCapabilities") instid = 'SnapshotCapabilities' - + try: - vs_sservicecap = enumclass.enumerate_inst(options.ip, - "VirtualSystemSnapshotServiceCapabilities", - options.virt) + vs_sservicecap = enumclass.EnumNames(options.ip, cn) except Exception, detail: logger.error(CIM_ERROR_ENUMERATE, cn) logger.error("Exception: %s", detail) From yunguol at cn.ibm.com Mon Oct 13 09:34:32 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 02:34:32 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] A big patch of update tc to call new EnumInstances Message-ID: <813f4dc8b30ef3a6903b.1223890472@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223890466 25200 # Node ID 813f4dc8b30ef3a6903b4ba87d585325a8cdd1cb # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] A big patch of update tc to call new EnumInstances Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Mon Oct 13 02:34:26 2008 -0700 @@ -38,8 +38,7 @@ bug_sblim = "00007" def append_to_list(server, virt, poolname, valid_elc_id): - keys_list = ['InstanceID'] - pool_list = enumerate(server, poolname, keys_list, virt) + pool_list = EnumInstances(server, poolname) if len(pool_list) > 0: for pool in pool_list: valid_elc_id.append(pool.InstanceID) diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Mon Oct 13 02:34:26 2008 -0700 @@ -36,14 +36,11 @@ options = main.options try: - key_list = ["InstanceID"] - elec = enumclass.enumerate(options.ip, - "EnabledLogicalElementCapabilities", - key_list, - options.virt) + elec_class = get_typed_class(options.virt, + "EnabledLogicalElementCapabilities") + elec = enumclass.EnumInstances(options.ip, elec_class) except Exception: - Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, \ - get_typed_class(options.virt, 'EnabledLogicalElementCapabilities')) + Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, elec_class) return 1 diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/HostSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Mon Oct 13 02:34:26 2008 -0700 @@ -48,7 +48,7 @@ ret, linux_cs = check_sblim(options.ip, options.virt) try: - hs = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) + hs = enumclass.EnumInstances(options.ip, name) except Exception, details: logger.error("%s %s: %s" % (CIM_ERROR_ENUMERATE, name, details)) status = FAIL diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py --- a/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Mon Oct 13 02:34:26 2008 -0700 @@ -87,8 +87,7 @@ proflist = [] status = PASS try: - key_list = ["InstanceID"] - proflist = enumclass.enumerate(server, reg_classname, key_list, virt) + proflist = enumclass.EnumInstances(server, reg_classname) if len(proflist) < 5: logger.error("%s returned %i %s objects, expected atleast 5", reg_classname, len(proflist), 'Profile') diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py --- a/suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py Mon Oct 13 02:34:26 2008 -0700 @@ -80,8 +80,7 @@ proflist = [] status = PASS try: - key_list = ["InstanceID"] - proflist = enumclass.enumerate(server, reg_classname, key_list, virt) + proflist = enumclass.EnumInstances(server, reg_classname) if len(proflist) < 5 : logger.error("%s returned %i %s objects, expected atleast 5", reg_classname, len(proflist), 'Profile') diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Mon Oct 13 02:34:26 2008 -0700 @@ -111,7 +111,7 @@ rasd_list = [] status = PASS try: - rasd_list = enumclass.enumerate_inst(server, classname, virt) + rasd_list = enumclass.EnumNames(server, classname) if len(rasd_list) < 1: logger.error("%s returned %i instances, excepted atleast 1 " "instance", classname, len(rasd_list)) diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ResourcePool/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Mon Oct 13 02:34:26 2008 -0700 @@ -27,7 +27,7 @@ import sys import os from distutils.file_util import move_file -from XenKvmLib.enumclass import enumerate +from XenKvmLib.enumclass import EnumInstances from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml from CimTest import Globals @@ -111,36 +111,39 @@ logger.error("Failed to initialise the list") return status - key_list = ["InstanceID"] + mp = get_typed_class(virt, mp_cn) + pp = get_typed_class(virt, pp_cn) + dp = get_typed_class(virt, dp_cn) + np = get_typed_class(virt, np_cn) + + try: + mempool = EnumInstances(ip, mp) + except Exception: + logger.error(Globals.CIM_ERROR_ENUMERATE % mp) + return FAIL + status = verify_fields(pool_list, mempool, mp) try: - mempool = enumerate(ip, mp_cn, key_list, virt) + propool = EnumInstances(ip, pp) except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % mp_cn) + logger.error(Globals.CIM_ERROR_ENUMERATE % pp) return FAIL - status = verify_fields(pool_list, mempool, get_typed_class(virt, mp_cn)) - - try: - propool = enumerate(ip, pp_cn, key_list, virt) - except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % pp_cn) - return FAIL - status = verify_fields(pool_list, propool, get_typed_class(virt, pp_cn)) + status = verify_fields(pool_list, propool, pp) if virt != 'LXC': try: - diskpool = enumerate(ip, dp_cn, key_list, virt) + diskpool = EnumInstances(ip, dp) except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % dp_cn) + logger.error(Globals.CIM_ERROR_ENUMERATE % dp) return FAIL - status = verify_fields(pool_list, diskpool, get_typed_class(virt, dp_cn)) + status = verify_fields(pool_list, diskpool, dp) try: - netpool = enumerate(ip, np_cn, key_list, virt) + netpool = EnumInstances(ip, np) except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % np_cn) + logger.error(Globals.CIM_ERROR_ENUMERATE % np) return FAIL - status = verify_fields(pool_list, netpool, get_typed_class(virt, np_cn)) + status = verify_fields(pool_list, netpool, np) return status From deeptik at linux.vnet.ibm.com Mon Oct 13 09:28:23 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 14:58:23 +0530 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Oct 13 2008 Message-ID: <48F314B7.5080305@linux.vnet.ibm.com> ================================================= XenFV on Pegasus Test Run Summary for Oct 13 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: 717 Libvirt-cim changeset: f0a209b602e7 ================================================= FAIL : 0 XFAIL : 0 SKIP : 4 PASS : 131 ----------------- Total : 135 ================================================= 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: 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: 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: 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: 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 ------------------------------------------------------------------- Thanks and Regards, Deepti. From yunguol at cn.ibm.com Mon Oct 13 09:59:53 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 02:59:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance Message-ID: <7cf9ca34ef7b5f8a9f37.1223891993@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223891987 25200 # Node ID 7cf9ca34ef7b5f8a9f3762f68185c6bd42252e67 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 7cf9ca34ef7b suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Mon Oct 13 02:59:47 2008 -0700 @@ -62,11 +62,12 @@ # otherwise. for i in range(1, (timeout + 1)): sleep(1) + cs_class = get_typed_class(options.virt, 'ComputerSystem') keys = { 'Name' : test_dom, - 'CreationClassName' : get_typed_class(options.virt, 'ComputerSystem') + 'CreationClassName' : cs_class } - cs = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) + cs = enumclass.GetInstance(options.ip, cs_class, keys) if cs.Name != test_dom: Globals.logger.error("VS %s is not defined" % test_dom) break diff -r c7eaf17bd591 -r 7cf9ca34ef7b suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Mon Oct 13 02:59:47 2008 -0700 @@ -146,10 +146,7 @@ vssd_cn = get_typed_class(options.virt, 'VirtualSystemSettingData') try: - vssd = enumclass.getInstance(options.ip, \ - 'VirtualSystemSettingData', \ - key_list, \ - options.virt) + vssd = enumclass.GetInstance(options.ip, vssd_cn, key_list) if vssd is None: logger.error("VSSD instance for %s not found" % test_dom) cxml.undefine(options.ip) From deeptik at linux.vnet.ibm.com Mon Oct 13 09:54:16 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 15:24:16 +0530 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Oct 13 2008 Message-ID: <48F31AC8.6060709@linux.vnet.ibm.com> ================================================= KVM on Pegasus Test Run Summary for Oct 13 2008 ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 717 Libvirt-cim changeset: f0a209b602e7 ================================================= FAIL : 1 XFAIL : 2 SKIP : 6 PASS : 126 ----------------- Total : 135 ================================================= FAIL Test Summary: HostedResourcePool - 01_forward.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP 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: 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: 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: FAIL ERROR - ('%s does not match NetworkPool/%s', u'NetworkPool/default', 'cimtest-networkpool') CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: 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 -------------------------------------------------------------------- Thanks and Regards, Deepti From yunguol at cn.ibm.com Mon Oct 13 09:51:50 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 13 Oct 2008 17:51:50 +0800 Subject: [Libvirt-cim] Remove enumerate() function in device.py and update tc to call new function in enumclass.py Message-ID: Hi, Do you think it's better to remove enumerate() function in device.py? Then we have to update tc to call new EnumInstances() function in enumclass.py. Who would like to take up this work? If not, I will cook up these patches. 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 Mon Oct 13 11:06:31 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 16:36:31 +0530 Subject: [Libvirt-cim] Re: KVM on Pegasus Test Run Summary for Oct 13 2008 In-Reply-To: <48F31AC8.6060709@linux.vnet.ibm.com> References: <48F31AC8.6060709@linux.vnet.ibm.com> Message-ID: <48F32BB7.2070006@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > KVM on Pegasus Test Run Summary for Oct 13 2008 > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: Pegasus 2.7.1 > Libvirt-cim revision: 717 > Libvirt-cim changeset: f0a209b602e7 > ================================================= > FAIL : 1 > XFAIL : 2 > SKIP : 6 > PASS : 126 > ----------------- > Total : 135 > ================================================= > FAIL Test Summary: > HostedResourcePool - 01_forward.py: FAIL This is problem with the test case, it fails because in case there is more than one pool for a particular devtype. Will send a patch with the fix. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Mon Oct 13 11:10:29 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 16:40:29 +0530 Subject: [Libvirt-cim] Remove enumerate() function in device.py and update tc to call new function in enumclass.py In-Reply-To: References: Message-ID: <48F32CA5.6010704@linux.vnet.ibm.com> Guo Lian Yun wrote: > > Hi, > > Do you think it's better to remove enumerate() function in device.py? > Then we have to update tc to call new EnumInstances() function in > enumclass.py. > Who would like to take up this work? If not, I will cook up these > patches. > Yes it would be better to have a single Enumerate function in one library file. I think we will have lot of tc updates if we take this up. Kaitlin, What do you suggest? Regards, Deepti. > 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 mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From deeptik at linux.vnet.ibm.com Mon Oct 13 12:44:47 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 13 Oct 2008 05:44:47 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 01_forward.py tc of HostedResourcePool Message-ID: <5ec9783447b1f35c57f4.1223901887@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1223901834 25200 # Node ID 5ec9783447b1f35c57f4d1ed73ecafa1d4cccc44 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Fixing 01_forward.py tc of HostedResourcePool. The tc would fails in case if there is more than one pool for a particular devtype. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r c7eaf17bd591 -r 5ec9783447b1 suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Mon Oct 13 05:43:54 2008 -0700 @@ -24,6 +24,7 @@ # import sys +from sets import Set from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.common_util import get_host_info @@ -39,14 +40,14 @@ @do_main(sup_types) def main(): options = main.options - + virt = options.virt keys = ['Name', 'CreationClassName'] - status, host_sys, host_cn = get_host_info(options.ip, options.virt) + status, host_sys, host_cn = get_host_info(options.ip, virt) if status != PASS: logger.error("Error in calling get_host_info function") return FAIL try: - assoc_cn = get_typed_class(options.virt, "HostedResourcePool") + assoc_cn = get_typed_class(virt, "HostedResourcePool") pool = assoc.AssociatorNames(options.ip, assoc_cn, host_cn, @@ -66,26 +67,51 @@ else: logger.error("No pool returned") return FAIL + + 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] = ['DiskPool/%s' % default_pool_name] + exp_pllist[npool] = ['%s/%s' %('NetworkPool', default_network_name)] + exp_pllist[ppool] = ['ProcessorPool/0'] try: + res_pllist = {} for items in pool: - cname = items.classname - if cname.find("MemoryPool") >=0 and items['InstanceID'] != \ - "MemoryPool/0": - raise Exception("%s does not match MemoryPool/0", - items['InstanceID']) - elif cname.find("ProcessorPool") >=0 and items['InstanceID'] != \ - "ProcessorPool/0": - raise Exception("%s does not match ProcessorPool/0", - items['InstanceID']) - elif cname.find("NetworkPool") >=0 and items['InstanceID'] != \ - "NetworkPool/%s" %default_network_name: - raise Exception("%s does not match NetworkPool/%s", - items['InstanceID'], default_network_name) - elif cname.find("DiskPool") >=0 and items['InstanceID'] != \ - "DiskPool/%s" % default_pool_name: - raise Exception("%s does not match DiskPool/%s", - items['InstanceID'], default_pool_name) + # The dict has some elements + if len(res_pllist) != 0: + # If the dict already has the key we append the new value + if items.classname in res_pllist.keys(): + list = [] + list = res_pllist[items.classname] + list.append(items['InstanceID']) + res_pllist[items.classname] = list + else: + # If the dict is not empty, but does not yet contain + # items.classname, we create new item + res_pllist[items.classname] = [items['InstanceID']] + else: + # When the dict is empty + res_pllist[items.classname] = [items['InstanceID']] + + #Verifying we get all the expected pool class info + if len(Set(exp_pllist.keys()) - Set(res_pllist.keys())) != 0: + logger.error("Pool Class mismatch") + raise Exception("Expected Pool class list: %s \n \t Got: %s" + % (sorted(exp_pllist.keys()), + sorted(res_pllist.keys()))) + + #Verifying that we get the atleast the expected instanceid + #for every pool class + for key in exp_pllist.keys(): + if len(Set(exp_pllist[key]) - Set(res_pllist[key])) != 0: + logger.error("InstanceID mismatch") + raise Exception("Expected InstanceID: %s \n \t Got: %s" + % (sorted(exp_pllist[key]), + sorted(res_pllist[key]))) except Exception, details: logger.error(details) return FAIL From deeptik at linux.vnet.ibm.com Mon Oct 13 13:21:30 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 18:51:30 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify EC 01_forward.py&02_reverse.py to use new EnumInstances call In-Reply-To: <4cfe13e4605c2252569a.1223884744@elm3b197.beaverton.ibm.com> References: <4cfe13e4605c2252569a.1223884744@elm3b197.beaverton.ibm.com> Message-ID: <48F34B5A.1000400@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223884738 25200 > # Node ID 4cfe13e4605c2252569ac4d76d6453f586f273ce > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify EC 01_forward.py&02_reverse.py to use new EnumInstances call > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 4cfe13e4605c suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Mon Oct 13 00:58:58 2008 -0700 > @@ -49,7 +49,7 @@ > from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, CIM_ERROR_ENUMERATE > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > -from XenKvmLib.enumclass import enumerate > +from XenKvmLib.enumclass import EnumInstances > from XenKvmLib.const import default_network_name, default_pool_name > > > @@ -139,8 +139,7 @@ > profiles_instid_list = [] > status = PASS > try: > - key_list = ["InstanceID"] > - proflist = enumerate(server, reg_classname, key_list, virt) > + proflist = EnumInstances(server, reg_classname) > if len(proflist) < 7: > logger.error("'%s' returned '%d' '%s' objects, expected atleast 7", > reg_classname, len(proflist), 'Profile') > The function get_proflist() where you have used EnumInstances() accepts virt param, which is not all used in the function. Can you remove the virt param. > diff -r c7eaf17bd591 -r 4cfe13e4605c suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Mon Oct 13 00:58:58 2008 -0700 > @@ -43,7 +43,6 @@ > from CimTest import Globals > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS > from XenKvmLib.const import do_main > -from XenKvmLib import enumclass > from XenKvmLib import assoc > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib.test_doms import destroy_and_undefine_all > @@ -104,10 +103,10 @@ > return FAIL > > inst_list.append(sys) > - keys = ['Name', 'CreationClassName'] > try: > #Getting the hostname, to verify with the value returned by the assoc. > - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) > + hs = get_typed_class(options.virt, 'HostSystem') > + host_sys = enumclass.EnumInstances(options.ip, hs) > > This will fail with sblim-base-providers installed. > if len(host_sys) < 1: > logger.error("ERROR: Enumerate returned 0 host instances") > @@ -123,14 +122,10 @@ > Globals.CIM_NS = 'root/interop' > > try: > - key_list = ["InstanceID"] > - proflist = enumclass.enumerate(options.ip, > - "RegisteredProfile", > - key_list, > - options.virt) > + profile_cn = get_typed_class(options.virt, "RegisteredProfile") > + proflist = enumclass.EnumInstances(options.ip, profile_cn) > except Exception, details: > - logger.error(CIM_ERROR_ENUMERATE, > - get_typed_class(options.virt, 'RegisteredProfile')) > + logger.error(CIM_ERROR_ENUMERATE, profile_cn) > logger.error("Exception: %s", details) > 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 Oct 13 13:28:15 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 18:58:15 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call In-Reply-To: <2bcf4547d32b7f64e750.1223885234@elm3b197.beaverton.ibm.com> References: <2bcf4547d32b7f64e750.1223885234@elm3b197.beaverton.ibm.com> Message-ID: <48F34CEF.8000001@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223885227 25200 > # Node ID 2bcf4547d32b7f64e750e5b65405bcbae9edc3f0 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 2bcf4547d32b suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py > --- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Mon Oct 13 01:07:07 2008 -0700 > @@ -99,7 +99,8 @@ > 'Name': systems[0]['Name'], > 'CreationClassName': systems[0]['CreationClassName'] > } > - system = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) > + cs = get_typed_class(options.virt, 'ComputerSystem') > + system = enumclass.GetInstance(options.ip, cs, keys) > > if system.Name == test_dom: > status = PASS > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > This tc fails for me on Xen with and without XenFV. From deeptik at linux.vnet.ibm.com Mon Oct 13 13:32:57 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 19:02:57 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call In-Reply-To: <2bcf4547d32b7f64e750.1223885234@elm3b197.beaverton.ibm.com> References: <2bcf4547d32b7f64e750.1223885234@elm3b197.beaverton.ibm.com> Message-ID: <48F34E09.5030806@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223885227 25200 > # Node ID 2bcf4547d32b7f64e750e5b65405bcbae9edc3f0 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 2bcf4547d32b suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py > --- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Mon Oct 13 01:07:07 2008 -0700 > @@ -99,7 +99,8 @@ > 'Name': systems[0]['Name'], > 'CreationClassName': systems[0]['CreationClassName'] > } > - system = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) > + cs = get_typed_class(options.virt, 'ComputerSystem') > + system = enumclass.GetInstance(options.ip, cs, keys) > > if system.Name == test_dom: > status = 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 Mon Oct 13 13:34:34 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 19:04:34 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call In-Reply-To: <48F34E09.5030806@linux.vnet.ibm.com> References: <2bcf4547d32b7f64e750.1223885234@elm3b197.beaverton.ibm.com> <48F34E09.5030806@linux.vnet.ibm.com> Message-ID: <48F34E6A.4030007@linux.vnet.ibm.com> Sorry, Please ignore this. I accidentally sent +1 for this. Please see the comments sent for this in the previous mail. Thanks and Regards, Deepti. Deepti B Kalakeri wrote: > +1 for me. > > yunguol at cn.ibm.com wrote: >> # HG changeset patch >> # User Guolian Yun >> # Date 1223885227 25200 >> # Node ID 2bcf4547d32b7f64e750e5b65405bcbae9edc3f0 >> # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 >> [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call >> >> Signed-off-by: Guolian Yun >> >> diff -r c7eaf17bd591 -r 2bcf4547d32b >> suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py >> --- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri >> Oct 10 03:08:12 2008 -0700 >> +++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Mon >> Oct 13 01:07:07 2008 -0700 >> @@ -99,7 +99,8 @@ >> 'Name': systems[0]['Name'], >> 'CreationClassName': >> systems[0]['CreationClassName'] >> } >> - system = enumclass.getInstance(options.ip, >> 'ComputerSystem', keys, options.virt) >> + cs = get_typed_class(options.virt, 'ComputerSystem') >> + system = enumclass.GetInstance(options.ip, cs, keys) >> if system.Name == test_dom: >> status = 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 Mon Oct 13 13:34:50 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 19:04:50 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify Profile-01_enum.py to call new EnumInstances call In-Reply-To: <9d1cd338c971cec2d2cc.1223885830@elm3b197.beaverton.ibm.com> References: <9d1cd338c971cec2d2cc.1223885830@elm3b197.beaverton.ibm.com> Message-ID: <48F34E7A.7080000@linux.vnet.ibm.com> +1 for me yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223885824 25200 > # Node ID 9d1cd338c971cec2d2cca516e328b5d71a5a8620 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify Profile-01_enum.py to call new EnumInstances call > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 9d1cd338c971 suites/libvirt-cim/cimtest/Profile/01_enum.py > --- a/suites/libvirt-cim/cimtest/Profile/01_enum.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/Profile/01_enum.py Mon Oct 13 01:17:04 2008 -0700 > @@ -44,15 +44,14 @@ > 'System Virtualization', '1.0.0'], > ['CIM:DSP1057-VirtualSystem-1.0.0a', 2, > 'Virtual System Profile', '1.0.0a']] > - cn = 'RegisteredProfile' > + cn = get_typed_class(options.virt, 'RegisteredProfile') > > status = PASS > prev_namespace = Globals.CIM_NS > Globals.CIM_NS = 'root/interop' > > try: > - key_list = ["InstanceID"] > - proflist = enumclass.enumerate(options.ip, cn, key_list, options.virt) > + proflist = enumclass.EnumInstances(options.ip, cn) > except Exception, detail: > logger.error(CIM_ERROR_ENUMERATE, get_typed_class(options.virt, > cn)) > > _______________________________________________ > 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 Oct 13 13:39:52 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 19:09:52 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify HostedDependency.01&02 to call new EnumInstances In-Reply-To: <88ef09807e84f327743b.1223886567@elm3b197.beaverton.ibm.com> References: <88ef09807e84f327743b.1223886567@elm3b197.beaverton.ibm.com> Message-ID: <48F34FA8.30909@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223886561 25200 > # Node ID 88ef09807e84f327743be1f7b51718af9526dea5 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify HostedDependency.01&02 to call new EnumInstances > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 88ef09807e84 suites/libvirt-cim/cimtest/HostedDependency/01_forward.py > --- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Mon Oct 13 01:29:21 2008 -0700 > @@ -82,10 +82,10 @@ > if status != PASS: > cxml.undefine(server) > return status > - > - keys = ['Name', 'CreationClassName'] > + > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > try: > - cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt) > + cs = enumclass.EnumInstances(server, cs_class) > except Exception,detail: > logger.error(CIM_ERROR_ENUMERATE, 'ComputerSystem') > You can use cs_class instead of hardcoding the 'ComputerSystem'. otherwise +1 for me. > logger.error("Exception: %s", detail) > diff -r c7eaf17bd591 -r 88ef09807e84 suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py > --- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Mon Oct 13 01:29:21 2008 -0700 > @@ -89,8 +89,8 @@ > cxml.undefine(server) > return status > > - keys = ['Name', 'CreationClassName'] > - cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt) > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > + cs = enumclass.EnumInstances(server, cs_class) > if virt == 'Xen' or options.virt == 'XenFV': > # Xen honors additional domain-0 > cs_list_len = 2 > +1 for me the 01_reverse.py changes. > _______________________________________________ > 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 Oct 13 13:46:18 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 19:16:18 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify VSSD.01&04 to call new EnumInstances and EnumNames In-Reply-To: <889637339f4dad55b11e.1223887010@elm3b197.beaverton.ibm.com> References: <889637339f4dad55b11e.1223887010@elm3b197.beaverton.ibm.com> Message-ID: <48F3512A.6000604@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223887006 25200 > # Node ID 889637339f4dad55b11e7ee153cd4f1ba89eac85 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify VSSD.01&04 to call new EnumInstances and EnumNames > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 889637339f4d suites/libvirt-cim/cimtest/VSSD/01_enum.py > --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 13 01:36:46 2008 -0700 > @@ -31,6 +31,7 @@ > from XenKvmLib import enumclass > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib.vxml import get_class > +from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > @@ -53,9 +54,8 @@ > > try: > live_cs = live.domain_list(options.ip, options.virt) > - key_list = ["InstanceID"] > - syslst = enumclass.enumerate(options.ip, "VirtualSystemSettingData", > - key_list, options.virt) > + vssd_class = get_typed_class(options.virt, 'VirtualSystemSettingData') > + syslst = enumclass.EnumInstances(options.ip, vssd_class) > > found = 0 > for vssd in syslst : > +1 for above. > diff -r c7eaf17bd591 -r 889637339f4d suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py > --- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Mon Oct 13 01:36:46 2008 -0700 > @@ -117,7 +117,7 @@ > status = PASS > try: > classname = get_typed_class(virt, 'VirtualSystemSettingData') > - vssd = enumclass.enumerate_inst(server, eval('enumclass.' + classname), virt) > + vssd = enumclass.EnumNames(server, classname) > if len(vssd) < 1 : > logger.error("%s returned %i %s objects, expected atleast 1" % (classname, len(vssd), 'VSSD')) > status = FAIL > This fails with sblim-base-provider with the following error: VSSD - 04_vssd_to_rasd.py: FAIL ERROR - Xen_VirtualSystemSettingDataComponent returned 3 Xen_VirtualSystemSettingData objects, expected 4 > _______________________________________________ > 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 Oct 13 13:59:05 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 19:29:05 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update VirtualSystemSnapshotServiceCapabilities to call new EnumNames In-Reply-To: References: Message-ID: <48F35429.6090205@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223888901 25200 > # Node ID ee167e13cc264b576786bcd83483df912db4a775 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Update VirtualSystemSnapshotServiceCapabilities to call new EnumNames > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r ee167e13cc26 suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Mon Oct 13 02:08:21 2008 -0700 > @@ -40,11 +40,9 @@ > # Expected results from enumeration > cn = get_typed_class(options.virt, "VirtualSystemSnapshotServiceCapabilities") > instid = 'SnapshotCapabilities' > - > + > try: > - vs_sservicecap = enumclass.enumerate_inst(options.ip, > - "VirtualSystemSnapshotServiceCapabilities", > - options.virt) > + vs_sservicecap = enumclass.EnumNames(options.ip, cn) > except Exception, detail: > logger.error(CIM_ERROR_ENUMERATE, cn) > logger.error("Exception: %s", detail) > > _______________________________________________ > 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 Oct 13 14:12:26 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 19:42:26 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] A big patch of update tc to call new EnumInstances In-Reply-To: <813f4dc8b30ef3a6903b.1223890472@elm3b197.beaverton.ibm.com> References: <813f4dc8b30ef3a6903b.1223890472@elm3b197.beaverton.ibm.com> Message-ID: <48F3574A.3030300@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223890466 25200 > # Node ID 813f4dc8b30ef3a6903b4ba87d585325a8cdd1cb > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] A big patch of update tc to call new EnumInstances > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Mon Oct 13 02:34:26 2008 -0700 > @@ -38,8 +38,7 @@ > bug_sblim = "00007" > > def append_to_list(server, virt, poolname, valid_elc_id): > - keys_list = ['InstanceID'] > - pool_list = enumerate(server, poolname, keys_list, virt) > + pool_list = EnumInstances(server, poolname) > if len(pool_list) > 0: > for pool in pool_list: > valid_elc_id.append(pool.InstanceID) > This test fails with the following error: ElementCapabilities - 01_forward.py: FAIL ERROR - Exception: In fn set_pool_info(): global name 'EnumInstances' is not defined CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py > --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Mon Oct 13 02:34:26 2008 -0700 > @@ -36,14 +36,11 @@ > options = main.options > > try: > - key_list = ["InstanceID"] > - elec = enumclass.enumerate(options.ip, > - "EnabledLogicalElementCapabilities", > - key_list, > - options.virt) > + elec_class = get_typed_class(options.virt, > + "EnabledLogicalElementCapabilities") > + elec = enumclass.EnumInstances(options.ip, elec_class) > except Exception: > - Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, \ > - get_typed_class(options.virt, 'EnabledLogicalElementCapabilities')) > + Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, elec_class) > return 1 > > > +1 for me. > diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/HostSystem/01_enum.py > --- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Mon Oct 13 02:34:26 2008 -0700 > @@ -48,7 +48,7 @@ > > ret, linux_cs = check_sblim(options.ip, options.virt) > try: > - hs = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) > + hs = enumclass.EnumInstances(options.ip, name) > except Exception, details: > logger.error("%s %s: %s" % (CIM_ERROR_ENUMERATE, name, details)) > status = FAIL > +1 for me. > diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py > --- a/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Mon Oct 13 02:34:26 2008 -0700 > @@ -87,8 +87,7 @@ > proflist = [] > status = PASS > try: > - key_list = ["InstanceID"] > - proflist = enumclass.enumerate(server, reg_classname, key_list, virt) > + proflist = enumclass.EnumInstances(server, reg_classname) > if len(proflist) < 5: > logger.error("%s returned %i %s objects, expected atleast 5", > reg_classname, len(proflist), 'Profile') > > +1 for me > diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py > --- a/suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py Mon Oct 13 02:34:26 2008 -0700 > @@ -80,8 +80,7 @@ > proflist = [] > status = PASS > try: > - key_list = ["InstanceID"] > - proflist = enumclass.enumerate(server, reg_classname, key_list, virt) > + proflist = enumclass.EnumInstances(server, reg_classname) > if len(proflist) < 5 : > logger.error("%s returned %i %s objects, expected atleast 5", > reg_classname, len(proflist), 'Profile') > +1 for me. > diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py > --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Mon Oct 13 02:34:26 2008 -0700 > @@ -111,7 +111,7 @@ > rasd_list = [] > status = PASS > try: > - rasd_list = enumclass.enumerate_inst(server, classname, virt) > + rasd_list = enumclass.EnumNames(server, classname) > if len(rasd_list) < 1: > logger.error("%s returned %i instances, excepted atleast 1 " > "instance", classname, len(rasd_list)) > +1 for me. > diff -r c7eaf17bd591 -r 813f4dc8b30e suites/libvirt-cim/cimtest/ResourcePool/01_enum.py > --- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Mon Oct 13 02:34:26 2008 -0700 > @@ -27,7 +27,7 @@ > import sys > import os > from distutils.file_util import move_file > -from XenKvmLib.enumclass import enumerate > +from XenKvmLib.enumclass import EnumInstances > from XenKvmLib.classes import get_typed_class > from XenKvmLib import vxml > from CimTest import Globals > @@ -111,36 +111,39 @@ > logger.error("Failed to initialise the list") > return status > > - key_list = ["InstanceID"] > + mp = get_typed_class(virt, mp_cn) > + pp = get_typed_class(virt, pp_cn) > + dp = get_typed_class(virt, dp_cn) > + np = get_typed_class(virt, np_cn) > + > + try: > + mempool = EnumInstances(ip, mp) > + except Exception: > + logger.error(Globals.CIM_ERROR_ENUMERATE % mp) > + return FAIL > + status = verify_fields(pool_list, mempool, mp) > > try: > - mempool = enumerate(ip, mp_cn, key_list, virt) > + propool = EnumInstances(ip, pp) > except Exception: > - logger.error(Globals.CIM_ERROR_ENUMERATE % mp_cn) > + logger.error(Globals.CIM_ERROR_ENUMERATE % pp) > return FAIL > - status = verify_fields(pool_list, mempool, get_typed_class(virt, mp_cn)) > - > - try: > - propool = enumerate(ip, pp_cn, key_list, virt) > - except Exception: > - logger.error(Globals.CIM_ERROR_ENUMERATE % pp_cn) > - return FAIL > - status = verify_fields(pool_list, propool, get_typed_class(virt, pp_cn)) > + status = verify_fields(pool_list, propool, pp) > > if virt != 'LXC': > try: > - diskpool = enumerate(ip, dp_cn, key_list, virt) > + diskpool = EnumInstances(ip, dp) > except Exception: > - logger.error(Globals.CIM_ERROR_ENUMERATE % dp_cn) > + logger.error(Globals.CIM_ERROR_ENUMERATE % dp) > return FAIL > - status = verify_fields(pool_list, diskpool, get_typed_class(virt, dp_cn)) > + status = verify_fields(pool_list, diskpool, dp) > > try: > - netpool = enumerate(ip, np_cn, key_list, virt) > + netpool = EnumInstances(ip, np) > except Exception: > - logger.error(Globals.CIM_ERROR_ENUMERATE % np_cn) > + logger.error(Globals.CIM_ERROR_ENUMERATE % np) > return FAIL > - status = verify_fields(pool_list, netpool, get_typed_class(virt, np_cn)) > + status = verify_fields(pool_list, netpool, np) > > return status > > > +1 for me. > _______________________________________________ > 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 Oct 13 14:14:38 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 19:44:38 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance In-Reply-To: <7cf9ca34ef7b5f8a9f37.1223891993@elm3b197.beaverton.ibm.com> References: <7cf9ca34ef7b5f8a9f37.1223891993@elm3b197.beaverton.ibm.com> Message-ID: <48F357CE.6020305@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223891987 25200 > # Node ID 7cf9ca34ef7b5f8a9f3762f68185c6bd42252e67 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 7cf9ca34ef7b suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Mon Oct 13 02:59:47 2008 -0700 > @@ -62,11 +62,12 @@ > # otherwise. > for i in range(1, (timeout + 1)): > sleep(1) > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > keys = { > 'Name' : test_dom, > - 'CreationClassName' : get_typed_class(options.virt, 'ComputerSystem') > + 'CreationClassName' : cs_class > } > - cs = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) > + cs = enumclass.GetInstance(options.ip, cs_class, keys) > if cs.Name != test_dom: > Globals.logger.error("VS %s is not defined" % test_dom) > break > diff -r c7eaf17bd591 -r 7cf9ca34ef7b suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py Mon Oct 13 02:59:47 2008 -0700 > @@ -146,10 +146,7 @@ > vssd_cn = get_typed_class(options.virt, 'VirtualSystemSettingData') > > try: > - vssd = enumclass.getInstance(options.ip, \ > - 'VirtualSystemSettingData', \ > - key_list, \ > - options.virt) > + vssd = enumclass.GetInstance(options.ip, vssd_cn, key_list) > if vssd is None: > logger.error("VSSD instance for %s not found" % test_dom) > cxml.undefine(options.ip) > > _______________________________________________ > 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 Oct 13 13:56:47 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 13 Oct 2008 19:26:47 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update ComputerSystem.01, 02, 03&05 to call new Enum* and GetInstance In-Reply-To: <6c36af362f520ca37f84.1223887557@elm3b197.beaverton.ibm.com> References: <6c36af362f520ca37f84.1223887557@elm3b197.beaverton.ibm.com> Message-ID: <48F3539F.8000906@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223887550 25200 > # Node ID 6c36af362f520ca37f8440a78f850520d6758dcf > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Update ComputerSystem.01,02,03&05 to call new Enum* and GetInstance > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Oct 13 01:45:50 2008 -0700 > @@ -26,6 +26,7 @@ > from XenKvmLib.const import do_main > from XenKvmLib import enumclass > from VirtLib import live > +from XenKvmLib.classes import get_typed_class > from VirtLib import utils > from CimTest import Globals > from CimTest.ReturnCodes import PASS, FAIL > @@ -37,9 +38,9 @@ > options = main.options > status = PASS > > - keys = ['Name', 'CreationClassName'] > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > try: > - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) > + cs = enumclass.EnumInstances(options.ip, cs_class) > live_cs = live.domain_list(options.ip, options.virt) > for system in cs: > name = system.name > diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Mon Oct 13 01:45:50 2008 -0700 > @@ -27,6 +27,7 @@ > from XenKvmLib import enumclass > from VirtLib import live > from VirtLib import utils > +from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, SKIP > @@ -48,11 +49,10 @@ > logger.error("System has defined domains; unable to run") > return SKIP > > - cn = "%s_ComputerSystem" % options.virt > + cn = get_typed_class(options.virt, 'ComputerSystem') > > - keys = ['Name', 'CreationClassName'] > try: > - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) > + cs = enumclass.EnumInstances(options.ip, cn) > > except Exception, details: > logger.error(CIM_ERROR_ENUMERATE, cn) > diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Mon Oct 13 01:45:50 2008 -0700 > @@ -49,9 +49,9 @@ > Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom) > return status > > - keys = ['Name', 'CreationClassName'] > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > try: > - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) > + cs = enumclass.EnumInstances(options.ip, cs_class) > if len(cs) == 0: > raise Exception('No cs instance returned') > for dom in cs: > diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Mon Oct 13 01:45:50 2008 -0700 > @@ -78,7 +78,8 @@ > 'Name' : test_dom, > 'CreationClassName' : get_typed_class(options.virt, 'ComputerSystem') > } > - cs = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > + cs = enumclass.GetInstance(options.ip, cs_class, keys) > > if cs.Name == test_dom: > from_State = cs.EnabledState > @@ -101,7 +102,7 @@ > > #Get the value of the EnabledState property and RequestedState property. > try: > - cs= enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) > + cs= enumclass.GetInstance(options.ip, cs_class, keys) > if cs.Name == test_dom: > to_RequestedState = cs.RequestedState > enabledState = cs.EnabledState > This tc failed for me with Xen/XenFV ComputerSystem - 05_activate_defined_start.py: FAIL ERROR - Exception: (1, u'CIM_ERR_FAILED: Unable to start domain') ERROR - Unable start dom DomST1 using RequestedStateChange() InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain Can you verify once again if fails for you also? > _______________________________________________ > 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 Oct 13 15:39:50 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 13 Oct 2008 08:39:50 -0700 Subject: [Libvirt-cim] Remove enumerate() function in device.py and update tc to call new function in enumclass.py In-Reply-To: <48F32CA5.6010704@linux.vnet.ibm.com> References: <48F32CA5.6010704@linux.vnet.ibm.com> Message-ID: <48F36BC6.3050402@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Guo Lian Yun wrote: >> >> Hi, >> >> Do you think it's better to remove enumerate() function in device.py? >> Then we have to update tc to call new EnumInstances() function in >> enumclass.py. >> Who would like to take up this work? If not, I will cook up these >> patches. >> > Yes it would be better to have a single Enumerate function in one > library file. > I think we will have lot of tc updates if we take this up. > > Kaitlin, > What do you suggest? Yes, I agree. The enumerate() functions in device.py are no longer needed. The functions in enumclass.py should cover this. Daisy - can you work up a patch for this? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Mon Oct 13 18:12:09 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 13 Oct 2008 11:12:09 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] Add LXC ProcRASD support Message-ID: This set enables ProcRASD support for LXC domains. It exposes the interfaces to get/set these values, as well as modifies the domain start logic to enforce the values, like we do for Xen. From danms at us.ibm.com Mon Oct 13 18:12:10 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 13 Oct 2008 11:12:10 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Make VSMS honor Weight property of ProcRASD for LXC In-Reply-To: Message-ID: <31edd656481f4a328f16.1223921530@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1223920960 25200 # Node ID 31edd656481f4a328f16102ab9f7b9e24643d687 # Parent f0a209b602e707305a713611097310ec503451df Make VSMS honor Weight property of ProcRASD for LXC Also, reject if VirtualQuantity or Limit is specified (for the moment) Signed-off-by: Dan Smith diff -r f0a209b602e7 -r 31edd656481f src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Oct 08 09:13:55 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Mon Oct 13 11:02:40 2008 -0700 @@ -522,6 +522,34 @@ return NULL; } +static const char *lxc_proc_rasd_to_vdev(CMPIInstance *inst, + struct virt_device *dev) +{ + CMPIObjectPath *op = NULL; + CMPIrc rc; + uint32_t def_weight = 1024; + + rc = cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.vcpu.quantity); + if (rc == CMPI_RC_OK) + return "ProcRASD field VirtualQuantity not valid for LXC"; + + op = CMGetObjectPath(inst, NULL); + if (op == NULL) { + CU_DEBUG("Unable to determine class of ProcRASD"); + return NULL; + } + + rc = cu_get_u64_prop(inst, "Limit", &dev->dev.vcpu.limit); + if (rc == CMPI_RC_OK) + return "ProcRASD field Limit not valid for LXC"; + + rc = cu_get_u32_prop(inst, "Weight", &dev->dev.vcpu.weight); + if (rc != CMPI_RC_OK) + dev->dev.vcpu.weight = def_weight; + + return NULL; +} + static const char *_sysvirt_rasd_to_vdev(CMPIInstance *inst, struct virt_device *dev, uint16_t type, @@ -551,6 +579,8 @@ return lxc_disk_rasd_to_vdev(inst, dev); } else if (type == CIM_RES_TYPE_NET) { return net_rasd_to_vdev(inst, dev, ns); + } else if (type == CIM_RES_TYPE_PROC) { + return lxc_proc_rasd_to_vdev(inst, dev); } return "Resource type not supported on this platform"; From danms at us.ibm.com Mon Oct 13 18:12:12 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 13 Oct 2008 11:12:12 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Expose LXC_ProcRASD so that the scheduling parameters are visible In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1223921490 25200 # Node ID e156ceabb65da50f468235dcf0fccbc4b5fb142f # Parent 56b5db360cb4e78cec960c6b31e4f6159edb8c46 Expose LXC_ProcRASD so that the scheduling parameters are visible Also make ProcRASD not set the VirtualQuantity field if it's zero, so that LXC_ProcRASD's value appears undefined instead of 0. Signed-off-by: Dan Smith diff -r 56b5db360cb4 -r e156ceabb65d schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Mon Oct 13 11:11:05 2008 -0700 +++ b/schema/ResourceAllocationSettingData.registration Mon Oct 13 11:11:30 2008 -0700 @@ -10,3 +10,4 @@ KVM_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +LXC_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance diff -r 56b5db360cb4 -r e156ceabb65d src/Virt_RASD.c --- a/src/Virt_RASD.c Mon Oct 13 11:11:05 2008 -0700 +++ b/src/Virt_RASD.c Mon Oct 13 11:11:30 2008 -0700 @@ -306,8 +306,13 @@ CMSetProperty(inst, "Limit", (CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64); } else if (dev->type == CIM_RES_TYPE_PROC) { - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&dev->dev.vcpu.quantity, CMPI_uint64); + if (dev->dev.vcpu.quantity > 0) { + CMSetProperty(inst, + "VirtualQuantity", + (CMPIValue *)&dev->dev.vcpu.quantity, + CMPI_uint64); + } + set_proc_rasd_params(broker, ref, host, inst); } From danms at us.ibm.com Mon Oct 13 18:12:11 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 13 Oct 2008 11:12:11 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Make ComputerSystem enforce LXC scheduling parameters on domain start In-Reply-To: Message-ID: <56b5db360cb4e78cec96.1223921531@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1223921465 25200 # Node ID 56b5db360cb4e78cec960c6b31e4f6159edb8c46 # Parent 31edd656481f4a328f16102ab9f7b9e24643d687 Make ComputerSystem enforce LXC scheduling parameters on domain start Signed-off-by: Dan Smith diff -r 31edd656481f -r 56b5db360cb4 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Mon Oct 13 11:02:40 2008 -0700 +++ b/src/Virt_ComputerSystem.c Mon Oct 13 11:11:05 2008 -0700 @@ -667,23 +667,70 @@ DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); +static int xen_scheduler_params(struct infostore_ctx *ctx, + virSchedParameter **params) +{ + unsigned long long weight; + unsigned long long cap; + + *params = calloc(2, sizeof(virSchedParameter)); + if (*params == NULL) + return -1; + + weight = infostore_get_u64(ctx, "weight"); + cap = infostore_get_u64(ctx, "limit"); + + if (weight != 0) { + strncpy((*params)[0].field, + "weight", + sizeof((*params)[0].field)); + (*params)[0].type = VIR_DOMAIN_SCHED_FIELD_UINT; + (*params)[0].value.ui = weight; + } + + if (cap != 0) { + strncpy((*params)[0].field, + "cap", + sizeof((*params)[0].field)); + (*params)[0].type = VIR_DOMAIN_SCHED_FIELD_UINT; + (*params)[0].value.ui = cap; + } + + return 2; +} + +static int lxc_scheduler_params(struct infostore_ctx *ctx, + virSchedParameter **params) +{ + unsigned long long value; + + *params = calloc(1, sizeof(virSchedParameter)); + if (*params == NULL) + return -1; + + value = infostore_get_u64(ctx, "weight"); + + if (value != 0) { + strncpy((*params)[0].field, + "cpu_shares", + sizeof((*params)[0].field)); + (*params)[0].type = VIR_DOMAIN_SCHED_FIELD_UINT; + (*params)[0].value.ui = value; + } + + return 1; +} + static void set_scheduler_params(virDomainPtr dom) { struct infostore_ctx *ctx; virConnectPtr conn = NULL; - virSchedParameter params[] = - {{ "weight", VIR_DOMAIN_SCHED_FIELD_UINT }, - { "cap", VIR_DOMAIN_SCHED_FIELD_UINT }, - }; + virSchedParameter *params = NULL; + int count; conn = virDomainGetConnect(dom); if (conn == NULL) { CU_DEBUG("Unable to get connection from domain"); - return; - } - - if (!STREQC(virConnectGetType(conn), "xen")) { - CU_DEBUG("Not setting sched params for this domain type"); return; } @@ -693,13 +740,27 @@ return; } - params[0].value.ui = infostore_get_u64(ctx, "weight"); - params[1].value.ui = infostore_get_u64(ctx, "limit"); + if (STREQC(virConnectGetType(conn), "xen")) + count = xen_scheduler_params(ctx, ¶ms); + else if (STREQC(virConnectGetType(conn), "lxc")) + count = lxc_scheduler_params(ctx, ¶ms); + else { + CU_DEBUG("Not setting sched params for type %s", + virConnectGetType(conn)); + goto out; + } - virDomainSetSchedulerParameters(dom, params, 2); + if (count < 0) { + CU_DEBUG("Unable to set scheduler parameters"); + goto out; + } + virDomainSetSchedulerParameters(dom, params, count); + out: infostore_close(ctx); + free(params); } + /* This composite operation may be supported as a flag to reboot */ static int domain_reset(virDomainPtr dom) From kaitlin at linux.vnet.ibm.com Mon Oct 13 19:37:52 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 13 Oct 2008 12:37:52 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call In-Reply-To: <48F34CEF.8000001@linux.vnet.ibm.com> References: <2bcf4547d32b7f64e750.1223885234@elm3b197.beaverton.ibm.com> <48F34CEF.8000001@linux.vnet.ibm.com> Message-ID: <48F3A390.8020206@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > yunguol at cn.ibm.com wrote: >> # HG changeset patch >> # User Guolian Yun >> # Date 1223885227 25200 >> # Node ID 2bcf4547d32b7f64e750e5b65405bcbae9edc3f0 >> # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 >> [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call >> >> Signed-off-by: Guolian Yun >> >> diff -r c7eaf17bd591 -r 2bcf4547d32b >> suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py > > This tc fails for me on Xen with and without XenFV. > It fails for me without printing any debug messages - can you also add the appropriate debug when you fix the failure? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Oct 13 19:41:54 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 13 Oct 2008 12:41:54 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify HostedDependency.01&02 to call new EnumInstances In-Reply-To: <48F34FA8.30909@linux.vnet.ibm.com> References: <88ef09807e84f327743b.1223886567@elm3b197.beaverton.ibm.com> <48F34FA8.30909@linux.vnet.ibm.com> Message-ID: <48F3A482.2080408@linux.vnet.ibm.com> >> - keys = ['Name', 'CreationClassName'] >> + + cs_class = get_typed_class(options.virt, 'ComputerSystem') >> try: - cs = enumclass.enumerate(server, 'ComputerSystem', >> keys, virt) >> + cs = enumclass.EnumInstances(server, cs_class) >> except Exception,detail: >> logger.error(CIM_ERROR_ENUMERATE, 'ComputerSystem') >> > You can use cs_class instead of hardcoding the 'ComputerSystem'. > otherwise +1 for me. Agreed. Can you rework this patch? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Oct 13 20:03:46 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 13 Oct 2008 13:03:46 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance In-Reply-To: <7cf9ca34ef7b5f8a9f37.1223891993@elm3b197.beaverton.ibm.com> References: <7cf9ca34ef7b5f8a9f37.1223891993@elm3b197.beaverton.ibm.com> Message-ID: <48F3A9A2.6060606@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223891987 25200 > # Node ID 7cf9ca34ef7b5f8a9f3762f68185c6bd42252e67 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 7cf9ca34ef7b suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS.py Mon Oct 13 02:59:47 2008 -0700 This test fails for me with Xen: ComputerSystem - 04_defineStartVS.py: FAIL ERROR - Failed to Start the dom: domguest It fails without your patch applied, so I've applied this patch. However, can you take a look to see why it might be failing? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Oct 13 20:45:02 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 13 Oct 2008 13:45:02 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 01_forward.py tc of HostedResourcePool In-Reply-To: <5ec9783447b1f35c57f4.1223901887@localhost.localdomain> References: <5ec9783447b1f35c57f4.1223901887@localhost.localdomain> Message-ID: <48F3B34E.6090303@linux.vnet.ibm.com> > + > + 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] = ['DiskPool/%s' % default_pool_name] > + exp_pllist[npool] = ['%s/%s' %('NetworkPool', default_network_name)] This can be formatted just like the DiskPool line: exp_pllist[npool] = ['NetworkPool/%s' % default_network_name] > + > + #Verifying we get all the expected pool class info > + if len(Set(exp_pllist.keys()) - Set(res_pllist.keys())) != 0: > + logger.error("Pool Class mismatch") > + raise Exception("Expected Pool class list: %s \n \t Got: %s" > + % (sorted(exp_pllist.keys()), > + sorted(res_pllist.keys()))) > + > + #Verifying that we get the atleast the expected instanceid > + #for every pool class > + for key in exp_pllist.keys(): > + if len(Set(exp_pllist[key]) - Set(res_pllist[key])) != 0: This should be: Set(exp_pllist[key]) != Set(res_pllist[key]) > + logger.error("InstanceID mismatch") > + raise Exception("Expected InstanceID: %s \n \t Got: %s" > + % (sorted(exp_pllist[key]), > + sorted(res_pllist[key]))) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 14 00:03:44 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 13 Oct 2008 17:03:44 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Make VSMS honor Weight property of ProcRASD for LXC In-Reply-To: <31edd656481f4a328f16.1223921530@guaranine.danplanet.com> References: <31edd656481f4a328f16.1223921530@guaranine.danplanet.com> Message-ID: <48F3E1E0.8060004@linux.vnet.ibm.com> > + > + op = CMGetObjectPath(inst, NULL); > + if (op == NULL) { > + CU_DEBUG("Unable to determine class of ProcRASD"); > + return NULL; > + } > + Getting the ObjectPath here isn't needed - it's not used elsewhere in the function. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Tue Oct 14 02:47:20 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 14 Oct 2008 10:47:20 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 14 2008 Message-ID: ================================================= KVM on sfcb Test Run Summary for Oct 14 2008 ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 715+ Libvirt-cim changeset: f7dfc83a73ac+ ================================================= FAIL : 1 XFAIL : 3 SKIP : 4 PASS : 127 ----------------- Total : 135 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL SettingsDefineCapabilities - 03_forward_errs.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'Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): Domain Operation Failed Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Exception: (1, u'Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'test_domain' using RequestedStateChange() 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: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: FAIL ERROR - Exception: not enough arguments for format string Got indication: KVM_ComputerSystemCreatedIndication ERROR - Received indication error: 256 ERROR - Exception: not enough arguments for format string Got indication: KVM_ComputerSystemCreatedIndication ERROR - Received indication error: 256 -------------------------------------------------------------------- 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: XFAIL 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Tue Oct 14 03:18:48 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 20:18:48 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Modify HostedDependency.01&02 to call new EnumInstances Message-ID: <6e9d7bfb27efb912d81e.1223954328@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223954323 25200 # Node ID 6e9d7bfb27efb912d81e4b702a3a3018395fcc80 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] #2 Modify HostedDependency.01&02 to call new EnumInstances Updates from 1 to 2: Using cs_class instead of hardcoding the 'ComputerSystem'. Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 6e9d7bfb27ef suites/libvirt-cim/cimtest/HostedDependency/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/01_forward.py Mon Oct 13 20:18:43 2008 -0700 @@ -83,11 +83,11 @@ def main(): cxml.undefine(server) return status - keys = ['Name', 'CreationClassName'] + cs_class = get_typed_class(options.virt, 'ComputerSystem') try: - cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt) + cs = enumclass.EnumInstances(server, cs_class) except Exception,detail: - logger.error(CIM_ERROR_ENUMERATE, 'ComputerSystem') + logger.error(CIM_ERROR_ENUMERATE, cs_class) logger.error("Exception: %s", detail) cxml.undefine(server) return FAIL diff -r c7eaf17bd591 -r 6e9d7bfb27ef suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/02_reverse.py Mon Oct 13 20:18:43 2008 -0700 @@ -89,8 +89,8 @@ def main(): cxml.undefine(server) return status - keys = ['Name', 'CreationClassName'] - cs = enumclass.enumerate(server, 'ComputerSystem', keys, virt) + cs_class = get_typed_class(options.virt, 'ComputerSystem') + cs = enumclass.EnumInstances(server, cs_class) if virt == 'Xen' or options.virt == 'XenFV': # Xen honors additional domain-0 cs_list_len = 2 From deeptik at linux.vnet.ibm.com Tue Oct 14 05:12:17 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 14 Oct 2008 10:42:17 +0530 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 14 2008 In-Reply-To: References: Message-ID: <48F42A31.9030604@linux.vnet.ibm.com> Guo Lian Yun wrote: > > ================================================= > KVM on sfcb Test Run Summary for Oct 14 2008 > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 715+ > Libvirt-cim changeset: f7dfc83a73ac+ > ================================================= > FAIL : 1 > XFAIL : 3 > SKIP : 4 > PASS : 127 > ----------------- > Total : 135 > ================================================= > FAIL Test Summary: > ComputerSystemIndication - 01_created_indication.py: FAIL > > ================================================= > XFAIL Test Summary: > ComputerSystem - 32_start_reboot.py: XFAIL > ComputerSystem - 33_suspend_reboot.py: XFAIL > SettingsDefineCapabilities - 03_forward_errs.py: XFAIL > Can you verify if its a valid case of XFAIL. If yes then please pass appropriate bug no. Thanks and Regards, Deepti. From yunguol at cn.ibm.com Tue Oct 14 05:17:03 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 14 Oct 2008 13:17:03 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call In-Reply-To: <48F34CEF.8000001@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-13 21:28:15: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1223885227 25200 > > # Node ID 2bcf4547d32b7f64e750e5b65405bcbae9edc3f0 > > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > > [TEST] Modify SystemDevice 02_reverse.py to use new GetInstance() call > > > > Signed-off-by: Guolian Yun > > > > diff -r c7eaf17bd591 -r 2bcf4547d32b suites/libvirt- > cim/cimtest/SystemDevice/02_reverse.py > > --- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Fri > Oct 10 03:08:12 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Mon > Oct 13 01:07:07 2008 -0700 > > @@ -99,7 +99,8 @@ > > 'Name': systems[0]['Name'], > > 'CreationClassName': systems[0]['CreationClassName'] > > } > > - system = enumclass.getInstance(options.ip, > 'ComputerSystem', keys, options.virt) > > + cs = get_typed_class(options.virt, 'ComputerSystem') > > + system = enumclass.GetInstance(options.ip, cs, keys) > > > > if system.Name == test_dom: > > status = PASS > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > This tc fails for me on Xen with and without XenFV. Yeah, this tc fails with sblim base provider installed, we have to fix it firstly. Thanks! > > _______________________________________________ > 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 Oct 14 05:39:22 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 22:39:22 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#Modify VSSD.01 to call new EnumInstances and EnumNames Message-ID: <430656f260d8b29c31a1.1223962762@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223962756 25200 # Node ID 430656f260d8b29c31a1c207103d849ee9d27aca # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST]#Modify VSSD.01 to call new EnumInstances and EnumNames Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 430656f260d8 suites/libvirt-cim/cimtest/VSSD/01_enum.py --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 13 22:39:16 2008 -0700 @@ -31,6 +31,7 @@ from XenKvmLib import enumclass from XenKvmLib import enumclass from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.vxml import get_class +from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL @@ -53,9 +54,8 @@ def main(): try: live_cs = live.domain_list(options.ip, options.virt) - key_list = ["InstanceID"] - syslst = enumclass.enumerate(options.ip, "VirtualSystemSettingData", - key_list, options.virt) + vssd_class = get_typed_class(options.virt, "VirtualSystemSettingData") + syslst = enumclass.enumerate(options.ip, vssd_class) found = 0 for vssd in syslst : From yunguol at cn.ibm.com Tue Oct 14 05:26:15 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 14 Oct 2008 13:26:15 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modify VSSD.01&04 to call new EnumInstances and EnumNames In-Reply-To: <48F3512A.6000604@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-13 21:46:18: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1223887006 25200 > > # Node ID 889637339f4dad55b11e7ee153cd4f1ba89eac85 > > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > > [TEST] Modify VSSD.01&04 to call new EnumInstances and EnumNames > > > > Signed-off-by: Guolian Yun > > > > diff -r c7eaf17bd591 -r 889637339f4d suites/libvirt- > cim/cimtest/VSSD/01_enum.py > > --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Oct 10 03: > 08:12 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 13 01: > 36:46 2008 -0700 > > @@ -31,6 +31,7 @@ > > from XenKvmLib import enumclass > > from XenKvmLib.test_doms import destroy_and_undefine_all > > from XenKvmLib.vxml import get_class > > +from XenKvmLib.classes import get_typed_class > > from CimTest.Globals import logger > > from XenKvmLib.const import do_main > > from CimTest.ReturnCodes import PASS, FAIL > > @@ -53,9 +54,8 @@ > > > > try: > > live_cs = live.domain_list(options.ip, options.virt) > > - key_list = ["InstanceID"] > > - syslst = enumclass.enumerate(options.ip, > "VirtualSystemSettingData", > > - key_list, options.virt) > > + vssd_class = get_typed_class(options.virt, > 'VirtualSystemSettingData') > > + syslst = enumclass.EnumInstances(options.ip, vssd_class) > > > > found = 0 > > for vssd in syslst : > > > +1 for above. > > diff -r c7eaf17bd591 -r 889637339f4d suites/libvirt- > cim/cimtest/VSSD/04_vssd_to_rasd.py > > --- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Oct > 10 03:08:12 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Mon Oct > 13 01:36:46 2008 -0700 > > @@ -117,7 +117,7 @@ > > status = PASS > > try: > > classname = get_typed_class(virt, 'VirtualSystemSettingData') > > - vssd = enumclass.enumerate_inst(server, eval('enumclass.' > + classname), virt) > > + vssd = enumclass.EnumNames(server, classname) > > if len(vssd) < 1 : > > logger.error("%s returned %i %s objects, expected > atleast 1" % (classname, len(vssd), 'VSSD')) > > status = FAIL > > > This fails with sblim-base-provider with the following error: > VSSD - 04_vssd_to_rasd.py: FAIL > ERROR - Xen_VirtualSystemSettingDataComponent returned 3 > Xen_VirtualSystemSettingData objects, expected 4 Good catch. This tc fails for me without modification. All my test are tested without sblim base provider. If it also fails without my updates, would you please add this tc to the sblim-tc-failure-list? Also, do you think it's better to apply it firstly, then follow up patches to fix them with sblim-base provider. Thanks! > > > _______________________________________________ > > 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 yunguol at cn.ibm.com Tue Oct 14 05:48:56 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 22:48:56 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 A big patch of update tc to call new EnumInstances Message-ID: <6c71a150e47018258ca2.1223963336@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223963331 25200 # Node ID 6c71a150e47018258ca2abfa035891717c955995 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] #2 A big patch of update tc to call new EnumInstances Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 6c71a150e470 suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Mon Oct 13 22:48:51 2008 -0700 @@ -36,14 +36,11 @@ def main(): options = main.options try: - key_list = ["InstanceID"] - elec = enumclass.enumerate(options.ip, - "EnabledLogicalElementCapabilities", - key_list, - options.virt) + elec_class = get_typed_class(options.virt, + "EnabledLogicalElementCapabilities") + elec = enumclass.EnumInstances(options.ip, elec_class) except Exception: - Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, \ - get_typed_class(options.virt, 'EnabledLogicalElementCapabilities')) + Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, elec_class) return 1 diff -r c7eaf17bd591 -r 6c71a150e470 suites/libvirt-cim/cimtest/HostSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/01_enum.py Mon Oct 13 22:48:51 2008 -0700 @@ -48,7 +48,7 @@ def main(): ret, linux_cs = check_sblim(options.ip, options.virt) try: - hs = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) + hs = enumclass.EnumInstances(options.ip, name) except Exception, details: logger.error("%s %s: %s" % (CIM_ERROR_ENUMERATE, name, details)) status = FAIL diff -r c7eaf17bd591 -r 6c71a150e470 suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py --- a/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/01_verify_refprof.py Mon Oct 13 22:48:51 2008 -0700 @@ -87,8 +87,7 @@ def get_proflist(): proflist = [] status = PASS try: - key_list = ["InstanceID"] - proflist = enumclass.enumerate(server, reg_classname, key_list, virt) + proflist = enumclass.EnumInstances(server, reg_classname) if len(proflist) < 5: logger.error("%s returned %i %s objects, expected atleast 5", reg_classname, len(proflist), 'Profile') diff -r c7eaf17bd591 -r 6c71a150e470 suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py --- a/suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ReferencedProfile/02_refprofile_errs.py Mon Oct 13 22:48:51 2008 -0700 @@ -80,8 +80,7 @@ def get_proflist(): proflist = [] status = PASS try: - key_list = ["InstanceID"] - proflist = enumclass.enumerate(server, reg_classname, key_list, virt) + proflist = enumclass.EnumInstances(server, reg_classname) if len(proflist) < 5 : logger.error("%s returned %i %s objects, expected atleast 5", reg_classname, len(proflist), 'Profile') diff -r c7eaf17bd591 -r 6c71a150e470 suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/05_RAPF_err.py Mon Oct 13 22:48:51 2008 -0700 @@ -111,7 +111,7 @@ def get_netrasd_instid(server, virt, vsx rasd_list = [] status = PASS try: - rasd_list = enumclass.enumerate_inst(server, classname, virt) + rasd_list = enumclass.EnumNames(server, classname) if len(rasd_list) < 1: logger.error("%s returned %i instances, excepted atleast 1 " "instance", classname, len(rasd_list)) diff -r c7eaf17bd591 -r 6c71a150e470 suites/libvirt-cim/cimtest/ResourcePool/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Mon Oct 13 22:48:51 2008 -0700 @@ -27,7 +27,7 @@ import sys import sys import os from distutils.file_util import move_file -from XenKvmLib.enumclass import enumerate +from XenKvmLib.enumclass import EnumInstances from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml from CimTest import Globals @@ -111,36 +111,39 @@ def main(): logger.error("Failed to initialise the list") return status - key_list = ["InstanceID"] + mp = get_typed_class(virt, mp_cn) + pp = get_typed_class(virt, pp_cn) + dp = get_typed_class(virt, dp_cn) + np = get_typed_class(virt, np_cn) + + try: + mempool = EnumInstances(ip, mp) + except Exception: + logger.error(Globals.CIM_ERROR_ENUMERATE % mp) + return FAIL + status = verify_fields(pool_list, mempool, mp) try: - mempool = enumerate(ip, mp_cn, key_list, virt) + propool = EnumInstances(ip, pp) except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % mp_cn) + logger.error(Globals.CIM_ERROR_ENUMERATE % pp) return FAIL - status = verify_fields(pool_list, mempool, get_typed_class(virt, mp_cn)) - - try: - propool = enumerate(ip, pp_cn, key_list, virt) - except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % pp_cn) - return FAIL - status = verify_fields(pool_list, propool, get_typed_class(virt, pp_cn)) + status = verify_fields(pool_list, propool, pp) if virt != 'LXC': try: - diskpool = enumerate(ip, dp_cn, key_list, virt) + diskpool = EnumInstances(ip, dp) except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % dp_cn) + logger.error(Globals.CIM_ERROR_ENUMERATE % dp) return FAIL - status = verify_fields(pool_list, diskpool, get_typed_class(virt, dp_cn)) + status = verify_fields(pool_list, diskpool, dp) try: - netpool = enumerate(ip, np_cn, key_list, virt) + netpool = EnumInstances(ip, np) except Exception: - logger.error(Globals.CIM_ERROR_ENUMERATE % np_cn) + logger.error(Globals.CIM_ERROR_ENUMERATE % np) return FAIL - status = verify_fields(pool_list, netpool, get_typed_class(virt, np_cn)) + status = verify_fields(pool_list, netpool, np) return status From yunguol at cn.ibm.com Tue Oct 14 05:41:23 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 14 Oct 2008 13:41:23 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance In-Reply-To: <48F3A9A2.6060606@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-14 04:03:46: > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1223891987 25200 > > # Node ID 7cf9ca34ef7b5f8a9f3762f68185c6bd42252e67 > > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > > [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to > call new GetInstance > > > > Signed-off-by: Guolian Yun > > > > diff -r c7eaf17bd591 -r 7cf9ca34ef7b suites/libvirt- > cim/cimtest/ComputerSystem/04_defineStartVS.py > > --- a/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS. > py Fri Oct 10 03:08:12 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/04_defineStartVS. > py Mon Oct 13 02:59:47 2008 -0700 > > This test fails for me with Xen: > > ComputerSystem - 04_defineStartVS.py: FAIL > ERROR - Failed to Start the dom: domguest > > It fails without your patch applied, so I've applied this patch. > However, can you take a look to see why it might be failing? I don't get any updates from repository. Would you please check this? =) Thanks! > > 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 Tue Oct 14 05:50:30 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 13 Oct 2008 22:50:30 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fixing 01_forward.py tc of HostedResourcePool Message-ID: <036da425d72c339cdd37.1223963430@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1223963406 25200 # Node ID 036da425d72c339cdd379b18c510f08b5c7918cd # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] #2 Fixing 01_forward.py tc of HostedResourcePool. The tc would fails in case if there is more than one pool for a particular devtype. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r c7eaf17bd591 -r 036da425d72c suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Mon Oct 13 22:50:06 2008 -0700 @@ -24,6 +24,7 @@ # import sys +from sets import Set from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib.common_util import get_host_info @@ -39,14 +40,14 @@ @do_main(sup_types) def main(): options = main.options - + virt = options.virt keys = ['Name', 'CreationClassName'] - status, host_sys, host_cn = get_host_info(options.ip, options.virt) + status, host_sys, host_cn = get_host_info(options.ip, virt) if status != PASS: logger.error("Error in calling get_host_info function") return FAIL try: - assoc_cn = get_typed_class(options.virt, "HostedResourcePool") + assoc_cn = get_typed_class(virt, "HostedResourcePool") pool = assoc.AssociatorNames(options.ip, assoc_cn, host_cn, @@ -66,26 +67,51 @@ else: logger.error("No pool returned") return FAIL + + 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] = ['DiskPool/%s' % default_pool_name] + exp_pllist[npool] = ['NetworkPool/%s' %default_network_name] + exp_pllist[ppool] = ['ProcessorPool/0'] try: + res_pllist = {} for items in pool: - cname = items.classname - if cname.find("MemoryPool") >=0 and items['InstanceID'] != \ - "MemoryPool/0": - raise Exception("%s does not match MemoryPool/0", - items['InstanceID']) - elif cname.find("ProcessorPool") >=0 and items['InstanceID'] != \ - "ProcessorPool/0": - raise Exception("%s does not match ProcessorPool/0", - items['InstanceID']) - elif cname.find("NetworkPool") >=0 and items['InstanceID'] != \ - "NetworkPool/%s" %default_network_name: - raise Exception("%s does not match NetworkPool/%s", - items['InstanceID'], default_network_name) - elif cname.find("DiskPool") >=0 and items['InstanceID'] != \ - "DiskPool/%s" % default_pool_name: - raise Exception("%s does not match DiskPool/%s", - items['InstanceID'], default_pool_name) + # The dict has some elements + if len(res_pllist) != 0: + # If the dict already has the key we append the new value + if items.classname in res_pllist.keys(): + list = [] + list = res_pllist[items.classname] + list.append(items['InstanceID']) + res_pllist[items.classname] = list + else: + # If the dict is not empty, but does not yet contain + # items.classname, we create new item + res_pllist[items.classname] = [items['InstanceID']] + else: + # When the dict is empty + res_pllist[items.classname] = [items['InstanceID']] + + #Verifying we get all the expected pool class info + if len(Set(exp_pllist.keys()) - Set(res_pllist.keys())) != 0: + logger.error("Pool Class mismatch") + raise Exception("Expected Pool class list: %s \n \t Got: %s" + % (sorted(exp_pllist.keys()), + sorted(res_pllist.keys()))) + + #Verifying that we get the atleast the expected instanceid + #for every pool class + for key in exp_pllist.keys(): + if Set(exp_pllist[key]) != Set(res_pllist[key]): + logger.error("InstanceID mismatch") + raise Exception("Expected InstanceID: %s \n \t Got: %s" + % (sorted(exp_pllist[key]), + sorted(res_pllist[key]))) except Exception, details: logger.error(details) return FAIL From yunguol at cn.ibm.com Tue Oct 14 06:06:57 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 23:06:57 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update ComputerSystem.01, 02, 03 to call new Enum* and GetInstance Message-ID: # HG changeset patch # User Guolian Yun # Date 1223964411 25200 # Node ID c64cbf3068d46c66fd9ce425bf4621e67765399b # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] #2 Update ComputerSystem.01, 02, 03 to call new Enum* and GetInstance Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r c64cbf3068d4 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Oct 13 23:06:51 2008 -0700 @@ -26,6 +26,7 @@ from XenKvmLib.const import do_main from XenKvmLib.const import do_main from XenKvmLib import enumclass from VirtLib import live +from XenKvmLib.classes import get_typed_class from VirtLib import utils from CimTest import Globals from CimTest.ReturnCodes import PASS, FAIL @@ -37,9 +38,9 @@ def main(): options = main.options status = PASS - keys = ['Name', 'CreationClassName'] + cs_class = get_typed_class(options.virt, 'ComputerSystem') try: - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) + cs = enumclass.EnumInstances(options.ip, cs_class) live_cs = live.domain_list(options.ip, options.virt) for system in cs: name = system.name diff -r c7eaf17bd591 -r c64cbf3068d4 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Mon Oct 13 23:06:51 2008 -0700 @@ -27,6 +27,7 @@ from XenKvmLib import enumclass from XenKvmLib import enumclass from VirtLib import live from VirtLib import utils +from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP @@ -48,11 +49,10 @@ def main(): logger.error("System has defined domains; unable to run") return SKIP - cn = "%s_ComputerSystem" % options.virt + cn = get_typed_class(options.virt, 'ComputerSystem') - keys = ['Name', 'CreationClassName'] try: - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) + cs = enumclass.EnumInstances(options.ip, cn) except Exception, details: logger.error(CIM_ERROR_ENUMERATE, cn) diff -r c7eaf17bd591 -r c64cbf3068d4 suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Mon Oct 13 23:06:51 2008 -0700 @@ -49,9 +49,9 @@ def main(): Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom) return status - keys = ['Name', 'CreationClassName'] + cs_class = get_typed_class(options.virt, 'ComputerSystem') try: - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) + cs = enumclass.EnumInstances(options.ip, cs_class) if len(cs) == 0: raise Exception('No cs instance returned') for dom in cs: From yunguol at cn.ibm.com Tue Oct 14 05:51:12 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 14 Oct 2008 13:51:12 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update ComputerSystem.01, 02, 03&05 to call new Enum* and GetInstance In-Reply-To: <48F3539F.8000906@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-13 21:56:47: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1223887550 25200 > > # Node ID 6c36af362f520ca37f8440a78f850520d6758dcf > > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > > [TEST] Update ComputerSystem.01,02,03&05 to call new Enum* and GetInstance > > > > Signed-off-by: Guolian Yun > > > > diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt- > cim/cimtest/ComputerSystem/01_enum.py > > --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri > Oct 10 03:08:12 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon > Oct 13 01:45:50 2008 -0700 > > @@ -26,6 +26,7 @@ > > from XenKvmLib.const import do_main > > from XenKvmLib import enumclass > > from VirtLib import live > > +from XenKvmLib.classes import get_typed_class > > from VirtLib import utils > > from CimTest import Globals > > from CimTest.ReturnCodes import PASS, FAIL > > @@ -37,9 +38,9 @@ > > options = main.options > > status = PASS > > > > - keys = ['Name', 'CreationClassName'] > > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > > try: > > - cs = enumclass.enumerate(options.ip, 'ComputerSystem', > keys, options.virt) > > + cs = enumclass.EnumInstances(options.ip, cs_class) > > live_cs = live.domain_list(options.ip, options.virt) > > for system in cs: > > name = system.name > > diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt- > cim/cimtest/ComputerSystem/02_nosystems.py > > --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py > Fri Oct 10 03:08:12 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py > Mon Oct 13 01:45:50 2008 -0700 > > @@ -27,6 +27,7 @@ > > from XenKvmLib import enumclass > > from VirtLib import live > > from VirtLib import utils > > +from XenKvmLib.classes import get_typed_class > > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > > from XenKvmLib.const import do_main > > from CimTest.ReturnCodes import PASS, FAIL, SKIP > > @@ -48,11 +49,10 @@ > > logger.error("System has defined domains; unable to run") > > return SKIP > > > > - cn = "%s_ComputerSystem" % options.virt > > + cn = get_typed_class(options.virt, 'ComputerSystem') > > > > - keys = ['Name', 'CreationClassName'] > > try: > > - cs = enumclass.enumerate(options.ip, 'ComputerSystem', > keys, options.virt) > > + cs = enumclass.EnumInstances(options.ip, cn) > > > > except Exception, details: > > logger.error(CIM_ERROR_ENUMERATE, cn) > > diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt- > cim/cimtest/ComputerSystem/03_defineVS.py > > --- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py > Fri Oct 10 03:08:12 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py > Mon Oct 13 01:45:50 2008 -0700 > > @@ -49,9 +49,9 @@ > > Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom) > > return status > > > > - keys = ['Name', 'CreationClassName'] > > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > > try: > > - cs = enumclass.enumerate(options.ip, 'ComputerSystem', > keys, options.virt) > > + cs = enumclass.EnumInstances(options.ip, cs_class) > > if len(cs) == 0: > > raise Exception('No cs instance returned') > > for dom in cs: > > diff -r c7eaf17bd591 -r 6c36af362f52 suites/libvirt- > cim/cimtest/ComputerSystem/05_activate_defined_start.py > > --- a/suites/libvirt- > cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri Oct 10 > 03:08:12 2008 -0700 > > +++ b/suites/libvirt- > cim/cimtest/ComputerSystem/05_activate_defined_start.py Mon Oct 13 > 01:45:50 2008 -0700 > > @@ -78,7 +78,8 @@ > > 'Name' : test_dom, > > 'CreationClassName' : get_typed_class(options. > virt, 'ComputerSystem') > > } > > - cs = enumclass.getInstance(options.ip, 'ComputerSystem', > keys, options.virt) > > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > > + cs = enumclass.GetInstance(options.ip, cs_class, keys) > > > > if cs.Name == test_dom: > > from_State = cs.EnabledState > > @@ -101,7 +102,7 @@ > > > > #Get the value of the EnabledState property and RequestedState property. > > try: > > - cs= enumclass.getInstance(options.ip, 'ComputerSystem', > keys, options.virt) > > + cs= enumclass.GetInstance(options.ip, cs_class, keys) > > if cs.Name == test_dom: > > to_RequestedState = cs.RequestedState > > enabledState = cs.EnabledState > > > This tc failed for me with Xen/XenFV > ComputerSystem - 05_activate_defined_start.py: FAIL > ERROR - Exception: (1, u'CIM_ERR_FAILED: Unable to start domain') > ERROR - Unable start dom DomST1 using RequestedStateChange() > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > > Can you verify once again if fails for you also? I did test all of them for KVM, but not for Xen. So I will verify them again for Xen next time. Thanks! > > _______________________________________________ > > 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 Tue Oct 14 05:58:38 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 14 Oct 2008 11:28:38 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify VSSD.01&04 to call new EnumInstances and EnumNames In-Reply-To: References: Message-ID: <48F4350E.8010401@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-10-13 21:46:18: > > > > > > > yunguol at cn.ibm.com wrote: > > > # HG changeset patch > > > # User Guolian Yun > > > # Date 1223887006 25200 > > > # Node ID 889637339f4dad55b11e7ee153cd4f1ba89eac85 > > > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > > > [TEST] Modify VSSD.01&04 to call new EnumInstances and EnumNames > > > > > > Signed-off-by: Guolian Yun > > > > > > diff -r c7eaf17bd591 -r 889637339f4d suites/libvirt- > > cim/cimtest/VSSD/01_enum.py > > > --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Oct 10 03: > > 08:12 2008 -0700 > > > +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 13 01: > > 36:46 2008 -0700 > > > @@ -31,6 +31,7 @@ > > > from XenKvmLib import enumclass > > > from XenKvmLib.test_doms import destroy_and_undefine_all > > > from XenKvmLib.vxml import get_class > > > +from XenKvmLib.classes import get_typed_class > > > from CimTest.Globals import logger > > > from XenKvmLib.const import do_main > > > from CimTest.ReturnCodes import PASS, FAIL > > > @@ -53,9 +54,8 @@ > > > > > > try: > > > live_cs = live.domain_list(options.ip, options.virt) > > > - key_list = ["InstanceID"] > > > - syslst = enumclass.enumerate(options.ip, > > "VirtualSystemSettingData", > > > - key_list, options.virt) > > > + vssd_class = get_typed_class(options.virt, > > 'VirtualSystemSettingData') > > > + syslst = enumclass.EnumInstances(options.ip, vssd_class) > > > > > > found = 0 > > > for vssd in syslst : > > > > > +1 for above. > > > diff -r c7eaf17bd591 -r 889637339f4d suites/libvirt- > > cim/cimtest/VSSD/04_vssd_to_rasd.py > > > --- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Fri Oct > > 10 03:08:12 2008 -0700 > > > +++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Mon Oct > > 13 01:36:46 2008 -0700 > > > @@ -117,7 +117,7 @@ > > > status = PASS > > > try: > > > classname = get_typed_class(virt, > 'VirtualSystemSettingData') > > > - vssd = enumclass.enumerate_inst(server, eval('enumclass.' > > + classname), virt) > > > + vssd = enumclass.EnumNames(server, classname) > > > if len(vssd) < 1 : > > > logger.error("%s returned %i %s objects, expected > > atleast 1" % (classname, len(vssd), 'VSSD')) > > > status = FAIL > > > > > This fails with sblim-base-provider with the following error: > > VSSD - 04_vssd_to_rasd.py: FAIL > > ERROR - Xen_VirtualSystemSettingDataComponent returned 3 > > Xen_VirtualSystemSettingData objects, expected 4 > > Good catch. > This tc fails for me without modification. All my test are tested > without sblim base provider. > If it also fails without my updates, would you please add this tc to > the sblim-tc-failure-list? > Also, do you think it's better to apply it firstly, then follow up > patches to fix them with sblim-base provider. > > Thanks! Any idea, why is the test case failure not reported when we did a batch run for Xen/XenFV/KVM ? If the changes that are required for sblim-base-providers are minimal, then I think we should be sending in the same patch. If not, in order to avoid confusion about the fix in a patch we can send them separately. Thanks and Regards, Deepti. From yunguol at cn.ibm.com Tue Oct 14 05:36:45 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 14 Oct 2008 13:36:45 +0800 Subject: [Libvirt-cim] Remove enumerate() function in device.py and update tc to call new function in enumclass.py In-Reply-To: <48F36BC6.3050402@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-13 23:39:50: > Deepti B Kalakeri wrote: > > > > > > Guo Lian Yun wrote: > >> > >> Hi, > >> > >> Do you think it's better to remove enumerate() function in device.py? > >> Then we have to update tc to call new EnumInstances() function in > >> enumclass.py. > >> Who would like to take up this work? If not, I will cook up these > >> patches. > >> > > Yes it would be better to have a single Enumerate function in one > > library file. > > I think we will have lot of tc updates if we take this up. > > > > Kaitlin, > > What do you suggest? > > Yes, I agree. The enumerate() functions in device.py are no longer > needed. The functions in enumclass.py should cover this. > > Daisy - can you work up a patch for this? I can work up it later. I'm now working on tc to call new EnumInstances() and GetInstance() functions. Due to a number of tc fails with sblim base provider installed, I have to fix them together with new EnumInstances() and GetInstance() calling. Whatever, I will try to work on it as soon as possible. Deepti - Would you please run the cimtest for Xen with sblim base provider installed and update the sblim-tc-base-failure in the wiki? Thanks! > > 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 Oct 14 06:22:58 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 13 Oct 2008 23:22:58 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify LogicalDisk.02 to call new EnumInstances Message-ID: <9c4002ff9f71246bb5e3.1223965378@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223965373 25200 # Node ID 9c4002ff9f71246bb5e3e09cc9df0261b32fd90a # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Modify LogicalDisk.02 to call new EnumInstances Once all tc updated completion, follow up patch will remove the enumerate function in device.py Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 9c4002ff9f71 suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Mon Oct 13 23:22:53 2008 -0700 @@ -26,8 +26,8 @@ import sys import sys import pywbem from time import sleep -from XenKvmLib import devices from XenKvmLib import enumclass +from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP @@ -38,8 +38,8 @@ def clean_system(host, virt='Xen'): def clean_system(host, virt='Xen'): timer_count = 10 for count in range(0, timer_count): - keys = ['Name', 'CreationClassName'] - l = enumclass.enumerate(host, 'ComputerSystem', keys, virt) + cs = get_typed_class(virt, 'ComputerSystem') + l = enumclass.EnumInstances(host, cs) if len(l) == 0: return True if virt == 'Xen' or virt == 'XenFV': @@ -58,10 +58,10 @@ def main(): key_list = ["DeviceID", "CreationClassName", "SystemName", "SystemCreationClassName"] - cn = "LogicalDisk" + cn = get_typed_class(options.virt, "LogicalDisk") try: - devs = devices.enumerate(options.ip, cn, key_list, options.virt) + devs = enumclass.Enumerate(options.ip, cn) except Exception, details: logger.error(CIM_ERROR_ENUMERATE, cn) From fujimura.toshifumi at np.css.fujitsu.com Tue Oct 14 06:19:57 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Tue, 14 Oct 2008 15:19:57 +0900 Subject: [Libvirt-cim] Errors on running Cimtest Message-ID: <48F43A0D.30400@np.css.fujitsu.com> Hello! I made Cimtest environment. But I have some trobles on running cimtest.. These errors are not in Test Run Reports "http://wiki.libvirt.org/page/Cimtest_testruns". Would you give me any suggestion of this message? I check httpd is running on PyWBEM machine. But "Socket.error" is appeared (occured on cim_http.wbem_request in cim_operations.py). ====================================================================================== Testing KVM hypervisor -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: FAIL ERROR - KVM_MemoryPool did not return any instances ERROR - Only 0 pools returned, expected at least 4 Socket error: (111, 'Connection refused') Socket error: (111, 'Connection refused') -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL ERROR - Unexpected rc code 0 and description Socket error: (111, 'Connection refused') ERROR - ------ FAILED: Invalid InstanceID Key Value.------ -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: PASS -------------------------------------------------------------------- ====================================================================================== Works for me. Toshifumi Fujimura. From yunguol at cn.ibm.com Tue Oct 14 06:42:21 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 14 Oct 2008 14:42:21 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 14 2008 In-Reply-To: <48F42A31.9030604@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-14 13:12:17: > > > Guo Lian Yun wrote: > > > > ================================================= > > KVM on sfcb Test Run Summary for Oct 14 2008 > > ================================================= > > Distro: Fedora release 9.90.1 (Rawhide) > > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > > libvirt: 0.4.5 > > Hypervisor: QEMU 0.9.1 > > CIMOM: sfcb sfcbd 1.3.3preview > > Libvirt-cim revision: 715+ > > Libvirt-cim changeset: f7dfc83a73ac+ > > ================================================= > > FAIL : 1 > > XFAIL : 3 > > SKIP : 4 > > PASS : 127 > > ----------------- > > Total : 135 > > ================================================= > > FAIL Test Summary: > > ComputerSystemIndication - 01_created_indication.py: FAIL > > > > ================================================= > > XFAIL Test Summary: > > ComputerSystem - 32_start_reboot.py: XFAIL > > ComputerSystem - 33_suspend_reboot.py: XFAIL > > SettingsDefineCapabilities - 03_forward_errs.py: XFAIL > > ComputerSystem - 32_start_reboot.py & 33_suspend_reboot.py are valid tc of XFAIL, which also have bug no. SettingsDefineCapabilities - 03_forward_errs.py is not a valid tc of XFAIL, we have to fix it. Thanks! > Can you verify if its a valid case of XFAIL. If yes then please pass > appropriate bug no. > > 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 yunguol at cn.ibm.com Tue Oct 14 06:44:04 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 14 Oct 2008 14:44:04 +0800 Subject: [Libvirt-cim] Errors on running Cimtest In-Reply-To: <48F43A0D.30400@np.css.fujitsu.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-14 14:19:57: > Hello! > > I made Cimtest environment. But I have some trobles on running cimtest.. > These errors are not in Test Run Reports > "http://wiki.libvirt.org/page/Cimtest_testruns". > Would you give me any suggestion of this message? > > I check httpd is running on PyWBEM machine. > But "Socket.error" is appeared (occured on cim_http.wbem_request in > cim_operations.py). Pls check if your CIMOM(sfcb, pegasus or others) is running. > > ====================================================================================== > Testing KVM hypervisor > -------------------------------------------------------------------- > AllocationCapabilities - 01_enum.py: FAIL > ERROR - KVM_MemoryPool did not return any instances > ERROR - Only 0 pools returned, expected at least 4 > Socket error: (111, 'Connection refused') > Socket error: (111, 'Connection refused') > -------------------------------------------------------------------- > AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL > ERROR - Unexpected rc code 0 and description Socket error: (111, > 'Connection refused') > > ERROR - ------ FAILED: Invalid InstanceID Key Value.------ > -------------------------------------------------------------------- > ComputerSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 02_nosystems.py: PASS > -------------------------------------------------------------------- > ====================================================================================== > > Works for me. > > Toshifumi Fujimura. > > _______________________________________________ > 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 Oct 14 07:19:33 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 14 Oct 2008 00:19:33 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update common_util.py to call new EnumInstances Message-ID: <1fe0fcbda10f32261c3f.1223968773@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1223968768 25200 # Node ID 1fe0fcbda10f32261c3f64f8d77ab4639c2b77ae # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Update common_util.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r 1fe0fcbda10f suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 14 00:19:28 2008 -0700 @@ -217,7 +217,8 @@ def get_host_info(server, virt="Xen"): # sblim-base-provider provider related changes ret, linux_cs = check_sblim(server) - host_info = enumclass.enumerate(server, 'HostSystem', keys, virt) + hs_class = get_typed_class(server, 'HostSystem') + host_info = enumclass.EnumInstances(server, hs_class) if ret == PASS: host_sys = linux_cs elif len(host_info) == 1: @@ -499,8 +500,9 @@ def check_sblim(server, virt='Xen'): Globals.CIM_NS = 'root/cimv2' keys = ['Name', 'CreationClassName'] linux_cs = None + cs = 'Linux_ComputerSystem' try: - linux = enumclass.enumerate(server, 'ComputerSystem', keys, 'Linux') + linux = enumclass.EnumInstances(server, cs) if len(linux) == 1: status = PASS linux_cs = linux[0] From yunguol at cn.ibm.com Tue Oct 14 07:24:39 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 14 Oct 2008 00:24:39 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify VirtualSystemSnapshotServiceCapabilities/01_enum.py to call new EnumNames Message-ID: # HG changeset patch # User Guolian Yun # Date 1223969074 25200 # Node ID cf9bea2069bd6f692d443281bb86d3e56936b985 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Modify VirtualSystemSnapshotServiceCapabilities/01_enum.py to call new EnumNames Signed-off-by: Guolian Yun diff -r c7eaf17bd591 -r cf9bea2069bd suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Tue Oct 14 00:24:34 2008 -0700 @@ -42,9 +42,7 @@ def main(): instid = 'SnapshotCapabilities' try: - vs_sservicecap = enumclass.enumerate_inst(options.ip, - "VirtualSystemSnapshotServiceCapabilities", - options.virt) + vs_sservicecap = enumclass.EnumNames(options.ip, cn) except Exception, detail: logger.error(CIM_ERROR_ENUMERATE, cn) logger.error("Exception: %s", detail) From deeptik at linux.vnet.ibm.com Tue Oct 14 10:04:39 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 14 Oct 2008 15:34:39 +0530 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Add get_default_rasds() and get_rasd_templates() to rasd.py In-Reply-To: <25b12a8b5257cd983e49.1223567689@localhost.localdomain> References: <25b12a8b5257cd983e49.1223567689@localhost.localdomain> Message-ID: <48F46EB7.2000006@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1223515128 25200 > # Node ID 25b12a8b5257cd983e4926875dc619812fc1ce88 > # Parent c2c64b0ee95d55ac09375f0a3518d60fd569ee7d > [TEST] Add get_default_rasds() and get_rasd_templates() to rasd.py > > NOTE: This patch only works with recent versions of pywbem (svn checkout of 09/04/2008 or later). > > These functions can be used to get the template RASD instances. Instead of building instances by hand (see default_vssd_rasd_str()), the test cases should be using the template RASDs provided by the SettingsDefineCapabilities association. > > get_rasd_templates() - returns the min, max, increment, and default template RASD instances for a given AllocationCapabilities instance. > > get_default_rasds() - returns just the default template RASD instances for the resource pools. > > Add inst_to_mof() to convert instances to mof format. This is only needed for libcmpiutil version 0.4 and older. > > Add get_default_rasd_mofs() - returns default template RASDs in mof format. > > Signed-off-by: Kaitlin Rupert > > diff -r c2c64b0ee95d -r 25b12a8b5257 suites/libvirt-cim/lib/XenKvmLib/classes.py > --- a/suites/libvirt-cim/lib/XenKvmLib/classes.py Wed Oct 08 12:59:17 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py Wed Oct 08 18:18:48 2008 -0700 > @@ -44,3 +44,18 @@ > > return cn[dash_index+1:] > > +#FIXME This function is only needed for libcmpiutil versions 0.4 and later. > +#Once version 0.4 is obsolete, this function should be removed. > +def inst_to_mof(inst): > + mof_str = inst.tomof() > + > + mof_inst = "" > + > + for str in mof_str.splitlines(): > + if str.endswith('{') or not str.endswith('NULL;'): > + mof_inst += "%s\n" % str > + elif str.endswith('};'): > + mof_inst += "%s\n" % str > The above two conditions can be combined as follows: if str.endswith('{') or str.endswith('};') or not str.endswith('NULL;'): Because all of them are mutually exclusive and will not occur on the same line at any given time. Any one of them is true we need to store the line. Any specific reason for having separate conditions instead of it having it in one. > + > + return mof_inst > + > diff -r c2c64b0ee95d -r 25b12a8b5257 suites/libvirt-cim/lib/XenKvmLib/rasd.py > --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Oct 08 12:59:17 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Oct 08 18:18:48 2008 -0700 > @@ -24,8 +24,11 @@ > from CimTest.Globals import logger > from CimTest.ReturnCodes import FAIL, PASS > from XenKvmLib import vxml > -from XenKvmLib.classes import get_typed_class > - > +from XenKvmLib import const > +from XenKvmLib.classes import get_typed_class, get_class_type > +from XenKvmLib.enumclass import GetInstance > +from XenKvmLib.assoc import Associators > +from XenKvmLib.const import default_pool_name, default_network_name > > pasd_cn = 'ProcResourceAllocationSettingData' > nasd_cn = 'NetResourceAllocationSettingData' > @@ -165,3 +168,63 @@ > memrasd_list['VirtualQuantity']) > status = FAIL > return status > + > +def get_rasd_templates(host_ip, type, pool_id): > + ac_cn = get_typed_class(type, "AllocationCapabilities") > + an_cn = get_typed_class(type, "SettingsDefineCapabilities") > + > + templates = [] > + > + try: > + key_list = {"InstanceID" : pool_id } > + > + inst = GetInstance(host_ip, ac_cn, key_list) > + > + temps = Associators(host_ip, an_cn, ac_cn, InstanceID=inst.InstanceID) > + > + for temp in temps: > + templates.append(temp) > + > + except Exception, detail: > + logger.error("Exception: %s", detail) > + > + return templates > + > +def get_default_rasds(host_ip, type): > + ac_id_list = [ "MemoryPool/0", > + "DiskPool/%s" % default_pool_name, > + ] > + > + if type == "LXC": > + if const.LXC_netns_support is True: > + ac_id_list.append("NetworkPool/%s" % default_network_name) > + else: > + ac_id_list.append("NetworkPool/%s" % default_network_name) > + ac_id_list.append("ProcessorPool/0") > + > + templates = [] > + > + for id in ac_id_list: > + rasd_list = get_rasd_templates(host_ip, type, id) > + if len(rasd_list) < 1: > + logger.info("No RASD templates returned for %s", id) > + return [] > + > + for rasd in rasd_list: > + if rasd['InstanceID'] == "Default": > + templates.append(rasd) > + > + return templates > + > +def get_default_rasd_mofs(host_ip, type): > + rasds = get_default_rasds(ip, virt) > + > + rasd_mofs = [] > + > + #FIXME for libcmpiutil versions 0.4 and later, inst_to_mof() is needed. > + #This should be changed to rasd.tomof() once version 0.4 is obsolete. > + for rasd in rasds: > + rasd_mofs.append(inst_to_mof(rasd)) > + > + return rasd_mofs > + > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Oct 14 10:04:01 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 14 Oct 2008 15:34:01 +0530 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Add VirtualSystemManagementService - 14_define_sys_disk.py In-Reply-To: <1b152e5e9a47ec932b5c.1223567690@localhost.localdomain> References: <1b152e5e9a47ec932b5c.1223567690@localhost.localdomain> Message-ID: <48F46E91.1070005@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1223567675 25200 > # Node ID 1b152e5e9a47ec932b5c18bb26f226d5896b5432 > # Parent 25b12a8b5257cd983e4926875dc619812fc1ce88 > [TEST] Add VirtualSystemManagementService - 14_define_sys_disk.py > > This test defines a guest with a very large disk image. This test can be updated in the future to include other disk specific DefineSystem() tests. > > Signed-off-by: Kaitlin Rupert > > diff -r 25b12a8b5257 -r 1b152e5e9a47 suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Thu Oct 09 08:54:35 2008 -0700 > @@ -0,0 +1,103 @@ > +#!/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 os > +from VirtLib.utils import run_remote > +from CimTest.Globals import logger > +from CimTest.ReturnCodes import FAIL, PASS > +from XenKvmLib.const import do_main, _image_dir > +from XenKvmLib.common_util import create_using_definesystem > +from XenKvmLib.test_doms import destroy_and_undefine_domain > +from XenKvmLib.classes import get_typed_class, inst_to_mof > +from XenKvmLib.rasd import get_default_rasds > +from XenKvmLib.vsms import get_vssd_class, default_vssd_rasd_str > + > +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > +test_dom = 'rstest_disk_domain' > + > +def make_long_disk_path(ip): > + path = os.path.join(_image_dir, 'cimtest_large_image') > + > + cmd = "dd if=/dev/zero of=%s bs=1M count=1 seek=8192" % path > + > + rc, out = run_remote(ip, cmd) > + if rc != 0: > + logger.error("Unable to create large disk image") > + logger.error(out) > + return None > + > + return path > + > +def get_vssd_rasd(ip, virt, addr): > + class_vssd = get_vssd_class(virt) > + vssd = class_vssd(test_dom, virt) > + > + vssd, rasd = default_vssd_rasd_str( > + dom_name=test_dom, virt=virt) > The above line can be wrapped in a single 80 column line. We do not require default_vssd_rasd_str(). > + > + rasds = get_default_rasds(ip, virt) > + > + for i in range(0, len(rasds)): > just range(len(rasds)) will work. > + if rasds[i]['PoolID'].find('DiskPool') >= 0: > + rasds[i]['Address'] = addr > + rasds[i] = inst_to_mof(rasds[i]) > + > + params = { 'vssd' : vssd, > + 'rasd' : rasds > + } > + > + return params > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + try: > + addr = make_long_disk_path(options.ip) > + if addr is None: > + raise Exception("Unable to create large disk image") > + > + define_params = get_vssd_rasd(options.ip, options.virt, addr) > + if len(define_params) != 2: > + raise Exception("Unable to get VSSD and RASDs for %s" % test_dom) > + > + status = create_using_definesystem(test_dom, options.ip, > + params=define_params, ref_config="", > + virt=options.virt) > + if status != PASS: > + raise Exception("Unable to define %s" % test_dom) > + > + except Exception, details: > + logger.error(details) > + status = FAIL > + > + if os.path.exists(addr): > + os.remove(addr) > + > + destroy_and_undefine_domain(test_dom, 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 > From fujimura.toshifumi at np.css.fujitsu.com Tue Oct 14 10:19:12 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Tue, 14 Oct 2008 19:19:12 +0900 Subject: [Libvirt-cim] Errors on running Cimtest In-Reply-To: References: Message-ID: <48F47220.2040302@np.css.fujitsu.com> Thanks for your reply. After your suggestion, I check tog-pegasus settings. I found it needs to add following changes. ===================================================================== 1.enable CIM to accept http-access "cimconfig -p -s enableHttpConnection=true" 2.enable tog-pegasus to access by all users "/etc/Pegasus/access.conf" from -: ALL EXCEPT pegasus:wbemNetwork -: ALL EXCEPT pegasus root:wbemLocal to +: ALL EXCEPT :wbemNetwork +: ALL EXCEPT :wbemLocal ===================================================================== After above changes, I succeed to connect PyWBEM via socket. Thanks Toshifumi Fujimura. > > libvirt-cim-bounces at redhat.com wrote on 2008-10-14 14:19:57: > > > Hello! > > > > I made Cimtest environment. But I have some trobles on running cimtest.. > > These errors are not in Test Run Reports > > "http://wiki.libvirt.org/page/Cimtest_testruns". > > Would you give me any suggestion of this message? > > > > I check httpd is running on PyWBEM machine. > > But "Socket.error" is appeared (occured on cim_http.wbem_request in > > cim_operations.py). > > Pls check if your CIMOM(sfcb, pegasus or others) is running. > > > > > ====================================================================================== > > Testing KVM hypervisor > > -------------------------------------------------------------------- > > AllocationCapabilities - 01_enum.py: FAIL > > ERROR - KVM_MemoryPool did not return any instances > > ERROR - Only 0 pools returned, expected at least 4 > > Socket error: (111, 'Connection refused') > > Socket error: (111, 'Connection refused') > > -------------------------------------------------------------------- > > AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL > > ERROR - Unexpected rc code 0 and description Socket error: (111, > > 'Connection refused') > > > > ERROR - ------ FAILED: Invalid InstanceID Key Value.------ > > -------------------------------------------------------------------- > > ComputerSystem - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 02_nosystems.py: PASS > > -------------------------------------------------------------------- > > > ====================================================================================== > > > > Works for me. > > > > Toshifumi Fujimura. > > > > _______________________________________________ > > 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 From deeptik at linux.vnet.ibm.com Tue Oct 14 11:14:23 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 14 Oct 2008 16:44:23 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update ComputerSystem.01, 02, 03 to call new Enum* and GetInstance In-Reply-To: References: Message-ID: <48F47F0F.9030807@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223964411 25200 > # Node ID c64cbf3068d46c66fd9ce425bf4621e67765399b > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] #2 Update ComputerSystem.01, 02, 03 to call new Enum* and GetInstance > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r c64cbf3068d4 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Oct 13 23:06:51 2008 -0700 > @@ -26,6 +26,7 @@ from XenKvmLib.const import do_main > from XenKvmLib.const import do_main > from XenKvmLib import enumclass > from VirtLib import live > +from XenKvmLib.classes import get_typed_class > from VirtLib import utils > from CimTest import Globals > from CimTest.ReturnCodes import PASS, FAIL > @@ -37,9 +38,9 @@ def main(): > options = main.options > status = PASS > > - keys = ['Name', 'CreationClassName'] > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > try: > - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) > + cs = enumclass.EnumInstances(options.ip, cs_class) > live_cs = live.domain_list(options.ip, options.virt) > for system in cs: > name = system.name > diff -r c7eaf17bd591 -r c64cbf3068d4 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Mon Oct 13 23:06:51 2008 -0700 > @@ -27,6 +27,7 @@ from XenKvmLib import enumclass > from XenKvmLib import enumclass > from VirtLib import live > from VirtLib import utils > +from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, SKIP > @@ -48,11 +49,10 @@ def main(): > logger.error("System has defined domains; unable to run") > return SKIP > > - cn = "%s_ComputerSystem" % options.virt > + cn = get_typed_class(options.virt, 'ComputerSystem') > > - keys = ['Name', 'CreationClassName'] > try: > - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) > + cs = enumclass.EnumInstances(options.ip, cn) > > except Exception, details: > logger.error(CIM_ERROR_ENUMERATE, cn) > diff -r c7eaf17bd591 -r c64cbf3068d4 suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Mon Oct 13 23:06:51 2008 -0700 > @@ -49,9 +49,9 @@ def main(): > Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom) > return status > > - keys = ['Name', 'CreationClassName'] > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > try: > - cs = enumclass.enumerate(options.ip, 'ComputerSystem', keys, options.virt) > + cs = enumclass.EnumInstances(options.ip, cs_class) > if len(cs) == 0: > raise Exception('No cs instance returned') > for dom in cs: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Oct 14 11:17:59 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 14 Oct 2008 16:47:59 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify LogicalDisk.02 to call new EnumInstances In-Reply-To: <9c4002ff9f71246bb5e3.1223965378@elm3b217.beaverton.ibm.com> References: <9c4002ff9f71246bb5e3.1223965378@elm3b217.beaverton.ibm.com> Message-ID: <48F47FE7.8060800@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223965373 25200 > # Node ID 9c4002ff9f71246bb5e3e09cc9df0261b32fd90a > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify LogicalDisk.02 to call new EnumInstances > > Once all tc updated completion, follow up patch will remove > the enumerate function in device.py > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 9c4002ff9f71 suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py > --- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Mon Oct 13 23:22:53 2008 -0700 > @@ -26,8 +26,8 @@ import sys > import sys > import pywbem > from time import sleep > -from XenKvmLib import devices > from XenKvmLib import enumclass > +from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, SKIP > @@ -38,8 +38,8 @@ def clean_system(host, virt='Xen'): > def clean_system(host, virt='Xen'): > timer_count = 10 > for count in range(0, timer_count): > - keys = ['Name', 'CreationClassName'] > - l = enumclass.enumerate(host, 'ComputerSystem', keys, virt) > + cs = get_typed_class(virt, 'ComputerSystem') > + l = enumclass.EnumInstances(host, cs) > if len(l) == 0: > return True > if virt == 'Xen' or virt == 'XenFV': > @@ -58,10 +58,10 @@ def main(): > key_list = ["DeviceID", "CreationClassName", "SystemName", > "SystemCreationClassName"] > > - cn = "LogicalDisk" > + cn = get_typed_class(options.virt, "LogicalDisk") > > try: > - devs = devices.enumerate(options.ip, cn, key_list, options.virt) > + devs = enumclass.Enumerate(options.ip, cn) > > except Exception, details: > logger.error(CIM_ERROR_ENUMERATE, cn) > > Tested this on KVM and it failed with the following error : LogicalDisk - 02_nodevs.py: FAIL ERROR - Failed to enumerate the class of KVM_LogicalDisk ERROR - 'module' object has no attribute 'Enumerate' > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Oct 14 11:25:16 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 14 Oct 2008 16:55:16 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update common_util.py to call new EnumInstances In-Reply-To: <1fe0fcbda10f32261c3f.1223968773@elm3b217.beaverton.ibm.com> References: <1fe0fcbda10f32261c3f.1223968773@elm3b217.beaverton.ibm.com> Message-ID: <48F4819C.3010709@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223968768 25200 > # Node ID 1fe0fcbda10f32261c3f64f8d77ab4639c2b77ae > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Update common_util.py to call new EnumInstances > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 1fe0fcbda10f suites/libvirt-cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 14 00:19:28 2008 -0700 > @@ -217,7 +217,8 @@ def get_host_info(server, virt="Xen"): > # sblim-base-provider provider related changes > > ret, linux_cs = check_sblim(server) > - host_info = enumclass.enumerate(server, 'HostSystem', keys, virt) > + hs_class = get_typed_class(server, 'HostSystem') > + host_info = enumclass.EnumInstances(server, hs_class) > if ret == PASS: > host_sys = linux_cs > elif len(host_info) == 1: > @@ -499,8 +500,9 @@ def check_sblim(server, virt='Xen'): > Globals.CIM_NS = 'root/cimv2' > keys = ['Name', 'CreationClassName'] > linux_cs = None > + cs = 'Linux_ComputerSystem' > try: > - linux = enumclass.enumerate(server, 'ComputerSystem', keys, 'Linux') > + linux = enumclass.EnumInstances(server, cs) > if len(linux) == 1: > status = PASS > linux_cs = linux[0] > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Oct 14 11:28:00 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 14 Oct 2008 16:58:00 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modify VirtualSystemSnapshotServiceCapabilities/01_enum.py to call new EnumNames In-Reply-To: References: Message-ID: <48F48240.5070300@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223969074 25200 > # Node ID cf9bea2069bd6f692d443281bb86d3e56936b985 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify VirtualSystemSnapshotServiceCapabilities/01_enum.py to call new EnumNames > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r cf9bea2069bd suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py Tue Oct 14 00:24:34 2008 -0700 > @@ -42,9 +42,7 @@ def main(): > instid = 'SnapshotCapabilities' > > try: > - vs_sservicecap = enumclass.enumerate_inst(options.ip, > - "VirtualSystemSnapshotServiceCapabilities", > - options.virt) > + vs_sservicecap = enumclass.EnumNames(options.ip, cn) > except Exception, detail: > logger.error(CIM_ERROR_ENUMERATE, cn) > logger.error("Exception: %s", detail) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Oct 14 12:10:37 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 14 Oct 2008 17:40:37 +0530 Subject: [Libvirt-cim] Remove enumerate() function in device.py and update tc to call new function in enumclass.py In-Reply-To: References: Message-ID: <48F48C3D.1090403@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-10-13 23:39:50: > > > Deepti B Kalakeri wrote: > > > > > > > > > Guo Lian Yun wrote: > > >> > > >> Hi, > > >> > > >> Do you think it's better to remove enumerate() function in > device.py? > > >> Then we have to update tc to call new EnumInstances() function in > > >> enumclass.py. > > >> Who would like to take up this work? If not, I will cook up these > > >> patches. > > >> > > > Yes it would be better to have a single Enumerate function in one > > > library file. > > > I think we will have lot of tc updates if we take this up. > > > > > > Kaitlin, > > > What do you suggest? > > > > Yes, I agree. The enumerate() functions in device.py are no longer > > needed. The functions in enumclass.py should cover this. > > > > Daisy - can you work up a patch for this? > > I can work up it later. I'm now working on tc to call new > EnumInstances() and GetInstance() > functions. Due to a number of tc fails with sblim base provider > installed, I have to fix them > together with new EnumInstances() and GetInstance() calling. > Whatever, I will try to work on > it as soon as possible. > > Deepti - Would you please run the cimtest for Xen with sblim base > provider installed and update > the sblim-tc-base-failure in the wiki? > > Thanks! I have verified the info on the wiki for sblim-base-providers yest and those are the current failures we need to fix. Thanks and Regards, Deepti. > > > > > 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 > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From deeptik at linux.vnet.ibm.com Tue Oct 14 12:42:01 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 14 Oct 2008 05:42:01 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 04_hs_to_EAPF.py tc of HostSystem to work with/without sblim-base-provider Message-ID: <3131e7898af7f8c28d18.1223988121@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1223987981 25200 # Node ID 3131e7898af7f8c28d18e9c0d92c4855b08c1052 # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 [TEST] Fixing 04_hs_to_EAPF.py tc of HostSystem to work with/without sblim-base-provider. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r c7eaf17bd591 -r 3131e7898af7 suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Fri Oct 10 03:08:12 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Tue Oct 14 05:39:41 2008 -0700 @@ -56,7 +56,7 @@ from XenKvmLib.assoc import AssociatorNames, Associators from XenKvmLib.common_util import get_host_info from XenKvmLib.classes import get_typed_class -from CimTest.ReturnCodes import PASS, FAIL, SKIP +from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.logicaldevices import verify_device_values @@ -66,6 +66,7 @@ test_mac = "00:11:22:33:44:aa" test_mem = 128 test_vcpus = 1 +bug_sblim='00007' def print_err(err, detail, cn): logger.error(err % cn) @@ -147,22 +148,23 @@ return dom_list -def get_assocname_info(server, cn, an, qcn, hostname, virt): +def get_assocname_info(server, host_cn, an, qcn, hostname): status = PASS assoc_info = [] try: - assoc_info = AssociatorNames(server, - an, - cn, - CreationClassName=cn, - Name = hostname) + assoc_info = AssociatorNames(server, an, host_cn, + CreationClassName=host_cn, + Name = hostname) if len(assoc_info) < 1: - logger.error("%s returned %i %s objects" % (an, - len(assoc_info), qcn)) - status = FAIL + if host_cn == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim), assoc_info + else: + logger.error("%s returned %i %s objects", + an, len(assoc_info), qcn) + return FAIL, assoc_info except Exception, detail: - print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn) + print_err(CIM_ERROR_ASSOCIATORNAMES, detail, host_cn) status = FAIL return status, assoc_info @@ -232,10 +234,11 @@ net_name = vsxml.xml_get_net_network() # Get the hostedResourcePool info first - cn = classname + host_cn = classname an = get_typed_class(virt, "HostedResourcePool") qcn = "Device Pool" - status, pool = get_assocname_info(server, cn, an, qcn, host_name, virt) + logger.error("DEBUG host_name is %s", host_name) + status, pool = get_assocname_info(server, host_cn, an, qcn, host_name) if status != PASS: vsxml.undefine(server) return status From deeptik at linux.vnet.ibm.com Tue Oct 14 13:12:36 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 14 Oct 2008 06:12:36 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 05_hs_gi_errs.py tc of HostSystem to work with/without sblim-base-provider Message-ID: <7b11fbb20dbfa346f4aa.1223989956@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1223989931 25200 # Node ID 7b11fbb20dbfa346f4aa4d2a8fd1731490cd26da # Parent 3131e7898af7f8c28d18e9c0d92c4855b08c1052 [TEST] Fixing 05_hs_gi_errs.py tc of HostSystem to work with/without sblim-base-provider. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r 3131e7898af7 -r 7b11fbb20dbf suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py --- a/suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py Tue Oct 14 05:39:41 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/05_hs_gi_errs.py Tue Oct 14 06:12:11 2008 -0700 @@ -29,7 +29,7 @@ # Input: # ------ # wbemcli gi 'http://localhost:5988/root/virt:Xen_HostSystem.\ -# Wrong="Xen_HostSystem",Name="mx3650a.in.ibm.com"' -nl +# Wrong="Xen_HostSystem",Name="x3650"' -nl # # Output: # ------- @@ -40,7 +40,7 @@ # Input: # ------ # wbemcli gi 'http://localhost:5988/root/virt:Xen_HostSystem.\ -# CreationClassName="Wrong",Name="mx3650a.in.ibm.com"' -nl +# CreationClassName="Wrong",Name="x3650"' -nl # # Output: # ------- @@ -51,7 +51,7 @@ # Input: # ------ # wbemcli gi 'http://localhost:5988/root/virt:Xen_HostSystem.\ -# CreationClassName="Xen_HostSystem",Wrong="mx3650a.in.ibm.com"' -nl +# CreationClassName="Xen_HostSystem",Wrong="x3650"' -nl # # Output: # ------- @@ -78,19 +78,21 @@ from XenKvmLib.common_util import get_host_info, try_getinstance from XenKvmLib.classes import get_typed_class from optparse import OptionParser -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS from XenKvmLib.const import do_main sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] expr_values = { - "invalid_ccname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND, \ - 'desc' : "No such instance (CreationClassName)" }, \ - "invalid_name" : {'rc' : pywbem.CIM_ERR_NOT_FOUND, \ - 'desc' : "No such instance (Name)" } + "invalid_ccname" : {'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : "No such instance " + "(CreationClassName)" }, + "invalid_name" : {'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : "No such instance (Name)" } } +bug_sblim='00007' @do_main(sup_types) def main(): @@ -104,45 +106,62 @@ if status != PASS: return status - conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) + conn = assoc.myWBEMConnection('http://%s' % options.ip, + (CIM_USER, CIM_PASS), CIM_NS) # 1) Test by giving Invalid CCName Key Name field = 'INVALID_CCName_KeyName' keys = { field : classname, 'Name' : host_name } - ret_value = try_getinstance(conn, classname, keys, field_name=field, \ - expr_values=expr_values['invalid_ccname'], bug_no="") + ret_value = try_getinstance(conn, classname, keys, field_name=field, + expr_values=expr_values['invalid_ccname'], + bug_no="") if ret_value != PASS: - logger.error("------ FAILED: Invalid CCName Key Name.------") - status = ret_value + if classname == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + logger.error("------ FAILED: Invalid CCName Key Name.------") + return ret_value # 2) Test by passing Invalid CCName Key Value field = 'INVALID_CCName_KeyValue' keys = { 'CreationClassName' : field, 'Name' : host_name } - ret_value = try_getinstance(conn, classname, keys, field_name=field, \ - expr_values=expr_values['invalid_ccname'], bug_no="") + ret_value = try_getinstance(conn, classname, keys, field_name=field, + expr_values=expr_values['invalid_ccname'], + bug_no="") if ret_value != PASS: - logger.error("------ FAILED: Invalid CCName Key Value.------") - status = ret_value + if classname == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + logger.error("------ FAILED: Invalid CCName Key Value.------") + return ret_value # 3) Test by giving Invalid Name Key Name field = 'INVALID_Name_KeyName' keys = { 'CreationClassName' : classname, field : host_name} - ret_value = try_getinstance(conn, classname, keys, field_name=field, \ - expr_values=expr_values['invalid_name'], bug_no="") + ret_value = try_getinstance(conn, classname, keys, field_name=field, + expr_values=expr_values['invalid_name'], + bug_no="") if ret_value != PASS: - logger.error("------ FAILED: Invalid Name Key Name.------") - status = ret_value + if classname == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + logger.error("------ FAILED: Invalid Name Key Name.------") + return ret_value # 4) Test by passing Invalid Name Key Value field = 'INVALID_Name_KeyValue' keys = { 'CreationClassName' : classname, 'Name' : field } - ret_value = try_getinstance(conn, classname, keys, field_name=field, \ - expr_values=expr_values['invalid_name'], bug_no="") + ret_value = try_getinstance(conn, classname, keys, field_name=field, + expr_values=expr_values['invalid_name'], + bug_no="") if ret_value != PASS: - logger.error("------ FAILED: Invalid Name Key Value.------") - status = ret_value + if classname == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + logger.error("------ FAILED: Invalid Name Key Value.------") + return ret_value - return status + return PASS if __name__ == "__main__": sys.exit(main()) From danms at us.ibm.com Tue Oct 14 14:47:35 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 14 Oct 2008 07:47:35 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Make VSMS honor Weight property of ProcRASD for LXC In-Reply-To: <48F3E1E0.8060004@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Mon, 13 Oct 2008 17:03:44 -0700") References: <31edd656481f4a328f16.1223921530@guaranine.danplanet.com> <48F3E1E0.8060004@linux.vnet.ibm.com> Message-ID: <877i8bs06w.fsf@caffeine.danplanet.com> KR> Getting the ObjectPath here isn't needed - it's not used elsewhere KR> in the function. Oops, the intent was to check the classname to make sure it was LXC_. Must have gotten lost in the week between starting and finishing this set :) Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 14 15:12:54 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 14 Oct 2008 08:12:54 -0700 Subject: [Libvirt-cim] Remove enumerate() function in device.py and update tc to call new function in enumclass.py In-Reply-To: References: Message-ID: <48F4B6F6.8070604@linux.vnet.ibm.com> > > > > Daisy - can you work up a patch for this? > > I can work up it later. I'm now working on tc to call new > EnumInstances() and GetInstance() > functions. Due to a number of tc fails with sblim base provider > installed, I have to fix them > together with new EnumInstances() and GetInstance() calling. Whatever, > I will try to work on > it as soon as possible. > > Deepti - Would you please run the cimtest for Xen with sblim base > provider installed and update > the sblim-tc-base-failure in the wiki? > Sure - this is fine. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Tue Oct 14 19:11:30 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 14 Oct 2008 12:11:30 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] (#2) Add LXC ProcRASD support Message-ID: Remove stale bits of unused code as pointed out by Kaitlin. From danms at us.ibm.com Tue Oct 14 19:11:31 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 14 Oct 2008 12:11:31 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Make VSMS honor Weight property of ProcRASD for LXC In-Reply-To: Message-ID: <96cf38e8a1101ce68965.1224011491@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1224011458 25200 # Node ID 96cf38e8a1101ce68965509c9e76f6d7f41516d7 # Parent f0a209b602e707305a713611097310ec503451df Make VSMS honor Weight property of ProcRASD for LXC Also, reject if VirtualQuantity or Limit is specified (for the moment) Signed-off-by: Dan Smith diff -r f0a209b602e7 -r 96cf38e8a110 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Oct 08 09:13:55 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Tue Oct 14 12:10:58 2008 -0700 @@ -522,6 +522,27 @@ return NULL; } +static const char *lxc_proc_rasd_to_vdev(CMPIInstance *inst, + struct virt_device *dev) +{ + CMPIrc rc; + uint32_t def_weight = 1024; + + rc = cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.vcpu.quantity); + if (rc == CMPI_RC_OK) + return "ProcRASD field VirtualQuantity not valid for LXC"; + + rc = cu_get_u64_prop(inst, "Limit", &dev->dev.vcpu.limit); + if (rc == CMPI_RC_OK) + return "ProcRASD field Limit not valid for LXC"; + + rc = cu_get_u32_prop(inst, "Weight", &dev->dev.vcpu.weight); + if (rc != CMPI_RC_OK) + dev->dev.vcpu.weight = def_weight; + + return NULL; +} + static const char *_sysvirt_rasd_to_vdev(CMPIInstance *inst, struct virt_device *dev, uint16_t type, @@ -551,6 +572,8 @@ return lxc_disk_rasd_to_vdev(inst, dev); } else if (type == CIM_RES_TYPE_NET) { return net_rasd_to_vdev(inst, dev, ns); + } else if (type == CIM_RES_TYPE_PROC) { + return lxc_proc_rasd_to_vdev(inst, dev); } return "Resource type not supported on this platform"; From danms at us.ibm.com Tue Oct 14 19:11:32 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 14 Oct 2008 12:11:32 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Make ComputerSystem enforce LXC scheduling parameters on domain start In-Reply-To: Message-ID: <7848509a32e4c2d01165.1224011492@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1224011459 25200 # Node ID 7848509a32e4c2d01165877085d9929e7313d33e # Parent 96cf38e8a1101ce68965509c9e76f6d7f41516d7 Make ComputerSystem enforce LXC scheduling parameters on domain start Signed-off-by: Dan Smith diff -r 96cf38e8a110 -r 7848509a32e4 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Tue Oct 14 12:10:58 2008 -0700 +++ b/src/Virt_ComputerSystem.c Tue Oct 14 12:10:59 2008 -0700 @@ -667,23 +667,70 @@ DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); +static int xen_scheduler_params(struct infostore_ctx *ctx, + virSchedParameter **params) +{ + unsigned long long weight; + unsigned long long cap; + + *params = calloc(2, sizeof(virSchedParameter)); + if (*params == NULL) + return -1; + + weight = infostore_get_u64(ctx, "weight"); + cap = infostore_get_u64(ctx, "limit"); + + if (weight != 0) { + strncpy((*params)[0].field, + "weight", + sizeof((*params)[0].field)); + (*params)[0].type = VIR_DOMAIN_SCHED_FIELD_UINT; + (*params)[0].value.ui = weight; + } + + if (cap != 0) { + strncpy((*params)[0].field, + "cap", + sizeof((*params)[0].field)); + (*params)[0].type = VIR_DOMAIN_SCHED_FIELD_UINT; + (*params)[0].value.ui = cap; + } + + return 2; +} + +static int lxc_scheduler_params(struct infostore_ctx *ctx, + virSchedParameter **params) +{ + unsigned long long value; + + *params = calloc(1, sizeof(virSchedParameter)); + if (*params == NULL) + return -1; + + value = infostore_get_u64(ctx, "weight"); + + if (value != 0) { + strncpy((*params)[0].field, + "cpu_shares", + sizeof((*params)[0].field)); + (*params)[0].type = VIR_DOMAIN_SCHED_FIELD_UINT; + (*params)[0].value.ui = value; + } + + return 1; +} + static void set_scheduler_params(virDomainPtr dom) { struct infostore_ctx *ctx; virConnectPtr conn = NULL; - virSchedParameter params[] = - {{ "weight", VIR_DOMAIN_SCHED_FIELD_UINT }, - { "cap", VIR_DOMAIN_SCHED_FIELD_UINT }, - }; + virSchedParameter *params = NULL; + int count; conn = virDomainGetConnect(dom); if (conn == NULL) { CU_DEBUG("Unable to get connection from domain"); - return; - } - - if (!STREQC(virConnectGetType(conn), "xen")) { - CU_DEBUG("Not setting sched params for this domain type"); return; } @@ -693,13 +740,27 @@ return; } - params[0].value.ui = infostore_get_u64(ctx, "weight"); - params[1].value.ui = infostore_get_u64(ctx, "limit"); + if (STREQC(virConnectGetType(conn), "xen")) + count = xen_scheduler_params(ctx, ¶ms); + else if (STREQC(virConnectGetType(conn), "lxc")) + count = lxc_scheduler_params(ctx, ¶ms); + else { + CU_DEBUG("Not setting sched params for type %s", + virConnectGetType(conn)); + goto out; + } - virDomainSetSchedulerParameters(dom, params, 2); + if (count < 0) { + CU_DEBUG("Unable to set scheduler parameters"); + goto out; + } + virDomainSetSchedulerParameters(dom, params, count); + out: infostore_close(ctx); + free(params); } + /* This composite operation may be supported as a flag to reboot */ static int domain_reset(virDomainPtr dom) From danms at us.ibm.com Tue Oct 14 19:11:33 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 14 Oct 2008 12:11:33 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Expose LXC_ProcRASD so that the scheduling parameters are visible In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1224011460 25200 # Node ID b9a93806b73aaaccef8ade2cc43170e77fe01755 # Parent 7848509a32e4c2d01165877085d9929e7313d33e Expose LXC_ProcRASD so that the scheduling parameters are visible Also make ProcRASD not set the VirtualQuantity field if it's zero, so that LXC_ProcRASD's value appears undefined instead of 0. Signed-off-by: Dan Smith diff -r 7848509a32e4 -r b9a93806b73a schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Tue Oct 14 12:10:59 2008 -0700 +++ b/schema/ResourceAllocationSettingData.registration Tue Oct 14 12:11:00 2008 -0700 @@ -10,3 +10,4 @@ KVM_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +LXC_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance diff -r 7848509a32e4 -r b9a93806b73a src/Virt_RASD.c --- a/src/Virt_RASD.c Tue Oct 14 12:10:59 2008 -0700 +++ b/src/Virt_RASD.c Tue Oct 14 12:11:00 2008 -0700 @@ -306,8 +306,13 @@ CMSetProperty(inst, "Limit", (CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64); } else if (dev->type == CIM_RES_TYPE_PROC) { - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&dev->dev.vcpu.quantity, CMPI_uint64); + if (dev->dev.vcpu.quantity > 0) { + CMSetProperty(inst, + "VirtualQuantity", + (CMPIValue *)&dev->dev.vcpu.quantity, + CMPI_uint64); + } + set_proc_rasd_params(broker, ref, host, inst); } From danms at us.ibm.com Tue Oct 14 21:01:52 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 14 Oct 2008 14:01:52 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add KVM CDROM support Message-ID: This set adds some KVM CDROM support to model these device types differently, using the CIM_CDROMDrive class. Also, support changing the Address property to eject or uneject the virtual drive as appropriate. These have been in my queue for a long time, but after finishing up some bits, they seem to work for me. We'll definitely want some test suite coverage for this. From danms at us.ibm.com Tue Oct 14 21:01:54 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 14 Oct 2008 14:01:54 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Add the CDROM-specific RASD pieces In-Reply-To: Message-ID: <41bb42ca279660963a39.1224018114@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1224018094 25200 # Node ID 41bb42ca279660963a392d91ea3d720f66eab6e5 # Parent 9e4f5b57f4125904121d650cc03866b6fbf45084 Add the CDROM-specific RASD pieces This makes the RASD provider expose the correct ResourceType, VSMS honor the CDROM type, and xmlgen create valid CDROM XML when asked. If you do a ModifyResources call and omit the Address field from the CDROM RASD, you will effectively "eject" the CDROM. Calling it again with a value for this field will "uneject" the CDROM for the guest. Signed-off-by: Dan Smith diff -r 9e4f5b57f412 -r 41bb42ca2796 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Tue Oct 14 14:00:18 2008 -0700 +++ b/libxkutil/device_parsing.c Tue Oct 14 14:01:34 2008 -0700 @@ -1067,6 +1067,8 @@ return change_memory(dom, dev); else if (dev->type == CIM_RES_TYPE_PROC) return change_vcpus(dom, dev); + else if (dev->type == CIM_RES_TYPE_CDROM) + return _change_device(dom, dev, true); CU_DEBUG("Unhandled device type %i", dev->type); diff -r 9e4f5b57f412 -r 41bb42ca2796 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Tue Oct 14 14:00:18 2008 -0700 +++ b/libxkutil/xmlgen.c Tue Oct 14 14:01:34 2008 -0700 @@ -113,43 +113,52 @@ return 1; } -static char *disk_block_xml(const char *path, const char *vdev) +static char *_disk_xml(struct disk_device *vdev) { char *xml; int ret; + const char *sourcetype; + const char *disktype; + const char *devtype = "disk"; - ret = asprintf(&xml, - "\n" - " \n" - " \n" - "\n", - path, - vdev); + if (vdev->disk_type == DISK_PHY) { + sourcetype = "dev"; + disktype = "block"; + } else if (vdev->disk_type == DISK_FILE) { + sourcetype = "file"; + disktype="file"; + } else + return NULL; + + if ((vdev->device != NULL) && STREQC(vdev->device, "cdrom")) + devtype = "cdrom"; + + if (STREQ(devtype, "cdrom") && (vdev->source == NULL)) + ret = asprintf(&xml, + "\n" + " \n" + "\n", + disktype, + devtype, + vdev->virtual_dev); + else + ret = asprintf(&xml, + "\n" + " \n" + " \n" + "\n", + disktype, + devtype, + sourcetype, + vdev->source, + vdev->virtual_dev); if (ret == -1) xml = NULL; return xml; } -static char *disk_file_xml(const char *path, const char *vdev) -{ - char *xml; - int ret; - - ret = asprintf(&xml, - "\n" - " \n" - " \n" - "\n", - path, - vdev); - if (ret == -1) - xml = NULL; - - return xml; -} - -static char *disk_fs_xml(const char *path, const char *vdev) +static char *_disk_fs_xml(const char *path, const char *vdev) { char *xml; int ret; @@ -172,14 +181,11 @@ char *_xml = NULL; struct disk_device *disk = &dev->dev.disk; - if (disk->disk_type == DISK_PHY) - _xml = disk_block_xml(disk->source, disk->virtual_dev); - else if (disk->disk_type == DISK_FILE) - /* If it's not a block device, we assume a file, - which should be a reasonable fail-safe */ - _xml = disk_file_xml(disk->source, disk->virtual_dev); + if ((disk->disk_type == DISK_PHY) || + (disk->disk_type == DISK_FILE)) + _xml = _disk_xml(disk); else if (disk->disk_type == DISK_FS) - _xml = disk_fs_xml(disk->source, disk->virtual_dev); + _xml = _disk_fs_xml(disk->source, disk->virtual_dev); else return false; diff -r 9e4f5b57f412 -r 41bb42ca2796 src/Virt_RASD.c --- a/src/Virt_RASD.c Tue Oct 14 14:00:18 2008 -0700 +++ b/src/Virt_RASD.c Tue Oct 14 14:01:34 2008 -0700 @@ -247,18 +247,16 @@ char *id; const char *keys[] = {"InstanceID", NULL}; + type = dev->type; + if ((dev->type == CIM_RES_TYPE_DISK) || (dev->type == CIM_RES_TYPE_CDROM)) { - type = CIM_RES_TYPE_DISK; base = "DiskResourceAllocationSettingData"; } else if (dev->type == CIM_RES_TYPE_NET) { - type = CIM_RES_TYPE_NET; base = "NetResourceAllocationSettingData"; } else if (dev->type == CIM_RES_TYPE_PROC) { - type = CIM_RES_TYPE_PROC; base = "ProcResourceAllocationSettingData"; } else if (dev->type == CIM_RES_TYPE_MEM) { - type = CIM_RES_TYPE_MEM; base = "MemResourceAllocationSettingData"; } else { return NULL; @@ -284,7 +282,8 @@ CMSetProperty(inst, "ResourceType", (CMPIValue *)&type, CMPI_uint16); - if (dev->type == CIM_RES_TYPE_DISK) { + if ((dev->type == CIM_RES_TYPE_DISK) || + (dev->type == CIM_RES_TYPE_CDROM)) { s = set_disk_rasd_params(broker, ref, dev, inst); } else if (dev->type == CIM_RES_TYPE_NET) { CMSetProperty(inst, diff -r 9e4f5b57f412 -r 41bb42ca2796 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Tue Oct 14 14:00:18 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Tue Oct 14 14:01:34 2008 -0700 @@ -402,6 +402,7 @@ struct virt_device *dev) { const char *val = NULL; + uint16_t rtype; if (cu_get_str_prop(inst, "VirtualDevice", &val) != CMPI_RC_OK) return "Missing `VirtualDevice' property"; @@ -409,12 +410,38 @@ free(dev->dev.disk.virtual_dev); dev->dev.disk.virtual_dev = strdup(val); - if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) - val = "/dev/null"; + if (cu_get_u16_prop(inst, "ResourceType", &rtype) != CMPI_RC_OK) + rtype = CIM_RES_TYPE_DISK; - free(dev->dev.disk.source); - dev->dev.disk.source = strdup(val); - dev->dev.disk.disk_type = disk_type_from_file(val); + free(dev->dev.disk.device); + if (rtype == CIM_RES_TYPE_DISK) + dev->dev.disk.device = strdup("disk"); + else if (rtype == CIM_RES_TYPE_CDROM) + dev->dev.disk.device = strdup("cdrom"); + else + return "Unknown disk type"; + + if (cu_get_str_prop(inst, "Address", &val) == CMPI_RC_OK) { + free(dev->dev.disk.source); + dev->dev.disk.source = strdup(val); + } else if (rtype == CIM_RES_TYPE_CDROM) { + free(dev->dev.disk.source); + dev->dev.disk.source = NULL; + } else { + return "Missing `Address' property"; + } + + if (dev->dev.disk.source == NULL) { + /* If this is a removable media device (and it must be + * if we got to this point), don't freak out if they + * didn't specify any media right now. The type is + * immaterial until they attach it anyway, so just + * assume a default value. + */ + dev->dev.disk.disk_type = DISK_FILE; + } else { + dev->dev.disk.disk_type = disk_type_from_file(val); + } free(dev->id); dev->id = strdup(dev->dev.disk.virtual_dev); @@ -548,7 +575,8 @@ uint16_t type, const char *ns) { - if (type == CIM_RES_TYPE_DISK) { + if ((type == CIM_RES_TYPE_DISK) || + (type == CIM_RES_TYPE_CDROM)) { return disk_rasd_to_vdev(inst, dev); } else if (type == CIM_RES_TYPE_NET) { return net_rasd_to_vdev(inst, dev, ns); @@ -693,9 +721,10 @@ if (op == NULL) return "Unknown resource instance type"; - if (res_type_from_rasd_classname(CLASSNAME(op), &type) != - CMPI_RC_OK) - return "Unable to determine resource type"; + if (cu_get_u16_prop(inst, "ResourceType", &type) != CMPI_RC_OK) + if (res_type_from_rasd_classname(CLASSNAME(op), + &type) != CMPI_RC_OK) + return "Unable to determine resource type"; if (type == CIM_RES_TYPE_PROC) { domain->dev_vcpu_ct = 1; @@ -709,7 +738,8 @@ domain, &domain->dev_mem[0], ns); - } else if (type == CIM_RES_TYPE_DISK) { + } else if ((type == CIM_RES_TYPE_DISK) || + (type == CIM_RES_TYPE_CDROM)) { struct virt_device dev; int dcount = count + domain->dev_disk_ct; From danms at us.ibm.com Tue Oct 14 21:01:53 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 14 Oct 2008 14:01:53 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add KVM_CDROMDrive class In-Reply-To: Message-ID: <9e4f5b57f4125904121d.1224018113@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1224018018 25200 # Node ID 9e4f5b57f4125904121d650cc03866b6fbf45084 # Parent b9a93806b73aaaccef8ade2cc43170e77fe01755 Add KVM_CDROMDrive class This patch makes the Device provider return a KVM_CDROMDrive class where appropriate. All the associations that mention LogicalDisk have been updated, but it would be good to ensure that the test suite is properly checking the links, despite the classnames of the devices. Signed-off-by: Dan Smith diff -r b9a93806b73a -r 9e4f5b57f412 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Tue Oct 14 12:11:00 2008 -0700 +++ b/libxkutil/device_parsing.c Tue Oct 14 14:00:18 2008 -0700 @@ -82,7 +82,8 @@ if (dev == NULL) return; /* free()-like semantics */ - if (dev->type == CIM_RES_TYPE_DISK) + if ((dev->type == CIM_RES_TYPE_DISK) || + (dev->type == CIM_RES_TYPE_CDROM)) cleanup_disk_device(&dev->dev.disk); else if (dev->type == CIM_RES_TYPE_NET) cleanup_net_device(&dev->dev.net); @@ -235,10 +236,16 @@ goto err; } } - if ((ddev->source == NULL) || (ddev->virtual_dev == NULL)) + if (ddev->virtual_dev == NULL) goto err; - vdev->type = CIM_RES_TYPE_DISK; + if ((ddev->source == NULL) && (!STREQC(ddev->device, "cdrom"))) + goto err; + + if (STREQC(ddev->device, "cdrom")) + vdev->type = CIM_RES_TYPE_CDROM; + else + vdev->type = CIM_RES_TYPE_DISK; vdev->id = strdup(ddev->virtual_dev); *vdevs = vdev; @@ -479,7 +486,8 @@ /* point to correct parser function according to type */ if (type == CIM_RES_TYPE_NET) do_real_parse = &parse_net_device; - else if (type == CIM_RES_TYPE_DISK) + else if ((type == CIM_RES_TYPE_DISK) || + (type == CIM_RES_TYPE_CDROM)) do_real_parse = &parse_disk_device; else if (type == CIM_RES_TYPE_PROC) do_real_parse = parse_vcpu_device; @@ -547,7 +555,8 @@ if (type == CIM_RES_TYPE_NET) xpathstr = NET_XPATH; - else if (type == CIM_RES_TYPE_DISK) + else if ((type == CIM_RES_TYPE_DISK) || + (type == CIM_RES_TYPE_CDROM)) xpathstr = DISK_XPATH; else if (type == CIM_RES_TYPE_PROC) xpathstr = VCPU_XPATH; @@ -605,7 +614,8 @@ DUP_FIELD(dev, _dev, dev.net.mac); DUP_FIELD(dev, _dev, dev.net.type); DUP_FIELD(dev, _dev, dev.net.source); - } else if (dev->type == CIM_RES_TYPE_DISK) { + } else if ((dev->type == CIM_RES_TYPE_DISK) || + (dev->type == CIM_RES_TYPE_CDROM)) { DUP_FIELD(dev, _dev, dev.disk.type); DUP_FIELD(dev, _dev, dev.disk.device); DUP_FIELD(dev, _dev, dev.disk.driver); diff -r b9a93806b73a -r 9e4f5b57f412 schema/LogicalDisk.mof --- a/schema/LogicalDisk.mof Tue Oct 14 12:11:00 2008 -0700 +++ b/schema/LogicalDisk.mof Tue Oct 14 14:00:18 2008 -0700 @@ -19,6 +19,15 @@ }; [Description ( + "A class derived from CIM_CDROMDrive to represent " + "the KVM virtual CDROM drive in a guest."), + Provider("cmpi::Virt_Device") +] +class KVM_CDROMDrive : CIM_CDROMDrive +{ +}; + +[Description ( "A class derived from CIM_LogicalDisk to represent " "the KVM virtual disks on the system."), Provider("cmpi::Virt_Device") diff -r b9a93806b73a -r 9e4f5b57f412 schema/LogicalDisk.registration --- a/schema/LogicalDisk.registration Tue Oct 14 12:11:00 2008 -0700 +++ b/schema/LogicalDisk.registration Tue Oct 14 14:00:18 2008 -0700 @@ -2,4 +2,5 @@ # Classname Namespace ProviderName ProviderModule ProviderTypes Xen_LogicalDisk root/virt Virt_Device Virt_Device instance KVM_LogicalDisk root/virt Virt_Device Virt_Device instance +KVM_CDROMDrive root/virt Virt_Device Virt_Device instance LXC_LogicalDisk root/virt Virt_Device Virt_Device instance diff -r b9a93806b73a -r 9e4f5b57f412 src/Virt_Device.c --- a/src/Virt_Device.c Tue Oct 14 12:11:00 2008 -0700 +++ b/src/Virt_Device.c Tue Oct 14 14:00:18 2008 -0700 @@ -124,11 +124,26 @@ { CMPIInstance *inst; virConnectPtr conn; + const char *conntype; + const char *basetype; conn = virDomainGetConnect(dom); + conntype = virConnectGetType(conn); + if (conntype == NULL) { + CU_DEBUG("Unable to get connection type"); + return NULL; + } + + if (STREQ(conntype, "QEMU") && STREQC(dev->device, "cdrom")) + basetype = "CDROMDrive"; + else + basetype = "LogicalDisk"; + + CU_DEBUG("DISK BASE TYPE: %s, device is %s", basetype, dev->device); + inst = get_typed_instance(broker, pfx_from_conn(conn), - "LogicalDisk", + basetype, ns); if (!disk_set_name(inst, dev)) @@ -301,7 +316,8 @@ &dev->dev.net, dom, ns); - else if (dev->type == CIM_RES_TYPE_DISK) + else if ((dev->type == CIM_RES_TYPE_DISK) || + (dev->type == CIM_RES_TYPE_CDROM)) instance = disk_instance(broker, &dev->dev.disk, dom, @@ -346,6 +362,8 @@ return CIM_RES_TYPE_MEM; else if (strstr(classname, "Processor")) return CIM_RES_TYPE_PROC; + else if (strstr(classname, "CDROMDrive")) + return CIM_RES_TYPE_CDROM; else return CIM_RES_TYPE_UNKNOWN; } diff -r b9a93806b73a -r 9e4f5b57f412 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Tue Oct 14 12:11:00 2008 -0700 +++ b/src/Virt_DevicePool.c Tue Oct 14 14:00:18 2008 -0700 @@ -476,7 +476,8 @@ poolid = strdup("MemoryPool/0"); else if (type == CIM_RES_TYPE_NET) poolid = netpool_member_of(broker, id, refcn); - else if (type == CIM_RES_TYPE_DISK) + else if ((type == CIM_RES_TYPE_DISK) || + (type == CIM_RES_TYPE_CDROM)) poolid = diskpool_member_of(broker, id, refcn); else return NULL; diff -r b9a93806b73a -r 9e4f5b57f412 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Tue Oct 14 12:11:00 2008 -0700 +++ b/src/Virt_ElementAllocatedFromPool.c Tue Oct 14 14:00:18 2008 -0700 @@ -191,6 +191,7 @@ "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", + "KVM_CDROMDrive", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", diff -r b9a93806b73a -r 9e4f5b57f412 src/Virt_RASD.c --- a/src/Virt_RASD.c Tue Oct 14 12:11:00 2008 -0700 +++ b/src/Virt_RASD.c Tue Oct 14 14:00:18 2008 -0700 @@ -247,7 +247,8 @@ char *id; const char *keys[] = {"InstanceID", NULL}; - if (dev->type == CIM_RES_TYPE_DISK) { + if ((dev->type == CIM_RES_TYPE_DISK) || + (dev->type == CIM_RES_TYPE_CDROM)) { type = CIM_RES_TYPE_DISK; base = "DiskResourceAllocationSettingData"; } else if (dev->type == CIM_RES_TYPE_NET) { diff -r b9a93806b73a -r 9e4f5b57f412 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Tue Oct 14 12:11:00 2008 -0700 +++ b/src/Virt_SettingsDefineState.c Tue Oct 14 14:00:18 2008 -0700 @@ -330,6 +330,7 @@ "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", + "KVM_CDROMDrive", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", diff -r b9a93806b73a -r 9e4f5b57f412 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Tue Oct 14 12:11:00 2008 -0700 +++ b/src/Virt_SystemDevice.c Tue Oct 14 14:00:18 2008 -0700 @@ -138,6 +138,7 @@ "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", + "KVM_CDROMDrive", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", diff -r b9a93806b73a -r 9e4f5b57f412 src/svpc_types.h --- a/src/svpc_types.h Tue Oct 14 12:11:00 2008 -0700 +++ b/src/svpc_types.h Tue Oct 14 14:00:18 2008 -0700 @@ -29,14 +29,16 @@ #define CIM_RES_TYPE_DISK 17 #define CIM_RES_TYPE_EMU 1 #define CIM_RES_TYPE_GRAPHICS 24 +#define CIM_RES_TYPE_CDROM 15 #define CIM_RES_TYPE_UNKNOWN 1000 -#define CIM_RES_TYPE_COUNT 4 +#define CIM_RES_TYPE_COUNT 5 const static int cim_res_types[CIM_RES_TYPE_COUNT] = {CIM_RES_TYPE_NET, CIM_RES_TYPE_DISK, CIM_RES_TYPE_MEM, CIM_RES_TYPE_PROC, + CIM_RES_TYPE_CDROM, }; #define CIM_VSSD_RECOVERY_NONE 2 From kaitlin at linux.vnet.ibm.com Tue Oct 14 22:17:37 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 14 Oct 2008 15:17:37 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#Modify VSSD.01 to call new EnumInstances and EnumNames In-Reply-To: <430656f260d8b29c31a1.1223962762@elm3b217.beaverton.ibm.com> References: <430656f260d8b29c31a1.1223962762@elm3b217.beaverton.ibm.com> Message-ID: <48F51A81.3070902@linux.vnet.ibm.com> > try: > live_cs = live.domain_list(options.ip, options.virt) > - key_list = ["InstanceID"] > - syslst = enumclass.enumerate(options.ip, "VirtualSystemSettingData", > - key_list, options.virt) > + vssd_class = get_typed_class(options.virt, "VirtualSystemSettingData") > + syslst = enumclass.enumerate(options.ip, vssd_class) This should be enumclass.EnumInstances() enumclass.enumerate(). -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 14 22:22:53 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 14 Oct 2008 15:22:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify ComputerSystem/04_defineStartVS.py and VSSDC.01 to call new GetInstance In-Reply-To: References: Message-ID: <48F51BBD.9070401@linux.vnet.ibm.com> > > It fails without your patch applied, so I've applied this patch. > > However, can you take a look to see why it might be failing? > > I don't get any updates from repository. Would you please check this? =) > > Thanks! The updates are in the tree now. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 14 22:29:00 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 14 Oct 2008 15:29:00 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify VirtualSystemSnapshotServiceCapabilities/01_enum.py to call new EnumNames In-Reply-To: References: Message-ID: <48F51D2C.8050406@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223969074 25200 > # Node ID cf9bea2069bd6f692d443281bb86d3e56936b985 > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Modify VirtualSystemSnapshotServiceCapabilities/01_enum.py to call new EnumNames > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r cf9bea2069bd suites/libvirt-cim/cimtest/VirtualSystemSnapshotServiceCapabilities/01_enum.py This fix has already been applied. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 14 22:31:15 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 14 Oct 2008 15:31:15 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify LogicalDisk.02 to call new EnumInstances In-Reply-To: <48F47FE7.8060800@linux.vnet.ibm.com> References: <9c4002ff9f71246bb5e3.1223965378@elm3b217.beaverton.ibm.com> <48F47FE7.8060800@linux.vnet.ibm.com> Message-ID: <48F51DB3.2050601@linux.vnet.ibm.com> >> >> try: >> - devs = devices.enumerate(options.ip, cn, key_list, options.virt) >> + devs = enumclass.Enumerate(options.ip, cn) >> >> except Exception, details: >> logger.error(CIM_ERROR_ENUMERATE, cn) >> >> > Tested this on KVM and it failed with the following error : > LogicalDisk - 02_nodevs.py: FAIL > ERROR - Failed to enumerate the class of KVM_LogicalDisk > ERROR - 'module' object has no attribute 'Enumerate' This should be enumclass.EnumNames() not, enumclass.Enumerate(). -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 14 22:38:46 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 14 Oct 2008 15:38:46 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update common_util.py to call new EnumInstances In-Reply-To: <1fe0fcbda10f32261c3f.1223968773@elm3b217.beaverton.ibm.com> References: <1fe0fcbda10f32261c3f.1223968773@elm3b217.beaverton.ibm.com> Message-ID: <48F51F76.6030604@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1223968768 25200 > # Node ID 1fe0fcbda10f32261c3f64f8d77ab4639c2b77ae > # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 > [TEST] Update common_util.py to call new EnumInstances > > Signed-off-by: Guolian Yun > > diff -r c7eaf17bd591 -r 1fe0fcbda10f suites/libvirt-cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Oct 10 03:08:12 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 14 00:19:28 2008 -0700 > @@ -217,7 +217,8 @@ def get_host_info(server, virt="Xen"): > # sblim-base-provider provider related changes > > ret, linux_cs = check_sblim(server) > - host_info = enumclass.enumerate(server, 'HostSystem', keys, virt) > + hs_class = get_typed_class(server, 'HostSystem') This should be: hs_class = get_typed_class(virt, 'HostSystem') -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Wed Oct 15 01:21:22 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 15 Oct 2008 09:21:22 +0800 Subject: [Libvirt-cim] Remove enumerate() function in device.py and update tc to call new function in enumclass.py In-Reply-To: <48F48C3D.1090403@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-14 20:10:37: > > > Guo Lian Yun wrote: > > > > libvirt-cim-bounces at redhat.com wrote on 2008-10-13 23:39:50: > > > > > Deepti B Kalakeri wrote: > > > > > > > > > > > > Guo Lian Yun wrote: > > > >> > > > >> Hi, > > > >> > > > >> Do you think it's better to remove enumerate() function in > > device.py? > > > >> Then we have to update tc to call new EnumInstances() function in > > > >> enumclass.py. > > > >> Who would like to take up this work? If not, I will cook up these > > > >> patches. > > > >> > > > > Yes it would be better to have a single Enumerate function in one > > > > library file. > > > > I think we will have lot of tc updates if we take this up. > > > > > > > > Kaitlin, > > > > What do you suggest? > > > > > > Yes, I agree. The enumerate() functions in device.py are no longer > > > needed. The functions in enumclass.py should cover this. > > > > > > Daisy - can you work up a patch for this? > > > > I can work up it later. I'm now working on tc to call new > > EnumInstances() and GetInstance() > > functions. Due to a number of tc fails with sblim base provider > > installed, I have to fix them > > together with new EnumInstances() and GetInstance() calling. > > Whatever, I will try to work on > > it as soon as possible. > > > > Deepti - Would you please run the cimtest for Xen with sblim base > > provider installed and update > > the sblim-tc-base-failure in the wiki? > > > > Thanks! > I have verified the info on the wiki for sblim-base-providers yest and > those are the current failures we need to fix. Excellent -- Deepti. > > Thanks and Regards, > Deepti. > > > > > > > > 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 > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > 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 yunguol at cn.ibm.com Wed Oct 15 02:03:53 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 14 Oct 2008 19:03:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update common_util.py to call new EnumInstances Message-ID: # HG changeset patch # User Guolian Yun # Date 1224035857 25200 # Node ID c8fb99643549b9e20efc7854dcbcde9474fbd242 # Parent b22a7a3c7972648a8067b88189ff5a7a8509b160 [TEST] #2 Update common_util.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r b22a7a3c7972 -r c8fb99643549 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Oct 13 22:48:51 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 14 18:57:37 2008 -0700 @@ -217,7 +217,8 @@ def get_host_info(server, virt="Xen"): # sblim-base-provider provider related changes ret, linux_cs = check_sblim(server) - host_info = enumclass.enumerate(server, 'HostSystem', keys, virt) + hs_class = get_typed_class(virt, 'HostSystem') + host_info = enumclass.EnumInstances(server, hs_class) if ret == PASS: host_sys = linux_cs elif len(host_info) == 1: @@ -499,8 +500,9 @@ def check_sblim(server, virt='Xen'): Globals.CIM_NS = 'root/cimv2' keys = ['Name', 'CreationClassName'] linux_cs = None + cs = 'Linux_ComputerSystem' try: - linux = enumclass.enumerate(server, 'ComputerSystem', keys, 'Linux') + linux = enumclass.EnumInstances(server, cs) if len(linux) == 1: status = PASS linux_cs = linux[0] From yunguol at cn.ibm.com Wed Oct 15 12:57:25 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 05:57:25 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Modify VSSD.01 to call new EnumInstances Message-ID: <94e61830d6cc83989f0a.1224075445@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224075437 25200 # Node ID 94e61830d6cc83989f0aa4e7179e67e9eb7fe9bb # Parent b22a7a3c7972648a8067b88189ff5a7a8509b160 [TEST] #3 Modify VSSD.01 to call new EnumInstances Signed-off-by: Guolian Yun diff -r b22a7a3c7972 -r 94e61830d6cc suites/libvirt-cim/cimtest/VSSD/01_enum.py --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 13 22:48:51 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Wed Oct 15 05:57:17 2008 -0700 @@ -29,6 +29,7 @@ import sys import sys from VirtLib import live from XenKvmLib import enumclass +from XenKvmLib.classes import get_typed_class from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.vxml import get_class from CimTest.Globals import logger @@ -53,10 +54,8 @@ def main(): try: live_cs = live.domain_list(options.ip, options.virt) - key_list = ["InstanceID"] - syslst = enumclass.enumerate(options.ip, "VirtualSystemSettingData", - key_list, options.virt) - + vssd_class = get_typed_class(options.virt, "VirtualSystemSettingData") + syslst = enumclass.EnumInstances(options.ip, vssd_class) found = 0 for vssd in syslst : if options.virt == 'XenFV': From yunguol at cn.ibm.com Wed Oct 15 13:08:27 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 06:08:27 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Modify LogicalDisk.02 to call new EnumInstances Message-ID: # HG changeset patch # User Guolian Yun # Date 1224076048 25200 # Node ID aa2a6448402bcb811883b2c2ab8c6bab65bcbe53 # Parent b22a7a3c7972648a8067b88189ff5a7a8509b160 [TEST] #2 Modify LogicalDisk.02 to call new EnumInstances Signed-off-by: Guolian Yun diff -r b22a7a3c7972 -r aa2a6448402b suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Mon Oct 13 22:48:51 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/02_nodevs.py Wed Oct 15 06:07:28 2008 -0700 @@ -26,8 +26,8 @@ import sys import sys import pywbem from time import sleep -from XenKvmLib import devices from XenKvmLib import enumclass +from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP @@ -38,8 +38,8 @@ def clean_system(host, virt='Xen'): def clean_system(host, virt='Xen'): timer_count = 10 for count in range(0, timer_count): - keys = ['Name', 'CreationClassName'] - l = enumclass.enumerate(host, 'ComputerSystem', keys, virt) + cs = get_typed_class(virt, 'ComputerSystem') + l = enumclass.EnumInstances(host, cs) if len(l) == 0: return True if virt == 'Xen' or virt == 'XenFV': @@ -58,10 +58,10 @@ def main(): key_list = ["DeviceID", "CreationClassName", "SystemName", "SystemCreationClassName"] - cn = "LogicalDisk" + cn = get_typed_class(options.virt, "LogicalDisk") try: - devs = devices.enumerate(options.ip, cn, key_list, options.virt) + devs = enumclass.EnumInstances(options.ip, cn) except Exception, details: logger.error(CIM_ERROR_ENUMERATE, cn) From danms at us.ibm.com Wed Oct 15 18:12:38 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 15 Oct 2008 11:12:38 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] Make ComputerSystem enforce LXC scheduling parameters on domain start In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1224089333 25200 # Node ID c9faf7ec24553425ffc3068b0b8a19b9b83ee99b # Parent 96cf38e8a1101ce68965509c9e76f6d7f41516d7 Make ComputerSystem enforce LXC scheduling parameters on domain start Changes: - Return an accurate param count and only call the set function if we have some to set Signed-off-by: Dan Smith diff -r 96cf38e8a110 -r c9faf7ec2455 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Tue Oct 14 12:10:58 2008 -0700 +++ b/src/Virt_ComputerSystem.c Wed Oct 15 09:48:53 2008 -0700 @@ -667,23 +667,75 @@ DEFAULT_EQ(); DEFAULT_INST_CLEANUP(); +static int xen_scheduler_params(struct infostore_ctx *ctx, + virSchedParameter **params) +{ + unsigned long long weight; + unsigned long long cap; + int nparams = 0; + + *params = calloc(2, sizeof(virSchedParameter)); + if (*params == NULL) + return -1; + + weight = infostore_get_u64(ctx, "weight"); + cap = infostore_get_u64(ctx, "limit"); + + if (weight != 0) { + strncpy((*params)[0].field, + "weight", + sizeof((*params)[0].field)); + (*params)[0].type = VIR_DOMAIN_SCHED_FIELD_UINT; + (*params)[0].value.ui = weight; + nparams++; + } + + if (cap != 0) { + strncpy((*params)[0].field, + "cap", + sizeof((*params)[0].field)); + (*params)[0].type = VIR_DOMAIN_SCHED_FIELD_UINT; + (*params)[0].value.ui = cap; + nparams++; + } + + return nparams; +} + +static int lxc_scheduler_params(struct infostore_ctx *ctx, + virSchedParameter **params) +{ + unsigned long long value; + + *params = calloc(1, sizeof(virSchedParameter)); + if (*params == NULL) + return -1; + + value = infostore_get_u64(ctx, "weight"); + + if (value != 0) { + strncpy((*params)[0].field, + "cpu_shares", + sizeof((*params)[0].field)); + (*params)[0].type = VIR_DOMAIN_SCHED_FIELD_UINT; + (*params)[0].value.ui = value; + + return 1; + } + + return 0; +} + static void set_scheduler_params(virDomainPtr dom) { struct infostore_ctx *ctx; virConnectPtr conn = NULL; - virSchedParameter params[] = - {{ "weight", VIR_DOMAIN_SCHED_FIELD_UINT }, - { "cap", VIR_DOMAIN_SCHED_FIELD_UINT }, - }; + virSchedParameter *params = NULL; + int count; conn = virDomainGetConnect(dom); if (conn == NULL) { CU_DEBUG("Unable to get connection from domain"); - return; - } - - if (!STREQC(virConnectGetType(conn), "xen")) { - CU_DEBUG("Not setting sched params for this domain type"); return; } @@ -693,13 +745,30 @@ return; } - params[0].value.ui = infostore_get_u64(ctx, "weight"); - params[1].value.ui = infostore_get_u64(ctx, "limit"); + if (STREQC(virConnectGetType(conn), "xen")) + count = xen_scheduler_params(ctx, ¶ms); + else if (STREQC(virConnectGetType(conn), "lxc")) + count = lxc_scheduler_params(ctx, ¶ms); + else { + CU_DEBUG("Not setting sched params for type %s", + virConnectGetType(conn)); + goto out; + } - virDomainSetSchedulerParameters(dom, params, 2); + if (count < 0) { + CU_DEBUG("Unable to set scheduler parameters"); + goto out; + } + if (count > 0) + virDomainSetSchedulerParameters(dom, params, count); + else + CU_DEBUG("No sched parameters to set"); + out: infostore_close(ctx); + free(params); } + /* This composite operation may be supported as a flag to reboot */ static int domain_reset(virDomainPtr dom) From danms at us.ibm.com Wed Oct 15 18:12:37 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 15 Oct 2008 11:12:37 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] Make VSMS honor Weight property of ProcRASD for LXC In-Reply-To: Message-ID: <96cf38e8a1101ce68965.1224094357@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1224011458 25200 # Node ID 96cf38e8a1101ce68965509c9e76f6d7f41516d7 # Parent f0a209b602e707305a713611097310ec503451df Make VSMS honor Weight property of ProcRASD for LXC Also, reject if VirtualQuantity or Limit is specified (for the moment) Signed-off-by: Dan Smith diff -r f0a209b602e7 -r 96cf38e8a110 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Oct 08 09:13:55 2008 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Tue Oct 14 12:10:58 2008 -0700 @@ -522,6 +522,27 @@ return NULL; } +static const char *lxc_proc_rasd_to_vdev(CMPIInstance *inst, + struct virt_device *dev) +{ + CMPIrc rc; + uint32_t def_weight = 1024; + + rc = cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.vcpu.quantity); + if (rc == CMPI_RC_OK) + return "ProcRASD field VirtualQuantity not valid for LXC"; + + rc = cu_get_u64_prop(inst, "Limit", &dev->dev.vcpu.limit); + if (rc == CMPI_RC_OK) + return "ProcRASD field Limit not valid for LXC"; + + rc = cu_get_u32_prop(inst, "Weight", &dev->dev.vcpu.weight); + if (rc != CMPI_RC_OK) + dev->dev.vcpu.weight = def_weight; + + return NULL; +} + static const char *_sysvirt_rasd_to_vdev(CMPIInstance *inst, struct virt_device *dev, uint16_t type, @@ -551,6 +572,8 @@ return lxc_disk_rasd_to_vdev(inst, dev); } else if (type == CIM_RES_TYPE_NET) { return net_rasd_to_vdev(inst, dev, ns); + } else if (type == CIM_RES_TYPE_PROC) { + return lxc_proc_rasd_to_vdev(inst, dev); } return "Resource type not supported on this platform"; From danms at us.ibm.com Wed Oct 15 18:12:36 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 15 Oct 2008 11:12:36 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] (#3) Add LXC ProcRASD support Message-ID: Updated the middle patch to only call the set function if appropriate From danms at us.ibm.com Wed Oct 15 18:12:39 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 15 Oct 2008 11:12:39 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] Expose LXC_ProcRASD so that the scheduling parameters are visible In-Reply-To: Message-ID: <0f39ab1ee83013c43586.1224094359@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1224094346 25200 # Node ID 0f39ab1ee83013c43586d05b2ae0803b935ea693 # Parent c9faf7ec24553425ffc3068b0b8a19b9b83ee99b Expose LXC_ProcRASD so that the scheduling parameters are visible Also make ProcRASD not set the VirtualQuantity field if it's zero, so that LXC_ProcRASD's value appears undefined instead of 0. Signed-off-by: Dan Smith diff -r c9faf7ec2455 -r 0f39ab1ee830 schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Wed Oct 15 09:48:53 2008 -0700 +++ b/schema/ResourceAllocationSettingData.registration Wed Oct 15 11:12:26 2008 -0700 @@ -10,3 +10,4 @@ KVM_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +LXC_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance diff -r c9faf7ec2455 -r 0f39ab1ee830 src/Virt_RASD.c --- a/src/Virt_RASD.c Wed Oct 15 09:48:53 2008 -0700 +++ b/src/Virt_RASD.c Wed Oct 15 11:12:26 2008 -0700 @@ -306,8 +306,13 @@ CMSetProperty(inst, "Limit", (CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64); } else if (dev->type == CIM_RES_TYPE_PROC) { - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&dev->dev.vcpu.quantity, CMPI_uint64); + if (dev->dev.vcpu.quantity > 0) { + CMSetProperty(inst, + "VirtualQuantity", + (CMPIValue *)&dev->dev.vcpu.quantity, + CMPI_uint64); + } + set_proc_rasd_params(broker, ref, host, inst); } From kaitlin at linux.vnet.ibm.com Wed Oct 15 19:20:07 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 15 Oct 2008 12:20:07 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] (#3) Add LXC ProcRASD support In-Reply-To: References: Message-ID: <48F64267.1040108@linux.vnet.ibm.com> Dan Smith wrote: > Updated the middle patch to only call the set function if appropriate > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From richardm at br.ibm.com Wed Oct 15 22:26:47 2008 From: richardm at br.ibm.com (Richard Maciel) Date: Wed, 15 Oct 2008 15:26:47 -0700 Subject: [Libvirt-cim] [PATCH] Signed-off-by: Richard Maciel Message-ID: # HG changeset patch # User Richard Maciel # Date 1224109379 25200 # Node ID e71c0941849da4338ed56d784a6c3966b73ffaf7 # Parent 5f835a32ab3aa0dc26718371c3f4a0a0abe879ae Signed-off-by: Richard Maciel * Added association Console Redirections Service <-> Console Redirection Service Capabilities into the ElementCapabilities.c file * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function * get_console_rs_caps is not static anymore diff -r 5f835a32ab3a -r e71c0941849d src/Makefile.am --- a/src/Makefile.am Wed Oct 15 14:14:09 2008 -0700 +++ b/src/Makefile.am Wed Oct 15 15:22:59 2008 -0700 @@ -21,7 +21,8 @@ Virt_VirtualSystemSnapshotService.h \ Virt_VirtualSystemSnapshotServiceCapabilities.h \ Virt_VSMigrationSettingData.h \ - Virt_ConsoleRedirectionService.h + Virt_ConsoleRedirectionService.h \ + Virt_ConsoleRedirectionServiceCapabilities.h XKUADD = $(top_builddir)/libxkutil/libxkutil.la @@ -119,7 +120,7 @@ libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c libVirt_AllocationCapabilities_la_LIBADD = -lVirt_DevicePool -libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la +libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la libVirt_ConsoleRedirectionService.la libVirt_ConsoleRedirectionServiceCapabilities.la libVirt_ElementCapabilities_la_SOURCES = Virt_ElementCapabilities.c libVirt_ElementCapabilities_la_LIBADD = -lVirt_VirtualSystemManagementCapabilities \ -lVirt_EnabledLogicalElementCapabilities \ @@ -129,7 +130,9 @@ -lVirt_AllocationCapabilities \ -lVirt_VirtualSystemManagementService \ -lVirt_VSMigrationService \ - -lVirt_DevicePool + -lVirt_DevicePool \ + -lVirt_ConsoleRedirectionService \ + -lVirt_ConsoleRedirectionServiceCapabilities libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c diff -r 5f835a32ab3a -r e71c0941849d src/Virt_ConsoleRedirectionServiceCapabilities.c --- a/src/Virt_ConsoleRedirectionServiceCapabilities.c Wed Oct 15 14:14:09 2008 -0700 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.c Wed Oct 15 15:22:59 2008 -0700 @@ -32,6 +32,7 @@ #include "svpc_types.h" #include "Virt_ConsoleRedirectionService.h" +#include "Virt_ConsoleRedirectionServiceCapabilities.h" const static CMPIBroker *_BROKER; @@ -69,7 +70,9 @@ return s; } -static CMPIStatus get_console_rs_caps(const CMPIBroker *broker, +/* Removed the static keyword from the function declaration to + * make it available for other modules */ +CMPIStatus get_console_rs_caps(const CMPIBroker *broker, const CMPIObjectPath *ref, CMPIInstance **_inst, bool is_get_inst) diff -r 5f835a32ab3a -r e71c0941849d src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Wed Oct 15 14:14:09 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Wed Oct 15 15:22:59 2008 -0700 @@ -41,6 +41,8 @@ #include "Virt_VSMigrationCapabilities.h" #include "Virt_AllocationCapabilities.h" #include "Virt_DevicePool.h" +#include "Virt_ConsoleRedirectionService.h" +#include "Virt_ConsoleRedirectionServiceCapabilities.h" #include "svpc_types.h" @@ -75,7 +77,15 @@ goto out; s = get_migration_service(ref, &_inst, _BROKER, context, false); - } else + } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) { + s = get_console_rs_caps(_BROKER, ref, &_inst, true); + + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + + + s = get_console_rs(ref, &_inst, _BROKER, context, false); + } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, "Not found"); @@ -100,7 +110,7 @@ char* classname; classname = class_base_name(CLASSNAME(ref)); - + CU_DEBUG("After class_base_name\n: %s", classname); if (STREQC(classname, "VirtualSystemManagementService")) { s = get_vsms(ref, &_inst, _BROKER, context, true); if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) @@ -113,7 +123,18 @@ goto out; s = get_migration_caps(ref, &_inst, _BROKER, false); - } else + } else if(STREQC(classname, "ConsoleRedirectionService")) { + CU_DEBUG("before console_rs\n"); + s = get_console_rs(ref, &_inst, _BROKER, context, true); + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + + CU_DEBUG("before console_rs_caps\n"); + s = get_console_rs_caps(_BROKER, ref, &_inst, false); + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + CU_DEBUG("after console_rs_Caps\n"); + } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, ""); @@ -190,6 +211,8 @@ { CMPIInstance *inst = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; + + CU_DEBUG("service_to_cap\n"); if (!match_hypervisor_prefix(ref, info)) goto out; @@ -382,22 +405,28 @@ "Xen_HostSystem", "Xen_VirtualSystemManagementService", "Xen_VirtualSystemMigrationService", + "Xen_ConsoleRedirectionService", "KVM_HostSystem", "KVM_VirtualSystemManagementService", "KVM_VirtualSystemMigrationService", + "KVM_ConsoleRedirectionService", "LXC_HostSystem", "LXC_VirtualSystemManagementService", "LXC_VirtualSystemMigrationService", + "LXC_ConsoleRedirectionService", NULL }; static char *host_caps[] = { "Xen_VirtualSystemManagementCapabilities", "Xen_VirtualSystemMigrationCapabilities", + "Xen_ConsoleRedirectionServiceCapabilities", "KVM_VirtualSystemManagementCapabilities", "KVM_VirtualSystemMigrationCapabilities", + "KVM_ConsoleRedirectionServiceCapabilities", "LXC_VirtualSystemManagementCapabilities", "LXC_VirtualSystemMigrationCapabilities", + "LXC_ConsoleRedirectionServiceCapabilities", NULL, }; @@ -434,6 +463,9 @@ "Xen_VirtualSystemMigrationService", "KVM_VirtualSystemMigrationService", "LXC_VirtualSystemMigrationService", + "Xen_ConsoleRedirectionService", + "KVM_ConsoleRedirectionService", + "LXC_ConsoleRedirectionService", NULL }; From fujimura.toshifumi at np.css.fujitsu.com Thu Oct 16 01:03:38 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 16 Oct 2008 10:03:38 +0900 Subject: [Libvirt-cim] Request for all in one instllation page Message-ID: <48F692EA.3090102@np.css.fujitsu.com> Hello. I am installing Cimtest environment from Libvirt-CIM. Is there good documentation which discribes from Libvirt-CIM, OpenPegasus and Cimtest? At this moment, these documentations are distributed. I hope setup pages are united. Thanks. Toshifumi Fujimura. From yunguol at cn.ibm.com Thu Oct 16 01:23:13 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 16 Oct 2008 09:23:13 +0800 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48F692EA.3090102@np.css.fujitsu.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-16 09:03:38: > Hello. > > I am installing Cimtest environment from Libvirt-CIM. > Is there good documentation which discribes from Libvirt-CIM, > OpenPegasus and Cimtest? > At this moment, these documentations are distributed. > I hope setup pages are united. Pls refer to blow link, maybe it helps to you: https://ltc3.linux.ibm.com/wiki/LibvirtCimProvider/Setup > > Thanks. > Toshifumi Fujimura. > > _______________________________________________ > 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 Oct 16 01:59:10 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 18:59:10 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify ElementCapabilities/01_forward.py to call new EnumInstances Message-ID: <066002ecfb3df8ddb69f.1224122350@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224122345 25200 # Node ID 066002ecfb3df8ddb69fd33ce3cadb44433aa7c0 # Parent cfc2c9d1212d80b4ee2ddf37c5e9398b4e349b26 [TEST] Modify ElementCapabilities/01_forward.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r cfc2c9d1212d -r 066002ecfb3d suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 15 05:57:17 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 15 18:59:05 2008 -0700 @@ -30,7 +30,7 @@ from CimTest.Globals import logger, CIM_ from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC -from XenKvmLib.enumclass import enumerate +from XenKvmLib.enumclass import EnumInstances from XenKvmLib.common_util import get_host_info sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -38,8 +38,8 @@ bug_sblim = "00007" bug_sblim = "00007" def append_to_list(server, virt, poolname, valid_elc_id): - keys_list = ['InstanceID'] - pool_list = enumerate(server, poolname, keys_list, virt) + poolname = get_typed_class(virt, poolname) + pool_list = EnumInstances(server, poolname) if len(pool_list) > 0: for pool in pool_list: valid_elc_id.append(pool.InstanceID) From yunguol at cn.ibm.com Thu Oct 16 02:03:51 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 19:03:51 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify VirtualSystemSnapshotService/01_enum.py to call new EnumNames Message-ID: <7a32f75318dedb2743e0.1224122631@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224122626 25200 # Node ID 7a32f75318dedb2743e039cebcf8081cd9524565 # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Modify VirtualSystemSnapshotService/01_enum.py to call new EnumNames Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 7a32f75318de suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemSnapshotService/01_enum.py Wed Oct 15 19:03:46 2008 -0700 @@ -50,9 +50,7 @@ def main(): if status != PASS: return status try: - vs_sservice = enumclass.enumerate_inst(options.ip, - "VirtualSystemSnapshotService", - options.virt) + vs_sservice = enumclass.EnumNames(options.ip, cn) except Exception, detail: logger.error(CIM_ERROR_ENUMERATE, cn) logger.error("Exception: %s", detail) From yunguol at cn.ibm.com Thu Oct 16 02:09:02 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 19:09:02 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]Modify VirtualSystemManagementCapabilities/01_enum.py to call new EnumInstances Message-ID: # HG changeset patch # User Guolian Yun # Date 1224122934 25200 # Node ID f98155eef00a89404a49bbeab68d4aadea03eac1 # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST]Modify VirtualSystemManagementCapabilities/01_enum.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r f98155eef00a suites/libvirt-cim/cimtest/VirtualSystemManagementCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementCapabilities/01_enum.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementCapabilities/01_enum.py Wed Oct 15 19:08:54 2008 -0700 @@ -47,11 +47,7 @@ def main(): sync_method_val = Set([ 1L, 2L, 3L, 5L, 6L, 7L ]) try: - key_list = ["InstanceID"] - vsmc = enumclass.enumerate(server, - "VirtualSystemManagementCapabilities", - key_list, - options.virt) + vsmc = enumclass.EnumInstances(server, cn) except Exception: logger.error(CIM_ERROR_ENUMERATE, cn) return FAIL From fujimura.toshifumi at np.css.fujitsu.com Thu Oct 16 01:57:54 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 16 Oct 2008 10:57:54 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: References: Message-ID: <48F69FA2.6030405@np.css.fujitsu.com> Thanks for your quick reply. I can't access to this page. Is this no longer live? > libvirt-cim-bounces at redhat.com wrote on 2008-10-16 09:03:38: > > > Hello. > > > > I am installing Cimtest environment from Libvirt-CIM. > > Is there good documentation which discribes from Libvirt-CIM, > > OpenPegasus and Cimtest? > > At this moment, these documentations are distributed. > > I hope setup pages are united. > > Pls refer to blow link, maybe it helps to you: > https://ltc3.linux.ibm.com/wiki/LibvirtCimProvider/Setup > > > > > Thanks. > > Toshifumi Fujimura. > > > > _______________________________________________ > > 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 -- Toshifumi Fujimura. From yunguol at cn.ibm.com Thu Oct 16 02:23:16 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 19:23:16 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify RPCC.01 and VSMSD.01 to call new EnumInstances Message-ID: <1ea2c899795ca1f259b0.1224123796@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224123791 25200 # Node ID 1ea2c899795ca1f259b09c1f6813d728f074b56a # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Modify RPCC.01 and VSMSD.01 to call new EnumInstances Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 1ea2c899795c suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Wed Oct 15 19:23:11 2008 -0700 @@ -23,6 +23,7 @@ import sys from XenKvmLib import enumclass +from XenKvmLib.classes import get_typed_class from CimTest import Globals from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL @@ -32,15 +33,11 @@ sup_types = ['Xen', 'XenFV', 'KVM', 'LXC @do_main(sup_types) def main(): options = main.options - - key_list = ["InstanceID"] + cn = get_typed_class(options.virt, "ResourcePoolConfigurationCapabilities") try: - rpcc = enumclass.enumerate(options.ip, - "ResourcePoolConfigurationCapabilities", - key_list, - options.virt) + rpcc = enumclass.EnumInstances(options.ip, cn) except Exception: - Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, '%s_ResourcePoolConfigurationCapabilities' % options.virt) + Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, cn) return FAIL if len(rpcc) != 1: diff -r 96d45b1dcc08 -r 1ea2c899795c suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Wed Oct 15 19:23:11 2008 -0700 @@ -45,9 +45,7 @@ def main(): priority = 0 try: - vsmsd = enumclass.enumerate_inst(options.ip, - "VirtualSystemMigrationSettingData", - options.virt) + vsmsd = enumclass.EnumNames(options.ip, cn) except Exception, detail: logger.error(CIM_ERROR_ENUMERATE, cn) logger.error("Exception: %s", detail) From yunguol at cn.ibm.com Thu Oct 16 02:16:09 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 19:16:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify VirtualSystemMigrationCapabilities/01_enum.py to call new EnumNames Message-ID: # HG changeset patch # User Guolian Yun # Date 1224123362 25200 # Node ID dd29f042f551d33c00b66c07dacbd90ff0e590bd # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Modify VirtualSystemMigrationCapabilities/01_enum.py to call new EnumNames Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r dd29f042f551 suites/libvirt-cim/cimtest/VirtualSystemMigrationCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationCapabilities/01_enum.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationCapabilities/01_enum.py Wed Oct 15 19:16:02 2008 -0700 @@ -44,9 +44,7 @@ def main(): instid = 'MigrationCapabilities' try: - vsmc = enumclass.enumerate_inst(options.ip, - "VirtualSystemMigrationCapabilities", - options.virt) + vsmc = enumclass.EnumNames(options.ip, cn) except Exception: logger.error(CIM_ERROR_ENUMERATE, cn) return FAIL From kaitlin at linux.vnet.ibm.com Thu Oct 16 02:47:16 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 15 Oct 2008 19:47:16 -0700 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48F69FA2.6030405@np.css.fujitsu.com> References: <48F69FA2.6030405@np.css.fujitsu.com> Message-ID: <48F6AB34.2090606@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > Thanks for your quick reply. > > I can't access to this page. > Is this no longer live? Hi, We currently don't have a page that describes the setup for both cimtest and libvirt-cim. This is something we'll need to add. The current assumption is that users will have a working libvirt-cim environment prior to setting up cimtest. Do you have any setup questions we can answer in the meantime? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 02:49:06 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 15 Oct 2008 19:49:06 -0700 Subject: [Libvirt-cim] Errors on running Cimtest In-Reply-To: <48F47220.2040302@np.css.fujitsu.com> References: <48F47220.2040302@np.css.fujitsu.com> Message-ID: <48F6ABA2.8090907@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > Thanks for your reply. > > After your suggestion, I check tog-pegasus settings. > I found it needs to add following changes. > > ===================================================================== > 1.enable CIM to accept http-access > "cimconfig -p -s enableHttpConnection=true" > > 2.enable tog-pegasus to access by all users > "/etc/Pegasus/access.conf" > from > -: ALL EXCEPT pegasus:wbemNetwork > -: ALL EXCEPT pegasus root:wbemLocal > to > +: ALL EXCEPT :wbemNetwork > +: ALL EXCEPT :wbemLocal > ===================================================================== > > After above changes, I succeed to connect PyWBEM via socket. > > Thanks > Toshifumi Fujimura. Thanks for the heads up. I'll update the wiki with these details. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 02:52:08 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 15 Oct 2008 19:52:08 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Add VirtualSystemManagementService - 14_define_sys_disk.py In-Reply-To: <48F46E91.1070005@linux.vnet.ibm.com> References: <1b152e5e9a47ec932b5c.1223567690@localhost.localdomain> <48F46E91.1070005@linux.vnet.ibm.com> Message-ID: <48F6AC58.1010302@linux.vnet.ibm.com> >> +def get_vssd_rasd(ip, virt, addr): >> + class_vssd = get_vssd_class(virt) >> + vssd = class_vssd(test_dom, virt) >> + >> + vssd, rasd = default_vssd_rasd_str( >> + dom_name=test_dom, virt=virt) >> > The above line can be wrapped in a single 80 column line. > We do not require default_vssd_rasd_str(). Yes, I meant to put a comment here that get_vssd_class() should be replaced by a function that returns a mof. Currently, get_vssd_class() returns an object that is prefixed by XenKvmLib.vsms.<>, which doesn't work properly when passed to the DefineSystem() call. default_vssd_rasd_str() strips this piece away when it calls .mof() on the class. I'll include a patch to fix this when I resend. >> + >> + rasds = get_default_rasds(ip, virt) >> + >> + for i in range(0, len(rasds)): >> > just range(len(rasds)) will work. Good call =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From fujimura.toshifumi at np.css.fujitsu.com Thu Oct 16 03:57:28 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 16 Oct 2008 12:57:28 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48F6AB34.2090606@linux.vnet.ibm.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> Message-ID: <48F6BBA8.2020206@np.css.fujitsu.com> I am newbie on CIMOM. So I am just reading through the Administrator Guide for pegasus. But it takes time. I just want to know how to add/monitor CIM provider(libvirt-cim and libcmpiutil). Thanks Toshifumi Fujimura. > Toshifumi Fujimura wrote: >> Thanks for your quick reply. >> >> I can't access to this page. >> Is this no longer live? > > Hi, > > We currently don't have a page that describes the setup for both > cimtest and libvirt-cim. This is something we'll need to add. The > current assumption is that users will have a working libvirt-cim > environment prior to setting up cimtest. > > Do you have any setup questions we can answer in the meantime? > -- Toshifumi Fujimura. From kaitlin at linux.vnet.ibm.com Thu Oct 16 03:59:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 15 Oct 2008 20:59:21 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] [TEST] #2 Add RASD template functions, VSMS 14_define_sys_disk.py Message-ID: This patchset adds functions to get the template RASDs from SDC. These functions should be used to construct the RASDs passed to define system (instead of using the classes defined in vsms.py). This patchset is dependent on a recent version of pywbem. From kaitlin at linux.vnet.ibm.com Thu Oct 16 03:59:22 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 15 Oct 2008 20:59:22 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] #2 Add get_default_rasds() and get_rasd_templates() to rasd.py In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1223515128 25200 # Node ID bbd83da2f0f6bc96ec47025dda3f4f42c095ab86 # Parent cfc2c9d1212d80b4ee2ddf37c5e9398b4e349b26 [TEST] #2 Add get_default_rasds() and get_rasd_templates() to rasd.py NOTE: This patch only works with recent versions of pywbem (svn checkout of 09/04/2008 or later). These functions can be used to get the template RASD instances. Instead of building instances by hand (see default_vssd_rasd_str()), the test cases should be using the template RASDs provided by the SettingsDefineCapabilities association. get_rasd_templates() - returns the min, max, increment, and default template RASD instances for a given AllocationCapabilities instance. get_default_rasds() - returns just the default template RASD instances for the resource pools. Add inst_to_mof() to convert instances to mof format. This is only needed for libcmpiutil version 0.4 and older. Add get_default_rasd_mofs() - returns default template RASDs in mof format. Updates: -Change if/elif in inst_to_mof() to a single if. Signed-off-by: Kaitlin Rupert diff -r cfc2c9d1212d -r bbd83da2f0f6 suites/libvirt-cim/lib/XenKvmLib/classes.py --- a/suites/libvirt-cim/lib/XenKvmLib/classes.py Wed Oct 15 05:57:17 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py Wed Oct 08 18:18:48 2008 -0700 @@ -44,3 +44,16 @@ return cn[dash_index+1:] +#FIXME This function is only needed for libcmpiutil versions 0.4 and later. +#Once version 0.4 is obsolete, this function should be removed. +def inst_to_mof(inst): + mof_str = inst.tomof() + + mof_inst = "" + + for str in mof_str.splitlines(): + if str.endswith('{') or str.endswith('};') or not str.endswith('NULL;'): + mof_inst += "%s\n" % str + + return mof_inst + diff -r cfc2c9d1212d -r bbd83da2f0f6 suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Oct 15 05:57:17 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Oct 08 18:18:48 2008 -0700 @@ -24,8 +24,11 @@ from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS from XenKvmLib import vxml -from XenKvmLib.classes import get_typed_class - +from XenKvmLib import const +from XenKvmLib.classes import get_typed_class, get_class_type +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.assoc import Associators +from XenKvmLib.const import default_pool_name, default_network_name pasd_cn = 'ProcResourceAllocationSettingData' nasd_cn = 'NetResourceAllocationSettingData' @@ -165,3 +168,63 @@ memrasd_list['VirtualQuantity']) status = FAIL return status + +def get_rasd_templates(host_ip, type, pool_id): + ac_cn = get_typed_class(type, "AllocationCapabilities") + an_cn = get_typed_class(type, "SettingsDefineCapabilities") + + templates = [] + + try: + key_list = {"InstanceID" : pool_id } + + inst = GetInstance(host_ip, ac_cn, key_list) + + temps = Associators(host_ip, an_cn, ac_cn, InstanceID=inst.InstanceID) + + for temp in temps: + templates.append(temp) + + except Exception, detail: + logger.error("Exception: %s", detail) + + return templates + +def get_default_rasds(host_ip, type): + ac_id_list = [ "MemoryPool/0", + "DiskPool/%s" % default_pool_name, + ] + + if type == "LXC": + if const.LXC_netns_support is True: + ac_id_list.append("NetworkPool/%s" % default_network_name) + else: + ac_id_list.append("NetworkPool/%s" % default_network_name) + ac_id_list.append("ProcessorPool/0") + + templates = [] + + for id in ac_id_list: + rasd_list = get_rasd_templates(host_ip, type, id) + if len(rasd_list) < 1: + logger.info("No RASD templates returned for %s", id) + return [] + + for rasd in rasd_list: + if rasd['InstanceID'] == "Default": + templates.append(rasd) + + return templates + +def get_default_rasd_mofs(host_ip, type): + rasds = get_default_rasds(ip, virt) + + rasd_mofs = [] + + #FIXME for libcmpiutil versions 0.4 and later, inst_to_mof() is needed. + #This should be changed to rasd.tomof() once version 0.4 is obsolete. + for rasd in rasds: + rasd_mofs.append(inst_to_mof(rasd)) + + return rasd_mofs + From kaitlin at linux.vnet.ibm.com Thu Oct 16 03:59:23 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 15 Oct 2008 20:59:23 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] Fix VSSD mof generation In-Reply-To: Message-ID: <31fca7629bd7f394c3a9.1224129563@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224123190 25200 # Node ID 31fca7629bd7f394c3a900c9f20c5573bcedc1f7 # Parent bbd83da2f0f6bc96ec47025dda3f4f42c095ab86 [TEST] Fix VSSD mof generation Signed-off-by: Kaitlin Rupert diff -r bbd83da2f0f6 -r 31fca7629bd7 suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py --- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Oct 08 18:18:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Oct 15 19:13:10 2008 -0700 @@ -71,8 +71,7 @@ return PASS def test_rasd(options, temp, test_size): - vssd_class = vsms.get_vssd_class(options.virt) - vssd = vssd_class(name=default_dom, virt=options.virt) + vssd = vsms.get_vssd_mof(options.virt, default_dom) drasd_class = vsms.get_dasd_class(options.virt) drasd = drasd_class("hda", temp, default_dom) @@ -81,7 +80,7 @@ mrasd = mrasd_class(name=default_dom, megabytes=32) params = { - "vssd" : vssd.mof(), + "vssd" : vssd, "rasd" : [drasd.mof(), mrasd.mof()] } diff -r bbd83da2f0f6 -r 31fca7629bd7 suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Wed Oct 08 18:18:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Wed Oct 15 19:13:10 2008 -0700 @@ -51,7 +51,7 @@ name=default_dom) params = { - "vssd" : vssd.mof(), + "vssd" : vssd, "rasd" : [mrasd.mof()], } @@ -101,8 +101,7 @@ def main(): options = main.options - vssd_class = vsms.get_vssd_class(options.virt) - vssd = vssd_class(name=default_dom, virt=options.virt) + vssd = vsms.get_vssd_mof(options.virt, default_dom) status = PASS diff -r bbd83da2f0f6 -r 31fca7629bd7 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 08 18:18:48 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 15 19:13:10 2008 -0700 @@ -108,7 +108,6 @@ self.Kernel = const.Xen_kernel_path self.Ramdisk = const.Xen_init_path - class Xen_VirtualSystemSettingData(CIM_VirtualSystemSettingData): pass @@ -118,9 +117,10 @@ class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData): pass - at eval_cls('VirtualSystemSettingData') -def get_vssd_class(virt): - pass +def get_vssd_mof(virt, dom_name): + vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData")) + vssd = vssd_cn(dom_name, virt) + return vssd.mof() # classes to define RASD parameters class CIM_DiskResourceAllocationSettingData(CIMClassMOF): @@ -238,8 +238,7 @@ mem_mb=512, malloc_units="MegaBytes", virt='Xen'): - class_vssd = get_vssd_class(virt) - vssd = class_vssd(name=dom_name, virt=virt) + vssd = get_vssd_mof(virt, dom_name) class_dasd = get_dasd_class(virt) if virt == 'KVM': @@ -261,7 +260,7 @@ # LXC only takes disk and memory device for now. if virt == 'LXC': - return vssd.mof(), [d.mof(), m.mof()] + return vssd, [d.mof(), m.mof()] class_nasd = get_nasd_class(virt) if net_mac != const.Xen_default_mac: @@ -282,5 +281,5 @@ vcpu=proc_vcpu, name=dom_name) - return vssd.mof(), [d.mof(), n.mof(), p.mof(), m.mof()] + return vssd, [d.mof(), n.mof(), p.mof(), m.mof()] diff -r bbd83da2f0f6 -r 31fca7629bd7 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 08 18:18:48 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 15 19:13:10 2008 -0700 @@ -466,7 +466,7 @@ net_type, net_name, 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) + self.vssd = vsms.get_vssd_mof(virt, dom_name) self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name) self.nasd = vsms.get_nasd_class(virt)(type=net_type, mac=net_mac, From kaitlin at linux.vnet.ibm.com Thu Oct 16 03:59:24 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 15 Oct 2008 20:59:24 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add VirtualSystemManagementService - 14_define_sys_disk.py In-Reply-To: Message-ID: <16ed883b2d333bfe7305.1224129564@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224123190 25200 # Node ID 16ed883b2d333bfe73059c319b011e5fe6153ae8 # Parent 31fca7629bd7f394c3a900c9f20c5573bcedc1f7 [TEST] #2 Add VirtualSystemManagementService - 14_define_sys_disk.py This test defines a guest with a very large disk image. This test can be updated in the future to include other disk specific DefineSystem() tests. Updates: -Remove call to default_vssd_rasd_str(); replace with call to get_vssd_mof() Signed-off-by: Kaitlin Rupert diff -r 31fca7629bd7 -r 16ed883b2d33 suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Wed Oct 15 19:13:10 2008 -0700 @@ -0,0 +1,99 @@ +#!/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 os +from VirtLib.utils import run_remote +from CimTest.Globals import logger +from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.const import do_main, _image_dir +from XenKvmLib.common_util import create_using_definesystem +from XenKvmLib.test_doms import destroy_and_undefine_domain +from XenKvmLib.classes import get_typed_class, inst_to_mof +from XenKvmLib.rasd import get_default_rasds +from XenKvmLib.vsms import get_vssd_mof + +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +test_dom = 'rstest_disk_domain' + +def make_long_disk_path(ip): + path = os.path.join(_image_dir, 'cimtest_large_image') + + cmd = "dd if=/dev/zero of=%s bs=1M count=1 seek=8192" % path + + rc, out = run_remote(ip, cmd) + if rc != 0: + logger.error("Unable to create large disk image") + logger.error(out) + return None + + return path + +def get_vssd_rasd(ip, virt, addr): + vssd = get_vssd_mof(virt, test_dom) + + rasds = get_default_rasds(ip, virt) + + for i in range(0, len(rasds)): + if rasds[i]['PoolID'].find('DiskPool') >= 0: + rasds[i]['Address'] = addr + rasds[i] = inst_to_mof(rasds[i]) + + params = { 'vssd' : vssd, + 'rasd' : rasds + } + + return params + + at do_main(sup_types) +def main(): + options = main.options + + try: + addr = make_long_disk_path(options.ip) + if addr is None: + raise Exception("Unable to create large disk image") + + define_params = get_vssd_rasd(options.ip, options.virt, addr) + if len(define_params) != 2: + raise Exception("Unable to get VSSD and RASDs for %s" % test_dom) + + status = create_using_definesystem(test_dom, options.ip, + params=define_params, ref_config="", + virt=options.virt) + if status != PASS: + raise Exception("Unable to define %s" % test_dom) + + except Exception, details: + logger.error(details) + status = FAIL + + if os.path.exists(addr): + os.remove(addr) + + destroy_and_undefine_domain(test_dom, options.ip, options.virt) + + return status + +if __name__ == "__main__": + sys.exit(main()) + From deeptik at linux.vnet.ibm.com Thu Oct 16 05:05:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 16 Oct 2008 10:35:09 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update common_util.py to call new EnumInstances In-Reply-To: <48F51F76.6030604@linux.vnet.ibm.com> References: <1fe0fcbda10f32261c3f.1223968773@elm3b217.beaverton.ibm.com> <48F51F76.6030604@linux.vnet.ibm.com> Message-ID: <48F6CB85.7020501@linux.vnet.ibm.com> Kaitlin Rupert wrote: > yunguol at cn.ibm.com wrote: >> # HG changeset patch >> # User Guolian Yun >> # Date 1223968768 25200 >> # Node ID 1fe0fcbda10f32261c3f64f8d77ab4639c2b77ae >> # Parent c7eaf17bd591f313b93ff2b2087cee11b25789e0 >> [TEST] Update common_util.py to call new EnumInstances >> >> Signed-off-by: Guolian Yun >> >> diff -r c7eaf17bd591 -r 1fe0fcbda10f >> suites/libvirt-cim/lib/XenKvmLib/common_util.py >> --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Oct 10 >> 03:08:12 2008 -0700 >> +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 14 >> 00:19:28 2008 -0700 >> @@ -217,7 +217,8 @@ def get_host_info(server, virt="Xen"): >> # sblim-base-provider provider related changes >> >> ret, linux_cs = check_sblim(server) >> - host_info = enumclass.enumerate(server, 'HostSystem', keys, >> virt) >> + hs_class = get_typed_class(server, 'HostSystem') > > This should be: > > hs_class = get_typed_class(virt, 'HostSystem') Thanks kaitlin, I had missed this. From yunguol at cn.ibm.com Thu Oct 16 05:49:03 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 22:49:03 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Update VSSD.04 to call new EnumNames Message-ID: <58b1362db013915df27d.1224136143@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224136138 25200 # Node ID 58b1362db013915df27d5ce378a3150abef64cd0 # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST]#2 Update VSSD.04 to call new EnumNames Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 58b1362db013 suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py --- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Wed Oct 15 22:48:58 2008 -0700 @@ -104,7 +104,8 @@ def get_inst_from_list(classname, vssd_l # We expect only one record to be returned. if len(inst) != 1: - logger.error("%s returned %i %s objects, expected only 1" % (classname, len(inst), 'VSSD')) + logger.error("%s returned %i %s objects, expected only 1"\ + % (classname, len(inst), 'VSSD')) status = FAIL if status != PASS: @@ -117,9 +118,10 @@ def get_vssd_info(): status = PASS try: classname = get_typed_class(virt, 'VirtualSystemSettingData') - vssd = enumclass.enumerate_inst(server, eval('enumclass.' + classname), virt) + vssd = enumclass.EnumNames(server, classname) if len(vssd) < 1 : - logger.error("%s returned %i %s objects, expected atleast 1" % (classname, len(vssd), 'VSSD')) + logger.error("%s returned %i %s objects, expected atleast 1" \ + % (classname, len(vssd), 'VSSD')) status = FAIL except Exception, detail: From yunguol at cn.ibm.com Thu Oct 16 06:05:26 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 23:05:26 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ResourcePoolConfigurationService/01_enum.py to use get_host_info() Message-ID: <11d66d14bcac20d9b34b.1224137126@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224137120 25200 # Node ID 11d66d14bcac20d9b34bf23a71315f3dcf980be8 # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Fix ResourcePoolConfigurationService/01_enum.py to use get_host_info() Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 11d66d14bcac suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/01_enum.py Wed Oct 15 23:05:20 2008 -0700 @@ -25,7 +25,7 @@ import sys import sys from XenKvmLib import enumclass from XenKvmLib import rpcs -from XenKvmLib.common_util import check_sblim +from XenKvmLib.common_util import get_host_info from CimTest import Globals from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger @@ -40,16 +40,10 @@ def main(): server = options.ip classname = get_typed_class(options.virt, "ResourcePoolConfigurationService") keys = ['Name', 'CreationClassName'] - status, linux_cs = check_sblim(options.ip, options.virt) - if status == PASS: - host_sys = linux_cs - else: - try: - 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) - return FAIL + status, host_sys, host_cn = get_host_info(server, options.virt) + if status != PASS: + logger.error("Error in calling get_host_info function") + return FAIL try: rpcservice = rpcs.enumerate(server, classname) @@ -59,8 +53,8 @@ def main(): valid_service = {"Name" : "RPCS", "CreationClassName" : classname, - "SystemCreationClassName" : host_sys.CreationClassName, - "SystemName" : host_sys.Name} + "SystemCreationClassName" : host_cn, + "SystemName" : host_sys} if len(rpcservice) != 1: logger.error("Too many service error") From yunguol at cn.ibm.com Thu Oct 16 06:27:31 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 23:27:31 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update SystemDevice 02_reverse.py and 03_fwderrs.py to call new EnumInstances Message-ID: # HG changeset patch # User Guolian Yun # Date 1224138441 25200 # Node ID a87e6df3505f5fc32361dbf959d200c4f4d6f5e9 # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Update SystemDevice 02_reverse.py and 03_fwderrs.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r a87e6df3505f suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py --- a/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/02_reverse.py Wed Oct 15 23:27:21 2008 -0700 @@ -58,8 +58,9 @@ def main(): key_list = ["DeviceID", "CreationClassName", "SystemName", "SystemCreationClassName"] for items in devlist: + cn = get_typed_class(options.virt, items) try: - devs = devices.enumerate(options.ip, items, key_list, options.virt) + devs = enumclass.EnumInstances(options.ip, cn) except Exception, detail: logger.error("Exception: %s" % detail) cxml.destroy(options.ip) @@ -99,7 +100,8 @@ def main(): 'Name': systems[0]['Name'], 'CreationClassName': systems[0]['CreationClassName'] } - system = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) + cn = get_typed_class(options.virt, 'ComputerSystem') + system = enumclass.GetInstance(options.ip, cn, keys) if system.Name == test_dom: status = PASS diff -r 96d45b1dcc08 -r a87e6df3505f suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py --- a/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Wed Oct 15 23:27:21 2008 -0700 @@ -34,7 +34,7 @@ from VirtLib import utils from VirtLib import utils from XenKvmLib import vxml from XenKvmLib import assoc -from XenKvmLib import devices +from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -89,7 +89,8 @@ def main(): try: for item in devlist: - devs = devices.enumerate(options.ip, item, key_list, options.virt) + cn = get_typed_class(options.virt, item) + devs = enumclass.EnumInstances(options.ip, cn) if len(devs) == 0: raise Exception('empty result returned') for dev in devs: From yunguol at cn.ibm.com Thu Oct 16 06:40:46 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 23:40:46 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update ElementConforms/01_forward.py to call new EnumInstances Message-ID: <305508cd6aaacfcfe133.1224139246@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224139240 25200 # Node ID 305508cd6aaacfcfe133372bc963b55f284e599a # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Update ElementConforms/01_forward.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 305508cd6aaa suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Wed Oct 15 23:40:40 2008 -0700 @@ -49,7 +49,7 @@ from CimTest.Globals import logger, CIM_ from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, CIM_ERROR_ENUMERATE from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.enumclass import enumerate +from XenKvmLib.enumclass import EnumInstances from XenKvmLib.const import default_network_name, default_pool_name @@ -139,8 +139,7 @@ def get_proflist(server, reg_classname, profiles_instid_list = [] status = PASS try: - key_list = ["InstanceID"] - proflist = enumerate(server, reg_classname, key_list, virt) + proflist = EnumInstances(server, reg_classname) if len(proflist) < 7: logger.error("'%s' returned '%d' '%s' objects, expected atleast 7", reg_classname, len(proflist), 'Profile') From yunguol at cn.ibm.com Thu Oct 16 06:50:35 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 15 Oct 2008 23:50:35 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update ElementConforms/02_reverse.py to call new EnumInstances Message-ID: <911740d773d5e3300050.1224139835@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224139829 25200 # Node ID 911740d773d5e33000506db533a19d646ab2f18f # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Update ElementConforms/02_reverse.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 911740d773d5 suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Wed Oct 15 23:50:29 2008 -0700 @@ -107,7 +107,8 @@ def main(): keys = ['Name', 'CreationClassName'] try: #Getting the hostname, to verify with the value returned by the assoc. - host_sys = enumclass.enumerate(options.ip, 'HostSystem', keys, options.virt) + cn = get_typed_class(options.virt, 'HostSystem') + host_sys = enumclass.EnumInstances(options.ip, cn) if len(host_sys) < 1: logger.error("ERROR: Enumerate returned 0 host instances") @@ -123,14 +124,10 @@ def main(): Globals.CIM_NS = 'root/interop' try: - key_list = ["InstanceID"] - proflist = enumclass.enumerate(options.ip, - "RegisteredProfile", - key_list, - options.virt) + cn = get_typed_class(options.virt, 'RegisteredProfile') + proflist = enumclass.EnumInstances(options.ip, cn) except Exception, details: - logger.error(CIM_ERROR_ENUMERATE, - get_typed_class(options.virt, 'RegisteredProfile')) + logger.error(CIM_ERROR_ENUMERATE, cn) logger.error("Exception: %s", details) return status From yunguol at cn.ibm.com Thu Oct 16 07:02:38 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 00:02:38 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update Profile/02_profile_to_elec.py to call new EnumNames Message-ID: <0167493d2ce4cad2c09d.1224140558@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224140552 25200 # Node ID 0167493d2ce4cad2c09d572964844f199555fcb4 # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Update Profile/02_profile_to_elec.py to call new EnumNames This tc updates fails for me, I look into this but I can't work it out. Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 0167493d2ce4 suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py --- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Oct 16 00:02:32 2008 -0700 @@ -95,7 +95,7 @@ def get_profile(server, virt): profile = None try: - proflist = enumclass.enumerate_inst(server, 'RegisteredProfile', virt) + proflist = enumclass.EnumNames(server, cn) status, profile = get_expected_inst(cn, proflist, 'RegisteredName', registeredname) except Exception, detail: From yunguol at cn.ibm.com Thu Oct 16 07:13:59 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 00:13:59 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update VirtualSystemManagementService/11_define_memrasdunits.py to call new EnumNames Message-ID: <2a361d2a042e88322ddf.1224141239@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224141233 25200 # Node ID 2a361d2a042e88322ddfba286106de2c6e5c5aaa # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Update VirtualSystemManagementService/11_define_memrasdunits.py to call new EnumNames This tc fails for me, I don't know why it is Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 2a361d2a042e suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Oct 16 00:13:53 2008 -0700 @@ -69,7 +69,8 @@ def try_define(options, vssd, units, val def check_value(options): mrasd_cn = get_typed_class(options.virt, rasd.masd_cn) - rasds = enumclass.enumerate_inst(options.ip, mrasd_cn, options.virt) + + rasds = enumclass.EnumNames(options.ip, mrasd_cn) the_rasd = None mem_kb = mem_bytes >> 10 From yunguol at cn.ibm.com Thu Oct 16 07:28:28 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 00:28:28 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update RASD.02 and 04 to call new EnumNames Message-ID: <2826e6986d8ac5ec6016.1224142108@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224142098 25200 # Node ID 2826e6986d8ac5ec6016fa43890260794841f185 # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Update RASD.02 and 04 to call new EnumNames Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 2826e6986d8a suites/libvirt-cim/cimtest/RASD/02_enum.py --- a/suites/libvirt-cim/cimtest/RASD/02_enum.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/02_enum.py Thu Oct 16 00:28:18 2008 -0700 @@ -68,7 +68,7 @@ def get_rasd_values(classname, virt, ser status = PASS rasd_list = [] try: - rasd_list = enumclass.enumerate_inst(server, classname, virt) + rasd_list = enumclass.EnumNames(server, classname) if len(rasd_list) < 1: logger.error("%s returned %i instances, excepted at least 1.", classname, len(rasd_list)) diff -r 96d45b1dcc08 -r 2826e6986d8a suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py --- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Thu Oct 16 00:28:18 2008 -0700 @@ -90,7 +90,7 @@ def test_rasd(options, temp, test_size): params=params, virt=options.virt) - rasds = enumclass.enumerate_inst(options.ip, drasd_class, options.virt) + rasds = enumclass.EnumNames(options.ip, drasd_class) status = FAIL for rasd in rasds: From fujimura.toshifumi at np.css.fujitsu.com Thu Oct 16 07:43:55 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 16 Oct 2008 16:43:55 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48F6AB34.2090606@linux.vnet.ibm.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> Message-ID: <48F6F0BB.1030107@np.css.fujitsu.com> I think I've registerd Libvirt-CIM and Libcmputil as CIM Provider. I re-installed Libvirt-CIM package. And I made sure that with Pegasus's command "cimprovider -s -l". But following error messages didn't disappear. ============================================================== -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: FAIL ERROR - Failed to enumerate the class of KVM_AllocationCapabilities ERROR - Unauthorized ERROR - Only 0 pools returned, expected at least 4 -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL ERROR - AuthError : Unauthorized Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 116, in do_try File "02_alloccap_gi_errs.py", line 109, in main expr_values=exp['invalid_keyvalue'], bug_no="") File "./lib/XenKvmLib/common_util.py", line 264, in try_getinstance File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", line 464, in GetInstance **params) File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", line 181, in imethodcall verify_callback = self.verify_callback) File "/usr/lib/python2.5/site-packages/pywbem/cim_http.py", line 226, in wbem_request raise AuthError(response.reason) AuthError: Unauthorized ERROR - None -------------------------------------------------------------------- ============================================================== Would you have any more suggestion of this messages? > Toshifumi Fujimura wrote: >> Thanks for your quick reply. >> >> I can't access to this page. >> Is this no longer live? > > Hi, > > We currently don't have a page that describes the setup for both > cimtest and libvirt-cim. This is something we'll need to add. The > current assumption is that users will have a working libvirt-cim > environment prior to setting up cimtest. > > Do you have any setup questions we can answer in the meantime? > -- Toshifumi Fujimura. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: run_report.txt URL: From deeptik at linux.vnet.ibm.com Thu Oct 16 08:13:33 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 16 Oct 2008 01:13:33 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 04_reverse_errs.py tc of HostedDependency to work with/without sblim-base-provider Message-ID: <4ad371d62e4073f07958.1224144813@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1224144770 25200 # Node ID 4ad371d62e4073f07958e9c5bf521ad4c1a6c32f # Parent 7b11fbb20dbfa346f4aa4d2a8fd1731490cd26da [TEST] Updating 04_reverse_errs.py tc of HostedDependency to work with/without sblim-base-provider. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r 7b11fbb20dbf -r 4ad371d62e40 suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Tue Oct 14 06:12:11 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Thu Oct 16 01:12:50 2008 -0700 @@ -42,110 +42,95 @@ test_dom = "hd_domain1" test_mac = "00:11:22:33:44:55" -bug='90264' +bug_sblim='00007' exp_rc = 6 #CIM_ERR_NOT_FOUND exp_d1 = "No such instance (Name)" exp_d2 = "No such instance (CreationClassName)" expr_values = { - "invalid_name_keyname" : { 'rc' : exp_rc, 'desc' : exp_d1 }, - "invalid_name_keyvalue" : { 'rc' : exp_rc, 'desc' : exp_d1 }, - "invalid_ccname_keyname" : { 'rc' : exp_rc, 'desc' : exp_d2 }, - "invalid_ccname_keyvalue" : { 'rc' : exp_rc, 'desc' : exp_d2 } + "INVALID_KeyName" : { 'rc' : exp_rc, 'desc' : exp_d1 }, + "INVALID_NameValue" : { 'rc' : exp_rc, 'desc' : exp_d1 }, + "INVALID_CCNKeyName" : { 'rc' : exp_rc, 'desc' : exp_d2 }, + "INVALID_CCNameValue" : { 'rc' : exp_rc, 'desc' : exp_d2 } } -def err_invalid_name_keyname(server, conn, virt, assoc_classname, field): - status, host_name, classname = get_host_info(server, virt) - if status: - return status - keys = { - 'CreationClassName' : classname, \ - field : host_name - } - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ - expr_values=expr_values['invalid_name_keyname'], \ - bug_no=bug) - -def err_invalid_name_keyvalue(server, conn, virt, assoc_classname, field): - status, host_name, classname = get_host_info(server, virt) - if status: - return status - keys = { - 'CreationClassName' : classname, \ - 'Name' : field - } - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ - expr_values=expr_values['invalid_name_keyvalue'], \ - bug_no=bug) - -def err_invalid_ccname_keyname(server, conn, virt, assoc_classname, field): - status, host_name, classname = get_host_info(server, virt) - if status: - return status - keys = { - field : classname, \ - 'Name' : host_name - } - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ - expr_values=expr_values['invalid_ccname_keyname'], \ - bug_no=bug) -def err_invalid_ccname_keyvalue(server, conn, virt, assoc_classname, field): - status, host_name, classname = get_host_info(server, virt) - if status: - return status - keys = { - 'CreationClassName' : field, \ - 'Name' : host_name - } - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ - expr_values=expr_values['invalid_ccname_keyvalue'], \ - bug_no=bug) +def verify_err_fields(cxml, server, conn, keys, classname, + assoc_classname, msg, field): + try: + ret = try_assoc(conn, classname, assoc_classname, keys, + field_name=field, expr_values=expr_values[field], + bug_no="") + if ret != PASS: + if classname == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + logger.error("--- FAILED: %s---", msg) + cxml.destroy(server) + cxml.undefine(server) + except Exception, details: + logger.error("Exception: %s", details) + return FAIL + return ret @do_main(sup_types) def main(): options = main.options + server = options.ip + virt = options.virt - status = PASS - server = options.ip - virtxml = vxml.get_class(options.virt) - if options.virt == "LXC": + virtxml = vxml.get_class(virt) + if virt == "LXC": cxml = virtxml(test_dom) else: cxml = virtxml(test_dom, mac = test_mac) - ret = cxml.create(options.ip) + ret = cxml.create(server) if not ret: logger.error("Failed to Create the dom: %s" % test_dom) - status = FAIL + return FAIL + + conn = assoc.myWBEMConnection('http://%s' % server, + (CIM_USER, CIM_PASS), CIM_NS) + + acn = get_typed_class(virt, 'HostedDependency') + status, host_name, classname = get_host_info(server, virt) + if status: + logger.error("Unable to get host info") return status - conn = assoc.myWBEMConnection('http://%s' % options.ip, - (CIM_USER, CIM_PASS), CIM_NS) - acn = get_typed_class(options.virt, 'HostedDependency') - ret_value = err_invalid_name_keyname(server, conn, options.virt, acn, - field='INVALID_KeyName') + + msg = 'Invalid Name Key Name' + field = 'INVALID_KeyName' + keys = { 'CreationClassName' : classname, field : host_name } + ret_value = verify_err_fields(cxml, server, conn, keys, classname, + acn, msg, field) if ret_value != PASS: - logger.error("--- FAILED: Invalid Name Key Name.---") - status = ret_value - ret_value = err_invalid_name_keyvalue(server, conn, options.virt, acn, - field='INVALID_NameValue') + return ret_value + + msg = 'Invalid Name Key Value' + field='INVALID_NameValue' + keys = { 'CreationClassName' : classname, 'Name' : field } + ret_value = verify_err_fields(cxml, server, conn, keys, classname, + acn, msg, field) if ret_value != PASS: - logger.error("--- FAILED: Invalid Name Key Value.---") - status = ret_value - ret_value = err_invalid_ccname_keyname(server, conn, options.virt, acn, - field='INVALID_CCNKeyName') + return ret_value + + msg = 'Invalid CreationClassName Key Name' + field='INVALID_CCNKeyName' + keys = { field : classname, 'Name' : host_name } + ret_value = verify_err_fields(cxml, server, conn, keys, classname, + acn, msg, field) if ret_value != PASS: - logger.error("--- FAILED: Invalid CreationClassName Key Name---") - status = ret_value - ret_value = err_invalid_ccname_keyvalue(server, conn, options.virt, acn, - field='INVALID_CCNameValue') - if ret_value != PASS: - logger.error("--- FAILED: Invalid CreationClassName Key Value---") - status = ret_value - cxml.destroy(options.ip) - cxml.undefine(options.ip) - return status + return ret_value + msg = 'Invalid CreationClassName Key Value' + field='INVALID_CCNameValue' + keys = { 'CreationClassName' : field, 'Name' : host_name } + ret_value = verify_err_fields(cxml, server, conn, keys, classname, + acn, msg, field) + cxml.destroy(server) + cxml.undefine(server) + return ret_value if __name__ == "__main__": sys.exit(main()) From deeptik at linux.vnet.ibm.com Thu Oct 16 08:40:31 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 16 Oct 2008 01:40:31 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 05_hostsystem_cap.py tc of EC to work with/without sblim-base-provider Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1224146298 25200 # Node ID dd9065d32ce97c688cf09ce6ed4df1a477fd136b # Parent 4ad371d62e4073f07958e9c5bf521ad4c1a6c32f [TEST] Updating 05_hostsystem_cap.py tc of EC to work with/without sblim-base-provider. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r 4ad371d62e40 -r dd9065d32ce9 suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Thu Oct 16 01:12:50 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/05_hostsystem_cap.py Thu Oct 16 01:38:18 2008 -0700 @@ -54,9 +54,10 @@ from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +bug_sblim = '00007' def print_err(err, detail, cn): logger.error(err % cn) @@ -81,7 +82,7 @@ return status, inst -def get_assoc_info(server, cn, an, qcn, name, virt="Xen"): +def get_assoc_info(server, cn, an, qcn, name): status = PASS assoc_info = [] try: @@ -89,10 +90,14 @@ an, cn, CreationClassName = cn, - Name = name,) + Name = name) if len(assoc_info) < 1: - logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) - status = FAIL + if cn == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim), assoc_info + else: + logger.error("%s returned %i %s objects", an, + len(assoc_info), qcn) + return FAIL, assoc_info except Exception, detail: print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn) status = FAIL @@ -116,7 +121,7 @@ SystemCreationClassName=sccname, SystemName=sname) if len(assoc_info) < 1: - logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) + logger.error("%s returned %i %s objects", an, len(assoc_info), qcn) status = FAIL except Exception, detail: @@ -143,8 +148,8 @@ cn = service_list[service_fieldname]['CreationClassName'] an = get_typed_class(virt, 'ElementCapabilities') qcn = 'Capabilities' - status, cap_assoc_info = get_association_info(server, service_fieldname, \ - cn, an, qcn, virt) + status, cap_assoc_info = get_association_info(server, service_fieldname, + cn, an, qcn, virt) if status != PASS or len(cap_assoc_info) == 0: return status cn = cap_assoc_info[0].classname @@ -163,37 +168,40 @@ def main(): options = main.options server = options.ip + virt = options.virt global service_list global cap_list # initialising the list - service_list = { 'ManagementService' : 'Management Service', \ + service_list = { 'ManagementService' : 'Management Service', 'MigrationService' : 'MigrationService' } # This will be used for the comparison at the end. - mgtcap = { 'ClassName' : get_typed_class(options.virt, 'VirtualSystemManagementCapabilities'), \ + vsmancap_cn = get_typed_class(virt, 'VirtualSystemManagementCapabilities') + vsmigcap_cn = get_typed_class(virt, 'VirtualSystemMigrationCapabilities') + mgtcap = { 'ClassName' : vsmancap_cn, 'InstanceID' : 'ManagementCapabilities' } - migcap = { 'ClassName' : get_typed_class(options.virt, 'VirtualSystemMigrationCapabilities'), \ + migcap = { 'ClassName' : vsmigcap_cn, 'InstanceID' : 'MigrationCapabilities' } cap_list = { - 'ManagementCapabilities' : mgtcap, \ + 'ManagementCapabilities' : mgtcap, 'MigrationCapabilities' : migcap } # Get the host info - status, host_name, classname = get_host_info(server, options.virt) + status, host_name, classname = get_host_info(server, virt) if status != PASS: return status - an = get_typed_class(options.virt, 'HostedService') + an = get_typed_class(virt, 'HostedService') cn = classname qcn = 'Service' name = host_name # Get the service available on the host - status, service_assoc_info = get_assoc_info(server, cn, an, qcn, name, options.virt) + status, service_assoc_info = get_assoc_info(server, cn, an, qcn, name) if status != PASS or len(service_assoc_info) == 0: return status @@ -212,7 +220,7 @@ # Query ElementCapabilities and verify the ManagementCapabilities information. service_fieldname = 'ManagementService' cap_key = 'ManagementCapabilities' - status = verify_cap_fields(server, service_fieldname, cap_key, options.virt) + status = verify_cap_fields(server, service_fieldname, cap_key, virt) if status != PASS: logger.error("ManagementCapabilities Verification failed") return status @@ -220,7 +228,7 @@ # Query ElementCapabilities and verify the MigrationCapabilities information. service_fieldname = 'MigrationService' cap_key = 'MigrationCapabilities' - status = verify_cap_fields(server, service_fieldname, cap_key, options.virt) + status = verify_cap_fields(server, service_fieldname, cap_key, virt) if status != PASS: logger.error("MigrationCapabilities Verification failed") return status From yunguol at cn.ibm.com Thu Oct 16 09:35:10 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 16 Oct 2008 17:35:10 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 14 2008 In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-14 14:42:21: > > libvirt-cim-bounces at redhat.com wrote on 2008-10-14 13:12:17: > > > > > > > Guo Lian Yun wrote: > > > > > > ================================================= > > > KVM on sfcb Test Run Summary for Oct 14 2008 > > > ================================================= > > > Distro: Fedora release 9.90.1 (Rawhide) > > > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > > > libvirt: 0.4.5 > > > Hypervisor: QEMU 0.9.1 > > > CIMOM: sfcb sfcbd 1.3.3preview > > > Libvirt-cim revision: 715+ > > > Libvirt-cim changeset: f7dfc83a73ac+ > > > ================================================= > > > FAIL : 1 > > > XFAIL : 3 > > > SKIP : 4 > > > PASS : 127 > > > ----------------- > > > Total : 135 > > > ================================================= > > > FAIL Test Summary: > > > ComputerSystemIndication - 01_created_indication.py: FAIL > > > > > > ================================================= > > > XFAIL Test Summary: > > > ComputerSystem - 32_start_reboot.py: XFAIL > > > ComputerSystem - 33_suspend_reboot.py: XFAIL > > > SettingsDefineCapabilities - 03_forward_errs.py: XFAIL > > > > ComputerSystem - 32_start_reboot.py & 33_suspend_reboot.py are > valid tc of XFAIL, > which also have bug no. > > SettingsDefineCapabilities - 03_forward_errs.py is not a valid > tc of XFAIL, we have > to fix it. The XFAIL of SettingsDefineCapabilities - 03_forward_errs.py is because of provider. There is none report with an invalid CreationClassName of AC on sfcb when I do wbemcli query as follows: wbemcli ain -ac KVM_SettingsDefineCapabilities http://root:elm3b217 at localhost/root/virt:KVM_invalid.InstanceID="MemoryPool/0" And I can get expect output on Pegauses: wbemcli ain -ac Xen_SettingsDefineCapabilities http://root:elm3b217 at localhost/root/virt:INVALID_CCN_KeyName.InstanceID="MemoryPool/0" * * wbemcli: Cim: (4) CIM_ERR_INVALID_PARAMETER: INVALID_CCN_KeyName.InstanceID="MemoryPool/0" * I will add a known provider issue in wiki. Kaitlin - Would you please to fix this? Thanks! > > Thanks! > > > Can you verify if its a valid case of XFAIL. If yes then please pass > > appropriate bug no. > > > > Thanks and Regards, > > Deepti. > > > > _______________________________________________ > > 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 yunguol at cn.ibm.com Thu Oct 16 10:01:25 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 03:01:25 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add bug number to SettingsDefineCapabilities/03_forward_errs.py Message-ID: <46678f7f5697f804c8ca.1224151285@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224151280 25200 # Node ID 46678f7f5697f804c8caa2f2c98f48bc7702ba71 # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Add bug number to SettingsDefineCapabilities/03_forward_errs.py Signed-off-by: Guolian Yun diff -r 96d45b1dcc08 -r 46678f7f5697 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Thu Oct 16 03:01:20 2008 -0700 @@ -36,6 +36,7 @@ from XenKvmLib.classes import get_typed_class platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] +bug = '00009' expr_values = { "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, @@ -100,7 +101,7 @@ keys = { 'InstanceID' : 'MemoryPool/0' } return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ expr_values=expr_values['invalid_ccname_keyname'], - bug_no="") + bug_no=bug) @do_main(platform_sup) def main(): From deeptik at linux.vnet.ibm.com Thu Oct 16 10:14:54 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 16 Oct 2008 03:14:54 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing and updating 01_forward.py of HostedService to work with/without sblim-base-provider Message-ID: <385c3d0a59afd7283a3e.1224152094@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1224152067 25200 # Node ID 385c3d0a59afd7283a3ef8d26a49b690e601a19c # Parent dd9065d32ce97c688cf09ce6ed4df1a477fd136b [TEST] Fixing and updating 01_forward.py of HostedService to work with/without sblim-base-provider. Fixed the debug stmt. Updated to with/without sblim-base-provider. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r dd9065d32ce9 -r 385c3d0a59af suites/libvirt-cim/cimtest/HostedService/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Thu Oct 16 01:38:18 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Thu Oct 16 03:14:27 2008 -0700 @@ -22,6 +22,7 @@ # import sys +from sets import Set from VirtLib import utils from XenKvmLib import assoc from XenKvmLib import enumclass @@ -29,23 +30,25 @@ from CimTest import Globals from XenKvmLib.const import do_main from CimTest.Globals import logger -from CimTest.ReturnCodes import PASS, FAIL, XFAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.common_util import get_host_info sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +bug_sblim = '00007' @do_main(sup_types) def main(): options = main.options virt = options.virt + server = options.ip try: - status, host_name, host_ccn = get_host_info(options.ip, virt) + status, host_name, host_ccn = get_host_info(server, virt) if status != PASS: logger.error("Failed to get host info.") return status an = get_typed_class(virt, "HostedService") - service = assoc.AssociatorNames(options.ip, + service = assoc.AssociatorNames(server, an, host_ccn, CreationClassName = host_ccn, Name = host_name) @@ -58,26 +61,27 @@ logger.error("No association return") return FAIL - valid_services = [get_typed_class(virt, "ResourcePoolConfigurationService"), - get_typed_class(virt, "VirtualSystemManagementService"), - get_typed_class(virt, "VirtualSystemMigrationService"), - get_typed_class(virt, "ConsoleRedirectionService")] + val_serv = Set([get_typed_class(virt, "ResourcePoolConfigurationService"), + get_typed_class(virt, "VirtualSystemManagementService"), + get_typed_class(virt, "VirtualSystemMigrationService"), + get_typed_class(virt, "ConsoleRedirectionService")]) ccn_list = [] for item in service: ccn_list.append(item.keybindings["CreationClassName"]) - - if len(ccn_list) != len(valid_services): - logger.error("'%s' returned %d, expected %d", - an, len(valid_services), len(ccn_list)) + + ccn_list = Set(ccn_list) + + if (len(val_serv) - len(ccn_list)) != 0: + if host_ccn == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + + logger.error("Mismatching services values") + logger.error("'%s' returned %d, expected %d", + an, len(ccn_list), len(val_serv)) return FAIL - for ccn in ccn_list: - if ccn not in valid_services: - logger.error("Invalid Value '%s' returned for association '%s'", - ccn, an) - return FAIL - - + return PASS if __name__ == "__main__": sys.exit(main()) From deeptik at linux.vnet.ibm.com Thu Oct 16 10:41:41 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 16 Oct 2008 03:41:41 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 02_hostsystem_to_rasd.py of HostSystem to work with/without sblim-base-provider Message-ID: <9d17e6d2f6b5f2d9614c.1224153701@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1224153688 25200 # Node ID 9d17e6d2f6b5f2d9614cd3b3f6df753886feffa8 # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 [TEST] Updating 02_hostsystem_to_rasd.py of HostSystem to work with/without sblim-base-provider. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r 96d45b1dcc08 -r 9d17e6d2f6b5 suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Wed Oct 15 06:07:28 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Thu Oct 16 03:41:28 2008 -0700 @@ -55,12 +55,12 @@ from XenKvmLib.common_util import get_host_info from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ CIM_ERROR_ASSOCIATORS -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ verify_diskrasd_values, verify_memrasd_values, rasd_init_list sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] - +bug_sblim = '00007' test_dom = "CrossClass_GuestDom" test_vcpus = 1 @@ -112,7 +112,7 @@ return status, inst -def get_assoc_info(server, cn, an, qcn, name, vsxml, virt="Xen"): +def get_assoc_info(server, cn, an, qcn, name, vsxml): status = PASS assoc_info = [] try: @@ -122,8 +122,11 @@ CreationClassName = cn, Name = name) if len(assoc_info) < 1: - logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) - status = FAIL + if cn == 'Linux_ComputerSystem': + status = XFAIL_RC(bug_sblim) + else: + logger.error("%s returned %i %s objects", an, len(assoc_info), qcn) + status = FAIL except Exception, detail: print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn) @@ -201,9 +204,10 @@ an = get_typed_class(options.virt, 'HostedDependency') qcn = get_typed_class(options.virt, 'ComputerSystem') name = host_name - status, cs_assoc_info = get_assoc_info(server, cn, an, qcn, name, vsxml, options.virt) + status, cs_assoc_info = get_assoc_info(server, cn, an, qcn, name, vsxml) if status != PASS or len(cs_assoc_info) == 0: return status + filter_name = {"key" : "Name"} status, cs_dom = get_inst_from_list(server, cn, @@ -217,7 +221,7 @@ an = get_typed_class(options.virt, 'SystemDevice') qcn = 'Devices' name = test_dom - status, sd_assoc_info = get_assoc_info(server, cn, an, qcn, name, vsxml, options.virt) + status, sd_assoc_info = get_assoc_info(server, cn, an, qcn, name, vsxml) if status != PASS or len(sd_assoc_info) == 0: return status status = verify_RASD_values(server, sd_assoc_info, vsxml, options.virt) From kaitlin at linux.vnet.ibm.com Thu Oct 16 16:05:24 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 09:05:24 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Modify RPCC.01 and VSMSD.01 to call new EnumInstances In-Reply-To: <1ea2c899795ca1f259b0.1224123796@elm3b217.beaverton.ibm.com> References: <1ea2c899795ca1f259b0.1224123796@elm3b217.beaverton.ibm.com> Message-ID: <48F76644.80608@linux.vnet.ibm.com> > diff -r 96d45b1dcc08 -r 1ea2c899795c suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Wed Oct 15 06:07:28 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Wed Oct 15 19:23:11 2008 -0700 > @@ -45,9 +45,7 @@ def main(): > priority = 0 > > try: > - vsmsd = enumclass.enumerate_inst(options.ip, > - "VirtualSystemMigrationSettingData", > - options.virt) > + vsmsd = enumclass.EnumNames(options.ip, cn) > except Exception, detail: > logger.error(CIM_ERROR_ENUMERATE, cn) > logger.error("Exception: %s", detail) This test fails with: VirtualSystemMigrationSettingData - 01_enum.py: FAIL ERROR - KeyError : 'migrationtype' Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 116, in do_try File "01_enum.py", line 65, in main if verify_vsmsd['MigrationType'] != MType: File "/usr/lib/python2.5/site-packages/pywbem/cim_obj.py", line 533, in __getitem__ def __getitem__(self, key): return self.keybindings[key] File "/usr/lib/python2.5/site-packages/pywbem/cim_obj.py", line 76, in __getitem__ return self.data[k][1] KeyError: 'migrationtype' ERROR - None You'll want to change enumclass.EnumNames() to enumclass.EnumInstances(). The test case is verifying all the attributes of the instance. However, enumclass.EnumNames() only returns a reference, not and instance. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 16:28:33 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 09:28:33 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update Profile/02_profile_to_elec.py to call new EnumNames In-Reply-To: <0167493d2ce4cad2c09d.1224140558@elm3b217.beaverton.ibm.com> References: <0167493d2ce4cad2c09d.1224140558@elm3b217.beaverton.ibm.com> Message-ID: <48F76BB1.10702@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224140552 25200 > # Node ID 0167493d2ce4cad2c09d572964844f199555fcb4 > # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 > [TEST] Update Profile/02_profile_to_elec.py to call new EnumNames > > This tc updates fails for me, I look into this but I can't work it out. > > > Signed-off-by: Guolian Yun > > diff -r 96d45b1dcc08 -r 0167493d2ce4 suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py > --- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Wed Oct 15 06:07:28 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Oct 16 00:02:32 2008 -0700 > @@ -95,7 +95,7 @@ def get_profile(server, virt): > profile = None > > try: > - proflist = enumclass.enumerate_inst(server, 'RegisteredProfile', virt) > + proflist = enumclass.EnumNames(server, cn) > status, profile = get_expected_inst(cn, proflist, 'RegisteredName', > registeredname) > except Exception, detail: This is because EnumNames() only returns a reference, not and instance. The test case is attempting to verify the attributes of the instance, but that's not possible with just a reference. What you'll need to do is change enumclass.EnumNames() to enumclass.EnumInstances(). In addition, you'll need to modify EnumInstances() so that it can return either CIM_CimtestClass objects or a CIMInstance objects. I did something similar with GetInstance() in this patch: "Update inst_to_mof() to convert CIM_CimtestClass instances to inst" -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Oct 16 16:28:00 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 16 Oct 2008 09:28:00 -0700 Subject: [Libvirt-cim] [PATCH] Signed-off-by: Richard Maciel In-Reply-To: (Richard Maciel's message of "Wed, 15 Oct 2008 15:26:47 -0700") References: Message-ID: <87skqwijxr.fsf@caffeine.danplanet.com> RM> # HG changeset patch RM> # User Richard Maciel RM> # Date 1224109379 25200 RM> # Node ID e71c0941849da4338ed56d784a6c3966b73ffaf7 RM> # Parent 5f835a32ab3aa0dc26718371c3f4a0a0abe879ae RM> Signed-off-by: Richard Maciel Your DCO is typically the last line of the commit log, otherwise it shows up as the short description (and subject line) of the patch. RM> * Added association Console Redirections Service <-> Console Redirection Service RM> Capabilities into the ElementCapabilities.c file RM> * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function RM> * get_console_rs_caps is not static anymore If you could wrap your commit log at 80 characters, it would help readability. RM> - -lVirt_DevicePool RM> + -lVirt_DevicePool \ RM> + -lVirt_ConsoleRedirectionService \ RM> + -lVirt_ConsoleRedirectionServiceCapabilities Looks like you've got some mixed whitespace here. RM> -static CMPIStatus get_console_rs_caps(const CMPIBroker *broker, RM> +/* Removed the static keyword from the function declaration to RM> + * make it available for other modules */ RM> +CMPIStatus get_console_rs_caps(const CMPIBroker *broker, RM> const CMPIObjectPath *ref, RM> CMPIInstance **_inst, RM> bool is_get_inst) The comment is not necessary. Also, please realign the parameter list after removing the static. RM> - } else RM> + } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) { RM> + s = get_console_rs_caps(_BROKER, ref, &_inst, true); RM> + RM> + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) You're using tabs instead of spaces on these (and all) new lines. The coding standard for libvirt-cim is 8 spaces. You also need a space between your 'if' and '('. See doc/CodingStyle for this and other things. RM> - RM> + CU_DEBUG("After class_base_name\n: %s", classname); This debug statement is probably not generally useful. RM> + } else if(STREQC(classname, "ConsoleRedirectionService")) { RM> + CU_DEBUG("before console_rs\n"); This one can be removed as well. RM> + s = get_console_rs(ref, &_inst, _BROKER, context, true); RM> + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) RM> + goto out; RM> + RM> + CU_DEBUG("before console_rs_caps\n"); This one too. RM> + s = get_console_rs_caps(_BROKER, ref, &_inst, false); RM> + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) RM> + goto out; RM> + CU_DEBUG("after console_rs_Caps\n"); ...and this one. RM> + CU_DEBUG("service_to_cap\n"); ...and this one :) Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 16:37:53 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 09:37:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update VirtualSystemManagementService/11_define_memrasdunits.py to call new EnumNames In-Reply-To: <2a361d2a042e88322ddf.1224141239@elm3b217.beaverton.ibm.com> References: <2a361d2a042e88322ddf.1224141239@elm3b217.beaverton.ibm.com> Message-ID: <48F76DE1.9070802@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224141233 25200 > # Node ID 2a361d2a042e88322ddfba286106de2c6e5c5aaa > # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 > [TEST] Update VirtualSystemManagementService/11_define_memrasdunits.py to call new EnumNames > > This tc fails for me, I don't know why it is > > Signed-off-by: Guolian Yun > > diff -r 96d45b1dcc08 -r 2a361d2a042e suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Wed Oct 15 06:07:28 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Oct 16 00:13:53 2008 -0700 > @@ -69,7 +69,8 @@ def try_define(options, vssd, units, val > > def check_value(options): > mrasd_cn = get_typed_class(options.virt, rasd.masd_cn) > - rasds = enumclass.enumerate_inst(options.ip, mrasd_cn, options.virt) > + > + rasds = enumclass.EnumNames(options.ip, mrasd_cn) > > the_rasd = None > mem_kb = mem_bytes >> 10 > Switch enumclass.EnumNames() to enumclass.EnumInstances(). -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 16:45:33 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 09:45:33 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update RASD.02 and 04 to call new EnumNames In-Reply-To: <2826e6986d8ac5ec6016.1224142108@elm3b217.beaverton.ibm.com> References: <2826e6986d8ac5ec6016.1224142108@elm3b217.beaverton.ibm.com> Message-ID: <48F76FAD.30307@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224142098 25200 > # Node ID 2826e6986d8ac5ec6016fa43890260794841f185 > # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 > [TEST] Update RASD.02 and 04 to call new EnumNames > > Signed-off-by: Guolian Yun > > diff -r 96d45b1dcc08 -r 2826e6986d8a suites/libvirt-cim/cimtest/RASD/02_enum.py > --- a/suites/libvirt-cim/cimtest/RASD/02_enum.py Wed Oct 15 06:07:28 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/RASD/02_enum.py Thu Oct 16 00:28:18 2008 -0700 > @@ -68,7 +68,7 @@ def get_rasd_values(classname, virt, ser > status = PASS > rasd_list = [] > try: > - rasd_list = enumclass.enumerate_inst(server, classname, virt) > + rasd_list = enumclass.EnumNames(server, classname) > if len(rasd_list) < 1: > logger.error("%s returned %i instances, excepted at least 1.", > classname, len(rasd_list)) > diff -r 96d45b1dcc08 -r 2826e6986d8a suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py > --- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Oct 15 06:07:28 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Thu Oct 16 00:28:18 2008 -0700 > @@ -90,7 +90,7 @@ def test_rasd(options, temp, test_size): > params=params, > virt=options.virt) > > - rasds = enumclass.enumerate_inst(options.ip, drasd_class, options.virt) > + rasds = enumclass.EnumNames(options.ip, drasd_class) > > status = FAIL > for rasd in rasds: > Both of these need to use EnumInstances() instead of EnumNames(). -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 16:54:04 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 09:54:04 -0700 Subject: [Libvirt-cim] [PATCH] Signed-off-by: Richard Maciel In-Reply-To: References: Message-ID: <48F771AC.7090609@linux.vnet.ibm.com> > s = get_migration_caps(ref, &_inst, _BROKER, false); > - } else > + } else if(STREQC(classname, "ConsoleRedirectionService")) { > + CU_DEBUG("before console_rs\n"); > + s = get_console_rs(ref, &_inst, _BROKER, context, true); > + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) > + goto out; > + > + CU_DEBUG("before console_rs_caps\n"); > + s = get_console_rs_caps(_BROKER, ref, &_inst, false); > + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) > + goto out; These two lines above aren't needed. The status will be returned to service_to_cap(), and the status will be verified there. Plus, this makes the format match the other service_to_cap() calls. Also, this patch doesn't include the new Virt_ConsoleRedirectionServiceCapabilities.h. That will need to be added to the patch. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 17:03:12 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 10:03:12 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 04_reverse_errs.py tc of HostedDependency to work with/without sblim-base-provider In-Reply-To: <4ad371d62e4073f07958.1224144813@localhost.localdomain> References: <4ad371d62e4073f07958.1224144813@localhost.localdomain> Message-ID: <48F773D0.5050907@linux.vnet.ibm.com> > + > + acn = get_typed_class(virt, 'HostedDependency') > + status, host_name, classname = get_host_info(server, virt) > + if status: > + logger.error("Unable to get host info") > return status You'll need to destroy and undefine the domain before the return. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 17:14:45 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 10:14:45 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing and updating 01_forward.py of HostedService to work with/without sblim-base-provider In-Reply-To: <385c3d0a59afd7283a3e.1224152094@localhost.localdomain> References: <385c3d0a59afd7283a3e.1224152094@localhost.localdomain> Message-ID: <48F77685.6040902@linux.vnet.ibm.com> > - > - if len(ccn_list) != len(valid_services): > - logger.error("'%s' returned %d, expected %d", > - an, len(valid_services), len(ccn_list)) > + > + ccn_list = Set(ccn_list) > + > + if (len(val_serv) - len(ccn_list)) != 0: > + if host_ccn == 'Linux_ComputerSystem': > + return XFAIL_RC(bug_sblim) I'm not sure I understand the usage of Sets here.. if len(ccn_list) != len(valid_services): Seems like the above would accomplish the same thing. The usage of Sets isn't wrong.. but I'm not sure I see the need to use them in this case. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 17:50:24 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 10:50:24 -0700 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 14 2008 In-Reply-To: References: Message-ID: <48F77EE0.9010500@linux.vnet.ibm.com> > > > > SettingsDefineCapabilities - 03_forward_errs.py is not a valid > > tc of XFAIL, we have > > to fix it. > > The XFAIL of SettingsDefineCapabilities - 03_forward_errs.py is > because of provider. > There is none report with an invalid CreationClassName of AC on > sfcb when I do wbemcli query as follows: > > wbemcli ain -ac KVM_SettingsDefineCapabilities > http://root:elm3b217 at localhost/root/virt:KVM_invalid.InstanceID="MemoryPool/0" > > > And I can get expect output on Pegauses: > > wbemcli ain -ac Xen_SettingsDefineCapabilities > http://root:elm3b217 at localhost/root/virt:INVALID_CCN_KeyName.InstanceID="MemoryPool/0" > > * > * wbemcli: Cim: (4) CIM_ERR_INVALID_PARAMETER: > INVALID_CCN_KeyName.InstanceID="MemoryPool/0" > * > > I will add a known provider issue in wiki. > Kaitlin - Would you please to fix this? > Thanks! This is a CIMOM issue, not a provider issue. The reference you are passing to the CIMOM is not valid. The CIMOM looks at the classname of the reference to determine which provider will handle the request. Both KVM_invalid and INVALID_CCN_KeyName aren't valid classnames, so the CIMOM doesn't know which provider to call. In this case, Pegasus returns an error. sfcb, however, does not. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 17:53:02 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 10:53:02 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add bug number to SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: <46678f7f5697f804c8ca.1224151285@elm3b197.beaverton.ibm.com> References: <46678f7f5697f804c8ca.1224151285@elm3b197.beaverton.ibm.com> Message-ID: <48F77F7E.5010803@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224151280 25200 > # Node ID 46678f7f5697f804c8caa2f2c98f48bc7702ba71 > # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 > [TEST] Add bug number to SettingsDefineCapabilities/03_forward_errs.py > > Signed-off-by: Guolian Yun > > diff -r 96d45b1dcc08 -r 46678f7f5697 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed Oct 15 06:07:28 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Thu Oct 16 03:01:20 2008 -0700 > @@ -36,6 +36,7 @@ > from XenKvmLib.classes import get_typed_class > > platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] > +bug = '00009' This bug number isn't needed. > > expr_values = { > "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, > @@ -100,7 +101,7 @@ > keys = { 'InstanceID' : 'MemoryPool/0' } > return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ > expr_values=expr_values['invalid_ccname_keyname'], > - bug_no="") > + bug_no=bug) I would remove this particular case from the test case since it is only testing the CIMOM - it's not touching the provider at all. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 16 18:03:00 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 11:03:00 -0700 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48F6F0BB.1030107@np.css.fujitsu.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> Message-ID: <48F781D4.8030807@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > I think I've registerd Libvirt-CIM and Libcmputil as CIM Provider. > > I re-installed Libvirt-CIM package. > And I made sure that with Pegasus's command "cimprovider -s -l". You can check to make sure the providers are properly installed by running the following command. Replace user:pass with the username and password of the user that has CIM query rights. The convention is to use the root user or the pegasus user, but you can use any user since you've modified /etc/Pegasus/access.conf to allow all users. wbemcli ein http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem This should return something like the following: localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="demo2" When you run cimtest, you'll need to run the command as root and pass in the root username / password (this will need to be fixed in the future). CIM_NS=root/virt CIM_USER=root CIM_PASS=pass ./runtests libvirt-cim -i localhost -d -v KVM > > But following error messages didn't disappear. > ============================================================== > -------------------------------------------------------------------- > AllocationCapabilities - 01_enum.py: FAIL > ERROR - Failed to enumerate the class of KVM_AllocationCapabilities > ERROR - Unauthorized > ERROR - Only 0 pools returned, expected at least 4 > -------------------------------------------------------------------- > AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL > ERROR - AuthError : Unauthorized > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 116, in do_try > File "02_alloccap_gi_errs.py", line 109, in main > expr_values=exp['invalid_keyvalue'], bug_no="") > File "./lib/XenKvmLib/common_util.py", line 264, in try_getinstance > File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", line > 464, in GetInstance > **params) > File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", line > 181, in imethodcall > verify_callback = self.verify_callback) > File "/usr/lib/python2.5/site-packages/pywbem/cim_http.py", line 226, > in wbem_request > raise AuthError(response.reason) > AuthError: Unauthorized > ERROR - None > -------------------------------------------------------------------- > ============================================================== > Would you have any more suggestion of this messages? This error is because pywbem is unable to authenticate with Pegasus. Be sure the following query works (change pass to the proper password): wbemcli ein http://root:pass at localhost:5988/root/virt:KVM_ComputerSystem Hope this helps! =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Oct 16 18:31:27 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 17 Oct 2008 00:01:27 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing and updating 01_forward.py of HostedService to work with/without sblim-base-provider In-Reply-To: <48F77685.6040902@linux.vnet.ibm.com> References: <385c3d0a59afd7283a3e.1224152094@localhost.localdomain> <48F77685.6040902@linux.vnet.ibm.com> Message-ID: <48F7887F.1070309@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> - - if len(ccn_list) != len(valid_services): >> - logger.error("'%s' returned %d, expected %d", >> - an, len(valid_services), len(ccn_list)) >> + >> + ccn_list = Set(ccn_list) + + if (len(val_serv) - >> len(ccn_list)) != 0: >> + if host_ccn == 'Linux_ComputerSystem': >> + return XFAIL_RC(bug_sblim) > > I'm not sure I understand the usage of Sets here.. > > if len(ccn_list) != len(valid_services): > > Seems like the above would accomplish the same thing. The usage of > Sets isn't wrong.. but I'm not sure I see the need to use them in this > case. Oops! sorry this should have been if len((val_serv) - (ccn_list)) !=0. I am trying to achieve 2 things 1) Compare the len 2) Verify if the values are all similar. We can use if len(ccn_list) != len(valid_services), but this will only verify the length but will not compare the elements of the list. I hope its ok to use if len((val_serv) - (ccn_list)) !=0, if you have any better solutions, let me know. Thanks and Regards, Deepti. From kaitlin at linux.vnet.ibm.com Thu Oct 16 20:13:51 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 16 Oct 2008 13:13:51 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing and updating 01_forward.py of HostedService to work with/without sblim-base-provider In-Reply-To: <48F7887F.1070309@linux.vnet.ibm.com> References: <385c3d0a59afd7283a3e.1224152094@localhost.localdomain> <48F77685.6040902@linux.vnet.ibm.com> <48F7887F.1070309@linux.vnet.ibm.com> Message-ID: <48F7A07F.80202@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Kaitlin Rupert wrote: >>> - - if len(ccn_list) != len(valid_services): >>> - logger.error("'%s' returned %d, expected %d", >>> - an, len(valid_services), len(ccn_list)) >>> + >>> + ccn_list = Set(ccn_list) + + if (len(val_serv) - >>> len(ccn_list)) != 0: >>> + if host_ccn == 'Linux_ComputerSystem': >>> + return XFAIL_RC(bug_sblim) >> >> I'm not sure I understand the usage of Sets here.. >> >> if len(ccn_list) != len(valid_services): >> >> Seems like the above would accomplish the same thing. The usage of >> Sets isn't wrong.. but I'm not sure I see the need to use them in this >> case. > Oops! sorry this should have been if len((val_serv) - (ccn_list)) !=0. > I am trying to achieve 2 things > 1) Compare the len > 2) Verify if the values are all similar. Ah, good point here. I always forget that Sets will check the elements as well as the length. Definitely a good point here. I had no other comments, so I'll apply this. Thanks! > > We can use if len(ccn_list) != len(valid_services), but this will only > verify the length but will not compare the elements of the list. > I hope its ok to use if len((val_serv) - (ccn_list)) !=0, if you have > any better solutions, let me know. > -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From richardm at br.ibm.com Thu Oct 16 22:50:25 2008 From: richardm at br.ibm.com (Richard Maciel) Date: Thu, 16 Oct 2008 15:50:25 -0700 Subject: [Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection Service Message-ID: <7fbd020ca47795c3528a.1224197425@elm3b24.beaverton.ibm.com> # HG changeset patch # User Richard Maciel # Date 1224196932 25200 # Node ID 7fbd020ca47795c3528a698b3ddccc718cae9f2c # Parent ef98854352d7c0e7abbe2d77ba9d885ef61629e6 * Added association Console Redirections Service <-> Console Redirection Service Capabilities into the ElementCapabilities.c file * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function * get_console_rs_caps is not static anymore Signed-off-by: Richard Maciel diff -r ef98854352d7 -r 7fbd020ca477 src/Makefile.am --- a/src/Makefile.am Thu Oct 16 13:28:42 2008 -0700 +++ b/src/Makefile.am Thu Oct 16 15:42:12 2008 -0700 @@ -132,7 +132,7 @@ -lVirt_VSMigrationService \ -lVirt_DevicePool \ -lVirt_ConsoleRedirectionService \ - -lVirt_ConsoleRedirectionServiceCapabilities + -lVirt_ConsoleRedirectionServiceCapabilities libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c diff -r ef98854352d7 -r 7fbd020ca477 src/Virt_ConsoleRedirectionServiceCapabilities.c --- a/src/Virt_ConsoleRedirectionServiceCapabilities.c Thu Oct 16 13:28:42 2008 -0700 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.c Thu Oct 16 15:42:12 2008 -0700 @@ -70,12 +70,10 @@ return s; } -/* Removed the static keyword from the function declaration to - * make it available for other modules */ CMPIStatus get_console_rs_caps(const CMPIBroker *broker, - const CMPIObjectPath *ref, - CMPIInstance **_inst, - bool is_get_inst) + const CMPIObjectPath *ref, + CMPIInstance **_inst, + bool is_get_inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; diff -r ef98854352d7 -r 7fbd020ca477 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Thu Oct 16 13:28:42 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Thu Oct 16 15:42:12 2008 -0700 @@ -78,14 +78,13 @@ s = get_migration_service(ref, &_inst, _BROKER, context, false); } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) { - s = get_console_rs_caps(_BROKER, ref, &_inst, true); + s = get_console_rs_caps(_BROKER, ref, &_inst, true); - if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) goto out; - - s = get_console_rs(ref, &_inst, _BROKER, context, false); - } else + s = get_console_rs(ref, &_inst, _BROKER, context, false); + } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, "Not found"); @@ -110,7 +109,6 @@ char* classname; classname = class_base_name(CLASSNAME(ref)); - CU_DEBUG("After class_base_name\n: %s", classname); if (STREQC(classname, "VirtualSystemManagementService")) { s = get_vsms(ref, &_inst, _BROKER, context, true); if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) @@ -123,18 +121,15 @@ goto out; s = get_migration_caps(ref, &_inst, _BROKER, false); - } else if(STREQC(classname, "ConsoleRedirectionService")) { - CU_DEBUG("before console_rs\n"); - s = get_console_rs(ref, &_inst, _BROKER, context, true); - if((s.rc != CMPI_RC_OK) || (_inst == NULL)) - goto out; + } else if (STREQC(classname, "ConsoleRedirectionService")) { + s = get_console_rs(ref, &_inst, _BROKER, context, true); + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; - CU_DEBUG("before console_rs_caps\n"); - s = get_console_rs_caps(_BROKER, ref, &_inst, false); - if((s.rc != CMPI_RC_OK) || (_inst == NULL)) - goto out; - CU_DEBUG("after console_rs_Caps\n"); - } else + s = get_console_rs_caps(_BROKER, ref, &_inst, false); + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, ""); @@ -211,8 +206,6 @@ { CMPIInstance *inst = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; - - CU_DEBUG("service_to_cap\n"); if (!match_hypervisor_prefix(ref, info)) goto out; From yunguol at cn.ibm.com Fri Oct 17 02:05:54 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 17 Oct 2008 10:05:54 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 14 2008 In-Reply-To: <48F77EE0.9010500@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-17 01:50:24: > > > > > > SettingsDefineCapabilities - 03_forward_errs.py is not a valid > > > tc of XFAIL, we have > > > to fix it. > > > > The XFAIL of SettingsDefineCapabilities - 03_forward_errs.py is > > because of provider. > > There is none report with an invalid CreationClassName of AC on > > sfcb when I do wbemcli query as follows: > > > > wbemcli ain -ac KVM_SettingsDefineCapabilities > > http://root:elm3b217 at localhost/root/virt:KVM_invalid.InstanceID= > "MemoryPool/0" > > > > > > And I can get expect output on Pegauses: > > > > wbemcli ain -ac Xen_SettingsDefineCapabilities > > http://root:elm3b217 at localhost/root/virt:INVALID_CCN_KeyName.InstanceID= > "MemoryPool/0" > > > > * > > * wbemcli: Cim: (4) CIM_ERR_INVALID_PARAMETER: > > INVALID_CCN_KeyName.InstanceID="MemoryPool/0" > > * > > > > I will add a known provider issue in wiki. > > Kaitlin - Would you please to fix this? > > Thanks! > > This is a CIMOM issue, not a provider issue. The reference you are > passing to the CIMOM is not valid. > > The CIMOM looks at the classname of the reference to determine which > provider will handle the request. Both KVM_invalid and > INVALID_CCN_KeyName aren't valid classnames, so the CIMOM doesn't know > which provider to call. > Since this case is only testing the CIMOM and it doesn't touch the provider, I will remove this particular case from the tc. Thanks! > In this case, Pegasus returns an error. sfcb, however, does not. > > -- > 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 Fri Oct 17 02:43:29 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 19:43:29 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Remove a particulare case that it doesn't touch provider in SDC Message-ID: <0d0e0b3b7cc463ff5241.1224211409@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224211402 25200 # Node ID 0d0e0b3b7cc463ff52419e577911640ecc467518 # Parent 69fe94b1348985a337d385865d7522c78f57e116 [TEST] Remove a particulare case that it doesn't touch provider in SDC Signed-off-by: Guolian Yun diff -r 69fe94b13489 -r 0d0e0b3b7cc4 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Thu Oct 16 03:14:27 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Thu Oct 16 19:43:22 2008 -0700 @@ -43,8 +43,6 @@ expr_values = { "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine\ resource type' }, - "invalid_ccname_keyname" : { 'rc' : pywbem.CIM_ERR_INVALID_PARAMETER, - 'desc' : 'CIM_ERR_INVALID_PARAMETER' } } def err_invalid_instid_keyname(virt, conn, field): @@ -85,22 +83,6 @@ def err_invalid_instid_keyvalue(virt, co expr_values=expr_values['invalid_instid_keyvalue'], bug_no="") -def err_invalid_ccname_keyname(virt, conn, field): -# Input: -# ------ -# wbemcli ai -ac Xen_SettingsDefineCapabilities \ -# 'http://localhost:5988/root/virt:Wrong.InstanceID="ProcessorPool/0"' -nl -# -# Output: -# ------- -# error code : CIM_ERR_INVALID_PARAMETER -# error desc : One or more parameter values passed to the method were invalid - assoc_classname = get_typed_class(virt, "SettingsDefineCapabilities") - classname = field - keys = { 'InstanceID' : 'MemoryPool/0' } - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ - expr_values=expr_values['invalid_ccname_keyname'], - bug_no="") @do_main(platform_sup) def main(): @@ -118,10 +100,6 @@ def main(): if ret_value != PASS: logger.error("------ FAILED: Invalid InstanceID Key Value.------") return ret_value - ret_value = err_invalid_ccname_keyname(virt, conn, field='WrongClassName') - if ret_value != PASS: - logger.error("------ FAILED: Invalid CCName Key Name.------") - return ret_value return PASS if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Fri Oct 17 04:56:44 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 17 Oct 2008 10:26:44 +0530 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48F781D4.8030807@linux.vnet.ibm.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> Message-ID: <48F81B0C.1040602@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Toshifumi Fujimura wrote: >> I think I've registerd Libvirt-CIM and Libcmputil as CIM Provider. >> >> I re-installed Libvirt-CIM package. >> And I made sure that with Pegasus's command "cimprovider -s -l". > > You can check to make sure the providers are properly installed by > running the following command. Replace user:pass with the username > and password of the user that has CIM query rights. > > The convention is to use the root user or the pegasus user, but you > can use any user since you've modified /etc/Pegasus/access.conf to > allow all users. > > wbemcli ein http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem > > This should return something like the following: > > localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="demo2" > > > When you run cimtest, you'll need to run the command as root and pass > in the root username / password (this will need to be fixed in the > future). > > CIM_NS=root/virt CIM_USER=root CIM_PASS=pass ./runtests libvirt-cim -i > localhost -d -v KVM > >> >> But following error messages didn't disappear. >> ============================================================== >> -------------------------------------------------------------------- >> AllocationCapabilities - 01_enum.py: FAIL >> ERROR - Failed to enumerate the class of KVM_AllocationCapabilities >> ERROR - Unauthorized >> ERROR - Only 0 pools returned, expected at least 4 >> -------------------------------------------------------------------- >> AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL >> ERROR - AuthError : Unauthorized >> Traceback (most recent call last): >> File "./lib/XenKvmLib/const.py", line 116, in do_try >> File "02_alloccap_gi_errs.py", line 109, in main >> expr_values=exp['invalid_keyvalue'], bug_no="") >> File "./lib/XenKvmLib/common_util.py", line 264, in try_getinstance >> File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >> line 464, in GetInstance >> **params) >> File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >> line 181, in imethodcall >> verify_callback = self.verify_callback) >> File "/usr/lib/python2.5/site-packages/pywbem/cim_http.py", line >> 226, in wbem_request >> raise AuthError(response.reason) >> AuthError: Unauthorized >> ERROR - None >> -------------------------------------------------------------------- >> ============================================================== >> Would you have any more suggestion of this messages? > > This error is because pywbem is unable to authenticate with Pegasus. > Be sure the following query works (change pass to the proper password): > > wbemcli ein http://root:pass at localhost:5988/root/virt:KVM_ComputerSystem > > Hope this helps! =) > You can also verify if the required providers are installed by using the following query: wbemcli ecn http://root:pass at localhost:5988/root/virt The above query will report all the providers registered with the /root/virt namespace. you can use the same query replacing the above /root/virt with other namespace like /root/interop to know the providers registered in that particular namespace. Regards, Deepti. From yunguol at cn.ibm.com Fri Oct 17 06:25:00 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 23:25:00 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] update EnumInstances so it returns both CIMInstance and CIM_CimtestClass objects Message-ID: <3baaf90a47eb13151a67.1224224700@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224224694 25200 # Node ID 3baaf90a47eb13151a67df01718f98b4771df77b # Parent 69fe94b1348985a337d385865d7522c78f57e116 [TEST] update EnumInstances so it returns both CIMInstance and CIM_CimtestClass objects Signed-off-by: Guolian Yun diff -r 69fe94b13489 -r 3baaf90a47eb suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Oct 16 03:14:27 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Oct 16 23:24:54 2008 -0700 @@ -477,7 +477,7 @@ def EnumNames(host, cn): return names -def EnumInstances(host, cn): +def EnumInstances(host, cn, ret_cim_inst=False): '''Resolve the enumeration given the @cn. Return a list of CIMInstance objects.''' @@ -491,7 +491,10 @@ def EnumInstances(host, cn): list = [] for name in refs: - list.append(CIM_CimtestClass(host, name)) + inst = CIM_CimtestClass(host, name) + if ret_cim_inst: + inst = inst.inst + list.append(inst) return list From yunguol at cn.ibm.com Fri Oct 17 06:28:02 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 23:28:02 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VirtualSystemMigrationSettingData/01_enum.py to call new EnumInstances Message-ID: <6e3cf406d47a68b3cb1c.1224224882@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224224874 25200 # Node ID 6e3cf406d47a68b3cb1c95f2747842fa9f1b452e # Parent 69fe94b1348985a337d385865d7522c78f57e116 [TEST] #2 Update VirtualSystemMigrationSettingData/01_enum.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r 69fe94b13489 -r 6e3cf406d47a suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Thu Oct 16 03:14:27 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Thu Oct 16 23:27:54 2008 -0700 @@ -45,9 +45,7 @@ def main(): priority = 0 try: - vsmsd = enumclass.enumerate_inst(options.ip, - "VirtualSystemMigrationSettingData", - options.virt) + vsmsd = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True) except Exception, detail: logger.error(CIM_ERROR_ENUMERATE, cn) logger.error("Exception: %s", detail) From yunguol at cn.ibm.com Fri Oct 17 06:31:09 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 23:31:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VirtualSystemManagementService/11_define_memrasdunits.py to call new EnumInstances Message-ID: <830cc917812e3dc38483.1224225069@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224225063 25200 # Node ID 830cc917812e3dc38483d79713ec6fc14a95d9ee # Parent 69fe94b1348985a337d385865d7522c78f57e116 [TEST] #2 Update VirtualSystemManagementService/11_define_memrasdunits.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r 69fe94b13489 -r 830cc917812e suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Oct 16 03:14:27 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Oct 16 23:31:03 2008 -0700 @@ -69,7 +69,7 @@ def try_define(options, vssd, units, val def check_value(options): mrasd_cn = get_typed_class(options.virt, rasd.masd_cn) - rasds = enumclass.enumerate_inst(options.ip, mrasd_cn, options.virt) + rasds = enumclass.EnumInstances(options.ip, mrasd_cn, ret_cim_inst=True) the_rasd = None mem_kb = mem_bytes >> 10 From yunguol at cn.ibm.com Fri Oct 17 06:33:27 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 23:33:27 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update Profile/02_profile_to_elec.py to call new EnumInstance Message-ID: <52f1f293e454d4836d0a.1224225207@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224225202 25200 # Node ID 52f1f293e454d4836d0a44ad4026b0b106c8c7af # Parent 69fe94b1348985a337d385865d7522c78f57e116 [TEST] #2 Update Profile/02_profile_to_elec.py to call new EnumInstance Signed-off-by: Guolian Yun diff -r 69fe94b13489 -r 52f1f293e454 suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py --- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Oct 16 03:14:27 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py Thu Oct 16 23:33:22 2008 -0700 @@ -95,7 +95,7 @@ def get_profile(server, virt): profile = None try: - proflist = enumclass.enumerate_inst(server, 'RegisteredProfile', virt) + proflist = enumclass.EnumInstances(server, cn, ret_cim_inst=True) status, profile = get_expected_inst(cn, proflist, 'RegisteredName', registeredname) except Exception, detail: From yunguol at cn.ibm.com Fri Oct 17 06:36:04 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 23:36:04 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Modify RASD/02_enum.py to call new EnumInstances Message-ID: <4d284efac99979c0f53a.1224225364@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224225358 25200 # Node ID 4d284efac99979c0f53a642b676a793535aa9767 # Parent 69fe94b1348985a337d385865d7522c78f57e116 [TEST]#2 Modify RASD/02_enum.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r 69fe94b13489 -r 4d284efac999 suites/libvirt-cim/cimtest/RASD/02_enum.py --- a/suites/libvirt-cim/cimtest/RASD/02_enum.py Thu Oct 16 03:14:27 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/02_enum.py Thu Oct 16 23:35:58 2008 -0700 @@ -68,7 +68,7 @@ def get_rasd_values(classname, virt, ser status = PASS rasd_list = [] try: - rasd_list = enumclass.enumerate_inst(server, classname, virt) + rasd_list = enumclass.EnumInstances(server, classname, ret_cim_inst=True) if len(rasd_list) < 1: logger.error("%s returned %i instances, excepted at least 1.", classname, len(rasd_list)) From yunguol at cn.ibm.com Fri Oct 17 06:48:51 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 23:48:51 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Modify RASD/04_disk_rasd_size.py to call new EnumInstances Message-ID: <9b1a157b8e9dcef3ab00.1224226131@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224226125 25200 # Node ID 9b1a157b8e9dcef3ab009af30088b6f8ac846737 # Parent 69fe94b1348985a337d385865d7522c78f57e116 [TEST] #2 Modify RASD/04_disk_rasd_size.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r 69fe94b13489 -r 9b1a157b8e9d suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py --- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Thu Oct 16 03:14:27 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Thu Oct 16 23:48:45 2008 -0700 @@ -33,6 +33,7 @@ from XenKvmLib.common_util import create from XenKvmLib.common_util import create_using_definesystem from XenKvmLib import vsms from XenKvmLib import enumclass +from XenKvmLib.classes import get_typed_class def make_image(ip, size): s, fn = utils.run_remote(ip, "mktemp") @@ -89,8 +90,9 @@ def test_rasd(options, temp, test_size): options.ip, params=params, virt=options.virt) - - rasds = enumclass.enumerate_inst(options.ip, drasd_class, options.virt) + + cn = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') + rasds = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True) status = FAIL for rasd in rasds: From yunguol at cn.ibm.com Fri Oct 17 06:54:48 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 16 Oct 2008 23:54:48 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Modify ResourcePoolConfigurationCapabilities/01_enum.py to call new EnumInstances Message-ID: # HG changeset patch # User Guolian Yun # Date 1224226482 25200 # Node ID eb60cd543c12ba92606eac1777d14296062e36d9 # Parent 69fe94b1348985a337d385865d7522c78f57e116 [TEST] #2 Modify ResourcePoolConfigurationCapabilities/01_enum.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r 69fe94b13489 -r eb60cd543c12 suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Thu Oct 16 03:14:27 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationCapabilities/01_enum.py Thu Oct 16 23:54:42 2008 -0700 @@ -23,6 +23,7 @@ import sys from XenKvmLib import enumclass +from XenKvmLib.classes import get_typed_class from CimTest import Globals from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL @@ -33,14 +34,11 @@ def main(): def main(): options = main.options - key_list = ["InstanceID"] + cn = get_typed_class(options.virt, "ResourcePoolConfigurationCapabilities") try: - rpcc = enumclass.enumerate(options.ip, - "ResourcePoolConfigurationCapabilities", - key_list, - options.virt) + rpcc = enumclass.EnumInstances(options.ip, cn) except Exception: - Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, '%s_ResourcePoolConfigurationCapabilities' % options.virt) + Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, cn) return FAIL if len(rpcc) != 1: From yunguol at cn.ibm.com Fri Oct 17 06:41:07 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 17 Oct 2008 14:41:07 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modify RPCC.01 and VSMSD.01 to call new EnumInstances In-Reply-To: <48F76644.80608@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-17 00:05:24: > > diff -r 96d45b1dcc08 -r 1ea2c899795c suites/libvirt- > cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py > > --- a/suites/libvirt- > cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Wed Oct > 15 06:07:28 2008 -0700 > > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemMigrationSettingData/01_enum.py Wed Oct > 15 19:23:11 2008 -0700 > > @@ -45,9 +45,7 @@ def main(): > > priority = 0 > > > > try: > > - vsmsd = enumclass.enumerate_inst(options.ip, > > - > "VirtualSystemMigrationSettingData", > > - options.virt) > > + vsmsd = enumclass.EnumNames(options.ip, cn) > > except Exception, detail: > > logger.error(CIM_ERROR_ENUMERATE, cn) > > logger.error("Exception: %s", detail) > > This test fails with: > > VirtualSystemMigrationSettingData - 01_enum.py: FAIL > ERROR - KeyError : 'migrationtype' > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 116, in do_try > File "01_enum.py", line 65, in main > if verify_vsmsd['MigrationType'] != MType: > File "/usr/lib/python2.5/site-packages/pywbem/cim_obj.py", line 533, > in __getitem__ > def __getitem__(self, key): return self.keybindings[key] > File "/usr/lib/python2.5/site-packages/pywbem/cim_obj.py", line 76, > in __getitem__ > return self.data[k][1] > KeyError: 'migrationtype' > ERROR - None > > > You'll want to change enumclass.EnumNames() to > enumclass.EnumInstances(). The test case is verifying all the > attributes of the instance. However, enumclass.EnumNames() only returns > a reference, not and instance. > Fixed. 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 Fri Oct 17 06:40:38 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 17 Oct 2008 14:40:38 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update Profile/02_profile_to_elec.py to call new EnumNames In-Reply-To: <48F76BB1.10702@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-17 00:28:33: > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1224140552 25200 > > # Node ID 0167493d2ce4cad2c09d572964844f199555fcb4 > > # Parent 96d45b1dcc0801ade819413abe1af43b3957dde4 > > [TEST] Update Profile/02_profile_to_elec.py to call new EnumNames > > > > This tc updates fails for me, I look into this but I can't work it out. > > > > > > Signed-off-by: Guolian Yun > > > > diff -r 96d45b1dcc08 -r 0167493d2ce4 suites/libvirt- > cim/cimtest/Profile/02_profile_to_elec.py > > --- a/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py > Wed Oct 15 06:07:28 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/Profile/02_profile_to_elec.py > Thu Oct 16 00:02:32 2008 -0700 > > @@ -95,7 +95,7 @@ def get_profile(server, virt): > > profile = None > > > > try: > > - proflist = enumclass.enumerate_inst(server, > 'RegisteredProfile', virt) > > + proflist = enumclass.EnumNames(server, cn) > > status, profile = get_expected_inst(cn, proflist, 'RegisteredName', > > registeredname) > > except Exception, detail: > > This is because EnumNames() only returns a reference, not and instance. > The test case is attempting to verify the attributes of the instance, > but that's not possible with just a reference. > > What you'll need to do is change enumclass.EnumNames() to > enumclass.EnumInstances(). In addition, you'll need to modify > EnumInstances() so that it can return either CIM_CimtestClass objects or > a CIMInstance objects. > I updated EnumInstances so it returns both CIMInstance and CIM_CimtestClass objects. And #2 patch for tc on the way. Thanks! > I did something similar with GetInstance() in this patch: > "Update inst_to_mof() to convert CIM_CimtestClass instances to inst" > > -- > 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 Fri Oct 17 07:41:18 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 17 Oct 2008 00:41:18 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Updating 04_reverse_errs.py tc of HostedDependency to work with/without sblim-base-provider Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1224229225 25200 # Node ID a4a0adafb80f9434e06cb134d7e25bb9c11b1756 # Parent 69fe94b1348985a337d385865d7522c78f57e116 [TEST] #2 Updating 04_reverse_errs.py tc of HostedDependency to work with/without sblim-base-provider. Patch 2: -------- Included missing destroy call. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r 69fe94b13489 -r a4a0adafb80f suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Thu Oct 16 03:14:27 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Fri Oct 17 00:40:25 2008 -0700 @@ -42,110 +42,94 @@ sup_types = ['Xen', 'KVM', 'XenFV', 'LXC test_dom = "hd_domain1" test_mac = "00:11:22:33:44:55" -bug='90264' +bug_sblim='00007' exp_rc = 6 #CIM_ERR_NOT_FOUND exp_d1 = "No such instance (Name)" exp_d2 = "No such instance (CreationClassName)" expr_values = { - "invalid_name_keyname" : { 'rc' : exp_rc, 'desc' : exp_d1 }, - "invalid_name_keyvalue" : { 'rc' : exp_rc, 'desc' : exp_d1 }, - "invalid_ccname_keyname" : { 'rc' : exp_rc, 'desc' : exp_d2 }, - "invalid_ccname_keyvalue" : { 'rc' : exp_rc, 'desc' : exp_d2 } + "INVALID_KeyName" : { 'rc' : exp_rc, 'desc' : exp_d1 }, + "INVALID_NameValue" : { 'rc' : exp_rc, 'desc' : exp_d1 }, + "INVALID_CCNKeyName" : { 'rc' : exp_rc, 'desc' : exp_d2 }, + "INVALID_CCNameValue" : { 'rc' : exp_rc, 'desc' : exp_d2 } } -def err_invalid_name_keyname(server, conn, virt, assoc_classname, field): - status, host_name, classname = get_host_info(server, virt) - if status: - return status - keys = { - 'CreationClassName' : classname, \ - field : host_name - } - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ - expr_values=expr_values['invalid_name_keyname'], \ - bug_no=bug) - -def err_invalid_name_keyvalue(server, conn, virt, assoc_classname, field): - status, host_name, classname = get_host_info(server, virt) - if status: - return status - keys = { - 'CreationClassName' : classname, \ - 'Name' : field - } - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ - expr_values=expr_values['invalid_name_keyvalue'], \ - bug_no=bug) - -def err_invalid_ccname_keyname(server, conn, virt, assoc_classname, field): - status, host_name, classname = get_host_info(server, virt) - if status: - return status - keys = { - field : classname, \ - 'Name' : host_name - } - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ - expr_values=expr_values['invalid_ccname_keyname'], \ - bug_no=bug) -def err_invalid_ccname_keyvalue(server, conn, virt, assoc_classname, field): - status, host_name, classname = get_host_info(server, virt) - if status: - return status - keys = { - 'CreationClassName' : field, \ - 'Name' : host_name - } - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ - expr_values=expr_values['invalid_ccname_keyvalue'], \ - bug_no=bug) +def verify_err_fields(cxml, server, conn, keys, classname, + assoc_classname, msg, field): + try: + ret = try_assoc(conn, classname, assoc_classname, keys, + field_name=field, expr_values=expr_values[field], + bug_no="") + if ret != PASS: + if classname == 'Linux_ComputerSystem': + return XFAIL_RC(bug_sblim) + else: + logger.error("--- FAILED: %s---", msg) + cxml.destroy(server) + except Exception, details: + logger.error("Exception: %s", details) + return FAIL + return ret @do_main(sup_types) def main(): options = main.options + server = options.ip + virt = options.virt - status = PASS - server = options.ip - virtxml = vxml.get_class(options.virt) - if options.virt == "LXC": + virtxml = vxml.get_class(virt) + if virt == "LXC": cxml = virtxml(test_dom) else: cxml = virtxml(test_dom, mac = test_mac) - ret = cxml.create(options.ip) + ret = cxml.create(server) if not ret: logger.error("Failed to Create the dom: %s" % test_dom) - status = FAIL + return FAIL + + conn = assoc.myWBEMConnection('http://%s' % server, + (CIM_USER, CIM_PASS), CIM_NS) + + acn = get_typed_class(virt, 'HostedDependency') + status, host_name, classname = get_host_info(server, virt) + if status: + logger.error("Unable to get host info") + cxml.destroy(server) return status - conn = assoc.myWBEMConnection('http://%s' % options.ip, - (CIM_USER, CIM_PASS), CIM_NS) - acn = get_typed_class(options.virt, 'HostedDependency') - ret_value = err_invalid_name_keyname(server, conn, options.virt, acn, - field='INVALID_KeyName') + + msg = 'Invalid Name Key Name' + field = 'INVALID_KeyName' + keys = { 'CreationClassName' : classname, field : host_name } + ret_value = verify_err_fields(cxml, server, conn, keys, classname, + acn, msg, field) if ret_value != PASS: - logger.error("--- FAILED: Invalid Name Key Name.---") - status = ret_value - ret_value = err_invalid_name_keyvalue(server, conn, options.virt, acn, - field='INVALID_NameValue') + return ret_value + + msg = 'Invalid Name Key Value' + field='INVALID_NameValue' + keys = { 'CreationClassName' : classname, 'Name' : field } + ret_value = verify_err_fields(cxml, server, conn, keys, classname, + acn, msg, field) if ret_value != PASS: - logger.error("--- FAILED: Invalid Name Key Value.---") - status = ret_value - ret_value = err_invalid_ccname_keyname(server, conn, options.virt, acn, - field='INVALID_CCNKeyName') + return ret_value + + msg = 'Invalid CreationClassName Key Name' + field='INVALID_CCNKeyName' + keys = { field : classname, 'Name' : host_name } + ret_value = verify_err_fields(cxml, server, conn, keys, classname, + acn, msg, field) if ret_value != PASS: - logger.error("--- FAILED: Invalid CreationClassName Key Name---") - status = ret_value - ret_value = err_invalid_ccname_keyvalue(server, conn, options.virt, acn, - field='INVALID_CCNameValue') - if ret_value != PASS: - logger.error("--- FAILED: Invalid CreationClassName Key Value---") - status = ret_value - cxml.destroy(options.ip) - cxml.undefine(options.ip) - return status + return ret_value + msg = 'Invalid CreationClassName Key Value' + field='INVALID_CCNameValue' + keys = { 'CreationClassName' : field, 'Name' : host_name } + ret_value = verify_err_fields(cxml, server, conn, keys, classname, + acn, msg, field) + cxml.destroy(server) + return ret_value if __name__ == "__main__": sys.exit(main()) From deeptik at linux.vnet.ibm.com Fri Oct 17 07:50:01 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 17 Oct 2008 00:50:01 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the if condition in 01_forward.py of HostedService Message-ID: <5be3bda6fb16a5ece5aa.1224229801@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1224229448 25200 # Node ID 5be3bda6fb16a5ece5aa18c254d3d934fb2f8831 # Parent a4a0adafb80f9434e06cb134d7e25bb9c11b1756 [TEST] Fixing the if condition in 01_forward.py of HostedService. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r a4a0adafb80f -r 5be3bda6fb16 suites/libvirt-cim/cimtest/HostedService/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Oct 17 00:40:25 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Fri Oct 17 00:44:08 2008 -0700 @@ -72,7 +72,7 @@ def main(): ccn_list = Set(ccn_list) - if (len(val_serv) - len(ccn_list)) != 0: + if len((val_serv) - (ccn_list)) != 0: if host_ccn == 'Linux_ComputerSystem': return XFAIL_RC(bug_sblim) else: From deeptik at linux.vnet.ibm.com Fri Oct 17 08:51:03 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 17 Oct 2008 01:51:03 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 01_forward.py of ElementConforms to work with/without sblim-base-provider Message-ID: <6985c0d24577f59bba42.1224233463@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1224233286 25200 # Node ID 6985c0d24577f59bba4229fbed339d280ed06e63 # Parent 5be3bda6fb16a5ece5aa18c254d3d934fb2f8831 [TEST] Updating 01_forward.py of ElementConforms to work with/without sblim-base-provider. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r 5be3bda6fb16 -r 6985c0d24577 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Oct 17 00:44:08 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Oct 17 01:48:06 2008 -0700 @@ -45,16 +45,17 @@ from XenKvmLib.classes import get_typed_ from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml from CimTest import Globals -from XenKvmLib.common_util import print_field_error +from XenKvmLib.common_util import print_field_error, check_sblim from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS, CIM_ERROR_ENUMERATE from XenKvmLib.const import do_main -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.enumclass import EnumInstances from XenKvmLib.const import default_network_name, default_pool_name sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "domU" +bug_sblim = '00007' def pool_init(verify_list, pool_cn, pool_name, virt): ccn = get_typed_class(virt, pool_cn) @@ -175,9 +176,13 @@ def verify_ectp_assoc(server, virt): reg_classname, InstanceID = devid) if len(assoc_info) < 1: - status = FAIL - logger.error(" '%s' returned (%d) '%s' objects", an, - len(assoc_info), reg_classname) + ret_val, linux_cs = check_sblim(server, virt) + if ret_val != PASS: + logger.error(" '%s' returned (%d) '%s' objects", an, + len(assoc_info), reg_classname) + return FAIL + else: + return XFAIL_RC(bug_sblim) break if 'DSP1059' in devid or 'DSP1045' in devid: From deeptik at linux.vnet.ibm.com Fri Oct 17 09:33:04 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 17 Oct 2008 02:33:04 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing and updating 02_reverse.py of ElementConforms to work with/without sblim-base-provider Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1224235974 25200 # Node ID a59563b0aa73db1b5e3cb3b5f84ac3e2aff3649b # Parent 6985c0d24577f59bba4229fbed339d280ed06e63 [TEST] Fixing and updating 02_reverse.py of ElementConforms to work with/without sblim-base-provider. Tested with Xen, XenFV, KVM with current sources, with/without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r 6985c0d24577 -r a59563b0aa73 suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Oct 17 01:48:06 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/02_reverse.py Fri Oct 17 02:32:54 2008 -0700 @@ -31,7 +31,7 @@ # wbemcli ain -ac Xen_ElementConformsToProfile \ # 'http://localhost:5988/root/virt:Xen_HostSystem.\ -# CreationClassName="Xen_HostSystem",Name="elm3b24.beaverton.ibm.com"' +# CreationClassName="Xen_HostSystem",Name="lm3b24"' # # Date : 07-12-2007 @@ -41,21 +41,22 @@ from XenKvmLib.test_xml import testxml from XenKvmLib.test_xml import testxml from VirtLib import utils from CimTest import Globals -from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, CIM_ERROR_ASSOCIATORS from XenKvmLib.const import do_main from XenKvmLib import enumclass from XenKvmLib import assoc from XenKvmLib.test_doms import destroy_and_undefine_all -from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib import enumclass 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 +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.common_util import libvirt_cached_data_poll, get_cs_instance, \ + get_host_info sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] -test_dom = "domgst" +test_dom ="domgst" +bug_sblim ='00007' def build_exp_prof_list(proflist, virt="Xen"): list = {} @@ -77,91 +78,98 @@ def verify_profile(inst, exp_inst): return FAIL if inst['RegisteredVersion'] != exp_inst.RegisteredVersion: return FAIL - return PASS @do_main(sup_types) def main(): options = main.options + server = options.ip + virt = options.virt status = FAIL - destroy_and_undefine_all(options.ip) - virt_xml = get_class(options.virt) + destroy_and_undefine_all(server) + virt_xml = get_class(virt) cxml = virt_xml(test_dom) - ret = cxml.define(options.ip) + ret = cxml.define(server) if not ret: logger.error("ERROR: Failed to Define the dom: %s" % test_dom) return status - inst_list = [] + inst_list = {} - rc, cs = get_cs_instance(test_dom, options.ip, options.virt) + rc, cs = get_cs_instance(test_dom, server, virt) if rc != 0: - sys = libvirt_cached_data_poll(options.ip, options.virt, test_dom) + cs = libvirt_cached_data_poll(server, virt, test_dom) if sys is None: logger.error("Instance for %s not created" % test_dom) + cxml.undefine(server) return FAIL - inst_list.append(sys) - keys = ['Name', 'CreationClassName'] + inst_list[cs.CreationClassName] = cs.Name + try: - #Getting the hostname, to verify with the value returned by the assoc. - cn = get_typed_class(options.virt, 'HostSystem') - host_sys = enumclass.EnumInstances(options.ip, cn) + status, host_name, classname = get_host_info(server, virt) + if status != PASS: + logger.error("Unable to get host information") + cxml.undefine(server) + return status + except Exception, details: + logger.error("DEBUG Exception: %s" % details) + cxml.undefine(server) + return FAIL - if len(host_sys) < 1: - logger.error("ERROR: Enumerate returned 0 host instances") - return FAIL - - inst_list.append(host_sys[0]) - - except Exception, details: - logger.error("Exception: %s" % details) - return FAIL + inst_list[classname] = host_name prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' try: - cn = get_typed_class(options.virt, 'RegisteredProfile') - proflist = enumclass.EnumInstances(options.ip, cn) + cn = get_typed_class(virt, 'RegisteredProfile') + proflist = enumclass.EnumInstances(server, cn) except Exception, details: logger.error(CIM_ERROR_ENUMERATE, cn) logger.error("Exception: %s", details) + cxml.undefine(server) return status Globals.CIM_NS = prev_namespace - exp_list = build_exp_prof_list(proflist, options.virt) + exp_list = build_exp_prof_list(proflist, virt) # Loop through the assoc results returned on test_dom and hostsystem try: - for item in inst_list: - cn = item.CreationClassName - name = item.Name - an = get_typed_class(options.virt, "ElementConformsToProfile") - profs = assoc.Associators(options.ip, + for cn, sys_name in inst_list.iteritems(): + name = sys_name + an = get_typed_class(virt, "ElementConformsToProfile") + profs = assoc.Associators(server, an, cn, CreationClassName=cn, Name=name) if len(profs) != 1: - logger.error("ElementConformsToProfile assoc failed") - return FAIL + if cn == 'Linux_ComputerSystem': + status = XFAIL_RC(bug_sblim) + else: + logger.error("ElementConformsToProfile assoc failed") + status = FAIL + + if status != PASS: + cxml.undefine(server) + return status status = verify_profile(profs[0], exp_list[cn]) if status != PASS: logger.error("Verification of profile instance failed") + cxml.undefine(server) return FAIL except Exception, detail: - logger.error(CIM_ERROR_ASSOCIATORS, - get_typed_class(options.virt, 'RegisteredProfile')) + logger.error(CIM_ERROR_ASSOCIATORS, an) logger.error("Exception: %s", detail) status = FAIL - cxml.undefine(options.ip) + cxml.undefine(server) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Fri Oct 17 12:06:47 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 17 Oct 2008 17:36:47 +0530 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] #2 Add get_default_rasds() and get_rasd_templates() to rasd.py In-Reply-To: References: Message-ID: <48F87FD7.2050207@linux.vnet.ibm.com> +1 for me. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1223515128 25200 > # Node ID bbd83da2f0f6bc96ec47025dda3f4f42c095ab86 > # Parent cfc2c9d1212d80b4ee2ddf37c5e9398b4e349b26 > [TEST] #2 Add get_default_rasds() and get_rasd_templates() to rasd.py > > NOTE: This patch only works with recent versions of pywbem (svn checkout of 09/04/2008 or later). > > These functions can be used to get the template RASD instances. Instead of building instances by hand (see default_vssd_rasd_str()), the test cases should be using the template RASDs provided by the SettingsDefineCapabilities association. > > get_rasd_templates() - returns the min, max, increment, and default template RASD instances for a given AllocationCapabilities instance. > > get_default_rasds() - returns just the default template RASD instances for the resource pools. > > Add inst_to_mof() to convert instances to mof format. This is only needed for libcmpiutil version 0.4 and older. > > Add get_default_rasd_mofs() - returns default template RASDs in mof format. > > Updates: > -Change if/elif in inst_to_mof() to a single if. > > Signed-off-by: Kaitlin Rupert > > diff -r cfc2c9d1212d -r bbd83da2f0f6 suites/libvirt-cim/lib/XenKvmLib/classes.py > --- a/suites/libvirt-cim/lib/XenKvmLib/classes.py Wed Oct 15 05:57:17 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py Wed Oct 08 18:18:48 2008 -0700 > @@ -44,3 +44,16 @@ > > return cn[dash_index+1:] > > +#FIXME This function is only needed for libcmpiutil versions 0.4 and later. > +#Once version 0.4 is obsolete, this function should be removed. > +def inst_to_mof(inst): > + mof_str = inst.tomof() > + > + mof_inst = "" > + > + for str in mof_str.splitlines(): > + if str.endswith('{') or str.endswith('};') or not str.endswith('NULL;'): > + mof_inst += "%s\n" % str > + > + return mof_inst > + > diff -r cfc2c9d1212d -r bbd83da2f0f6 suites/libvirt-cim/lib/XenKvmLib/rasd.py > --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Oct 15 05:57:17 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Oct 08 18:18:48 2008 -0700 > @@ -24,8 +24,11 @@ > from CimTest.Globals import logger > from CimTest.ReturnCodes import FAIL, PASS > from XenKvmLib import vxml > -from XenKvmLib.classes import get_typed_class > - > +from XenKvmLib import const > +from XenKvmLib.classes import get_typed_class, get_class_type > +from XenKvmLib.enumclass import GetInstance > +from XenKvmLib.assoc import Associators > +from XenKvmLib.const import default_pool_name, default_network_name > > pasd_cn = 'ProcResourceAllocationSettingData' > nasd_cn = 'NetResourceAllocationSettingData' > @@ -165,3 +168,63 @@ > memrasd_list['VirtualQuantity']) > status = FAIL > return status > + > +def get_rasd_templates(host_ip, type, pool_id): > + ac_cn = get_typed_class(type, "AllocationCapabilities") > + an_cn = get_typed_class(type, "SettingsDefineCapabilities") > + > + templates = [] > + > + try: > + key_list = {"InstanceID" : pool_id } > + > + inst = GetInstance(host_ip, ac_cn, key_list) > + > + temps = Associators(host_ip, an_cn, ac_cn, InstanceID=inst.InstanceID) > + > + for temp in temps: > + templates.append(temp) > + > + except Exception, detail: > + logger.error("Exception: %s", detail) > + > + return templates > + > +def get_default_rasds(host_ip, type): > + ac_id_list = [ "MemoryPool/0", > + "DiskPool/%s" % default_pool_name, > + ] > + > + if type == "LXC": > + if const.LXC_netns_support is True: > + ac_id_list.append("NetworkPool/%s" % default_network_name) > + else: > + ac_id_list.append("NetworkPool/%s" % default_network_name) > + ac_id_list.append("ProcessorPool/0") > + > + templates = [] > + > + for id in ac_id_list: > + rasd_list = get_rasd_templates(host_ip, type, id) > + if len(rasd_list) < 1: > + logger.info("No RASD templates returned for %s", id) > + return [] > + > + for rasd in rasd_list: > + if rasd['InstanceID'] == "Default": > + templates.append(rasd) > + > + return templates > + > +def get_default_rasd_mofs(host_ip, type): > + rasds = get_default_rasds(ip, virt) > + > + rasd_mofs = [] > + > + #FIXME for libcmpiutil versions 0.4 and later, inst_to_mof() is needed. > + #This should be changed to rasd.tomof() once version 0.4 is obsolete. > + for rasd in rasds: > + rasd_mofs.append(inst_to_mof(rasd)) > + > + return rasd_mofs > + > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Fri Oct 17 12:07:04 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 17 Oct 2008 17:37:04 +0530 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] Fix VSSD mof generation In-Reply-To: <31fca7629bd7f394c3a9.1224129563@localhost.localdomain> References: <31fca7629bd7f394c3a9.1224129563@localhost.localdomain> Message-ID: <48F87FE8.3060304@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1224123190 25200 > # Node ID 31fca7629bd7f394c3a900c9f20c5573bcedc1f7 > # Parent bbd83da2f0f6bc96ec47025dda3f4f42c095ab86 > [TEST] Fix VSSD mof generation > > Signed-off-by: Kaitlin Rupert > > diff -r bbd83da2f0f6 -r 31fca7629bd7 suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py > --- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Oct 08 18:18:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Oct 15 19:13:10 2008 -0700 > @@ -71,8 +71,7 @@ > return PASS > > def test_rasd(options, temp, test_size): > - vssd_class = vsms.get_vssd_class(options.virt) > - vssd = vssd_class(name=default_dom, virt=options.virt) > + vssd = vsms.get_vssd_mof(options.virt, default_dom) > > drasd_class = vsms.get_dasd_class(options.virt) > drasd = drasd_class("hda", temp, default_dom) > @@ -81,7 +80,7 @@ > mrasd = mrasd_class(name=default_dom, megabytes=32) > > params = { > - "vssd" : vssd.mof(), > + "vssd" : vssd, > "rasd" : [drasd.mof(), mrasd.mof()] > } > > diff -r bbd83da2f0f6 -r 31fca7629bd7 suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Wed Oct 08 18:18:48 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Wed Oct 15 19:13:10 2008 -0700 > @@ -51,7 +51,7 @@ > name=default_dom) > > params = { > - "vssd" : vssd.mof(), > + "vssd" : vssd, > "rasd" : [mrasd.mof()], > } > > @@ -101,8 +101,7 @@ > def main(): > options = main.options > > - vssd_class = vsms.get_vssd_class(options.virt) > - vssd = vssd_class(name=default_dom, virt=options.virt) > + vssd = vsms.get_vssd_mof(options.virt, default_dom) > > status = PASS > > diff -r bbd83da2f0f6 -r 31fca7629bd7 suites/libvirt-cim/lib/XenKvmLib/vsms.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 08 18:18:48 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 15 19:13:10 2008 -0700 > @@ -108,7 +108,6 @@ > self.Kernel = const.Xen_kernel_path > self.Ramdisk = const.Xen_init_path > > - > class Xen_VirtualSystemSettingData(CIM_VirtualSystemSettingData): > pass > > @@ -118,9 +117,10 @@ > class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData): > pass > > - at eval_cls('VirtualSystemSettingData') > -def get_vssd_class(virt): > - pass > +def get_vssd_mof(virt, dom_name): > + vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData")) > + vssd = vssd_cn(dom_name, virt) > I did not get the difference between vssd_cn and vssd assignments, both of them evaluate to classobj XenKvmLib.vsms.Xen_VirtualSystemSettingData. > + return vssd.mof() > > # classes to define RASD parameters > class CIM_DiskResourceAllocationSettingData(CIMClassMOF): > @@ -238,8 +238,7 @@ > mem_mb=512, > malloc_units="MegaBytes", > virt='Xen'): > - class_vssd = get_vssd_class(virt) > - vssd = class_vssd(name=dom_name, virt=virt) > + vssd = get_vssd_mof(virt, dom_name) > > class_dasd = get_dasd_class(virt) > if virt == 'KVM': > @@ -261,7 +260,7 @@ > > # LXC only takes disk and memory device for now. > if virt == 'LXC': > - return vssd.mof(), [d.mof(), m.mof()] > + return vssd, [d.mof(), m.mof()] > > class_nasd = get_nasd_class(virt) > if net_mac != const.Xen_default_mac: > @@ -282,5 +281,5 @@ > vcpu=proc_vcpu, > name=dom_name) > > - return vssd.mof(), [d.mof(), n.mof(), p.mof(), m.mof()] > + return vssd, [d.mof(), n.mof(), p.mof(), m.mof()] > > diff -r bbd83da2f0f6 -r 31fca7629bd7 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 08 18:18:48 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 15 19:13:10 2008 -0700 > @@ -466,7 +466,7 @@ > net_type, net_name, 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) > + self.vssd = vsms.get_vssd_mof(virt, dom_name) > self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name) > self.nasd = vsms.get_nasd_class(virt)(type=net_type, > mac=net_mac, > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Fri Oct 17 12:07:56 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 17 Oct 2008 17:37:56 +0530 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add VirtualSystemManagementService - 14_define_sys_disk.py In-Reply-To: <16ed883b2d333bfe7305.1224129564@localhost.localdomain> References: <16ed883b2d333bfe7305.1224129564@localhost.localdomain> Message-ID: <48F8801C.10507@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1224123190 25200 > # Node ID 16ed883b2d333bfe73059c319b011e5fe6153ae8 > # Parent 31fca7629bd7f394c3a900c9f20c5573bcedc1f7 > [TEST] #2 Add VirtualSystemManagementService - 14_define_sys_disk.py > > This test defines a guest with a very large disk image. This test can be updated in the future to include other disk specific DefineSystem() tests. > > Updates: > -Remove call to default_vssd_rasd_str(); replace with call to get_vssd_mof() > > Signed-off-by: Kaitlin Rupert > > diff -r 31fca7629bd7 -r 16ed883b2d33 suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Wed Oct 15 19:13:10 2008 -0700 > @@ -0,0 +1,99 @@ > +#!/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 os > +from VirtLib.utils import run_remote > +from CimTest.Globals import logger > +from CimTest.ReturnCodes import FAIL, PASS > +from XenKvmLib.const import do_main, _image_dir > +from XenKvmLib.common_util import create_using_definesystem > +from XenKvmLib.test_doms import destroy_and_undefine_domain > +from XenKvmLib.classes import get_typed_class, inst_to_mof > +from XenKvmLib.rasd import get_default_rasds > +from XenKvmLib.vsms import get_vssd_mof > + > +sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > +test_dom = 'rstest_disk_domain' > + > +def make_long_disk_path(ip): > + path = os.path.join(_image_dir, 'cimtest_large_image') > + > + cmd = "dd if=/dev/zero of=%s bs=1M count=1 seek=8192" % path > + > + rc, out = run_remote(ip, cmd) > + if rc != 0: > + logger.error("Unable to create large disk image") > + logger.error(out) > + return None > + > + return path > + > +def get_vssd_rasd(ip, virt, addr): > + vssd = get_vssd_mof(virt, test_dom) > + > + rasds = get_default_rasds(ip, virt) > + > + for i in range(0, len(rasds)): > I think we had discussed this to be "for i in range(len(rasds))" :) For now we can leave this as it is. > + if rasds[i]['PoolID'].find('DiskPool') >= 0: > This can be "if 'DiskPool' in rasds[i]['PoolID']" as an alternative. But the above what you have also serves our purpose. +1 for me for the changes. > + rasds[i]['Address'] = addr > + rasds[i] = inst_to_mof(rasds[i]) > + > + params = { 'vssd' : vssd, > + 'rasd' : rasds > + } > + > + return params > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + try: > + addr = make_long_disk_path(options.ip) > + if addr is None: > + raise Exception("Unable to create large disk image") > + > + define_params = get_vssd_rasd(options.ip, options.virt, addr) > + if len(define_params) != 2: > + raise Exception("Unable to get VSSD and RASDs for %s" % test_dom) > + > + status = create_using_definesystem(test_dom, options.ip, > + params=define_params, ref_config="", > + virt=options.virt) > + if status != PASS: > + raise Exception("Unable to define %s" % test_dom) > + > + except Exception, details: > + logger.error(details) > + status = FAIL > + > + if os.path.exists(addr): > + os.remove(addr) > + > + destroy_and_undefine_domain(test_dom, 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 > From deeptik at linux.vnet.ibm.com Fri Oct 17 12:27:16 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 17 Oct 2008 17:57:16 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Remove a particulare case that it doesn't touch provider in SDC In-Reply-To: <0d0e0b3b7cc463ff5241.1224211409@elm3b217.beaverton.ibm.com> References: <0d0e0b3b7cc463ff5241.1224211409@elm3b217.beaverton.ibm.com> Message-ID: <48F884A4.5070904@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224211402 25200 > # Node ID 0d0e0b3b7cc463ff52419e577911640ecc467518 > # Parent 69fe94b1348985a337d385865d7522c78f57e116 > [TEST] Remove a particulare case that it doesn't touch provider in SDC > > Signed-off-by: Guolian Yun > > diff -r 69fe94b13489 -r 0d0e0b3b7cc4 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Thu Oct 16 03:14:27 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Thu Oct 16 19:43:22 2008 -0700 > @@ -43,8 +43,6 @@ expr_values = { > "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, > 'desc' : 'Unable to determine\ > resource type' }, > - "invalid_ccname_keyname" : { 'rc' : pywbem.CIM_ERR_INVALID_PARAMETER, > - 'desc' : 'CIM_ERR_INVALID_PARAMETER' } > } > > def err_invalid_instid_keyname(virt, conn, field): > @@ -85,22 +83,6 @@ def err_invalid_instid_keyvalue(virt, co > expr_values=expr_values['invalid_instid_keyvalue'], > bug_no="") > > -def err_invalid_ccname_keyname(virt, conn, field): > -# Input: > -# ------ > -# wbemcli ai -ac Xen_SettingsDefineCapabilities \ > -# 'http://localhost:5988/root/virt:Wrong.InstanceID="ProcessorPool/0"' -nl > -# > -# Output: > -# ------- > -# error code : CIM_ERR_INVALID_PARAMETER > -# error desc : One or more parameter values passed to the method were invalid > - assoc_classname = get_typed_class(virt, "SettingsDefineCapabilities") > - classname = field > - keys = { 'InstanceID' : 'MemoryPool/0' } > - return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ > - expr_values=expr_values['invalid_ccname_keyname'], > - bug_no="") > > @do_main(platform_sup) > def main(): > @@ -118,10 +100,6 @@ def main(): > if ret_value != PASS: > logger.error("------ FAILED: Invalid InstanceID Key Value.------") > return ret_value > - ret_value = err_invalid_ccname_keyname(virt, conn, field='WrongClassName') > - if ret_value != PASS: > - logger.error("------ FAILED: Invalid CCName Key Name.------") > - return ret_value > return PASS > > if __name__ == "__main__": > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From kaitlin at linux.vnet.ibm.com Fri Oct 17 14:00:17 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 17 Oct 2008 07:00:17 -0700 Subject: [Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection Service In-Reply-To: <7fbd020ca47795c3528a.1224197425@elm3b24.beaverton.ibm.com> References: <7fbd020ca47795c3528a.1224197425@elm3b24.beaverton.ibm.com> Message-ID: <48F89A71.5000106@linux.vnet.ibm.com> Richard Maciel wrote: > # HG changeset patch > # User Richard Maciel > # Date 1224196932 25200 > # Node ID 7fbd020ca47795c3528a698b3ddccc718cae9f2c > # Parent ef98854352d7c0e7abbe2d77ba9d885ef61629e6 > * Added association Console Redirections Service <-> Console Redirection Service > Capabilities into the ElementCapabilities.c file > > * Added ConsoleRedirectionServiceCapabilities.h to export the > get_console_rs_caps function > * get_console_rs_caps is not static anymore > > Signed-off-by: Richard Maciel > Hi Richard, Thanks for the changes. When you get review comments on a patch, you'll want to update the original patch with the changes. This looks like it's a patch on top of the first patch you sent. You can modify an existing patch using "hg qref". Also, as a convention, we number the updated patches. So you'll want to use "hg qref -e" to update the commit log so that the subject of the patch has a (#2) in front. You'll also want to update the commit log so that is lists what changes were made. I usually add something like the following at the bottom of the commit log: Changes from patch 1 to 2: -Fixed whitespace issues .... Also, you're still missing the new ConsoleRedirectionServiceCapabilities.h header file you created. You can add it to the patch using "hg add ConsoleRedirectionServiceCapabilities.h" and then "hg qref". Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Fri Oct 17 14:07:28 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 17 Oct 2008 07:07:28 -0700 Subject: [Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection Service In-Reply-To: <48F89A71.5000106@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Fri, 17 Oct 2008 07:00:17 -0700") References: <7fbd020ca47795c3528a.1224197425@elm3b24.beaverton.ibm.com> <48F89A71.5000106@linux.vnet.ibm.com> Message-ID: <8763nrpb6n.fsf@caffeine.danplanet.com> KR> You can modify an existing patch using "hg qref". Also, as a KR> convention, we number the updated patches. So you'll want to use KR> "hg qref -e" to update the commit log so that the subject of the KR> patch has a (#2) in front. You'll also want to update the commit KR> log so that is lists what changes were made. You might want to take a look at the doc/SubmittingPatches file in the tree, which documents a lot of these practices (this one is part f). Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 17 16:24:42 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 17 Oct 2008 09:24:42 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Updating 04_reverse_errs.py tc of HostedDependency to work with/without sblim-base-provider In-Reply-To: References: Message-ID: <48F8BC4A.9080009@linux.vnet.ibm.com> > +def verify_err_fields(cxml, server, conn, keys, classname, > + assoc_classname, msg, field): > + try: > + ret = try_assoc(conn, classname, assoc_classname, keys, > + field_name=field, expr_values=expr_values[field], > + bug_no="") > + if ret != PASS: > + if classname == 'Linux_ComputerSystem': > + return XFAIL_RC(bug_sblim) > + else: > + logger.error("--- FAILED: %s---", msg) > + cxml.destroy(server) You also need cxml.undefine() here. > + acn = get_typed_class(virt, 'HostedDependency') > + status, host_name, classname = get_host_info(server, virt) > + if status: > + logger.error("Unable to get host info") > + cxml.destroy(server) Same here. > + msg = 'Invalid CreationClassName Key Value' > + field='INVALID_CCNameValue' > + keys = { 'CreationClassName' : field, 'Name' : host_name } > + ret_value = verify_err_fields(cxml, server, conn, keys, classname, > + acn, msg, field) > + cxml.destroy(server) Here as well. > + return ret_value -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Oct 17 18:14:54 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 17 Oct 2008 23:44:54 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Updating 04_reverse_errs.py tc of HostedDependency to work with/without sblim-base-provider In-Reply-To: <48F8BC4A.9080009@linux.vnet.ibm.com> References: <48F8BC4A.9080009@linux.vnet.ibm.com> Message-ID: <48F8D61E.1060102@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> +def verify_err_fields(cxml, server, conn, keys, classname, + >> assoc_classname, msg, field): >> + try: >> + ret = try_assoc(conn, classname, assoc_classname, keys, + >> field_name=field, expr_values=expr_values[field], + bug_no="") >> + if ret != PASS: >> + if classname == 'Linux_ComputerSystem': >> + return XFAIL_RC(bug_sblim) >> + else: >> + logger.error("--- FAILED: %s---", msg) >> + cxml.destroy(server) > > You also need cxml.undefine() here. I removed the cxml.undefine() since cxml.destroy() is just sufficient to destroy the domain that was created using cxml.create(). I had verified this before removing the cxml.undefine(), let me know if you still think we need to include cxml.undefine(). > >> + acn = get_typed_class(virt, 'HostedDependency') >> + status, host_name, classname = get_host_info(server, virt) >> + if status: >> + logger.error("Unable to get host info") >> + cxml.destroy(server) > > Same here. > >> + msg = 'Invalid CreationClassName Key Value' >> + field='INVALID_CCNameValue' >> + keys = { 'CreationClassName' : field, 'Name' : host_name } >> + ret_value = verify_err_fields(cxml, server, conn, keys, classname, >> + acn, msg, field) >> + cxml.destroy(server) > > Here as well. > >> + return ret_value From richardm at br.ibm.com Fri Oct 17 18:24:34 2008 From: richardm at br.ibm.com (Richard Maciel) Date: Fri, 17 Oct 2008 11:24:34 -0700 Subject: [Libvirt-cim] [PATCH] * Patch #2: Added association Console Redirections Service <-> Console Redirection Service Message-ID: <945715d70d43a432adcd.1224267874@elm3b24.beaverton.ibm.com> # HG changeset patch # User Richard Maciel # Date 1224267128 25200 # Node ID 945715d70d43a432adcd46b8eb8146564d473fc7 # Parent ef98854352d7c0e7abbe2d77ba9d885ef61629e6 * Patch #2: Added association Console Redirections Service <-> Console Redirection Service Capabilities into the ElementCapabilities.c file * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function * get_console_rs_caps is not static anymore * Fixed whitespace issues * Removed not useful CU_DEBUG calls from ElementCapabilities.c file (those were added in the first patch) Signed-off-by: Richard Maciel diff -r ef98854352d7 -r 945715d70d43 src/Makefile.am --- a/src/Makefile.am Thu Oct 16 13:28:42 2008 -0700 +++ b/src/Makefile.am Fri Oct 17 11:12:08 2008 -0700 @@ -132,7 +132,7 @@ -lVirt_VSMigrationService \ -lVirt_DevicePool \ -lVirt_ConsoleRedirectionService \ - -lVirt_ConsoleRedirectionServiceCapabilities + -lVirt_ConsoleRedirectionServiceCapabilities libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c diff -r ef98854352d7 -r 945715d70d43 src/Virt_ConsoleRedirectionServiceCapabilities.c --- a/src/Virt_ConsoleRedirectionServiceCapabilities.c Thu Oct 16 13:28:42 2008 -0700 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.c Fri Oct 17 11:12:08 2008 -0700 @@ -70,12 +70,10 @@ return s; } -/* Removed the static keyword from the function declaration to - * make it available for other modules */ CMPIStatus get_console_rs_caps(const CMPIBroker *broker, - const CMPIObjectPath *ref, - CMPIInstance **_inst, - bool is_get_inst) + const CMPIObjectPath *ref, + CMPIInstance **_inst, + bool is_get_inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; diff -r ef98854352d7 -r 945715d70d43 src/Virt_ConsoleRedirectionServiceCapabilities.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.h Fri Oct 17 11:12:08 2008 -0700 @@ -0,0 +1,35 @@ +/* + * Copyright IBM Corp. 2008 + * + * Authors: + * Richard Maciel + * + * 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 + */ + +CMPIStatus get_console_rs_caps(const CMPIBroker *broker, + const CMPIObjectPath *ref, + CMPIInstance **_inst, + bool is_get_inst); + + /* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff -r ef98854352d7 -r 945715d70d43 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Thu Oct 16 13:28:42 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Fri Oct 17 11:12:08 2008 -0700 @@ -78,14 +78,13 @@ s = get_migration_service(ref, &_inst, _BROKER, context, false); } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) { - s = get_console_rs_caps(_BROKER, ref, &_inst, true); + s = get_console_rs_caps(_BROKER, ref, &_inst, true); - if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) goto out; - - s = get_console_rs(ref, &_inst, _BROKER, context, false); - } else + s = get_console_rs(ref, &_inst, _BROKER, context, false); + } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, "Not found"); @@ -110,7 +109,6 @@ char* classname; classname = class_base_name(CLASSNAME(ref)); - CU_DEBUG("After class_base_name\n: %s", classname); if (STREQC(classname, "VirtualSystemManagementService")) { s = get_vsms(ref, &_inst, _BROKER, context, true); if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) @@ -123,18 +121,15 @@ goto out; s = get_migration_caps(ref, &_inst, _BROKER, false); - } else if(STREQC(classname, "ConsoleRedirectionService")) { - CU_DEBUG("before console_rs\n"); - s = get_console_rs(ref, &_inst, _BROKER, context, true); - if((s.rc != CMPI_RC_OK) || (_inst == NULL)) - goto out; + } else if (STREQC(classname, "ConsoleRedirectionService")) { + s = get_console_rs(ref, &_inst, _BROKER, context, true); + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; - CU_DEBUG("before console_rs_caps\n"); - s = get_console_rs_caps(_BROKER, ref, &_inst, false); - if((s.rc != CMPI_RC_OK) || (_inst == NULL)) - goto out; - CU_DEBUG("after console_rs_Caps\n"); - } else + s = get_console_rs_caps(_BROKER, ref, &_inst, false); + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, ""); @@ -211,8 +206,6 @@ { CMPIInstance *inst = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; - - CU_DEBUG("service_to_cap\n"); if (!match_hypervisor_prefix(ref, info)) goto out; From danms at us.ibm.com Fri Oct 17 18:35:39 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 17 Oct 2008 11:35:39 -0700 Subject: [Libvirt-cim] [PATCH] * Patch #2: Added association Console Redirections Service <-> Console Redirection Service In-Reply-To: <945715d70d43a432adcd.1224267874@elm3b24.beaverton.ibm.com> (Richard Maciel's message of "Fri, 17 Oct 2008 11:24:34 -0700") References: <945715d70d43a432adcd.1224267874@elm3b24.beaverton.ibm.com> Message-ID: <87od1jkr2c.fsf@caffeine.danplanet.com> RM> * Removed not useful CU_DEBUG calls from ElementCapabilities.c RM> file (those were added in the first patch) Your first patch has not been committed, so please send a patch against the tip that contains all the desired changes. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 17 18:41:54 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 17 Oct 2008 11:41:54 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Updating 04_reverse_errs.py tc of HostedDependency to work with/without sblim-base-provider In-Reply-To: <48F8D61E.1060102@linux.vnet.ibm.com> References: <48F8BC4A.9080009@linux.vnet.ibm.com> <48F8D61E.1060102@linux.vnet.ibm.com> Message-ID: <48F8DC72.4070800@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Kaitlin Rupert wrote: >>> +def verify_err_fields(cxml, server, conn, keys, classname, + >>> assoc_classname, msg, field): >>> + try: >>> + ret = try_assoc(conn, classname, assoc_classname, keys, + >>> field_name=field, expr_values=expr_values[field], + bug_no="") >>> + if ret != PASS: >>> + if classname == 'Linux_ComputerSystem': >>> + return XFAIL_RC(bug_sblim) >>> + else: >>> + logger.error("--- FAILED: %s---", msg) >>> + cxml.destroy(server) >> >> You also need cxml.undefine() here. > I removed the cxml.undefine() since cxml.destroy() is just sufficient to > destroy the domain that was created using cxml.create(). > I had verified this before removing the cxml.undefine(), let me know if > you still think we need to include cxml.undefine(). Ah, good point. My mistake. =) Your patch is fine as is. I'll apply =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 17 19:15:11 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 17 Oct 2008 12:15:11 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add VirtualSystemManagementService - 14_define_sys_disk.py In-Reply-To: <48F8801C.10507@linux.vnet.ibm.com> References: <16ed883b2d333bfe7305.1224129564@localhost.localdomain> <48F8801C.10507@linux.vnet.ibm.com> Message-ID: <48F8E43F.1090103@linux.vnet.ibm.com> >> + >> + rasds = get_default_rasds(ip, virt) >> + >> + for i in range(0, len(rasds)): >> > I think we had discussed this to be "for i in range(len(rasds))" :) > For now we can leave this as it is. Yes, sorry about that. You did mention it in your other review, but I forgot. >> + if rasds[i]['PoolID'].find('DiskPool') >= 0: >> > This can be "if 'DiskPool' in rasds[i]['PoolID']" as an alternative. > But the above what you have also serves our purpose. > +1 for me for the changes. Your way is cleaner. I'll apply this set and then follow up with a patch to fix these items. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 17 19:38:32 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 17 Oct 2008 12:38:32 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] Fix VSSD mof generation In-Reply-To: <48F87FE8.3060304@linux.vnet.ibm.com> References: <31fca7629bd7f394c3a9.1224129563@localhost.localdomain> <48F87FE8.3060304@linux.vnet.ibm.com> Message-ID: <48F8E9B8.50502@linux.vnet.ibm.com> >> diff -r bbd83da2f0f6 -r 31fca7629bd7 >> suites/libvirt-cim/lib/XenKvmLib/vsms.py >> --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 08 18:18:48 >> 2008 -0700 >> +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 15 19:13:10 >> 2008 -0700 >> @@ -108,7 +108,6 @@ >> self.Kernel = const.Xen_kernel_path >> self.Ramdisk = const.Xen_init_path >> - >> class Xen_VirtualSystemSettingData(CIM_VirtualSystemSettingData): >> pass >> >> @@ -118,9 +117,10 @@ >> class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData): >> pass >> >> - at eval_cls('VirtualSystemSettingData') >> -def get_vssd_class(virt): >> - pass >> +def get_vssd_mof(virt, dom_name): >> + vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData")) >> + vssd = vssd_cn(dom_name, virt) >> > I did not get the difference between vssd_cn and vssd assignments, both > of them evaluate to classobj XenKvmLib.vsms.Xen_VirtualSystemSettingData. >> + return vssd.mof() >> If you print vssd_cn, you'll get: XenKvmLib.vsms.KVM_VirtualSystemSettingData If you print vssd, you'll get mof syntax. ================================ To see why this change is needed, you can apply the following patch. Run it once with: return vssd #return vssd.mof() Then run it again with #return vssd return vssd.mof() In the first case, the VSSD object is: In the second, it's a properly formatted MOF, which is what the CIMOM is expecting. # HG changeset patch # User Kaitlin Rupert # Date 1224271624 25200 # Node ID 93edf76620526b54e527de006ad3c2d587c725a3 # Parent 16ed883b2d333bfe73059c319b011e5fe6153ae8 Signed-off-by: Kaitlin Rupert diff -r 16ed883b2d33 -r 93edf7662052 lib/CimTest/CimExt.py --- a/lib/CimTest/CimExt.py Wed Oct 15 19:13:10 2008 -0700 +++ b/lib/CimTest/CimExt.py Fri Oct 17 12:27:04 2008 -0700 @@ -29,6 +29,8 @@ return _Method(self.__invoker, "%s.%s" % (self.__name, name)) def __call__(self, **args): + print "\n" + print args return self.__invoker(self.__name, args) diff -r 16ed883b2d33 -r 93edf7662052 suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Fri Oct 17 12:27:04 2008 -0700 @@ -92,6 +92,7 @@ destroy_and_undefine_domain(test_dom, options.ip, options.virt) + return FAIL return status if __name__ == "__main__": diff -r 16ed883b2d33 -r 93edf7662052 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri Oct 17 12:27:04 2008 -0700 @@ -119,8 +119,14 @@ def get_vssd_mof(virt, dom_name): vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData")) + print vssd_cn + print "\n" vssd = vssd_cn(dom_name, virt) - return vssd.mof() + print vssd + print "\n" + print vssd.mof() + return vssd + #return vssd.mof() # classes to define RASD parameters class CIM_DiskResourceAllocationSettingData(CIMClassMOF): -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From richardm at br.ibm.com Fri Oct 17 23:40:53 2008 From: richardm at br.ibm.com (Richard Maciel) Date: Fri, 17 Oct 2008 16:40:53 -0700 Subject: [Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection Message-ID: # HG changeset patch # User Richard Maciel # Date 1224286653 25200 # Node ID b1da9a0f3b05f631aef5df5494c94fa57491e46d # Parent f7b995404a9c6a4c55374155b9d6826ad6fb2f3a * Added association Console Redirections Service <-> Console Redirection Service Capabilities into the ElementCapabilities.c file * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function get_console_rs_caps is not static anymore * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function * get_console_rs_caps is not static anymore * Fixed whitespace issues * Removed not useful CU_DEBUG calls from ElementCapabilities.c file Signed-off-by: Richard Maciel diff -r f7b995404a9c -r b1da9a0f3b05 src/Makefile.am --- a/src/Makefile.am Mon Oct 06 08:37:42 2008 -0700 +++ b/src/Makefile.am Fri Oct 17 16:37:33 2008 -0700 @@ -21,7 +21,8 @@ Virt_VirtualSystemSnapshotService.h \ Virt_VirtualSystemSnapshotServiceCapabilities.h \ Virt_VSMigrationSettingData.h \ - Virt_ConsoleRedirectionService.h + Virt_ConsoleRedirectionService.h \ + Virt_ConsoleRedirectionServiceCapabilities.h XKUADD = $(top_builddir)/libxkutil/libxkutil.la @@ -119,7 +120,7 @@ libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c libVirt_AllocationCapabilities_la_LIBADD = -lVirt_DevicePool -libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la +libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la libVirt_ConsoleRedirectionService.la libVirt_ConsoleRedirectionServiceCapabilities.la libVirt_ElementCapabilities_la_SOURCES = Virt_ElementCapabilities.c libVirt_ElementCapabilities_la_LIBADD = -lVirt_VirtualSystemManagementCapabilities \ -lVirt_EnabledLogicalElementCapabilities \ @@ -129,7 +130,9 @@ -lVirt_AllocationCapabilities \ -lVirt_VirtualSystemManagementService \ -lVirt_VSMigrationService \ - -lVirt_DevicePool + -lVirt_DevicePool \ + -lVirt_ConsoleRedirectionService \ + -lVirt_ConsoleRedirectionServiceCapabilities libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c diff -r f7b995404a9c -r b1da9a0f3b05 src/Virt_ConsoleRedirectionServiceCapabilities.c --- a/src/Virt_ConsoleRedirectionServiceCapabilities.c Mon Oct 06 08:37:42 2008 -0700 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.c Fri Oct 17 16:37:33 2008 -0700 @@ -32,6 +32,7 @@ #include "svpc_types.h" #include "Virt_ConsoleRedirectionService.h" +#include "Virt_ConsoleRedirectionServiceCapabilities.h" const static CMPIBroker *_BROKER; @@ -69,10 +70,10 @@ return s; } -static CMPIStatus get_console_rs_caps(const CMPIBroker *broker, - const CMPIObjectPath *ref, - CMPIInstance **_inst, - bool is_get_inst) +CMPIStatus get_console_rs_caps(const CMPIBroker *broker, + const CMPIObjectPath *ref, + CMPIInstance **_inst, + bool is_get_inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; diff -r f7b995404a9c -r b1da9a0f3b05 src/Virt_ConsoleRedirectionServiceCapabilities.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.h Fri Oct 17 16:37:33 2008 -0700 @@ -0,0 +1,35 @@ +/* + * Copyright IBM Corp. 2008 + * + * Authors: + * Richard Maciel + * + * 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 + */ + +CMPIStatus get_console_rs_caps(const CMPIBroker *broker, + const CMPIObjectPath *ref, + CMPIInstance **_inst, + bool is_get_inst); + + /* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff -r f7b995404a9c -r b1da9a0f3b05 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Mon Oct 06 08:37:42 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Fri Oct 17 16:37:33 2008 -0700 @@ -41,6 +41,8 @@ #include "Virt_VSMigrationCapabilities.h" #include "Virt_AllocationCapabilities.h" #include "Virt_DevicePool.h" +#include "Virt_ConsoleRedirectionService.h" +#include "Virt_ConsoleRedirectionServiceCapabilities.h" #include "svpc_types.h" @@ -75,7 +77,14 @@ goto out; s = get_migration_service(ref, &_inst, _BROKER, context, false); - } else + } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) { + s = get_console_rs_caps(_BROKER, ref, &_inst, true); + + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + + s = get_console_rs(ref, &_inst, _BROKER, context, false); + } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, "Not found"); @@ -100,7 +109,6 @@ char* classname; classname = class_base_name(CLASSNAME(ref)); - if (STREQC(classname, "VirtualSystemManagementService")) { s = get_vsms(ref, &_inst, _BROKER, context, true); if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) @@ -113,6 +121,14 @@ goto out; s = get_migration_caps(ref, &_inst, _BROKER, false); + } else if (STREQC(classname, "ConsoleRedirectionService")) { + s = get_console_rs(ref, &_inst, _BROKER, context, true); + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + + s = get_console_rs_caps(_BROKER, ref, &_inst, false); + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, @@ -382,22 +398,28 @@ "Xen_HostSystem", "Xen_VirtualSystemManagementService", "Xen_VirtualSystemMigrationService", + "Xen_ConsoleRedirectionService", "KVM_HostSystem", "KVM_VirtualSystemManagementService", "KVM_VirtualSystemMigrationService", + "KVM_ConsoleRedirectionService", "LXC_HostSystem", "LXC_VirtualSystemManagementService", "LXC_VirtualSystemMigrationService", + "LXC_ConsoleRedirectionService", NULL }; static char *host_caps[] = { "Xen_VirtualSystemManagementCapabilities", "Xen_VirtualSystemMigrationCapabilities", + "Xen_ConsoleRedirectionServiceCapabilities", "KVM_VirtualSystemManagementCapabilities", "KVM_VirtualSystemMigrationCapabilities", + "KVM_ConsoleRedirectionServiceCapabilities", "LXC_VirtualSystemManagementCapabilities", "LXC_VirtualSystemMigrationCapabilities", + "LXC_ConsoleRedirectionServiceCapabilities", NULL, }; @@ -434,6 +456,9 @@ "Xen_VirtualSystemMigrationService", "KVM_VirtualSystemMigrationService", "LXC_VirtualSystemMigrationService", + "Xen_ConsoleRedirectionService", + "KVM_ConsoleRedirectionService", + "LXC_ConsoleRedirectionService", NULL }; From yunguol at cn.ibm.com Mon Oct 20 02:06:52 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 19 Oct 2008 19:06:52 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update vsmigrations.py to call new EnumInstances Message-ID: <98291a8279946f37be3e.1224468412@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224468407 25200 # Node ID 98291a8279946f37be3e74f467e32c39e927bde7 # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 [TEST] Update vsmigrations.py to call new EnumInstances Signed-off-by: Guolian Yun diff -r a3d9c0a81c27 -r 98291a827994 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Oct 19 19:06:47 2008 -0700 @@ -108,10 +108,7 @@ def get_migration_job_instance(ip, virt, key_list = ["instanceid"] mig_job_cn = get_typed_class(virt, 'MigrationJob') try: - job = enumclass.enumerate(ip, - mig_job_cn, - key_list, - virt=virt) + job = enumclass.EnumInstances(ip, mig_job_cn) except Exception, details: logger.error(CIM_ERROR_ENUMERATE, mig_job_cn) logger.error(details) From yunguol at cn.ibm.com Mon Oct 20 02:28:39 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 19 Oct 2008 19:28:39 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update all tc to call new GetInstance Message-ID: <0ebf9d140faab8bee880.1224469719@elm3b217.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224469713 25200 # Node ID 0ebf9d140faab8bee8802ecf5f2de8a30286ff0c # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 [TEST] Update all tc to call new GetInstance Signed-off-by: Guolian Yun diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Sun Oct 19 19:28:33 2008 -0700 @@ -73,12 +73,12 @@ def main(): if not ret : logger.error("ERROR: VS %s was not defined" % test_dom) return status - + cs_class = get_typed_class(options.virt, 'ComputerSystem') keys = { 'Name' : test_dom, - 'CreationClassName' : get_typed_class(options.virt, 'ComputerSystem') + 'CreationClassName' : cs_class } - cs = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) + cs = enumclass.GetInstance(options.ip, cs_class, keys) if cs.Name == test_dom: from_State = cs.EnabledState @@ -101,7 +101,7 @@ def main(): #Get the value of the EnabledState property and RequestedState property. try: - cs= enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) + cs= enumclass.GetInstance(options.ip, cs_class, keys) if cs.Name == test_dom: to_RequestedState = cs.RequestedState enabledState = cs.EnabledState diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Sun Oct 19 19:28:33 2008 -0700 @@ -45,7 +45,7 @@ from XenKvmLib.assoc import Associators from XenKvmLib.assoc import Associators from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib import devices -from XenKvmLib.enumclass import getInstance +from XenKvmLib.enumclass import GetInstance from CimTest.Globals import CIM_ERROR_ASSOCIATORS, CIM_ERROR_GETINSTANCE from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class @@ -61,16 +61,17 @@ test_vcpus = 1 test_vcpus = 1 def get_inst(server, virt, cn, key_list): + cn_name = get_typed_class(virt, cn) inst = None try: - inst = getInstance(server, cn, key_list, virt) + inst = GetInstance(server, cn_name, key_list) except Exception, details: logger.error("Exception %s" % details) return None if inst is None: - logger.error("Expected at least one %s instance" % cn) + logger.error("Expected at least one %s instance" % cn_name) return None return inst diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Sun Oct 19 19:28:33 2008 -0700 @@ -34,7 +34,7 @@ from CimTest.Globals import logger, CIM_ CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP -from XenKvmLib.enumclass import getInstance +from XenKvmLib.enumclass import GetInstance sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "dom_elecap" @@ -94,8 +94,7 @@ def verify_service(inst_list, ip, virt, 'SystemCreationClassName' : host_ccn } try: - basename = get_class_basename(ser_cn) - service = getInstance(ip, basename, keys, virt) + service = GetInstance(ip, ser_cn, keys) except Exception, detail: logger.error(CIM_ERROR_GETINSTANCE, ser_cn) logger.error("Exeption : %s", detail) diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Sun Oct 19 19:28:33 2008 -0700 @@ -73,13 +73,11 @@ def setup_env(server, virt): return PASS, vsxml, test_disk def get_instance(server, pool, list, virt='Xen'): + pool_cn = get_typed_class(virt, pool) try: - inst = enumclass.getInstance(server, - pool, - list, - virt) + inst = enumclass.GetInstance(server, pool_cn, list) except Exception: - logger.error(Globals.CIM_ERROR_GETINSTANCE % pool) + logger.error(Globals.CIM_ERROR_GETINSTANCE % pool_cn) return FAIL, inst return PASS, inst diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Sun Oct 19 19:28:33 2008 -0700 @@ -105,7 +105,7 @@ def get_rasd_instance(server, virt, key_ def get_rasd_instance(server, virt, key_list, cn): inst = None try: - inst = enumclass.getInstance(server, cn, key_list, virt) + inst = enumclass.GetInstance(server, cn, key_list) except Exception, details: logger.error(Globals.CIM_ERROR_GETINSTANCE, cn) logger.error("Exception details: %s", details) diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Sun Oct 19 19:28:33 2008 -0700 @@ -78,7 +78,7 @@ def get_or_bail(virt, ip, id, pool_class """ key_list = { 'InstanceID' : id } try: - instance = enumclass.getInstance(ip, pool_class, key_list, virt) + instance = enumclass.GetInstance(ip, pool_class, key_list) except Exception, detail: logger.error(CIM_ERROR_GETINSTANCE, '%s' % pool_class) logger.error("Exception: %s", detail) @@ -123,8 +123,7 @@ def init_list(virt, pool): def get_pool_info(virt, server, devid, poolname=""): pool_cname = get_typed_class(virt, poolname) - pool_cn = eval("enumclass." + pool_cname) - return get_or_bail(virt, server, id=devid, pool_class=pool_cn) + return get_or_bail(virt, server, id=devid, pool_class=pool_cname) def get_pool_details(virt, server): dpool = npool = mpool = ppool = None From yunguol at cn.ibm.com Mon Oct 20 02:36:36 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 19 Oct 2008 19:36:36 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSSD.02 to call new GetInstance Message-ID: # HG changeset patch # User Guolian Yun # Date 1224470190 25200 # Node ID d83baa71965d37027e1ef08ab79c72c177c0f9b7 # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 [TEST] Update VSSD.02 to call new GetInstance Signed-off-by: Guolian Yun diff -r a3d9c0a81c27 -r d83baa71965d suites/libvirt-cim/cimtest/VSSD/02_bootldr.py --- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Sun Oct 19 19:36:30 2008 -0700 @@ -60,8 +60,8 @@ def main(): try: key_list = { 'InstanceID' : instIdval } - system = enumclass.getInstance(options.ip, \ - enumclass.Xen_VirtualSystemSettingData, key_list) + system = enumclass.GetInstance(options.ip, \ + "Xen_VirtualSystemSettingData", key_list) name = system.ElementName if name == test_dom : From yunguol at cn.ibm.com Mon Oct 20 02:39:54 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 19 Oct 2008 19:39:54 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Remove old enumerate* and getInstance in enumclass.py and device.py Message-ID: # HG changeset patch # User Guolian Yun # Date 1224470389 25200 # Node ID b87d80615bb3765161d2295e3cefc14c4152fdf2 # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 [TEST] Remove old enumerate* and getInstance in enumclass.py and device.py Signed-off-by: Guolian Yun diff -r a3d9c0a81c27 -r b87d80615bb3 suites/libvirt-cim/lib/XenKvmLib/devices.py --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Sun Oct 19 19:39:49 2008 -0700 @@ -101,36 +101,6 @@ def get_class(classname): def get_class(classname): return eval(classname) -def enumerate(server, basetype, keys, virt='Xen'): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - list = [] - - #FIXME - Remove once all tests are converted for KVM - basetype = basetype.split('_', 1)[-1] - - devtype = eval(get_typed_class(virt, basetype)) - try: - names = conn.EnumerateInstanceNames(devtype.__name__) - except pywbem.CIMError, arg: - raise Exception("%s" % arg[1]) - return list - - for name in names: - key_list = {} - for item in keys: - key_list[item] = name.keybindings[item] - - if len(key_list) == 0: - return list - - list.append(devtype(server, key_list)) - - return list - - def device_of(server, key_list): t = eval(key_list["CreationClassName"]) diff -r a3d9c0a81c27 -r b87d80615bb3 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Oct 15 19:13:10 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Sun Oct 19 19:39:49 2008 -0700 @@ -363,69 +363,6 @@ class LXC_VirtualSystemManagementService # ex: Xen_RegisteredProfile # keyname = The keyvalue # ex: InstanceID in case of Xen_RegisteredProfile -def enumerate_inst(server, classname, virt="Xen"): - classname = "%s" % classname - new_classname = classname.split('_') - if len(new_classname) == 2: - classname = new_classname[1] - classname = eval(get_typed_class(virt, classname)) - instances = [] - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - instances = conn.EnumerateInstances(classname.__name__) - except pywbem.CIMError, arg: - print arg[1] - return [] - - return instances - -def enumerate(server, basename, keys, virt="Xen"): - #FIXME - Remove once all tests are converted for KVM - basename = "%s" % basename - new_base = basename.split('_') - if len(new_base) == 2: - basename = new_base[1] - - classname = eval(get_typed_class(virt, basename)) - instances = enumerate_inst(server, classname, virt) - - list = [] - - for instance in instances: - key_list = {} - for item in keys: - key_list[item] = instance[item] - - if len(key_list) == 0: - return list - - list.append(classname(server, key_list)) - - return list - -def getInstance(server, basename, keys, virt="Xen"): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - #FIXME - Remove once all tests are converted for KVM - basename = "%s" % basename - new_base = basename.split('_') - if len(new_base) == 2: - basename = new_base[1] - - classname = eval(get_typed_class(virt, basename)) - try: - inst = classname(server, keys) - - except pywbem.CIMError, arg: - print arg[1] - return None - - return inst class CIM_CimtestClass(CIM_Instance): def __init__(self, host, ref): From yunguol at cn.ibm.com Mon Oct 20 02:57:46 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 20 Oct 2008 10:57:46 +0800 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Oct 20 2008 Message-ID: ================================================= Xen on Pegasus Test Run Summary for Oct 20 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: 720 Libvirt-cim changeset: 0f39ab1ee830 ================================================= FAIL : 2 XFAIL : 0 SKIP : 3 PASS : 131 ----------------- Total : 136 ================================================= FAIL Test Summary: VSSD - 02_bootldr.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.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: 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: 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 - AttributeError : 'str' object has no attribute 'Bootloader' Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 116, in do_try File "02_bootldr.py", line 50, in main xmlfile.set_bootloader(options.ip, gtype=0) File "./lib/XenKvmLib/vxml.py", line 567, in set_bootloader AttributeError: 'str' object has no attribute 'Bootloader' ERROR - None -------------------------------------------------------------------- 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: FAIL ERROR - limit is 0, expected 256 ERROR - rstest_domain CPU scheduling not set properly -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.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 deeptik at linux.vnet.ibm.com Mon Oct 20 06:09:32 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Oct 2008 11:39:32 +0530 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Oct 20 2008 Message-ID: <48FC209C.4010601@linux.vnet.ibm.com> ================================================= KVM on Pegasus Test Run Summary for Oct 20 2008 ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.6 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 720 Libvirt-cim changeset: 0f39ab1ee830 ================================================= FAIL : 0 XFAIL : 2 SKIP : 6 PASS : 128 ----------------- Total : 136 ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP 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: 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: 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: 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: 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 -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.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 -------------------------------------------------------------------- Thanks and Regards, Deepti. From yunguol at cn.ibm.com Mon Oct 20 07:09:53 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 20 Oct 2008 15:09:53 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 20 2008 Message-ID: ================================================= KVM on sfcb Test Run Summary for Oct 20 2008 ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 715+ Libvirt-cim changeset: f7dfc83a73ac+ ================================================= FAIL : 1 XFAIL : 2 SKIP : 6 PASS : 127 ----------------- Total : 136 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP 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: 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: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - Exception: (1, u'Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): Domain Operation Failed Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Exception: (1, u'Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'test_domain' using RequestedStateChange() 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: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: FAIL ERROR - Exception: not enough arguments for format string Got indication: KVM_ComputerSystemCreatedIndication ERROR - Received indication error: 256 ERROR - Exception: not enough arguments for format string Got indication: KVM_ComputerSystemCreatedIndication ERROR - Received indication error: 256 -------------------------------------------------------------------- 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: 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 -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Oct 20 07:33:30 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Oct 2008 13:03:30 +0530 Subject: [Libvirt-cim] XenFV on Pegasus Test Run Summary for Oct 20 2008 Message-ID: <48FC344A.4010404@linux.vnet.ibm.com> ================================================= XenFV on Pegasus Test Run Summary for Oct 20 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: 720 Libvirt-cim changeset: 0f39ab1ee830 ================================================= FAIL : 6 XFAIL : 0 SKIP : 4 PASS : 126 ----------------- Total : 136 ================================================= FAIL Test Summary: ComputerSystem - 03_defineVS.py: FAIL ElementSettingData - 01_forward.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL HostSystem - 04_hs_to_EAPF.py: FAIL LogicalDisk - 01_disk.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.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: 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 -------------------------------------------------------------------- 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: FAIL ERROR - Expected at least one Xen_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 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: FAIL ERROR - DEBUG host_name is elm3b217.beaverton.ibm.com ERROR - Xen_ElementAllocatedFromPool returned 0 Xen_DiskPool objects CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: FAIL ERROR - CIMError : (6, u'CIM_ERR_NOT_FOUND: No such instance (no domain for test_domain/hda)') Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 116, in do_try File "01_disk.py", line 56, in main dev = eval('devices.' + get_typed_class(options.virt, "LogicalDisk"))(options.ip, key_list) File "./lib/XenKvmLib/devices.py", line 55, in __init__ CIMError: (6, u'CIM_ERR_NOT_FOUND: No such instance (no domain for test_domain/hda)') ERROR - None -------------------------------------------------------------------- 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: 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: FAIL ERROR - limit is 0, expected 256 ERROR - rstest_domain CPU scheduling not set properly -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.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 -------------------------------------------------------------------- Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Mon Oct 20 07:46:39 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Oct 2008 13:16:39 +0530 Subject: [Libvirt-cim] Re: XenFV on Pegasus Test Run Summary for Oct 20 2008 In-Reply-To: <48FC344A.4010404@linux.vnet.ibm.com> References: <48FC344A.4010404@linux.vnet.ibm.com> Message-ID: <48FC375F.9020208@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > XenFV on Pegasus Test Run Summary for Oct 20 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: 720 > Libvirt-cim changeset: 0f39ab1ee830 > ================================================= > FAIL : 6 > XFAIL : 0 > SKIP : 4 > PASS : 126 > ----------------- > Total : 136 > ================================================= > FAIL Test Summary: > ComputerSystem - 03_defineVS.py: FAIL > ElementSettingData - 01_forward.py: FAIL > HostSystem - 02_hostsystem_to_rasd.py: FAIL > HostSystem - 04_hs_to_EAPF.py: FAIL > LogicalDisk - 01_disk.py: FAIL All the above passed when run manually. > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL > This one failed as the virsh schedinfo is returning 0 for cap value, while the test case is expecting a limit value of 256. virsh schedinfo rstest_domain Scheduler : credit weight : 256 cap : 0 Should we replace the use of virsh and use GetInstance on ProcRASD to verify the values? Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Mon Oct 20 13:13:34 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Oct 2008 18:43:34 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update vsmigrations.py to call new EnumInstances In-Reply-To: <98291a8279946f37be3e.1224468412@elm3b217.beaverton.ibm.com> References: <98291a8279946f37be3e.1224468412@elm3b217.beaverton.ibm.com> Message-ID: <48FC83FE.60201@linux.vnet.ibm.com> +1 for me yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224468407 25200 > # Node ID 98291a8279946f37be3e74f467e32c39e927bde7 > # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 > [TEST] Update vsmigrations.py to call new EnumInstances > > Signed-off-by: Guolian Yun > > diff -r a3d9c0a81c27 -r 98291a827994 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Oct 19 19:06:47 2008 -0700 > @@ -108,10 +108,7 @@ def get_migration_job_instance(ip, virt, > key_list = ["instanceid"] > mig_job_cn = get_typed_class(virt, 'MigrationJob') > try: > - job = enumclass.enumerate(ip, > - mig_job_cn, > - key_list, > - virt=virt) > + job = enumclass.EnumInstances(ip, mig_job_cn) > except Exception, details: > logger.error(CIM_ERROR_ENUMERATE, mig_job_cn) > logger.error(details) > > _______________________________________________ > 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 Oct 20 13:21:01 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Oct 2008 18:51:01 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update all tc to call new GetInstance In-Reply-To: <0ebf9d140faab8bee880.1224469719@elm3b217.beaverton.ibm.com> References: <0ebf9d140faab8bee880.1224469719@elm3b217.beaverton.ibm.com> Message-ID: <48FC85BD.1030403@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224469713 25200 > # Node ID 0ebf9d140faab8bee8802ecf5f2de8a30286ff0c > # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 > [TEST] Update all tc to call new GetInstance > > Signed-off-by: Guolian Yun > > diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Sun Oct 19 19:28:33 2008 -0700 > @@ -73,12 +73,12 @@ def main(): > if not ret : > logger.error("ERROR: VS %s was not defined" % test_dom) > return status > - > + cs_class = get_typed_class(options.virt, 'ComputerSystem') > keys = { > 'Name' : test_dom, > - 'CreationClassName' : get_typed_class(options.virt, 'ComputerSystem') > + 'CreationClassName' : cs_class > } > - cs = enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) > + cs = enumclass.GetInstance(options.ip, cs_class, keys) > > if cs.Name == test_dom: > from_State = cs.EnabledState > @@ -101,7 +101,7 @@ def main(): > > #Get the value of the EnabledState property and RequestedState property. > try: > - cs= enumclass.getInstance(options.ip, 'ComputerSystem', keys, options.virt) > + cs= enumclass.GetInstance(options.ip, cs_class, keys) > if cs.Name == test_dom: > to_RequestedState = cs.RequestedState > enabledState = cs.EnabledState > diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/01_forward.py Sun Oct 19 19:28:33 2008 -0700 > @@ -45,7 +45,7 @@ from XenKvmLib.assoc import Associators > from XenKvmLib.assoc import Associators > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib import devices > -from XenKvmLib.enumclass import getInstance > +from XenKvmLib.enumclass import GetInstance > from CimTest.Globals import CIM_ERROR_ASSOCIATORS, CIM_ERROR_GETINSTANCE > from XenKvmLib.vxml import get_class > from XenKvmLib.classes import get_typed_class > @@ -61,16 +61,17 @@ test_vcpus = 1 > test_vcpus = 1 > > def get_inst(server, virt, cn, key_list): > + cn_name = get_typed_class(virt, cn) > inst = None > try: > - inst = getInstance(server, cn, key_list, virt) > + inst = GetInstance(server, cn_name, key_list) > > except Exception, details: > logger.error("Exception %s" % details) > return None > > if inst is None: > - logger.error("Expected at least one %s instance" % cn) > + logger.error("Expected at least one %s instance" % cn_name) > return None > > return inst > diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Sun Oct 19 19:28:33 2008 -0700 > @@ -34,7 +34,7 @@ from CimTest.Globals import logger, CIM_ > CIM_ERROR_ASSOCIATORNAMES > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, SKIP > -from XenKvmLib.enumclass import getInstance > +from XenKvmLib.enumclass import GetInstance > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > test_dom = "dom_elecap" > @@ -94,8 +94,7 @@ def verify_service(inst_list, ip, virt, > 'SystemCreationClassName' : host_ccn > } > try: > - basename = get_class_basename(ser_cn) > - service = getInstance(ip, basename, keys, virt) > + service = GetInstance(ip, ser_cn, keys) > except Exception, detail: > logger.error(CIM_ERROR_GETINSTANCE, ser_cn) > logger.error("Exeption : %s", detail) > diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py > --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/01_forward.py Sun Oct 19 19:28:33 2008 -0700 > @@ -73,13 +73,11 @@ def setup_env(server, virt): > return PASS, vsxml, test_disk > > def get_instance(server, pool, list, virt='Xen'): > + pool_cn = get_typed_class(virt, pool) > try: > - inst = enumclass.getInstance(server, > - pool, > - list, > - virt) > + inst = enumclass.GetInstance(server, pool_cn, list) > except Exception: > - logger.error(Globals.CIM_ERROR_GETINSTANCE % pool) > + logger.error(Globals.CIM_ERROR_GETINSTANCE % pool_cn) > return FAIL, inst > > return PASS, inst > diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/02_reverse.py Sun Oct 19 19:28:33 2008 -0700 > @@ -105,7 +105,7 @@ def get_rasd_instance(server, virt, key_ > def get_rasd_instance(server, virt, key_list, cn): > inst = None > try: > - inst = enumclass.getInstance(server, cn, key_list, virt) > + inst = enumclass.GetInstance(server, cn, key_list) > except Exception, details: > logger.error(Globals.CIM_ERROR_GETINSTANCE, cn) > logger.error("Exception details: %s", details) > diff -r a3d9c0a81c27 -r 0ebf9d140faa suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py > --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Sun Oct 19 19:28:33 2008 -0700 > @@ -78,7 +78,7 @@ def get_or_bail(virt, ip, id, pool_class > """ > key_list = { 'InstanceID' : id } > try: > - instance = enumclass.getInstance(ip, pool_class, key_list, virt) > + instance = enumclass.GetInstance(ip, pool_class, key_list) > except Exception, detail: > logger.error(CIM_ERROR_GETINSTANCE, '%s' % pool_class) > logger.error("Exception: %s", detail) > @@ -123,8 +123,7 @@ def init_list(virt, pool): > > def get_pool_info(virt, server, devid, poolname=""): > pool_cname = get_typed_class(virt, poolname) > - pool_cn = eval("enumclass." + pool_cname) > - return get_or_bail(virt, server, id=devid, pool_class=pool_cn) > + return get_or_bail(virt, server, id=devid, pool_class=pool_cname) > > def get_pool_details(virt, server): > dpool = npool = mpool = ppool = None > > _______________________________________________ > 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 Oct 20 13:29:37 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Oct 2008 18:59:37 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSSD.02 to call new GetInstance In-Reply-To: References: Message-ID: <48FC87C1.5060307@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224470190 25200 > # Node ID d83baa71965d37027e1ef08ab79c72c177c0f9b7 > # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 > [TEST] Update VSSD.02 to call new GetInstance > > Signed-off-by: Guolian Yun > > diff -r a3d9c0a81c27 -r d83baa71965d suites/libvirt-cim/cimtest/VSSD/02_bootldr.py > --- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Sun Oct 19 19:36:30 2008 -0700 > @@ -60,8 +60,8 @@ def main(): > > try: > key_list = { 'InstanceID' : instIdval } > - system = enumclass.getInstance(options.ip, \ > - enumclass.Xen_VirtualSystemSettingData, key_list) > + system = enumclass.GetInstance(options.ip, \ > + "Xen_VirtualSystemSettingData", key_list) > You can remove the slash here. Also, can you remove the keyname variable in the tc which is not at all used anywhere for the verification. The tc fails with the following error for Xen: VSSD - 02_bootldr.py: FAIL ERROR - AttributeError : 'str' object has no attribute 'Bootloader' Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 116, in do_try File "02_bootldr.py", line 50, in main xmlfile.set_bootloader(options.ip, gtype=0) File "./lib/XenKvmLib/vxml.py", line 567, in set_bootloader AttributeError: 'str' object has no attribute 'Bootloader' ERROR - None > name = system.ElementName > if name == test_dom : > > _______________________________________________ > 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 Oct 20 13:35:30 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Oct 2008 19:05:30 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Remove old enumerate* and getInstance in enumclass.py and device.py In-Reply-To: References: Message-ID: <48FC8922.2050602@linux.vnet.ibm.com> +1 for me. Did you try to run the tc in the batch mode and verify if all the affected tc have been changed. Thanks and Regards, Deepti. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224470389 25200 > # Node ID b87d80615bb3765161d2295e3cefc14c4152fdf2 > # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 > [TEST] Remove old enumerate* and getInstance in enumclass.py and device.py > > Signed-off-by: Guolian Yun > > diff -r a3d9c0a81c27 -r b87d80615bb3 suites/libvirt-cim/lib/XenKvmLib/devices.py > --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Sun Oct 19 19:39:49 2008 -0700 > @@ -101,36 +101,6 @@ def get_class(classname): > def get_class(classname): > return eval(classname) > > -def enumerate(server, basetype, keys, virt='Xen'): > - conn = pywbem.WBEMConnection('http://%s' % server, > - (Globals.CIM_USER, Globals.CIM_PASS), > - Globals.CIM_NS) > - > - list = [] > - > - #FIXME - Remove once all tests are converted for KVM > - basetype = basetype.split('_', 1)[-1] > - > - devtype = eval(get_typed_class(virt, basetype)) > - try: > - names = conn.EnumerateInstanceNames(devtype.__name__) > - except pywbem.CIMError, arg: > - raise Exception("%s" % arg[1]) > - return list > - > - for name in names: > - key_list = {} > - for item in keys: > - key_list[item] = name.keybindings[item] > - > - if len(key_list) == 0: > - return list > - > - list.append(devtype(server, key_list)) > - > - return list > - > - > def device_of(server, key_list): > t = eval(key_list["CreationClassName"]) > > diff -r a3d9c0a81c27 -r b87d80615bb3 suites/libvirt-cim/lib/XenKvmLib/enumclass.py > --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Oct 15 19:13:10 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Sun Oct 19 19:39:49 2008 -0700 > @@ -363,69 +363,6 @@ class LXC_VirtualSystemManagementService > # ex: Xen_RegisteredProfile > # keyname = The keyvalue > # ex: InstanceID in case of Xen_RegisteredProfile > -def enumerate_inst(server, classname, virt="Xen"): > - classname = "%s" % classname > - new_classname = classname.split('_') > - if len(new_classname) == 2: > - classname = new_classname[1] > - classname = eval(get_typed_class(virt, classname)) > - instances = [] > - conn = pywbem.WBEMConnection('http://%s' % server, > - (Globals.CIM_USER, Globals.CIM_PASS), > - Globals.CIM_NS) > - > - try: > - instances = conn.EnumerateInstances(classname.__name__) > - except pywbem.CIMError, arg: > - print arg[1] > - return [] > - > - return instances > - > -def enumerate(server, basename, keys, virt="Xen"): > - #FIXME - Remove once all tests are converted for KVM > - basename = "%s" % basename > - new_base = basename.split('_') > - if len(new_base) == 2: > - basename = new_base[1] > - > - classname = eval(get_typed_class(virt, basename)) > - instances = enumerate_inst(server, classname, virt) > - > - list = [] > - > - for instance in instances: > - key_list = {} > - for item in keys: > - key_list[item] = instance[item] > - > - if len(key_list) == 0: > - return list > - > - list.append(classname(server, key_list)) > - > - return list > - > -def getInstance(server, basename, keys, virt="Xen"): > - conn = pywbem.WBEMConnection('http://%s' % server, > - (Globals.CIM_USER, Globals.CIM_PASS), > - Globals.CIM_NS) > - > - #FIXME - Remove once all tests are converted for KVM > - basename = "%s" % basename > - new_base = basename.split('_') > - if len(new_base) == 2: > - basename = new_base[1] > - > - classname = eval(get_typed_class(virt, basename)) > - try: > - inst = classname(server, keys) > - > - except pywbem.CIMError, arg: > - print arg[1] > - return None > - > - return inst > > class CIM_CimtestClass(CIM_Instance): > def __init__(self, host, ref): > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From danms at us.ibm.com Mon Oct 20 14:27:59 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 20 Oct 2008 07:27:59 -0700 Subject: [Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection In-Reply-To: (Richard Maciel's message of "Fri, 17 Oct 2008 16:40:53 -0700") References: Message-ID: <874p37l4sw.fsf@caffeine.danplanet.com> RM> - -lVirt_DevicePool RM> + -lVirt_DevicePool \ RM> + -lVirt_ConsoleRedirectionService \ RM> + -lVirt_ConsoleRedirectionServiceCapabilities You're using spaces (correct) for the first added line and tabs (incorrect) for the last two. RM> + } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) { RM> + s = get_console_rs_caps(_BROKER, ref, &_inst, true); RM> + RM> + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) RM> + goto out; You need a space between your 'if' and your '('. While you're at it, you might as well remove the blank line between the get_console_rs_caps() and the if statement, to be consistent with the rest of the function :) RM> @@ -100,7 +109,6 @@ RM> char* classname; RM> classname = class_base_name(CLASSNAME(ref)); RM> - RM> if (STREQC(classname, "VirtualSystemManagementService")) { RM> s = get_vsms(ref, &_inst, _BROKER, context, true); RM> if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) Please don't make arbitrary whitespace changes in the middle of a patch. RM> @@ -113,6 +121,14 @@ RM> goto out; RM> s = get_migration_caps(ref, &_inst, _BROKER, false); RM> + } else if (STREQC(classname, "ConsoleRedirectionService")) { RM> + s = get_console_rs(ref, &_inst, _BROKER, context, true); RM> + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) Same problem with your 'if' here. RM> + goto out; RM> + RM> + s = get_console_rs_caps(_BROKER, ref, &_inst, false); RM> + if((s.rc != CMPI_RC_OK) || (_inst == NULL)) RM> + goto out; You don't need this check, as the status is returned as part of the function. Please remove it to be consistent with the rest of the function. RM> @@ -382,22 +398,28 @@ RM> "Xen_HostSystem", RM> "Xen_VirtualSystemManagementService", RM> "Xen_VirtualSystemMigrationService", RM> + "Xen_ConsoleRedirectionService", RM> "KVM_HostSystem", RM> "KVM_VirtualSystemManagementService", RM> "KVM_VirtualSystemMigrationService", RM> + "KVM_ConsoleRedirectionService", RM> "LXC_HostSystem", RM> "LXC_VirtualSystemManagementService", RM> "LXC_VirtualSystemMigrationService", RM> + "LXC_ConsoleRedirectionService", RM> NULL RM> }; RM> static char *host_caps[] = { RM> "Xen_VirtualSystemManagementCapabilities", RM> "Xen_VirtualSystemMigrationCapabilities", RM> + "Xen_ConsoleRedirectionServiceCapabilities", RM> "KVM_VirtualSystemManagementCapabilities", RM> "KVM_VirtualSystemMigrationCapabilities", RM> + "KVM_ConsoleRedirectionServiceCapabilities", RM> "LXC_VirtualSystemManagementCapabilities", RM> "LXC_VirtualSystemMigrationCapabilities", RM> + "LXC_ConsoleRedirectionServiceCapabilities", RM> NULL, RM> }; RM> @@ -434,6 +456,9 @@ RM> "Xen_VirtualSystemMigrationService", RM> "KVM_VirtualSystemMigrationService", RM> "LXC_VirtualSystemMigrationService", RM> + "Xen_ConsoleRedirectionService", RM> + "KVM_ConsoleRedirectionService", RM> + "LXC_ConsoleRedirectionService", RM> NULL RM> }; These are still using tabs instead of spaces. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From deeptik at linux.vnet.ibm.com Mon Oct 20 14:37:19 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 20 Oct 2008 20:07:19 +0530 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 20 2008 In-Reply-To: References: Message-ID: <48FC979F.2030408@linux.vnet.ibm.com> Guo Lian Yun wrote: > > ================================================= > KVM on sfcb Test Run Summary for Oct 20 2008 > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 715+ The latest revision is 720. Did you install the new sources before running the tests? Thanks and Regards, Deepti. From kaitlin at linux.vnet.ibm.com Mon Oct 20 15:13:22 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Oct 2008 08:13:22 -0700 Subject: [Libvirt-cim] Re: XenFV on Pegasus Test Run Summary for Oct 20 2008 In-Reply-To: <48FC375F.9020208@linux.vnet.ibm.com> References: <48FC344A.4010404@linux.vnet.ibm.com> <48FC375F.9020208@linux.vnet.ibm.com> Message-ID: <48FCA012.8020004@linux.vnet.ibm.com> >> ================================================= >> FAIL Test Summary: >> ComputerSystem - 03_defineVS.py: FAIL >> ElementSettingData - 01_forward.py: FAIL >> HostSystem - 02_hostsystem_to_rasd.py: FAIL >> HostSystem - 04_hs_to_EAPF.py: FAIL >> LogicalDisk - 01_disk.py: FAIL > All the above passed when run manually. These look like they are failing due to the libvirt caching issue. Calling cim_define() instead of define() will probably fix the issue. >> VirtualSystemManagementService - 09_procrasd_persist.py: FAIL >> > This one failed as the virsh schedinfo is returning 0 for cap value, > while the test case is expecting a limit value of 256. > > virsh schedinfo rstest_domain > Scheduler : credit > weight : 256 > cap : 0 > > Should we replace the use of virsh and use GetInstance on ProcRASD to > verify the values? Yes, this test should be using the values from the ProcRASD to verify. The ProcRASD instance and virsh should report the same value, so changing this most likely won't fix the test failure. However, it would be a good change to make. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Oct 20 20:38:20 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Oct 2008 13:38:20 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Remove old enumerate* and getInstance in enumclass.py and device.py In-Reply-To: References: Message-ID: <48FCEC3C.3030407@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224470389 25200 > # Node ID b87d80615bb3765161d2295e3cefc14c4152fdf2 > # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 > [TEST] Remove old enumerate* and getInstance in enumclass.py and device.py > > Signed-off-by: Guolian Yun > When I attempt to run the test suite with this patch applied, I get the following error: Traceback (most recent call last): File "main.py", line 40, in from XenKvmLib.common_util import create_netpool_conf, destroy_netpool, \ File "./lib/XenKvmLib/common_util.py", line 41, in from XenKvmLib.enumclass import getInstance ImportError: cannot import name getInstance Also, you'll want to remove the following from enumclass.py: CIM_MyClass Linux_ComputerSystem All other CIM_* class definitions From devices.py, you'll want to remove: CIM_Instance CIM_LogicalDevice All of the other CIM_* class definitions get_class() definition Be sure to run cimtest to make sure none of the tests fail after these pieces are removed. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 21 01:59:02 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Oct 2008 18:59:02 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] Update KVMRedirectionSAP to return avail sessions Message-ID: This updated uses the listening / established port entries in /proc/net/tcp to determine whether a guest has any available / enabled VNC sessions. From kaitlin at linux.vnet.ibm.com Tue Oct 21 01:59:04 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Oct 2008 18:59:04 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] Add get_vnc_sessions() to determine all of the VNC ports available or in use In-Reply-To: Message-ID: <6d537f5e2b65c5d04963.1224554344@localhost.localdomain> # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224552270 25200 # Node ID 6d537f5e2b65c5d04963e9ff4e44e74c1e22b494 # Parent 155077ac9e3ca778dc8564aa86e991f24f373e7e Add get_vnc_sessions() to determine all of the VNC ports available or in use. Create a hash table where the port_value % 5900 is the has key. Signed-off-by: Kaitlin Rupert diff -r 155077ac9e3c -r 6d537f5e2b65 src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:28 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 @@ -109,6 +109,52 @@ return 1; } +static size_t get_vnc_hash_key(unsigned int key) +{ + return key % VNC_PORT_MIN; +} + +static CMPIStatus port_to_str(unsigned int port, + char **port_str) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (asprintf(port_str, "%" PRIu16, port) == -1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to determine session port"); + } + + return s; +} + +static CMPIStatus port_convert(unsigned int port, + char *in_str, + int *out_port) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + char *str = NULL; + + if (in_str == NULL) { + s = port_to_str(port, &str); + if (s.rc != CMPI_RC_OK) + goto out; + } else + str = strdup(in_str); + + *out_port = strtol(str, NULL, 0); + if ((*out_port == LONG_MIN) || (*out_port == LONG_MAX)) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to get port value"); + } + + out: + free(str); + + return s; +} + static int inst_from_dom(const CMPIBroker *broker, const CMPIObjectPath *ref, struct domain *dominfo, @@ -197,6 +243,68 @@ return inst; } +static CMPIStatus get_vnc_sessions(struct vnc_ports *vnc_hash[]) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *path = PROC_TCP; + unsigned int lport = 0; + unsigned int rport = 0; + FILE *tcp_info; + char *line = NULL; + size_t len = 0; + char *remote_port; + int local_port; + int index; + int val; + int ret; + + tcp_info = fopen(path, "r"); + if (tcp_info== NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to open %s: %m", tcp_info); + goto out; + } + + if (getline(&line, &len, tcp_info) == -1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to read from %s", tcp_info); + goto out; + } + + while (getline(&line, &len, tcp_info) > 0) { + ret = sscanf(line, "%d: %*[^:]:%X %*[^:]:%X", &val, &lport, + &rport); + if (ret != 3) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to determine active sessions"); + goto out; + } + + s = port_convert(lport, NULL, &local_port); + if (s.rc != CMPI_RC_OK) + goto out; + + if ((local_port < VNC_PORT_MIN) || (local_port > VNC_PORT_MAX)) + continue; + + s = port_to_str(rport, &remote_port); + if (s.rc != CMPI_RC_OK) + goto out; + + index = get_vnc_hash_key(local_port); + + vnc_list_add(vnc_hash[index], remote_port); + free(remote_port); + } + + out: + fclose(tcp_info); + return s; +} + static bool check_graphics(virDomainPtr dom, struct domain **dominfo) { @@ -225,6 +333,7 @@ virDomainPtr *domain_list; struct domain *dominfo = NULL; struct inst_list list; + struct vnc_ports* vnc_hash[HASH_SIZE]; int count; int i; @@ -233,6 +342,7 @@ return s; inst_list_init(&list); + vnc_list_init(vnc_hash); count = get_domain_list(conn, &domain_list); if (count < 0) { @@ -242,6 +352,10 @@ goto out; } else if (count == 0) goto out; + + s = get_vnc_sessions(vnc_hash); + if (s.rc != CMPI_RC_OK) + goto out; for (i = 0; i < count; i++) { CMPIInstance *inst = NULL; @@ -269,6 +383,7 @@ out: free(domain_list); inst_list_free(&list); + vnc_list_free(vnc_hash); return s; } From kaitlin at linux.vnet.ibm.com Tue Oct 21 01:59:03 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Oct 2008 18:59:03 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] Add vnc_ports struct and functions for building a list of ports In-Reply-To: Message-ID: <155077ac9e3ca778dc85.1224554343@localhost.localdomain> # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224552268 25200 # Node ID 155077ac9e3ca778dc8564aa86e991f24f373e7e # Parent f0a209b602e707305a713611097310ec503451df Add vnc_ports struct and functions for building a list of ports. Signed-off-by: Kaitlin Rupert diff -r f0a209b602e7 -r 155077ac9e3c src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Wed Oct 08 09:13:55 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:28 2008 -0700 @@ -39,7 +39,75 @@ #include "Virt_KVMRedirectionSAP.h" +#define PROC_TCP "/proc/net/tcp" +#define VNC_PORT_MIN 5900 +#define VNC_PORT_MAX 5999 +#define HASH_SIZE 128 + const static CMPIBroker *_BROKER; + +struct vnc_ports { + char **list; + unsigned int max; + unsigned int cur; +}; + +static int resize(struct vnc_ports *list, int newmax) +{ + char **newlist; + int i; + + newlist = realloc(list->list, newmax * sizeof(char *)); + if (!newlist) + return 0; + + list->max = newmax; + list->list = newlist; + + for (i = list->cur; i < list->max; i++) + list->list[i] = NULL; + + return 1; +} + +static void vnc_list_init(struct vnc_ports *vnc_hash[]) +{ + int i; + + for (i = 0; i < HASH_SIZE; i++) { + vnc_hash[i] = malloc(sizeof(struct vnc_ports)); + vnc_hash[i]->list = NULL; + vnc_hash[i]->cur = vnc_hash[i]->max = 0; + } +} + +static void vnc_list_free(struct vnc_ports *vnc_hash[]) +{ + int i; + + for (i = 0; i < HASH_SIZE; i++) { + if (vnc_hash[i]->list != NULL) + free(vnc_hash[i]->list); + } + vnc_list_init(vnc_hash); +} + +static int vnc_list_add(struct vnc_ports *list, char *port) +{ + if ((list->cur + 1) >= list->max) { + int ret; + + ret = resize(list, list->max + 5); + + if (!ret) + return 0; + } + + list->list[list->cur] = strdup(port); + list->cur++; + + return 1; +} static int inst_from_dom(const CMPIBroker *broker, const CMPIObjectPath *ref, From kaitlin at linux.vnet.ibm.com Tue Oct 21 01:59:06 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Oct 2008 18:59:06 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] Have get_console_sap_by_name() parse Name attribute to determine session status In-Reply-To: Message-ID: # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224553245 25200 # Node ID c41bd7c3175a970f7c674931ee27ef2a88b63b61 # Parent d62634a3121f2991ed800491b2966ed9b531d4c3 Have get_console_sap_by_name() parse Name attribute to determine session status Signed-off-by: Kaitlin Rupert diff -r d62634a3121f -r c41bd7c3175a src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:40:44 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:40:45 2008 -0700 @@ -113,6 +113,33 @@ static size_t get_vnc_hash_key(unsigned int key) { return key % VNC_PORT_MIN; +} + +static int parse_sap_name(const char *name, + char **guest, + char **port, + char **remote_port) +{ + int ret; + + ret = sscanf(name, "%a[^/]/%a[^:]:%as", + guest, + port, + remote_port); + + if (ret != 3) { + free(*guest); + free(*port); + free(*remote_port); + + *guest = NULL; + *port = NULL; + *remote_port = NULL; + + return 0; + } + + return 1; } static CMPIStatus port_to_str(unsigned int port, @@ -459,14 +486,18 @@ CMPIStatus get_console_sap_by_name(const CMPIBroker *broker, const CMPIObjectPath *ref, - const char *name, + const char *id, CMPIInstance **_inst) { virConnectPtr conn; - virDomainPtr dom; + virDomainPtr dom = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; struct domain *dominfo = NULL; + char *name = NULL; + char *port = NULL; + char *remote_port = NULL; + int ret; conn = connect_by_classname(broker, CLASSNAME(ref), &s); if (conn == NULL) { @@ -476,6 +507,14 @@ goto out; } + ret = parse_sap_name(id, &name, &port, &remote_port); + if (ret != 1) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to parse instance name"); + goto out; + } + dom = virDomainLookupByName(conn, name); if (dom == NULL) { cu_statusf(broker, &s, @@ -489,19 +528,21 @@ cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "No console device for this guest"); + + goto out; } - inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); - - virDomainFree(dom); - - if (s.rc != CMPI_RC_OK) - goto out; + inst = get_console_sap(_BROKER, ref, conn, dominfo, remote_port, &s); *_inst = inst; out: + virDomainFree(dom); virConnectClose(conn); + + free(name); + free(port); + free(remote_port); return s; } @@ -512,16 +553,16 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; - const char *sys = NULL; + const char *id = NULL; - if (cu_get_str_path(reference, "System", &sys) != CMPI_RC_OK) { + if (cu_get_str_path(reference, "System", &id) != CMPI_RC_OK) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, - "No such instance (System)"); + "No such instance (Name)"); goto out; } - s = get_console_sap_by_name(broker, reference, sys, &inst); + s = get_console_sap_by_name(broker, reference, id, &inst); if (s.rc != CMPI_RC_OK) goto out; From kaitlin at linux.vnet.ibm.com Tue Oct 21 01:59:05 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Oct 2008 18:59:05 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] Return active/available/inactive console session In-Reply-To: Message-ID: # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224553244 25200 # Node ID d62634a3121f2991ed800491b2966ed9b531d4c3 # Parent 6d537f5e2b65c5d04963e9ff4e44e74c1e22b494 Return active/available/inactive console session Instead of one session per guest. Changes: -Change Name attribute so that is is formatted in the following way: "guest_name/guest_port:remote_port" -Check /proc/net/tcp for listening / enabled ports Signed-off-by: Kaitlin Rupert diff -r 6d537f5e2b65 -r d62634a3121f src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:40:44 2008 -0700 @@ -23,6 +23,7 @@ #include #include #include +#include #include "cmpidt.h" #include "cmpift.h" @@ -155,21 +156,25 @@ return s; } -static int inst_from_dom(const CMPIBroker *broker, - const CMPIObjectPath *ref, - struct domain *dominfo, - CMPIInstance *inst) +static CMPIStatus inst_from_dom(const CMPIBroker *broker, + const CMPIObjectPath *ref, + struct domain *dominfo, + char *remote_port, + CMPIInstance *inst) { + CMPIStatus s = {CMPI_RC_OK, NULL}; char *sccn = NULL; char *id = NULL; char *pfx = NULL; uint16_t prop_val; - int ret = 1; + int val; - if (asprintf(&id, "%s:%s", dominfo->name, - dominfo->dev_graphics->dev.graphics.type) == -1) { - CU_DEBUG("Unable to format name"); - ret = 0; + if (asprintf(&id, "%s/%s:%s", dominfo->name, + dominfo->dev_graphics->dev.graphics.port, + remote_port) == -1) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to format instance name"); goto out; } @@ -196,11 +201,22 @@ CMSetProperty(inst, "KVMProtocol", (CMPIValue *)&prop_val, CMPI_uint16); - /* Need to replace this with a check that determines whether - the console session is enabled (in use) or available (not actively - in use). - */ - prop_val = (uint16_t)CIM_CRS_ENABLED_STATE; + s = port_convert(0, dominfo->dev_graphics->dev.graphics.port, &val); + if (s.rc != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to format session port"); + goto out; + } + + /* If port is < 0, the session is inactive. */ + if (val < 0) + prop_val = (uint16_t)CIM_SAP_INACTIVE_STATE; + else if (STREQ(remote_port, "0")) + prop_val = (uint16_t)CIM_SAP_AVAILABLE_STATE; + else + prop_val = (uint16_t)CIM_SAP_ACTIVE_STATE; + CMSetProperty(inst, "EnabledState", (CMPIValue *)&prop_val, CMPI_uint16); @@ -209,13 +225,14 @@ free(id); free(sccn); - return ret; + return s; } static CMPIInstance *get_console_sap(const CMPIBroker *broker, const CMPIObjectPath *reference, virConnectPtr conn, struct domain *dominfo, + char *remote_port, CMPIStatus *s) { @@ -233,14 +250,68 @@ goto out; } - if (inst_from_dom(broker, reference, dominfo, inst) != 1) { - cu_statusf(broker, s, - CMPI_RC_ERR_FAILED, - "Unable to get instance from domain"); - } + *s = inst_from_dom(broker, reference, dominfo, remote_port, inst); out: return inst; +} + +static CMPIStatus get_session_insts(const CMPIObjectPath *ref, + virConnectPtr conn, + struct domain *dominfo, + struct vnc_ports *vnc_hash[], + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst; + char *dport = NULL; + int dport_int = 0; + int index; + int i; + + dport = strdup(dominfo->dev_graphics->dev.graphics.port); + + s = port_convert(0, dport, &dport_int); + if (s.rc != CMPI_RC_OK) + goto out; + + /* If port is < 0, the session is inactive. No need to check + for active / available connections. */ + if (dport_int < 0) { + inst = get_console_sap(_BROKER, ref, conn, dominfo, "-1", &s); + if (s.rc != CMPI_RC_OK) + goto out; + + if (inst != NULL) + inst_list_add(list, inst); + + goto out; + } + + /* Otherwise, check for active / available sessions. */ + index = get_vnc_hash_key(dport_int); + if (vnc_hash[index]->list != NULL) { + for (i = 0; i < vnc_hash[index]->cur; i++) { + inst = get_console_sap(_BROKER, ref, conn, dominfo, + vnc_hash[index]->list[i], &s); + if (s.rc != CMPI_RC_OK) + goto out; + + if (inst != NULL) + inst_list_add(list, inst); + } + } else { + inst = get_console_sap(_BROKER, ref, conn, dominfo, "-1", &s); + if (s.rc != CMPI_RC_OK) + goto out; + + if (inst != NULL) + inst_list_add(list, inst); + } + out: + free(dport); + + return s; } static CMPIStatus get_vnc_sessions(struct vnc_ports *vnc_hash[]) @@ -358,21 +429,19 @@ goto out; for (i = 0; i < count; i++) { - CMPIInstance *inst = NULL; - if (!check_graphics(domain_list[i], &dominfo)) { virDomainFree(domain_list[i]); cleanup_dominfo(&dominfo); continue; } - inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); - virDomainFree(domain_list[i]); + + s = get_session_insts(ref, conn, dominfo, vnc_hash, &list); cleanup_dominfo(&dominfo); - if (inst != NULL) - inst_list_add(&list, inst); + if (s.rc != CMPI_RC_OK) + goto out; } if (names_only) diff -r 6d537f5e2b65 -r d62634a3121f src/svpc_types.h --- a/src/svpc_types.h Mon Oct 20 18:24:30 2008 -0700 +++ b/src/svpc_types.h Mon Oct 20 18:40:44 2008 -0700 @@ -59,6 +59,10 @@ #define CIM_CRS_OTHER 1 #define CIM_CRS_VNC 4 +#define CIM_SAP_ACTIVE_STATE 2 +#define CIM_SAP_INACTIVE_STATE 3 +#define CIM_SAP_AVAILABLE_STATE 6 + #include #include From kaitlin at linux.vnet.ibm.com Tue Oct 21 04:26:45 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 20 Oct 2008 21:26:45 -0700 Subject: [Libvirt-cim] [PATCH] Add cu_validate_ref() to get_alloc_cap_by_id(), fix alloc_cap_to_rasd() Message-ID: <749adf090de64e8fb793.1224563205@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224563169 25200 # Node ID 749adf090de64e8fb7932d71cf16f268b22b2bec # Parent c41bd7c3175a970f7c674931ee27ef2a88b63b61 Add cu_validate_ref() to get_alloc_cap_by_id(), fix alloc_cap_to_rasd()... To call get_alloc_cap_by_id(). Signed-off-by: Kaitlin Rupert diff -r c41bd7c3175a -r 749adf090de6 src/Makefile.am --- a/src/Makefile.am Mon Oct 20 18:40:45 2008 -0700 +++ b/src/Makefile.am Mon Oct 20 21:26:09 2008 -0700 @@ -120,7 +120,7 @@ libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c libVirt_AllocationCapabilities_la_LIBADD = -lVirt_DevicePool -libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la +libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la libVirt_AllocationCapabilities.la libVirt_ElementCapabilities_la_SOURCES = Virt_ElementCapabilities.c libVirt_ElementCapabilities_la_LIBADD = -lVirt_VirtualSystemManagementCapabilities \ -lVirt_EnabledLogicalElementCapabilities \ @@ -132,12 +132,13 @@ -lVirt_VSMigrationService \ -lVirt_DevicePool -libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la +libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la libVirt_AllocationCapabilities.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c libVirt_SettingsDefineCapabilities_la_LIBADD = -lVirt_RASD \ -lVirt_DevicePool \ -lVirt_VSMigrationCapabilities \ - -lVirt_VSMigrationSettingData + -lVirt_VSMigrationSettingData \ + -lVirt_AllocationCapabilities libVirt_RegisteredProfile_la_SOURCES = Virt_RegisteredProfile.c diff -r c41bd7c3175a -r 749adf090de6 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Mon Oct 20 18:40:45 2008 -0700 +++ b/src/Virt_AllocationCapabilities.c Mon Oct 20 21:26:09 2008 -0700 @@ -159,7 +159,11 @@ if ((pool == NULL) || (s.rc != CMPI_RC_OK)) return s; - return ac_from_pool(broker, ref, pool, inst); + s = ac_from_pool(broker, ref, pool, inst); + if (s.rc != CMPI_RC_OK) + return s; + + return cu_validate_ref(broker, ref, *inst); } static CMPIStatus return_alloc_cap_instances(const CMPIBroker *broker, diff -r c41bd7c3175a -r 749adf090de6 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Mon Oct 20 18:40:45 2008 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Mon Oct 20 21:26:09 2008 -0700 @@ -47,6 +47,7 @@ #include "Virt_VSMigrationCapabilities.h" #include "Virt_VSMigrationSettingData.h" #include "Virt_VirtualSystemManagementService.h" +#include "Virt_AllocationCapabilities.h" const static CMPIBroker *_BROKER; @@ -730,6 +731,7 @@ struct inst_list *list) { CMPIStatus s = {CMPI_RC_OK}; + CMPIInstance *inst; uint16_t type; const char *id = NULL; int i; @@ -743,6 +745,10 @@ "Missing InstanceID"); goto out; } + + s = get_alloc_cap_by_id(_BROKER, ref, id, &inst); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; type = res_type_from_pool_id(id); From deeptik at linux.vnet.ibm.com Tue Oct 21 08:34:13 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 21 Oct 2008 01:34:13 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating the tc to use cim_define() Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1224577871 25200 # Node ID c1ab00fe5a8fbc2483d4baa2eb436d9842f311be # Parent f35b3e65944d83f758656717a903eee38b7d5b19 [TEST] Updating the tc to use cim_define(). Tested with Xen, XenFV, KVM with current sources without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Tue Oct 21 01:31:11 2008 -0700 @@ -44,7 +44,7 @@ def main(): status = FAIL cxml = vxml.get_class(options.virt)(test_dom) - rc = cxml.define(options.ip) + rc = cxml.cim_define(options.ip) if not rc: Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom) return status diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Tue Oct 21 01:31:11 2008 -0700 @@ -69,7 +69,7 @@ def main(): #Define a VS try: - ret = cxml.define(options.ip) + ret = cxml.cim_define(options.ip) if not ret : logger.error("ERROR: VS %s was not defined" % test_dom) return status diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Tue Oct 21 01:31:11 2008 -0700 @@ -135,7 +135,7 @@ def main(): keys['DiskResourceAllocationSettingData'] = "%s/%s" % (test_dom, vdisk) keys['NetResourceAllocationSettingData'] = "%s/%s" % (test_dom, vmac) - ret = cxml.define(options.ip) + ret = cxml.cim_define(options.ip) if not ret: logger.error("Failed to define the dom: %s", test_dom) return FAIL diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue Oct 21 01:31:11 2008 -0700 @@ -85,7 +85,7 @@ def setup_env(server, virt="Xen"): mac = test_mac, disk = test_disk) - ret = vsxml_info.define(server) + ret = vsxml_info.cim_define(server) if not ret: logger.error("Failed to define the dom: %s", test_dom) status = FAIL diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Tue Oct 21 01:31:11 2008 -0700 @@ -225,7 +225,7 @@ def main(): vsxml = virt_type(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk, ntype="network") - ret = vsxml.define(server) + ret = vsxml.cim_define(server) if not ret: logger.error("Failed to define the dom: '%s'", test_dom) return FAIL diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Tue Oct 21 01:31:11 2008 -0700 @@ -45,7 +45,7 @@ def main(): test_dev = 'hda' vsxml = get_class(options.virt)(test_dom, disk=test_dev) - vsxml.define(options.ip) + vsxml.cim_define(options.ip) devid = "%s/%s" % (test_dom, test_dev) key_list = { 'DeviceID' : devid, From yunguol at cn.ibm.com Tue Oct 21 09:50:26 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 21 Oct 2008 17:50:26 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSSD.02 to call new GetInstance In-Reply-To: <48FC87C1.5060307@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-20 21:29:37: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1224470190 25200 > > # Node ID d83baa71965d37027e1ef08ab79c72c177c0f9b7 > > # Parent a3d9c0a81c27471418993b7c8f907f0b95f79e63 > > [TEST] Update VSSD.02 to call new GetInstance > > > > Signed-off-by: Guolian Yun > > > > diff -r a3d9c0a81c27 -r d83baa71965d suites/libvirt- > cim/cimtest/VSSD/02_bootldr.py > > --- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Wed Oct 15 > 19:13:10 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Sun Oct 19 > 19:36:30 2008 -0700 > > @@ -60,8 +60,8 @@ def main(): > > > > try: > > key_list = { 'InstanceID' : instIdval } > > - system = enumclass.getInstance(options.ip, \ > > - enumclass.Xen_VirtualSystemSettingData, key_list) > > + system = enumclass.GetInstance(options.ip, \ > > + "Xen_VirtualSystemSettingData", key_list) > > > You can remove the slash here. > Also, can you remove the keyname variable in the tc which is not at all > used anywhere for the verification. > The tc fails with the following error for Xen: > > VSSD - 02_bootldr.py: FAIL > ERROR - AttributeError : 'str' object has no attribute 'Bootloader' > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 116, in do_try > File "02_bootldr.py", line 50, in main > xmlfile.set_bootloader(options.ip, gtype=0) > File "./lib/XenKvmLib/vxml.py", line 567, in set_bootloader > AttributeError: 'str' object has no attribute 'Bootloader' > ERROR - None > It fails for Xen now. Have you look into this failure? Kaitlin - Is there any changes of VSSD provider these days? Thanks! > > name = system.ElementName > > if name == test_dom : > > > > _______________________________________________ > > 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 Tue Oct 21 10:51:35 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 21 Oct 2008 03:51:35 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing false positive and modifying the tc to use ProcRASD to verify the guest info Message-ID: <8bcff8eaa5a2fc302d81.1224586295@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1224586274 25200 # Node ID 8bcff8eaa5a2fc302d81df5791547bf510a9afb9 # Parent c1ab00fe5a8fbc2483d4baa2eb436d9842f311be [TEST] Fixing false positive and modifying the tc to use ProcRASD to verify the guest info. 1) The tc was returning a false positive for KVM since it was verifying the CPU values only for Xen and XenFV. 2) Used GetInstance on ProcRASD instead of virsh schedinfo to verify the weight and Limit values of the domain. Tested with Xen, XenFV, KVM with current sources, without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r c1ab00fe5a8f -r 8bcff8eaa5a2 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Oct 21 01:31:11 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Oct 21 03:51:14 2008 -0700 @@ -25,6 +25,8 @@ from XenKvmLib.common_util import call_r from XenKvmLib.common_util import call_request_state_change, \ poll_for_state_change from XenKvmLib import vsms +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.common_util import get_typed_class from VirtLib import utils from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -55,38 +57,23 @@ def setup_rasd_mof(ip, vtype): return FAIL, vssd, rasd -def check_sched_info(str, exp_val, server, virt): - if str == "limit": - virsh_val = "cap" - else: - virsh_val = str +def check_proc_sched(server, virt): + try: + key_list = {"InstanceID" : '%s/proc' %default_dom} + cn_name = get_typed_class(virt, 'ProcResourceAllocationSettingData') + proc = GetInstance(server, cn_name, key_list) + + if proc.Limit != limit: + logger.error("Limit is %i, expected %i", proc.Limit, limit) + return FAIL - cmd = "virsh -c %s schedinfo %s | awk '/%s/ { print \$3 }'" % \ - (utils.virt2uri(virt), default_dom, virsh_val) - ret, out = utils.run_remote(server, cmd) - if not out.isdigit(): + if proc.Weight != weight: + logger.error("Weight is %i, expected %i", proc.Weight, weight) + return FAIL + + except Exception, details: + logger.error("Exception: details %s", details) return FAIL - - try: - val = int(out) - except ValueError: - val = -1 - - if val != exp_val: - logger.error("%s is %i, expected %i" % (str, val, exp_val)) - return FAIL - - return PASS - -def check_proc_sched(server, virt): - attr_list = { "weight" : weight, - "limit" : limit - } - - for k, v in attr_list.iteritems(): - status = check_sched_info(k, v, server, virt) - if status != PASS: - return FAIL return PASS @@ -100,7 +87,6 @@ def main(): try: service = vsms.get_vsms_class(options.virt)(options.ip) - service.DefineSystem(SystemSettings=vssd, ResourceSettings=rasd, ReferenceConfiguration=' ') @@ -116,16 +102,14 @@ def main(): if status != PASS: raise Exception("%s didn't change state as expected" % default_dom) - if options.virt == "Xen" or options.virt == "XenFV": - status = check_proc_sched(options.ip, options.virt) - if status != PASS: - raise Exception("%s CPU scheduling not set properly" % - default_dom) + status = check_proc_sched(options.ip, options.virt) + if status != PASS: + raise Exception("%s CPU scheduling not set properly", default_dom) status = PASS except Exception, details: - logger.error(details) + logger.error("Exception: details %s", details) status = FAIL destroy_and_undefine_domain(default_dom, options.ip, options.virt) From deeptik at linux.vnet.ibm.com Tue Oct 21 10:53:08 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 21 Oct 2008 03:53:08 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating the tc to use cim_define() Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1224577871 25200 # Node ID c1ab00fe5a8fbc2483d4baa2eb436d9842f311be # Parent f35b3e65944d83f758656717a903eee38b7d5b19 [TEST] Updating the tc to use cim_define(). Tested with Xen, XenFV, KVM with current sources without sblim-base-provider. Signed-off-by: Deepti B. Kalakeri diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/03_defineVS.py Tue Oct 21 01:31:11 2008 -0700 @@ -44,7 +44,7 @@ def main(): status = FAIL cxml = vxml.get_class(options.virt)(test_dom) - rc = cxml.define(options.ip) + rc = cxml.cim_define(options.ip) if not rc: Globals.logger.error(VIRSH_ERROR_DEFINE % test_dom) return status diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Tue Oct 21 01:31:11 2008 -0700 @@ -69,7 +69,7 @@ def main(): #Define a VS try: - ret = cxml.define(options.ip) + ret = cxml.cim_define(options.ip) if not ret : logger.error("ERROR: VS %s was not defined" % test_dom) return status diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py Tue Oct 21 01:31:11 2008 -0700 @@ -135,7 +135,7 @@ def main(): keys['DiskResourceAllocationSettingData'] = "%s/%s" % (test_dom, vdisk) keys['NetResourceAllocationSettingData'] = "%s/%s" % (test_dom, vmac) - ret = cxml.define(options.ip) + ret = cxml.cim_define(options.ip) if not ret: logger.error("Failed to define the dom: %s", test_dom) return FAIL diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue Oct 21 01:31:11 2008 -0700 @@ -85,7 +85,7 @@ def setup_env(server, virt="Xen"): mac = test_mac, disk = test_disk) - ret = vsxml_info.define(server) + ret = vsxml_info.cim_define(server) if not ret: logger.error("Failed to define the dom: %s", test_dom) status = FAIL diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Tue Oct 21 01:31:11 2008 -0700 @@ -225,7 +225,7 @@ def main(): vsxml = virt_type(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk, ntype="network") - ret = vsxml.define(server) + ret = vsxml.cim_define(server) if not ret: logger.error("Failed to define the dom: '%s'", test_dom) return FAIL diff -r f35b3e65944d -r c1ab00fe5a8f suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Tue Oct 21 01:31:11 2008 -0700 @@ -45,7 +45,7 @@ def main(): test_dev = 'hda' vsxml = get_class(options.virt)(test_dom, disk=test_dev) - vsxml.define(options.ip) + vsxml.cim_define(options.ip) devid = "%s/%s" % (test_dom, test_dev) key_list = { 'DeviceID' : devid, From kaitlin at linux.vnet.ibm.com Tue Oct 21 16:36:19 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 21 Oct 2008 09:36:19 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSSD.02 to call new GetInstance In-Reply-To: References: Message-ID: <48FE0503.1080400@linux.vnet.ibm.com> > > > > > You can remove the slash here. > > Also, can you remove the keyname variable in the tc which is not at all > > used anywhere for the verification. > > The tc fails with the following error for Xen: > > > > VSSD - 02_bootldr.py: FAIL > > ERROR - AttributeError : 'str' object has no attribute 'Bootloader' > > Traceback (most recent call last): > > File "./lib/XenKvmLib/const.py", line 116, in do_try > > File "02_bootldr.py", line 50, in main > > xmlfile.set_bootloader(options.ip, gtype=0) > > File "./lib/XenKvmLib/vxml.py", line 567, in set_bootloader > > AttributeError: 'str' object has no attribute 'Bootloader' > > ERROR - None > > > It fails for Xen now. Have you look into this failure? > Kaitlin - Is there any changes of VSSD provider these days? > > Thanks! If you look at the message python prints when the test fails, you can see that python is encountering an error on line 567 of ./lib/XenKvmLib/vxml.py. So that's a good hint to where you need to start investigating the issue. The problem is that the vssd mof doesn't have a Bootloader attribute. If you print it out, you see the following: instance of Xen_VirtualSystemSettingData { Ramdisk = "/tmp/default-xen-initrd"; Kernel = "/tmp/default-xen-kernel"; ElementName = "dom"; Description = "Virtual System"; InstanceID = "Xen:dom"; isFullVirt = false; Caption = "Virtual System"; AutomaticShutdownAction = 2; AutomaticRecoveryAction = 2; VirtualSystemType = "Xen"; CreationClassName = "Xen_VirtualSystemSettingData"; VirtualSystemIdentifier = "dom"; }; I'll send a patch to fix this issue. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 21 16:42:26 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 21 Oct 2008 09:42:26 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update get_vssd_mof() to include a bootloader param Message-ID: <912c63b6033764917aa5.1224607346@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224607344 25200 # Node ID 912c63b6033764917aa5a5438e2e12ce1d12ea99 # Parent f35b3e65944d83f758656717a903eee38b7d5b19 [TEST] Update get_vssd_mof() to include a bootloader param. Signed-off-by: Kaitlin Rupert diff -r f35b3e65944d -r 912c63b60337 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Oct 21 09:42:24 2008 -0700 @@ -89,7 +89,7 @@ # classes to define VSSD parameters class CIM_VirtualSystemSettingData(CIMClassMOF): - def __init__(self, name, virt): + def __init__(self, name, virt, bldr=None): type = get_class_type(self.__class__.__name__) self.InstanceID = '%s:%s' % (type, name) self.Caption = self.Description = 'Virtual System' @@ -107,6 +107,9 @@ else: self.Kernel = const.Xen_kernel_path self.Ramdisk = const.Xen_init_path + + if bldr is not None: + self.Bootloader = bldr class Xen_VirtualSystemSettingData(CIM_VirtualSystemSettingData): pass @@ -117,9 +120,9 @@ class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData): pass -def get_vssd_mof(virt, dom_name): +def get_vssd_mof(virt, dom_name, bldr=None): vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData")) - vssd = vssd_cn(dom_name, virt) + vssd = vssd_cn(dom_name, virt, bldr) return vssd.mof() # classes to define RASD parameters diff -r f35b3e65944d -r 912c63b60337 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Oct 21 09:42:24 2008 -0700 @@ -564,7 +564,7 @@ def set_bootloader(self, ip, gtype=0): bldr = live.bootloader(ip, gtype) self.add_sub_node('/domain', 'bootloader', bldr) - self.vssd.Bootloader = bldr + self.vssd = vsms.get_vssd_mof(self.virt, self.domain_name, bldr) return bldr def set_bridge(self, ip): From kaitlin at linux.vnet.ibm.com Tue Oct 21 16:22:45 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 21 Oct 2008 09:22:45 -0700 Subject: [Libvirt-cim] [PATCH] Add AC classnames to host_caps struct in EC Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1224606148 25200 # Node ID e7ffee5deb372f73fa3f315bffca69e6b21fe5b8 # Parent 749adf090de64e8fb7932d71cf16f268b22b2bec Add AC classnames to host_caps struct in EC. The sys_to_cap() function also returns AC instances. The classnames are needed so that queries using the result class don't filter out the AC instances. Signed-off-by: Kaitlin Rupert diff -r 749adf090de6 -r e7ffee5deb37 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Mon Oct 20 21:26:09 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Tue Oct 21 09:22:28 2008 -0700 @@ -398,6 +398,9 @@ "KVM_VirtualSystemMigrationCapabilities", "LXC_VirtualSystemManagementCapabilities", "LXC_VirtualSystemMigrationCapabilities", + "Xen_AllocationCapabilities", + "KVM_AllocationCapabilities", + "LXC_AllocationCapabilities", NULL, }; From kaitlin at linux.vnet.ibm.com Tue Oct 21 20:38:17 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 21 Oct 2008 13:38:17 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix several negative test cases to work with older provider versions Message-ID: <77c8b5955eb50d027ac9.1224621497@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224620362 25200 # Node ID 77c8b5955eb50d027ac97ce59f01462205b6115f # Parent 868aa0f5175568c5752787c1fcbd2b1df4001aad [TEST] Fix several negative test cases to work with older provider versions. Signed-off-by: Kaitlin Rupert diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Tue Oct 21 01:31:11 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Tue Oct 21 13:19:22 2008 -0700 @@ -133,7 +133,7 @@ from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ CIM_ERROR_GETINSTANCE -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version sup_types = ['Xen', 'KVM', 'XenFV'] @@ -207,6 +207,13 @@ global conn conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) + rev, changeset = get_provider_version(options.virt, options.ip) + if rev < 682: + old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : "No such instance (INVALID_DevID_Keyvalue)" + } + expr_values["invalid_devid_keyvalue"] = old_ret + global name_val name_val = [ 'CreationClassName', disk.CreationClassName, diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py --- a/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Tue Oct 21 01:31:11 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Tue Oct 21 13:19:22 2008 -0700 @@ -131,7 +131,7 @@ 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 -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version sup_types = ['Xen', 'KVM', 'XenFV'] @@ -207,6 +207,13 @@ 'INVALID_SysName_Keyvalue' : 'invalid_sysname' } + rev, changeset = get_provider_version(options.virt, options.ip) + if rev < 682: + old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : "No such instance (INVALID_DevID_Keyvalue)" + } + expr_values["invalid_devid_keyvalue"] = old_ret + i = 0 for field1, field2 in sorted(tc_scen.items()): retval = try_invalid_gi(i, field1, field2) diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Tue Oct 21 01:31:11 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Tue Oct 21 13:19:22 2008 -0700 @@ -152,7 +152,7 @@ from XenKvmLib.classes import get_typed_class from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -246,6 +246,13 @@ 'INVALID_SysName_Keyname', 'INVALID_SysName_Keyval' ] + rev, changeset = get_provider_version(options.virt, options.ip) + if rev < 682: + old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : "No such instance (INVALID_DevID_Keyval)" + } + expr_values["INVALID_DevID_Keyval"] = old_ret + sccn = get_typed_class(options.virt, 'ComputerSystem') for classname, devid in sorted(class_id.items()): name_val = get_name_val(classname, devid, sccn) diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Oct 21 01:31:11 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Oct 21 13:19:22 2008 -0700 @@ -139,7 +139,7 @@ if revision is None or changeset is None: return 0, "Unknown" - revision.strip("+") + revision = revision.strip("+") if revision.isdigit(): revision = int(revision) From kaitlin at linux.vnet.ibm.com Tue Oct 21 22:05:55 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 21 Oct 2008 15:05:55 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Clean up minor test issues with VSMS 14_define_sys_disk.py Message-ID: <664c2fc4c52c63c5505a.1224626755@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224626746 25200 # Node ID 664c2fc4c52c63c5505a19c59fdc6e94c7135191 # Parent ede6419d3a506b7cb67bbb91e2d80f2010a0bc3c [TEST] Clean up minor test issues with VSMS 14_define_sys_disk.py Signed-off-by: Kaitlin Rupert diff -r ede6419d3a50 -r 664c2fc4c52c suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue Oct 21 03:51:14 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue Oct 21 15:05:46 2008 -0700 @@ -53,8 +53,8 @@ rasds = get_default_rasds(ip, virt) - for i in range(0, len(rasds)): - if rasds[i]['PoolID'].find('DiskPool') >= 0: + for i in range(len(rasds)): + if 'DiskPool' in rasds[i]['PoolID']: rasds[i]['Address'] = addr rasds[i] = inst_to_mof(rasds[i]) From kaitlin at linux.vnet.ibm.com Tue Oct 21 22:33:30 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 21 Oct 2008 15:33:30 -0700 Subject: [Libvirt-cim] [PATCH] Fix CRS MaxConcurrentEnabledSAPs value Message-ID: <6b7e629b8ca10658d31b.1224628410@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224628392 25200 # Node ID 6b7e629b8ca10658d31b1148403a0424af0a2985 # Parent e7ffee5deb372f73fa3f315bffca69e6b21fe5b8 Fix CRS MaxConcurrentEnabledSAPs value. The current calculation isn't valid. The profile says that the number of enabled sessions cannot exeed the MaxConcurrentEnabledSAPs value. So anytime you create a new guest (after the initial start), then you are exeeding this value. Signed-off-by: Kaitlin Rupert diff -r e7ffee5deb37 -r 6b7e629b8ca1 src/Virt_ConsoleRedirectionService.c --- a/src/Virt_ConsoleRedirectionService.c Tue Oct 21 09:22:28 2008 -0700 +++ b/src/Virt_ConsoleRedirectionService.c Tue Oct 21 15:33:12 2008 -0700 @@ -38,12 +38,13 @@ #include "Virt_HostSystem.h" #include "Virt_ConsoleRedirectionService.h" +#define MAX_SAP_SESSIONS 65535 + const static CMPIBroker *_BROKER; static CMPIStatus set_inst_properties(const CMPIBroker *broker, const CMPIContext *context, const CMPIObjectPath *ref, - virConnectPtr conn, CMPIInstance *inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -51,8 +52,6 @@ const char *name = NULL; const char *ccname = NULL; uint16_t prop_val; - int num_defined_dom; - int num_dom; s = get_host_system_properties(&name, &ccname, ref, broker, context); if (s.rc != CMPI_RC_OK) { @@ -84,16 +83,7 @@ CMSetProperty(inst, "RedirectionServiceType", (CMPIValue *)&array, CMPI_uint16A); - num_dom = virConnectNumOfDomains(conn); - num_defined_dom = virConnectNumOfDefinedDomains(conn); - - if (num_dom < 0) - num_dom = 0; - - if (num_defined_dom < 0) - num_defined_dom = 0; - - prop_val = (uint16_t) num_defined_dom + (uint16_t) num_defined_dom; + prop_val = (uint16_t)MAX_SAP_SESSIONS; CMSetProperty(inst, "MaxConcurrentEnabledSAPs", (CMPIValue *)&prop_val, CMPI_uint16); @@ -147,7 +137,7 @@ goto out; } - s = set_inst_properties(broker, context, reference, conn, inst); + s = set_inst_properties(broker, context, reference, inst); if (s.rc != CMPI_RC_OK) goto out; From kaitlin at linux.vnet.ibm.com Wed Oct 22 00:11:28 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 21 Oct 2008 17:11:28 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Improve libvirt virt support check in main.py Message-ID: <0ceafbdc8a2d17b52ca7.1224634288@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224634275 25200 # Node ID 0ceafbdc8a2d17b52ca72401b7ffaeb220069b66 # Parent 868aa0f5175568c5752787c1fcbd2b1df4001aad [TEST] Improve libvirt virt support check in main.py If /usr/bin/qemu does not exist on the system (or if libvirt cannot find it), it is possible to define KVM guests but not run them. Instead of returning a error saying libvirt doesn't support the virt type, we need to return an error that indicates a problem with libvirt was encountered. Signed-off-by: Kaitlin Rupert diff -r 868aa0f51755 -r 0ceafbdc8a2d suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Tue Oct 21 01:31:11 2008 -0700 +++ b/suites/libvirt-cim/main.py Tue Oct 21 17:11:15 2008 -0700 @@ -90,10 +90,15 @@ print "Cleaned log files." def pre_check(ip, virt): - cmd = "virsh -c %s version " % utils.virt2uri(virt) + cmd = "virsh -c %s list --all" % utils.virt2uri(virt) ret, out = utils.run_remote(ip, cmd) if ret != 0: return "This libvirt install does not support %s" % virt + + cmd = "virsh -c %s version" % utils.virt2uri(virt) + ret, out = utils.run_remote(ip, cmd) + if ret != 0: + return "Encountered an error querying libvirt with: %s" % cmd cmd = "ps -ef | grep -v grep | grep cimserver" rc, out = utils.run_remote(ip, cmd) From yunguol at cn.ibm.com Wed Oct 22 09:08:32 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 22 Oct 2008 02:08:32 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Remove old enumerate* and getInstance in devices.py and enumclass.py Message-ID: # HG changeset patch # User Guolian Yun # Date 1224666506 25200 # Node ID fc949371313630bd0d5abd47e5f15048e85c9ca8 # Parent 868aa0f5175568c5752787c1fcbd2b1df4001aad [TEST] #2 Remove old enumerate* and getInstance in devices.py and enumclass.py Due to these patch will hit most of tc, I will cut it into several patches: 1) Remove old enumerate* and getInstance 2) Remove CIM_Instance in devices.py and update related tc 3) Remove CIM_* class definitions and update related tc Signed-off-by: Guolian Yun diff -r 868aa0f51755 -r fc9493713136 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 21 01:31:11 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Oct 22 02:08:26 2008 -0700 @@ -38,7 +38,6 @@ from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC 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.const import default_pool_name, default_network_name @@ -52,12 +51,13 @@ def get_cs_instance(domain_name, ip, virt='Xen'): cs = None + cs_class = get_typed_class(virt, 'ComputerSystem') try: keys = { 'Name' : domain_name, - 'CreationClassName' : get_typed_class(virt, 'ComputerSystem') + 'CreationClassName' : cs_class } - cs = enumclass.getInstance(ip, 'ComputerSystem', keys, virt) + cs = enumclass.GetInstance(ip, cs_class, keys) if cs.Name != domain_name: logger.error("VS %s is not found" % domain_name) @@ -172,16 +172,15 @@ def poll_for_state_change(server, virt, dom, exp_state, timeout=30): dom_cs = None - + cs_class = get_typed_class(virt, 'ComputerSystem') keys = { 'Name' : dom, - 'CreationClassName' : get_typed_class(virt, 'ComputerSystem') + 'CreationClassName' : cs_class } try: for i in range(1, (timeout + 1)): - dom_cs = enumclass.getInstance(server, 'ComputerSystem', keys, - virt) + dom_cs = enumclass.GetInstance(server, cs_class, keys) if dom_cs is None or dom_cs.Name != dom: continue diff -r 868aa0f51755 -r fc9493713136 suites/libvirt-cim/lib/XenKvmLib/devices.py --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Tue Oct 21 01:31:11 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Wed Oct 22 02:08:26 2008 -0700 @@ -101,36 +101,6 @@ def get_class(classname): return eval(classname) -def enumerate(server, basetype, keys, virt='Xen'): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - list = [] - - #FIXME - Remove once all tests are converted for KVM - basetype = basetype.split('_', 1)[-1] - - devtype = eval(get_typed_class(virt, basetype)) - try: - names = conn.EnumerateInstanceNames(devtype.__name__) - except pywbem.CIMError, arg: - raise Exception("%s" % arg[1]) - return list - - for name in names: - key_list = {} - for item in keys: - key_list[item] = name.keybindings[item] - - if len(key_list) == 0: - return list - - list.append(devtype(server, key_list)) - - return list - - def device_of(server, key_list): t = eval(key_list["CreationClassName"]) diff -r 868aa0f51755 -r fc9493713136 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Tue Oct 21 01:31:11 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Oct 22 02:08:26 2008 -0700 @@ -357,75 +357,6 @@ pass -# Generic function which can be used to get the enumerate instances of any -# class when the following fields are specified -# classname = any class for which we want obtain the instances -# ex: Xen_RegisteredProfile -# keyname = The keyvalue -# ex: InstanceID in case of Xen_RegisteredProfile -def enumerate_inst(server, classname, virt="Xen"): - classname = "%s" % classname - new_classname = classname.split('_') - if len(new_classname) == 2: - classname = new_classname[1] - classname = eval(get_typed_class(virt, classname)) - instances = [] - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - instances = conn.EnumerateInstances(classname.__name__) - except pywbem.CIMError, arg: - print arg[1] - return [] - - return instances - -def enumerate(server, basename, keys, virt="Xen"): - #FIXME - Remove once all tests are converted for KVM - basename = "%s" % basename - new_base = basename.split('_') - if len(new_base) == 2: - basename = new_base[1] - - classname = eval(get_typed_class(virt, basename)) - instances = enumerate_inst(server, classname, virt) - - list = [] - - for instance in instances: - key_list = {} - for item in keys: - key_list[item] = instance[item] - - if len(key_list) == 0: - return list - - list.append(classname(server, key_list)) - - return list - -def getInstance(server, basename, keys, virt="Xen"): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - #FIXME - Remove once all tests are converted for KVM - basename = "%s" % basename - new_base = basename.split('_') - if len(new_base) == 2: - basename = new_base[1] - - classname = eval(get_typed_class(virt, basename)) - try: - inst = classname(server, keys) - - except pywbem.CIMError, arg: - print arg[1] - return None - - return inst class CIM_CimtestClass(CIM_Instance): def __init__(self, host, ref): From fujimura.toshifumi at np.css.fujitsu.com Wed Oct 22 09:11:28 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Wed, 22 Oct 2008 18:11:28 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48F81B0C.1040602@linux.vnet.ibm.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> Message-ID: <48FEEE40.7040107@np.css.fujitsu.com> Thanks for your reply. Currently, WBEM Client works for getting CIM_OperatingSystem. But not for getting KVM_ComputerSystem. (I attach the wbemcli output.) ======================================================================== [root at localhost ~]# wbemcli ei 'http://user:pass at localhost:5988/root/cimv2:cim_operatingsystem' localhost:5988/root/cimv2:PG_OperatingSystem.CreationClassName="CIM_OperatingSystem",CSCreationClassName="CIM_UnitaryComputerSystem", CSName="localhost.localdomain",Name="Fedora" CSCreationClassName="CIM_UnitaryComputerSystem",CSName="localhost.localdomain", CreationClassName="CIM_OperatingSystem",Name="Fedora",Caption="Fedora release 9.92 (Rawhide)",Description="Fedora release 9.92 (Rawhide)", Status="Unknown",OSType=36,OtherTypeDescription="2.6.27.3-27.rc1.fc10.i686.PAE #1 SMP Sat Oct 18 20:27:11 EDT 2008",Version="2.6.27.3-27.rc1.fc10.i686.PAE", LastBootUpTime=20081022122916.000000+540,LocalDateTime=20081022171753.000000+540,CurrentTimeZone=540,NumberOfLicensedUsers=0,NumberOfUsers=5,NumberOfProcesses=166, MaxNumberOfProcesses=196608,TotalSwapSpaceSize=4095992,TotalVirtualMemorySize=8233000,FreeVirtualMemory=4095992,FreePhysicalMemory=3384328,TotalVisibleMemorySize=4137008, MaxProcessMemorySize=4095992,Distributed=FALSE,MaxProcessesPerUser=196608,SystemUpTime=17317,OperatingSystemCapability="32 bit" [root at localhost ~]# wbemcli ein http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem * * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: KVM_ComputerSystem * ======================================================================== Anyway cimxxxxx shows Virt_xxx class. (I attach the "cimprovider -l" output.) ======================================================================== [root at localhost ~]# cimprovider -l OperatingSystemModule ComputerSystemModule ProcessModule Virt_AllocationCapabilities Virt_ComputerSystem Virt_ComputerSystemIndication Virt_ComputerSystemMigrationIndication Virt_ConcreteComponent Virt_ConsoleRedirectionService Virt_ConsoleRedirectionServiceCapabilities Virt_Device Virt_DevicePool Virt_ElementAllocatedFromPool Virt_ElementCapabilities Virt_ElementConformsToProfile Virt_ElementSettingData Virt_EnabledLogicalElementCapabilities Virt_HostedDependency Virt_HostedResourcePool Virt_HostedService Virt_HostSystem Virt_RASD Virt_ReferencedProfile Virt_RegisteredProfile Virt_ResourceAllocationFromPool Virt_ResourcePoolConfigurationCapabilities Virt_ResourcePoolConfigurationService Virt_ServiceAffectsElement Virt_SettingsDefineCapabilities Virt_SettingsDefineState Virt_SystemDevice Virt_VirtualSystemManagementCapabilities Virt_VirtualSystemManagementService Virt_VirtualSystemSnapshotService Virt_VirtualSystemSnapshotServiceCapabilities Virt_VSMigrationCapabilities Virt_VSMigrationService Virt_VSMigrationSettingData Virt_VSSD Virt_VSSDComponent ======================================================================== >From these, I guess libvirt-cim provider is not connected properly. Would you give me an advice to investigate it. Thanks Toshifumi Fujimura. > > > Kaitlin Rupert wrote: >> Toshifumi Fujimura wrote: >>> I think I've registerd Libvirt-CIM and Libcmputil as CIM Provider. >>> >>> I re-installed Libvirt-CIM package. >>> And I made sure that with Pegasus's command "cimprovider -s -l". >> >> You can check to make sure the providers are properly installed by >> running the following command. Replace user:pass with the username >> and password of the user that has CIM query rights. >> >> The convention is to use the root user or the pegasus user, but you >> can use any user since you've modified /etc/Pegasus/access.conf to >> allow all users. >> >> wbemcli ein http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem >> >> This should return something like the following: >> >> localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="demo2" >> >> >> When you run cimtest, you'll need to run the command as root and pass >> in the root username / password (this will need to be fixed in the >> future). >> >> CIM_NS=root/virt CIM_USER=root CIM_PASS=pass ./runtests libvirt-cim >> -i localhost -d -v KVM >> >>> >>> But following error messages didn't disappear. >>> ============================================================== >>> -------------------------------------------------------------------- >>> AllocationCapabilities - 01_enum.py: FAIL >>> ERROR - Failed to enumerate the class of KVM_AllocationCapabilities >>> ERROR - Unauthorized >>> ERROR - Only 0 pools returned, expected at least 4 >>> -------------------------------------------------------------------- >>> AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL >>> ERROR - AuthError : Unauthorized >>> Traceback (most recent call last): >>> File "./lib/XenKvmLib/const.py", line 116, in do_try >>> File "02_alloccap_gi_errs.py", line 109, in main >>> expr_values=exp['invalid_keyvalue'], bug_no="") >>> File "./lib/XenKvmLib/common_util.py", line 264, in try_getinstance >>> File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >>> line 464, in GetInstance >>> **params) >>> File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >>> line 181, in imethodcall >>> verify_callback = self.verify_callback) >>> File "/usr/lib/python2.5/site-packages/pywbem/cim_http.py", line >>> 226, in wbem_request >>> raise AuthError(response.reason) >>> AuthError: Unauthorized >>> ERROR - None >>> -------------------------------------------------------------------- >>> ============================================================== >>> Would you have any more suggestion of this messages? >> >> This error is because pywbem is unable to authenticate with Pegasus. >> Be sure the following query works (change pass to the proper password): >> >> wbemcli ein http://root:pass at localhost:5988/root/virt:KVM_ComputerSystem >> >> Hope this helps! =) >> > You can also verify if the required providers are installed by using > the following query: > > wbemcli ecn http://root:pass at localhost:5988/root/virt > > The above query will report all the providers registered with the > /root/virt namespace. > you can use the same query replacing the above /root/virt with other > namespace like /root/interop to know the providers registered in that > particular namespace. > > Regards, > Deepti. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > > -- Toshifumi Fujimura. From deeptik at linux.vnet.ibm.com Wed Oct 22 10:02:58 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 22 Oct 2008 15:32:58 +0530 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48FEEE40.7040107@np.css.fujitsu.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> <48FEEE40.7040107@np.css.fujitsu.com> Message-ID: <48FEFA52.8080202@linux.vnet.ibm.com> What is the output of wbemcli ecn http://root:pass at localhost:5988/root/virt Thanks and Regards, Deepti. Toshifumi Fujimura wrote: > Thanks for your reply. > > Currently, WBEM Client works for getting CIM_OperatingSystem. > But not for getting KVM_ComputerSystem. > (I attach the wbemcli output.) > ======================================================================== > [root at localhost ~]# wbemcli ei > 'http://user:pass at localhost:5988/root/cimv2:cim_operatingsystem' > localhost:5988/root/cimv2:PG_OperatingSystem.CreationClassName="CIM_OperatingSystem",CSCreationClassName="CIM_UnitaryComputerSystem", > > CSName="localhost.localdomain",Name="Fedora" > CSCreationClassName="CIM_UnitaryComputerSystem",CSName="localhost.localdomain", > > CreationClassName="CIM_OperatingSystem",Name="Fedora",Caption="Fedora > release 9.92 (Rawhide)",Description="Fedora release 9.92 (Rawhide)", > Status="Unknown",OSType=36,OtherTypeDescription="2.6.27.3-27.rc1.fc10.i686.PAE > > #1 SMP Sat Oct 18 20:27:11 EDT > 2008",Version="2.6.27.3-27.rc1.fc10.i686.PAE", > LastBootUpTime=20081022122916.000000+540,LocalDateTime=20081022171753.000000+540,CurrentTimeZone=540,NumberOfLicensedUsers=0,NumberOfUsers=5,NumberOfProcesses=166, > > MaxNumberOfProcesses=196608,TotalSwapSpaceSize=4095992,TotalVirtualMemorySize=8233000,FreeVirtualMemory=4095992,FreePhysicalMemory=3384328,TotalVisibleMemorySize=4137008, > > MaxProcessMemorySize=4095992,Distributed=FALSE,MaxProcessesPerUser=196608,SystemUpTime=17317,OperatingSystemCapability="32 > > bit" > > [root at localhost ~]# wbemcli ein > http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem > * > * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: KVM_ComputerSystem > * > ======================================================================== > > > Anyway cimxxxxx shows Virt_xxx class. > (I attach the "cimprovider -l" output.) > ======================================================================== > [root at localhost ~]# cimprovider -l > OperatingSystemModule > ComputerSystemModule > ProcessModule > Virt_AllocationCapabilities > Virt_ComputerSystem > Virt_ComputerSystemIndication > Virt_ComputerSystemMigrationIndication > Virt_ConcreteComponent > Virt_ConsoleRedirectionService > Virt_ConsoleRedirectionServiceCapabilities > Virt_Device > Virt_DevicePool > Virt_ElementAllocatedFromPool > Virt_ElementCapabilities > Virt_ElementConformsToProfile > Virt_ElementSettingData > Virt_EnabledLogicalElementCapabilities > Virt_HostedDependency > Virt_HostedResourcePool > Virt_HostedService > Virt_HostSystem > Virt_RASD > Virt_ReferencedProfile > Virt_RegisteredProfile > Virt_ResourceAllocationFromPool > Virt_ResourcePoolConfigurationCapabilities > Virt_ResourcePoolConfigurationService > Virt_ServiceAffectsElement > Virt_SettingsDefineCapabilities > Virt_SettingsDefineState > Virt_SystemDevice > Virt_VirtualSystemManagementCapabilities > Virt_VirtualSystemManagementService > Virt_VirtualSystemSnapshotService > Virt_VirtualSystemSnapshotServiceCapabilities > Virt_VSMigrationCapabilities > Virt_VSMigrationService > Virt_VSMigrationSettingData > Virt_VSSD > Virt_VSSDComponent > ======================================================================== > >> From these, I guess libvirt-cim provider is not connected properly. > Would you give me an advice to investigate it. > > Thanks > > Toshifumi Fujimura. > >> >> >> Kaitlin Rupert wrote: >>> Toshifumi Fujimura wrote: >>>> I think I've registerd Libvirt-CIM and Libcmputil as CIM Provider. >>>> >>>> I re-installed Libvirt-CIM package. >>>> And I made sure that with Pegasus's command "cimprovider -s -l". >>> >>> You can check to make sure the providers are properly installed by >>> running the following command. Replace user:pass with the username >>> and password of the user that has CIM query rights. >>> >>> The convention is to use the root user or the pegasus user, but you >>> can use any user since you've modified /etc/Pegasus/access.conf to >>> allow all users. >>> >>> wbemcli ein >>> http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem >>> >>> This should return something like the following: >>> >>> localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="demo2" >>> >>> >>> When you run cimtest, you'll need to run the command as root and >>> pass in the root username / password (this will need to be fixed in >>> the future). >>> >>> CIM_NS=root/virt CIM_USER=root CIM_PASS=pass ./runtests libvirt-cim >>> -i localhost -d -v KVM >>> >>>> >>>> But following error messages didn't disappear. >>>> ============================================================== >>>> -------------------------------------------------------------------- >>>> AllocationCapabilities - 01_enum.py: FAIL >>>> ERROR - Failed to enumerate the class of >>>> KVM_AllocationCapabilities >>>> ERROR - Unauthorized >>>> ERROR - Only 0 pools returned, expected at least 4 >>>> -------------------------------------------------------------------- >>>> AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL >>>> ERROR - AuthError : Unauthorized >>>> Traceback (most recent call last): >>>> File "./lib/XenKvmLib/const.py", line 116, in do_try >>>> File "02_alloccap_gi_errs.py", line 109, in main >>>> expr_values=exp['invalid_keyvalue'], bug_no="") >>>> File "./lib/XenKvmLib/common_util.py", line 264, in try_getinstance >>>> File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >>>> line 464, in GetInstance >>>> **params) >>>> File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >>>> line 181, in imethodcall >>>> verify_callback = self.verify_callback) >>>> File "/usr/lib/python2.5/site-packages/pywbem/cim_http.py", line >>>> 226, in wbem_request >>>> raise AuthError(response.reason) >>>> AuthError: Unauthorized >>>> ERROR - None >>>> -------------------------------------------------------------------- >>>> ============================================================== >>>> Would you have any more suggestion of this messages? >>> >>> This error is because pywbem is unable to authenticate with >>> Pegasus. Be sure the following query works (change pass to the >>> proper password): >>> >>> wbemcli ein >>> http://root:pass at localhost:5988/root/virt:KVM_ComputerSystem >>> >>> Hope this helps! =) >>> >> You can also verify if the required providers are installed by using >> the following query: >> >> wbemcli ecn http://root:pass at localhost:5988/root/virt >> >> The above query will report all the providers registered with the >> /root/virt namespace. >> you can use the same query replacing the above /root/virt with other >> namespace like /root/interop to know the providers registered in that >> particular namespace. >> >> Regards, >> Deepti. >> >> _______________________________________________ >> Libvirt-cim mailing list >> Libvirt-cim at redhat.com >> https://www.redhat.com/mailman/listinfo/libvirt-cim >> >> > > From kaitlin at linux.vnet.ibm.com Wed Oct 22 14:04:31 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 22 Oct 2008 07:04:31 -0700 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48FEEE40.7040107@np.css.fujitsu.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> <48FEEE40.7040107@np.css.fujitsu.com> Message-ID: <48FF32EF.6010907@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > Thanks for your reply. > > Currently, WBEM Client works for getting CIM_OperatingSystem. > But not for getting KVM_ComputerSystem. > (I attach the wbemcli output.) > > [root at localhost ~]# wbemcli ein > http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem > * > * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: KVM_ComputerSystem > * This indicates that the CIM schema for libvirt-cim isn't registered. Pegasus is aware of the providers, but the proper mof files aren't in its repository. In your libvirt-cim directory, run the following: sudo make preuninstall sudo make preinstall sudo make postinstall Then restart Pegasus. The following query: wbemcli ein http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem might not return any records if you don't have any guests defined. In that case, you can also try: http://user:pass at localhost:5988/root/virt:KVM_VirtualSystemManagementService That should always return an instance. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From richardm at br.ibm.com Wed Oct 22 15:12:58 2008 From: richardm at br.ibm.com (Richard Maciel) Date: Wed, 22 Oct 2008 08:12:58 -0700 Subject: [Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection Message-ID: <74a53f67691133c24dac.1224688378@elm3b24.beaverton.ibm.com> # HG changeset patch # User Richard Maciel # Date 1224683061 25200 # Node ID 74a53f67691133c24dac6ce7a67583954ea6d0e7 # Parent f7b995404a9c6a4c55374155b9d6826ad6fb2f3a * Added association Console Redirections Service <-> Console Redirection Service Capabilities into the ElementCapabilities.c file * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function get_console_rs_caps is not static anymore * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function * get_console_rs_caps is not static anymore * Fixed whitespace issues * Removed not useful CU_DEBUG calls from ElementCapabilities.c file Signed-off-by: Richard Maciel diff -r f7b995404a9c -r 74a53f676911 src/Makefile.am --- a/src/Makefile.am Mon Oct 06 08:37:42 2008 -0700 +++ b/src/Makefile.am Wed Oct 22 06:44:21 2008 -0700 @@ -21,7 +21,8 @@ Virt_VirtualSystemSnapshotService.h \ Virt_VirtualSystemSnapshotServiceCapabilities.h \ Virt_VSMigrationSettingData.h \ - Virt_ConsoleRedirectionService.h + Virt_ConsoleRedirectionService.h \ + Virt_ConsoleRedirectionServiceCapabilities.h XKUADD = $(top_builddir)/libxkutil/libxkutil.la @@ -119,7 +120,7 @@ libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c libVirt_AllocationCapabilities_la_LIBADD = -lVirt_DevicePool -libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la +libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la libVirt_ConsoleRedirectionService.la libVirt_ConsoleRedirectionServiceCapabilities.la libVirt_ElementCapabilities_la_SOURCES = Virt_ElementCapabilities.c libVirt_ElementCapabilities_la_LIBADD = -lVirt_VirtualSystemManagementCapabilities \ -lVirt_EnabledLogicalElementCapabilities \ @@ -129,7 +130,9 @@ -lVirt_AllocationCapabilities \ -lVirt_VirtualSystemManagementService \ -lVirt_VSMigrationService \ - -lVirt_DevicePool + -lVirt_DevicePool \ + -lVirt_ConsoleRedirectionService \ + -lVirt_ConsoleRedirectionServiceCapabilities libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c diff -r f7b995404a9c -r 74a53f676911 src/Virt_ConsoleRedirectionServiceCapabilities.c --- a/src/Virt_ConsoleRedirectionServiceCapabilities.c Mon Oct 06 08:37:42 2008 -0700 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.c Wed Oct 22 06:44:21 2008 -0700 @@ -32,6 +32,7 @@ #include "svpc_types.h" #include "Virt_ConsoleRedirectionService.h" +#include "Virt_ConsoleRedirectionServiceCapabilities.h" const static CMPIBroker *_BROKER; @@ -69,10 +70,10 @@ return s; } -static CMPIStatus get_console_rs_caps(const CMPIBroker *broker, - const CMPIObjectPath *ref, - CMPIInstance **_inst, - bool is_get_inst) +CMPIStatus get_console_rs_caps(const CMPIBroker *broker, + const CMPIObjectPath *ref, + CMPIInstance **_inst, + bool is_get_inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; diff -r f7b995404a9c -r 74a53f676911 src/Virt_ConsoleRedirectionServiceCapabilities.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.h Wed Oct 22 06:44:21 2008 -0700 @@ -0,0 +1,35 @@ +/* + * Copyright IBM Corp. 2008 + * + * Authors: + * Richard Maciel + * + * 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 + */ + +CMPIStatus get_console_rs_caps(const CMPIBroker *broker, + const CMPIObjectPath *ref, + CMPIInstance **_inst, + bool is_get_inst); + + /* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff -r f7b995404a9c -r 74a53f676911 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Mon Oct 06 08:37:42 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Wed Oct 22 06:44:21 2008 -0700 @@ -41,6 +41,8 @@ #include "Virt_VSMigrationCapabilities.h" #include "Virt_AllocationCapabilities.h" #include "Virt_DevicePool.h" +#include "Virt_ConsoleRedirectionService.h" +#include "Virt_ConsoleRedirectionServiceCapabilities.h" #include "svpc_types.h" @@ -75,7 +77,13 @@ goto out; s = get_migration_service(ref, &_inst, _BROKER, context, false); - } else + } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) { + s = get_console_rs_caps(_BROKER, ref, &_inst, true); + if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + + s = get_console_rs(ref, &_inst, _BROKER, context, false); + } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, "Not found"); @@ -113,6 +121,12 @@ goto out; s = get_migration_caps(ref, &_inst, _BROKER, false); + } else if (STREQC(classname, "ConsoleRedirectionService")) { + s = get_console_rs(ref, &_inst, _BROKER, context, true); + if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + + s = get_console_rs_caps(_BROKER, ref, &_inst, false); } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, @@ -382,22 +396,28 @@ "Xen_HostSystem", "Xen_VirtualSystemManagementService", "Xen_VirtualSystemMigrationService", + "Xen_ConsoleRedirectionService", "KVM_HostSystem", "KVM_VirtualSystemManagementService", "KVM_VirtualSystemMigrationService", + "KVM_ConsoleRedirectionService", "LXC_HostSystem", "LXC_VirtualSystemManagementService", "LXC_VirtualSystemMigrationService", + "LXC_ConsoleRedirectionService", NULL }; static char *host_caps[] = { "Xen_VirtualSystemManagementCapabilities", "Xen_VirtualSystemMigrationCapabilities", + "Xen_ConsoleRedirectionServiceCapabilities", "KVM_VirtualSystemManagementCapabilities", "KVM_VirtualSystemMigrationCapabilities", + "KVM_ConsoleRedirectionServiceCapabilities", "LXC_VirtualSystemManagementCapabilities", "LXC_VirtualSystemMigrationCapabilities", + "LXC_ConsoleRedirectionServiceCapabilities", NULL, }; @@ -434,6 +454,9 @@ "Xen_VirtualSystemMigrationService", "KVM_VirtualSystemMigrationService", "LXC_VirtualSystemMigrationService", + "Xen_ConsoleRedirectionService", + "KVM_ConsoleRedirectionService", + "LXC_ConsoleRedirectionService", NULL }; From danms at us.ibm.com Wed Oct 22 15:27:58 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 22 Oct 2008 08:27:58 -0700 Subject: [Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection In-Reply-To: <74a53f67691133c24dac.1224688378@elm3b24.beaverton.ibm.com> (Richard Maciel's message of "Wed, 22 Oct 2008 08:12:58 -0700") References: <74a53f67691133c24dac.1224688378@elm3b24.beaverton.ibm.com> Message-ID: <87ljwgsl8h.fsf@caffeine.danplanet.com> RM> # HG changeset patch RM> # User Richard Maciel RM> # Date 1224683061 25200 RM> # Node ID 74a53f67691133c24dac6ce7a67583954ea6d0e7 RM> # Parent f7b995404a9c6a4c55374155b9d6826ad6fb2f3a RM> * Added association Console Redirections Service <-> Console Redirection RM> Service Capabilities into the ElementCapabilities.c file This looks better, but I can't apply to tip to test it. Can you rebase it please? Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From richardm at br.ibm.com Wed Oct 22 18:35:54 2008 From: richardm at br.ibm.com (Richard Maciel) Date: Wed, 22 Oct 2008 11:35:54 -0700 Subject: [Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection Message-ID: <35c5cab8577f353d4c4b.1224700554@elm3b24.beaverton.ibm.com> # HG changeset patch # User Richard Maciel # Date 1224700352 25200 # Node ID 35c5cab8577f353d4c4bbb7daf74fa667bcdc3cd # Parent ec6d265c6536f88a81c5336fa97028cffd6068ad * Added association Console Redirections Service <-> Console Redirection Service Capabilities into the ElementCapabilities.c file * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function get_console_rs_caps is not static anymore * Added ConsoleRedirectionServiceCapabilities.h to export the get_console_rs_caps function * get_console_rs_caps is not static anymore * Fixed whitespace issues * Removed not useful CU_DEBUG calls from ElementCapabilities.c file Signed-off-by: Richard Maciel diff -r ec6d265c6536 -r 35c5cab8577f src/Makefile.am --- a/src/Makefile.am Wed Oct 22 09:17:23 2008 -0700 +++ b/src/Makefile.am Wed Oct 22 11:32:32 2008 -0700 @@ -21,7 +21,8 @@ Virt_VirtualSystemSnapshotService.h \ Virt_VirtualSystemSnapshotServiceCapabilities.h \ Virt_VSMigrationSettingData.h \ - Virt_ConsoleRedirectionService.h + Virt_ConsoleRedirectionService.h \ + Virt_ConsoleRedirectionServiceCapabilities.h XKUADD = $(top_builddir)/libxkutil/libxkutil.la @@ -120,7 +121,7 @@ libVirt_AllocationCapabilities_la_SOURCES = Virt_AllocationCapabilities.c libVirt_AllocationCapabilities_la_LIBADD = -lVirt_DevicePool -libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la libVirt_AllocationCapabilities.la +libVirt_ElementCapabilities_la_DEPENDENCIES = libVirt_VirtualSystemManagementCapabilities.la libVirt_EnabledLogicalElementCapabilities.la libVirt_ComputerSystem.la libVirt_HostSystem.la libVirt_VSMigrationCapabilities.la libVirt_VirtualSystemManagementService.la libVirt_VSMigrationService.la libVirt_DevicePool.la libVirt_AllocationCapabilities.la libVirt_ConsoleRedirectionService.la libVirt_ConsoleRedirectionServiceCapabilities.la libVirt_ElementCapabilities_la_SOURCES = Virt_ElementCapabilities.c libVirt_ElementCapabilities_la_LIBADD = -lVirt_VirtualSystemManagementCapabilities \ -lVirt_EnabledLogicalElementCapabilities \ @@ -130,7 +131,9 @@ -lVirt_AllocationCapabilities \ -lVirt_VirtualSystemManagementService \ -lVirt_VSMigrationService \ - -lVirt_DevicePool + -lVirt_DevicePool \ + -lVirt_ConsoleRedirectionService \ + -lVirt_ConsoleRedirectionServiceCapabilities libVirt_SettingsDefineCapabilities_la_DEPENDENCIES = libVirt_RASD.la libVirt_DevicePool.la libVirt_VSMigrationCapabilities.la libVirt_VSMigrationSettingData.la libVirt_AllocationCapabilities.la libVirt_SettingsDefineCapabilities_la_SOURCES = Virt_SettingsDefineCapabilities.c diff -r ec6d265c6536 -r 35c5cab8577f src/Virt_ConsoleRedirectionServiceCapabilities.c --- a/src/Virt_ConsoleRedirectionServiceCapabilities.c Wed Oct 22 09:17:23 2008 -0700 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.c Wed Oct 22 11:32:32 2008 -0700 @@ -32,6 +32,7 @@ #include "svpc_types.h" #include "Virt_ConsoleRedirectionService.h" +#include "Virt_ConsoleRedirectionServiceCapabilities.h" const static CMPIBroker *_BROKER; @@ -69,10 +70,10 @@ return s; } -static CMPIStatus get_console_rs_caps(const CMPIBroker *broker, - const CMPIObjectPath *ref, - CMPIInstance **_inst, - bool is_get_inst) +CMPIStatus get_console_rs_caps(const CMPIBroker *broker, + const CMPIObjectPath *ref, + CMPIInstance **_inst, + bool is_get_inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; diff -r ec6d265c6536 -r 35c5cab8577f src/Virt_ConsoleRedirectionServiceCapabilities.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_ConsoleRedirectionServiceCapabilities.h Wed Oct 22 11:32:32 2008 -0700 @@ -0,0 +1,35 @@ +/* + * Copyright IBM Corp. 2008 + * + * Authors: + * Richard Maciel + * + * 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 + */ + +CMPIStatus get_console_rs_caps(const CMPIBroker *broker, + const CMPIObjectPath *ref, + CMPIInstance **_inst, + bool is_get_inst); + + /* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff -r ec6d265c6536 -r 35c5cab8577f src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Wed Oct 22 09:17:23 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Wed Oct 22 11:32:32 2008 -0700 @@ -41,6 +41,8 @@ #include "Virt_VSMigrationCapabilities.h" #include "Virt_AllocationCapabilities.h" #include "Virt_DevicePool.h" +#include "Virt_ConsoleRedirectionService.h" +#include "Virt_ConsoleRedirectionServiceCapabilities.h" #include "svpc_types.h" @@ -75,7 +77,13 @@ goto out; s = get_migration_service(ref, &_inst, _BROKER, context, false); - } else + } else if (STREQC(classname, "ConsoleRedirectionServiceCapabilities")) { + s = get_console_rs_caps(_BROKER, ref, &_inst, true); + if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + + s = get_console_rs(ref, &_inst, _BROKER, context, false); + } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, "Not found"); @@ -113,6 +121,12 @@ goto out; s = get_migration_caps(ref, &_inst, _BROKER, false); + } else if (STREQC(classname, "ConsoleRedirectionService")) { + s = get_console_rs(ref, &_inst, _BROKER, context, true); + if ((s.rc != CMPI_RC_OK) || (_inst == NULL)) + goto out; + + s = get_console_rs_caps(_BROKER, ref, &_inst, false); } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, @@ -382,22 +396,28 @@ "Xen_HostSystem", "Xen_VirtualSystemManagementService", "Xen_VirtualSystemMigrationService", + "Xen_ConsoleRedirectionService", "KVM_HostSystem", "KVM_VirtualSystemManagementService", "KVM_VirtualSystemMigrationService", + "KVM_ConsoleRedirectionService", "LXC_HostSystem", "LXC_VirtualSystemManagementService", "LXC_VirtualSystemMigrationService", + "LXC_ConsoleRedirectionService", NULL }; static char *host_caps[] = { "Xen_VirtualSystemManagementCapabilities", "Xen_VirtualSystemMigrationCapabilities", + "Xen_ConsoleRedirectionServiceCapabilities", "KVM_VirtualSystemManagementCapabilities", "KVM_VirtualSystemMigrationCapabilities", + "KVM_ConsoleRedirectionServiceCapabilities", "LXC_VirtualSystemManagementCapabilities", "LXC_VirtualSystemMigrationCapabilities", + "LXC_ConsoleRedirectionServiceCapabilities", "Xen_AllocationCapabilities", "KVM_AllocationCapabilities", "LXC_AllocationCapabilities", @@ -437,6 +457,9 @@ "Xen_VirtualSystemMigrationService", "KVM_VirtualSystemMigrationService", "LXC_VirtualSystemMigrationService", + "Xen_ConsoleRedirectionService", + "KVM_ConsoleRedirectionService", + "LXC_ConsoleRedirectionService", NULL }; From kaitlin at linux.vnet.ibm.com Wed Oct 22 18:39:57 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 22 Oct 2008 11:39:57 -0700 Subject: [Libvirt-cim] [PATCH] Add DisplayController device Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1224689317 25200 # Node ID a8e8c492537e87479011b393f424efd81eb5ea7d # Parent 09bff95fb0a130f9c5e9ba45ace31de8240a9f6b Add DisplayController device. This represents the graphics device for the system. Signed-off-by: Kaitlin Rupert diff -r 09bff95fb0a1 -r a8e8c492537e Makefile.am --- a/Makefile.am Wed Oct 22 08:28:01 2008 -0700 +++ b/Makefile.am Wed Oct 22 08:28:37 2008 -0700 @@ -46,7 +46,8 @@ schema/ConsoleRedirectionService.mof \ schema/ConsoleRedirectionServiceCapabilities.mof \ schema/ServiceAffectsElement.mof \ - schema/KVMRedirectionSAP.mof + schema/KVMRedirectionSAP.mof \ + schema/DisplayController.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -103,7 +104,8 @@ schema/ConsoleRedirectionService.registration \ schema/ConsoleRedirectionServiceCapabilities.registration \ schema/ServiceAffectsElement.registration \ - schema/KVMRedirectionSAP.registration + schema/KVMRedirectionSAP.registration \ + schema/DisplayController.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 09bff95fb0a1 -r a8e8c492537e libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Oct 22 08:28:01 2008 -0700 +++ b/libxkutil/device_parsing.c Wed Oct 22 08:28:37 2008 -0700 @@ -443,6 +443,7 @@ goto err; vdev->type = CIM_RES_TYPE_GRAPHICS; + vdev->id = strdup("graphics"); *vdevs = vdev; diff -r 09bff95fb0a1 -r a8e8c492537e schema/DisplayController.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/DisplayController.mof Wed Oct 22 08:28:37 2008 -0700 @@ -0,0 +1,17 @@ +// Copyright IBM Corp. 2007 + +[ Provider("cmpi::Virt_Device") ] +class Xen_DisplayController : CIM_DisplayController +{ +}; + +[ Provider("cmpi::Virt_Device") ] +class KVM_DisplayController : CIM_DisplayController +{ +}; + +[ Provider("cmpi::Virt_Device") ] +class LXC_DisplayController : CIM_DisplayController +{ +}; + diff -r 09bff95fb0a1 -r a8e8c492537e schema/DisplayController.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/DisplayController.registration Wed Oct 22 08:28:37 2008 -0700 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2008 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_DisplayController root/virt Virt_Device Virt_Device instance +KVM_DisplayController root/virt Virt_Device Virt_Device instance +LXC_DisplayController root/virt Virt_Device Virt_Device instance diff -r 09bff95fb0a1 -r a8e8c492537e src/Virt_Device.c --- a/src/Virt_Device.c Wed Oct 22 08:28:01 2008 -0700 +++ b/src/Virt_Device.c Wed Oct 22 08:28:37 2008 -0700 @@ -175,6 +175,45 @@ return inst; } +static int graphics_set_attr(CMPIInstance *instance, + struct graphics_device *dev) +{ + int rc; + char *vp_str = NULL; + + rc = asprintf(&vp_str, "vnc:%s", dev->port); + if (rc == -1) { + return 0; + } + + CMSetProperty(instance, "VideoProcessor", + (CMPIValue *)vp_str, CMPI_chars); + + free(vp_str); + + return 1; +} + +static CMPIInstance *graphics_instance(const CMPIBroker *broker, + struct graphics_device *dev, + const virDomainPtr dom, + const char *ns) +{ + CMPIInstance *inst; + virConnectPtr conn; + + conn = virDomainGetConnect(dom); + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "DisplayController", + ns); + + if (!graphics_set_attr(inst, dev)) + return NULL; + + return inst; +} + static int device_set_devid(CMPIInstance *instance, struct virt_device *dev, const virDomainPtr dom) @@ -314,7 +353,12 @@ else if (dev->type == CIM_RES_TYPE_PROC) { proc_count = dev->dev.vcpu.quantity; continue; - } else + } else if (dev->type == CIM_RES_TYPE_GRAPHICS) + instance = graphics_instance(broker, + &dev->dev.graphics, + dom, + ns); + else return false; if (!instance) @@ -346,6 +390,8 @@ return CIM_RES_TYPE_MEM; else if (strstr(classname, "Processor")) return CIM_RES_TYPE_PROC; + else if (strstr(classname, "DisplayController")) + return CIM_RES_TYPE_GRAPHICS; else return CIM_RES_TYPE_UNKNOWN; } diff -r 09bff95fb0a1 -r a8e8c492537e src/svpc_types.h --- a/src/svpc_types.h Wed Oct 22 08:28:01 2008 -0700 +++ b/src/svpc_types.h Wed Oct 22 08:28:37 2008 -0700 @@ -31,12 +31,13 @@ #define CIM_RES_TYPE_GRAPHICS 24 #define CIM_RES_TYPE_UNKNOWN 1000 -#define CIM_RES_TYPE_COUNT 4 +#define CIM_RES_TYPE_COUNT 5 const static int cim_res_types[CIM_RES_TYPE_COUNT] = {CIM_RES_TYPE_NET, CIM_RES_TYPE_DISK, CIM_RES_TYPE_MEM, CIM_RES_TYPE_PROC, + CIM_RES_TYPE_GRAPHICS, }; #define CIM_VSSD_RECOVERY_NONE 2 From kaitlin at linux.vnet.ibm.com Wed Oct 22 18:55:26 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 22 Oct 2008 11:55:26 -0700 Subject: [Libvirt-cim] [PATCH] * Added association Console Redirections Service <-> Console Redirection In-Reply-To: <35c5cab8577f353d4c4b.1224700554@elm3b24.beaverton.ibm.com> References: <35c5cab8577f353d4c4b.1224700554@elm3b24.beaverton.ibm.com> Message-ID: <48FF771E.5060703@linux.vnet.ibm.com> Richard Maciel wrote: > # HG changeset patch > # User Richard Maciel > # Date 1224700352 25200 > # Node ID 35c5cab8577f353d4c4bbb7daf74fa667bcdc3cd > # Parent ec6d265c6536f88a81c5336fa97028cffd6068ad > * Added association Console Redirections Service <-> Console Redirection > Service Capabilities into the ElementCapabilities.c file > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From fujimura.toshifumi at np.css.fujitsu.com Thu Oct 23 02:27:13 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 23 Oct 2008 11:27:13 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48FEFA52.8080202@linux.vnet.ibm.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> <48FEEE40.7040107@np.css.fujitsu.com> <48FEFA52.8080202@linux.vnet.ibm.com> Message-ID: <48FFE101.9010709@np.css.fujitsu.com> Thanks for your reply. These are its command's outputs. ============================================================================ localhost:5988/root/virt:CIM_ConcreteIdentity localhost:5988/root/virt:CIM_NetworkPacketAction localhost:5988/root/virt:CIM_MemberOfStatusCollection localhost:5988/root/virt:CIM_Collection localhost:5988/root/virt:CIM_IndicationHandler localhost:5988/root/virt:CIM_MetricDefForME localhost:5988/root/virt:CIM_PackageLocation localhost:5988/root/virt:CIM_OSPFServiceCapabilities localhost:5988/root/virt:CIM_BaseMetricValue localhost:5988/root/virt:CIM_ReplaceableProductFRU localhost:5988/root/virt:CIM_J2eeJMSConnectionStats localhost:5988/root/virt:CIM_PrioritySchedulingElement localhost:5988/root/virt:CIM_PhysicalComponent localhost:5988/root/virt:PRS_Person localhost:5988/root/virt:CIM_PublicKeyCertificate localhost:5988/root/virt:CIM_FileIdentity localhost:5988/root/virt:CIM_IPsecTransportAction localhost:5988/root/virt:CIM_iSCSISessionFailures localhost:5988/root/virt:CIM_UoWMetricDefinition localhost:5988/root/virt:PRS_SolutionHasElement localhost:5988/root/virt:CIM_ElementCapabilities localhost:5988/root/virt:CIM_IPCOMPTransform localhost:5988/root/virt:CIM_FilterList localhost:5988/root/virt:CIM_UnsignedPublicKey localhost:5988/root/virt:CIM_Setting localhost:5988/root/virt:CIM_IPSubnet localhost:5988/root/virt:CIM_ProductElementComponent localhost:5988/root/virt:CIM_StatisticsCapabilities localhost:5988/root/virt:CIM_TraceLevelType localhost:5988/root/virt:CIM_InstRead localhost:5988/root/virt:CIM_PreconfiguredSAAction localhost:5988/root/virt:CIM_Person localhost:5988/root/virt:PRS_ServiceRequester localhost:5988/root/virt:KVM_ElementCapabilities localhost:5988/root/virt:PRS_ServiceAgreement localhost:5988/root/virt:PRS_ExchangeElement localhost:5988/root/virt:CIM_FCPortRateStatistics localhost:5988/root/virt:CIM_CollectedBufferPool localhost:5988/root/virt:LXC_RegisteredProfile localhost:5988/root/virt:CIM_RedundancySetSettingData localhost:5988/root/virt:CIM_ElementProfile localhost:5988/root/virt:CIM_StorageError localhost:5988/root/virt:CIM_SubUoW localhost:5988/root/virt:PRS_SolutionResolution localhost:5988/root/virt:CIM_J2eeJMSSessionStats localhost:5988/root/virt:CIM_AuthenticationCondition localhost:5988/root/virt:CIM_FormattedIndicationSubscription localhost:5988/root/virt:CIM_TimeZone localhost:5988/root/virt:CIM_BufferPool localhost:5988/root/virt:CIM_AuthorizedTarget localhost:5988/root/virt:CIM_SharedSecret localhost:5988/root/virt:CIM_InstModification localhost:5988/root/virt:CIM_LogicalElementUnitOfWorkDef localhost:5988/root/virt:CIM_ProductFRU localhost:5988/root/virt:CIM_Statistics localhost:5988/root/virt:CIM_OrderedComponent localhost:5988/root/virt:CIM_InstMethodCall localhost:5988/root/virt:CIM_PolicyConditionInPolicyRule localhost:5988/root/virt:CIM_BlockStatisticsManifest localhost:5988/root/virt:CIM_SoftwareIdentityComponent localhost:5988/root/virt:PRS_Address localhost:5988/root/virt:CIM_Container localhost:5988/root/virt:CIM_BlockStatisticsManifestCollection localhost:5988/root/virt:CIM_IKEAction localhost:5988/root/virt:Xen_SettingsDefineState localhost:5988/root/virt:LXC_SettingsDefineState localhost:5988/root/virt:CIM_AccountMapsToAccount localhost:5988/root/virt:CIM_iSCSILoginStatistics localhost:5988/root/virt:CIM_MetricInstance localhost:5988/root/virt:Xen_RegisteredProfile localhost:5988/root/virt:CIM_DocumentAuthentication localhost:5988/root/virt:CIM_CollectionSetting localhost:5988/root/virt:CIM_Indication localhost:5988/root/virt:CIM_ScopedSettingData localhost:5988/root/virt:CIM_OSPFLink localhost:5988/root/virt:CIM_FileSystemSettingData localhost:5988/root/virt:CIM_DNSSettingData localhost:5988/root/virt:CIM_StatisticalData localhost:5988/root/virt:CIM_J2eeSessionBeanStats localhost:5988/root/virt:CIM_SystemInNamespace localhost:5988/root/virt:CIM_ElementCapacity localhost:5988/root/virt:CIM_CollectionConfiguration localhost:5988/root/virt:CIM_DeviceErrorData localhost:5988/root/virt:CIM_RegisteredProfile localhost:5988/root/virt:CIM_PolicyGroupInPolicyGroup localhost:5988/root/virt:KVM_RegisteredProfile localhost:5988/root/virt:CIM_NextHopIPRoute localhost:5988/root/virt:CIM_MoreOrgUnitInfo localhost:5988/root/virt:CIM_SoftwareIdentity localhost:5988/root/virt:CIM_OrgUnit localhost:5988/root/virt:CIM_ProductSoftwareFeatures localhost:5988/root/virt:CIM_IPConnectivitySubnet localhost:5988/root/virt:CIM_ContainedLocation localhost:5988/root/virt:CIM_SettingAssociatedToCapabilities localhost:5988/root/virt:CIM_ProductParentChild localhost:5988/root/virt:PRS_Resource localhost:5988/root/virt:CIM_SystemConfiguration localhost:5988/root/virt:PRS_Organization localhost:5988/root/virt:PRS_ProductParentChild localhost:5988/root/virt:CIM_Namespace localhost:5988/root/virt:Xen_ComputerSystemMigrationJobModifiedIndication localhost:5988/root/virt:PRS_StatementFeature localhost:5988/root/virt:CIM_ContainedProposal localhost:5988/root/virt:CIM_CollectionOfMSEs localhost:5988/root/virt:CIM_J2eeJCAConnectionPools localhost:5988/root/virt:CIM_BlockStatisticsCapabilities localhost:5988/root/virt:CIM_PolicyConditionInPolicyCondition localhost:5988/root/virt:Xen_ComputerSystemMigrationJobCreatedIndication localhost:5988/root/virt:CIM_UnitOfWorkDefinition localhost:5988/root/virt:CIM_CollectionInOrganization localhost:5988/root/virt:CIM_SoftwareInstallationServiceCapabilities localhost:5988/root/virt:CIM_StorageSynchronized localhost:5988/root/virt:CIM_SystemBusCard localhost:5988/root/virt:CIM_SubProfileRequiresProfile localhost:5988/root/virt:CIM_ZoneMembershipSettingData localhost:5988/root/virt:CIM_FRUIncludesProduct localhost:5988/root/virt:CIM_J2eeJMSSessionProducers localhost:5988/root/virt:CIM_StorageReplicationCapabilities localhost:5988/root/virt:CIM_PackageInSlot localhost:5988/root/virt:CIM_OwningCollectionElement localhost:5988/root/virt:LXC_ComputerSystemMigrationJobCreatedIndication localhost:5988/root/virt:LXC_ComputerSystemMigrationJobModifiedIndication localhost:5988/root/virt:CIM_ElementLocation localhost:5988/root/virt:CIM_J2eeStatelessSessionBeanStats localhost:5988/root/virt:KVM_ComputerSystemMigrationJobCreatedIndication localhost:5988/root/virt:PRS_ServiceActivity localhost:5988/root/virt:CIM_Directory localhost:5988/root/virt:CIM_Group localhost:5988/root/virt:CIM_SystemSettingContext localhost:5988/root/virt:CIM_OtherPersonInformation localhost:5988/root/virt:CIM_PolicySet localhost:5988/root/virt:CIM_DiagnosticResultForMSE localhost:5988/root/virt:CIM_J2eeJMSSessionConsumers localhost:5988/root/virt:CIM_CompatibleProduct localhost:5988/root/virt:CIM_AccountAuthentication localhost:5988/root/virt:CIM_CompoundPolicyCondition localhost:5988/root/virt:CIM_UsersCredential localhost:5988/root/virt:CIM_PreconfiguredTunnelAction localhost:5988/root/virt:CIM_SAProposal localhost:5988/root/virt:PRS_ServiceIncident localhost:5988/root/virt:CIM_VideoControllerResolution localhost:5988/root/virt:CIM_PreconfiguredTransportAction localhost:5988/root/virt:CIM_SystemSetting localhost:5988/root/virt:CIM_PhysicalElementLocation localhost:5988/root/virt:CIM_DiagnosticSetting localhost:5988/root/virt:CIM_SARule localhost:5988/root/virt:CIM_EnabledLogicalElementCapabilities localhost:5988/root/virt:CIM_InstIndication localhost:5988/root/virt:CIM_CIMOMStatisticalData localhost:5988/root/virt:CIM_Hdr8021Filter localhost:5988/root/virt:CIM_PolicySetComponent localhost:5988/root/virt:CIM_RejectConnectionAction localhost:5988/root/virt:CIM_PhysicalMemory localhost:5988/root/virt:Xen_ComputerSystemCreatedIndication localhost:5988/root/virt:CIM_CollectedSoftwareFeatures localhost:5988/root/virt:CIM_FilterOfPacketCondition localhost:5988/root/virt:PRS_Revision localhost:5988/root/virt:CIM_PolicyActionStructure localhost:5988/root/virt:KVM_ComputerSystemCreatedIndication localhost:5988/root/virt:CIM_J2eeServletStats localhost:5988/root/virt:CIM_X509CredentialFilterEntry localhost:5988/root/virt:CIM_VirtualSystemMigrationSettingData localhost:5988/root/virt:CIM_LogRecord localhost:5988/root/virt:CIM_DiagnosticCompletionRecord localhost:5988/root/virt:LXC_ComputerSystemCreatedIndication localhost:5988/root/virt:CIM_ConnectivityMembershipSettingData localhost:5988/root/virt:CIM_RangeOfIPAddresses localhost:5988/root/virt:CIM_FRUIncludesSoftwareFeature localhost:5988/root/virt:CIM_SupportAccess localhost:5988/root/virt:CIM_AuthenticationTarget localhost:5988/root/virt:CIM_IndicationHandlerCIMXML localhost:5988/root/virt:CIM_AuthorizedPrivilege localhost:5988/root/virt:CIM_MemoryOnCard localhost:5988/root/virt:CIM_UsersAccount localhost:5988/root/virt:CIM_IPsecProposal localhost:5988/root/virt:CIM_FibrePortEventCounters localhost:5988/root/virt:CIM_Chassis localhost:5988/root/virt:PRS_ActivityResource localhost:5988/root/virt:CIM_UoWMetric localhost:5988/root/virt:CIM_CollectedCollections localhost:5988/root/virt:CIM_UserContact localhost:5988/root/virt:PRS_AdministrativeContact localhost:5988/root/virt:CIM_J2eeJDBCConnectionPools localhost:5988/root/virt:CIM_Spared localhost:5988/root/virt:CIM_ElementConfiguration localhost:5988/root/virt:CIM_Location localhost:5988/root/virt:Xen_AllocationCapabilities localhost:5988/root/virt:CIM_Capabilities localhost:5988/root/virt:CIM_MonitorResolution localhost:5988/root/virt:CIM_DiagnosticServiceRecord localhost:5988/root/virt:CIM_PhysicalStatisticalInformation localhost:5988/root/virt:CIM_ExtraCapacityGroup localhost:5988/root/virt:CIM_BlockStorageStatisticalData localhost:5988/root/virt:PRS_Attachment localhost:5988/root/virt:CIM_DiagnosticSettingRecord localhost:5988/root/virt:CIM_SystemIdentification localhost:5988/root/virt:CIM_UnitOfWork localhost:5988/root/virt:CIM_AffectedJobElement localhost:5988/root/virt:CIM_NamedSharedIKESecret localhost:5988/root/virt:CIM_SAPStatisticalInformation localhost:5988/root/virt:PRS_FeatureResource localhost:5988/root/virt:CIM_StorageRedundancySet localhost:5988/root/virt:PRS_Feature localhost:5988/root/virt:CIM_PhysicalMedia localhost:5988/root/virt:CIM_Magazine localhost:5988/root/virt:CIM_J2eeStatefulSessionBeanStats localhost:5988/root/virt:CIM_BIOSFeatureBIOSElements localhost:5988/root/virt:PRS_ExpressionElement localhost:5988/root/virt:CIM_LANSegment localhost:5988/root/virt:CIM_NextHopRouting localhost:5988/root/virt:CIM_SpareGroup localhost:5988/root/virt:CIM_HomeForMedia localhost:5988/root/virt:PRS_Activity localhost:5988/root/virt:PRS_SolutionProblem localhost:5988/root/virt:CIM_DataFile localhost:5988/root/virt:CIM_MethodParameters localhost:5988/root/virt:CIM_FCPortStatistics localhost:5988/root/virt:KVM_VirtualSystemMigrationCapabilities localhost:5988/root/virt:CIM_CommonDatabaseStatistics localhost:5988/root/virt:CIM_OwningJobElement localhost:5988/root/virt:CIM_TransparentBridgingStatistics localhost:5988/root/virt:CIM_StatisticalSetting localhost:5988/root/virt:CIM_RoutingPolicy localhost:5988/root/virt:CIM_RedundancyComponent localhost:5988/root/virt:CIM_RangesOfConfiguration localhost:5988/root/virt:CIM_NetworkPortStatistics localhost:5988/root/virt:CIM_MemberPrincipal localhost:5988/root/virt:CIM_LocalizationCapabilities localhost:5988/root/virt:Xen_ElementSettingData localhost:5988/root/virt:CIM_ElementSettingData localhost:5988/root/virt:CIM_J2eeJDBCNonpooledConnections localhost:5988/root/virt:CIM_ConnectivityCollection localhost:5988/root/virt:CIM_PhysicalMediaInLocation localhost:5988/root/virt:LXC_ElementSettingData localhost:5988/root/virt:KVM_ElementSettingData localhost:5988/root/virt:CIM_AllocationCapabilities localhost:5988/root/virt:CIM_DeviceFile localhost:5988/root/virt:CIM_DatabaseSegmentSettingData localhost:5988/root/virt:CIM_PolicyRoleCollection localhost:5988/root/virt:CIM_NetworkPortSettings localhost:5988/root/virt:CIM_RedundancySetCapabilities localhost:5988/root/virt:CIM_StorageMediaLocation localhost:5988/root/virt:CIM_IPsecTunnelAction localhost:5988/root/virt:CIM_ChassisInRack localhost:5988/root/virt:CIM_SAStaticAction localhost:5988/root/virt:CIM_IPRoute localhost:5988/root/virt:CIM_LogicalElementPerformsUoW localhost:5988/root/virt:CIM_ComputerSystemNodeCapabilities localhost:5988/root/virt:CIM_PreambleFilter localhost:5988/root/virt:CIM_J2eeMessageDrivenBeanStats localhost:5988/root/virt:PRS_ContactPerson localhost:5988/root/virt:CIM_Account localhost:5988/root/virt:PRS_AdminAssociation localhost:5988/root/virt:PRS_SolutionReference localhost:5988/root/virt:CIM_Dependency localhost:5988/root/virt:CIM_EntriesInFilterList localhost:5988/root/virt:CIM_SymbolicLink localhost:5988/root/virt:CIM_ProductPhysicalComponent localhost:5988/root/virt:CIM_VendorPolicyCondition localhost:5988/root/virt:CIM_DiagnosticResultInPackage localhost:5988/root/virt:CIM_AuthorizationSubject localhost:5988/root/virt:CIM_LogicalPortSettings localhost:5988/root/virt:CIM_SwitchPortSpanningTreeStatistics localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities localhost:5988/root/virt:CIM_BGPCluster localhost:5988/root/virt:CIM_IndicationSubscription localhost:5988/root/virt:PRS_AdministrativeRevision localhost:5988/root/virt:CIM_RecordAppliesToElement localhost:5988/root/virt:LXC_SettingsDefineCapabilities localhost:5988/root/virt:PRS_Categorization localhost:5988/root/virt:CIM_ElementsLinked localhost:5988/root/virt:CIM_LogicalFile localhost:5988/root/virt:CIM_StorageNameBinding localhost:5988/root/virt:PRS_SolutionExpression localhost:5988/root/virt:CIM_StatisticsCollection localhost:5988/root/virt:KVM_AllocationCapabilities localhost:5988/root/virt:CIM_NamedAddressCollection localhost:5988/root/virt:CIM_FilterEntryBase localhost:5988/root/virt:CIM_RelatedStatistics localhost:5988/root/virt:CIM_PolicyAction localhost:5988/root/virt:CIM_AuthenticationRule localhost:5988/root/virt:CIM_ZoneCapabilities localhost:5988/root/virt:CIM_J2eeJDBCStats localhost:5988/root/virt:CIM_ProcessIndication localhost:5988/root/virt:CIM_PolicyTimePeriodCondition localhost:5988/root/virt:CIM_ElementInPolicyRoleCollection localhost:5988/root/virt:LXC_AllocationCapabilities localhost:5988/root/virt:CIM_SettingsAffectSettings localhost:5988/root/virt:CIM_StaticIPAssignmentSettingData localhost:5988/root/virt:CIM_StartedUoW localhost:5988/root/virt:CIM_SAAction localhost:5988/root/virt:CIM_IPXNetwork localhost:5988/root/virt:CIM_J2eeJMSProducerStats localhost:5988/root/virt:CIM_DiskGroup localhost:5988/root/virt:CIM_IPSOFilterEntry localhost:5988/root/virt:CIM_LogicalPortCapabilities localhost:5988/root/virt:CIM_CompoundPolicyAction localhost:5988/root/virt:CIM_AlertInstIndication localhost:5988/root/virt:CIM_TimeZoneSettingData localhost:5988/root/virt:PRS_AddressLocation localhost:5988/root/virt:CIM_J2eeManagedObjectCapabilities localhost:5988/root/virt:CIM_InstalledProduct localhost:5988/root/virt:CIM_VendorPolicyAction localhost:5988/root/virt:CIM_DatabaseResourceStatistics localhost:5988/root/virt:PRS_Agreement localhost:5988/root/virt:PRS_Solution localhost:5988/root/virt:CIM_SATransform localhost:5988/root/virt:CIM_AdministrativeDistance localhost:5988/root/virt:CIM_Privilege localhost:5988/root/virt:CIM_AHTransform localhost:5988/root/virt:CIM_PolicyRuleValidityPeriod localhost:5988/root/virt:CIM_OrderedDependency localhost:5988/root/virt:CIM_ElementSoftwareIdentity localhost:5988/root/virt:CIM_SecuritySensitivity localhost:5988/root/virt:CIM_PhysicalLink localhost:5988/root/virt:CIM_ManagedSystemElement localhost:5988/root/virt:CIM_VideoBIOSFeature localhost:5988/root/virt:CIM_BoundedPrioritySchedulingElement localhost:5988/root/virt:CIM_AGPSoftwareFeature localhost:5988/root/virt:CIM_PhysicalTape localhost:5988/root/virt:CIM_iSCSIConnectionSettings localhost:5988/root/virt:CIM_ClassModification localhost:5988/root/virt:CIM_ElementAsUser localhost:5988/root/virt:CIM_StorageSettingWithHints localhost:5988/root/virt:PRS_Statement localhost:5988/root/virt:CIM_DatabaseServiceStatistics localhost:5988/root/virt:CIM_RedundancyGroup localhost:5988/root/virt:CIM_iSCSISessionSettings localhost:5988/root/virt:LXC_ConcreteComponent localhost:5988/root/virt:CIM_ActsAsSpare localhost:5988/root/virt:CIM_PolicyRuleInPolicyGroup localhost:5988/root/virt:CIM_IPsecAction localhost:5988/root/virt:CIM_GroupInDiskGroup localhost:5988/root/virt:CIM_OrgStructure localhost:5988/root/virt:PRS_Transaction localhost:5988/root/virt:CIM_SoftwareElementComponent localhost:5988/root/virt:CIM_SwitchPortTransparentBridgingStatistics localhost:5988/root/virt:CIM_J2eeJMSConsumerStats localhost:5988/root/virt:KVM_SettingsDefineCapabilities localhost:5988/root/virt:CIM_SettingContext localhost:5988/root/virt:CIM_SoftwareFeatureComponent localhost:5988/root/virt:CIM_LogicalPortGroup localhost:5988/root/virt:CIM_SettingsDefineCapabilities localhost:5988/root/virt:CIM_SchedulingElement localhost:5988/root/virt:CIM_PolicyCondition localhost:5988/root/virt:CIM_MediaPhysicalStatData localhost:5988/root/virt:CIM_FCAdapterEventCounters localhost:5988/root/virt:CIM_HostedDependency localhost:5988/root/virt:CIM_OrganizationalEntity localhost:5988/root/virt:CIM_SCSIMultipathSettings localhost:5988/root/virt:CIM_FCSwitchCapabilities localhost:5988/root/virt:CIM_ConfigurationCapacity localhost:5988/root/virt:CIM_ScopedSetting localhost:5988/root/virt:CIM_FRUPhysicalElements localhost:5988/root/virt:CIM_UnixDirectory localhost:5988/root/virt:CIM_AuthenticationRequirement localhost:5988/root/virt:CIM_ElementStatisticalData localhost:5988/root/virt:CIM_PhysicalStatistics localhost:5988/root/virt:CIM_PickerStatData localhost:5988/root/virt:CIM_BGPEndpointStatistics localhost:5988/root/virt:CIM_J2eeNotification localhost:5988/root/virt:LXC_ReferencedProfile localhost:5988/root/virt:CIM_PhysicalElement localhost:5988/root/virt:CIM_UsersAccess localhost:5988/root/virt:CIM_StorageSettingsGeneratedFromCapabilities localhost:5988/root/virt:CIM_PublicPrivateKeyAuthentication localhost:5988/root/virt:CIM_NextHopRoute localhost:5988/root/virt:PRS_Category localhost:5988/root/virt:CIM_SystemSpecificCollection localhost:5988/root/virt:CIM_J2eeJMSEndpointStats localhost:5988/root/virt:CIM_DiagnosticServiceCapabilities localhost:5988/root/virt:CIM_PublicPrivateKeyPair localhost:5988/root/virt:CIM_PickerStatInfo localhost:5988/root/virt:PRS_Resolution localhost:5988/root/virt:PRS_ServiceResolutionSolution localhost:5988/root/virt:CIM_MediaPhysicalStatInfo localhost:5988/root/virt:CIM_InstCreation localhost:5988/root/virt:CIM_TokenRingPortStatistics localhost:5988/root/virt:CIM_ReferencedProfile localhost:5988/root/virt:CIM_PrintJob localhost:5988/root/virt:CIM_ElementSetting localhost:5988/root/virt:KVM_ReferencedProfile localhost:5988/root/virt:CIM_PowerManagementCapabilities localhost:5988/root/virt:CIM_ProductComponent localhost:5988/root/virt:CIM_SoftwareFeatureSoftwareElements localhost:5988/root/virt:CIM_Docked localhost:5988/root/virt:CIM_DependencyContext localhost:5988/root/virt:CIM_PolicySetValidityPeriod localhost:5988/root/virt:CIM_ConcreteCollection localhost:5988/root/virt:CIM_OtherOrgUnitInformation localhost:5988/root/virt:CIM_WRRSchedulingElement localhost:5988/root/virt:CIM_VideoBIOSFeatureVideoBIOSElements localhost:5988/root/virt:CIM_FCPortCapabilities localhost:5988/root/virt:CIM_ProductSupport localhost:5988/root/virt:CIM_SoftwareElement localhost:5988/root/virt:Xen_HostedDependency localhost:5988/root/virt:CIM_OSPFAreaConfiguration localhost:5988/root/virt:CIM_OtherOrganizationInformation localhost:5988/root/virt:CIM_MemoryCapacity localhost:5988/root/virt:CIM_PackagedComponent localhost:5988/root/virt:CIM_J2eeJMSStatConnections localhost:5988/root/virt:CIM_PhysicalConnector localhost:5988/root/virt:CIM_FIFOPipeFile localhost:5988/root/virt:CIM_RecordForLog localhost:5988/root/virt:CIM_Card localhost:5988/root/virt:CIM_RelatedStatisticalData localhost:5988/root/virt:CIM_Role localhost:5988/root/virt:CIM_FRU localhost:5988/root/virt:CIM_Zone localhost:5988/root/virt:CIM_SAEndpointConnectionStatistics localhost:5988/root/virt:PRS_ExpressionLink localhost:5988/root/virt:CIM_UnixProcessStatisticalInformation localhost:5988/root/virt:CIM_AllocationSchedulingElement localhost:5988/root/virt:CIM_Organization localhost:5988/root/virt:PRS_ContactOrganization localhost:5988/root/virt:CIM_Rack localhost:5988/root/virt:CIM_PolicyRule localhost:5988/root/virt:CIM_Product localhost:5988/root/virt:PRS_Product localhost:5988/root/virt:CIM_MoreOrganizationInfo localhost:5988/root/virt:CIM_SNMPTrapIndication localhost:5988/root/virt:PRS_ServiceProblem localhost:5988/root/virt:CIM_ElementSecuritySensitivity localhost:5988/root/virt:CIM_ConnectorOnPackage localhost:5988/root/virt:CIM_PhysicalCapacity localhost:5988/root/virt:CIM_PeerIDPayloadFilterEntry localhost:5988/root/virt:Xen_ReferencedProfile localhost:5988/root/virt:CIM_NetworkingIDAuthentication localhost:5988/root/virt:CIM_Configuration localhost:5988/root/virt:CIM_VirtualSystemMigrationCapabilities localhost:5988/root/virt:CIM_BIOSFeature localhost:5988/root/virt:CIM_ConfigurationData localhost:5988/root/virt:CIM_OrderedMemberOfCollection localhost:5988/root/virt:CIM_JobSettingData localhost:5988/root/virt:CIM_AssignedIdentity localhost:5988/root/virt:CIM_ThresholdIndication localhost:5988/root/virt:CIM_LogicalNetwork localhost:5988/root/virt:CIM_J2eeURLStats localhost:5988/root/virt:CIM_Synchronized localhost:5988/root/virt:CIM_DynamicForwardingEntry localhost:5988/root/virt:PRS_Problem localhost:5988/root/virt:CIM_Job localhost:5988/root/virt:PRS_Administrative localhost:5988/root/virt:CIM_DatabaseParameter localhost:5988/root/virt:LXC_EnabledLogicalElementCapabilities localhost:5988/root/virt:Xen_ComputerSystemMigrationJobDeletedIndication localhost:5988/root/virt:CIM_FilteredBGPAttributes localhost:5988/root/virt:CIM_Chip localhost:5988/root/virt:CIM_ReplacementFRU localhost:5988/root/virt:CIM_ListenerDestination localhost:5988/root/virt:CIM_CorrespondingSettingsRecord localhost:5988/root/virt:CIM_ReplacementSet localhost:5988/root/virt:PRS_ActivityTransaction localhost:5988/root/virt:LXC_ComputerSystemMigrationJobDeletedIndication localhost:5988/root/virt:KVM_ComputerSystemMigrationJobModifiedIndication localhost:5988/root/virt:CIM_ElementHasBeenFRUed localhost:5988/root/virt:PRS_RevisionContact localhost:5988/root/virt:CIM_PacketFilterCondition localhost:5988/root/virt:KVM_ComputerSystemMigrationJobDeletedIndication localhost:5988/root/virt:CIM_BiometricAuthentication localhost:5988/root/virt:CIM_IKEProposal localhost:5988/root/virt:CIM_ConcreteComponent localhost:5988/root/virt:CIM_Slot localhost:5988/root/virt:CIM_ClassCreation localhost:5988/root/virt:KVM_ConcreteComponent localhost:5988/root/virt:CIM_Identity localhost:5988/root/virt:Xen_ComputerSystemModifiedIndication localhost:5988/root/virt:PRS_CategoryParentChild localhost:5988/root/virt:CIM_MoreGroupInfo localhost:5988/root/virt:CIM_ListsInRoutingPolicy localhost:5988/root/virt:CIM_DeviceErrorCounts localhost:5988/root/virt:KVM_ComputerSystemModifiedIndication localhost:5988/root/virt:CIM_PoweredStatisticalData localhost:5988/root/virt:LXC_ComputerSystemModifiedIndication localhost:5988/root/virt:LXC_VirtualSystemMigrationSettingData localhost:5988/root/virt:CIM_Profile localhost:5988/root/virt:CIM_J2eeEJBStats localhost:5988/root/virt:CIM_IPNetworkIdentity localhost:5988/root/virt:CIM_CommonDatabaseCapabilities localhost:5988/root/virt:PRS_Contact localhost:5988/root/virt:CIM_FilterListsInBGPRouteMap localhost:5988/root/virt:CIM_ZoneSet localhost:5988/root/virt:CIM_MetricDefinition localhost:5988/root/virt:PRS_ActivityContact localhost:5988/root/virt:Xen_ConcreteComponent localhost:5988/root/virt:CIM_BGPPeerGroup localhost:5988/root/virt:CIM_SANegotiationAction localhost:5988/root/virt:CIM_Policy localhost:5988/root/virt:CIM_OtherGroupInformation localhost:5988/root/virt:CIM_PolicySetAppliesToElement localhost:5988/root/virt:LXC_VirtualSystemMigrationCapabilities localhost:5988/root/virt:CIM_ParameterValueSources localhost:5988/root/virt:CIM_LogicalElement localhost:5988/root/virt:CIM_J2eeJTAStats localhost:5988/root/virt:CIM_J2eeJCAStats localhost:5988/root/virt:CIM_ParametersForMethod localhost:5988/root/virt:CIM_J2eeJMSStats localhost:5988/root/virt:CIM_J2eeJVMStats localhost:5988/root/virt:CIM_J2eeStatistic localhost:5988/root/virt:PRS_ProductAsset localhost:5988/root/virt:KVM_EnabledLogicalElementCapabilities localhost:5988/root/virt:CIM_UserEntity localhost:5988/root/virt:CIM_StorageRedundancyGroup localhost:5988/root/virt:CIM_IPAssignmentSettingData localhost:5988/root/virt:CIM_ClassIndication localhost:5988/root/virt:CIM_IPXConnectivityNetwork localhost:5988/root/virt:CIM_AccountIdentity localhost:5988/root/virt:Xen_ElementConformsToProfile localhost:5988/root/virt:PRS_ServiceProvider localhost:5988/root/virt:CIM_ElementConformsToProfile localhost:5988/root/virt:KVM_ElementConformsToProfile localhost:5988/root/virt:KVM_ComputerSystemDeletedIndication localhost:5988/root/virt:CIM_UnixFile localhost:5988/root/virt:CIM_SwitchPortSourceRoutingStatistics localhost:5988/root/virt:Xen_ComputerSystemDeletedIndication localhost:5988/root/virt:PRS_Attached localhost:5988/root/virt:CIM_CardInSlot localhost:5988/root/virt:CIM_ListenerDestinationCIMXML localhost:5988/root/virt:CIM_RedundancySet localhost:5988/root/virt:CIM_ServiceStatisticalInformation localhost:5988/root/virt:CIM_J2eeEntityBeanStats localhost:5988/root/virt:CIM_BGPAttributes localhost:5988/root/virt:PRS_ContactItemAddress localhost:5988/root/virt:CIM_AdjacentSlots localhost:5988/root/virt:KVM_VirtualSystemMigrationSettingData localhost:5988/root/virt:CIM_SlotInSlot localhost:5988/root/virt:CIM_SettingData localhost:5988/root/virt:Xen_ElementCapabilities localhost:5988/root/virt:CIM_ProductPhysicalElements localhost:5988/root/virt:CIM_RegisteredSubProfile localhost:5988/root/virt:CIM_AlertIndication localhost:5988/root/virt:PRS_Location localhost:5988/root/virt:LXC_ElementCapabilities localhost:5988/root/virt:CIM_StorageSettingsAssociatedToCapabilities localhost:5988/root/virt:LXC_ComputerSystemDeletedIndication localhost:5988/root/virt:CIM_FileSystemCapabilities localhost:5988/root/virt:CIM_ConcreteDependency localhost:5988/root/virt:Xen_VirtualSystemSettingData localhost:5988/root/virt:CIM_IdentityContext localhost:5988/root/virt:CIM_DiagnosticRecord localhost:5988/root/virt:CIM_BGPRouteMapsInRoutingPolicy localhost:5988/root/virt:CIM_RelatedElementCausingError localhost:5988/root/virt:CIM_VirtualSystemSettingData localhost:5988/root/virt:KVM_VirtualSystemSettingData localhost:5988/root/virt:PRS_ProductComponent localhost:5988/root/virt:CIM_SAEndpointRefreshSettings localhost:5988/root/virt:CIM_ElementFRU localhost:5988/root/virt:CIM_PolicyConditionStructure localhost:5988/root/virt:CIM_J2eeJCANonpooledConnections localhost:5988/root/virt:LXC_HostedDependency localhost:5988/root/virt:CIM_InstalledProductImage localhost:5988/root/virt:CIM_StorageCapabilities localhost:5988/root/virt:LXC_VirtualSystemSettingData localhost:5988/root/virt:CIM_BGPStatistics localhost:5988/root/virt:CIM_UnixDeviceFile localhost:5988/root/virt:CIM_AuthorizationTarget localhost:5988/root/virt:CIM_Credential localhost:5988/root/virt:CIM_J2eeJavaMailStats localhost:5988/root/virt:CIM_ESPTransform localhost:5988/root/virt:CIM_PackageInConnector localhost:5988/root/virt:CIM_CollectedSoftwareElements localhost:5988/root/virt:CIM_GatewayPathID localhost:5988/root/virt:CIM_KerberosTicket localhost:5988/root/virt:CIM_PolicyGroup localhost:5988/root/virt:CIM_CardOnCard localhost:5988/root/virt:CIM_BaseMetricDefinition localhost:5988/root/virt:CIM_DNSGeneralSettingData localhost:5988/root/virt:CIM_StorageHardwareID localhost:5988/root/virt:CIM_StorageClientSettingData localhost:5988/root/virt:CIM_VideoBIOSElement localhost:5988/root/virt:LXC_ElementConformsToProfile localhost:5988/root/virt:PRS_ContactContactItem localhost:5988/root/virt:CIM_ProductProductDependency localhost:5988/root/virt:CIM_InstDeletion localhost:5988/root/virt:CIM_DiagnosticResult localhost:5988/root/virt:CIM_ProtocolControllerMaskingCapabilities localhost:5988/root/virt:CIM_AuthorizedSubject localhost:5988/root/virt:CIM_AbstractIndicationSubscription localhost:5988/root/virt:CIM_MetricForME localhost:5988/root/virt:CIM_SettingsDefineState localhost:5988/root/virt:CIM_PackageInChassis localhost:5988/root/virt:CIM_OtherRoleInformation localhost:5988/root/virt:CIM_EthernetPortStatistics localhost:5988/root/virt:CIM_BGPPathAttributes localhost:5988/root/virt:CIM_MediaAccessStatData localhost:5988/root/virt:CIM_SharedSecretAuthentication localhost:5988/root/virt:KVM_SettingsDefineState localhost:5988/root/virt:CIM_CollectedMSEs localhost:5988/root/virt:CIM_iSCSICapabilities localhost:5988/root/virt:PRS_SolutionElement localhost:5988/root/virt:PRS_Reference localhost:5988/root/virt:CIM_DeviceStatisticalInformation localhost:5988/root/virt:CIM_SubUoWDef localhost:5988/root/virt:PRS_ResolutionResource localhost:5988/root/virt:CIM_IPHeadersFilter localhost:5988/root/virt:CIM_DirectoryContainsFile localhost:5988/root/virt:CIM_MemoryWithMedia localhost:5988/root/virt:KVM_HostedDependency localhost:5988/root/virt:CIM_PolicySetInRoleCollection localhost:5988/root/virt:CIM_PolicyComponent localhost:5988/root/virt:CIM_StatisticalInformation localhost:5988/root/virt:CIM_PhysicalPackage localhost:5988/root/virt:CIM_AssociatedBlockStatisticsManifestCollection localhost:5988/root/virt:PRS_SolutionCategory localhost:5988/root/virt:CIM_LinkHasConnector localhost:5988/root/virt:CIM_SwitchPortStatistics localhost:5988/root/virt:CIM_IPAddressRange localhost:5988/root/virt:CIM_BGPRouteMap localhost:5988/root/virt:CIM_SystemStatisticalInformation localhost:5988/root/virt:CIM_LANConnectivitySegment localhost:5988/root/virt:CIM_AccessControlInformation localhost:5988/root/virt:CIM_ParticipatesInSet localhost:5988/root/virt:CIM_PhysicalFrame localhost:5988/root/virt:CIM_MediaAccessStatInfo localhost:5988/root/virt:CIM_IndicationFilter localhost:5988/root/virt:CIM_PhysicalCredentialAuthentication localhost:5988/root/virt:CIM_SpanningTreeStatistics localhost:5988/root/virt:CIM_LogicalIdentity localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities localhost:5988/root/virt:CIM_StaticForwardingEntry localhost:5988/root/virt:PRS_ContactItem localhost:5988/root/virt:CIM_FilterEntry localhost:5988/root/virt:CIM_ManagedElement localhost:5988/root/virt:Xen_SettingsDefineCapabilities localhost:5988/root/virt:CIM_LabelReaderStatData localhost:5988/root/virt:CIM_SoftwareFeature localhost:5988/root/virt:CIM_UoWDefTraceLevelType localhost:5988/root/virt:CIM_ClassDeletion localhost:5988/root/virt:CIM_MoreRoleInfo localhost:5988/root/virt:CIM_ConfigurationComponent localhost:5988/root/virt:CIM_MemoryError localhost:5988/root/virt:CIM_StatisticalRuntimeOverview localhost:5988/root/virt:CIM_J2eeConnectionStats localhost:5988/root/virt:Xen_VirtualSystemMigrationSettingData localhost:5988/root/virt:CIM_StorageSetting localhost:5988/root/virt:CIM_TransformOfPreconfiguredAction localhost:5988/root/virt:CIM_Component localhost:5988/root/virt:CIM_KerberosAuthentication localhost:5988/root/virt:CIM_LabelReaderStatInfo localhost:5988/root/virt:CIM_ConnectedTo localhost:5988/root/virt:CIM_SNMPDatabaseParameter localhost:5988/root/virt:CIM_MemberOfCollection localhost:5988/root/virt:CIM_J2eeJMSConnectionSessions localhost:5988/root/virt:CIM_StatusCollection localhost:5988/root/virt:CIM_ProductSoftwareComponent localhost:5988/root/virt:CIM_StorageConfigurationCapabilities localhost:5988/root/virt:PRS_Expression localhost:5988/root/virt:CIM_CommonDatabaseSettingData localhost:5988/root/virt:CIM_FCSwitchSettings localhost:5988/root/virt:CIM_BIOSElement localhost:5988/root/virt:CIM_J2eeConnectionPoolStats localhost:5988/root/virt:CIM_BGPPeerUsesRouteMap ============================================================================ Do these contain clues to solve? Works for me. Toshifumi Fujimura. > What is the output of > > wbemcli ecn http://root:pass at localhost:5988/root/virt > > Thanks and Regards, > Deepti. > > Toshifumi Fujimura wrote: >> Thanks for your reply. >> >> Currently, WBEM Client works for getting CIM_OperatingSystem. >> But not for getting KVM_ComputerSystem. >> (I attach the wbemcli output.) >> ======================================================================== >> [root at localhost ~]# wbemcli ei >> 'http://user:pass at localhost:5988/root/cimv2:cim_operatingsystem' >> localhost:5988/root/cimv2:PG_OperatingSystem.CreationClassName="CIM_OperatingSystem",CSCreationClassName="CIM_UnitaryComputerSystem", >> >> CSName="localhost.localdomain",Name="Fedora" >> CSCreationClassName="CIM_UnitaryComputerSystem",CSName="localhost.localdomain", >> >> CreationClassName="CIM_OperatingSystem",Name="Fedora",Caption="Fedora >> release 9.92 (Rawhide)",Description="Fedora release 9.92 (Rawhide)", >> Status="Unknown",OSType=36,OtherTypeDescription="2.6.27.3-27.rc1.fc10.i686.PAE >> >> #1 SMP Sat Oct 18 20:27:11 EDT >> 2008",Version="2.6.27.3-27.rc1.fc10.i686.PAE", >> LastBootUpTime=20081022122916.000000+540,LocalDateTime=20081022171753.000000+540,CurrentTimeZone=540,NumberOfLicensedUsers=0,NumberOfUsers=5,NumberOfProcesses=166, >> >> MaxNumberOfProcesses=196608,TotalSwapSpaceSize=4095992,TotalVirtualMemorySize=8233000,FreeVirtualMemory=4095992,FreePhysicalMemory=3384328,TotalVisibleMemorySize=4137008, >> >> MaxProcessMemorySize=4095992,Distributed=FALSE,MaxProcessesPerUser=196608,SystemUpTime=17317,OperatingSystemCapability="32 >> >> bit" >> >> [root at localhost ~]# wbemcli ein >> http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem >> * >> * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: KVM_ComputerSystem >> * >> ======================================================================== >> >> >> Anyway cimxxxxx shows Virt_xxx class. >> (I attach the "cimprovider -l" output.) >> ======================================================================== >> [root at localhost ~]# cimprovider -l >> OperatingSystemModule >> ComputerSystemModule >> ProcessModule >> Virt_AllocationCapabilities >> Virt_ComputerSystem >> Virt_ComputerSystemIndication >> Virt_ComputerSystemMigrationIndication >> Virt_ConcreteComponent >> Virt_ConsoleRedirectionService >> Virt_ConsoleRedirectionServiceCapabilities >> Virt_Device >> Virt_DevicePool >> Virt_ElementAllocatedFromPool >> Virt_ElementCapabilities >> Virt_ElementConformsToProfile >> Virt_ElementSettingData >> Virt_EnabledLogicalElementCapabilities >> Virt_HostedDependency >> Virt_HostedResourcePool >> Virt_HostedService >> Virt_HostSystem >> Virt_RASD >> Virt_ReferencedProfile >> Virt_RegisteredProfile >> Virt_ResourceAllocationFromPool >> Virt_ResourcePoolConfigurationCapabilities >> Virt_ResourcePoolConfigurationService >> Virt_ServiceAffectsElement >> Virt_SettingsDefineCapabilities >> Virt_SettingsDefineState >> Virt_SystemDevice >> Virt_VirtualSystemManagementCapabilities >> Virt_VirtualSystemManagementService >> Virt_VirtualSystemSnapshotService >> Virt_VirtualSystemSnapshotServiceCapabilities >> Virt_VSMigrationCapabilities >> Virt_VSMigrationService >> Virt_VSMigrationSettingData >> Virt_VSSD >> Virt_VSSDComponent >> ======================================================================== >> >>> From these, I guess libvirt-cim provider is not connected properly. >> Would you give me an advice to investigate it. >> >> Thanks >> >> Toshifumi Fujimura. >> >>> >>> >>> Kaitlin Rupert wrote: >>>> Toshifumi Fujimura wrote: >>>>> I think I've registerd Libvirt-CIM and Libcmputil as CIM Provider. >>>>> >>>>> I re-installed Libvirt-CIM package. >>>>> And I made sure that with Pegasus's command "cimprovider -s -l". >>>> >>>> You can check to make sure the providers are properly installed by >>>> running the following command. Replace user:pass with the username >>>> and password of the user that has CIM query rights. >>>> >>>> The convention is to use the root user or the pegasus user, but you >>>> can use any user since you've modified /etc/Pegasus/access.conf to >>>> allow all users. >>>> >>>> wbemcli ein >>>> http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem >>>> >>>> This should return something like the following: >>>> >>>> localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="demo2" >>>> >>>> >>>> When you run cimtest, you'll need to run the command as root and >>>> pass in the root username / password (this will need to be fixed in >>>> the future). >>>> >>>> CIM_NS=root/virt CIM_USER=root CIM_PASS=pass ./runtests libvirt-cim >>>> -i localhost -d -v KVM >>>> >>>>> >>>>> But following error messages didn't disappear. >>>>> ============================================================== >>>>> -------------------------------------------------------------------- >>>>> AllocationCapabilities - 01_enum.py: FAIL >>>>> ERROR - Failed to enumerate the class of >>>>> KVM_AllocationCapabilities >>>>> ERROR - Unauthorized >>>>> ERROR - Only 0 pools returned, expected at least 4 >>>>> -------------------------------------------------------------------- >>>>> AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL >>>>> ERROR - AuthError : Unauthorized >>>>> Traceback (most recent call last): >>>>> File "./lib/XenKvmLib/const.py", line 116, in do_try >>>>> File "02_alloccap_gi_errs.py", line 109, in main >>>>> expr_values=exp['invalid_keyvalue'], bug_no="") >>>>> File "./lib/XenKvmLib/common_util.py", line 264, in try_getinstance >>>>> File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >>>>> line 464, in GetInstance >>>>> **params) >>>>> File "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >>>>> line 181, in imethodcall >>>>> verify_callback = self.verify_callback) >>>>> File "/usr/lib/python2.5/site-packages/pywbem/cim_http.py", line >>>>> 226, in wbem_request >>>>> raise AuthError(response.reason) >>>>> AuthError: Unauthorized >>>>> ERROR - None >>>>> -------------------------------------------------------------------- >>>>> ============================================================== >>>>> Would you have any more suggestion of this messages? >>>> >>>> This error is because pywbem is unable to authenticate with >>>> Pegasus. Be sure the following query works (change pass to the >>>> proper password): >>>> >>>> wbemcli ein >>>> http://root:pass at localhost:5988/root/virt:KVM_ComputerSystem >>>> >>>> Hope this helps! =) >>>> >>> You can also verify if the required providers are installed by using >>> the following query: >>> >>> wbemcli ecn http://root:pass at localhost:5988/root/virt >>> >>> The above query will report all the providers registered with the >>> /root/virt namespace. >>> you can use the same query replacing the above /root/virt with other >>> namespace like /root/interop to know the providers registered in >>> that particular namespace. >>> >>> Regards, >>> Deepti. >>> >>> _______________________________________________ >>> 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 > > -- Toshifumi Fujimura. From deeptik at linux.vnet.ibm.com Thu Oct 23 04:55:53 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 23 Oct 2008 10:25:53 +0530 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <48FFE101.9010709@np.css.fujitsu.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> <48FEEE40.7040107@np.css.fujitsu.com> <48FEFA52.8080202@linux.vnet.ibm.com> <48FFE101.9010709@np.css.fujitsu.com> Message-ID: <490003D9.80100@linux.vnet.ibm.com> From the o/p what you have given you do not have KVM_ComputerSystem registered and that is why you are not able to get the records when you query with KVM_ComputerSystem. When required you can use the following to verify if a particular provider is registered by using wbemcli ecn http://root:pass at localhost:5988/root/virt | grep KVM_ComputerSystem In your libvirt-cim directory, run the following: sudo make preuninstall sudo make preinstall sudo make postinstall Then restart Pegasus. The following query: wbemcli ein http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem might not return any records if you don't have any guests defined. In that case, you can also try: http://user:pass at localhost:5988/root/virt:KVM_VirtualSystemManagementService That should always return an instance. Thanks and Regards, Deepti. Toshifumi Fujimura wrote: > Thanks for your reply. > > These are its command's outputs. > ============================================================================ > > localhost:5988/root/virt:CIM_ConcreteIdentity > localhost:5988/root/virt:CIM_NetworkPacketAction > localhost:5988/root/virt:CIM_MemberOfStatusCollection > localhost:5988/root/virt:CIM_Collection > localhost:5988/root/virt:CIM_IndicationHandler > localhost:5988/root/virt:CIM_MetricDefForME > localhost:5988/root/virt:CIM_PackageLocation > localhost:5988/root/virt:CIM_OSPFServiceCapabilities > localhost:5988/root/virt:CIM_BaseMetricValue > localhost:5988/root/virt:CIM_ReplaceableProductFRU > localhost:5988/root/virt:CIM_J2eeJMSConnectionStats > localhost:5988/root/virt:CIM_PrioritySchedulingElement > localhost:5988/root/virt:CIM_PhysicalComponent > localhost:5988/root/virt:PRS_Person > localhost:5988/root/virt:CIM_PublicKeyCertificate > localhost:5988/root/virt:CIM_FileIdentity > localhost:5988/root/virt:CIM_IPsecTransportAction > localhost:5988/root/virt:CIM_iSCSISessionFailures > localhost:5988/root/virt:CIM_UoWMetricDefinition > localhost:5988/root/virt:PRS_SolutionHasElement > localhost:5988/root/virt:CIM_ElementCapabilities > localhost:5988/root/virt:CIM_IPCOMPTransform > localhost:5988/root/virt:CIM_FilterList > localhost:5988/root/virt:CIM_UnsignedPublicKey > localhost:5988/root/virt:CIM_Setting > localhost:5988/root/virt:CIM_IPSubnet > localhost:5988/root/virt:CIM_ProductElementComponent > localhost:5988/root/virt:CIM_StatisticsCapabilities > localhost:5988/root/virt:CIM_TraceLevelType > localhost:5988/root/virt:CIM_InstRead > localhost:5988/root/virt:CIM_PreconfiguredSAAction > localhost:5988/root/virt:CIM_Person > localhost:5988/root/virt:PRS_ServiceRequester > localhost:5988/root/virt:KVM_ElementCapabilities > localhost:5988/root/virt:PRS_ServiceAgreement > localhost:5988/root/virt:PRS_ExchangeElement > localhost:5988/root/virt:CIM_FCPortRateStatistics > localhost:5988/root/virt:CIM_CollectedBufferPool > localhost:5988/root/virt:LXC_RegisteredProfile > localhost:5988/root/virt:CIM_RedundancySetSettingData > localhost:5988/root/virt:CIM_ElementProfile > localhost:5988/root/virt:CIM_StorageError > localhost:5988/root/virt:CIM_SubUoW > localhost:5988/root/virt:PRS_SolutionResolution > localhost:5988/root/virt:CIM_J2eeJMSSessionStats > localhost:5988/root/virt:CIM_AuthenticationCondition > localhost:5988/root/virt:CIM_FormattedIndicationSubscription > localhost:5988/root/virt:CIM_TimeZone > localhost:5988/root/virt:CIM_BufferPool > localhost:5988/root/virt:CIM_AuthorizedTarget > localhost:5988/root/virt:CIM_SharedSecret > localhost:5988/root/virt:CIM_InstModification > localhost:5988/root/virt:CIM_LogicalElementUnitOfWorkDef > localhost:5988/root/virt:CIM_ProductFRU > localhost:5988/root/virt:CIM_Statistics > localhost:5988/root/virt:CIM_OrderedComponent > localhost:5988/root/virt:CIM_InstMethodCall > localhost:5988/root/virt:CIM_PolicyConditionInPolicyRule > localhost:5988/root/virt:CIM_BlockStatisticsManifest > localhost:5988/root/virt:CIM_SoftwareIdentityComponent > localhost:5988/root/virt:PRS_Address > localhost:5988/root/virt:CIM_Container > localhost:5988/root/virt:CIM_BlockStatisticsManifestCollection > localhost:5988/root/virt:CIM_IKEAction > localhost:5988/root/virt:Xen_SettingsDefineState > localhost:5988/root/virt:LXC_SettingsDefineState > localhost:5988/root/virt:CIM_AccountMapsToAccount > localhost:5988/root/virt:CIM_iSCSILoginStatistics > localhost:5988/root/virt:CIM_MetricInstance > localhost:5988/root/virt:Xen_RegisteredProfile > localhost:5988/root/virt:CIM_DocumentAuthentication > localhost:5988/root/virt:CIM_CollectionSetting > localhost:5988/root/virt:CIM_Indication > localhost:5988/root/virt:CIM_ScopedSettingData > localhost:5988/root/virt:CIM_OSPFLink > localhost:5988/root/virt:CIM_FileSystemSettingData > localhost:5988/root/virt:CIM_DNSSettingData > localhost:5988/root/virt:CIM_StatisticalData > localhost:5988/root/virt:CIM_J2eeSessionBeanStats > localhost:5988/root/virt:CIM_SystemInNamespace > localhost:5988/root/virt:CIM_ElementCapacity > localhost:5988/root/virt:CIM_CollectionConfiguration > localhost:5988/root/virt:CIM_DeviceErrorData > localhost:5988/root/virt:CIM_RegisteredProfile > localhost:5988/root/virt:CIM_PolicyGroupInPolicyGroup > localhost:5988/root/virt:KVM_RegisteredProfile > localhost:5988/root/virt:CIM_NextHopIPRoute > localhost:5988/root/virt:CIM_MoreOrgUnitInfo > localhost:5988/root/virt:CIM_SoftwareIdentity > localhost:5988/root/virt:CIM_OrgUnit > localhost:5988/root/virt:CIM_ProductSoftwareFeatures > localhost:5988/root/virt:CIM_IPConnectivitySubnet > localhost:5988/root/virt:CIM_ContainedLocation > localhost:5988/root/virt:CIM_SettingAssociatedToCapabilities > localhost:5988/root/virt:CIM_ProductParentChild > localhost:5988/root/virt:PRS_Resource > localhost:5988/root/virt:CIM_SystemConfiguration > localhost:5988/root/virt:PRS_Organization > localhost:5988/root/virt:PRS_ProductParentChild > localhost:5988/root/virt:CIM_Namespace > localhost:5988/root/virt:Xen_ComputerSystemMigrationJobModifiedIndication > localhost:5988/root/virt:PRS_StatementFeature > localhost:5988/root/virt:CIM_ContainedProposal > localhost:5988/root/virt:CIM_CollectionOfMSEs > localhost:5988/root/virt:CIM_J2eeJCAConnectionPools > localhost:5988/root/virt:CIM_BlockStatisticsCapabilities > localhost:5988/root/virt:CIM_PolicyConditionInPolicyCondition > localhost:5988/root/virt:Xen_ComputerSystemMigrationJobCreatedIndication > localhost:5988/root/virt:CIM_UnitOfWorkDefinition > localhost:5988/root/virt:CIM_CollectionInOrganization > localhost:5988/root/virt:CIM_SoftwareInstallationServiceCapabilities > localhost:5988/root/virt:CIM_StorageSynchronized > localhost:5988/root/virt:CIM_SystemBusCard > localhost:5988/root/virt:CIM_SubProfileRequiresProfile > localhost:5988/root/virt:CIM_ZoneMembershipSettingData > localhost:5988/root/virt:CIM_FRUIncludesProduct > localhost:5988/root/virt:CIM_J2eeJMSSessionProducers > localhost:5988/root/virt:CIM_StorageReplicationCapabilities > localhost:5988/root/virt:CIM_PackageInSlot > localhost:5988/root/virt:CIM_OwningCollectionElement > localhost:5988/root/virt:LXC_ComputerSystemMigrationJobCreatedIndication > localhost:5988/root/virt:LXC_ComputerSystemMigrationJobModifiedIndication > localhost:5988/root/virt:CIM_ElementLocation > localhost:5988/root/virt:CIM_J2eeStatelessSessionBeanStats > localhost:5988/root/virt:KVM_ComputerSystemMigrationJobCreatedIndication > localhost:5988/root/virt:PRS_ServiceActivity > localhost:5988/root/virt:CIM_Directory > localhost:5988/root/virt:CIM_Group > localhost:5988/root/virt:CIM_SystemSettingContext > localhost:5988/root/virt:CIM_OtherPersonInformation > localhost:5988/root/virt:CIM_PolicySet > localhost:5988/root/virt:CIM_DiagnosticResultForMSE > localhost:5988/root/virt:CIM_J2eeJMSSessionConsumers > localhost:5988/root/virt:CIM_CompatibleProduct > localhost:5988/root/virt:CIM_AccountAuthentication > localhost:5988/root/virt:CIM_CompoundPolicyCondition > localhost:5988/root/virt:CIM_UsersCredential > localhost:5988/root/virt:CIM_PreconfiguredTunnelAction > localhost:5988/root/virt:CIM_SAProposal > localhost:5988/root/virt:PRS_ServiceIncident > localhost:5988/root/virt:CIM_VideoControllerResolution > localhost:5988/root/virt:CIM_PreconfiguredTransportAction > localhost:5988/root/virt:CIM_SystemSetting > localhost:5988/root/virt:CIM_PhysicalElementLocation > localhost:5988/root/virt:CIM_DiagnosticSetting > localhost:5988/root/virt:CIM_SARule > localhost:5988/root/virt:CIM_EnabledLogicalElementCapabilities > localhost:5988/root/virt:CIM_InstIndication > localhost:5988/root/virt:CIM_CIMOMStatisticalData > localhost:5988/root/virt:CIM_Hdr8021Filter > localhost:5988/root/virt:CIM_PolicySetComponent > localhost:5988/root/virt:CIM_RejectConnectionAction > localhost:5988/root/virt:CIM_PhysicalMemory > localhost:5988/root/virt:Xen_ComputerSystemCreatedIndication > localhost:5988/root/virt:CIM_CollectedSoftwareFeatures > localhost:5988/root/virt:CIM_FilterOfPacketCondition > localhost:5988/root/virt:PRS_Revision > localhost:5988/root/virt:CIM_PolicyActionStructure > localhost:5988/root/virt:KVM_ComputerSystemCreatedIndication > localhost:5988/root/virt:CIM_J2eeServletStats > localhost:5988/root/virt:CIM_X509CredentialFilterEntry > localhost:5988/root/virt:CIM_VirtualSystemMigrationSettingData > localhost:5988/root/virt:CIM_LogRecord > localhost:5988/root/virt:CIM_DiagnosticCompletionRecord > localhost:5988/root/virt:LXC_ComputerSystemCreatedIndication > localhost:5988/root/virt:CIM_ConnectivityMembershipSettingData > localhost:5988/root/virt:CIM_RangeOfIPAddresses > localhost:5988/root/virt:CIM_FRUIncludesSoftwareFeature > localhost:5988/root/virt:CIM_SupportAccess > localhost:5988/root/virt:CIM_AuthenticationTarget > localhost:5988/root/virt:CIM_IndicationHandlerCIMXML > localhost:5988/root/virt:CIM_AuthorizedPrivilege > localhost:5988/root/virt:CIM_MemoryOnCard > localhost:5988/root/virt:CIM_UsersAccount > localhost:5988/root/virt:CIM_IPsecProposal > localhost:5988/root/virt:CIM_FibrePortEventCounters > localhost:5988/root/virt:CIM_Chassis > localhost:5988/root/virt:PRS_ActivityResource > localhost:5988/root/virt:CIM_UoWMetric > localhost:5988/root/virt:CIM_CollectedCollections > localhost:5988/root/virt:CIM_UserContact > localhost:5988/root/virt:PRS_AdministrativeContact > localhost:5988/root/virt:CIM_J2eeJDBCConnectionPools > localhost:5988/root/virt:CIM_Spared > localhost:5988/root/virt:CIM_ElementConfiguration > localhost:5988/root/virt:CIM_Location > localhost:5988/root/virt:Xen_AllocationCapabilities > localhost:5988/root/virt:CIM_Capabilities > localhost:5988/root/virt:CIM_MonitorResolution > localhost:5988/root/virt:CIM_DiagnosticServiceRecord > localhost:5988/root/virt:CIM_PhysicalStatisticalInformation > localhost:5988/root/virt:CIM_ExtraCapacityGroup > localhost:5988/root/virt:CIM_BlockStorageStatisticalData > localhost:5988/root/virt:PRS_Attachment > localhost:5988/root/virt:CIM_DiagnosticSettingRecord > localhost:5988/root/virt:CIM_SystemIdentification > localhost:5988/root/virt:CIM_UnitOfWork > localhost:5988/root/virt:CIM_AffectedJobElement > localhost:5988/root/virt:CIM_NamedSharedIKESecret > localhost:5988/root/virt:CIM_SAPStatisticalInformation > localhost:5988/root/virt:PRS_FeatureResource > localhost:5988/root/virt:CIM_StorageRedundancySet > localhost:5988/root/virt:PRS_Feature > localhost:5988/root/virt:CIM_PhysicalMedia > localhost:5988/root/virt:CIM_Magazine > localhost:5988/root/virt:CIM_J2eeStatefulSessionBeanStats > localhost:5988/root/virt:CIM_BIOSFeatureBIOSElements > localhost:5988/root/virt:PRS_ExpressionElement > localhost:5988/root/virt:CIM_LANSegment > localhost:5988/root/virt:CIM_NextHopRouting > localhost:5988/root/virt:CIM_SpareGroup > localhost:5988/root/virt:CIM_HomeForMedia > localhost:5988/root/virt:PRS_Activity > localhost:5988/root/virt:PRS_SolutionProblem > localhost:5988/root/virt:CIM_DataFile > localhost:5988/root/virt:CIM_MethodParameters > localhost:5988/root/virt:CIM_FCPortStatistics > localhost:5988/root/virt:KVM_VirtualSystemMigrationCapabilities > localhost:5988/root/virt:CIM_CommonDatabaseStatistics > localhost:5988/root/virt:CIM_OwningJobElement > localhost:5988/root/virt:CIM_TransparentBridgingStatistics > localhost:5988/root/virt:CIM_StatisticalSetting > localhost:5988/root/virt:CIM_RoutingPolicy > localhost:5988/root/virt:CIM_RedundancyComponent > localhost:5988/root/virt:CIM_RangesOfConfiguration > localhost:5988/root/virt:CIM_NetworkPortStatistics > localhost:5988/root/virt:CIM_MemberPrincipal > localhost:5988/root/virt:CIM_LocalizationCapabilities > localhost:5988/root/virt:Xen_ElementSettingData > localhost:5988/root/virt:CIM_ElementSettingData > localhost:5988/root/virt:CIM_J2eeJDBCNonpooledConnections > localhost:5988/root/virt:CIM_ConnectivityCollection > localhost:5988/root/virt:CIM_PhysicalMediaInLocation > localhost:5988/root/virt:LXC_ElementSettingData > localhost:5988/root/virt:KVM_ElementSettingData > localhost:5988/root/virt:CIM_AllocationCapabilities > localhost:5988/root/virt:CIM_DeviceFile > localhost:5988/root/virt:CIM_DatabaseSegmentSettingData > localhost:5988/root/virt:CIM_PolicyRoleCollection > localhost:5988/root/virt:CIM_NetworkPortSettings > localhost:5988/root/virt:CIM_RedundancySetCapabilities > localhost:5988/root/virt:CIM_StorageMediaLocation > localhost:5988/root/virt:CIM_IPsecTunnelAction > localhost:5988/root/virt:CIM_ChassisInRack > localhost:5988/root/virt:CIM_SAStaticAction > localhost:5988/root/virt:CIM_IPRoute > localhost:5988/root/virt:CIM_LogicalElementPerformsUoW > localhost:5988/root/virt:CIM_ComputerSystemNodeCapabilities > localhost:5988/root/virt:CIM_PreambleFilter > localhost:5988/root/virt:CIM_J2eeMessageDrivenBeanStats > localhost:5988/root/virt:PRS_ContactPerson > localhost:5988/root/virt:CIM_Account > localhost:5988/root/virt:PRS_AdminAssociation > localhost:5988/root/virt:PRS_SolutionReference > localhost:5988/root/virt:CIM_Dependency > localhost:5988/root/virt:CIM_EntriesInFilterList > localhost:5988/root/virt:CIM_SymbolicLink > localhost:5988/root/virt:CIM_ProductPhysicalComponent > localhost:5988/root/virt:CIM_VendorPolicyCondition > localhost:5988/root/virt:CIM_DiagnosticResultInPackage > localhost:5988/root/virt:CIM_AuthorizationSubject > localhost:5988/root/virt:CIM_LogicalPortSettings > localhost:5988/root/virt:CIM_SwitchPortSpanningTreeStatistics > localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities > localhost:5988/root/virt:CIM_BGPCluster > localhost:5988/root/virt:CIM_IndicationSubscription > localhost:5988/root/virt:PRS_AdministrativeRevision > localhost:5988/root/virt:CIM_RecordAppliesToElement > localhost:5988/root/virt:LXC_SettingsDefineCapabilities > localhost:5988/root/virt:PRS_Categorization > localhost:5988/root/virt:CIM_ElementsLinked > localhost:5988/root/virt:CIM_LogicalFile > localhost:5988/root/virt:CIM_StorageNameBinding > localhost:5988/root/virt:PRS_SolutionExpression > localhost:5988/root/virt:CIM_StatisticsCollection > localhost:5988/root/virt:KVM_AllocationCapabilities > localhost:5988/root/virt:CIM_NamedAddressCollection > localhost:5988/root/virt:CIM_FilterEntryBase > localhost:5988/root/virt:CIM_RelatedStatistics > localhost:5988/root/virt:CIM_PolicyAction > localhost:5988/root/virt:CIM_AuthenticationRule > localhost:5988/root/virt:CIM_ZoneCapabilities > localhost:5988/root/virt:CIM_J2eeJDBCStats > localhost:5988/root/virt:CIM_ProcessIndication > localhost:5988/root/virt:CIM_PolicyTimePeriodCondition > localhost:5988/root/virt:CIM_ElementInPolicyRoleCollection > localhost:5988/root/virt:LXC_AllocationCapabilities > localhost:5988/root/virt:CIM_SettingsAffectSettings > localhost:5988/root/virt:CIM_StaticIPAssignmentSettingData > localhost:5988/root/virt:CIM_StartedUoW > localhost:5988/root/virt:CIM_SAAction > localhost:5988/root/virt:CIM_IPXNetwork > localhost:5988/root/virt:CIM_J2eeJMSProducerStats > localhost:5988/root/virt:CIM_DiskGroup > localhost:5988/root/virt:CIM_IPSOFilterEntry > localhost:5988/root/virt:CIM_LogicalPortCapabilities > localhost:5988/root/virt:CIM_CompoundPolicyAction > localhost:5988/root/virt:CIM_AlertInstIndication > localhost:5988/root/virt:CIM_TimeZoneSettingData > localhost:5988/root/virt:PRS_AddressLocation > localhost:5988/root/virt:CIM_J2eeManagedObjectCapabilities > localhost:5988/root/virt:CIM_InstalledProduct > localhost:5988/root/virt:CIM_VendorPolicyAction > localhost:5988/root/virt:CIM_DatabaseResourceStatistics > localhost:5988/root/virt:PRS_Agreement > localhost:5988/root/virt:PRS_Solution > localhost:5988/root/virt:CIM_SATransform > localhost:5988/root/virt:CIM_AdministrativeDistance > localhost:5988/root/virt:CIM_Privilege > localhost:5988/root/virt:CIM_AHTransform > localhost:5988/root/virt:CIM_PolicyRuleValidityPeriod > localhost:5988/root/virt:CIM_OrderedDependency > localhost:5988/root/virt:CIM_ElementSoftwareIdentity > localhost:5988/root/virt:CIM_SecuritySensitivity > localhost:5988/root/virt:CIM_PhysicalLink > localhost:5988/root/virt:CIM_ManagedSystemElement > localhost:5988/root/virt:CIM_VideoBIOSFeature > localhost:5988/root/virt:CIM_BoundedPrioritySchedulingElement > localhost:5988/root/virt:CIM_AGPSoftwareFeature > localhost:5988/root/virt:CIM_PhysicalTape > localhost:5988/root/virt:CIM_iSCSIConnectionSettings > localhost:5988/root/virt:CIM_ClassModification > localhost:5988/root/virt:CIM_ElementAsUser > localhost:5988/root/virt:CIM_StorageSettingWithHints > localhost:5988/root/virt:PRS_Statement > localhost:5988/root/virt:CIM_DatabaseServiceStatistics > localhost:5988/root/virt:CIM_RedundancyGroup > localhost:5988/root/virt:CIM_iSCSISessionSettings > localhost:5988/root/virt:LXC_ConcreteComponent > localhost:5988/root/virt:CIM_ActsAsSpare > localhost:5988/root/virt:CIM_PolicyRuleInPolicyGroup > localhost:5988/root/virt:CIM_IPsecAction > localhost:5988/root/virt:CIM_GroupInDiskGroup > localhost:5988/root/virt:CIM_OrgStructure > localhost:5988/root/virt:PRS_Transaction > localhost:5988/root/virt:CIM_SoftwareElementComponent > localhost:5988/root/virt:CIM_SwitchPortTransparentBridgingStatistics > localhost:5988/root/virt:CIM_J2eeJMSConsumerStats > localhost:5988/root/virt:KVM_SettingsDefineCapabilities > localhost:5988/root/virt:CIM_SettingContext > localhost:5988/root/virt:CIM_SoftwareFeatureComponent > localhost:5988/root/virt:CIM_LogicalPortGroup > localhost:5988/root/virt:CIM_SettingsDefineCapabilities > localhost:5988/root/virt:CIM_SchedulingElement > localhost:5988/root/virt:CIM_PolicyCondition > localhost:5988/root/virt:CIM_MediaPhysicalStatData > localhost:5988/root/virt:CIM_FCAdapterEventCounters > localhost:5988/root/virt:CIM_HostedDependency > localhost:5988/root/virt:CIM_OrganizationalEntity > localhost:5988/root/virt:CIM_SCSIMultipathSettings > localhost:5988/root/virt:CIM_FCSwitchCapabilities > localhost:5988/root/virt:CIM_ConfigurationCapacity > localhost:5988/root/virt:CIM_ScopedSetting > localhost:5988/root/virt:CIM_FRUPhysicalElements > localhost:5988/root/virt:CIM_UnixDirectory > localhost:5988/root/virt:CIM_AuthenticationRequirement > localhost:5988/root/virt:CIM_ElementStatisticalData > localhost:5988/root/virt:CIM_PhysicalStatistics > localhost:5988/root/virt:CIM_PickerStatData > localhost:5988/root/virt:CIM_BGPEndpointStatistics > localhost:5988/root/virt:CIM_J2eeNotification > localhost:5988/root/virt:LXC_ReferencedProfile > localhost:5988/root/virt:CIM_PhysicalElement > localhost:5988/root/virt:CIM_UsersAccess > localhost:5988/root/virt:CIM_StorageSettingsGeneratedFromCapabilities > localhost:5988/root/virt:CIM_PublicPrivateKeyAuthentication > localhost:5988/root/virt:CIM_NextHopRoute > localhost:5988/root/virt:PRS_Category > localhost:5988/root/virt:CIM_SystemSpecificCollection > localhost:5988/root/virt:CIM_J2eeJMSEndpointStats > localhost:5988/root/virt:CIM_DiagnosticServiceCapabilities > localhost:5988/root/virt:CIM_PublicPrivateKeyPair > localhost:5988/root/virt:CIM_PickerStatInfo > localhost:5988/root/virt:PRS_Resolution > localhost:5988/root/virt:PRS_ServiceResolutionSolution > localhost:5988/root/virt:CIM_MediaPhysicalStatInfo > localhost:5988/root/virt:CIM_InstCreation > localhost:5988/root/virt:CIM_TokenRingPortStatistics > localhost:5988/root/virt:CIM_ReferencedProfile > localhost:5988/root/virt:CIM_PrintJob > localhost:5988/root/virt:CIM_ElementSetting > localhost:5988/root/virt:KVM_ReferencedProfile > localhost:5988/root/virt:CIM_PowerManagementCapabilities > localhost:5988/root/virt:CIM_ProductComponent > localhost:5988/root/virt:CIM_SoftwareFeatureSoftwareElements > localhost:5988/root/virt:CIM_Docked > localhost:5988/root/virt:CIM_DependencyContext > localhost:5988/root/virt:CIM_PolicySetValidityPeriod > localhost:5988/root/virt:CIM_ConcreteCollection > localhost:5988/root/virt:CIM_OtherOrgUnitInformation > localhost:5988/root/virt:CIM_WRRSchedulingElement > localhost:5988/root/virt:CIM_VideoBIOSFeatureVideoBIOSElements > localhost:5988/root/virt:CIM_FCPortCapabilities > localhost:5988/root/virt:CIM_ProductSupport > localhost:5988/root/virt:CIM_SoftwareElement > localhost:5988/root/virt:Xen_HostedDependency > localhost:5988/root/virt:CIM_OSPFAreaConfiguration > localhost:5988/root/virt:CIM_OtherOrganizationInformation > localhost:5988/root/virt:CIM_MemoryCapacity > localhost:5988/root/virt:CIM_PackagedComponent > localhost:5988/root/virt:CIM_J2eeJMSStatConnections > localhost:5988/root/virt:CIM_PhysicalConnector > localhost:5988/root/virt:CIM_FIFOPipeFile > localhost:5988/root/virt:CIM_RecordForLog > localhost:5988/root/virt:CIM_Card > localhost:5988/root/virt:CIM_RelatedStatisticalData > localhost:5988/root/virt:CIM_Role > localhost:5988/root/virt:CIM_FRU > localhost:5988/root/virt:CIM_Zone > localhost:5988/root/virt:CIM_SAEndpointConnectionStatistics > localhost:5988/root/virt:PRS_ExpressionLink > localhost:5988/root/virt:CIM_UnixProcessStatisticalInformation > localhost:5988/root/virt:CIM_AllocationSchedulingElement > localhost:5988/root/virt:CIM_Organization > localhost:5988/root/virt:PRS_ContactOrganization > localhost:5988/root/virt:CIM_Rack > localhost:5988/root/virt:CIM_PolicyRule > localhost:5988/root/virt:CIM_Product > localhost:5988/root/virt:PRS_Product > localhost:5988/root/virt:CIM_MoreOrganizationInfo > localhost:5988/root/virt:CIM_SNMPTrapIndication > localhost:5988/root/virt:PRS_ServiceProblem > localhost:5988/root/virt:CIM_ElementSecuritySensitivity > localhost:5988/root/virt:CIM_ConnectorOnPackage > localhost:5988/root/virt:CIM_PhysicalCapacity > localhost:5988/root/virt:CIM_PeerIDPayloadFilterEntry > localhost:5988/root/virt:Xen_ReferencedProfile > localhost:5988/root/virt:CIM_NetworkingIDAuthentication > localhost:5988/root/virt:CIM_Configuration > localhost:5988/root/virt:CIM_VirtualSystemMigrationCapabilities > localhost:5988/root/virt:CIM_BIOSFeature > localhost:5988/root/virt:CIM_ConfigurationData > localhost:5988/root/virt:CIM_OrderedMemberOfCollection > localhost:5988/root/virt:CIM_JobSettingData > localhost:5988/root/virt:CIM_AssignedIdentity > localhost:5988/root/virt:CIM_ThresholdIndication > localhost:5988/root/virt:CIM_LogicalNetwork > localhost:5988/root/virt:CIM_J2eeURLStats > localhost:5988/root/virt:CIM_Synchronized > localhost:5988/root/virt:CIM_DynamicForwardingEntry > localhost:5988/root/virt:PRS_Problem > localhost:5988/root/virt:CIM_Job > localhost:5988/root/virt:PRS_Administrative > localhost:5988/root/virt:CIM_DatabaseParameter > localhost:5988/root/virt:LXC_EnabledLogicalElementCapabilities > localhost:5988/root/virt:Xen_ComputerSystemMigrationJobDeletedIndication > localhost:5988/root/virt:CIM_FilteredBGPAttributes > localhost:5988/root/virt:CIM_Chip > localhost:5988/root/virt:CIM_ReplacementFRU > localhost:5988/root/virt:CIM_ListenerDestination > localhost:5988/root/virt:CIM_CorrespondingSettingsRecord > localhost:5988/root/virt:CIM_ReplacementSet > localhost:5988/root/virt:PRS_ActivityTransaction > localhost:5988/root/virt:LXC_ComputerSystemMigrationJobDeletedIndication > localhost:5988/root/virt:KVM_ComputerSystemMigrationJobModifiedIndication > localhost:5988/root/virt:CIM_ElementHasBeenFRUed > localhost:5988/root/virt:PRS_RevisionContact > localhost:5988/root/virt:CIM_PacketFilterCondition > localhost:5988/root/virt:KVM_ComputerSystemMigrationJobDeletedIndication > localhost:5988/root/virt:CIM_BiometricAuthentication > localhost:5988/root/virt:CIM_IKEProposal > localhost:5988/root/virt:CIM_ConcreteComponent > localhost:5988/root/virt:CIM_Slot > localhost:5988/root/virt:CIM_ClassCreation > localhost:5988/root/virt:KVM_ConcreteComponent > localhost:5988/root/virt:CIM_Identity > localhost:5988/root/virt:Xen_ComputerSystemModifiedIndication > localhost:5988/root/virt:PRS_CategoryParentChild > localhost:5988/root/virt:CIM_MoreGroupInfo > localhost:5988/root/virt:CIM_ListsInRoutingPolicy > localhost:5988/root/virt:CIM_DeviceErrorCounts > localhost:5988/root/virt:KVM_ComputerSystemModifiedIndication > localhost:5988/root/virt:CIM_PoweredStatisticalData > localhost:5988/root/virt:LXC_ComputerSystemModifiedIndication > localhost:5988/root/virt:LXC_VirtualSystemMigrationSettingData > localhost:5988/root/virt:CIM_Profile > localhost:5988/root/virt:CIM_J2eeEJBStats > localhost:5988/root/virt:CIM_IPNetworkIdentity > localhost:5988/root/virt:CIM_CommonDatabaseCapabilities > localhost:5988/root/virt:PRS_Contact > localhost:5988/root/virt:CIM_FilterListsInBGPRouteMap > localhost:5988/root/virt:CIM_ZoneSet > localhost:5988/root/virt:CIM_MetricDefinition > localhost:5988/root/virt:PRS_ActivityContact > localhost:5988/root/virt:Xen_ConcreteComponent > localhost:5988/root/virt:CIM_BGPPeerGroup > localhost:5988/root/virt:CIM_SANegotiationAction > localhost:5988/root/virt:CIM_Policy > localhost:5988/root/virt:CIM_OtherGroupInformation > localhost:5988/root/virt:CIM_PolicySetAppliesToElement > localhost:5988/root/virt:LXC_VirtualSystemMigrationCapabilities > localhost:5988/root/virt:CIM_ParameterValueSources > localhost:5988/root/virt:CIM_LogicalElement > localhost:5988/root/virt:CIM_J2eeJTAStats > localhost:5988/root/virt:CIM_J2eeJCAStats > localhost:5988/root/virt:CIM_ParametersForMethod > localhost:5988/root/virt:CIM_J2eeJMSStats > localhost:5988/root/virt:CIM_J2eeJVMStats > localhost:5988/root/virt:CIM_J2eeStatistic > localhost:5988/root/virt:PRS_ProductAsset > localhost:5988/root/virt:KVM_EnabledLogicalElementCapabilities > localhost:5988/root/virt:CIM_UserEntity > localhost:5988/root/virt:CIM_StorageRedundancyGroup > localhost:5988/root/virt:CIM_IPAssignmentSettingData > localhost:5988/root/virt:CIM_ClassIndication > localhost:5988/root/virt:CIM_IPXConnectivityNetwork > localhost:5988/root/virt:CIM_AccountIdentity > localhost:5988/root/virt:Xen_ElementConformsToProfile > localhost:5988/root/virt:PRS_ServiceProvider > localhost:5988/root/virt:CIM_ElementConformsToProfile > localhost:5988/root/virt:KVM_ElementConformsToProfile > localhost:5988/root/virt:KVM_ComputerSystemDeletedIndication > localhost:5988/root/virt:CIM_UnixFile > localhost:5988/root/virt:CIM_SwitchPortSourceRoutingStatistics > localhost:5988/root/virt:Xen_ComputerSystemDeletedIndication > localhost:5988/root/virt:PRS_Attached > localhost:5988/root/virt:CIM_CardInSlot > localhost:5988/root/virt:CIM_ListenerDestinationCIMXML > localhost:5988/root/virt:CIM_RedundancySet > localhost:5988/root/virt:CIM_ServiceStatisticalInformation > localhost:5988/root/virt:CIM_J2eeEntityBeanStats > localhost:5988/root/virt:CIM_BGPAttributes > localhost:5988/root/virt:PRS_ContactItemAddress > localhost:5988/root/virt:CIM_AdjacentSlots > localhost:5988/root/virt:KVM_VirtualSystemMigrationSettingData > localhost:5988/root/virt:CIM_SlotInSlot > localhost:5988/root/virt:CIM_SettingData > localhost:5988/root/virt:Xen_ElementCapabilities > localhost:5988/root/virt:CIM_ProductPhysicalElements > localhost:5988/root/virt:CIM_RegisteredSubProfile > localhost:5988/root/virt:CIM_AlertIndication > localhost:5988/root/virt:PRS_Location > localhost:5988/root/virt:LXC_ElementCapabilities > localhost:5988/root/virt:CIM_StorageSettingsAssociatedToCapabilities > localhost:5988/root/virt:LXC_ComputerSystemDeletedIndication > localhost:5988/root/virt:CIM_FileSystemCapabilities > localhost:5988/root/virt:CIM_ConcreteDependency > localhost:5988/root/virt:Xen_VirtualSystemSettingData > localhost:5988/root/virt:CIM_IdentityContext > localhost:5988/root/virt:CIM_DiagnosticRecord > localhost:5988/root/virt:CIM_BGPRouteMapsInRoutingPolicy > localhost:5988/root/virt:CIM_RelatedElementCausingError > localhost:5988/root/virt:CIM_VirtualSystemSettingData > localhost:5988/root/virt:KVM_VirtualSystemSettingData > localhost:5988/root/virt:PRS_ProductComponent > localhost:5988/root/virt:CIM_SAEndpointRefreshSettings > localhost:5988/root/virt:CIM_ElementFRU > localhost:5988/root/virt:CIM_PolicyConditionStructure > localhost:5988/root/virt:CIM_J2eeJCANonpooledConnections > localhost:5988/root/virt:LXC_HostedDependency > localhost:5988/root/virt:CIM_InstalledProductImage > localhost:5988/root/virt:CIM_StorageCapabilities > localhost:5988/root/virt:LXC_VirtualSystemSettingData > localhost:5988/root/virt:CIM_BGPStatistics > localhost:5988/root/virt:CIM_UnixDeviceFile > localhost:5988/root/virt:CIM_AuthorizationTarget > localhost:5988/root/virt:CIM_Credential > localhost:5988/root/virt:CIM_J2eeJavaMailStats > localhost:5988/root/virt:CIM_ESPTransform > localhost:5988/root/virt:CIM_PackageInConnector > localhost:5988/root/virt:CIM_CollectedSoftwareElements > localhost:5988/root/virt:CIM_GatewayPathID > localhost:5988/root/virt:CIM_KerberosTicket > localhost:5988/root/virt:CIM_PolicyGroup > localhost:5988/root/virt:CIM_CardOnCard > localhost:5988/root/virt:CIM_BaseMetricDefinition > localhost:5988/root/virt:CIM_DNSGeneralSettingData > localhost:5988/root/virt:CIM_StorageHardwareID > localhost:5988/root/virt:CIM_StorageClientSettingData > localhost:5988/root/virt:CIM_VideoBIOSElement > localhost:5988/root/virt:LXC_ElementConformsToProfile > localhost:5988/root/virt:PRS_ContactContactItem > localhost:5988/root/virt:CIM_ProductProductDependency > localhost:5988/root/virt:CIM_InstDeletion > localhost:5988/root/virt:CIM_DiagnosticResult > localhost:5988/root/virt:CIM_ProtocolControllerMaskingCapabilities > localhost:5988/root/virt:CIM_AuthorizedSubject > localhost:5988/root/virt:CIM_AbstractIndicationSubscription > localhost:5988/root/virt:CIM_MetricForME > localhost:5988/root/virt:CIM_SettingsDefineState > localhost:5988/root/virt:CIM_PackageInChassis > localhost:5988/root/virt:CIM_OtherRoleInformation > localhost:5988/root/virt:CIM_EthernetPortStatistics > localhost:5988/root/virt:CIM_BGPPathAttributes > localhost:5988/root/virt:CIM_MediaAccessStatData > localhost:5988/root/virt:CIM_SharedSecretAuthentication > localhost:5988/root/virt:KVM_SettingsDefineState > localhost:5988/root/virt:CIM_CollectedMSEs > localhost:5988/root/virt:CIM_iSCSICapabilities > localhost:5988/root/virt:PRS_SolutionElement > localhost:5988/root/virt:PRS_Reference > localhost:5988/root/virt:CIM_DeviceStatisticalInformation > localhost:5988/root/virt:CIM_SubUoWDef > localhost:5988/root/virt:PRS_ResolutionResource > localhost:5988/root/virt:CIM_IPHeadersFilter > localhost:5988/root/virt:CIM_DirectoryContainsFile > localhost:5988/root/virt:CIM_MemoryWithMedia > localhost:5988/root/virt:KVM_HostedDependency > localhost:5988/root/virt:CIM_PolicySetInRoleCollection > localhost:5988/root/virt:CIM_PolicyComponent > localhost:5988/root/virt:CIM_StatisticalInformation > localhost:5988/root/virt:CIM_PhysicalPackage > localhost:5988/root/virt:CIM_AssociatedBlockStatisticsManifestCollection > localhost:5988/root/virt:PRS_SolutionCategory > localhost:5988/root/virt:CIM_LinkHasConnector > localhost:5988/root/virt:CIM_SwitchPortStatistics > localhost:5988/root/virt:CIM_IPAddressRange > localhost:5988/root/virt:CIM_BGPRouteMap > localhost:5988/root/virt:CIM_SystemStatisticalInformation > localhost:5988/root/virt:CIM_LANConnectivitySegment > localhost:5988/root/virt:CIM_AccessControlInformation > localhost:5988/root/virt:CIM_ParticipatesInSet > localhost:5988/root/virt:CIM_PhysicalFrame > localhost:5988/root/virt:CIM_MediaAccessStatInfo > localhost:5988/root/virt:CIM_IndicationFilter > localhost:5988/root/virt:CIM_PhysicalCredentialAuthentication > localhost:5988/root/virt:CIM_SpanningTreeStatistics > localhost:5988/root/virt:CIM_LogicalIdentity > localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities > localhost:5988/root/virt:CIM_StaticForwardingEntry > localhost:5988/root/virt:PRS_ContactItem > localhost:5988/root/virt:CIM_FilterEntry > localhost:5988/root/virt:CIM_ManagedElement > localhost:5988/root/virt:Xen_SettingsDefineCapabilities > localhost:5988/root/virt:CIM_LabelReaderStatData > localhost:5988/root/virt:CIM_SoftwareFeature > localhost:5988/root/virt:CIM_UoWDefTraceLevelType > localhost:5988/root/virt:CIM_ClassDeletion > localhost:5988/root/virt:CIM_MoreRoleInfo > localhost:5988/root/virt:CIM_ConfigurationComponent > localhost:5988/root/virt:CIM_MemoryError > localhost:5988/root/virt:CIM_StatisticalRuntimeOverview > localhost:5988/root/virt:CIM_J2eeConnectionStats > localhost:5988/root/virt:Xen_VirtualSystemMigrationSettingData > localhost:5988/root/virt:CIM_StorageSetting > localhost:5988/root/virt:CIM_TransformOfPreconfiguredAction > localhost:5988/root/virt:CIM_Component > localhost:5988/root/virt:CIM_KerberosAuthentication > localhost:5988/root/virt:CIM_LabelReaderStatInfo > localhost:5988/root/virt:CIM_ConnectedTo > localhost:5988/root/virt:CIM_SNMPDatabaseParameter > localhost:5988/root/virt:CIM_MemberOfCollection > localhost:5988/root/virt:CIM_J2eeJMSConnectionSessions > localhost:5988/root/virt:CIM_StatusCollection > localhost:5988/root/virt:CIM_ProductSoftwareComponent > localhost:5988/root/virt:CIM_StorageConfigurationCapabilities > localhost:5988/root/virt:PRS_Expression > localhost:5988/root/virt:CIM_CommonDatabaseSettingData > localhost:5988/root/virt:CIM_FCSwitchSettings > localhost:5988/root/virt:CIM_BIOSElement > localhost:5988/root/virt:CIM_J2eeConnectionPoolStats > localhost:5988/root/virt:CIM_BGPPeerUsesRouteMap > ============================================================================ > > Do these contain clues to solve? > > Works for me. > Toshifumi Fujimura. >> What is the output of >> >> wbemcli ecn http://root:pass at localhost:5988/root/virt >> >> Thanks and Regards, >> Deepti. >> >> Toshifumi Fujimura wrote: >>> Thanks for your reply. >>> >>> Currently, WBEM Client works for getting CIM_OperatingSystem. >>> But not for getting KVM_ComputerSystem. >>> (I attach the wbemcli output.) >>> ======================================================================== >>> >>> [root at localhost ~]# wbemcli ei >>> 'http://user:pass at localhost:5988/root/cimv2:cim_operatingsystem' >>> localhost:5988/root/cimv2:PG_OperatingSystem.CreationClassName="CIM_OperatingSystem",CSCreationClassName="CIM_UnitaryComputerSystem", >>> >>> CSName="localhost.localdomain",Name="Fedora" >>> CSCreationClassName="CIM_UnitaryComputerSystem",CSName="localhost.localdomain", >>> >>> CreationClassName="CIM_OperatingSystem",Name="Fedora",Caption="Fedora >>> release 9.92 (Rawhide)",Description="Fedora release 9.92 (Rawhide)", >>> Status="Unknown",OSType=36,OtherTypeDescription="2.6.27.3-27.rc1.fc10.i686.PAE >>> >>> #1 SMP Sat Oct 18 20:27:11 EDT >>> 2008",Version="2.6.27.3-27.rc1.fc10.i686.PAE", >>> LastBootUpTime=20081022122916.000000+540,LocalDateTime=20081022171753.000000+540,CurrentTimeZone=540,NumberOfLicensedUsers=0,NumberOfUsers=5,NumberOfProcesses=166, >>> >>> MaxNumberOfProcesses=196608,TotalSwapSpaceSize=4095992,TotalVirtualMemorySize=8233000,FreeVirtualMemory=4095992,FreePhysicalMemory=3384328,TotalVisibleMemorySize=4137008, >>> >>> MaxProcessMemorySize=4095992,Distributed=FALSE,MaxProcessesPerUser=196608,SystemUpTime=17317,OperatingSystemCapability="32 >>> >>> bit" >>> >>> [root at localhost ~]# wbemcli ein >>> http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem >>> * >>> * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: KVM_ComputerSystem >>> * >>> ======================================================================== >>> >>> >>> >>> Anyway cimxxxxx shows Virt_xxx class. >>> (I attach the "cimprovider -l" output.) >>> ======================================================================== >>> >>> [root at localhost ~]# cimprovider -l >>> OperatingSystemModule >>> ComputerSystemModule >>> ProcessModule >>> Virt_AllocationCapabilities >>> Virt_ComputerSystem >>> Virt_ComputerSystemIndication >>> Virt_ComputerSystemMigrationIndication >>> Virt_ConcreteComponent >>> Virt_ConsoleRedirectionService >>> Virt_ConsoleRedirectionServiceCapabilities >>> Virt_Device >>> Virt_DevicePool >>> Virt_ElementAllocatedFromPool >>> Virt_ElementCapabilities >>> Virt_ElementConformsToProfile >>> Virt_ElementSettingData >>> Virt_EnabledLogicalElementCapabilities >>> Virt_HostedDependency >>> Virt_HostedResourcePool >>> Virt_HostedService >>> Virt_HostSystem >>> Virt_RASD >>> Virt_ReferencedProfile >>> Virt_RegisteredProfile >>> Virt_ResourceAllocationFromPool >>> Virt_ResourcePoolConfigurationCapabilities >>> Virt_ResourcePoolConfigurationService >>> Virt_ServiceAffectsElement >>> Virt_SettingsDefineCapabilities >>> Virt_SettingsDefineState >>> Virt_SystemDevice >>> Virt_VirtualSystemManagementCapabilities >>> Virt_VirtualSystemManagementService >>> Virt_VirtualSystemSnapshotService >>> Virt_VirtualSystemSnapshotServiceCapabilities >>> Virt_VSMigrationCapabilities >>> Virt_VSMigrationService >>> Virt_VSMigrationSettingData >>> Virt_VSSD >>> Virt_VSSDComponent >>> ======================================================================== >>> >>> >>>> From these, I guess libvirt-cim provider is not connected properly. >>> Would you give me an advice to investigate it. >>> >>> Thanks >>> >>> Toshifumi Fujimura. >>> >>>> >>>> >>>> Kaitlin Rupert wrote: >>>>> Toshifumi Fujimura wrote: >>>>>> I think I've registerd Libvirt-CIM and Libcmputil as CIM Provider. >>>>>> >>>>>> I re-installed Libvirt-CIM package. >>>>>> And I made sure that with Pegasus's command "cimprovider -s -l". >>>>> >>>>> You can check to make sure the providers are properly installed by >>>>> running the following command. Replace user:pass with the >>>>> username and password of the user that has CIM query rights. >>>>> >>>>> The convention is to use the root user or the pegasus user, but >>>>> you can use any user since you've modified >>>>> /etc/Pegasus/access.conf to allow all users. >>>>> >>>>> wbemcli ein >>>>> http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem >>>>> >>>>> This should return something like the following: >>>>> >>>>> localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="demo2" >>>>> >>>>> >>>>> When you run cimtest, you'll need to run the command as root and >>>>> pass in the root username / password (this will need to be fixed >>>>> in the future). >>>>> >>>>> CIM_NS=root/virt CIM_USER=root CIM_PASS=pass ./runtests >>>>> libvirt-cim -i localhost -d -v KVM >>>>> >>>>>> >>>>>> But following error messages didn't disappear. >>>>>> ============================================================== >>>>>> -------------------------------------------------------------------- >>>>>> AllocationCapabilities - 01_enum.py: FAIL >>>>>> ERROR - Failed to enumerate the class of >>>>>> KVM_AllocationCapabilities >>>>>> ERROR - Unauthorized >>>>>> ERROR - Only 0 pools returned, expected at least 4 >>>>>> -------------------------------------------------------------------- >>>>>> AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL >>>>>> ERROR - AuthError : Unauthorized >>>>>> Traceback (most recent call last): >>>>>> File "./lib/XenKvmLib/const.py", line 116, in do_try >>>>>> File "02_alloccap_gi_errs.py", line 109, in main >>>>>> expr_values=exp['invalid_keyvalue'], bug_no="") >>>>>> File "./lib/XenKvmLib/common_util.py", line 264, in try_getinstance >>>>>> File >>>>>> "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", line >>>>>> 464, in GetInstance >>>>>> **params) >>>>>> File >>>>>> "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", line >>>>>> 181, in imethodcall >>>>>> verify_callback = self.verify_callback) >>>>>> File "/usr/lib/python2.5/site-packages/pywbem/cim_http.py", line >>>>>> 226, in wbem_request >>>>>> raise AuthError(response.reason) >>>>>> AuthError: Unauthorized >>>>>> ERROR - None >>>>>> -------------------------------------------------------------------- >>>>>> ============================================================== >>>>>> Would you have any more suggestion of this messages? >>>>> >>>>> This error is because pywbem is unable to authenticate with >>>>> Pegasus. Be sure the following query works (change pass to the >>>>> proper password): >>>>> >>>>> wbemcli ein >>>>> http://root:pass at localhost:5988/root/virt:KVM_ComputerSystem >>>>> >>>>> Hope this helps! =) >>>>> >>>> You can also verify if the required providers are installed by >>>> using the following query: >>>> >>>> wbemcli ecn http://root:pass at localhost:5988/root/virt >>>> >>>> The above query will report all the providers registered with the >>>> /root/virt namespace. >>>> you can use the same query replacing the above /root/virt with >>>> other namespace like /root/interop to know the providers registered >>>> in that particular namespace. >>>> >>>> Regards, >>>> Deepti. >>>> >>>> _______________________________________________ >>>> 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 >> >> > > From srinivas735 at gmail.com Thu Oct 23 06:11:54 2008 From: srinivas735 at gmail.com (srinivas k) Date: Thu, 23 Oct 2008 11:41:54 +0530 Subject: [Libvirt-cim] Problem in running libvirt-cim test suite In-Reply-To: <852030870810222309tde7f3c3v63e85380d72e636b@mail.gmail.com> References: <852030870810222309tde7f3c3v63e85380d72e636b@mail.gmail.com> Message-ID: <852030870810222311t4e4c0467hcec246a06086891f@mail.gmail.com> Hi, I trying to install libvirt-cim in my ubuntu-xen-3.2.1 machine. I am able to install all dependencies and libvirt-cim , but when I run cimtest which has given in libvirt.org, I am getting following error message * Starting test suite: libvirt-cim ERROR - Failed to create Virtual Network 'cimtest-networkpool' Unable to create network pool cimtest-networkpool Please check your environment.* Is there any special networking setup is require to run cimtest. Any help would be appreciated. Apologies if this topic has been covered already. I can't find it anywhere using Google Thanks, seenu. -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Oct 23 06:49:43 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 22 Oct 2008 23:49:43 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Remove old enumerate and getInstance and update device related tc Message-ID: <50b2dcc3ef1eabcaf098.1224744583@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1224744576 25200 # Node ID 50b2dcc3ef1eabcaf09858ad18b78ba1c4e96031 # Parent 35ff687c818e5c4d38e152aef0f35ca22a4956cf [TEST]#2 Remove old enumerate and getInstance and update device related tc This patch will result SystemDevice - 01_forward.py fails, due to the remove of CIM_*, follow patch will fix it. Signed-off-by: Guolian Yun diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Wed Oct 22 23:49:36 2008 -0700 @@ -26,7 +26,7 @@ import sys import pywbem from VirtLib import utils -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger @@ -48,13 +48,13 @@ vsxml.cim_define(options.ip) devid = "%s/%s" % (test_dom, test_dev) + disk = get_typed_class(options.virt, "LogicalDisk") key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "LogicalDisk"), + 'CreationClassName' : disk, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } - dev = eval('devices.' + get_typed_class(options.virt, "LogicalDisk"))(options.ip, key_list) - + dev = GetInstance(options.ip, disk, key_list) status = 0 if dev.Name != test_dev: diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Wed Oct 22 23:49:36 2008 -0700 @@ -125,7 +125,7 @@ import pywbem from VirtLib import utils from XenKvmLib import assoc -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.common_util import try_getinstance from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.classes import get_typed_class @@ -198,7 +198,7 @@ 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } - disk = eval('devices.' + get_typed_class(options.virt, "LogicalDisk"))(options.ip, key_list) + disk = GetInstance(options.ip, classname, key_list) except Exception,detail: logger.error(CIM_ERROR_GETINSTANCE, classname) logger.error("Exception: %s", detail) diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/cimtest/Memory/01_memory.py --- a/suites/libvirt-cim/cimtest/Memory/01_memory.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Memory/01_memory.py Wed Oct 22 23:49:36 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from VirtLib import utils from VirtLib import live -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger @@ -46,12 +46,13 @@ alloc_mem = int(vsxml.xml_get_mem()) devid = "%s/mem" % test_dom + mem_class = get_typed_class(options.virt, "Memory") key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "Memory"), + 'CreationClassName' : mem_class, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } - dev = eval('devices.' + get_typed_class(options.virt, "Memory"))(options.ip, key_list) + dev = GetInstance(options.ip, mem_class, key_list) status = 0 diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/cimtest/NetworkPort/01_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Wed Oct 22 23:49:36 2008 -0700 @@ -33,7 +33,7 @@ import pywbem from VirtLib import utils from VirtLib import live -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger @@ -67,16 +67,17 @@ vsxml.cim_define(options.ip) devid = "%s/%s" % (test_dom, test_mac) + net_class = get_typed_class(options.virt, "NetworkPort") key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "NetworkPort"), + 'CreationClassName' : net_class, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } dev = None - + try: - dev = eval('devices.' + get_typed_class(options.virt, "NetworkPort"))(options.ip, key_list) + dev = GetInstance(options.ip, net_class, key_list) except Exception, detail: logger.error("Exception: %s" % detail) diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Wed Oct 22 23:49:36 2008 -0700 @@ -28,7 +28,7 @@ import sys import pywbem from XenKvmLib import const -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.vxml import KVMXML from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -57,7 +57,7 @@ dev = None try: - dev = devices.KVM_NetworkPort(options.ip, key_list) + dev = GetInstance(options.ip, 'KVM_NetworkPort', key_list) except Exception, detail: logger.error("Exception: %s" % detail) cxml.undefine(options.ip) diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/cimtest/Processor/01_processor.py --- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Wed Oct 22 23:49:36 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from VirtLib import utils from VirtLib import live -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.test_xml import testxml from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class @@ -49,6 +49,7 @@ # Processor instance enumerate need the domain to be active domlist = live.active_domain_list(options.ip, options.virt) + proc_class = get_typed_class(options.virt, "Processor") if test_dom not in domlist: status = FAIL logger.error("Domain not started, we're not able to check vcpu") @@ -56,12 +57,12 @@ for i in range(0, test_vcpus): devid = "%s/%s" % (test_dom, i) key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "Processor"), + 'CreationClassName' : proc_class, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } try: - dev = eval(('devices.' + get_typed_class(options.virt, 'Processor')))(options.ip, key_list) + dev = GetInstance(options.ip, proc_class, key_list) if dev.DeviceID == devid: logger.info("Checked device %s" % devid) else: diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Wed Oct 22 23:49:36 2008 -0700 @@ -30,7 +30,7 @@ from VirtLib import utils from XenKvmLib import vxml from XenKvmLib import assoc -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from CimTest import Globals from XenKvmLib.const import do_main @@ -99,8 +99,8 @@ exp_inst_id_val[cn] = key_list['DeviceID'] try: - dev_class = devices.get_class(get_typed_class(options.virt, cn)) - devlist[cn] = dev_class(options.ip, key_list) + dev_class = get_typed_class(options.virt, cn) + devlist[cn] = GetInstance(options.ip, dev_class, key_list) logelelst[cn] = devlist[cn].DeviceID except Exception, detail: print_error(cn, detail) diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Oct 22 23:49:36 2008 -0700 @@ -31,7 +31,6 @@ from CimTest import Globals from XenKvmLib import enumclass from pywbem.cim_obj import CIMInstanceName -from XenKvmLib.devices import CIM_Instance from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, \ CIM_ERROR_GETINSTANCE diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/lib/XenKvmLib/devices.py --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Wed Oct 22 23:49:36 2008 -0700 @@ -40,63 +40,6 @@ def __str__(self): print self.inst.items() -class CIM_LogicalDevice(CIM_Instance): - def __init__(self, server, keys): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings=keys) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - CIM_Instance.__init__(self, inst) - -class CIM_LogicalDisk(CIM_LogicalDevice): - pass - -class CIM_NetworkPort(CIM_LogicalDevice): - pass - -class CIM_Memory(CIM_LogicalDevice): - pass - -class CIM_Processor(CIM_LogicalDevice): - pass - -class Xen_LogicalDisk(CIM_LogicalDisk): - pass - -class KVM_LogicalDisk(CIM_LogicalDisk): - pass - -class LXC_LogicalDisk(CIM_LogicalDisk): - pass - -class Xen_NetworkPort(CIM_NetworkPort): - pass - -class KVM_NetworkPort(CIM_NetworkPort): - pass - -class Xen_Memory(CIM_Memory): - pass - -class KVM_Memory(CIM_Memory): - pass - -class LXC_Memory(CIM_Memory): - pass - -class Xen_Processor(CIM_Processor): - pass - -class KVM_Processor(CIM_Processor): - pass def get_class(classname): return eval(classname) diff -r 35ff687c818e -r 50b2dcc3ef1e suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Wed Oct 22 23:49:36 2008 -0700 @@ -25,340 +25,13 @@ # import pywbem from pywbem.cim_obj import CIMInstanceName -from XenKvmLib.devices import CIM_Instance from XenKvmLib.classes import get_typed_class from CimTest import Globals, CimExt from VirtLib import utils from CimTest.Globals import logger -class CIM_MyClass(CIM_Instance): - def __init__(self, server, keys): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings=keys) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - self.conn = conn - self.inst = inst - self.ref = ref - - 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 Linux_ComputerSystem(CIM_Instance): - def __init__(self, server, keys): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings=keys) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - CIM_Instance.__init__(self, inst) - - -class CIM_ComputerSystem(CIM_MyClass): - pass - -class CIM_System(CIM_MyClass): - pass - -class CIM_AllocationCapabilities(CIM_MyClass): - pass - -class CIM_RegisteredProfile(CIM_MyClass): - pass - -class CIM_LogicalDevice(CIM_MyClass): - pass - -class CIM_ResourcePool(CIM_MyClass): - pass - -class CIM_VirtualSystemManagementCapabilities(CIM_MyClass): - pass - -class CIM_ResourcePoolConfigurationCapabilities(CIM_MyClass): - pass - -class CIM_EnabledLogicalElementCapabilities(CIM_MyClass): - pass - -class Virt_VirtualSystemMigrationCapabilities(CIM_MyClass): - pass - -class CIM_VirtualSystemMigrationSettingData(CIM_MyClass): - pass - -class CIM_VirtualSystemSnapshotService(CIM_MyClass): - pass - -class CIM_VirtualSystemSnapshotServiceCapabilities(CIM_MyClass): - pass - -class CIM_NetResourceAllocationSettingData(CIM_MyClass): - pass - -class CIM_MemResourceAllocationSettingData(CIM_MyClass): - pass - -class CIM_ProcResourceAllocationSettingData(CIM_MyClass): - pass - -class CIM_DiskResourceAllocationSettingData(CIM_MyClass): - pass - -class Xen_ComputerSystem(CIM_ComputerSystem): - pass - -class KVM_ComputerSystem(CIM_ComputerSystem): - pass - -class LXC_ComputerSystem(CIM_ComputerSystem): - pass - -class Xen_HostSystem(CIM_System): - pass - -class KVM_HostSystem(CIM_System): - pass - -class LXC_HostSystem(CIM_System): - pass - -class Xen_MigrationJob(CIM_MyClass): - pass - -class Xen_RegisteredProfile(CIM_RegisteredProfile): - pass - -class KVM_RegisteredProfile(CIM_RegisteredProfile): - pass - -class LXC_RegisteredProfile(CIM_RegisteredProfile): - pass - -class Xen_VirtualSystemSettingData(CIM_MyClass): - pass - -class KVM_VirtualSystemSettingData(CIM_MyClass): - pass - -class LXC_VirtualSystemSettingData(CIM_MyClass): - pass - -class Xen_LogicalDisk(CIM_LogicalDevice): - pass - -class KVM_LogicalDisk(CIM_LogicalDevice): - pass - -class Xen_Memory(CIM_LogicalDevice): - pass - -class KVM_Memory(CIM_LogicalDevice): - pass - -class LXC_Memory(CIM_LogicalDevice): - pass - -class LXC_Memory(CIM_LogicalDevice): - pass - -class Xen_Processor(CIM_LogicalDevice): - pass - -class KVM_Processor(CIM_LogicalDevice): - pass - -class Xen_NetworkPort(CIM_LogicalDevice): - pass - -class KVM_NetworkPort(CIM_LogicalDevice): - pass - -class Xen_MemoryPool(CIM_ResourcePool): - pass - -class KVM_MemoryPool(CIM_ResourcePool): - pass - -class LXC_MemoryPool(CIM_ResourcePool): - pass - -class Xen_ProcessorPool(CIM_ResourcePool): - pass - -class KVM_ProcessorPool(CIM_ResourcePool): - pass - -class LXC_ProcessorPool(CIM_ResourcePool): - pass - -class Xen_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities): - pass - -class KVM_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities): - pass - -class LXC_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities): - pass - -class Xen_ResourcePoolConfigurationCapabilities(CIM_ResourcePoolConfigurationCapabilities): - pass - -class KVM_ResourcePoolConfigurationCapabilities(CIM_ResourcePoolConfigurationCapabilities): - pass - -class LXC_ResourcePoolConfigurationCapabilities(CIM_ResourcePoolConfigurationCapabilities): - pass - -class Xen_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities): - pass - -class KVM_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities): - pass - -class LXC_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities): - pass - -class Xen_DiskPool(CIM_ResourcePool): - pass - -class KVM_DiskPool(CIM_ResourcePool): - pass - -class LXC_DiskPool(CIM_ResourcePool): - pass - -class Xen_NetworkPool(CIM_ResourcePool): - pass - -class KVM_NetworkPool(CIM_ResourcePool): - pass - -class LXC_NetworkPool(CIM_ResourcePool): - pass - -class Xen_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities): - pass - -class KVM_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities): - pass - -class LXC_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities): - pass - -class Xen_AllocationCapabilities(CIM_AllocationCapabilities): - pass - -class KVM_AllocationCapabilities(CIM_AllocationCapabilities): - pass - -class LXC_AllocationCapabilities(CIM_AllocationCapabilities): - pass - -class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - pass - -class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - pass - -class LXC_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - pass - -class Xen_VirtualSystemSnapshotService(CIM_VirtualSystemSnapshotService): - pass - -class KVM_VirtualSystemSnapshotService(CIM_VirtualSystemSnapshotService): - pass - -class LXC_VirtualSystemSnapshotService(CIM_VirtualSystemSnapshotService): - pass - -class Xen_VirtualSystemSnapshotServiceCapabilities(CIM_VirtualSystemSnapshotServiceCapabilities): - pass - -class KVM_VirtualSystemSnapshotServiceCapabilities(CIM_VirtualSystemSnapshotServiceCapabilities): - pass - -class LXC_VirtualSystemSnapshotServiceCapabilities(CIM_VirtualSystemSnapshotServiceCapabilities): - pass - -class Xen_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData): - pass - -class KVM_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData): - pass - -class LXC_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData): - pass - -class Xen_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData): - pass - -class KVM_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData): - pass - -class Xen_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData): - pass - -class KVM_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData): - pass - -class Xen_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData): - pass - -class KVM_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData): - pass - -class KVM_VirtualSystemMigrationService(CIM_MyClass): - pass - -class Xen_VirtualSystemMigrationService(CIM_MyClass): - pass - -class LXC_VirtualSystemMigrationService(CIM_MyClass): - pass - -class Xen_VirtualSystemManagementService(CIM_MyClass): - pass - -class KVM_VirtualSystemManagementService(CIM_MyClass): - pass - -class LXC_VirtualSystemManagementService(CIM_MyClass): - pass - - - -class CIM_CimtestClass(CIM_Instance): +class CIM_CimtestClass: def __init__(self, host, ref): conn = pywbem.WBEMConnection('http://%s' % host, @@ -373,7 +46,6 @@ self.inst = inst self.ref = ref - CIM_Instance.__init__(self, inst) def __invoke(self, method, params): try: From deeptik at linux.vnet.ibm.com Thu Oct 23 07:02:43 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 23 Oct 2008 12:32:43 +0530 Subject: [Libvirt-cim] Problem in running libvirt-cim test suite In-Reply-To: <852030870810222311t4e4c0467hcec246a06086891f@mail.gmail.com> References: <852030870810222309tde7f3c3v63e85380d72e636b@mail.gmail.com> <852030870810222311t4e4c0467hcec246a06086891f@mail.gmail.com> Message-ID: <49002193.1070904@linux.vnet.ibm.com> What is the o/p of the command virsh net-list --all ? Also, Can you give me the o/p of the command: virsh --help | grep -i net Regards, Deepti. srinivas k wrote: > Hi, > > I trying to install libvirt-cim in my ubuntu-xen-3.2.1 machine. I am > able to install all dependencies and libvirt-cim , but when I run > cimtest which has given in libvirt.org , I am > getting following error message > * Starting test suite: libvirt-cim > ERROR - Failed to create Virtual Network 'cimtest-networkpool' > > Unable to create network pool cimtest-networkpool > Please check your environment.* > Is there any special networking setup is require to run cimtest. > Any help would be appreciated. Apologies if this topic has been > covered already. I can't find it anywhere using Google > > > Thanks, > seenu. > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 Oct 23 07:26:00 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 23 Oct 2008 00:26:00 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Addring new tc 01_enum_crs.py to verify CRS fields Message-ID: <73be202634a52607d5ab.1224746760@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1224746643 25200 # Node ID 73be202634a52607d5ab54ca62a2706ec7aca23b # Parent 868aa0f5175568c5752787c1fcbd2b1df4001aad [TEST] Addring new tc 01_enum_crs.py to verify CRS fields. Assumption : The value of MaxConcurrentEnabledSAPs = 2* nof of guest on the machine. This needs to be updated Tested on KVM with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 868aa0f51755 -r 73be202634a5 suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Thu Oct 23 00:24:03 2008 -0700 @@ -0,0 +1,80 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# This test case is used to verify the RedirectionService +# properties in detail. +# +# Date : 22-10-2008 +# + +import sys +from VirtLib.live import domain_list +from XenKvmLib.enumclass import EnumInstances +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.common_util import get_host_info + +sup_types = ['Xen', 'KVM', 'XenFV'] + at do_main(sup_types) +def main(): + virt = main.options.virt + server = main.options.ip + cname = 'ConsoleRedirectionService' + classname = get_typed_class(virt, cname) + try: + crs = EnumInstances(server, classname) + except Exception, detail: + logger.error(CIM_ERROR_ENUMERATE, classname) + logger.error("Exception: %s", detail) + return FAIL + + status, host_name, host_cn = get_host_info(server, virt) + if status != PASS: + return status + + max_con_saps = 2 * len(domain_list(server, virt)) + crs_list = { + 'ElementName' : cname, + 'SystemCreationClassName' : host_cn, + 'SystemName' : host_name, + 'CreationClassName' : classname, + 'Name' : cname, + 'RedirectionServiceType' : [3], + 'SharingMode' : 3, + 'EnabledState' : 2, + 'EnabledDefault' : 2, + 'RequestedState' : 12, + 'MaxConcurrentEnabledSAPs': max_con_saps + } + + crs_val = crs[0] + for k, exp_val in crs_list.iteritems(): + res_val = eval("crs_val." + k) + if res_val != exp_val: + logger.error("'%s' Mismatch", k) + logger.error("Expected '%s', Got '%s'", exp_val, res_val) + return FAIL + return PASS + +if __name__ == "__main__": + sys.exit(main()) From deeptik at linux.vnet.ibm.com Thu Oct 23 07:49:23 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 23 Oct 2008 00:49:23 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc 02_enum_crscap.py to verify ConsoleRedirectionServiceCapabilities fields Message-ID: <2c77be4e041a0a8669d2.1224748163@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1224748128 25200 # Node ID 2c77be4e041a0a8669d234d6219e1f207b6d4ed5 # Parent 73be202634a52607d5ab54ca62a2706ec7aca23b [TEST] Adding new tc 02_enum_crscap.py to verify ConsoleRedirectionServiceCapabilities fields. Tested on KVM with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 73be202634a5 -r 2c77be4e041a suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Thu Oct 23 00:48:48 2008 -0700 @@ -0,0 +1,73 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# This test case is used to verify the ConsoleRedirectionServiceCapabilities +# properties in detail. +# +# Date : 22-10-2008 +# + +import sys +from VirtLib.live import domain_list +from XenKvmLib.enumclass import EnumInstances +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import PASS, FAIL + +sup_types = ['Xen', 'KVM', 'XenFV'] + at do_main(sup_types) +def main(): + virt = main.options.virt + server = main.options.ip + cname = 'ConsoleRedirectionServiceCapabilities' + cap_name = 'ConsoleRedirectionCapabilities' + classname = get_typed_class(virt, cname) + try: + crs = EnumInstances(server, classname) + crs_val = crs[0] + if crs_val.InstanceID != cap_name: + logger.error("InstanceID Mismatch") + logger.error("Got '%s', Expected '%s'", crs_val.InstanceID, + cap_name) + return FAIL + + if crs_val.ElementName != cap_name: + logger.error("ElementName Mismatch") + logger.error("Got '%s', Expected '%s'", crs_val.ElementName, + cap_name) + return FAIL + + mode_supp = crs_val.SharingModeSupported[0] + if mode_supp != 3: + logger.error("SharingModeSupported Mismatch") + logger.error("Got '%s', Expected '%s'", mode_supp, 3) + return FAIL + + except Exception, detail: + logger.error(CIM_ERROR_ENUMERATE, classname) + logger.error("Exception: %s", detail) + return FAIL + + return PASS + +if __name__ == "__main__": + sys.exit(main()) From yunguol at cn.ibm.com Thu Oct 23 08:34:06 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 23 Oct 2008 16:34:06 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Improve libvirt virt support check in main.py In-Reply-To: <0ceafbdc8a2d17b52ca7.1224634288@localhost.localdomain> 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-10-22 08:11:28: > # HG changeset patch > # User Kaitlin Rupert > # Date 1224634275 25200 > # Node ID 0ceafbdc8a2d17b52ca72401b7ffaeb220069b66 > # Parent 868aa0f5175568c5752787c1fcbd2b1df4001aad > [TEST] Improve libvirt virt support check in main.py > > If /usr/bin/qemu does not exist on the system (or if libvirt cannot find it), > it is possible to define KVM guests but not run them. Instead of returning a > error saying libvirt doesn't support the virt type, we need to return an error > that indicates a problem with libvirt was encountered. > > Signed-off-by: Kaitlin Rupert > > diff -r 868aa0f51755 -r 0ceafbdc8a2d suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Tue Oct 21 01:31:11 2008 -0700 > +++ b/suites/libvirt-cim/main.py Tue Oct 21 17:11:15 2008 -0700 > @@ -90,10 +90,15 @@ > print "Cleaned log files." > > def pre_check(ip, virt): > - cmd = "virsh -c %s version " % utils.virt2uri(virt) > + cmd = "virsh -c %s list --all" % utils.virt2uri(virt) > ret, out = utils.run_remote(ip, cmd) > if ret != 0: > return "This libvirt install does not support %s" % virt > + > + cmd = "virsh -c %s version" % utils.virt2uri(virt) > + ret, out = utils.run_remote(ip, cmd) > + if ret != 0: > + return "Encountered an error querying libvirt with: %s" % cmd > > cmd = "ps -ef | grep -v grep | grep cimserver" > rc, out = utils.run_remote(ip, cmd) > > _______________________________________________ > 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 Oct 23 08:38:35 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 23 Oct 2008 16:38:35 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix several negative test cases to work with older provider versions In-Reply-To: <77c8b5955eb50d027ac9.1224621497@localhost.localdomain> 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-10-22 04:38:17: > # HG changeset patch > # User Kaitlin Rupert > # Date 1224620362 25200 > # Node ID 77c8b5955eb50d027ac97ce59f01462205b6115f > # Parent 868aa0f5175568c5752787c1fcbd2b1df4001aad > [TEST] Fix several negative test cases to work with older provider versions. > > Signed-off-by: Kaitlin Rupert > > diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt- > cim/cimtest/LogicalDisk/03_ld_gi_errs.py > --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Tue > Oct 21 01:31:11 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Tue > Oct 21 13:19:22 2008 -0700 > @@ -133,7 +133,7 @@ > from CimTest.ReturnCodes import PASS, FAIL > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ > CIM_ERROR_GETINSTANCE > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > > sup_types = ['Xen', 'KVM', 'XenFV'] > > @@ -207,6 +207,13 @@ > global conn > conn = assoc.myWBEMConnection('http://%s' % options.ip, > (CIM_USER, CIM_PASS), CIM_NS) > > + rev, changeset = get_provider_version(options.virt, options.ip) > + if rev < 682: > + old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > + 'desc' : "No such instance (INVALID_DevID_Keyvalue)" > + } > + expr_values["invalid_devid_keyvalue"] = old_ret > + > global name_val > name_val = [ > 'CreationClassName', disk.CreationClassName, > diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt- > cim/cimtest/Processor/03_proc_gi_errs.py > --- a/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Tue > Oct 21 01:31:11 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Tue > Oct 21 13:19:22 2008 -0700 > @@ -131,7 +131,7 @@ > 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 > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > > sup_types = ['Xen', 'KVM', 'XenFV'] > > @@ -207,6 +207,13 @@ > 'INVALID_SysName_Keyvalue' : 'invalid_sysname' > } > > + rev, changeset = get_provider_version(options.virt, options.ip) > + if rev < 682: > + old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > + 'desc' : "No such instance (INVALID_DevID_Keyvalue)" > + } > + expr_values["invalid_devid_keyvalue"] = old_ret > + > i = 0 > for field1, field2 in sorted(tc_scen.items()): > retval = try_invalid_gi(i, field1, field2) > diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt- > cim/cimtest/SettingsDefine/03_sds_fwd_errs.py > --- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py > Tue Oct 21 01:31:11 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py > Tue Oct 21 13:19:22 2008 -0700 > @@ -152,7 +152,7 @@ > from XenKvmLib.classes import get_typed_class > from CimTest.ReturnCodes import PASS, FAIL > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > > @@ -246,6 +246,13 @@ > 'INVALID_SysName_Keyname', 'INVALID_SysName_Keyval' > ] > > + rev, changeset = get_provider_version(options.virt, options.ip) > + if rev < 682: > + old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > + 'desc' : "No such instance (INVALID_DevID_Keyval)" > + } > + expr_values["INVALID_DevID_Keyval"] = old_ret > + > sccn = get_typed_class(options.virt, 'ComputerSystem') > for classname, devid in sorted(class_id.items()): > name_val = get_name_val(classname, devid, sccn) > diff -r 868aa0f51755 -r 77c8b5955eb5 suites/libvirt-cim/lib/XenKvmLib/const.py > --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Oct 21 01:31: > 11 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Oct 21 13:19: > 22 2008 -0700 > @@ -139,7 +139,7 @@ > if revision is None or changeset is None: > return 0, "Unknown" > > - revision.strip("+") > + revision = revision.strip("+") > if revision.isdigit(): > revision = int(revision) > > > _______________________________________________ > 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 Oct 23 09:06:58 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 23 Oct 2008 17:06:58 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Clean up minor test issues with VSMS 14_define_sys_disk.py In-Reply-To: <664c2fc4c52c63c5505a.1224626755@localhost.localdomain> 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-10-22 06:05:55: > # HG changeset patch > # User Kaitlin Rupert > # Date 1224626746 25200 > # Node ID 664c2fc4c52c63c5505a19c59fdc6e94c7135191 > # Parent ede6419d3a506b7cb67bbb91e2d80f2010a0bc3c > [TEST] Clean up minor test issues with VSMS 14_define_sys_disk.py > > Signed-off-by: Kaitlin Rupert > > diff -r ede6419d3a50 -r 664c2fc4c52c suites/libvirt- > cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py > --- a/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py > Tue Oct 21 03:51:14 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py > Tue Oct 21 15:05:46 2008 -0700 > @@ -53,8 +53,8 @@ > > rasds = get_default_rasds(ip, virt) > > - for i in range(0, len(rasds)): > - if rasds[i]['PoolID'].find('DiskPool') >= 0: > + for i in range(len(rasds)): > + if 'DiskPool' in rasds[i]['PoolID']: > rasds[i]['Address'] = addr > rasds[i] = inst_to_mof(rasds[i]) > > > _______________________________________________ > 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 fujimura.toshifumi at np.css.fujitsu.com Thu Oct 23 09:44:42 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 23 Oct 2008 18:44:42 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <490003D9.80100@linux.vnet.ibm.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> <48FEEE40.7040107@np.css.fujitsu.com> <48FEFA52.8080202@linux.vnet.ibm.com> <48FFE101.9010709@np.css.fujitsu.com> <490003D9.80100@linux.vnet.ibm.com> Message-ID: <4900478A.2050007@np.css.fujitsu.com> Thanks Mr or Ms Deepti B Kalakeri and Mr or Ms Kaitlin Rupert. I tryed to regist CIM schema for Libvirt-CIM as your advice. On "make postinstall",I met this error message. ======================================================================================= Registering providers with active cimserver Parsing error: parse error: Error adding class Xen_KVMRedirectionSAP to the repository: CIM_ERR_INVALID_SUPERCLASS: CIM_KVMRedirectionSAP make: *** [postinstall] Error 250 ======================================================================================= I think the superclasses "CIM_KVMRedirectionSAP","CIM_ERR_INVALID_SUPERCLASS" don't exist in my cimserver. How can I add those classes? Works for me. Toshifumi Fujimura. > From the o/p what you have given you do not have KVM_ComputerSystem > registered and that is why you are not able to get the records when > you query with KVM_ComputerSystem. > When required you can use the following to verify if a particular > provider is registered by using > > wbemcli ecn http://root:pass at localhost:5988/root/virt | grep > KVM_ComputerSystem > > In your libvirt-cim directory, run the following: > > sudo make preuninstall > sudo make preinstall > sudo make postinstall > > Then restart Pegasus. > > > The following query: wbemcli ein > http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem might > not return any records if you don't have any guests defined. > > In that case, you can also try: > > http://user:pass at localhost:5988/root/virt:KVM_VirtualSystemManagementService > > > That should always return an instance. > > Thanks and Regards, > Deepti. > > > > Toshifumi Fujimura wrote: >> Thanks for your reply. >> >> These are its command's outputs. >> ============================================================================ >> >> localhost:5988/root/virt:CIM_ConcreteIdentity >> localhost:5988/root/virt:CIM_NetworkPacketAction >> localhost:5988/root/virt:CIM_MemberOfStatusCollection >> localhost:5988/root/virt:CIM_Collection >> localhost:5988/root/virt:CIM_IndicationHandler >> localhost:5988/root/virt:CIM_MetricDefForME >> localhost:5988/root/virt:CIM_PackageLocation >> localhost:5988/root/virt:CIM_OSPFServiceCapabilities >> localhost:5988/root/virt:CIM_BaseMetricValue >> localhost:5988/root/virt:CIM_ReplaceableProductFRU >> localhost:5988/root/virt:CIM_J2eeJMSConnectionStats >> localhost:5988/root/virt:CIM_PrioritySchedulingElement >> localhost:5988/root/virt:CIM_PhysicalComponent >> localhost:5988/root/virt:PRS_Person >> localhost:5988/root/virt:CIM_PublicKeyCertificate >> localhost:5988/root/virt:CIM_FileIdentity >> localhost:5988/root/virt:CIM_IPsecTransportAction >> localhost:5988/root/virt:CIM_iSCSISessionFailures >> localhost:5988/root/virt:CIM_UoWMetricDefinition >> localhost:5988/root/virt:PRS_SolutionHasElement >> localhost:5988/root/virt:CIM_ElementCapabilities >> localhost:5988/root/virt:CIM_IPCOMPTransform >> localhost:5988/root/virt:CIM_FilterList >> localhost:5988/root/virt:CIM_UnsignedPublicKey >> localhost:5988/root/virt:CIM_Setting >> localhost:5988/root/virt:CIM_IPSubnet >> localhost:5988/root/virt:CIM_ProductElementComponent >> localhost:5988/root/virt:CIM_StatisticsCapabilities >> localhost:5988/root/virt:CIM_TraceLevelType >> localhost:5988/root/virt:CIM_InstRead >> localhost:5988/root/virt:CIM_PreconfiguredSAAction >> localhost:5988/root/virt:CIM_Person >> localhost:5988/root/virt:PRS_ServiceRequester >> localhost:5988/root/virt:KVM_ElementCapabilities >> localhost:5988/root/virt:PRS_ServiceAgreement >> localhost:5988/root/virt:PRS_ExchangeElement >> localhost:5988/root/virt:CIM_FCPortRateStatistics >> localhost:5988/root/virt:CIM_CollectedBufferPool >> localhost:5988/root/virt:LXC_RegisteredProfile >> localhost:5988/root/virt:CIM_RedundancySetSettingData >> localhost:5988/root/virt:CIM_ElementProfile >> localhost:5988/root/virt:CIM_StorageError >> localhost:5988/root/virt:CIM_SubUoW >> localhost:5988/root/virt:PRS_SolutionResolution >> localhost:5988/root/virt:CIM_J2eeJMSSessionStats >> localhost:5988/root/virt:CIM_AuthenticationCondition >> localhost:5988/root/virt:CIM_FormattedIndicationSubscription >> localhost:5988/root/virt:CIM_TimeZone >> localhost:5988/root/virt:CIM_BufferPool >> localhost:5988/root/virt:CIM_AuthorizedTarget >> localhost:5988/root/virt:CIM_SharedSecret >> localhost:5988/root/virt:CIM_InstModification >> localhost:5988/root/virt:CIM_LogicalElementUnitOfWorkDef >> localhost:5988/root/virt:CIM_ProductFRU >> localhost:5988/root/virt:CIM_Statistics >> localhost:5988/root/virt:CIM_OrderedComponent >> localhost:5988/root/virt:CIM_InstMethodCall >> localhost:5988/root/virt:CIM_PolicyConditionInPolicyRule >> localhost:5988/root/virt:CIM_BlockStatisticsManifest >> localhost:5988/root/virt:CIM_SoftwareIdentityComponent >> localhost:5988/root/virt:PRS_Address >> localhost:5988/root/virt:CIM_Container >> localhost:5988/root/virt:CIM_BlockStatisticsManifestCollection >> localhost:5988/root/virt:CIM_IKEAction >> localhost:5988/root/virt:Xen_SettingsDefineState >> localhost:5988/root/virt:LXC_SettingsDefineState >> localhost:5988/root/virt:CIM_AccountMapsToAccount >> localhost:5988/root/virt:CIM_iSCSILoginStatistics >> localhost:5988/root/virt:CIM_MetricInstance >> localhost:5988/root/virt:Xen_RegisteredProfile >> localhost:5988/root/virt:CIM_DocumentAuthentication >> localhost:5988/root/virt:CIM_CollectionSetting >> localhost:5988/root/virt:CIM_Indication >> localhost:5988/root/virt:CIM_ScopedSettingData >> localhost:5988/root/virt:CIM_OSPFLink >> localhost:5988/root/virt:CIM_FileSystemSettingData >> localhost:5988/root/virt:CIM_DNSSettingData >> localhost:5988/root/virt:CIM_StatisticalData >> localhost:5988/root/virt:CIM_J2eeSessionBeanStats >> localhost:5988/root/virt:CIM_SystemInNamespace >> localhost:5988/root/virt:CIM_ElementCapacity >> localhost:5988/root/virt:CIM_CollectionConfiguration >> localhost:5988/root/virt:CIM_DeviceErrorData >> localhost:5988/root/virt:CIM_RegisteredProfile >> localhost:5988/root/virt:CIM_PolicyGroupInPolicyGroup >> localhost:5988/root/virt:KVM_RegisteredProfile >> localhost:5988/root/virt:CIM_NextHopIPRoute >> localhost:5988/root/virt:CIM_MoreOrgUnitInfo >> localhost:5988/root/virt:CIM_SoftwareIdentity >> localhost:5988/root/virt:CIM_OrgUnit >> localhost:5988/root/virt:CIM_ProductSoftwareFeatures >> localhost:5988/root/virt:CIM_IPConnectivitySubnet >> localhost:5988/root/virt:CIM_ContainedLocation >> localhost:5988/root/virt:CIM_SettingAssociatedToCapabilities >> localhost:5988/root/virt:CIM_ProductParentChild >> localhost:5988/root/virt:PRS_Resource >> localhost:5988/root/virt:CIM_SystemConfiguration >> localhost:5988/root/virt:PRS_Organization >> localhost:5988/root/virt:PRS_ProductParentChild >> localhost:5988/root/virt:CIM_Namespace >> localhost:5988/root/virt:Xen_ComputerSystemMigrationJobModifiedIndication >> >> localhost:5988/root/virt:PRS_StatementFeature >> localhost:5988/root/virt:CIM_ContainedProposal >> localhost:5988/root/virt:CIM_CollectionOfMSEs >> localhost:5988/root/virt:CIM_J2eeJCAConnectionPools >> localhost:5988/root/virt:CIM_BlockStatisticsCapabilities >> localhost:5988/root/virt:CIM_PolicyConditionInPolicyCondition >> localhost:5988/root/virt:Xen_ComputerSystemMigrationJobCreatedIndication >> localhost:5988/root/virt:CIM_UnitOfWorkDefinition >> localhost:5988/root/virt:CIM_CollectionInOrganization >> localhost:5988/root/virt:CIM_SoftwareInstallationServiceCapabilities >> localhost:5988/root/virt:CIM_StorageSynchronized >> localhost:5988/root/virt:CIM_SystemBusCard >> localhost:5988/root/virt:CIM_SubProfileRequiresProfile >> localhost:5988/root/virt:CIM_ZoneMembershipSettingData >> localhost:5988/root/virt:CIM_FRUIncludesProduct >> localhost:5988/root/virt:CIM_J2eeJMSSessionProducers >> localhost:5988/root/virt:CIM_StorageReplicationCapabilities >> localhost:5988/root/virt:CIM_PackageInSlot >> localhost:5988/root/virt:CIM_OwningCollectionElement >> localhost:5988/root/virt:LXC_ComputerSystemMigrationJobCreatedIndication >> localhost:5988/root/virt:LXC_ComputerSystemMigrationJobModifiedIndication >> >> localhost:5988/root/virt:CIM_ElementLocation >> localhost:5988/root/virt:CIM_J2eeStatelessSessionBeanStats >> localhost:5988/root/virt:KVM_ComputerSystemMigrationJobCreatedIndication >> localhost:5988/root/virt:PRS_ServiceActivity >> localhost:5988/root/virt:CIM_Directory >> localhost:5988/root/virt:CIM_Group >> localhost:5988/root/virt:CIM_SystemSettingContext >> localhost:5988/root/virt:CIM_OtherPersonInformation >> localhost:5988/root/virt:CIM_PolicySet >> localhost:5988/root/virt:CIM_DiagnosticResultForMSE >> localhost:5988/root/virt:CIM_J2eeJMSSessionConsumers >> localhost:5988/root/virt:CIM_CompatibleProduct >> localhost:5988/root/virt:CIM_AccountAuthentication >> localhost:5988/root/virt:CIM_CompoundPolicyCondition >> localhost:5988/root/virt:CIM_UsersCredential >> localhost:5988/root/virt:CIM_PreconfiguredTunnelAction >> localhost:5988/root/virt:CIM_SAProposal >> localhost:5988/root/virt:PRS_ServiceIncident >> localhost:5988/root/virt:CIM_VideoControllerResolution >> localhost:5988/root/virt:CIM_PreconfiguredTransportAction >> localhost:5988/root/virt:CIM_SystemSetting >> localhost:5988/root/virt:CIM_PhysicalElementLocation >> localhost:5988/root/virt:CIM_DiagnosticSetting >> localhost:5988/root/virt:CIM_SARule >> localhost:5988/root/virt:CIM_EnabledLogicalElementCapabilities >> localhost:5988/root/virt:CIM_InstIndication >> localhost:5988/root/virt:CIM_CIMOMStatisticalData >> localhost:5988/root/virt:CIM_Hdr8021Filter >> localhost:5988/root/virt:CIM_PolicySetComponent >> localhost:5988/root/virt:CIM_RejectConnectionAction >> localhost:5988/root/virt:CIM_PhysicalMemory >> localhost:5988/root/virt:Xen_ComputerSystemCreatedIndication >> localhost:5988/root/virt:CIM_CollectedSoftwareFeatures >> localhost:5988/root/virt:CIM_FilterOfPacketCondition >> localhost:5988/root/virt:PRS_Revision >> localhost:5988/root/virt:CIM_PolicyActionStructure >> localhost:5988/root/virt:KVM_ComputerSystemCreatedIndication >> localhost:5988/root/virt:CIM_J2eeServletStats >> localhost:5988/root/virt:CIM_X509CredentialFilterEntry >> localhost:5988/root/virt:CIM_VirtualSystemMigrationSettingData >> localhost:5988/root/virt:CIM_LogRecord >> localhost:5988/root/virt:CIM_DiagnosticCompletionRecord >> localhost:5988/root/virt:LXC_ComputerSystemCreatedIndication >> localhost:5988/root/virt:CIM_ConnectivityMembershipSettingData >> localhost:5988/root/virt:CIM_RangeOfIPAddresses >> localhost:5988/root/virt:CIM_FRUIncludesSoftwareFeature >> localhost:5988/root/virt:CIM_SupportAccess >> localhost:5988/root/virt:CIM_AuthenticationTarget >> localhost:5988/root/virt:CIM_IndicationHandlerCIMXML >> localhost:5988/root/virt:CIM_AuthorizedPrivilege >> localhost:5988/root/virt:CIM_MemoryOnCard >> localhost:5988/root/virt:CIM_UsersAccount >> localhost:5988/root/virt:CIM_IPsecProposal >> localhost:5988/root/virt:CIM_FibrePortEventCounters >> localhost:5988/root/virt:CIM_Chassis >> localhost:5988/root/virt:PRS_ActivityResource >> localhost:5988/root/virt:CIM_UoWMetric >> localhost:5988/root/virt:CIM_CollectedCollections >> localhost:5988/root/virt:CIM_UserContact >> localhost:5988/root/virt:PRS_AdministrativeContact >> localhost:5988/root/virt:CIM_J2eeJDBCConnectionPools >> localhost:5988/root/virt:CIM_Spared >> localhost:5988/root/virt:CIM_ElementConfiguration >> localhost:5988/root/virt:CIM_Location >> localhost:5988/root/virt:Xen_AllocationCapabilities >> localhost:5988/root/virt:CIM_Capabilities >> localhost:5988/root/virt:CIM_MonitorResolution >> localhost:5988/root/virt:CIM_DiagnosticServiceRecord >> localhost:5988/root/virt:CIM_PhysicalStatisticalInformation >> localhost:5988/root/virt:CIM_ExtraCapacityGroup >> localhost:5988/root/virt:CIM_BlockStorageStatisticalData >> localhost:5988/root/virt:PRS_Attachment >> localhost:5988/root/virt:CIM_DiagnosticSettingRecord >> localhost:5988/root/virt:CIM_SystemIdentification >> localhost:5988/root/virt:CIM_UnitOfWork >> localhost:5988/root/virt:CIM_AffectedJobElement >> localhost:5988/root/virt:CIM_NamedSharedIKESecret >> localhost:5988/root/virt:CIM_SAPStatisticalInformation >> localhost:5988/root/virt:PRS_FeatureResource >> localhost:5988/root/virt:CIM_StorageRedundancySet >> localhost:5988/root/virt:PRS_Feature >> localhost:5988/root/virt:CIM_PhysicalMedia >> localhost:5988/root/virt:CIM_Magazine >> localhost:5988/root/virt:CIM_J2eeStatefulSessionBeanStats >> localhost:5988/root/virt:CIM_BIOSFeatureBIOSElements >> localhost:5988/root/virt:PRS_ExpressionElement >> localhost:5988/root/virt:CIM_LANSegment >> localhost:5988/root/virt:CIM_NextHopRouting >> localhost:5988/root/virt:CIM_SpareGroup >> localhost:5988/root/virt:CIM_HomeForMedia >> localhost:5988/root/virt:PRS_Activity >> localhost:5988/root/virt:PRS_SolutionProblem >> localhost:5988/root/virt:CIM_DataFile >> localhost:5988/root/virt:CIM_MethodParameters >> localhost:5988/root/virt:CIM_FCPortStatistics >> localhost:5988/root/virt:KVM_VirtualSystemMigrationCapabilities >> localhost:5988/root/virt:CIM_CommonDatabaseStatistics >> localhost:5988/root/virt:CIM_OwningJobElement >> localhost:5988/root/virt:CIM_TransparentBridgingStatistics >> localhost:5988/root/virt:CIM_StatisticalSetting >> localhost:5988/root/virt:CIM_RoutingPolicy >> localhost:5988/root/virt:CIM_RedundancyComponent >> localhost:5988/root/virt:CIM_RangesOfConfiguration >> localhost:5988/root/virt:CIM_NetworkPortStatistics >> localhost:5988/root/virt:CIM_MemberPrincipal >> localhost:5988/root/virt:CIM_LocalizationCapabilities >> localhost:5988/root/virt:Xen_ElementSettingData >> localhost:5988/root/virt:CIM_ElementSettingData >> localhost:5988/root/virt:CIM_J2eeJDBCNonpooledConnections >> localhost:5988/root/virt:CIM_ConnectivityCollection >> localhost:5988/root/virt:CIM_PhysicalMediaInLocation >> localhost:5988/root/virt:LXC_ElementSettingData >> localhost:5988/root/virt:KVM_ElementSettingData >> localhost:5988/root/virt:CIM_AllocationCapabilities >> localhost:5988/root/virt:CIM_DeviceFile >> localhost:5988/root/virt:CIM_DatabaseSegmentSettingData >> localhost:5988/root/virt:CIM_PolicyRoleCollection >> localhost:5988/root/virt:CIM_NetworkPortSettings >> localhost:5988/root/virt:CIM_RedundancySetCapabilities >> localhost:5988/root/virt:CIM_StorageMediaLocation >> localhost:5988/root/virt:CIM_IPsecTunnelAction >> localhost:5988/root/virt:CIM_ChassisInRack >> localhost:5988/root/virt:CIM_SAStaticAction >> localhost:5988/root/virt:CIM_IPRoute >> localhost:5988/root/virt:CIM_LogicalElementPerformsUoW >> localhost:5988/root/virt:CIM_ComputerSystemNodeCapabilities >> localhost:5988/root/virt:CIM_PreambleFilter >> localhost:5988/root/virt:CIM_J2eeMessageDrivenBeanStats >> localhost:5988/root/virt:PRS_ContactPerson >> localhost:5988/root/virt:CIM_Account >> localhost:5988/root/virt:PRS_AdminAssociation >> localhost:5988/root/virt:PRS_SolutionReference >> localhost:5988/root/virt:CIM_Dependency >> localhost:5988/root/virt:CIM_EntriesInFilterList >> localhost:5988/root/virt:CIM_SymbolicLink >> localhost:5988/root/virt:CIM_ProductPhysicalComponent >> localhost:5988/root/virt:CIM_VendorPolicyCondition >> localhost:5988/root/virt:CIM_DiagnosticResultInPackage >> localhost:5988/root/virt:CIM_AuthorizationSubject >> localhost:5988/root/virt:CIM_LogicalPortSettings >> localhost:5988/root/virt:CIM_SwitchPortSpanningTreeStatistics >> localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities >> localhost:5988/root/virt:CIM_BGPCluster >> localhost:5988/root/virt:CIM_IndicationSubscription >> localhost:5988/root/virt:PRS_AdministrativeRevision >> localhost:5988/root/virt:CIM_RecordAppliesToElement >> localhost:5988/root/virt:LXC_SettingsDefineCapabilities >> localhost:5988/root/virt:PRS_Categorization >> localhost:5988/root/virt:CIM_ElementsLinked >> localhost:5988/root/virt:CIM_LogicalFile >> localhost:5988/root/virt:CIM_StorageNameBinding >> localhost:5988/root/virt:PRS_SolutionExpression >> localhost:5988/root/virt:CIM_StatisticsCollection >> localhost:5988/root/virt:KVM_AllocationCapabilities >> localhost:5988/root/virt:CIM_NamedAddressCollection >> localhost:5988/root/virt:CIM_FilterEntryBase >> localhost:5988/root/virt:CIM_RelatedStatistics >> localhost:5988/root/virt:CIM_PolicyAction >> localhost:5988/root/virt:CIM_AuthenticationRule >> localhost:5988/root/virt:CIM_ZoneCapabilities >> localhost:5988/root/virt:CIM_J2eeJDBCStats >> localhost:5988/root/virt:CIM_ProcessIndication >> localhost:5988/root/virt:CIM_PolicyTimePeriodCondition >> localhost:5988/root/virt:CIM_ElementInPolicyRoleCollection >> localhost:5988/root/virt:LXC_AllocationCapabilities >> localhost:5988/root/virt:CIM_SettingsAffectSettings >> localhost:5988/root/virt:CIM_StaticIPAssignmentSettingData >> localhost:5988/root/virt:CIM_StartedUoW >> localhost:5988/root/virt:CIM_SAAction >> localhost:5988/root/virt:CIM_IPXNetwork >> localhost:5988/root/virt:CIM_J2eeJMSProducerStats >> localhost:5988/root/virt:CIM_DiskGroup >> localhost:5988/root/virt:CIM_IPSOFilterEntry >> localhost:5988/root/virt:CIM_LogicalPortCapabilities >> localhost:5988/root/virt:CIM_CompoundPolicyAction >> localhost:5988/root/virt:CIM_AlertInstIndication >> localhost:5988/root/virt:CIM_TimeZoneSettingData >> localhost:5988/root/virt:PRS_AddressLocation >> localhost:5988/root/virt:CIM_J2eeManagedObjectCapabilities >> localhost:5988/root/virt:CIM_InstalledProduct >> localhost:5988/root/virt:CIM_VendorPolicyAction >> localhost:5988/root/virt:CIM_DatabaseResourceStatistics >> localhost:5988/root/virt:PRS_Agreement >> localhost:5988/root/virt:PRS_Solution >> localhost:5988/root/virt:CIM_SATransform >> localhost:5988/root/virt:CIM_AdministrativeDistance >> localhost:5988/root/virt:CIM_Privilege >> localhost:5988/root/virt:CIM_AHTransform >> localhost:5988/root/virt:CIM_PolicyRuleValidityPeriod >> localhost:5988/root/virt:CIM_OrderedDependency >> localhost:5988/root/virt:CIM_ElementSoftwareIdentity >> localhost:5988/root/virt:CIM_SecuritySensitivity >> localhost:5988/root/virt:CIM_PhysicalLink >> localhost:5988/root/virt:CIM_ManagedSystemElement >> localhost:5988/root/virt:CIM_VideoBIOSFeature >> localhost:5988/root/virt:CIM_BoundedPrioritySchedulingElement >> localhost:5988/root/virt:CIM_AGPSoftwareFeature >> localhost:5988/root/virt:CIM_PhysicalTape >> localhost:5988/root/virt:CIM_iSCSIConnectionSettings >> localhost:5988/root/virt:CIM_ClassModification >> localhost:5988/root/virt:CIM_ElementAsUser >> localhost:5988/root/virt:CIM_StorageSettingWithHints >> localhost:5988/root/virt:PRS_Statement >> localhost:5988/root/virt:CIM_DatabaseServiceStatistics >> localhost:5988/root/virt:CIM_RedundancyGroup >> localhost:5988/root/virt:CIM_iSCSISessionSettings >> localhost:5988/root/virt:LXC_ConcreteComponent >> localhost:5988/root/virt:CIM_ActsAsSpare >> localhost:5988/root/virt:CIM_PolicyRuleInPolicyGroup >> localhost:5988/root/virt:CIM_IPsecAction >> localhost:5988/root/virt:CIM_GroupInDiskGroup >> localhost:5988/root/virt:CIM_OrgStructure >> localhost:5988/root/virt:PRS_Transaction >> localhost:5988/root/virt:CIM_SoftwareElementComponent >> localhost:5988/root/virt:CIM_SwitchPortTransparentBridgingStatistics >> localhost:5988/root/virt:CIM_J2eeJMSConsumerStats >> localhost:5988/root/virt:KVM_SettingsDefineCapabilities >> localhost:5988/root/virt:CIM_SettingContext >> localhost:5988/root/virt:CIM_SoftwareFeatureComponent >> localhost:5988/root/virt:CIM_LogicalPortGroup >> localhost:5988/root/virt:CIM_SettingsDefineCapabilities >> localhost:5988/root/virt:CIM_SchedulingElement >> localhost:5988/root/virt:CIM_PolicyCondition >> localhost:5988/root/virt:CIM_MediaPhysicalStatData >> localhost:5988/root/virt:CIM_FCAdapterEventCounters >> localhost:5988/root/virt:CIM_HostedDependency >> localhost:5988/root/virt:CIM_OrganizationalEntity >> localhost:5988/root/virt:CIM_SCSIMultipathSettings >> localhost:5988/root/virt:CIM_FCSwitchCapabilities >> localhost:5988/root/virt:CIM_ConfigurationCapacity >> localhost:5988/root/virt:CIM_ScopedSetting >> localhost:5988/root/virt:CIM_FRUPhysicalElements >> localhost:5988/root/virt:CIM_UnixDirectory >> localhost:5988/root/virt:CIM_AuthenticationRequirement >> localhost:5988/root/virt:CIM_ElementStatisticalData >> localhost:5988/root/virt:CIM_PhysicalStatistics >> localhost:5988/root/virt:CIM_PickerStatData >> localhost:5988/root/virt:CIM_BGPEndpointStatistics >> localhost:5988/root/virt:CIM_J2eeNotification >> localhost:5988/root/virt:LXC_ReferencedProfile >> localhost:5988/root/virt:CIM_PhysicalElement >> localhost:5988/root/virt:CIM_UsersAccess >> localhost:5988/root/virt:CIM_StorageSettingsGeneratedFromCapabilities >> localhost:5988/root/virt:CIM_PublicPrivateKeyAuthentication >> localhost:5988/root/virt:CIM_NextHopRoute >> localhost:5988/root/virt:PRS_Category >> localhost:5988/root/virt:CIM_SystemSpecificCollection >> localhost:5988/root/virt:CIM_J2eeJMSEndpointStats >> localhost:5988/root/virt:CIM_DiagnosticServiceCapabilities >> localhost:5988/root/virt:CIM_PublicPrivateKeyPair >> localhost:5988/root/virt:CIM_PickerStatInfo >> localhost:5988/root/virt:PRS_Resolution >> localhost:5988/root/virt:PRS_ServiceResolutionSolution >> localhost:5988/root/virt:CIM_MediaPhysicalStatInfo >> localhost:5988/root/virt:CIM_InstCreation >> localhost:5988/root/virt:CIM_TokenRingPortStatistics >> localhost:5988/root/virt:CIM_ReferencedProfile >> localhost:5988/root/virt:CIM_PrintJob >> localhost:5988/root/virt:CIM_ElementSetting >> localhost:5988/root/virt:KVM_ReferencedProfile >> localhost:5988/root/virt:CIM_PowerManagementCapabilities >> localhost:5988/root/virt:CIM_ProductComponent >> localhost:5988/root/virt:CIM_SoftwareFeatureSoftwareElements >> localhost:5988/root/virt:CIM_Docked >> localhost:5988/root/virt:CIM_DependencyContext >> localhost:5988/root/virt:CIM_PolicySetValidityPeriod >> localhost:5988/root/virt:CIM_ConcreteCollection >> localhost:5988/root/virt:CIM_OtherOrgUnitInformation >> localhost:5988/root/virt:CIM_WRRSchedulingElement >> localhost:5988/root/virt:CIM_VideoBIOSFeatureVideoBIOSElements >> localhost:5988/root/virt:CIM_FCPortCapabilities >> localhost:5988/root/virt:CIM_ProductSupport >> localhost:5988/root/virt:CIM_SoftwareElement >> localhost:5988/root/virt:Xen_HostedDependency >> localhost:5988/root/virt:CIM_OSPFAreaConfiguration >> localhost:5988/root/virt:CIM_OtherOrganizationInformation >> localhost:5988/root/virt:CIM_MemoryCapacity >> localhost:5988/root/virt:CIM_PackagedComponent >> localhost:5988/root/virt:CIM_J2eeJMSStatConnections >> localhost:5988/root/virt:CIM_PhysicalConnector >> localhost:5988/root/virt:CIM_FIFOPipeFile >> localhost:5988/root/virt:CIM_RecordForLog >> localhost:5988/root/virt:CIM_Card >> localhost:5988/root/virt:CIM_RelatedStatisticalData >> localhost:5988/root/virt:CIM_Role >> localhost:5988/root/virt:CIM_FRU >> localhost:5988/root/virt:CIM_Zone >> localhost:5988/root/virt:CIM_SAEndpointConnectionStatistics >> localhost:5988/root/virt:PRS_ExpressionLink >> localhost:5988/root/virt:CIM_UnixProcessStatisticalInformation >> localhost:5988/root/virt:CIM_AllocationSchedulingElement >> localhost:5988/root/virt:CIM_Organization >> localhost:5988/root/virt:PRS_ContactOrganization >> localhost:5988/root/virt:CIM_Rack >> localhost:5988/root/virt:CIM_PolicyRule >> localhost:5988/root/virt:CIM_Product >> localhost:5988/root/virt:PRS_Product >> localhost:5988/root/virt:CIM_MoreOrganizationInfo >> localhost:5988/root/virt:CIM_SNMPTrapIndication >> localhost:5988/root/virt:PRS_ServiceProblem >> localhost:5988/root/virt:CIM_ElementSecuritySensitivity >> localhost:5988/root/virt:CIM_ConnectorOnPackage >> localhost:5988/root/virt:CIM_PhysicalCapacity >> localhost:5988/root/virt:CIM_PeerIDPayloadFilterEntry >> localhost:5988/root/virt:Xen_ReferencedProfile >> localhost:5988/root/virt:CIM_NetworkingIDAuthentication >> localhost:5988/root/virt:CIM_Configuration >> localhost:5988/root/virt:CIM_VirtualSystemMigrationCapabilities >> localhost:5988/root/virt:CIM_BIOSFeature >> localhost:5988/root/virt:CIM_ConfigurationData >> localhost:5988/root/virt:CIM_OrderedMemberOfCollection >> localhost:5988/root/virt:CIM_JobSettingData >> localhost:5988/root/virt:CIM_AssignedIdentity >> localhost:5988/root/virt:CIM_ThresholdIndication >> localhost:5988/root/virt:CIM_LogicalNetwork >> localhost:5988/root/virt:CIM_J2eeURLStats >> localhost:5988/root/virt:CIM_Synchronized >> localhost:5988/root/virt:CIM_DynamicForwardingEntry >> localhost:5988/root/virt:PRS_Problem >> localhost:5988/root/virt:CIM_Job >> localhost:5988/root/virt:PRS_Administrative >> localhost:5988/root/virt:CIM_DatabaseParameter >> localhost:5988/root/virt:LXC_EnabledLogicalElementCapabilities >> localhost:5988/root/virt:Xen_ComputerSystemMigrationJobDeletedIndication >> localhost:5988/root/virt:CIM_FilteredBGPAttributes >> localhost:5988/root/virt:CIM_Chip >> localhost:5988/root/virt:CIM_ReplacementFRU >> localhost:5988/root/virt:CIM_ListenerDestination >> localhost:5988/root/virt:CIM_CorrespondingSettingsRecord >> localhost:5988/root/virt:CIM_ReplacementSet >> localhost:5988/root/virt:PRS_ActivityTransaction >> localhost:5988/root/virt:LXC_ComputerSystemMigrationJobDeletedIndication >> localhost:5988/root/virt:KVM_ComputerSystemMigrationJobModifiedIndication >> >> localhost:5988/root/virt:CIM_ElementHasBeenFRUed >> localhost:5988/root/virt:PRS_RevisionContact >> localhost:5988/root/virt:CIM_PacketFilterCondition >> localhost:5988/root/virt:KVM_ComputerSystemMigrationJobDeletedIndication >> localhost:5988/root/virt:CIM_BiometricAuthentication >> localhost:5988/root/virt:CIM_IKEProposal >> localhost:5988/root/virt:CIM_ConcreteComponent >> localhost:5988/root/virt:CIM_Slot >> localhost:5988/root/virt:CIM_ClassCreation >> localhost:5988/root/virt:KVM_ConcreteComponent >> localhost:5988/root/virt:CIM_Identity >> localhost:5988/root/virt:Xen_ComputerSystemModifiedIndication >> localhost:5988/root/virt:PRS_CategoryParentChild >> localhost:5988/root/virt:CIM_MoreGroupInfo >> localhost:5988/root/virt:CIM_ListsInRoutingPolicy >> localhost:5988/root/virt:CIM_DeviceErrorCounts >> localhost:5988/root/virt:KVM_ComputerSystemModifiedIndication >> localhost:5988/root/virt:CIM_PoweredStatisticalData >> localhost:5988/root/virt:LXC_ComputerSystemModifiedIndication >> localhost:5988/root/virt:LXC_VirtualSystemMigrationSettingData >> localhost:5988/root/virt:CIM_Profile >> localhost:5988/root/virt:CIM_J2eeEJBStats >> localhost:5988/root/virt:CIM_IPNetworkIdentity >> localhost:5988/root/virt:CIM_CommonDatabaseCapabilities >> localhost:5988/root/virt:PRS_Contact >> localhost:5988/root/virt:CIM_FilterListsInBGPRouteMap >> localhost:5988/root/virt:CIM_ZoneSet >> localhost:5988/root/virt:CIM_MetricDefinition >> localhost:5988/root/virt:PRS_ActivityContact >> localhost:5988/root/virt:Xen_ConcreteComponent >> localhost:5988/root/virt:CIM_BGPPeerGroup >> localhost:5988/root/virt:CIM_SANegotiationAction >> localhost:5988/root/virt:CIM_Policy >> localhost:5988/root/virt:CIM_OtherGroupInformation >> localhost:5988/root/virt:CIM_PolicySetAppliesToElement >> localhost:5988/root/virt:LXC_VirtualSystemMigrationCapabilities >> localhost:5988/root/virt:CIM_ParameterValueSources >> localhost:5988/root/virt:CIM_LogicalElement >> localhost:5988/root/virt:CIM_J2eeJTAStats >> localhost:5988/root/virt:CIM_J2eeJCAStats >> localhost:5988/root/virt:CIM_ParametersForMethod >> localhost:5988/root/virt:CIM_J2eeJMSStats >> localhost:5988/root/virt:CIM_J2eeJVMStats >> localhost:5988/root/virt:CIM_J2eeStatistic >> localhost:5988/root/virt:PRS_ProductAsset >> localhost:5988/root/virt:KVM_EnabledLogicalElementCapabilities >> localhost:5988/root/virt:CIM_UserEntity >> localhost:5988/root/virt:CIM_StorageRedundancyGroup >> localhost:5988/root/virt:CIM_IPAssignmentSettingData >> localhost:5988/root/virt:CIM_ClassIndication >> localhost:5988/root/virt:CIM_IPXConnectivityNetwork >> localhost:5988/root/virt:CIM_AccountIdentity >> localhost:5988/root/virt:Xen_ElementConformsToProfile >> localhost:5988/root/virt:PRS_ServiceProvider >> localhost:5988/root/virt:CIM_ElementConformsToProfile >> localhost:5988/root/virt:KVM_ElementConformsToProfile >> localhost:5988/root/virt:KVM_ComputerSystemDeletedIndication >> localhost:5988/root/virt:CIM_UnixFile >> localhost:5988/root/virt:CIM_SwitchPortSourceRoutingStatistics >> localhost:5988/root/virt:Xen_ComputerSystemDeletedIndication >> localhost:5988/root/virt:PRS_Attached >> localhost:5988/root/virt:CIM_CardInSlot >> localhost:5988/root/virt:CIM_ListenerDestinationCIMXML >> localhost:5988/root/virt:CIM_RedundancySet >> localhost:5988/root/virt:CIM_ServiceStatisticalInformation >> localhost:5988/root/virt:CIM_J2eeEntityBeanStats >> localhost:5988/root/virt:CIM_BGPAttributes >> localhost:5988/root/virt:PRS_ContactItemAddress >> localhost:5988/root/virt:CIM_AdjacentSlots >> localhost:5988/root/virt:KVM_VirtualSystemMigrationSettingData >> localhost:5988/root/virt:CIM_SlotInSlot >> localhost:5988/root/virt:CIM_SettingData >> localhost:5988/root/virt:Xen_ElementCapabilities >> localhost:5988/root/virt:CIM_ProductPhysicalElements >> localhost:5988/root/virt:CIM_RegisteredSubProfile >> localhost:5988/root/virt:CIM_AlertIndication >> localhost:5988/root/virt:PRS_Location >> localhost:5988/root/virt:LXC_ElementCapabilities >> localhost:5988/root/virt:CIM_StorageSettingsAssociatedToCapabilities >> localhost:5988/root/virt:LXC_ComputerSystemDeletedIndication >> localhost:5988/root/virt:CIM_FileSystemCapabilities >> localhost:5988/root/virt:CIM_ConcreteDependency >> localhost:5988/root/virt:Xen_VirtualSystemSettingData >> localhost:5988/root/virt:CIM_IdentityContext >> localhost:5988/root/virt:CIM_DiagnosticRecord >> localhost:5988/root/virt:CIM_BGPRouteMapsInRoutingPolicy >> localhost:5988/root/virt:CIM_RelatedElementCausingError >> localhost:5988/root/virt:CIM_VirtualSystemSettingData >> localhost:5988/root/virt:KVM_VirtualSystemSettingData >> localhost:5988/root/virt:PRS_ProductComponent >> localhost:5988/root/virt:CIM_SAEndpointRefreshSettings >> localhost:5988/root/virt:CIM_ElementFRU >> localhost:5988/root/virt:CIM_PolicyConditionStructure >> localhost:5988/root/virt:CIM_J2eeJCANonpooledConnections >> localhost:5988/root/virt:LXC_HostedDependency >> localhost:5988/root/virt:CIM_InstalledProductImage >> localhost:5988/root/virt:CIM_StorageCapabilities >> localhost:5988/root/virt:LXC_VirtualSystemSettingData >> localhost:5988/root/virt:CIM_BGPStatistics >> localhost:5988/root/virt:CIM_UnixDeviceFile >> localhost:5988/root/virt:CIM_AuthorizationTarget >> localhost:5988/root/virt:CIM_Credential >> localhost:5988/root/virt:CIM_J2eeJavaMailStats >> localhost:5988/root/virt:CIM_ESPTransform >> localhost:5988/root/virt:CIM_PackageInConnector >> localhost:5988/root/virt:CIM_CollectedSoftwareElements >> localhost:5988/root/virt:CIM_GatewayPathID >> localhost:5988/root/virt:CIM_KerberosTicket >> localhost:5988/root/virt:CIM_PolicyGroup >> localhost:5988/root/virt:CIM_CardOnCard >> localhost:5988/root/virt:CIM_BaseMetricDefinition >> localhost:5988/root/virt:CIM_DNSGeneralSettingData >> localhost:5988/root/virt:CIM_StorageHardwareID >> localhost:5988/root/virt:CIM_StorageClientSettingData >> localhost:5988/root/virt:CIM_VideoBIOSElement >> localhost:5988/root/virt:LXC_ElementConformsToProfile >> localhost:5988/root/virt:PRS_ContactContactItem >> localhost:5988/root/virt:CIM_ProductProductDependency >> localhost:5988/root/virt:CIM_InstDeletion >> localhost:5988/root/virt:CIM_DiagnosticResult >> localhost:5988/root/virt:CIM_ProtocolControllerMaskingCapabilities >> localhost:5988/root/virt:CIM_AuthorizedSubject >> localhost:5988/root/virt:CIM_AbstractIndicationSubscription >> localhost:5988/root/virt:CIM_MetricForME >> localhost:5988/root/virt:CIM_SettingsDefineState >> localhost:5988/root/virt:CIM_PackageInChassis >> localhost:5988/root/virt:CIM_OtherRoleInformation >> localhost:5988/root/virt:CIM_EthernetPortStatistics >> localhost:5988/root/virt:CIM_BGPPathAttributes >> localhost:5988/root/virt:CIM_MediaAccessStatData >> localhost:5988/root/virt:CIM_SharedSecretAuthentication >> localhost:5988/root/virt:KVM_SettingsDefineState >> localhost:5988/root/virt:CIM_CollectedMSEs >> localhost:5988/root/virt:CIM_iSCSICapabilities >> localhost:5988/root/virt:PRS_SolutionElement >> localhost:5988/root/virt:PRS_Reference >> localhost:5988/root/virt:CIM_DeviceStatisticalInformation >> localhost:5988/root/virt:CIM_SubUoWDef >> localhost:5988/root/virt:PRS_ResolutionResource >> localhost:5988/root/virt:CIM_IPHeadersFilter >> localhost:5988/root/virt:CIM_DirectoryContainsFile >> localhost:5988/root/virt:CIM_MemoryWithMedia >> localhost:5988/root/virt:KVM_HostedDependency >> localhost:5988/root/virt:CIM_PolicySetInRoleCollection >> localhost:5988/root/virt:CIM_PolicyComponent >> localhost:5988/root/virt:CIM_StatisticalInformation >> localhost:5988/root/virt:CIM_PhysicalPackage >> localhost:5988/root/virt:CIM_AssociatedBlockStatisticsManifestCollection >> localhost:5988/root/virt:PRS_SolutionCategory >> localhost:5988/root/virt:CIM_LinkHasConnector >> localhost:5988/root/virt:CIM_SwitchPortStatistics >> localhost:5988/root/virt:CIM_IPAddressRange >> localhost:5988/root/virt:CIM_BGPRouteMap >> localhost:5988/root/virt:CIM_SystemStatisticalInformation >> localhost:5988/root/virt:CIM_LANConnectivitySegment >> localhost:5988/root/virt:CIM_AccessControlInformation >> localhost:5988/root/virt:CIM_ParticipatesInSet >> localhost:5988/root/virt:CIM_PhysicalFrame >> localhost:5988/root/virt:CIM_MediaAccessStatInfo >> localhost:5988/root/virt:CIM_IndicationFilter >> localhost:5988/root/virt:CIM_PhysicalCredentialAuthentication >> localhost:5988/root/virt:CIM_SpanningTreeStatistics >> localhost:5988/root/virt:CIM_LogicalIdentity >> localhost:5988/root/virt:Xen_EnabledLogicalElementCapabilities >> localhost:5988/root/virt:CIM_StaticForwardingEntry >> localhost:5988/root/virt:PRS_ContactItem >> localhost:5988/root/virt:CIM_FilterEntry >> localhost:5988/root/virt:CIM_ManagedElement >> localhost:5988/root/virt:Xen_SettingsDefineCapabilities >> localhost:5988/root/virt:CIM_LabelReaderStatData >> localhost:5988/root/virt:CIM_SoftwareFeature >> localhost:5988/root/virt:CIM_UoWDefTraceLevelType >> localhost:5988/root/virt:CIM_ClassDeletion >> localhost:5988/root/virt:CIM_MoreRoleInfo >> localhost:5988/root/virt:CIM_ConfigurationComponent >> localhost:5988/root/virt:CIM_MemoryError >> localhost:5988/root/virt:CIM_StatisticalRuntimeOverview >> localhost:5988/root/virt:CIM_J2eeConnectionStats >> localhost:5988/root/virt:Xen_VirtualSystemMigrationSettingData >> localhost:5988/root/virt:CIM_StorageSetting >> localhost:5988/root/virt:CIM_TransformOfPreconfiguredAction >> localhost:5988/root/virt:CIM_Component >> localhost:5988/root/virt:CIM_KerberosAuthentication >> localhost:5988/root/virt:CIM_LabelReaderStatInfo >> localhost:5988/root/virt:CIM_ConnectedTo >> localhost:5988/root/virt:CIM_SNMPDatabaseParameter >> localhost:5988/root/virt:CIM_MemberOfCollection >> localhost:5988/root/virt:CIM_J2eeJMSConnectionSessions >> localhost:5988/root/virt:CIM_StatusCollection >> localhost:5988/root/virt:CIM_ProductSoftwareComponent >> localhost:5988/root/virt:CIM_StorageConfigurationCapabilities >> localhost:5988/root/virt:PRS_Expression >> localhost:5988/root/virt:CIM_CommonDatabaseSettingData >> localhost:5988/root/virt:CIM_FCSwitchSettings >> localhost:5988/root/virt:CIM_BIOSElement >> localhost:5988/root/virt:CIM_J2eeConnectionPoolStats >> localhost:5988/root/virt:CIM_BGPPeerUsesRouteMap >> ============================================================================ >> >> Do these contain clues to solve? >> >> Works for me. >> Toshifumi Fujimura. >>> What is the output of >>> >>> wbemcli ecn http://root:pass at localhost:5988/root/virt >>> >>> Thanks and Regards, >>> Deepti. >>> >>> Toshifumi Fujimura wrote: >>>> Thanks for your reply. >>>> >>>> Currently, WBEM Client works for getting CIM_OperatingSystem. >>>> But not for getting KVM_ComputerSystem. >>>> (I attach the wbemcli output.) >>>> ======================================================================== >>>> >>>> [root at localhost ~]# wbemcli ei >>>> 'http://user:pass at localhost:5988/root/cimv2:cim_operatingsystem' >>>> localhost:5988/root/cimv2:PG_OperatingSystem.CreationClassName="CIM_OperatingSystem",CSCreationClassName="CIM_UnitaryComputerSystem", >>>> >>>> CSName="localhost.localdomain",Name="Fedora" >>>> CSCreationClassName="CIM_UnitaryComputerSystem",CSName="localhost.localdomain", >>>> >>>> CreationClassName="CIM_OperatingSystem",Name="Fedora",Caption="Fedora >>>> release 9.92 (Rawhide)",Description="Fedora release 9.92 (Rawhide)", >>>> Status="Unknown",OSType=36,OtherTypeDescription="2.6.27.3-27.rc1.fc10.i686.PAE >>>> >>>> #1 SMP Sat Oct 18 20:27:11 EDT >>>> 2008",Version="2.6.27.3-27.rc1.fc10.i686.PAE", >>>> LastBootUpTime=20081022122916.000000+540,LocalDateTime=20081022171753.000000+540,CurrentTimeZone=540,NumberOfLicensedUsers=0,NumberOfUsers=5,NumberOfProcesses=166, >>>> >>>> MaxNumberOfProcesses=196608,TotalSwapSpaceSize=4095992,TotalVirtualMemorySize=8233000,FreeVirtualMemory=4095992,FreePhysicalMemory=3384328,TotalVisibleMemorySize=4137008, >>>> >>>> MaxProcessMemorySize=4095992,Distributed=FALSE,MaxProcessesPerUser=196608,SystemUpTime=17317,OperatingSystemCapability="32 >>>> >>>> bit" >>>> >>>> [root at localhost ~]# wbemcli ein >>>> http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem >>>> * >>>> * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: KVM_ComputerSystem >>>> * >>>> ======================================================================== >>>> >>>> >>>> >>>> Anyway cimxxxxx shows Virt_xxx class. >>>> (I attach the "cimprovider -l" output.) >>>> ======================================================================== >>>> >>>> [root at localhost ~]# cimprovider -l >>>> OperatingSystemModule >>>> ComputerSystemModule >>>> ProcessModule >>>> Virt_AllocationCapabilities >>>> Virt_ComputerSystem >>>> Virt_ComputerSystemIndication >>>> Virt_ComputerSystemMigrationIndication >>>> Virt_ConcreteComponent >>>> Virt_ConsoleRedirectionService >>>> Virt_ConsoleRedirectionServiceCapabilities >>>> Virt_Device >>>> Virt_DevicePool >>>> Virt_ElementAllocatedFromPool >>>> Virt_ElementCapabilities >>>> Virt_ElementConformsToProfile >>>> Virt_ElementSettingData >>>> Virt_EnabledLogicalElementCapabilities >>>> Virt_HostedDependency >>>> Virt_HostedResourcePool >>>> Virt_HostedService >>>> Virt_HostSystem >>>> Virt_RASD >>>> Virt_ReferencedProfile >>>> Virt_RegisteredProfile >>>> Virt_ResourceAllocationFromPool >>>> Virt_ResourcePoolConfigurationCapabilities >>>> Virt_ResourcePoolConfigurationService >>>> Virt_ServiceAffectsElement >>>> Virt_SettingsDefineCapabilities >>>> Virt_SettingsDefineState >>>> Virt_SystemDevice >>>> Virt_VirtualSystemManagementCapabilities >>>> Virt_VirtualSystemManagementService >>>> Virt_VirtualSystemSnapshotService >>>> Virt_VirtualSystemSnapshotServiceCapabilities >>>> Virt_VSMigrationCapabilities >>>> Virt_VSMigrationService >>>> Virt_VSMigrationSettingData >>>> Virt_VSSD >>>> Virt_VSSDComponent >>>> ======================================================================== >>>> >>>> >>>>> From these, I guess libvirt-cim provider is not connected properly. >>>> Would you give me an advice to investigate it. >>>> >>>> Thanks >>>> >>>> Toshifumi Fujimura. >>>> >>>>> >>>>> >>>>> Kaitlin Rupert wrote: >>>>>> Toshifumi Fujimura wrote: >>>>>>> I think I've registerd Libvirt-CIM and Libcmputil as CIM Provider. >>>>>>> >>>>>>> I re-installed Libvirt-CIM package. >>>>>>> And I made sure that with Pegasus's command "cimprovider -s -l". >>>>>> >>>>>> You can check to make sure the providers are properly installed >>>>>> by running the following command. Replace user:pass with the >>>>>> username and password of the user that has CIM query rights. >>>>>> >>>>>> The convention is to use the root user or the pegasus user, but >>>>>> you can use any user since you've modified >>>>>> /etc/Pegasus/access.conf to allow all users. >>>>>> >>>>>> wbemcli ein >>>>>> http://user:pass at localhost:5988/root/virt:KVM_ComputerSystem >>>>>> >>>>>> This should return something like the following: >>>>>> >>>>>> localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="demo2" >>>>>> >>>>>> >>>>>> When you run cimtest, you'll need to run the command as root and >>>>>> pass in the root username / password (this will need to be fixed >>>>>> in the future). >>>>>> >>>>>> CIM_NS=root/virt CIM_USER=root CIM_PASS=pass ./runtests >>>>>> libvirt-cim -i localhost -d -v KVM >>>>>> >>>>>>> >>>>>>> But following error messages didn't disappear. >>>>>>> ============================================================== >>>>>>> -------------------------------------------------------------------- >>>>>>> >>>>>>> AllocationCapabilities - 01_enum.py: FAIL >>>>>>> ERROR - Failed to enumerate the class of >>>>>>> KVM_AllocationCapabilities >>>>>>> ERROR - Unauthorized >>>>>>> ERROR - Only 0 pools returned, expected at least 4 >>>>>>> -------------------------------------------------------------------- >>>>>>> >>>>>>> AllocationCapabilities - 02_alloccap_gi_errs.py: FAIL >>>>>>> ERROR - AuthError : Unauthorized >>>>>>> Traceback (most recent call last): >>>>>>> File "./lib/XenKvmLib/const.py", line 116, in do_try >>>>>>> File "02_alloccap_gi_errs.py", line 109, in main >>>>>>> expr_values=exp['invalid_keyvalue'], bug_no="") >>>>>>> File "./lib/XenKvmLib/common_util.py", line 264, in >>>>>>> try_getinstance >>>>>>> File >>>>>>> "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >>>>>>> line 464, in GetInstance >>>>>>> **params) >>>>>>> File >>>>>>> "/usr/lib/python2.5/site-packages/pywbem/cim_operations.py", >>>>>>> line 181, in imethodcall >>>>>>> verify_callback = self.verify_callback) >>>>>>> File "/usr/lib/python2.5/site-packages/pywbem/cim_http.py", >>>>>>> line 226, in wbem_request >>>>>>> raise AuthError(response.reason) >>>>>>> AuthError: Unauthorized >>>>>>> ERROR - None >>>>>>> -------------------------------------------------------------------- >>>>>>> >>>>>>> ============================================================== >>>>>>> Would you have any more suggestion of this messages? >>>>>> >>>>>> This error is because pywbem is unable to authenticate with >>>>>> Pegasus. Be sure the following query works (change pass to the >>>>>> proper password): >>>>>> >>>>>> wbemcli ein >>>>>> http://root:pass at localhost:5988/root/virt:KVM_ComputerSystem >>>>>> >>>>>> Hope this helps! =) >>>>>> >>>>> You can also verify if the required providers are installed by >>>>> using the following query: >>>>> >>>>> wbemcli ecn http://root:pass at localhost:5988/root/virt >>>>> >>>>> The above query will report all the providers registered with the >>>>> /root/virt namespace. >>>>> you can use the same query replacing the above /root/virt with >>>>> other namespace like /root/interop to know the providers >>>>> registered in that particular namespace. >>>>> >>>>> Regards, >>>>> Deepti. >>>>> >>>>> _______________________________________________ >>>>> 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 >>> >>> >> >> > > _______________________________________________ > 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 Oct 23 10:23:51 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 23 Oct 2008 03:23:51 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 02_reverse.py of HostedService to also verify the association with CRS Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1224757317 25200 # Node ID c177b3f78ae1fe0b3405f9bcad8b69316f78badf # Parent 2c77be4e041a0a8669d234d6219e1f207b6d4ed5 [TEST] Updating 02_reverse.py of HostedService to also verify the association with CRS. Tested on KVM with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 2c77be4e041a -r c177b3f78ae1 suites/libvirt-cim/cimtest/HostedService/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Thu Oct 23 00:48:48 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Thu Oct 23 03:21:57 2008 -0700 @@ -41,7 +41,8 @@ servicelist = {"ResourcePoolConfigurationService" : "RPCS", "VirtualSystemManagementService" : "Management Service", - "VirtualSystemMigrationService" : "MigrationService"} + "VirtualSystemMigrationService" : "MigrationService", + "ConsoleRedirectionService" : "ConsoleRedirectionService" } status, host_name, host_ccn = get_host_info(options.ip, virt) if status != PASS: @@ -72,9 +73,10 @@ logger.error("CreationClassName Error") return FAIL - elif name != host_name: + if name != host_name: logger.error("CCN Error") return FAIL + return PASS if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Thu Oct 23 10:59:10 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 23 Oct 2008 16:29:10 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Clean up minor test issues with VSMS 14_define_sys_disk.py In-Reply-To: <664c2fc4c52c63c5505a.1224626755@localhost.localdomain> References: <664c2fc4c52c63c5505a.1224626755@localhost.localdomain> Message-ID: <490058FE.1000305@linux.vnet.ibm.com> +1 for me Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1224626746 25200 > # Node ID 664c2fc4c52c63c5505a19c59fdc6e94c7135191 > # Parent ede6419d3a506b7cb67bbb91e2d80f2010a0bc3c > [TEST] Clean up minor test issues with VSMS 14_define_sys_disk.py > > Signed-off-by: Kaitlin Rupert > > diff -r ede6419d3a50 -r 664c2fc4c52c suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue Oct 21 03:51:14 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue Oct 21 15:05:46 2008 -0700 > @@ -53,8 +53,8 @@ > > rasds = get_default_rasds(ip, virt) > > - for i in range(0, len(rasds)): > - if rasds[i]['PoolID'].find('DiskPool') >= 0: > + for i in range(len(rasds)): > + if 'DiskPool' in rasds[i]['PoolID']: > rasds[i]['Address'] = addr > rasds[i] = inst_to_mof(rasds[i]) > > > _______________________________________________ > 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 Oct 23 11:02:53 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 23 Oct 2008 16:32:53 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Improve libvirt virt support check in main.py In-Reply-To: <0ceafbdc8a2d17b52ca7.1224634288@localhost.localdomain> References: <0ceafbdc8a2d17b52ca7.1224634288@localhost.localdomain> Message-ID: <490059DD.7050104@linux.vnet.ibm.com> +1 for me. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1224634275 25200 > # Node ID 0ceafbdc8a2d17b52ca72401b7ffaeb220069b66 > # Parent 868aa0f5175568c5752787c1fcbd2b1df4001aad > [TEST] Improve libvirt virt support check in main.py > > If /usr/bin/qemu does not exist on the system (or if libvirt cannot find it), > it is possible to define KVM guests but not run them. Instead of returning a > error saying libvirt doesn't support the virt type, we need to return an error > that indicates a problem with libvirt was encountered. > > Signed-off-by: Kaitlin Rupert > > diff -r 868aa0f51755 -r 0ceafbdc8a2d suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Tue Oct 21 01:31:11 2008 -0700 > +++ b/suites/libvirt-cim/main.py Tue Oct 21 17:11:15 2008 -0700 > @@ -90,10 +90,15 @@ > print "Cleaned log files." > > def pre_check(ip, virt): > - cmd = "virsh -c %s version " % utils.virt2uri(virt) > + cmd = "virsh -c %s list --all" % utils.virt2uri(virt) > ret, out = utils.run_remote(ip, cmd) > if ret != 0: > return "This libvirt install does not support %s" % virt > + > + cmd = "virsh -c %s version" % utils.virt2uri(virt) > + ret, out = utils.run_remote(ip, cmd) > + if ret != 0: > + return "Encountered an error querying libvirt with: %s" % cmd > > cmd = "ps -ef | grep -v grep | grep cimserver" > rc, out = utils.run_remote(ip, cmd) > > _______________________________________________ > 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 Oct 23 12:38:54 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 23 Oct 2008 05:38:54 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the 01_forward.py tc of HostedResourcePool Message-ID: <695725ffeb3d3b13c8d0.1224765534@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1224765522 25200 # Node ID 695725ffeb3d3b13c8d02e8c9ef9aa6e094a64fa # Parent 35ff687c818e5c4d38e152aef0f35ca22a4956cf [TEST] Fixing the 01_forward.py tc of HostedResourcePool . Tested on KVM with F9 rpm. Signed-off-by: Deepti B. Kalakeri diff -r 35ff687c818e -r 695725ffeb3d suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Wed Oct 22 02:08:26 2008 -0700 +++ b/suites/libvirt-cim/cimtest/HostedResourcePool/01_forward.py Thu Oct 23 05:38:42 2008 -0700 @@ -107,7 +107,7 @@ #Verifying that we get the atleast the expected instanceid #for every pool class for key in exp_pllist.keys(): - if Set(exp_pllist[key]) != Set(res_pllist[key]): + if Set(exp_pllist[key]) - Set(res_pllist[key]): logger.error("InstanceID mismatch") raise Exception("Expected InstanceID: %s \n \t Got: %s" % (sorted(exp_pllist[key]), From kaitlin at linux.vnet.ibm.com Thu Oct 23 15:39:46 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 23 Oct 2008 08:39:46 -0700 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <4900478A.2050007@np.css.fujitsu.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> <48FEEE40.7040107@np.css.fujitsu.com> <48FEFA52.8080202@linux.vnet.ibm.com> <48FFE101.9010709@np.css.fujitsu.com> <490003D9.80100@linux.vnet.ibm.com> <4900478A.2050007@np.css.fujitsu.com> Message-ID: <49009AC2.4030103@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > Thanks Mr or Ms Deepti B Kalakeri and Mr or Ms Kaitlin Rupert. > I tryed to regist CIM schema for Libvirt-CIM as your advice. > > On "make postinstall",I met this error message. > > ======================================================================================= > > Registering providers with active cimserver > Parsing error: parse error: Error adding class Xen_KVMRedirectionSAP to > the repository: > CIM_ERR_INVALID_SUPERCLASS: CIM_KVMRedirectionSAP > make: *** [postinstall] Error 250 > ======================================================================================= > > > I think the superclasses > "CIM_KVMRedirectionSAP","CIM_ERR_INVALID_SUPERCLASS" don't exist in my > cimserver. > How can I add those classes? > > Works for me. > Toshifumi Fujimura. Can you try the following: Restart Pegasus After restarting Pegasus, try: wbemcli ecn http://user:pass at localhost/root/virt | grep CIM_KVMRedirectionSAP This should return a record like the following: localhost:5988/root/virt:CIM_KVMRedirectionSAP After that is done, you can do: sudo make preuninstall sudo make postinstall Running "sudo make preuninstall" should have put the proper classes in place. However, sometimes Pegasus needs to be restarted after "sudo make preinstall". If the wbemcli command doesn't return any records, you can do the following: sudo make preuninstall sudo make preinstall restart Pegasus sudo make postinstall I hope this helps! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Oct 23 17:02:06 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 23 Oct 2008 10:02:06 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] Add vnc_ports struct and functions for building a list of ports References: <155077ac9e3ca778dc85.1224554343@localhost.localdomain> Message-ID: <878wsf5jox.fsf@caffeine.danplanet.com> KR> +#define VNC_PORT_MIN 5900 KR> +#define VNC_PORT_MAX 5999 KR> +#define HASH_SIZE 128 Your hash size is larger than your key domain. That means that unless your hash function is really bad, you should never have any collisions... :) The domain is small enough, that I'd just use an array of MAX-MIN, with a hash function of modulus. KR> +static int resize(struct vnc_ports *list, int newmax) KR> +{ KR> + char **newlist; KR> + int i; KR> + KR> + newlist = realloc(list->list, newmax * sizeof(char *)); KR> + if (!newlist) This should be: if (newlist != NULL) KR> +static void vnc_list_init(struct vnc_ports *vnc_hash[]) KR> +{ KR> + int i; KR> + KR> + for (i = 0; i < HASH_SIZE; i++) { KR> + vnc_hash[i] = malloc(sizeof(struct vnc_ports)); KR> + vnc_hash[i]->list = NULL; Crash here if the above malloc() fails. KR> + vnc_hash[i]->cur = vnc_hash[i]->max = 0; KR> + } KR> +} Since this function can fail, it needs to be non-void and return an indication of success. Alternately, since the array of buckets is static anyway, why not just use a static array instead of allocating memory for all the buckets? KR> +static void vnc_list_free(struct vnc_ports *vnc_hash[]) KR> +{ KR> + int i; KR> + KR> + for (i = 0; i < HASH_SIZE; i++) { You've got a whitespace issue here. KR> + if (vnc_hash[i]->list != NULL) KR> + free(vnc_hash[i]->list); KR> + } You free the list, but you don't free the pointers in the list. Since you're loading those up with the result of strdup() in vnc_list_add(), you leak all of that memory. KR> + vnc_list_init(vnc_hash); This is in vnc_list_free(), but doesn't vnc_list_init() allocate memory for the buckets? This seems to go through and free the list member of each bucket, and then leak the memory for the actual bucket by allocating more memory over top of them. KR> +static int vnc_list_add(struct vnc_ports *list, char *port) KR> +{ KR> + if ((list->cur + 1) >= list->max) { KR> + int ret; KR> + KR> + ret = resize(list, list->max + 5); KR> + KR> + if (!ret) KR> + return 0; KR> + } KR> + KR> + list->list[list->cur] = strdup(port); KR> + list->cur++; KR> + KR> + return 1; KR> +} Any reason not to just use a linked list? Since we're not expecting a lot of ports (100 maximum per system, according to your limits), doing this whole resize thing seems kinda overkill. Inserting at the head if a linked list is easy and cheap. Better yet, why not just keep a count of sessions and avoid all the chaining, collision resolution, and allocation madness? :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Thu Oct 23 17:05:54 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 23 Oct 2008 10:05:54 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] Add get_vnc_sessions() to determine all of the VNC ports available or in use In-Reply-To: <6d537f5e2b65c5d04963.1224554344@localhost.localdomain> (Kaitlin Rupert's message of "Mon, 20 Oct 2008 18:59:04 -0700") References: <6d537f5e2b65c5d04963.1224554344@localhost.localdomain> Message-ID: <874p335jil.fsf@caffeine.danplanet.com> KR> +static size_t get_vnc_hash_key(unsigned int key) KR> +{ KR> + return key % VNC_PORT_MIN; KR> +} What happens if I set my guest to VNC port 500? KR> +static CMPIStatus port_to_str(unsigned int port, KR> + char **port_str) KR> +{ KR> + CMPIStatus s = {CMPI_RC_OK, NULL}; KR> + KR> + if (asprintf(port_str, "%" PRIu16, port) == -1) { KR> + cu_statusf(_BROKER, &s, KR> + CMPI_RC_ERR_FAILED, KR> + "Unable to determine session port"); KR> + } KR> + KR> + return s; KR> +} Hmm, I don't like the idea of alloc'ing strings to store ports. They're just integers after all :) KR> +static CMPIStatus port_convert(unsigned int port, KR> + char *in_str, KR> + int *out_port) KR> +{ KR> + CMPIStatus s = {CMPI_RC_OK, NULL}; KR> + char *str = NULL; KR> + KR> + if (in_str == NULL) { KR> + s = port_to_str(port, &str); KR> + if (s.rc != CMPI_RC_OK) KR> + goto out; KR> + } else KR> + str = strdup(in_str); KR> + KR> + *out_port = strtol(str, NULL, 0); I think sscanf() is always a better choice. KR> +static CMPIStatus get_vnc_sessions(struct vnc_ports *vnc_hash[]) KR> +{ KR> + CMPIStatus s = {CMPI_RC_OK, NULL}; KR> + const char *path = PROC_TCP; KR> + unsigned int lport = 0; KR> + unsigned int rport = 0; KR> + FILE *tcp_info; KR> + char *line = NULL; KR> + size_t len = 0; KR> + char *remote_port; KR> + int local_port; KR> + int index; KR> + int val; KR> + int ret; KR> + KR> + tcp_info = fopen(path, "r"); KR> + if (tcp_info== NULL) { KR> + cu_statusf(_BROKER, &s, KR> + CMPI_RC_ERR_FAILED, KR> + "Failed to open %s: %m", tcp_info); KR> + goto out; KR> + } KR> + KR> + if (getline(&line, &len, tcp_info) == -1) { KR> + cu_statusf(_BROKER, &s, KR> + CMPI_RC_ERR_FAILED, KR> + "Failed to read from %s", tcp_info); KR> + goto out; KR> + } KR> + KR> + while (getline(&line, &len, tcp_info) > 0) { KR> + ret = sscanf(line, "%d: %*[^:]:%X %*[^:]:%X", &val, &lport, KR> + &rport); KR> + if (ret != 3) { KR> + cu_statusf(_BROKER, &s, KR> + CMPI_RC_ERR_FAILED, KR> + "Unable to determine active sessions"); KR> + goto out; KR> + } KR> + KR> + s = port_convert(lport, NULL, &local_port); KR> + if (s.rc != CMPI_RC_OK) KR> + goto out; KR> + KR> + if ((local_port < VNC_PORT_MIN) || (local_port > VNC_PORT_MAX)) KR> + continue; Ah, this is good that you check the range to avoid the crash :) However, do we want to support guests with non-standard ports? Seems like we do, so maybe we do need some collision resolution in the hash logic after all. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 23 17:15:25 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 23 Oct 2008 10:15:25 -0700 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <49009AC2.4030103@linux.vnet.ibm.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> <48FEEE40.7040107@np.css.fujitsu.com> <48FEFA52.8080202@linux.vnet.ibm.com> <48FFE101.9010709@np.css.fujitsu.com> <490003D9.80100@linux.vnet.ibm.com> <4900478A.2050007@np.css.fujitsu.com> <49009AC2.4030103@linux.vnet.ibm.com> Message-ID: <4900B12D.5020705@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Toshifumi Fujimura wrote: >> Thanks Mr or Ms Deepti B Kalakeri and Mr or Ms Kaitlin Rupert. >> I tryed to regist CIM schema for Libvirt-CIM as your advice. Hello, I've just added a libvirt-cim setup page on the wiki: http://wiki.libvirt.org/page/Libvirt-cim_setup -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 23 21:37:22 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 23 Oct 2008 14:37:22 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Remove old enumerate and getInstance and update device related tc In-Reply-To: <50b2dcc3ef1eabcaf098.1224744583@elm3b197.beaverton.ibm.com> References: <50b2dcc3ef1eabcaf098.1224744583@elm3b197.beaverton.ibm.com> Message-ID: <4900EE92.9040108@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1224744576 25200 > # Node ID 50b2dcc3ef1eabcaf09858ad18b78ba1c4e96031 > # Parent 35ff687c818e5c4d38e152aef0f35ca22a4956cf > [TEST]#2 Remove old enumerate and getInstance and update device related tc > > -from XenKvmLib.devices import CIM_Instance - > -class CIM_CimtestClass(CIM_Instance): > +class CIM_CimtestClass: > def __init__(self, host, ref): > > conn = pywbem.WBEMConnection('http://%s' % host, > @@ -373,7 +46,6 @@ > self.inst = inst > self.ref = ref > > - CIM_Instance.__init__(self, inst) Hi Daisy, Not sure if I misspoke in a different email, but CIM_Instance needs to stay since CIM_CimtestClass is dependent on it. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 23 22:16:09 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 23 Oct 2008 15:16:09 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Addring new tc 01_enum_crs.py to verify CRS fields In-Reply-To: <73be202634a52607d5ab.1224746760@localhost.localdomain> References: <73be202634a52607d5ab.1224746760@localhost.localdomain> Message-ID: <4900F7A9.4030706@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1224746643 25200 > # Node ID 73be202634a52607d5ab54ca62a2706ec7aca23b > # Parent 868aa0f5175568c5752787c1fcbd2b1df4001aad > [TEST] Addring new tc 01_enum_crs.py to verify CRS fields. > > Assumption : > The value of MaxConcurrentEnabledSAPs = 2* nof of guest on the machine. > This needs to be updated > > Tested on KVM with current sources. > > + > +sup_types = ['Xen', 'KVM', 'XenFV'] This should also work for LXC. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 23 22:20:20 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 23 Oct 2008 15:20:20 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Addring new tc 01_enum_crs.py to verify CRS fields In-Reply-To: <73be202634a52607d5ab.1224746760@localhost.localdomain> References: <73be202634a52607d5ab.1224746760@localhost.localdomain> Message-ID: <4900F8A4.8040907@linux.vnet.ibm.com> > + crs_val = crs[0] You also want to check the length of crs. The provider should always return an instance, but it's always good to have a check. If something causes the provider not to return an instance and also not return a failure, then you'd be accessing the array out of bounds. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 23 22:23:53 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 23 Oct 2008 15:23:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc 02_enum_crscap.py to verify ConsoleRedirectionServiceCapabilities fields In-Reply-To: <2c77be4e041a0a8669d2.1224748163@localhost.localdomain> References: <2c77be4e041a0a8669d2.1224748163@localhost.localdomain> Message-ID: <4900F979.70107@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1224748128 25200 > # Node ID 2c77be4e041a0a8669d234d6219e1f207b6d4ed5 > # Parent 73be202634a52607d5ab54ca62a2706ec7aca23b > [TEST] Adding new tc 02_enum_crscap.py to verify ConsoleRedirectionServiceCapabilities fields. > > Tested on KVM with current sources. > > Signed-off-by: Deepti B. Kalakeri > > + > +sup_types = ['Xen', 'KVM', 'XenFV'] Needs LXC support. > + at do_main(sup_types) > +def main(): > + virt = main.options.virt > + server = main.options.ip > + cname = 'ConsoleRedirectionServiceCapabilities' > + cap_name = 'ConsoleRedirectionCapabilities' > + classname = get_typed_class(virt, cname) > + try: > + crs = EnumInstances(server, classname) > + crs_val = crs[0] Need to verify the length here before accessing the array. > + if crs_val.InstanceID != cap_name: > + logger.error("InstanceID Mismatch") > + logger.error("Got '%s', Expected '%s'", crs_val.InstanceID, > + cap_name) > + return FAIL > + > + if crs_val.ElementName != cap_name: > + logger.error("ElementName Mismatch") > + logger.error("Got '%s', Expected '%s'", crs_val.ElementName, > + cap_name) > + return FAIL > + > + mode_supp = crs_val.SharingModeSupported[0] > + if mode_supp != 3: Can you declare the 3 as a variable (in all caps) at the start of the test. Makes it a little clear that 3 is a CIM defined value. Also, if this changes later on, it's easier to update the test. > + logger.error("SharingModeSupported Mismatch") > + logger.error("Got '%s', Expected '%s'", mode_supp, 3) Instead of using 3 here, can you use the variable suggested above? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Fri Oct 24 01:34:36 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 24 Oct 2008 09:34:36 +0800 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Remove old enumerate and getInstance and update device related tc In-Reply-To: <4900EE92.9040108@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-24 05:37:22: > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1224744576 25200 > > # Node ID 50b2dcc3ef1eabcaf09858ad18b78ba1c4e96031 > > # Parent 35ff687c818e5c4d38e152aef0f35ca22a4956cf > > [TEST]#2 Remove old enumerate and getInstance and update device related tc > > > > > -from XenKvmLib.devices import CIM_Instance > > - > > -class CIM_CimtestClass(CIM_Instance): > > +class CIM_CimtestClass: > > def __init__(self, host, ref): > > > > conn = pywbem.WBEMConnection('http://%s' % host, > > @@ -373,7 +46,6 @@ > > self.inst = inst > > self.ref = ref > > > > - CIM_Instance.__init__(self, inst) > > Hi Daisy, > > Not sure if I misspoke in a different email, but CIM_Instance needs to > stay since CIM_CimtestClass is dependent on it. Hmm, you said the CIM_Instance should be removed, and I update CIM_CimtestClass =) I will cook up a new patch today. Thanks! > > 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 Fri Oct 24 02:17:21 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 23 Oct 2008 19:17:21 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Remove old enumerate and getInstance and update device related tc Message-ID: # HG changeset patch # User Guolian Yun # Date 1224814635 25200 # Node ID a4aa517fe9263494afc0183e172dac0ac4615056 # Parent ddd578da75558cb4f029354ac5ff9350a3dd5cf6 [TEST] #3 Remove old enumerate and getInstance and update device related tc Updats from 2 to 3: Stay CIM_Instance class Signed-off-by: Guolian Yun diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Thu Oct 23 05:38:42 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Thu Oct 23 19:17:15 2008 -0700 @@ -26,7 +26,7 @@ import sys import pywbem from VirtLib import utils -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger @@ -48,13 +48,13 @@ vsxml.cim_define(options.ip) devid = "%s/%s" % (test_dom, test_dev) + disk = get_typed_class(options.virt, "LogicalDisk") key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "LogicalDisk"), + 'CreationClassName' : disk, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } - dev = eval('devices.' + get_typed_class(options.virt, "LogicalDisk"))(options.ip, key_list) - + dev = GetInstance(options.ip, disk, key_list) status = 0 if dev.Name != test_dev: diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Thu Oct 23 05:38:42 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Thu Oct 23 19:17:15 2008 -0700 @@ -125,7 +125,7 @@ import pywbem from VirtLib import utils from XenKvmLib import assoc -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.common_util import try_getinstance from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.classes import get_typed_class @@ -133,7 +133,7 @@ from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ CIM_ERROR_GETINSTANCE -from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.const import do_main sup_types = ['Xen', 'KVM', 'XenFV'] @@ -198,7 +198,7 @@ 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } - disk = eval('devices.' + get_typed_class(options.virt, "LogicalDisk"))(options.ip, key_list) + disk = GetInstance(options.ip, classname, key_list) except Exception,detail: logger.error(CIM_ERROR_GETINSTANCE, classname) logger.error("Exception: %s", detail) @@ -206,13 +206,6 @@ global conn conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) - - rev, changeset = get_provider_version(options.virt, options.ip) - if rev < 682: - old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, - 'desc' : "No such instance (INVALID_DevID_Keyvalue)" - } - expr_values["invalid_devid_keyvalue"] = old_ret global name_val name_val = [ diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/cimtest/Memory/01_memory.py --- a/suites/libvirt-cim/cimtest/Memory/01_memory.py Thu Oct 23 05:38:42 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Memory/01_memory.py Thu Oct 23 19:17:15 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from VirtLib import utils from VirtLib import live -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger @@ -46,12 +46,13 @@ alloc_mem = int(vsxml.xml_get_mem()) devid = "%s/mem" % test_dom + mem_class = get_typed_class(options.virt, "Memory") key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "Memory"), + 'CreationClassName' : mem_class, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } - dev = eval('devices.' + get_typed_class(options.virt, "Memory"))(options.ip, key_list) + dev = GetInstance(options.ip, mem_class, key_list) status = 0 diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/cimtest/NetworkPort/01_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Thu Oct 23 05:38:42 2008 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Thu Oct 23 19:17:15 2008 -0700 @@ -33,7 +33,7 @@ import pywbem from VirtLib import utils from VirtLib import live -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger @@ -67,16 +67,17 @@ vsxml.cim_define(options.ip) devid = "%s/%s" % (test_dom, test_mac) + net_class = get_typed_class(options.virt, "NetworkPort") key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "NetworkPort"), + 'CreationClassName' : net_class, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } dev = None - + try: - dev = eval('devices.' + get_typed_class(options.virt, "NetworkPort"))(options.ip, key_list) + dev = GetInstance(options.ip, net_class, key_list) except Exception, detail: logger.error("Exception: %s" % detail) diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Thu Oct 23 05:38:42 2008 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Thu Oct 23 19:17:15 2008 -0700 @@ -28,7 +28,7 @@ import sys import pywbem from XenKvmLib import const -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.vxml import KVMXML from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -57,7 +57,7 @@ dev = None try: - dev = devices.KVM_NetworkPort(options.ip, key_list) + dev = GetInstance(options.ip, 'KVM_NetworkPort', key_list) except Exception, detail: logger.error("Exception: %s" % detail) cxml.undefine(options.ip) diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/cimtest/Processor/01_processor.py --- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Thu Oct 23 05:38:42 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Thu Oct 23 19:17:15 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from VirtLib import utils from VirtLib import live -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.test_xml import testxml from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class @@ -49,6 +49,7 @@ # Processor instance enumerate need the domain to be active domlist = live.active_domain_list(options.ip, options.virt) + proc_class = get_typed_class(options.virt, "Processor") if test_dom not in domlist: status = FAIL logger.error("Domain not started, we're not able to check vcpu") @@ -56,12 +57,12 @@ for i in range(0, test_vcpus): devid = "%s/%s" % (test_dom, i) key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "Processor"), + 'CreationClassName' : proc_class, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } try: - dev = eval(('devices.' + get_typed_class(options.virt, 'Processor')))(options.ip, key_list) + dev = GetInstance(options.ip, proc_class, key_list) if dev.DeviceID == devid: logger.info("Checked device %s" % devid) else: diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Thu Oct 23 05:38:42 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Thu Oct 23 19:17:15 2008 -0700 @@ -30,7 +30,7 @@ from VirtLib import utils from XenKvmLib import vxml from XenKvmLib import assoc -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from CimTest import Globals from XenKvmLib.const import do_main @@ -99,8 +99,8 @@ exp_inst_id_val[cn] = key_list['DeviceID'] try: - dev_class = devices.get_class(get_typed_class(options.virt, cn)) - devlist[cn] = dev_class(options.ip, key_list) + dev_class = get_typed_class(options.virt, cn) + devlist[cn] = GetInstance(options.ip, dev_class, key_list) logelelst[cn] = devlist[cn].DeviceID except Exception, detail: print_error(cn, detail) diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/lib/XenKvmLib/devices.py --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Thu Oct 23 05:38:42 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Thu Oct 23 19:17:15 2008 -0700 @@ -40,63 +40,6 @@ def __str__(self): print self.inst.items() -class CIM_LogicalDevice(CIM_Instance): - def __init__(self, server, keys): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings=keys) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - CIM_Instance.__init__(self, inst) - -class CIM_LogicalDisk(CIM_LogicalDevice): - pass - -class CIM_NetworkPort(CIM_LogicalDevice): - pass - -class CIM_Memory(CIM_LogicalDevice): - pass - -class CIM_Processor(CIM_LogicalDevice): - pass - -class Xen_LogicalDisk(CIM_LogicalDisk): - pass - -class KVM_LogicalDisk(CIM_LogicalDisk): - pass - -class LXC_LogicalDisk(CIM_LogicalDisk): - pass - -class Xen_NetworkPort(CIM_NetworkPort): - pass - -class KVM_NetworkPort(CIM_NetworkPort): - pass - -class Xen_Memory(CIM_Memory): - pass - -class KVM_Memory(CIM_Memory): - pass - -class LXC_Memory(CIM_Memory): - pass - -class Xen_Processor(CIM_Processor): - pass - -class KVM_Processor(CIM_Processor): - pass def get_class(classname): return eval(classname) diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Oct 23 05:38:42 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Thu Oct 23 19:17:15 2008 -0700 @@ -30,332 +30,6 @@ from CimTest import Globals, CimExt from VirtLib import utils from CimTest.Globals import logger - -class CIM_MyClass(CIM_Instance): - def __init__(self, server, keys): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings=keys) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - self.conn = conn - self.inst = inst - self.ref = ref - - 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 Linux_ComputerSystem(CIM_Instance): - def __init__(self, server, keys): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings=keys) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - CIM_Instance.__init__(self, inst) - - -class CIM_ComputerSystem(CIM_MyClass): - pass - -class CIM_System(CIM_MyClass): - pass - -class CIM_AllocationCapabilities(CIM_MyClass): - pass - -class CIM_RegisteredProfile(CIM_MyClass): - pass - -class CIM_LogicalDevice(CIM_MyClass): - pass - -class CIM_ResourcePool(CIM_MyClass): - pass - -class CIM_VirtualSystemManagementCapabilities(CIM_MyClass): - pass - -class CIM_ResourcePoolConfigurationCapabilities(CIM_MyClass): - pass - -class CIM_EnabledLogicalElementCapabilities(CIM_MyClass): - pass - -class Virt_VirtualSystemMigrationCapabilities(CIM_MyClass): - pass - -class CIM_VirtualSystemMigrationSettingData(CIM_MyClass): - pass - -class CIM_VirtualSystemSnapshotService(CIM_MyClass): - pass - -class CIM_VirtualSystemSnapshotServiceCapabilities(CIM_MyClass): - pass - -class CIM_NetResourceAllocationSettingData(CIM_MyClass): - pass - -class CIM_MemResourceAllocationSettingData(CIM_MyClass): - pass - -class CIM_ProcResourceAllocationSettingData(CIM_MyClass): - pass - -class CIM_DiskResourceAllocationSettingData(CIM_MyClass): - pass - -class Xen_ComputerSystem(CIM_ComputerSystem): - pass - -class KVM_ComputerSystem(CIM_ComputerSystem): - pass - -class LXC_ComputerSystem(CIM_ComputerSystem): - pass - -class Xen_HostSystem(CIM_System): - pass - -class KVM_HostSystem(CIM_System): - pass - -class LXC_HostSystem(CIM_System): - pass - -class Xen_MigrationJob(CIM_MyClass): - pass - -class Xen_RegisteredProfile(CIM_RegisteredProfile): - pass - -class KVM_RegisteredProfile(CIM_RegisteredProfile): - pass - -class LXC_RegisteredProfile(CIM_RegisteredProfile): - pass - -class Xen_VirtualSystemSettingData(CIM_MyClass): - pass - -class KVM_VirtualSystemSettingData(CIM_MyClass): - pass - -class LXC_VirtualSystemSettingData(CIM_MyClass): - pass - -class Xen_LogicalDisk(CIM_LogicalDevice): - pass - -class KVM_LogicalDisk(CIM_LogicalDevice): - pass - -class Xen_Memory(CIM_LogicalDevice): - pass - -class KVM_Memory(CIM_LogicalDevice): - pass - -class LXC_Memory(CIM_LogicalDevice): - pass - -class LXC_Memory(CIM_LogicalDevice): - pass - -class Xen_Processor(CIM_LogicalDevice): - pass - -class KVM_Processor(CIM_LogicalDevice): - pass - -class Xen_NetworkPort(CIM_LogicalDevice): - pass - -class KVM_NetworkPort(CIM_LogicalDevice): - pass - -class Xen_MemoryPool(CIM_ResourcePool): - pass - -class KVM_MemoryPool(CIM_ResourcePool): - pass - -class LXC_MemoryPool(CIM_ResourcePool): - pass - -class Xen_ProcessorPool(CIM_ResourcePool): - pass - -class KVM_ProcessorPool(CIM_ResourcePool): - pass - -class LXC_ProcessorPool(CIM_ResourcePool): - pass - -class Xen_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities): - pass - -class KVM_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities): - pass - -class LXC_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities): - pass - -class Xen_ResourcePoolConfigurationCapabilities(CIM_ResourcePoolConfigurationCapabilities): - pass - -class KVM_ResourcePoolConfigurationCapabilities(CIM_ResourcePoolConfigurationCapabilities): - pass - -class LXC_ResourcePoolConfigurationCapabilities(CIM_ResourcePoolConfigurationCapabilities): - pass - -class Xen_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities): - pass - -class KVM_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities): - pass - -class LXC_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities): - pass - -class Xen_DiskPool(CIM_ResourcePool): - pass - -class KVM_DiskPool(CIM_ResourcePool): - pass - -class LXC_DiskPool(CIM_ResourcePool): - pass - -class Xen_NetworkPool(CIM_ResourcePool): - pass - -class KVM_NetworkPool(CIM_ResourcePool): - pass - -class LXC_NetworkPool(CIM_ResourcePool): - pass - -class Xen_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities): - pass - -class KVM_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities): - pass - -class LXC_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities): - pass - -class Xen_AllocationCapabilities(CIM_AllocationCapabilities): - pass - -class KVM_AllocationCapabilities(CIM_AllocationCapabilities): - pass - -class LXC_AllocationCapabilities(CIM_AllocationCapabilities): - pass - -class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - pass - -class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - pass - -class LXC_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - pass - -class Xen_VirtualSystemSnapshotService(CIM_VirtualSystemSnapshotService): - pass - -class KVM_VirtualSystemSnapshotService(CIM_VirtualSystemSnapshotService): - pass - -class LXC_VirtualSystemSnapshotService(CIM_VirtualSystemSnapshotService): - pass - -class Xen_VirtualSystemSnapshotServiceCapabilities(CIM_VirtualSystemSnapshotServiceCapabilities): - pass - -class KVM_VirtualSystemSnapshotServiceCapabilities(CIM_VirtualSystemSnapshotServiceCapabilities): - pass - -class LXC_VirtualSystemSnapshotServiceCapabilities(CIM_VirtualSystemSnapshotServiceCapabilities): - pass - -class Xen_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData): - pass - -class KVM_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData): - pass - -class LXC_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData): - pass - -class Xen_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData): - pass - -class KVM_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData): - pass - -class Xen_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData): - pass - -class KVM_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData): - pass - -class Xen_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData): - pass - -class KVM_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData): - pass - -class KVM_VirtualSystemMigrationService(CIM_MyClass): - pass - -class Xen_VirtualSystemMigrationService(CIM_MyClass): - pass - -class LXC_VirtualSystemMigrationService(CIM_MyClass): - pass - -class Xen_VirtualSystemManagementService(CIM_MyClass): - pass - -class KVM_VirtualSystemManagementService(CIM_MyClass): - pass - -class LXC_VirtualSystemManagementService(CIM_MyClass): - pass - class CIM_CimtestClass(CIM_Instance): From fujimura.toshifumi at np.css.fujitsu.com Fri Oct 24 02:33:09 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Fri, 24 Oct 2008 11:33:09 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <49009AC2.4030103@linux.vnet.ibm.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> <48FEEE40.7040107@np.css.fujitsu.com> <48FEFA52.8080202@linux.vnet.ibm.com> <48FFE101.9010709@np.css.fujitsu.com> <490003D9.80100@linux.vnet.ibm.com> <4900478A.2050007@np.css.fujitsu.com> <49009AC2.4030103@linux.vnet.ibm.com> Message-ID: <490133E5.9060007@np.css.fujitsu.com> Dear Kaitlin. Thanks for your suggestion and adding wiki page. This wiki is very useful. After restarting Pegasus, I can't find the class "CIM_KVMRedirectionSAP". And from my investigation, I found two points. (1)The class "CIM_KVMRedirectionSAP"'s superclass isn't defined in any .mof files in Libvirt-CIM. (2)But other registered classes may have superclass. For example, the class "CIM_VirtualSystemMigrationCapabilities" has superclass "CIM_Capabilities". And that is defined in "schema/VSMigrationCapabilities.mof" file. (The log shows below) I think some package need to add. What should I do any more? Works for me. =============================== [root at localhost libvirt-cim]# grep -rn CIM_KVM * Binary file base_schema/cimv216Experimental-MOFs.zip matches schema/KVMRedirectionSAP.mof:4:class Xen_KVMRedirectionSAP : CIM_KVMRedirectionSAP schema/KVMRedirectionSAP.mof:9:class KVM_KVMRedirectionSAP : CIM_KVMRedirectionSAP schema/KVMRedirectionSAP.mof:14:class LXC_KVMRedirectionSAP : CIM_KVMRedirectionSAP [root at localhost ~]# wbemcli ecn http://user:pass at localhost/root/virt | grep Virt localhost:5988/root/virt:CIM_VirtualSystemMigrationSettingData localhost:5988/root/virt:KVM_VirtualSystemMigrationCapabilities localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities localhost:5988/root/virt:CIM_VirtualSystemMigrationCapabilities localhost:5988/root/virt:LXC_VirtualSystemMigrationSettingData localhost:5988/root/virt:LXC_VirtualSystemMigrationCapabilities localhost:5988/root/virt:KVM_VirtualSystemMigrationSettingData localhost:5988/root/virt:Xen_VirtualSystemSettingData localhost:5988/root/virt:CIM_VirtualSystemSettingData localhost:5988/root/virt:KVM_VirtualSystemSettingData localhost:5988/root/virt:LXC_VirtualSystemSettingData localhost:5988/root/virt:Xen_VirtualSystemMigrationSettingData =============================== (in schema/VSMigrationCapabilities.mof) =============================== class CIM_VirtualSystemMigrationCapabilities : CIM_Capabilities { uint16 DestinationHostFormatsSupported[]; uint16 SynchronousMethodsSupported[]; uint16 AsynchronousMethodsSupported[]; }; =============================== -- Toshifumi Fujimura. > Toshifumi Fujimura wrote: >> Thanks Mr or Ms Deepti B Kalakeri and Mr or Ms Kaitlin Rupert. >> I tryed to regist CIM schema for Libvirt-CIM as your advice. >> >> On "make postinstall",I met this error message. >> >> ======================================================================================= >> >> Registering providers with active cimserver >> Parsing error: parse error: Error adding class Xen_KVMRedirectionSAP >> to the repository: >> CIM_ERR_INVALID_SUPERCLASS: CIM_KVMRedirectionSAP >> make: *** [postinstall] Error 250 >> ======================================================================================= >> >> >> I think the superclasses >> "CIM_KVMRedirectionSAP","CIM_ERR_INVALID_SUPERCLASS" don't exist in >> my cimserver. >> How can I add those classes? >> >> Works for me. >> Toshifumi Fujimura. > > Can you try the following: > > Restart Pegasus > > After restarting Pegasus, try: wbemcli ecn > http://user:pass at localhost/root/virt | grep CIM_KVMRedirectionSAP > > This should return a record like the following: > > localhost:5988/root/virt:CIM_KVMRedirectionSAP > > After that is done, you can do: > > sudo make preuninstall > sudo make postinstall > > Running "sudo make preuninstall" should have put the proper classes in > place. However, sometimes Pegasus needs to be restarted after "sudo > make preinstall". > > > If the wbemcli command doesn't return any records, you can do the > following: > > sudo make preuninstall > sudo make preinstall > > restart Pegasus > > sudo make postinstall > > > I hope this helps! -- Toshifumi Fujimura. From srinivas735 at gmail.com Fri Oct 24 04:44:32 2008 From: srinivas735 at gmail.com (srinivas k) Date: Fri, 24 Oct 2008 10:14:32 +0530 Subject: [Libvirt-cim] Problem in running libvirt-cim test suite In-Reply-To: <49002193.1070904@linux.vnet.ibm.com> References: <852030870810222309tde7f3c3v63e85380d72e636b@mail.gmail.com> <852030870810222311t4e4c0467hcec246a06086891f@mail.gmail.com> <49002193.1070904@linux.vnet.ibm.com> Message-ID: <852030870810232144m39e88322wcbd5e7289b576045@mail.gmail.com> Hi Deepthi, Command output is. root at luser-desktop:~# virsh net-list --all Connecting to uri: xen:/// Name State Autostart ----------------------------------------- default inactive no root at luser-desktop:~# virsh --help | grep -i net attach-interface attach network interface detach-interface detach network interface domifstat get network interface stats for a domain net-autostart autostart a network net-create create a network from an XML file net-define define (but don't start) a network from an XML file net-destroy destroy a network net-dumpxml network information in XML net-list list networks net-name convert a network UUID to network name net-start start a (previously defined) inactive network net-undefine undefine an inactive network net-uuid convert a network name to network UUID Thanks, Seenu On Thu, Oct 23, 2008 at 12:32 PM, Deepti B Kalakeri < deeptik at linux.vnet.ibm.com> wrote: > What is the o/p of the command > > virsh net-list --all ? > > Also, Can you give me the o/p of the command: > virsh --help | grep -i net > > Regards, > Deepti. > > srinivas k wrote: > >> Hi, >> >> I trying to install libvirt-cim in my ubuntu-xen-3.2.1 machine. I am able >> to install all dependencies and libvirt-cim , but when I run cimtest which >> has given in libvirt.org , I am getting following >> error message >> * Starting test suite: libvirt-cim >> ERROR - Failed to create Virtual Network 'cimtest-networkpool' >> >> Unable to create network pool cimtest-networkpool >> Please check your environment.* >> Is there any special networking setup is require to run cimtest. >> Any help would be appreciated. Apologies if this topic has been covered >> already. I can't find it anywhere using Google >> >> >> Thanks, >> seenu. >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> 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 Oct 24 08:02:38 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 24 Oct 2008 01:02:38 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding new tc 01_enum_crs.py to verify CRS fields Message-ID: <1f9f2d2c410e9dfb53bd.1224835358@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1224835317 25200 # Node ID 1f9f2d2c410e9dfb53bda9befe230475fcacf159 # Parent ddd578da75558cb4f029354ac5ff9350a3dd5cf6 [TEST] #2 Adding new tc 01_enum_crs.py to verify CRS fields. Tested on KVM and LXC with current sources. Signed-off-by: Deepti B. Kalakeri diff -r ddd578da7555 -r 1f9f2d2c410e suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Fri Oct 24 01:01:57 2008 -0700 @@ -0,0 +1,88 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# This test case is used to verify the RedirectionService +# properties in detail. +# +# Date : 22-10-2008 +# + +import sys +from VirtLib.live import domain_list +from XenKvmLib.enumclass import EnumInstances +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.common_util import get_host_info + +SHAREMODE = 3 +REDIRECTION_SER_TYPE = 3 +MAX_SAP_SESSIONS = 65535 + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] + at do_main(sup_types) +def main(): + virt = main.options.virt + server = main.options.ip + + status, host_name, host_cn = get_host_info(server, virt) + if status != PASS: + return status + + cname = 'ConsoleRedirectionService' + classname = get_typed_class(virt, cname) + crs_list = { + 'ElementName' : cname, + 'SystemCreationClassName' : host_cn, + 'SystemName' : host_name, + 'CreationClassName' : classname, + 'Name' : cname, + 'RedirectionServiceType' : [REDIRECTION_SER_TYPE], + 'SharingMode' : SHAREMODE, + 'EnabledState' : 2, + 'EnabledDefault' : 2, + 'RequestedState' : 12, + 'MaxConcurrentEnabledSAPs': MAX_SAP_SESSIONS + } + + try: + crs = EnumInstances(server, classname) + except Exception, detail: + logger.error(CIM_ERROR_ENUMERATE, classname) + logger.error("Exception: %s", detail) + return FAIL + + if len(crs) != 1: + logger.error("'%s' returned %i records, expected 1", classname, len(crs)) + return FAIL + + crs_val = crs[0] + for k, exp_val in crs_list.iteritems(): + res_val = eval("crs_val." + k) + if res_val != exp_val: + logger.error("'%s' Mismatch", k) + logger.error("Expected '%s', Got '%s'", exp_val, res_val) + return FAIL + return PASS + +if __name__ == "__main__": + sys.exit(main()) From deeptik at linux.vnet.ibm.com Fri Oct 24 08:04:53 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 24 Oct 2008 01:04:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding new tc 02_enum_crscap.py to verify ConsoleRedirectionServiceCapabilities fields Message-ID: <0f340004e1cd48f5ede6.1224835493@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1224835478 25200 # Node ID 0f340004e1cd48f5ede60a68283a850ae60c9ebe # Parent 1f9f2d2c410e9dfb53bda9befe230475fcacf159 [TEST] #2 Adding new tc 02_enum_crscap.py to verify ConsoleRedirectionServiceCapabilities fields. Tested on KVM and LXC with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 1f9f2d2c410e -r 0f340004e1cd suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Fri Oct 24 01:04:38 2008 -0700 @@ -0,0 +1,81 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# This test case is used to verify the ConsoleRedirectionServiceCapabilities +# properties in detail. +# +# Date : 22-10-2008 +# + +import sys +from VirtLib.live import domain_list +from XenKvmLib.enumclass import EnumInstances +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import PASS, FAIL + +SHAREMODESUPP = 3 + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] + at do_main(sup_types) +def main(): + virt = main.options.virt + server = main.options.ip + cname = 'ConsoleRedirectionServiceCapabilities' + cap_name = 'ConsoleRedirectionCapabilities' + classname = get_typed_class(virt, cname) + try: + crs = EnumInstances(server, classname) + + if len(crs) != 1: + logger.error("'%s' returned %i records, expected 1", + classname, len(crs)) + return FAIL + + crs_val = crs[0] + if crs_val.InstanceID != cap_name: + logger.error("InstanceID Mismatch") + logger.error("Got '%s', Expected '%s'", crs_val.InstanceID, + cap_name) + return FAIL + + if crs_val.ElementName != cap_name: + logger.error("ElementName Mismatch") + logger.error("Got '%s', Expected '%s'", crs_val.ElementName, + cap_name) + return FAIL + + mode_supp = crs_val.SharingModeSupported[0] + if mode_supp != SHAREMODESUPP: + logger.error("SharingModeSupported Mismatch") + logger.error("Got '%s', Expected '%s'", mode_supp, SHAREMODESUPP) + return FAIL + + except Exception, detail: + logger.error(CIM_ERROR_ENUMERATE, classname) + logger.error("Exception: %s", detail) + return FAIL + + return PASS + +if __name__ == "__main__": + sys.exit(main()) From deeptik at linux.vnet.ibm.com Fri Oct 24 08:04:10 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 24 Oct 2008 13:34:10 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Addring new tc 01_enum_crs.py to verify CRS fields In-Reply-To: <4900F8A4.8040907@linux.vnet.ibm.com> References: <73be202634a52607d5ab.1224746760@localhost.localdomain> <4900F8A4.8040907@linux.vnet.ibm.com> Message-ID: <4901817A.1080709@linux.vnet.ibm.com> Kaitlin Rupert wrote: > >> + crs_val = crs[0] > > You also want to check the length of crs. The provider should always > return an instance, but it's always good to have a check. If something > causes the provider not to return an instance and also not return a > failure, then you'd be accessing the array out of bounds. > Yup, I forgot this check. Thanks patch with changes submitted. Regards, Deepti. From deeptik at linux.vnet.ibm.com Fri Oct 24 08:04:14 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 24 Oct 2008 13:34:14 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc 02_enum_crscap.py to verify ConsoleRedirectionServiceCapabilities fields In-Reply-To: <4900F979.70107@linux.vnet.ibm.com> References: <2c77be4e041a0a8669d2.1224748163@localhost.localdomain> <4900F979.70107@linux.vnet.ibm.com> Message-ID: <4901817E.8030504@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B. Kalakeri wrote: >> # HG changeset patch >> # User Deepti B. Kalakeri >> # Date 1224748128 25200 >> # Node ID 2c77be4e041a0a8669d234d6219e1f207b6d4ed5 >> # Parent 73be202634a52607d5ab54ca62a2706ec7aca23b >> [TEST] Adding new tc 02_enum_crscap.py to verify >> ConsoleRedirectionServiceCapabilities fields. >> >> Tested on KVM with current sources. >> >> Signed-off-by: Deepti B. Kalakeri >> > >> + >> +sup_types = ['Xen', 'KVM', 'XenFV'] > > Needs LXC support. > >> + at do_main(sup_types) >> +def main(): >> + virt = main.options.virt >> + server = main.options.ip >> + cname = 'ConsoleRedirectionServiceCapabilities' >> + cap_name = 'ConsoleRedirectionCapabilities' >> + classname = get_typed_class(virt, cname) >> + try: >> + crs = EnumInstances(server, classname) >> + crs_val = crs[0] > > Need to verify the length here before accessing the array. > >> + if crs_val.InstanceID != cap_name: >> + logger.error("InstanceID Mismatch") >> + logger.error("Got '%s', Expected '%s'", crs_val.InstanceID, + >> cap_name) >> + return FAIL >> + >> + if crs_val.ElementName != cap_name: >> + logger.error("ElementName Mismatch") >> + logger.error("Got '%s', Expected '%s'", crs_val.ElementName, + >> cap_name) >> + return FAIL >> + + mode_supp = crs_val.SharingModeSupported[0] >> + if mode_supp != 3: > > Can you declare the 3 as a variable (in all caps) at the start of the > test. Makes it a little clear that 3 is a CIM defined value. Also, if > this changes later on, it's easier to update the test. > >> + logger.error("SharingModeSupported Mismatch") >> + logger.error("Got '%s', Expected '%s'", mode_supp, 3) > > Instead of using 3 here, can you use the variable suggested above? > Patch with modification submitted. Thanks for the review. Regards, Deepti. From fujimura.toshifumi at np.css.fujitsu.com Fri Oct 24 08:07:10 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Fri, 24 Oct 2008 17:07:10 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <490133E5.9060007@np.css.fujitsu.com> References: <48F69FA2.6030405@np.css.fujitsu.com> <48F6AB34.2090606@linux.vnet.ibm.com> <48F6F0BB.1030107@np.css.fujitsu.com> <48F781D4.8030807@linux.vnet.ibm.com> <48F81B0C.1040602@linux.vnet.ibm.com> <48FEEE40.7040107@np.css.fujitsu.com> <48FEFA52.8080202@linux.vnet.ibm.com> <48FFE101.9010709@np.css.fujitsu.com> <490003D9.80100@linux.vnet.ibm.com> <4900478A.2050007@np.css.fujitsu.com> <49009AC2.4030103@linux.vnet.ibm.com> <490133E5.9060007@np.css.fujitsu.com> Message-ID: <4901822E.2070605@np.css.fujitsu.com> Dear Kaitlin. After my investigation, I pass "make postinstall" by using attached patch. I think these definition in the .mof files are insuffcient. How do you think? Regards. Toshifumi Fujimura. > Dear Kaitlin. > > Thanks for your suggestion and adding wiki page. > This wiki is very useful. > > After restarting Pegasus, I can't find the class "CIM_KVMRedirectionSAP". > > And from my investigation, I found two points. > (1)The class "CIM_KVMRedirectionSAP"'s superclass isn't defined in any > .mof files in Libvirt-CIM. > (2)But other registered classes may have superclass. > > For example, the class "CIM_VirtualSystemMigrationCapabilities" has > superclass "CIM_Capabilities". > And that is defined in "schema/VSMigrationCapabilities.mof" file. > (The log shows below) > > I think some package need to add. > What should I do any more? > > Works for me. > > =============================== > [root at localhost libvirt-cim]# grep -rn CIM_KVM * > Binary file base_schema/cimv216Experimental-MOFs.zip matches > schema/KVMRedirectionSAP.mof:4:class Xen_KVMRedirectionSAP : > CIM_KVMRedirectionSAP > schema/KVMRedirectionSAP.mof:9:class KVM_KVMRedirectionSAP : > CIM_KVMRedirectionSAP > schema/KVMRedirectionSAP.mof:14:class LXC_KVMRedirectionSAP : > CIM_KVMRedirectionSAP > > [root at localhost ~]# wbemcli ecn http://user:pass at localhost/root/virt | > grep Virt > localhost:5988/root/virt:CIM_VirtualSystemMigrationSettingData > localhost:5988/root/virt:KVM_VirtualSystemMigrationCapabilities > localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities > localhost:5988/root/virt:CIM_VirtualSystemMigrationCapabilities > localhost:5988/root/virt:LXC_VirtualSystemMigrationSettingData > localhost:5988/root/virt:LXC_VirtualSystemMigrationCapabilities > localhost:5988/root/virt:KVM_VirtualSystemMigrationSettingData > localhost:5988/root/virt:Xen_VirtualSystemSettingData > localhost:5988/root/virt:CIM_VirtualSystemSettingData > localhost:5988/root/virt:KVM_VirtualSystemSettingData > localhost:5988/root/virt:LXC_VirtualSystemSettingData > localhost:5988/root/virt:Xen_VirtualSystemMigrationSettingData > =============================== > > (in schema/VSMigrationCapabilities.mof) > =============================== > class CIM_VirtualSystemMigrationCapabilities : CIM_Capabilities { > > uint16 DestinationHostFormatsSupported[]; > > uint16 SynchronousMethodsSupported[]; > > uint16 AsynchronousMethodsSupported[]; > > }; > =============================== > > -- Toshifumi Fujimura. > >> Toshifumi Fujimura wrote: >>> Thanks Mr or Ms Deepti B Kalakeri and Mr or Ms Kaitlin Rupert. >>> I tryed to regist CIM schema for Libvirt-CIM as your advice. >>> >>> On "make postinstall",I met this error message. >>> >>> ======================================================================================= >>> >>> Registering providers with active cimserver >>> Parsing error: parse error: Error adding class Xen_KVMRedirectionSAP >>> to the repository: >>> CIM_ERR_INVALID_SUPERCLASS: CIM_KVMRedirectionSAP >>> make: *** [postinstall] Error 250 >>> ======================================================================================= >>> >>> >>> I think the superclasses >>> "CIM_KVMRedirectionSAP","CIM_ERR_INVALID_SUPERCLASS" don't exist in >>> my cimserver. >>> How can I add those classes? >>> >>> Works for me. >>> Toshifumi Fujimura. >> >> Can you try the following: >> >> Restart Pegasus >> >> After restarting Pegasus, try: wbemcli ecn >> http://user:pass at localhost/root/virt | grep CIM_KVMRedirectionSAP >> >> This should return a record like the following: >> >> localhost:5988/root/virt:CIM_KVMRedirectionSAP >> >> After that is done, you can do: >> >> sudo make preuninstall >> sudo make postinstall >> >> Running "sudo make preuninstall" should have put the proper classes >> in place. However, sometimes Pegasus needs to be restarted after >> "sudo make preinstall". >> >> >> If the wbemcli command doesn't return any records, you can do the >> following: >> >> sudo make preuninstall >> sudo make preinstall >> >> restart Pegasus >> >> sudo make postinstall >> >> >> I hope this helps! > > -- Toshifumi Fujimura. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: libvirt-cim.pass-postinstall.patch URL: From sakaia at jp.fujitsu.com Fri Oct 24 12:46:44 2008 From: sakaia at jp.fujitsu.com (Atsushi SAKAI) Date: Fri, 24 Oct 2008 21:46:44 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <4901822E.2070605@np.css.fujitsu.com> References: <4901822E.2070605@np.css.fujitsu.com> Message-ID: <20081024124645.AD6CF1805B@m021.s.css.fujitsu.com> Hi, Kaitlin and Toshifumi Fedora 10 tog-pegasus uses CIM Schema 2.13.1(CIM2131). (from env_var_Linux.status) I think it should be upgraded to CIM Schema 2.17.1 or later. Since CIM Schema supports Virtualization after 2.17.1. http://www.dmtf.org/standards/cim/cim_schema_v2171/ Is this idea is correct? If this idea is correct, you need to build from upstream openpegasus or upgrade CIM Schema to 217 on F10 package. Thanks Atsushi SAKAI Toshifumi Fujimura wrote: > Dear Kaitlin. > > After my investigation, I pass "make postinstall" by using attached patch. > I think these definition in the .mof files are insuffcient. > > How do you think? > > Regards. > Toshifumi Fujimura. > > Dear Kaitlin. > > > > Thanks for your suggestion and adding wiki page. > > This wiki is very useful. > > > > After restarting Pegasus, I can't find the class "CIM_KVMRedirectionSAP". > > > > And from my investigation, I found two points. > > (1)The class "CIM_KVMRedirectionSAP"'s superclass isn't defined in any > > .mof files in Libvirt-CIM. > > (2)But other registered classes may have superclass. > > > > For example, the class "CIM_VirtualSystemMigrationCapabilities" has > > superclass "CIM_Capabilities". > > And that is defined in "schema/VSMigrationCapabilities.mof" file. > > (The log shows below) > > > > I think some package need to add. > > What should I do any more? > > > > Works for me. > > > > =============================== > > [root at localhost libvirt-cim]# grep -rn CIM_KVM * > > Binary file base_schema/cimv216Experimental-MOFs.zip matches > > schema/KVMRedirectionSAP.mof:4:class Xen_KVMRedirectionSAP : > > CIM_KVMRedirectionSAP > > schema/KVMRedirectionSAP.mof:9:class KVM_KVMRedirectionSAP : > > CIM_KVMRedirectionSAP > > schema/KVMRedirectionSAP.mof:14:class LXC_KVMRedirectionSAP : > > CIM_KVMRedirectionSAP > > > > [root at localhost ~]# wbemcli ecn http://user:pass at localhost/root/virt | > > grep Virt > > localhost:5988/root/virt:CIM_VirtualSystemMigrationSettingData > > localhost:5988/root/virt:KVM_VirtualSystemMigrationCapabilities > > localhost:5988/root/virt:Xen_VirtualSystemMigrationCapabilities > > localhost:5988/root/virt:CIM_VirtualSystemMigrationCapabilities > > localhost:5988/root/virt:LXC_VirtualSystemMigrationSettingData > > localhost:5988/root/virt:LXC_VirtualSystemMigrationCapabilities > > localhost:5988/root/virt:KVM_VirtualSystemMigrationSettingData > > localhost:5988/root/virt:Xen_VirtualSystemSettingData > > localhost:5988/root/virt:CIM_VirtualSystemSettingData > > localhost:5988/root/virt:KVM_VirtualSystemSettingData > > localhost:5988/root/virt:LXC_VirtualSystemSettingData > > localhost:5988/root/virt:Xen_VirtualSystemMigrationSettingData > > =============================== > > > > (in schema/VSMigrationCapabilities.mof) > > =============================== > > class CIM_VirtualSystemMigrationCapabilities : CIM_Capabilities { > > > > uint16 DestinationHostFormatsSupported[]; > > > > uint16 SynchronousMethodsSupported[]; > > > > uint16 AsynchronousMethodsSupported[]; > > > > }; > > =============================== > > > > -- Toshifumi Fujimura. > > > >> Toshifumi Fujimura wrote: > >>> Thanks Mr or Ms Deepti B Kalakeri and Mr or Ms Kaitlin Rupert. > >>> I tryed to regist CIM schema for Libvirt-CIM as your advice. > >>> > >>> On "make postinstall",I met this error message. > >>> > >>> ======================================================================================= > >>> > >>> Registering providers with active cimserver > >>> Parsing error: parse error: Error adding class Xen_KVMRedirectionSAP > >>> to the repository: > >>> CIM_ERR_INVALID_SUPERCLASS: CIM_KVMRedirectionSAP > >>> make: *** [postinstall] Error 250 > >>> ======================================================================================= > >>> > >>> > >>> I think the superclasses > >>> "CIM_KVMRedirectionSAP","CIM_ERR_INVALID_SUPERCLASS" don't exist in > >>> my cimserver. > >>> How can I add those classes? > >>> > >>> Works for me. > >>> Toshifumi Fujimura. > >> > >> Can you try the following: > >> > >> Restart Pegasus > >> > >> After restarting Pegasus, try: wbemcli ecn > >> http://user:pass at localhost/root/virt | grep CIM_KVMRedirectionSAP > >> > >> This should return a record like the following: > >> > >> localhost:5988/root/virt:CIM_KVMRedirectionSAP > >> > >> After that is done, you can do: > >> > >> sudo make preuninstall > >> sudo make postinstall > >> > >> Running "sudo make preuninstall" should have put the proper classes > >> in place. However, sometimes Pegasus needs to be restarted after > >> "sudo make preinstall". > >> > >> > >> If the wbemcli command doesn't return any records, you can do the > >> following: > >> > >> sudo make preuninstall > >> sudo make preinstall > >> > >> restart Pegasus > >> > >> sudo make postinstall > >> > >> > >> I hope this helps! > > > > > > > -- > Toshifumi Fujimura. > From danms at us.ibm.com Fri Oct 24 13:32:08 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 24 Oct 2008 06:32:08 -0700 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <20081024124645.AD6CF1805B@m021.s.css.fujitsu.com> (Atsushi SAKAI's message of "Fri, 24 Oct 2008 21:46:44 +0900") References: <4901822E.2070605@np.css.fujitsu.com> <20081024124645.AD6CF1805B@m021.s.css.fujitsu.com> Message-ID: <87skqmazl3.fsf@caffeine.danplanet.com> AS> Is this idea is correct? Certainly an upgrade would be nice. However, that shouldn't be a problem here. AS> If this idea is correct, you need to build from upstream AS> openpegasus or upgrade CIM Schema to 217 on F10 package. The "make preinstall" process downloads and installs the 2.16 experimental schema into our namespace (root/virt). It can coexist with the outdated pegasus schema just fine. The messages about a missing superclass likely mean that you don't have the base schema installed properly. You might try shutting down pegasus and removing the entire namespace directory: rm -Rf /var/lib/Pegasus/repository/root\#virt/ Then, do your "make preinstall" followed by "make postinstall" and then start up pegasus. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 24 20:58:17 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 24 Oct 2008 13:58:17 -0700 Subject: [Libvirt-cim] Problem in running libvirt-cim test suite In-Reply-To: <852030870810232144m39e88322wcbd5e7289b576045@mail.gmail.com> References: <852030870810222309tde7f3c3v63e85380d72e636b@mail.gmail.com> <852030870810222311t4e4c0467hcec246a06086891f@mail.gmail.com> <49002193.1070904@linux.vnet.ibm.com> <852030870810232144m39e88322wcbd5e7289b576045@mail.gmail.com> Message-ID: <490236E9.6050704@linux.vnet.ibm.com> srinivas k wrote: > > Hi Deepthi, > > Command output is. > > root at luser-desktop:~# virsh net-list --all > Connecting to uri: xen:/// > Name State Autostart > ----------------------------------------- > default inactive no > > > Thanks, > Seenu Hi Seenu, Which version of libvirt are you using? cimtest is attempting to setup a virtual network for all of the guests to use while the suite runs. Are you running cimtest as root? Also, if you run cimtest with the -d option, do you see any additional debug? One thing to try is to make sure you can define and start a network pool using virsh. You can do the following: sudo virsh net-start default This will start the existing network you have. This should succeed without any errors. If that works, you can put the following XML in a file: cimtest-networkpool Then call the following commands: sudo virsh net-create filename If this is successful, you can destroy the network pool using: sudo virsh net-destroy cimtest-networkpool If all of this works for you, you can try running cimtest again. Let us know if you hit any errors. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 24 21:44:53 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 24 Oct 2008 14:44:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Remove old enumerate and getInstance and update device related tc In-Reply-To: References: Message-ID: <490241D5.2010103@linux.vnet.ibm.com> > diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py > --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Thu Oct 23 05:38:42 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Thu Oct 23 19:17:15 2008 -0700 > @@ -125,7 +125,7 @@ > -from XenKvmLib.const import do_main, get_provider_version > +from XenKvmLib.const import do_main This needs to stay.. > > global conn > conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) > - > - rev, changeset = get_provider_version(options.virt, options.ip) > - if rev < 682: > - old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > - 'desc' : "No such instance (INVALID_DevID_Keyvalue)" > - } > - expr_values["invalid_devid_keyvalue"] = old_ret As does this.. These are part of changeset 453. Otherwise, looks good! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 24 22:15:44 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 24 Oct 2008 15:15:44 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Update KVMRedirectionSAP to return avail sessions Message-ID: This updated uses the listening / established port entries in /proc/net/tcp to determine whether a guest has any available / enabled VNC sessions. Updates: -Removed 2 patches of unecessary junk. From kaitlin at linux.vnet.ibm.com Fri Oct 24 22:15:45 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 24 Oct 2008 15:15:45 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] In-Reply-To: Message-ID: <22262aa6c752e15e6c9f.1224886545@localhost.localdomain> # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224552270 25200 # Node ID 22262aa6c752e15e6c9fa462cd3bb84b7ff49fd2 # Parent e043f46f299ec3dd3d1e48e51e57437fa90db136 #2 Add get_vnc_sessions() to determine all of the VNC ports available or in use. Updates from 1 to 2: -Remove functions to convert port number to a string -Instead of using a hash table to hold the ports listed in /proc/net/tcp, use a list to hold the host/port values. Signed-off-by: Kaitlin Rupert diff -r e043f46f299e -r 22262aa6c752 src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Wed Oct 22 08:28:37 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 @@ -39,11 +39,25 @@ #include "Virt_KVMRedirectionSAP.h" +#define PROC_TCP "/proc/net/tcp" + const static CMPIBroker *_BROKER; + +struct vnc_port { + char *name; + int port; + int remote_port; +}; + +struct vnc_ports { + struct vnc_port **list; + unsigned int max; + unsigned int cur; +}; static int inst_from_dom(const CMPIBroker *broker, const CMPIObjectPath *ref, - struct domain *dominfo, + struct vnc_port *port, CMPIInstance *inst) { char *sccn = NULL; @@ -52,8 +66,7 @@ uint16_t prop_val; int ret = 1; - if (asprintf(&id, "%s:%s", dominfo->name, - dominfo->dev_graphics->dev.graphics.type) == -1) { + if (asprintf(&id, "%d:%d", port->port, port->remote_port) == -1) { CU_DEBUG("Unable to format name"); ret = 0; goto out; @@ -66,7 +79,7 @@ (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "SystemName", - (CMPIValue *)dominfo->name, CMPI_chars); + (CMPIValue *)port->name, CMPI_chars); CMSetProperty(inst, "SystemCreationClassName", (CMPIValue *)sccn, CMPI_chars); @@ -74,19 +87,16 @@ CMSetProperty(inst, "ElementName", (CMPIValue *)id, CMPI_chars); - if (STREQ(dominfo->dev_graphics->dev.graphics.type, "vnc")) - prop_val = (uint16_t)CIM_CRS_VNC; - else - prop_val = (uint16_t)CIM_CRS_OTHER; - + prop_val = (uint16_t)CIM_CRS_VNC; CMSetProperty(inst, "KVMProtocol", (CMPIValue *)&prop_val, CMPI_uint16); - /* Need to replace this with a check that determines whether - the console session is enabled (in use) or available (not actively - in use). - */ - prop_val = (uint16_t)CIM_CRS_ENABLED_STATE; + if (port->remote_port < 0) + prop_val = (uint16_t)CIM_SAP_INACTIVE_STATE; + else if (port->remote_port == 0) + prop_val = (uint16_t)CIM_SAP_AVAILABLE_STATE; + else + prop_val = (uint16_t)CIM_SAP_ACTIVE_STATE; CMSetProperty(inst, "EnabledState", (CMPIValue *)&prop_val, CMPI_uint16); @@ -101,7 +111,7 @@ static CMPIInstance *get_console_sap(const CMPIBroker *broker, const CMPIObjectPath *reference, virConnectPtr conn, - struct domain *dominfo, + struct vnc_port *port, CMPIStatus *s) { @@ -119,7 +129,7 @@ goto out; } - if (inst_from_dom(broker, reference, dominfo, inst) != 1) { + if (inst_from_dom(broker, reference, port, inst) != 1) { cu_statusf(broker, s, CMPI_RC_ERR_FAILED, "Unable to get instance from domain"); @@ -127,6 +137,84 @@ out: return inst; +} + +static CMPIStatus get_vnc_sessions(const CMPIObjectPath *ref, + virConnectPtr conn, + struct vnc_ports ports, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst; + const char *path = PROC_TCP; + unsigned int lport = 0; + unsigned int rport = 0; + FILE *tcp_info; + char *line = NULL; + size_t len = 0; + int val; + int ret; + int i; + + tcp_info = fopen(path, "r"); + if (tcp_info== NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to open %s: %m", tcp_info); + goto out; + } + + if (getline(&line, &len, tcp_info) == -1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to read from %s", tcp_info); + goto out; + } + + while (getline(&line, &len, tcp_info) > 0) { + ret = sscanf(line, "%d: %*[^:]:%X %*[^:]:%X", &val, &lport, + &rport); + if (ret != 3) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to determine active sessions"); + goto out; + } + + for (i = 0; i < ports.max; i++) { + if (lport != ports.list[i]->port) + continue; + + ports.list[i]->remote_port = rport; + inst = get_console_sap(_BROKER, + ref, + conn, + ports.list[i], + &s); + if ((s.rc != CMPI_RC_OK) || (inst == NULL)) + goto out; + + inst_list_add(list, inst); + } + } + + /* Handle any guests that were missed. These guest don't have active + or enabled sessions. */ + for (i = 0; i < ports.max; i++) { + if (ports.list[i]->remote_port != -1) + continue; + + inst = get_console_sap(_BROKER, ref, conn, ports.list[i], &s); + if ((s.rc != CMPI_RC_OK) || (inst == NULL)) + goto out; + + inst_list_add(list, inst); + } + + out: + tcp_info = fopen(path, "r"); + fclose(tcp_info); + return s; } static bool check_graphics(virDomainPtr dom, @@ -157,7 +245,10 @@ virDomainPtr *domain_list; struct domain *dominfo = NULL; struct inst_list list; + struct vnc_ports port_list; int count; + int lport; + int ret; int i; conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); @@ -165,6 +256,10 @@ return s; inst_list_init(&list); + + port_list.list = NULL; + port_list.max = 0; + port_list.cur = 0; count = get_domain_list(conn, &domain_list); if (count < 0) { @@ -175,23 +270,58 @@ } else if (count == 0) goto out; + port_list.list = malloc(count * sizeof(struct vnc_port *)); + if (!port_list.list) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate guest port list"); + goto out; + + } + + for (i = 0; i < count; i++) + port_list.list[i] = NULL; + for (i = 0; i < count; i++) { - CMPIInstance *inst = NULL; - if (!check_graphics(domain_list[i], &dominfo)) { virDomainFree(domain_list[i]); cleanup_dominfo(&dominfo); continue; } - inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); + ret = sscanf(dominfo->dev_graphics->dev.graphics.port, + "%d", + &lport); + if (ret != 1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to guest's console port"); + goto out; + } + + port_list.list[port_list.cur] = malloc(sizeof(struct vnc_port)); + if (!port_list.list[port_list.cur]) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate guest port list"); + goto out; + } + + port_list.list[port_list.cur]->name = strdup(dominfo->name); + port_list.list[port_list.cur]->port = lport; + port_list.list[port_list.cur]->remote_port = -1; + port_list.cur++; virDomainFree(domain_list[i]); cleanup_dominfo(&dominfo); + } - if (inst != NULL) - inst_list_add(&list, inst); - } + port_list.max = port_list.cur; + port_list.cur = 0; + + s = get_vnc_sessions(ref, conn, port_list, &list); + if (s.rc != CMPI_RC_OK) + goto out; if (names_only) cu_return_instance_names(results, &list); @@ -201,6 +331,13 @@ out: free(domain_list); inst_list_free(&list); + + for (i = 0; i < port_list.max; i++) { + free(port_list.list[i]->name); + free(port_list.list[i]); + port_list.list[i] = NULL; + } + free(port_list.list); return s; } diff -r e043f46f299e -r 22262aa6c752 src/svpc_types.h --- a/src/svpc_types.h Wed Oct 22 08:28:37 2008 -0700 +++ b/src/svpc_types.h Mon Oct 20 18:24:30 2008 -0700 @@ -60,6 +60,10 @@ #define CIM_CRS_OTHER 1 #define CIM_CRS_VNC 4 +#define CIM_SAP_ACTIVE_STATE 2 +#define CIM_SAP_INACTIVE_STATE 3 +#define CIM_SAP_AVAILABLE_STATE 6 + #include #include From kaitlin at linux.vnet.ibm.com Fri Oct 24 22:15:46 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 24 Oct 2008 15:15:46 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] In-Reply-To: Message-ID: # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224552270 25200 # Node ID c4e40b8d7aa0ad1135e9ea4273e3becff2fd3cbb # Parent 22262aa6c752e15e6c9fa462cd3bb84b7ff49fd2 #2 Have get_console_sap_by_name() use Name attribute to determine session status Updates: -Removed function that parses the Name attribute Signed-off-by: Kaitlin Rupert diff -r 22262aa6c752 -r c4e40b8d7aa0 src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 @@ -344,7 +344,7 @@ CMPIStatus get_console_sap_by_name(const CMPIBroker *broker, const CMPIObjectPath *ref, - const char *name, + const char *sys, CMPIInstance **_inst) { virConnectPtr conn; @@ -352,6 +352,10 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; struct domain *dominfo = NULL; + struct vnc_port *port = NULL; + const char *name = NULL; + int lport; + int rport; conn = connect_by_classname(broker, CLASSNAME(ref), &s); if (conn == NULL) { @@ -361,12 +365,12 @@ goto out; } - dom = virDomainLookupByName(conn, name); + dom = virDomainLookupByName(conn, sys); if (dom == NULL) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, "No such instance (%s)", - name); + sys); goto out; } @@ -374,9 +378,29 @@ cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "No console device for this guest"); + goto out; } - inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); + if (cu_get_str_path(ref, "Name", &name) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (System)"); + goto out; + } + + if (sscanf(name, "%d:%d", &lport, &rport) != 2) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to guest's console port"); + goto out; + } + + port = malloc(sizeof(struct vnc_port)); + port->name = strdup(dominfo->name); + port->port = lport; + port->remote_port = rport; + + inst = get_console_sap(_BROKER, ref, conn, port, &s); virDomainFree(dom); @@ -387,6 +411,9 @@ out: virConnectClose(conn); + free(port->name); + free(port); + port = NULL; return s; } @@ -399,10 +426,10 @@ CMPIInstance *inst = NULL; const char *sys = NULL; - if (cu_get_str_path(reference, "System", &sys) != CMPI_RC_OK) { + if (cu_get_str_path(reference, "SystemName", &sys) != CMPI_RC_OK) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, - "No such instance (System)"); + "No such instance (SystemName)"); goto out; } From fujimura.toshifumi at np.css.fujitsu.com Mon Oct 27 00:58:48 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Mon, 27 Oct 2008 09:58:48 +0900 Subject: [Libvirt-cim] Request for all in one instllation page In-Reply-To: <87skqmazl3.fsf@caffeine.danplanet.com> References: <4901822E.2070605@np.css.fujitsu.com> <20081024124645.AD6CF1805B@m021.s.css.fujitsu.com> <87skqmazl3.fsf@caffeine.danplanet.com> Message-ID: <49051248.1000309@np.css.fujitsu.com> Dear Kaitlin and Sakai. Thanks for your suggestions. After following your suggestions, I succeed to add appropriate Schemas. And I come out a Cimtest result which is close to recent Cimtest Wiki's one. (The result shows below) Thanks! -- Toshifumi Fujimura. ================================================= KVM on Pegasus Test Run Summary for Oct 27 2008 ================================================= Distro: Fedora release 9.92 (Rawhide) Kernel: 2.6.27.3-34.rc1.fc10.i686.PAE libvirt: 0.4.6 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613+ Libvirt-cim changeset: 1fcf330fadf8+ ================================================= FAIL : 1 XFAIL : 2 SKIP : 6 PASS : 126 ----------------- Total : 135 ================================================= FAIL Test Summary: VirtualSystemManagementService - 11_define_memrasdunits.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP 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: 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: 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: 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: 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: FAIL ERROR - Unexpected rc code 1 and description: CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD ERROR - DefineSystem (Bytes) failed InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD -------------------------------------------------------------------- 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 -------------------------------------------------------------------- > AS> Is this idea is correct? > > Certainly an upgrade would be nice. However, that shouldn't be a > problem here. > > AS> If this idea is correct, you need to build from upstream > AS> openpegasus or upgrade CIM Schema to 217 on F10 package. > > The "make preinstall" process downloads and installs the 2.16 > experimental schema into our namespace (root/virt). It can coexist > with the outdated pegasus schema just fine. > > The messages about a missing superclass likely mean that you don't > have the base schema installed properly. > > You might try shutting down pegasus and removing the entire namespace > directory: > > rm -Rf /var/lib/Pegasus/repository/root\#virt/ > > Then, do your "make preinstall" followed by "make postinstall" and > then start up pegasus. > > From kaitlin at linux.vnet.ibm.com Mon Oct 27 03:59:20 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 26 Oct 2008 20:59:20 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] Fix cim_define() for LXC In-Reply-To: Message-ID: <312f2fd4180272698731.1225079960@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225079524 25200 # Node ID 312f2fd41802726987313f7dbb366aa91923e3e9 # Parent 0f340004e1cd48f5ede60a68283a850ae60c9ebe [TEST] Fix cim_define() for LXC LXC guests only support Memory and Disk RASDS currently. Signed-off-by: Kaitlin Rupert diff -r 0f340004e1cd -r 312f2fd41802 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Sun Oct 26 20:52:04 2008 -0700 @@ -482,7 +482,7 @@ service = vsms.get_vsms_class(self.virt)(ip) sys_settings = str(self.vssd) if self.virt == 'LXC' and const.LXC_netns_support is False: - res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] + res_settings = [str(self.dasd), str(self.masd)] else: res_settings = [str(self.dasd), str(self.nasd), str(self.pasd), str(self.masd)] From kaitlin at linux.vnet.ibm.com Mon Oct 27 03:59:22 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 26 Oct 2008 20:59:22 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Add VSMS 15_mod_system_settings.py In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1223669037 25200 # Node ID b9d6b1978d21b530717cea02d50823531cb51371 # Parent b0fbd29f2f05c24229efc8dbc0053effe196e688 [TEST] #2 Add VSMS 15_mod_system_settings.py This test verifies the ModifySystemSettings() call. Updates: -Remove virt param from cleanup_env() -For LXC guests, return a XFAIL because the containers XML isn't updated by libvirt properly Signed-off-by: Kaitlin Rupert diff -r b0fbd29f2f05 -r b9d6b1978d21 suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py Fri Oct 10 13:03:57 2008 -0700 @@ -0,0 +1,136 @@ +#!/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 import vsms +from XenKvmLib import vxml +from CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.const import do_main, default_network_name +from XenKvmLib.classes import get_typed_class, inst_to_mof +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.common_util import poll_for_state_change + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] +default_dom = 'rstest_domain' +cpu = 2 +RECOVERY_VAL = 3 +DEFINED_STATE = 3 +bug = "00008" + +def cleanup_env(ip, cxml): + cxml.cim_destroy(ip) + cxml.undefine(ip) + +def get_vssd(ip, virt, get_cim_inst): + cn = get_typed_class(virt, "VirtualSystemSettingData") + inst = None + + try: + if virt == "XenFV": + virt = "Xen" + + key_list = {"InstanceID" : "%s:%s" % (virt, default_dom) } + inst = GetInstance(ip, cn, key_list, get_cim_inst) + + except Exception, details: + logger.error(details) + return FAIL, inst + + if inst is None: + return FAIL, inst + + return PASS, inst + + at do_main(sup_types) +def main(): + options = main.options + + test_cases = ["define", "start"] + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) + service = vsms.get_vsms_class(options.virt)(options.ip) + + for case in test_cases: + #Each time through, define guest using a default XML + cxml.undefine(options.ip) + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + 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 %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + status, inst = get_vssd(options.ip, options.virt, True) + if status != PASS: + logger.error("Failed to get the VSSD instance for %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + inst['AutomaticRecoveryAction'] = pywbem.cim_types.Uint16(RECOVERY_VAL) + vssd = inst_to_mof(inst) + + ret = service.ModifySystemSettings(SystemSettings=vssd) + if ret[0] != 0: + logger.error("Failed to modify dom: %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + if case == "start": + #This should be replaced with a RSC to shutdownt he guest + cxml.destroy(options.ip) + status, cs = poll_for_state_change(options.ip, options.virt, + default_dom, DEFINED_STATE) + if status != PASS: + logger.error("Failed to destroy %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + status, inst = get_vssd(options.ip, options.virt, False) + if status != PASS: + logger.error("Failed to get the VSSD instance for %s", default_dom) + cleanup_env(options.ip, options.virt, cxml) + return FAIL + + if inst.AutomaticRecoveryAction != RECOVERY_VAL: + logger.error("%s not updated properly.", default_dom) + logger.error("Exp AutomaticRecoveryAction=%d, got %d", RECOVERY_VAL, + inst.AutomaticRecoveryAction) + cleanup_env(options.ip, options.virt, cxml) + if options.virt == "LXC": + return XFAIL_RC(bug) + return FAIL + + cleanup_env(options.ip, options.virt, cxml) + + return PASS + +if __name__ == "__main__": + sys.exit(main()) + From kaitlin at linux.vnet.ibm.com Mon Oct 27 03:59:19 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 26 Oct 2008 20:59:19 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] #2 Add a test to verify ModifySystemSettings() Message-ID: From kaitlin at linux.vnet.ibm.com Mon Oct 27 03:59:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 26 Oct 2008 20:59:21 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] Update inst_to_mof() to convert CIM_CimtestClass instances to inst In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1223669037 25200 # Node ID b0fbd29f2f05c24229efc8dbc0053effe196e688 # Parent 312f2fd41802726987313f7dbb366aa91923e3e9 [TEST] Update inst_to_mof() to convert CIM_CimtestClass instances to inst Also update GetInstance so it returns both CIMInstance and CIM_CimtestClass objects. Signed-off-by: Kaitlin Rupert diff -r 312f2fd41802 -r b0fbd29f2f05 suites/libvirt-cim/lib/XenKvmLib/classes.py --- a/suites/libvirt-cim/lib/XenKvmLib/classes.py Sun Oct 26 20:52:04 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py Fri Oct 10 13:03:57 2008 -0700 @@ -18,6 +18,7 @@ # 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 virt_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -47,6 +48,9 @@ #FIXME This function is only needed for libcmpiutil versions 0.4 and later. #Once version 0.4 is obsolete, this function should be removed. def inst_to_mof(inst): + if not isinstance(inst, pywbem.cim_obj.CIMInstance): + inst = inst.inst + mof_str = inst.tomof() mof_inst = "" diff -r 312f2fd41802 -r b0fbd29f2f05 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Sun Oct 26 20:52:04 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Oct 10 13:03:57 2008 -0700 @@ -429,7 +429,7 @@ return list -def GetInstance(host, cn, keys): +def GetInstance(host, cn, keys, ret_cim_inst=False): '''Resolve the enumeration given the @cn. Return a list of CIMInstance objects.''' @@ -438,6 +438,9 @@ try: inst = CIM_CimtestClass(host, ref) + + if ret_cim_inst: + inst = inst.inst except pywbem.CIMError, arg: print arg[1] From danms at us.ibm.com Mon Oct 27 14:06:36 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 27 Oct 2008 07:06:36 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] Fix cim_define() for LXC In-Reply-To: <312f2fd4180272698731.1225079960@localhost.localdomain> (Kaitlin Rupert's message of "Sun, 26 Oct 2008 20:59:20 -0700") References: <312f2fd4180272698731.1225079960@localhost.localdomain> Message-ID: <87vdveku8j.fsf@caffeine.danplanet.com> KR> LXC guests only support Memory and Disk RASDS currently. I just added ProcRASD support for LXC a week or so ago. It doesn't support a VirtualQuantity, so perhaps it's not appropriate here, but it does exist :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Mon Oct 27 14:31:20 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Oct 2008 07:31:20 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add input device. Message-ID: From kaitlin at linux.vnet.ibm.com Mon Oct 27 14:31:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Oct 2008 07:31:21 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add PointingDevice schema and input device type In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1224692656 25200 # Node ID c7a932c5026084087d988925cde244e5f9ede862 # Parent c4e40b8d7aa0ad1135e9ea4273e3becff2fd3cbb Add PointingDevice schema and input device type. PointingDevice will represent the input device. Using resource type 13 ("I/O Device") as the device type. Signed-off-by: Kaitlin Rupert diff -r c4e40b8d7aa0 -r c7a932c50260 Makefile.am --- a/Makefile.am Mon Oct 20 18:24:30 2008 -0700 +++ b/Makefile.am Wed Oct 22 09:24:16 2008 -0700 @@ -47,7 +47,8 @@ schema/ConsoleRedirectionServiceCapabilities.mof \ schema/ServiceAffectsElement.mof \ schema/KVMRedirectionSAP.mof \ - schema/DisplayController.mof + schema/DisplayController.mof \ + schema/PointingDevice.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -105,7 +106,8 @@ schema/ConsoleRedirectionServiceCapabilities.registration \ schema/ServiceAffectsElement.registration \ schema/KVMRedirectionSAP.registration \ - schema/DisplayController.registration + schema/DisplayController.registration \ + schema/PointingDevice.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r c4e40b8d7aa0 -r c7a932c50260 schema/PointingDevice.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/PointingDevice.mof Wed Oct 22 09:24:16 2008 -0700 @@ -0,0 +1,17 @@ +// Copyright IBM Corp. 2007 + +[ Provider("cmpi::Virt_Device") ] +class Xen_PointingDevice : CIM_PointingDevice +{ +}; + +[ Provider("cmpi::Virt_Device") ] +class KVM_PointingDevice : CIM_PointingDevice +{ +}; + +[ Provider("cmpi::Virt_Device") ] +class LXC_PointingDevice : CIM_PointingDevice +{ +}; + diff -r c4e40b8d7aa0 -r c7a932c50260 schema/PointingDevice.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/PointingDevice.registration Wed Oct 22 09:24:16 2008 -0700 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2008 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_PointingDevice root/virt Virt_Device Virt_Device instance +KVM_PointingDevice root/virt Virt_Device Virt_Device instance +LXC_PointingDevice root/virt Virt_Device Virt_Device instance diff -r c4e40b8d7aa0 -r c7a932c50260 src/svpc_types.h --- a/src/svpc_types.h Mon Oct 20 18:24:30 2008 -0700 +++ b/src/svpc_types.h Wed Oct 22 09:24:16 2008 -0700 @@ -29,15 +29,17 @@ #define CIM_RES_TYPE_DISK 17 #define CIM_RES_TYPE_EMU 1 #define CIM_RES_TYPE_GRAPHICS 24 +#define CIM_RES_TYPE_INPUT 13 #define CIM_RES_TYPE_UNKNOWN 1000 -#define CIM_RES_TYPE_COUNT 5 +#define CIM_RES_TYPE_COUNT 6 const static int cim_res_types[CIM_RES_TYPE_COUNT] = {CIM_RES_TYPE_NET, CIM_RES_TYPE_DISK, CIM_RES_TYPE_MEM, CIM_RES_TYPE_PROC, CIM_RES_TYPE_GRAPHICS, + CIM_RES_TYPE_INPUT, }; #define CIM_VSSD_RECOVERY_NONE 2 From kaitlin at linux.vnet.ibm.com Mon Oct 27 14:31:22 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 27 Oct 2008 07:31:22 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Add input device support to device_parsing and Virt_Device In-Reply-To: Message-ID: <2a6913abb79a442662cf.1225117882@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224692656 25200 # Node ID 2a6913abb79a442662cfcfca3970c5c144af1fc5 # Parent c7a932c5026084087d988925cde244e5f9ede862 Add input device support to device_parsing and Virt_Device. Signed-off-by: Kaitlin Rupert diff -r c7a932c50260 -r 2a6913abb79a libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.c Wed Oct 22 09:24:16 2008 -0700 @@ -43,6 +43,7 @@ #define EMU_XPATH (xmlChar *)"/domain/devices/emulator" #define MEM_XPATH (xmlChar *)"/domain/memory | /domain/currentMemory" #define GRAPHICS_XPATH (xmlChar *)"/domain/devices/graphics" +#define INPUT_XPATH (xmlChar *)"/domain/devices/input" #define DEFAULT_BRIDGE "xenbr0" #define DEFAULT_NETWORK "default" @@ -77,6 +78,12 @@ free(dev->port); } +static void cleanup_input_device(struct input_device *dev) +{ + free(dev->type); + free(dev->bus); +} + void cleanup_virt_device(struct virt_device *dev) { if (dev == NULL) @@ -90,6 +97,8 @@ cleanup_emu_device(&dev->dev.emu); else if (dev->type == CIM_RES_TYPE_GRAPHICS) cleanup_graphics_device(&dev->dev.graphics); + else if (dev->type == CIM_RES_TYPE_INPUT) + cleanup_input_device(&dev->dev.input); free(dev->id); @@ -455,6 +464,36 @@ return 0; } +static int parse_input_device(xmlNode *node, struct virt_device **vdevs) +{ + struct virt_device *vdev = NULL; + struct input_device *idev = NULL; + + vdev = calloc(1, sizeof(*vdev)); + if (vdev == NULL) + goto err; + + idev = &(vdev->dev.input); + + idev->type = get_attr_value(node, "type"); + idev->bus = get_attr_value(node, "bus"); + + if ((idev->type == NULL) || (idev->bus == NULL)) + goto err; + + vdev->type = CIM_RES_TYPE_INPUT; + vdev->id = strdup("input"); + + *vdevs = vdev; + + return 1; + err: + cleanup_input_device(idev); + free(vdev); + + return 0; +} + static bool resize_devlist(struct virt_device **list, int newsize) { struct virt_device *_list; @@ -490,6 +529,8 @@ do_real_parse = parse_mem_device; else if (type == CIM_RES_TYPE_GRAPHICS) do_real_parse = parse_graphics_device; + else if (type == CIM_RES_TYPE_INPUT) + do_real_parse = parse_input_device; else goto out; @@ -558,6 +599,8 @@ xpathstr = MEM_XPATH; else if (type == CIM_RES_TYPE_GRAPHICS) xpathstr = GRAPHICS_XPATH; + else if (type == CIM_RES_TYPE_INPUT) + xpathstr = INPUT_XPATH; else goto err1; @@ -622,6 +665,9 @@ } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { DUP_FIELD(dev, _dev, dev.graphics.type); DUP_FIELD(dev, _dev, dev.graphics.port); + } else if (dev->type == CIM_RES_TYPE_INPUT) { + DUP_FIELD(dev, _dev, dev.input.type); + DUP_FIELD(dev, _dev, dev.input.bus); } return dev; @@ -876,6 +922,7 @@ parse_devices(xml, &(*dominfo)->dev_emu, CIM_RES_TYPE_EMU); parse_devices(xml, &(*dominfo)->dev_graphics, CIM_RES_TYPE_GRAPHICS); + parse_devices(xml, &(*dominfo)->dev_input, CIM_RES_TYPE_INPUT); (*dominfo)->dev_mem_ct = _get_mem_device(xml, &(*dominfo)->dev_mem); (*dominfo)->dev_net_ct = parse_devices(xml, diff -r c7a932c50260 -r 2a6913abb79a libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.h Wed Oct 22 09:24:16 2008 -0700 @@ -64,6 +64,11 @@ char *port; }; +struct input_device { + char *type; + char *bus; +}; + struct virt_device { uint16_t type; union { @@ -73,6 +78,7 @@ struct vcpu_device vcpu; struct emu_device emu; struct graphics_device graphics; + struct input_device input; } dev; char *id; }; @@ -115,6 +121,7 @@ struct virt_device *dev_graphics; struct virt_device *dev_emu; + struct virt_device *dev_input; struct virt_device *dev_mem; int dev_mem_ct; diff -r c7a932c50260 -r 2a6913abb79a src/Virt_Device.c --- a/src/Virt_Device.c Wed Oct 22 09:24:16 2008 -0700 +++ b/src/Virt_Device.c Wed Oct 22 09:24:16 2008 -0700 @@ -39,6 +39,9 @@ #define CIM_NET_UNKNOWN 0 #define CIM_NET_ETHERNET 2 + +#define CIM_INPUT_UNKNOWN 2 +#define CIM_INPUT_MOUSE 3 const static CMPIBroker *_BROKER; const static uint64_t XEN_MEM_BLOCKSIZE = 4096; @@ -214,6 +217,42 @@ return inst; } +static int input_set_attr(CMPIInstance *instance, + struct input_device *dev) +{ + uint16_t cim_type; + + if (STREQC(dev->type, "mouse")) + cim_type = CIM_INPUT_MOUSE; + else + cim_type = CIM_INPUT_UNKNOWN; + + CMSetProperty(instance, "PointingType", + (CMPIValue *)&cim_type, CMPI_uint16); + + return 1; +} + +static CMPIInstance *input_instance(const CMPIBroker *broker, + struct input_device *dev, + const virDomainPtr dom, + const char *ns) +{ + CMPIInstance *inst; + virConnectPtr conn; + + conn = virDomainGetConnect(dom); + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "PointingDevice", + ns); + + if (!input_set_attr(inst, dev)) + return NULL; + + return inst; +} + static int device_set_devid(CMPIInstance *instance, struct virt_device *dev, const virDomainPtr dom) @@ -358,6 +397,11 @@ &dev->dev.graphics, dom, ns); + else if (dev->type == CIM_RES_TYPE_INPUT) + instance = input_instance(broker, + &dev->dev.input, + dom, + ns); else return false; @@ -392,6 +436,8 @@ return CIM_RES_TYPE_PROC; else if (strstr(classname, "DisplayController")) return CIM_RES_TYPE_GRAPHICS; + else if (strstr(classname, "PointingDevice")) + return CIM_RES_TYPE_INPUT; else return CIM_RES_TYPE_UNKNOWN; } From danms at us.ibm.com Mon Oct 27 22:11:35 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 27 Oct 2008 15:11:35 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Make ProcRASD check running domains for VCPU count Message-ID: This patch set makes ProcRASD get the hypervisor's count of VCPUs when a domain is running. This helps us show the state of the system instead of the stored configuration when the guest is running. Because of some Xen quirks, the two can get out of sync and so it's best to make sure we're returning the correct number when a guest is online. From danms at us.ibm.com Mon Oct 27 22:11:36 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 27 Oct 2008 15:11:36 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add a domain_vcpu_count() function to return the number of active VCPUs for In-Reply-To: Message-ID: <10bd66c67a6ad4eebe6a.1225145496@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225145197 25200 # Node ID 10bd66c67a6ad4eebe6a0f8dc81db2b4912d5650 # Parent e043f46f299ec3dd3d1e48e51e57437fa90db136 Add a domain_vcpu_count() function to return the number of active VCPUs for a given domain. Signed-off-by: Dan Smith diff -r e043f46f299e -r 10bd66c67a6a libxkutil/misc_util.c --- a/libxkutil/misc_util.c Wed Oct 22 08:28:37 2008 -0700 +++ b/libxkutil/misc_util.c Mon Oct 27 15:06:37 2008 -0700 @@ -541,6 +541,45 @@ return result; } +int domain_vcpu_count(virDomainPtr dom) +{ + virVcpuInfoPtr info = NULL; + int max; + int count; + int actual = 0; + int i; + virConnectPtr conn = NULL; + + conn = virDomainGetConnect(dom); + if (conn == NULL) { + CU_DEBUG("Failed to get connection from domain"); + return -1; + } + + max = virConnectGetMaxVcpus(conn, virConnectGetType(conn)); + if (max <= 0) { + CU_DEBUG("Failed to get max vcpu count"); + return -1; + } + + info = calloc(max, sizeof(*info)); + if (info == NULL) { + CU_DEBUG("Failed to allocate %i vcpuinfo structures", max); + return -1; + } + + count = virDomainGetVcpus(dom, info, max, NULL, 0); + + free(info); + + for (i = 0; i < count; i++) { + if (info[i].cpu != -1) + actual++; + } + + return actual; +} + /* * Local Variables: * mode: C diff -r e043f46f299e -r 10bd66c67a6a libxkutil/misc_util.h --- a/libxkutil/misc_util.h Wed Oct 22 08:28:37 2008 -0700 +++ b/libxkutil/misc_util.h Mon Oct 27 15:06:37 2008 -0700 @@ -124,6 +124,8 @@ bool check_refs_pfx_match(const CMPIObjectPath *refa, const CMPIObjectPath *refb); +int domain_vcpu_count(virDomainPtr dom); + #define LIBVIRT_CIM_DEFAULT_MAKEREF() \ static CMPIInstance* make_ref(const CMPIObjectPath *source_ref, \ const CMPIInstance *target_inst, \ From danms at us.ibm.com Mon Oct 27 22:11:37 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 27 Oct 2008 15:11:37 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Make ProcRASD properly reflect the number of VCPUs a domain currently has, In-Reply-To: Message-ID: <7bcc5c38cca4093f70ed.1225145497@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225145383 25200 # Node ID 7bcc5c38cca4093f70ed50601b45c67cf1a0085a # Parent 10bd66c67a6ad4eebe6a0f8dc81db2b4912d5650 Make ProcRASD properly reflect the number of VCPUs a domain currently has, instead of just the number that the libvirt XML definition claims. Since Xen doesn't always honor vcpu add/remove actions, this is required to make sure we're reflecting the state of the system when a domain is running. Signed-off-by: Dan Smith diff -r 10bd66c67a6a -r 7bcc5c38cca4 src/Virt_RASD.c --- a/src/Virt_RASD.c Mon Oct 27 15:06:37 2008 -0700 +++ b/src/Virt_RASD.c Mon Oct 27 15:09:43 2008 -0700 @@ -96,6 +96,7 @@ static CMPIStatus set_proc_rasd_params(const CMPIBroker *broker, const CMPIObjectPath *ref, + struct virt_device *dev, const char *domain, CMPIInstance *inst) { @@ -105,6 +106,7 @@ struct infostore_ctx *info; uint32_t weight; uint64_t limit; + uint64_t count; conn = connect_by_classname(broker, CLASSNAME(ref), &s); if (conn == NULL) @@ -117,6 +119,17 @@ "Domain `%s' not found while getting info", domain); goto out; } + + if (domain_online(dom)) + count = domain_vcpu_count(dom); + else + count = dev->dev.vcpu.quantity; + + if (count > 0) + CMSetProperty(inst, + "VirtualQuantity", + (CMPIValue *)&count, + CMPI_uint64); info = infostore_open(dom); if (info == NULL) { @@ -306,14 +319,7 @@ CMSetProperty(inst, "Limit", (CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64); } else if (dev->type == CIM_RES_TYPE_PROC) { - if (dev->dev.vcpu.quantity > 0) { - CMSetProperty(inst, - "VirtualQuantity", - (CMPIValue *)&dev->dev.vcpu.quantity, - CMPI_uint64); - } - - set_proc_rasd_params(broker, ref, host, inst); + set_proc_rasd_params(broker, ref, dev, host, inst); } /* FIXME: Put the HostResource in place */ From yunguol at cn.ibm.com Tue Oct 28 03:03:37 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 27 Oct 2008 20:03:37 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Remove old enumerate and getInstance and update device related tc Message-ID: <408dbb3a61b43bd0def5.1225163017@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1225163011 25200 # Node ID 408dbb3a61b43bd0def587a9ea7e648105def002 # Parent 0f340004e1cd48f5ede60a68283a850ae60c9ebe [TEST] #4 Remove old enumerate and getInstance and update device related tc Updates from 3 to 4: Stay changeset 453 of LogicalDisk/03_ld_gi_errs.py Signed-off-by: Guolian Yun diff -r 0f340004e1cd -r 408dbb3a61b4 suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/01_disk.py Mon Oct 27 20:03:31 2008 -0700 @@ -26,7 +26,7 @@ import sys import pywbem from VirtLib import utils -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger @@ -48,13 +48,13 @@ vsxml.cim_define(options.ip) devid = "%s/%s" % (test_dom, test_dev) + disk = get_typed_class(options.virt, "LogicalDisk") key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "LogicalDisk"), + 'CreationClassName' : disk, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } - dev = eval('devices.' + get_typed_class(options.virt, "LogicalDisk"))(options.ip, key_list) - + dev = GetInstance(options.ip, disk, key_list) status = 0 if dev.Name != test_dev: diff -r 0f340004e1cd -r 408dbb3a61b4 suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Mon Oct 27 20:03:31 2008 -0700 @@ -125,7 +125,7 @@ import pywbem from VirtLib import utils from XenKvmLib import assoc -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.common_util import try_getinstance from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.classes import get_typed_class @@ -198,7 +198,7 @@ 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } - disk = eval('devices.' + get_typed_class(options.virt, "LogicalDisk"))(options.ip, key_list) + disk = GetInstance(options.ip, classname, key_list) except Exception,detail: logger.error(CIM_ERROR_GETINSTANCE, classname) logger.error("Exception: %s", detail) diff -r 0f340004e1cd -r 408dbb3a61b4 suites/libvirt-cim/cimtest/Memory/01_memory.py --- a/suites/libvirt-cim/cimtest/Memory/01_memory.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Memory/01_memory.py Mon Oct 27 20:03:31 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from VirtLib import utils from VirtLib import live -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger @@ -46,12 +46,13 @@ alloc_mem = int(vsxml.xml_get_mem()) devid = "%s/mem" % test_dom + mem_class = get_typed_class(options.virt, "Memory") key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "Memory"), + 'CreationClassName' : mem_class, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } - dev = eval('devices.' + get_typed_class(options.virt, "Memory"))(options.ip, key_list) + dev = GetInstance(options.ip, mem_class, key_list) status = 0 diff -r 0f340004e1cd -r 408dbb3a61b4 suites/libvirt-cim/cimtest/NetworkPort/01_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Mon Oct 27 20:03:31 2008 -0700 @@ -33,7 +33,7 @@ import pywbem from VirtLib import utils from VirtLib import live -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger @@ -67,16 +67,17 @@ vsxml.cim_define(options.ip) devid = "%s/%s" % (test_dom, test_mac) + net_class = get_typed_class(options.virt, "NetworkPort") key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "NetworkPort"), + 'CreationClassName' : net_class, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } dev = None - + try: - dev = eval('devices.' + get_typed_class(options.virt, "NetworkPort"))(options.ip, key_list) + dev = GetInstance(options.ip, net_class, key_list) except Exception, detail: logger.error("Exception: %s" % detail) diff -r 0f340004e1cd -r 408dbb3a61b4 suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/03_user_netport.py Mon Oct 27 20:03:31 2008 -0700 @@ -28,7 +28,7 @@ import sys import pywbem from XenKvmLib import const -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.vxml import KVMXML from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -57,7 +57,7 @@ dev = None try: - dev = devices.KVM_NetworkPort(options.ip, key_list) + dev = GetInstance(options.ip, 'KVM_NetworkPort', key_list) except Exception, detail: logger.error("Exception: %s" % detail) cxml.undefine(options.ip) diff -r 0f340004e1cd -r 408dbb3a61b4 suites/libvirt-cim/cimtest/Processor/01_processor.py --- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Mon Oct 27 20:03:31 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from VirtLib import utils from VirtLib import live -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.test_xml import testxml from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class @@ -49,6 +49,7 @@ # Processor instance enumerate need the domain to be active domlist = live.active_domain_list(options.ip, options.virt) + proc_class = get_typed_class(options.virt, "Processor") if test_dom not in domlist: status = FAIL logger.error("Domain not started, we're not able to check vcpu") @@ -56,12 +57,12 @@ for i in range(0, test_vcpus): devid = "%s/%s" % (test_dom, i) key_list = { 'DeviceID' : devid, - 'CreationClassName' : get_typed_class(options.virt, "Processor"), + 'CreationClassName' : proc_class, 'SystemName' : test_dom, 'SystemCreationClassName' : get_typed_class(options.virt, "ComputerSystem") } try: - dev = eval(('devices.' + get_typed_class(options.virt, 'Processor')))(options.ip, key_list) + dev = GetInstance(options.ip, proc_class, key_list) if dev.DeviceID == devid: logger.info("Checked device %s" % devid) else: diff -r 0f340004e1cd -r 408dbb3a61b4 suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/01_forward.py Mon Oct 27 20:03:31 2008 -0700 @@ -30,7 +30,7 @@ from VirtLib import utils from XenKvmLib import vxml from XenKvmLib import assoc -from XenKvmLib import devices +from XenKvmLib.enumclass import GetInstance from XenKvmLib.classes import get_typed_class from CimTest import Globals from XenKvmLib.const import do_main @@ -99,8 +99,8 @@ exp_inst_id_val[cn] = key_list['DeviceID'] try: - dev_class = devices.get_class(get_typed_class(options.virt, cn)) - devlist[cn] = dev_class(options.ip, key_list) + dev_class = get_typed_class(options.virt, cn) + devlist[cn] = GetInstance(options.ip, dev_class, key_list) logelelst[cn] = devlist[cn].DeviceID except Exception, detail: print_error(cn, detail) diff -r 0f340004e1cd -r 408dbb3a61b4 suites/libvirt-cim/lib/XenKvmLib/devices.py --- a/suites/libvirt-cim/lib/XenKvmLib/devices.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/devices.py Mon Oct 27 20:03:31 2008 -0700 @@ -40,63 +40,6 @@ def __str__(self): print self.inst.items() -class CIM_LogicalDevice(CIM_Instance): - def __init__(self, server, keys): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings=keys) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - CIM_Instance.__init__(self, inst) - -class CIM_LogicalDisk(CIM_LogicalDevice): - pass - -class CIM_NetworkPort(CIM_LogicalDevice): - pass - -class CIM_Memory(CIM_LogicalDevice): - pass - -class CIM_Processor(CIM_LogicalDevice): - pass - -class Xen_LogicalDisk(CIM_LogicalDisk): - pass - -class KVM_LogicalDisk(CIM_LogicalDisk): - pass - -class LXC_LogicalDisk(CIM_LogicalDisk): - pass - -class Xen_NetworkPort(CIM_NetworkPort): - pass - -class KVM_NetworkPort(CIM_NetworkPort): - pass - -class Xen_Memory(CIM_Memory): - pass - -class KVM_Memory(CIM_Memory): - pass - -class LXC_Memory(CIM_Memory): - pass - -class Xen_Processor(CIM_Processor): - pass - -class KVM_Processor(CIM_Processor): - pass def get_class(classname): return eval(classname) diff -r 0f340004e1cd -r 408dbb3a61b4 suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Mon Oct 27 20:03:31 2008 -0700 @@ -30,332 +30,6 @@ from CimTest import Globals, CimExt from VirtLib import utils from CimTest.Globals import logger - -class CIM_MyClass(CIM_Instance): - def __init__(self, server, keys): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings=keys) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - self.conn = conn - self.inst = inst - self.ref = ref - - 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 Linux_ComputerSystem(CIM_Instance): - def __init__(self, server, keys): - conn = pywbem.WBEMConnection('http://%s' % server, - (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) - - try: - classname = self.__class__.__name__ - ref = CIMInstanceName(classname, - keybindings=keys) - inst = conn.GetInstance(ref) - except pywbem.CIMError, arg: - raise arg - - CIM_Instance.__init__(self, inst) - - -class CIM_ComputerSystem(CIM_MyClass): - pass - -class CIM_System(CIM_MyClass): - pass - -class CIM_AllocationCapabilities(CIM_MyClass): - pass - -class CIM_RegisteredProfile(CIM_MyClass): - pass - -class CIM_LogicalDevice(CIM_MyClass): - pass - -class CIM_ResourcePool(CIM_MyClass): - pass - -class CIM_VirtualSystemManagementCapabilities(CIM_MyClass): - pass - -class CIM_ResourcePoolConfigurationCapabilities(CIM_MyClass): - pass - -class CIM_EnabledLogicalElementCapabilities(CIM_MyClass): - pass - -class Virt_VirtualSystemMigrationCapabilities(CIM_MyClass): - pass - -class CIM_VirtualSystemMigrationSettingData(CIM_MyClass): - pass - -class CIM_VirtualSystemSnapshotService(CIM_MyClass): - pass - -class CIM_VirtualSystemSnapshotServiceCapabilities(CIM_MyClass): - pass - -class CIM_NetResourceAllocationSettingData(CIM_MyClass): - pass - -class CIM_MemResourceAllocationSettingData(CIM_MyClass): - pass - -class CIM_ProcResourceAllocationSettingData(CIM_MyClass): - pass - -class CIM_DiskResourceAllocationSettingData(CIM_MyClass): - pass - -class Xen_ComputerSystem(CIM_ComputerSystem): - pass - -class KVM_ComputerSystem(CIM_ComputerSystem): - pass - -class LXC_ComputerSystem(CIM_ComputerSystem): - pass - -class Xen_HostSystem(CIM_System): - pass - -class KVM_HostSystem(CIM_System): - pass - -class LXC_HostSystem(CIM_System): - pass - -class Xen_MigrationJob(CIM_MyClass): - pass - -class Xen_RegisteredProfile(CIM_RegisteredProfile): - pass - -class KVM_RegisteredProfile(CIM_RegisteredProfile): - pass - -class LXC_RegisteredProfile(CIM_RegisteredProfile): - pass - -class Xen_VirtualSystemSettingData(CIM_MyClass): - pass - -class KVM_VirtualSystemSettingData(CIM_MyClass): - pass - -class LXC_VirtualSystemSettingData(CIM_MyClass): - pass - -class Xen_LogicalDisk(CIM_LogicalDevice): - pass - -class KVM_LogicalDisk(CIM_LogicalDevice): - pass - -class Xen_Memory(CIM_LogicalDevice): - pass - -class KVM_Memory(CIM_LogicalDevice): - pass - -class LXC_Memory(CIM_LogicalDevice): - pass - -class LXC_Memory(CIM_LogicalDevice): - pass - -class Xen_Processor(CIM_LogicalDevice): - pass - -class KVM_Processor(CIM_LogicalDevice): - pass - -class Xen_NetworkPort(CIM_LogicalDevice): - pass - -class KVM_NetworkPort(CIM_LogicalDevice): - pass - -class Xen_MemoryPool(CIM_ResourcePool): - pass - -class KVM_MemoryPool(CIM_ResourcePool): - pass - -class LXC_MemoryPool(CIM_ResourcePool): - pass - -class Xen_ProcessorPool(CIM_ResourcePool): - pass - -class KVM_ProcessorPool(CIM_ResourcePool): - pass - -class LXC_ProcessorPool(CIM_ResourcePool): - pass - -class Xen_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities): - pass - -class KVM_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities): - pass - -class LXC_VirtualSystemManagementCapabilities(CIM_VirtualSystemManagementCapabilities): - pass - -class Xen_ResourcePoolConfigurationCapabilities(CIM_ResourcePoolConfigurationCapabilities): - pass - -class KVM_ResourcePoolConfigurationCapabilities(CIM_ResourcePoolConfigurationCapabilities): - pass - -class LXC_ResourcePoolConfigurationCapabilities(CIM_ResourcePoolConfigurationCapabilities): - pass - -class Xen_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities): - pass - -class KVM_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities): - pass - -class LXC_EnabledLogicalElementCapabilities(CIM_EnabledLogicalElementCapabilities): - pass - -class Xen_DiskPool(CIM_ResourcePool): - pass - -class KVM_DiskPool(CIM_ResourcePool): - pass - -class LXC_DiskPool(CIM_ResourcePool): - pass - -class Xen_NetworkPool(CIM_ResourcePool): - pass - -class KVM_NetworkPool(CIM_ResourcePool): - pass - -class LXC_NetworkPool(CIM_ResourcePool): - pass - -class Xen_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities): - pass - -class KVM_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities): - pass - -class LXC_VirtualSystemMigrationCapabilities(Virt_VirtualSystemMigrationCapabilities): - pass - -class Xen_AllocationCapabilities(CIM_AllocationCapabilities): - pass - -class KVM_AllocationCapabilities(CIM_AllocationCapabilities): - pass - -class LXC_AllocationCapabilities(CIM_AllocationCapabilities): - pass - -class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - pass - -class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - pass - -class LXC_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - pass - -class Xen_VirtualSystemSnapshotService(CIM_VirtualSystemSnapshotService): - pass - -class KVM_VirtualSystemSnapshotService(CIM_VirtualSystemSnapshotService): - pass - -class LXC_VirtualSystemSnapshotService(CIM_VirtualSystemSnapshotService): - pass - -class Xen_VirtualSystemSnapshotServiceCapabilities(CIM_VirtualSystemSnapshotServiceCapabilities): - pass - -class KVM_VirtualSystemSnapshotServiceCapabilities(CIM_VirtualSystemSnapshotServiceCapabilities): - pass - -class LXC_VirtualSystemSnapshotServiceCapabilities(CIM_VirtualSystemSnapshotServiceCapabilities): - pass - -class Xen_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData): - pass - -class KVM_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData): - pass - -class LXC_MemResourceAllocationSettingData(CIM_MemResourceAllocationSettingData): - pass - -class Xen_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData): - pass - -class KVM_NetResourceAllocationSettingData(CIM_NetResourceAllocationSettingData): - pass - -class Xen_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData): - pass - -class KVM_ProcResourceAllocationSettingData(CIM_ProcResourceAllocationSettingData): - pass - -class Xen_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData): - pass - -class KVM_DiskResourceAllocationSettingData(CIM_DiskResourceAllocationSettingData): - pass - -class KVM_VirtualSystemMigrationService(CIM_MyClass): - pass - -class Xen_VirtualSystemMigrationService(CIM_MyClass): - pass - -class LXC_VirtualSystemMigrationService(CIM_MyClass): - pass - -class Xen_VirtualSystemManagementService(CIM_MyClass): - pass - -class KVM_VirtualSystemManagementService(CIM_MyClass): - pass - -class LXC_VirtualSystemManagementService(CIM_MyClass): - pass - class CIM_CimtestClass(CIM_Instance): From yunguol at cn.ibm.com Tue Oct 28 02:46:34 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 28 Oct 2008 10:46:34 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Remove old enumerate and getInstance and update device related tc In-Reply-To: <490241D5.2010103@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-25 05:44:53: > > diff -r ddd578da7555 -r a4aa517fe926 suites/libvirt- > cim/cimtest/LogicalDisk/03_ld_gi_errs.py > > --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py > Thu Oct 23 05:38:42 2008 -0700 > > +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py > Thu Oct 23 19:17:15 2008 -0700 > > @@ -125,7 +125,7 @@ > > > -from XenKvmLib.const import do_main, get_provider_version > > +from XenKvmLib.const import do_main > > This needs to stay.. > > > > global conn > > conn = assoc.myWBEMConnection('http://%s' % options.ip, > (CIM_USER, CIM_PASS), CIM_NS) > > - > > - rev, changeset = get_provider_version(options.virt, options.ip) > > - if rev < 682: > > - old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > > - 'desc' : "No such instance (INVALID_DevID_Keyvalue)" > > - } > > - expr_values["invalid_devid_keyvalue"] = old_ret > > As does this.. > > These are part of changeset 453. Good catch. Stay it. Thanks! > > Otherwise, looks good! > > -- > 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 jfehlig at novell.com Tue Oct 28 04:20:51 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Mon, 27 Oct 2008 22:20:51 -0600 Subject: [Libvirt-cim] [PATCH 0 of 2] Make ProcRASD check running domains for VCPU count In-Reply-To: References: Message-ID: <49069323.7070903@novell.com> Dan Smith wrote: > This patch set makes ProcRASD get the hypervisor's count of VCPUs when a > domain is running. This helps us show the state of the system instead of the > stored configuration when the guest is running. Because of some Xen quirks, > the two can get out of sync and so it's best to make sure we're returning the > correct number when a guest is online. > +1 for this set. I've tried increasing and decreasing # vcpus on both halted and running domains under xen. It is invalid to set vcpus > max vcpus on running domain in xen. Attempting this results in an exception in xend that is lost somewhere along the way, perhaps libvirt. Anyhow, it is unrelated to this set. Thanks, Jim From fujimura.toshifumi at np.css.fujitsu.com Tue Oct 28 04:50:06 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Tue, 28 Oct 2008 13:50:06 +0900 Subject: [Libvirt-cim] [PATCH]Add the revision and the changeset of Cimtest to the test report Message-ID: <490699FE.3070108@np.css.fujitsu.com> # HG changeset patch # User Toshifumi Fujimura # Date 1225162881 -32400 # Node ID e735bda49b6b5dc2ab96c8626808e97a64711b57 # Parent 0f340004e1cd48f5ede60a68283a850ae60c9ebe [PATCH]Add the revision and the changeset of Cimtest to the test report Hi, This patch adds the revision and the changeset of Cimtest to the test report "run_report.txt". Since Cimtest updates frequently, we need to know the cimtest version in the test reports, After this change, the header is like follows. ================================================ KVM on Pegasus Test Run Summary for Oct 27 2008 ================================================= Distro: Fedora release 9.92 (Rawhide) Kernel: 2.6.27.3-34.rc1.fc10.i686.PAE libvirt: 0.4.6 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 725 Libvirt-cim changeset: e043f46f299e Cimtest revision: 459 Cimtest changeset: 0f340004e1cd ================================================= Signed-off-by: Toshifumi Fujimura diff -r 0f340004e1cd suites/libvirt-cim/lib/XenKvmLib/reporting.py --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Tue Oct 28 09:52:47 2008 +0900 @@ -25,6 +25,14 @@ from time import gmtime, strftime from VirtLib import utils from XenKvmLib.const import get_provider_version + +def get_cimtest_revision(): + revision = commands.getoutput("hg parents --template \"{rev}\"") + return revision + +def get_cimtest_changeset(): + changeset = commands.getoutput("hg parents --template \"{node|short}\"") + return changeset def get_cmd_val(cmd, ip): rc, out = utils.run_remote(ip, cmd) @@ -137,6 +145,10 @@ cimom, cimom_ver = get_cimom_ver(ip) + cimtest_revision = get_cimtest_revision() + cimtest_changeset = get_cimtest_changeset() + cimtest_info = "Cimtest revision: %s\nCimtest changeset: %s\n" % (cimtest_revision, cimtest_changeset) + heading = "%s on %s Test Run Summary for %s" % (virt, cimom, date) sys_env = get_env_data(ip, virt) @@ -146,7 +158,7 @@ res, res_total, test_block = build_report_body(rvals, tstr, divider) - report = divider + heading + "\n" + divider + sys_env + divider + res \ + report = divider + heading + "\n" + divider + sys_env + cimtest_info + divider + res \ + res_total + divider + test_block + "Full report:\n" \ + run_output -- Toshifumi Fujimura. From yunguol at cn.ibm.com Tue Oct 28 05:03:08 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 28 Oct 2008 13:03:08 +0800 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Oct 28 2008 Message-ID: ================================================= KVM on Pegasus Test Run Summary for Oct 28 2008 ================================================= Distro: Fedora release 9 (Sulphur) Kernel: 2.6.25.14-108.fc9.x86_64 libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 712 Libvirt-cim changeset: 668097d4b27c ================================================= FAIL : 2 XFAIL : 2 SKIP : 6 PASS : 128 ----------------- Total : 138 ================================================= FAIL Test Summary: RedirectionService - 01_enum_crs.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP 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: 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: 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: 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: 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 -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: FAIL ERROR - 'MaxConcurrentEnabledSAPs' Mismatch ERROR - Expected '65535', Got '2' CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.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 -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Unexpected rc code 1 and description: CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD ERROR - Unable to define rstest_disk_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From fujimura.toshifumi at np.css.fujitsu.com Tue Oct 28 05:23:52 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Tue, 28 Oct 2008 14:23:52 +0900 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Oct 28 2008 Message-ID: <4906A1E8.2020502@np.css.fujitsu.com> ================================================= KVM on Pegasus Test Run Summary for Oct 28 2008 ================================================= Distro: Fedora release 9.92 (Rawhide) Kernel: 2.6.27.4-47.rc3.fc10.i686.PAE libvirt: 0.4.6 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 725 Libvirt-cim changeset: e043f46f299e ================================================= FAIL : 4 XFAIL : 2 SKIP : 6 PASS : 126 ----------------- Total : 138 ================================================= FAIL Test Summary: HostSystem - 02_hostsystem_to_rasd.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL VirtualSystemManagementService - 11_define_memrasdunits.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP 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: 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: 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: FAIL ERROR - KVM_SettingsDefineState returned 0 KVM_DisplayController objects CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: 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 -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.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: FAIL ERROR - Unexpected rc code 6 and description CIM_ERR_NOT_FOUND: No such instance (INVALID_InstID_KeyValue) - resource pool type mismatch ERROR - ------ FAILED: Invalid InstanceID Key Value.------ -------------------------------------------------------------------- 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: FAIL ERROR - Unexpected rc code 1 and description: CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD ERROR - DefineSystem (Bytes) failed InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Unexpected rc code 1 and description: CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD ERROR - Unable to define rstest_disk_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD -------------------------------------------------------------------- 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 -------------------------------------------------------------------- Thanks and Regards, -- Toshifumi Fujimura. From kaitlin at linux.vnet.ibm.com Tue Oct 28 15:09:38 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 28 Oct 2008 08:09:38 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add a domain_vcpu_count() function to return the number of active VCPUs for In-Reply-To: <10bd66c67a6ad4eebe6a.1225145496@guaranine.danplanet.com> References: <10bd66c67a6ad4eebe6a.1225145496@guaranine.danplanet.com> Message-ID: <49072B32.2010405@linux.vnet.ibm.com> > + info = calloc(max, sizeof(*info)); > + if (info == NULL) { > + CU_DEBUG("Failed to allocate %i vcpuinfo structures", max); > + return -1; > + } > + > + count = virDomainGetVcpus(dom, info, max, NULL, 0); > + > + free(info); You free info here.. > + > + for (i = 0; i < count; i++) { > + if (info[i].cpu != -1) But use one of its fields in the compare here. > + actual++; > + } > + > + return actual; > +} -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Tue Oct 28 15:28:16 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 28 Oct 2008 08:28:16 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add a domain_vcpu_count() function to return the number of active VCPUs for In-Reply-To: Message-ID: <819ae6c97a071eb28c56.1225207696@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225207324 25200 # Node ID 819ae6c97a071eb28c56719a8bb29bf584664556 # Parent e043f46f299ec3dd3d1e48e51e57437fa90db136 Add a domain_vcpu_count() function to return the number of active VCPUs for a given domain. Changes: - Fix misplaced free() Signed-off-by: Dan Smith diff -r e043f46f299e -r 819ae6c97a07 libxkutil/misc_util.c --- a/libxkutil/misc_util.c Wed Oct 22 08:28:37 2008 -0700 +++ b/libxkutil/misc_util.c Tue Oct 28 08:22:04 2008 -0700 @@ -541,6 +541,45 @@ return result; } +int domain_vcpu_count(virDomainPtr dom) +{ + virVcpuInfoPtr info = NULL; + int max; + int count; + int actual = 0; + int i; + virConnectPtr conn = NULL; + + conn = virDomainGetConnect(dom); + if (conn == NULL) { + CU_DEBUG("Failed to get connection from domain"); + return -1; + } + + max = virConnectGetMaxVcpus(conn, virConnectGetType(conn)); + if (max <= 0) { + CU_DEBUG("Failed to get max vcpu count"); + return -1; + } + + info = calloc(max, sizeof(*info)); + if (info == NULL) { + CU_DEBUG("Failed to allocate %i vcpuinfo structures", max); + return -1; + } + + count = virDomainGetVcpus(dom, info, max, NULL, 0); + + for (i = 0; i < count; i++) { + if (info[i].cpu != -1) + actual++; + } + + free(info); + + return actual; +} + /* * Local Variables: * mode: C diff -r e043f46f299e -r 819ae6c97a07 libxkutil/misc_util.h --- a/libxkutil/misc_util.h Wed Oct 22 08:28:37 2008 -0700 +++ b/libxkutil/misc_util.h Tue Oct 28 08:22:04 2008 -0700 @@ -124,6 +124,8 @@ bool check_refs_pfx_match(const CMPIObjectPath *refa, const CMPIObjectPath *refb); +int domain_vcpu_count(virDomainPtr dom); + #define LIBVIRT_CIM_DEFAULT_MAKEREF() \ static CMPIInstance* make_ref(const CMPIObjectPath *source_ref, \ const CMPIInstance *target_inst, \ From danms at us.ibm.com Tue Oct 28 15:28:17 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 28 Oct 2008 08:28:17 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Make ProcRASD properly reflect the number of VCPUs a domain currently has, In-Reply-To: Message-ID: <2df4433a10600aee5a8e.1225207697@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225207665 25200 # Node ID 2df4433a10600aee5a8ed0aae0c1ded96a3e4d0f # Parent 819ae6c97a071eb28c56719a8bb29bf584664556 Make ProcRASD properly reflect the number of VCPUs a domain currently has, instead of just the number that the libvirt XML definition claims. Since Xen doesn't always honor vcpu add/remove actions, this is required to make sure we're reflecting the state of the system when a domain is running. Signed-off-by: Dan Smith diff -r 819ae6c97a07 -r 2df4433a1060 src/Virt_RASD.c --- a/src/Virt_RASD.c Tue Oct 28 08:22:04 2008 -0700 +++ b/src/Virt_RASD.c Tue Oct 28 08:27:45 2008 -0700 @@ -96,6 +96,7 @@ static CMPIStatus set_proc_rasd_params(const CMPIBroker *broker, const CMPIObjectPath *ref, + struct virt_device *dev, const char *domain, CMPIInstance *inst) { @@ -105,6 +106,7 @@ struct infostore_ctx *info; uint32_t weight; uint64_t limit; + uint64_t count; conn = connect_by_classname(broker, CLASSNAME(ref), &s); if (conn == NULL) @@ -117,6 +119,17 @@ "Domain `%s' not found while getting info", domain); goto out; } + + if (domain_online(dom)) + count = domain_vcpu_count(dom); + else + count = dev->dev.vcpu.quantity; + + if (count > 0) + CMSetProperty(inst, + "VirtualQuantity", + (CMPIValue *)&count, + CMPI_uint64); info = infostore_open(dom); if (info == NULL) { @@ -306,14 +319,7 @@ CMSetProperty(inst, "Limit", (CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64); } else if (dev->type == CIM_RES_TYPE_PROC) { - if (dev->dev.vcpu.quantity > 0) { - CMSetProperty(inst, - "VirtualQuantity", - (CMPIValue *)&dev->dev.vcpu.quantity, - CMPI_uint64); - } - - set_proc_rasd_params(broker, ref, host, inst); + set_proc_rasd_params(broker, ref, dev, host, inst); } /* FIXME: Put the HostResource in place */ From danms at us.ibm.com Tue Oct 28 15:28:15 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 28 Oct 2008 08:28:15 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] (#2) Make ProcRASD check running domains for VCPU count Message-ID: Updated set to fix the free() issue in the first patch From danms at us.ibm.com Tue Oct 28 15:16:50 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 28 Oct 2008 08:16:50 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add a domain_vcpu_count() function to return the number of active VCPUs for In-Reply-To: <49072B32.2010405@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Tue, 28 Oct 2008 08:09:38 -0700") References: <10bd66c67a6ad4eebe6a.1225145496@guaranine.danplanet.com> <49072B32.2010405@linux.vnet.ibm.com> Message-ID: <87ej207nrx.fsf@caffeine.danplanet.com> >> + info = calloc(max, sizeof(*info)); >> + if (info == NULL) { >> + CU_DEBUG("Failed to allocate %i vcpuinfo structures", max); >> + return -1; >> + } >> + >> + count = virDomainGetVcpus(dom, info, max, NULL, 0); >> + >> + free(info); KR> You free info here.. >> + >> + for (i = 0; i < count; i++) { >> + if (info[i].cpu != -1) KR> But use one of its fields in the compare here. Yeah, that would be bad. What happened was, I didn't realize at first that we had to actually examine the .cpu field of the struct to get a count of *active* vcpus, so I initially was just returning count. Later, I added the loop to count the active ones, and clearly added it after the free() instead of before :) I'll send a replacement. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Tue Oct 28 15:27:12 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 28 Oct 2008 08:27:12 -0700 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Oct 28 2008 In-Reply-To: <4906A1E8.2020502@np.css.fujitsu.com> (Toshifumi Fujimura's message of "Tue, 28 Oct 2008 14:23:52 +0900") References: <4906A1E8.2020502@np.css.fujitsu.com> Message-ID: <87abco7nan.fsf@caffeine.danplanet.com> TF> KVM on Pegasus Test Run Summary for Oct 28 2008 Thanks a lot for sending this! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 28 15:32:00 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 28 Oct 2008 08:32:00 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] (#2) Make ProcRASD check running domains for VCPU count In-Reply-To: References: Message-ID: <49073070.20004@linux.vnet.ibm.com> Dan Smith wrote: > Updated set to fix the free() issue in the first patch > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 28 16:20:09 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 28 Oct 2008 09:20:09 -0700 Subject: [Libvirt-cim] [PATCH] Add support for graphics device to Virt_RASD.c Message-ID: <8b08dc1aa0f1cab258bc.1225210809@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224705263 25200 # Node ID 8b08dc1aa0f1cab258bc23e7f80e210761be187d # Parent 52bef91a7296c176c1dcd732a25ea1c9146773ff Add support for graphics device to Virt_RASD.c Also add field for a hostname / IP address to the graphics struct. This field is for storing the console's listen address. This will allow the user to set a specific address to listen on, in addition to a specific port. Signed-off-by: Kaitlin Rupert diff -r 52bef91a7296 -r 8b08dc1aa0f1 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.c Wed Oct 22 12:54:23 2008 -0700 @@ -76,6 +76,7 @@ { free(dev->type); free(dev->port); + free(dev->host); } static void cleanup_input_device(struct input_device *dev) @@ -447,9 +448,13 @@ gdev->type = get_attr_value(node, "type"); gdev->port = get_attr_value(node, "port"); + gdev->host = get_attr_value(node, "listen"); if ((gdev->type == NULL) || (gdev->port == NULL)) goto err; + + if (gdev->host == NULL) + gdev->host = strdup("127.0.0.1"); vdev->type = CIM_RES_TYPE_GRAPHICS; vdev->id = strdup("graphics"); @@ -665,6 +670,7 @@ } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { DUP_FIELD(dev, _dev, dev.graphics.type); DUP_FIELD(dev, _dev, dev.graphics.port); + DUP_FIELD(dev, _dev, dev.graphics.host); } else if (dev->type == CIM_RES_TYPE_INPUT) { DUP_FIELD(dev, _dev, dev.input.type); DUP_FIELD(dev, _dev, dev.input.bus); diff -r 52bef91a7296 -r 8b08dc1aa0f1 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.h Wed Oct 22 12:54:23 2008 -0700 @@ -62,6 +62,7 @@ struct graphics_device { char *type; char *port; + char *host; }; struct input_device { diff -r 52bef91a7296 -r 8b08dc1aa0f1 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Wed Oct 22 09:24:16 2008 -0700 +++ b/schema/ResourceAllocationSettingData.mof Wed Oct 22 12:54:23 2008 -0700 @@ -115,3 +115,25 @@ class LXC_MemResourceAllocationSettingData : LXC_ResourceAllocationSettingData { }; + +[Description ("Xen virtual graphics device"), + Provider("cmpi::Virt_RASD") +] +class Xen_GraphicsResourceAllocationSettingData : Xen_ResourceAllocationSettingData +{ +}; + +[Description ("KVM virtual graphics device"), + Provider("cmpi::Virt_RASD") +] +class KVM_GraphicsResourceAllocationSettingData : KVM_ResourceAllocationSettingData +{ +}; + +[Description ("LXC virtual graphics device"), + Provider("cmpi::Virt_RASD") +] +class LXC_GraphicsResourceAllocationSettingData : LXC_ResourceAllocationSettingData +{ +}; + diff -r 52bef91a7296 -r 8b08dc1aa0f1 schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Wed Oct 22 09:24:16 2008 -0700 +++ b/schema/ResourceAllocationSettingData.registration Wed Oct 22 12:54:23 2008 -0700 @@ -4,10 +4,13 @@ Xen_NetResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance Xen_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance Xen_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +Xen_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance KVM_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance KVM_NetResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance KVM_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance KVM_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +KVM_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +LXC_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance diff -r 52bef91a7296 -r 8b08dc1aa0f1 src/Virt_RASD.c --- a/src/Virt_RASD.c Wed Oct 22 09:24:16 2008 -0700 +++ b/src/Virt_RASD.c Wed Oct 22 12:54:23 2008 -0700 @@ -247,6 +247,29 @@ return s; } +static CMPIStatus set_graphics_rasd_params(const struct virt_device *dev, + CMPIInstance *inst) +{ + int rc; + char *addr_str = NULL; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + rc = asprintf(&addr_str, + "%s:%s", + dev->dev.graphics.host, + dev->dev.graphics.port); + if (rc == -1) { + goto out; + } + + CMSetProperty(inst, "Address", (CMPIValue *)addr_str, CMPI_chars); + + out: + free(addr_str); + + return s; +} + static CMPIInstance *rasd_from_vdev(const CMPIBroker *broker, struct virt_device *dev, const char *host, @@ -272,6 +295,9 @@ } else if (dev->type == CIM_RES_TYPE_MEM) { type = CIM_RES_TYPE_MEM; base = "MemResourceAllocationSettingData"; + } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { + type = CIM_RES_TYPE_GRAPHICS; + base = "GraphicsResourceAllocationSettingData"; } else { return NULL; } @@ -320,6 +346,8 @@ (CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64); } else if (dev->type == CIM_RES_TYPE_PROC) { set_proc_rasd_params(broker, ref, dev, host, inst); + } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { + s = set_graphics_rasd_params(dev, inst); } /* FIXME: Put the HostResource in place */ @@ -441,6 +469,8 @@ *type = CIM_RES_TYPE_PROC; else if (STREQ(base, "MemResourceAllocationSettingData")) *type = CIM_RES_TYPE_MEM; + else if (STREQ(base, "GraphicsResourceAllocationSettingData")) + *type = CIM_RES_TYPE_GRAPHICS; else goto out; @@ -468,6 +498,9 @@ break; case CIM_RES_TYPE_DISK: *classname = "DiskResourceAllocationSettingData"; + break; + case CIM_RES_TYPE_GRAPHICS: + *classname = "GraphicsResourceAllocationSettingData"; break; default: rc = CMPI_RC_ERR_FAILED; From danms at us.ibm.com Tue Oct 28 17:53:09 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 28 Oct 2008 10:53:09 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] In-Reply-To: <22262aa6c752e15e6c9f.1224886545@localhost.localdomain> (Kaitlin Rupert's message of "Fri, 24 Oct 2008 15:15:45 -0700") References: <22262aa6c752e15e6c9f.1224886545@localhost.localdomain> Message-ID: <871vy07gje.fsf@caffeine.danplanet.com> KR> + tcp_info = fopen(path, "r"); KR> + if (tcp_info== NULL) { Whitespace before the == ... KR> + port_list.list = malloc(count * sizeof(struct vnc_port *)); Why not allocate the space for the structs too? KR> + port_list.list[port_list.cur] = malloc(sizeof(struct vnc_port)); If you do the above, then you won't have to allocate here. Otherwise I think it looks fine. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Tue Oct 28 17:54:38 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 28 Oct 2008 10:54:38 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] In-Reply-To: (Kaitlin Rupert's message of "Fri, 24 Oct 2008 15:15:46 -0700") References: Message-ID: <87wsfs61wh.fsf@caffeine.danplanet.com> KR> + port = malloc(sizeof(struct vnc_port)); Check your malloc() result. KR> + port->name = strdup(dominfo->name); Check your strdup() result. KR> out: KR> virConnectClose(conn); KR> + free(port->name); KR> + free(port); KR> + port = NULL; This "port = NULL" doesn't do anything, does it? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Tue Oct 28 17:58:01 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 28 Oct 2008 10:58:01 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Add input device support to device_parsing and Virt_Device In-Reply-To: <2a6913abb79a442662cf.1225117882@localhost.localdomain> (Kaitlin Rupert's message of "Mon, 27 Oct 2008 07:31:22 -0700") References: <2a6913abb79a442662cf.1225117882@localhost.localdomain> Message-ID: <87skqg61qu.fsf@caffeine.danplanet.com> KR> @@ -115,6 +121,7 @@ KR> struct virt_device *dev_graphics; KR> struct virt_device *dev_emu; KR> + struct virt_device *dev_input; Are you going to add a count as well? I think that by default virt-manager configures guests with a PS2 mouse and a USB tablet. Not sure if that's worth keeping track of, but we definitely want to decide and make sure we don't ever create a list of the above that won't get fully free()'d if we just expect it to be a single device. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Oct 28 21:16:10 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 28 Oct 2008 14:16:10 -0700 Subject: [Libvirt-cim] [PATCH]Add the revision and the changeset of Cimtest to the test report In-Reply-To: <490699FE.3070108@np.css.fujitsu.com> References: <490699FE.3070108@np.css.fujitsu.com> Message-ID: <4907811A.7060508@linux.vnet.ibm.com> Thanks so much for submitting a patch! =) I'm glad you got libvirt-cim and cimtest setup and running. Just a few minor changes.. > + > +def get_cimtest_revision(): > + revision = commands.getoutput("hg parents --template \"{rev}\"") > + return revision > + > +def get_cimtest_changeset(): > + changeset = commands.getoutput("hg parents --template > \"{node|short}\"") > + return changeset If you check out the directory with user x, but then run "hg parents --template \"{rev}\"" from that directory as user y, you'll see something like the follwoing: [root at elm3b41 cimtest]# hg parents --template \"{rev}\"Not trusting file /tmp/cimtest/.hg/hgrc from untrusted user kaitlin, group cim Not trusting file /tmp/cimtest/.hg/hgrc from untrusted user kaitlin, group cim "459" Can you strip out everything but the revision number and changeset number? > > def get_cmd_val(cmd, ip): > rc, out = utils.run_remote(ip, cmd) > @@ -137,6 +145,10 @@ > > cimom, cimom_ver = get_cimom_ver(ip) > > + cimtest_revision = get_cimtest_revision() > + cimtest_changeset = get_cimtest_changeset() > + cimtest_info = "Cimtest revision: %s\nCimtest changeset: %s\n" % > (cimtest_revision, cimtest_changeset) > + This line wraps over 80 characters. Can you split it into 2 lines? Also, this block of code can be moved to the get_env_data() function. get_env_data() builds the header block for the test run. > heading = "%s on %s Test Run Summary for %s" % (virt, cimom, date) > sys_env = get_env_data(ip, virt) > > @@ -146,7 +158,7 @@ > > res, res_total, test_block = build_report_body(rvals, tstr, divider) > > - report = divider + heading + "\n" + divider + sys_env + divider + > res \ > + report = divider + heading + "\n" + divider + sys_env + > cimtest_info + divider + res \ So this can also be moved to get_env_data() - you can add cimtest_info to the return statement. Thanks again - this looks great! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From richardm at br.ibm.com Tue Oct 28 21:18:24 2008 From: richardm at br.ibm.com (Richard Maciel) Date: Tue, 28 Oct 2008 19:18:24 -0200 Subject: [Libvirt-cim] [PATCH] Added association HostSystem <-> ConsoleRedirectionServiceCapabilities into the ElementCapabilities.c file Message-ID: <98341347332bf3622f3e.1225228704@F10> # HG changeset patch # User Richard Maciel # Date 1225226020 7200 # Node ID 98341347332bf3622f3e62987f624136cb051845 # Parent ef8ad1ecedfbb085337ec46bf6728fa6bea66d7d Added association HostSystem <-> ConsoleRedirectionServiceCapabilities into the ElementCapabilities.c file * Changed the sys_to_cap function to add code for association Signed-off-by: Richard Maciel diff -r ef8ad1ecedfb -r 98341347332b src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Wed Oct 22 11:32:32 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Tue Oct 28 18:33:40 2008 -0200 @@ -159,6 +159,10 @@ inst_list_add(list, inst); s = get_migration_caps(ref, &inst, _BROKER, false); + if (s.rc == CMPI_RC_OK) + inst_list_add(list, inst); + + s = get_console_rs_caps(_BROKER, ref, &inst, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); From kaitlin at linux.vnet.ibm.com Tue Oct 28 22:18:44 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 28 Oct 2008 15:18:44 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] (#3) Have get_console_sap_by_name() use Name attribute to determine session In-Reply-To: Message-ID: <70f7f862b11c456e9c77.1225232324@localhost.localdomain> # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224552270 25200 # Node ID 70f7f862b11c456e9c77d0b6729bdadb086dba44 # Parent 63aa217c697828d29e5e04d546227a32d75ff9c3 (#3) Have get_console_sap_by_name() use Name attribute to determine session Updates from 2 to 3: -Check malloc() and strdup() returns -Remove unneeded NULL initialization Updates from 1 to 2: -Removed function that parses the Name attribute Signed-off-by: Kaitlin Rupert diff -r 63aa217c6978 -r 70f7f862b11c src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 @@ -343,7 +343,7 @@ CMPIStatus get_console_sap_by_name(const CMPIBroker *broker, const CMPIObjectPath *ref, - const char *name, + const char *sys, CMPIInstance **_inst) { virConnectPtr conn; @@ -351,6 +351,10 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; struct domain *dominfo = NULL; + struct vnc_port *port = NULL; + const char *name = NULL; + int lport; + int rport; conn = connect_by_classname(broker, CLASSNAME(ref), &s); if (conn == NULL) { @@ -360,12 +364,12 @@ goto out; } - dom = virDomainLookupByName(conn, name); + dom = virDomainLookupByName(conn, sys); if (dom == NULL) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, "No such instance (%s)", - name); + sys); goto out; } @@ -373,9 +377,43 @@ cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "No console device for this guest"); + goto out; } - inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); + if (cu_get_str_path(ref, "Name", &name) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (System)"); + goto out; + } + + if (sscanf(name, "%d:%d", &lport, &rport) != 2) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to guest's console port"); + goto out; + } + + port = malloc(sizeof(struct vnc_port)); + if (port == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate guest port struct"); + goto out; + } + + port->name = strdup(dominfo->name); + if (port->name == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate string"); + goto out; + } + + port->port = lport; + port->remote_port = rport; + + inst = get_console_sap(_BROKER, ref, conn, port, &s); virDomainFree(dom); @@ -386,6 +424,8 @@ out: virConnectClose(conn); + free(port->name); + free(port); return s; } @@ -398,10 +438,10 @@ CMPIInstance *inst = NULL; const char *sys = NULL; - if (cu_get_str_path(reference, "System", &sys) != CMPI_RC_OK) { + if (cu_get_str_path(reference, "SystemName", &sys) != CMPI_RC_OK) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, - "No such instance (System)"); + "No such instance (SystemName)"); goto out; } From kaitlin at linux.vnet.ibm.com Tue Oct 28 22:18:42 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 28 Oct 2008 15:18:42 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] #3 Update KVMRedirectionSAP to return avail sessions Message-ID: This updated uses the listening / established port entries in /proc/net/tcp to determine whether a guest has any available / enabled VNC sessions. Updates from 1 to 2: -Removed 2 patches of unecessary junk. From kaitlin at linux.vnet.ibm.com Tue Oct 28 22:18:43 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 28 Oct 2008 15:18:43 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] (#3) Add get_vnc_sessions() to determine all of VNC ports available or in use In-Reply-To: Message-ID: <63aa217c697828d29e5e.1225232323@localhost.localdomain> # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224552270 25200 # Node ID 63aa217c697828d29e5e04d546227a32d75ff9c3 # Parent 2df4433a10600aee5a8ed0aae0c1ded96a3e4d0f (#3) Add get_vnc_sessions() to determine all of VNC ports available or in use. Updates from 2 to 3: -Fix whitespace issues -Do entire vnc_port struct allocation at once Updates from 1 to 2: -Remove functions to convert port number to a string -Instead of using a hash table to hold the ports listed in /proc/net/tcp, use a list to hold the host/port values. Signed-off-by: Kaitlin Rupert diff -r 2df4433a1060 -r 63aa217c6978 src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Tue Oct 28 08:27:45 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 @@ -39,11 +39,25 @@ #include "Virt_KVMRedirectionSAP.h" +#define PROC_TCP "/proc/net/tcp" + const static CMPIBroker *_BROKER; + +struct vnc_port { + char *name; + int port; + int remote_port; +}; + +struct vnc_ports { + struct vnc_port **list; + unsigned int max; + unsigned int cur; +}; static int inst_from_dom(const CMPIBroker *broker, const CMPIObjectPath *ref, - struct domain *dominfo, + struct vnc_port *port, CMPIInstance *inst) { char *sccn = NULL; @@ -52,8 +66,7 @@ uint16_t prop_val; int ret = 1; - if (asprintf(&id, "%s:%s", dominfo->name, - dominfo->dev_graphics->dev.graphics.type) == -1) { + if (asprintf(&id, "%d:%d", port->port, port->remote_port) == -1) { CU_DEBUG("Unable to format name"); ret = 0; goto out; @@ -66,7 +79,7 @@ (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "SystemName", - (CMPIValue *)dominfo->name, CMPI_chars); + (CMPIValue *)port->name, CMPI_chars); CMSetProperty(inst, "SystemCreationClassName", (CMPIValue *)sccn, CMPI_chars); @@ -74,19 +87,16 @@ CMSetProperty(inst, "ElementName", (CMPIValue *)id, CMPI_chars); - if (STREQ(dominfo->dev_graphics->dev.graphics.type, "vnc")) - prop_val = (uint16_t)CIM_CRS_VNC; - else - prop_val = (uint16_t)CIM_CRS_OTHER; - + prop_val = (uint16_t)CIM_CRS_VNC; CMSetProperty(inst, "KVMProtocol", (CMPIValue *)&prop_val, CMPI_uint16); - /* Need to replace this with a check that determines whether - the console session is enabled (in use) or available (not actively - in use). - */ - prop_val = (uint16_t)CIM_CRS_ENABLED_STATE; + if (port->remote_port < 0) + prop_val = (uint16_t)CIM_SAP_INACTIVE_STATE; + else if (port->remote_port == 0) + prop_val = (uint16_t)CIM_SAP_AVAILABLE_STATE; + else + prop_val = (uint16_t)CIM_SAP_ACTIVE_STATE; CMSetProperty(inst, "EnabledState", (CMPIValue *)&prop_val, CMPI_uint16); @@ -101,7 +111,7 @@ static CMPIInstance *get_console_sap(const CMPIBroker *broker, const CMPIObjectPath *reference, virConnectPtr conn, - struct domain *dominfo, + struct vnc_port *port, CMPIStatus *s) { @@ -119,7 +129,7 @@ goto out; } - if (inst_from_dom(broker, reference, dominfo, inst) != 1) { + if (inst_from_dom(broker, reference, port, inst) != 1) { cu_statusf(broker, s, CMPI_RC_ERR_FAILED, "Unable to get instance from domain"); @@ -127,6 +137,84 @@ out: return inst; +} + +static CMPIStatus get_vnc_sessions(const CMPIObjectPath *ref, + virConnectPtr conn, + struct vnc_ports ports, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst; + const char *path = PROC_TCP; + unsigned int lport = 0; + unsigned int rport = 0; + FILE *tcp_info; + char *line = NULL; + size_t len = 0; + int val; + int ret; + int i; + + tcp_info = fopen(path, "r"); + if (tcp_info == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to open %s: %m", tcp_info); + goto out; + } + + if (getline(&line, &len, tcp_info) == -1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to read from %s", tcp_info); + goto out; + } + + while (getline(&line, &len, tcp_info) > 0) { + ret = sscanf(line, "%d: %*[^:]:%X %*[^:]:%X", &val, &lport, + &rport); + if (ret != 3) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to determine active sessions"); + goto out; + } + + for (i = 0; i < ports.max; i++) { + if (lport != ports.list[i]->port) + continue; + + ports.list[i]->remote_port = rport; + inst = get_console_sap(_BROKER, + ref, + conn, + ports.list[i], + &s); + if ((s.rc != CMPI_RC_OK) || (inst == NULL)) + goto out; + + inst_list_add(list, inst); + } + } + + /* Handle any guests that were missed. These guest don't have active + or enabled sessions. */ + for (i = 0; i < ports.max; i++) { + if (ports.list[i]->remote_port != -1) + continue; + + inst = get_console_sap(_BROKER, ref, conn, ports.list[i], &s); + if ((s.rc != CMPI_RC_OK) || (inst == NULL)) + goto out; + + inst_list_add(list, inst); + } + + out: + tcp_info = fopen(path, "r"); + fclose(tcp_info); + return s; } static bool check_graphics(virDomainPtr dom, @@ -157,7 +245,10 @@ virDomainPtr *domain_list; struct domain *dominfo = NULL; struct inst_list list; + struct vnc_ports port_list; int count; + int lport; + int ret; int i; conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); @@ -165,6 +256,10 @@ return s; inst_list_init(&list); + + port_list.list = NULL; + port_list.max = 0; + port_list.cur = 0; count = get_domain_list(conn, &domain_list); if (count < 0) { @@ -175,23 +270,57 @@ } else if (count == 0) goto out; + port_list.list = malloc(count * sizeof(struct vnc_port *)); + if (!port_list.list) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate guest port list"); + goto out; + + } + for (i = 0; i < count; i++) { - CMPIInstance *inst = NULL; + port_list.list[i] = malloc(sizeof(struct vnc_port)); + if (!port_list.list[i]) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate guest port list"); + goto out; + } + } + for (i = 0; i < count; i++) { if (!check_graphics(domain_list[i], &dominfo)) { virDomainFree(domain_list[i]); cleanup_dominfo(&dominfo); continue; } - inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); + ret = sscanf(dominfo->dev_graphics->dev.graphics.port, + "%d", + &lport); + if (ret != 1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to guest's console port"); + goto out; + } + + port_list.list[port_list.cur]->name = strdup(dominfo->name); + port_list.list[port_list.cur]->port = lport; + port_list.list[port_list.cur]->remote_port = -1; + port_list.cur++; virDomainFree(domain_list[i]); cleanup_dominfo(&dominfo); + } - if (inst != NULL) - inst_list_add(&list, inst); - } + port_list.max = port_list.cur; + port_list.cur = 0; + + s = get_vnc_sessions(ref, conn, port_list, &list); + if (s.rc != CMPI_RC_OK) + goto out; if (names_only) cu_return_instance_names(results, &list); @@ -201,6 +330,13 @@ out: free(domain_list); inst_list_free(&list); + + for (i = 0; i < count; i++) { + free(port_list.list[i]->name); + free(port_list.list[i]); + port_list.list[i] = NULL; + } + free(port_list.list); return s; } diff -r 2df4433a1060 -r 63aa217c6978 src/svpc_types.h --- a/src/svpc_types.h Tue Oct 28 08:27:45 2008 -0700 +++ b/src/svpc_types.h Mon Oct 20 18:24:30 2008 -0700 @@ -60,6 +60,10 @@ #define CIM_CRS_OTHER 1 #define CIM_CRS_VNC 4 +#define CIM_SAP_ACTIVE_STATE 2 +#define CIM_SAP_INACTIVE_STATE 3 +#define CIM_SAP_AVAILABLE_STATE 6 + #include #include From yunguol at cn.ibm.com Wed Oct 29 01:57:08 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 29 Oct 2008 09:57:08 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 29 2008 Message-ID: ================================================= KVM on sfcb Test Run Summary for Oct 29 2008 ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 727 Libvirt-cim changeset: 2df4433a1060 ================================================= FAIL : 5 XFAIL : 2 SKIP : 4 PASS : 127 ----------------- Total : 138 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL RedirectionService - 01_enum_crs.py: FAIL RedirectionService - 02_enum_crscap.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL ================================================= 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'Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): Domain Operation Failed Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - Exception: (1, u'Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'test_domain' using RequestedStateChange() 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: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: FAIL ERROR - Exception: not enough arguments for format string Got indication: KVM_ComputerSystemCreatedIndication ERROR - Received indication error: 256 ERROR - Exception: not enough arguments for format string Got indication: KVM_ComputerSystemCreatedIndication ERROR - Received indication error: 256 -------------------------------------------------------------------- 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: FAIL ERROR - KVM_SettingsDefineState returned 0 KVM_DisplayController objects Class not found -------------------------------------------------------------------- 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 -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: FAIL ERROR - 'KVM_ConsoleRedirectionService' returned 0 records, expected 1 Class not found *** Inconsistent provider registration for Virt_ConsoleRedirectionService (2) -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: FAIL ERROR - 'KVM_ConsoleRedirectionServiceCapabilities' returned 0 records, expected 1 *** Inconsistent provider registration for Virt_ConsoleRedirectionServiceCapabilities (2) -------------------------------------------------------------------- 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: FAIL ERROR - Unexpected rc code 6 and description No such instance (INVALID_InstID_KeyValue) - resource pool type mismatch ERROR - ------ FAILED: Invalid InstanceID Key Value.------ -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Oct 29 05:58:26 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 28 Oct 2008 22:58:26 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from live.py to common_util.py and update related tc Message-ID: <5b2b14ed9401ac6398b3.1225259906@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1225259900 25200 # Node ID 5b2b14ed9401ac6398b3cdbefa290553570ff195 # Parent 0f340004e1cd48f5ede60a68283a850ae60c9ebe [TEST] Move some functions from live.py to common_util.py and update related tc On the next, I will delete the removed functions in live.py and update other tests Signed-off-by: Guolian Yun diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Tue Oct 28 22:58:20 2008 -0700 @@ -56,8 +56,7 @@ from VirtLib import utils from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS from CimTest.ReturnCodes import PASS, SKIP, FAIL -from XenKvmLib.common_util import try_getinstance -from VirtLib.live import net_list +from XenKvmLib.common_util import try_getinstance, net_list from XenKvmLib.test_xml import netxml from XenKvmLib.test_doms import create_vnet from XenKvmLib.const import do_main, platform_sup, default_pool_name diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Tue Oct 28 22:58:20 2008 -0700 @@ -25,7 +25,7 @@ import sys from XenKvmLib.const import do_main from XenKvmLib import enumclass -from VirtLib import live +from XenKvmLib.common_util import domain_list from XenKvmLib.classes import get_typed_class from VirtLib import utils from CimTest import Globals @@ -41,7 +41,7 @@ cs_class = get_typed_class(options.virt, 'ComputerSystem') try: cs = enumclass.EnumInstances(options.ip, cs_class) - live_cs = live.domain_list(options.ip, options.virt) + live_cs = domain_list(options.ip, options.virt) for system in cs: name = system.name try: diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Tue Oct 28 22:58:20 2008 -0700 @@ -25,7 +25,7 @@ import sys import pywbem from XenKvmLib import enumclass -from VirtLib import live +from XenKvmLib.common_util import domain_list from VirtLib import utils from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE @@ -35,7 +35,7 @@ sup_types = ['KVM', 'LXC'] def clean_system(host, virt): - l = live.domain_list(host, virt) + l = domain_list(host, virt) if len(l) > 0: return False else: diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Tue Oct 28 22:58:20 2008 -0700 @@ -22,7 +22,6 @@ import sys from VirtLib import utils -from VirtLib import live from XenKvmLib import vxml from XenKvmLib import assoc from XenKvmLib import enumclass @@ -31,7 +30,7 @@ from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC from XenKvmLib.enumclass import EnumInstances -from XenKvmLib.common_util import get_host_info +from XenKvmLib.common_util import get_host_info, domain_list sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "dom_elecap" @@ -114,7 +113,7 @@ logger.error("Failed to define the dom: %s", test_dom) return FAIL - cs = live.domain_list(server, virt) + cs = domain_list(server, virt) ccn = get_typed_class(virt, "ComputerSystem") for system in cs: try: diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Tue Oct 28 22:58:20 2008 -0700 @@ -23,13 +23,12 @@ import sys from VirtLib import utils -from VirtLib import live from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib import vxml from XenKvmLib.classes import get_typed_class from XenKvmLib.classes import get_class_basename -from XenKvmLib.common_util import get_host_info +from XenKvmLib.common_util import get_host_info, domain_list from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, \ CIM_ERROR_ASSOCIATORNAMES from XenKvmLib.const import do_main @@ -154,7 +153,7 @@ logger.error("Failed to define the dom: %s" % test_dom) return FAIL - cs = live.domain_list(options.ip, options.virt) + cs = domain_list(options.ip, options.virt) for system in cs: cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities") status, elec_cs = call_assoc(options.ip, cn, system, options.virt) diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Tue Oct 28 22:58:20 2008 -0700 @@ -26,7 +26,7 @@ from XenKvmLib.classes import get_typed_class from CimTest import Globals from XenKvmLib.const import do_main -from VirtLib import live +from XenKvmLib.common_util import domain_list from VirtLib import utils sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -44,7 +44,7 @@ return 1 - names = live.domain_list(options.ip, options.virt) + names = domain_list(options.ip, options.virt) if len(elec) != len(names): Globals.logger.error("Get domain list error, the number of domains is not equal") diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/Processor/01_processor.py --- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Tue Oct 28 22:58:20 2008 -0700 @@ -25,7 +25,7 @@ import sys import pywbem from VirtLib import utils -from VirtLib import live +from XenKvmLib.common_util import active_domain_list from XenKvmLib import devices from XenKvmLib.test_xml import testxml from XenKvmLib.classes import get_typed_class @@ -48,7 +48,7 @@ vsxml.start(options.ip) # Processor instance enumerate need the domain to be active - domlist = live.active_domain_list(options.ip, options.virt) + domlist = active_domain_list(options.ip, options.virt) if test_dom not in domlist: status = FAIL logger.error("Domain not started, we're not able to check vcpu") diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ResourcePool/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Tue Oct 28 22:58:20 2008 -0700 @@ -34,7 +34,7 @@ from CimTest.Globals import logger from XenKvmLib.const import do_main, default_pool_name from CimTest.ReturnCodes import PASS, FAIL, SKIP -from VirtLib.live import net_list +from XenKvmLib.common_util import net_list from XenKvmLib.vsms import RASD_TYPE_PROC, RASD_TYPE_MEM, RASD_TYPE_NET_ETHER, \ RASD_TYPE_DISK diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py --- a/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Tue Oct 28 22:58:20 2008 -0700 @@ -28,10 +28,9 @@ import os import sys import pywbem -from VirtLib.live import net_list from XenKvmLib import assoc from XenKvmLib import vxml -from XenKvmLib.common_util import try_getinstance +from XenKvmLib.common_util import try_getinstance, net_list from XenKvmLib.classes import get_typed_class from distutils.file_util import move_file from CimTest.ReturnCodes import PASS, SKIP diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Tue Oct 28 22:58:20 2008 -0700 @@ -57,12 +57,11 @@ from distutils.file_util import move_file from XenKvmLib import assoc from XenKvmLib import enumclass -from VirtLib.live import virsh_version from CimTest.ReturnCodes import PASS, FAIL, SKIP from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS from XenKvmLib.const import do_main, default_pool_name, default_network_name from XenKvmLib.classes import get_typed_class -from XenKvmLib.common_util import print_field_error +from XenKvmLib.common_util import print_field_error, virsh_version platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/VSSD/01_enum.py --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Tue Oct 28 22:58:20 2008 -0700 @@ -27,7 +27,7 @@ # Date : 25-10-2007 import sys -from VirtLib import live +from XenKvmLib.common_util import domain_list from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from XenKvmLib.test_doms import destroy_and_undefine_all @@ -53,7 +53,7 @@ status = FAIL try: - live_cs = live.domain_list(options.ip, options.virt) + live_cs = domain_list(options.ip, options.virt) vssd_class = get_typed_class(options.virt, "VirtualSystemSettingData") syslst = enumclass.EnumInstances(options.ip, vssd_class) found = 0 diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Tue Oct 28 22:58:20 2008 -0700 @@ -25,7 +25,7 @@ import pywbem from pywbem.cim_obj import CIMInstanceName from VirtLib import utils -from VirtLib.live import domain_list, active_domain_list +from XenKvmLib.common_util import domain_list, active_domain_list from XenKvmLib import vsms, vxml from XenKvmLib.classes import get_typed_class from XenKvmLib.const import do_main diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Tue Oct 28 22:58:20 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from pywbem.cim_obj import CIMInstanceName from VirtLib import utils -from VirtLib.live import network_by_bridge +from XenKvmLib.common_util import network_by_bridge from XenKvmLib import vsms from XenKvmLib import vxml from CimTest.Globals import logger diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Tue Oct 28 22:58:20 2008 -0700 @@ -22,7 +22,7 @@ import sys import pywbem -from VirtLib import live +from XenKvmLib import common_util from XenKvmLib import vsms from XenKvmLib.const import do_main from CimTest.Globals import logger @@ -47,7 +47,7 @@ try: cim_ver = service["Caption"] - local_ver = live.get_hv_ver(options.ip, options.virt) + local_ver = common_util.get_hv_ver(options.ip, options.virt) if cim_ver != local_ver: logger.error("CIM says version is `%s', but libvirt says `%s'" \ diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 28 22:58:20 2008 -0700 @@ -36,7 +36,6 @@ 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 from XenKvmLib.vxml import PoolXML, NetXML from VirtLib import utils from XenKvmLib.const import default_pool_name, default_network_name @@ -512,4 +511,215 @@ logger.error("Exception: %s", detail) Globals.CIM_NS = 'root/virt' - return status, linux_cs + return status, linux_cs + +def xm_domname(ip, domid): + + cmd = "xm domname %s" % domid + + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return None + + return out + +def list_guests_on_bridge(ip, bridge): + """Returns a list of domU names that have vifs in the + specified bridge. + """ + + cmd = "brctl show %s | grep 'vif' | grep -v vif0.*" % bridge + + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return [] + + ret = [] + lines = out.splitlines() + for l in lines: + vif = l.split()[-1] + domid = vif.replace('vif', '').split('.')[0] + domname = xm_domname(ip, domid) + if domname != None: + ret.append(domname) + + return ret + +def disk_list(ip, vs_name): + """Returns the list of disk of the specified VS + """ + + guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' " + rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) + + if rc != 0: + return None + + return out + +def max_free_mem(server): + """Function to get max free mem on dom0. + + Returns an int containing the value in MB. + """ + + xm_ret, mfm = utils.run_remote(server, + "xm info | awk -F ': ' '/max_free_memory/ {print \$2}'") + if xm_ret != 0: + return None + + return int(mfm) + +def domain_list(server, virt="Xen"): + """Function to list all domains""" + if virt == "XenFV": + virt = "Xen" + + cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return None + names = [] + lines = out.split("\n") + for line in lines: + dinfo = line.split() + if len(dinfo) > 1: + names.append(dinfo[1]) + + return names + +def active_domain_list(server, virt="Xen"): + """Function to list all active domains""" + if virt == "XenFV": + virt = "Xen" + + cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return None + names = [] + lines = out.split("\n") + for line in lines: + dinfo = line.split() + if len(dinfo) > 1: + names.append(dinfo[1]) + + return names + +def bootloader(server, gtype = 0): + """ + Function to find the bootloader to be used. + It uses the following steps to determine the bootloader. + 1) The function checks if the machine is full virt or para virt. + 2) Checks if a Full virt guest option is set + NOTE : gtype = 1 for FV and gtype = 0 for PV + i) If yes, then verifies if the machine has the support to + create the full virt guest. If both options are true then + bootloader is set to 'hvmloader' + ii) Otherwise, a paravirt guest creation is requested. + a) Verfies the OS on which it is running is Red hat/Fedora/SLES. + b) sets the bootloader to pygrub for Red hat/Fedora + or domUloader.py for SLES. + 3) returns the bootloader. + """ + if fv_cap(server) and gtype == 1: + bootloader = "/usr/lib/xen/boot/hvmloader" + else: + cmd = "cat /etc/issue | grep -v ^$ | egrep 'Red Hat|Fedora'" + ret, out = utils.run_remote(server,cmd) + if ret != 0: + # For SLES + bootloader = "/usr/lib/xen/boot/domUloader.py" + else: + # For Red Hat or Fedora + bootloader = "/usr/bin/pygrub" + return bootloader + +def net_list(server, virt="Xen"): + """Function to list active network""" + names = [] + cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return names + lines = out.split("\n") + for line in lines: + virt_network = line.split() + if len(virt_network) >= 1 and virt_network[1] == "active": + names.append(virt_network[0]) + + return names + +def get_bridge_from_network_xml(network, server, virt="Xen"): + """Function returns bridge name for a given virtual network""" + + cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \ + (utils.virt2uri(virt), network) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return None + bridge = out.split("'") + if len(bridge) > 1: + return bridge[1] + +def network_by_bridge(bridge, server, virt="Xen"): + """Function returns virtual network for a given bridge""" + + networks = net_list(server, virt) + if len(networks) == 0: + return None + + for network in networks: + if bridge == get_bridge_from_network_xml(network, server, virt): + return network + + return None + +def virsh_version(server, virt="KVM"): + cmd = "virsh -c %s -v " % utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + if ret != 0: + return None + return out + +def diskpool_list(server, virt="KVM"): + """Function to list active DiskPool list""" + names = [] + cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return names + + lines = out.split("\n") + for line in lines: + disk_pool = line.split() + if len(disk_pool) >= 1 and disk_pool[1] == "active": + names.append(disk_pool[0]) + + return names + +def virsh_vcpuinfo(server, dom, virt="Xen"): + cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt), + dom) + ret, out = utils.run_remote(server, cmd) + if out.isdigit(): + return out + return None + +def get_hv_ver(server, virt="Xen"): + cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + if ret == 0: + return out + else: + return None + From fujimura.toshifumi at np.css.fujitsu.com Wed Oct 29 08:13:02 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Wed, 29 Oct 2008 17:13:02 +0900 Subject: [Libvirt-cim] [PATCH][TEST]#2 Add the revision and the changeset of Cimtest to the test report In-Reply-To: <490699FE.3070108@np.css.fujitsu.com> References: <490699FE.3070108@np.css.fujitsu.com> Message-ID: <49081B0E.9030501@np.css.fujitsu.com> # HG changeset patch # User Toshifumi Fujimura # Date 1225266738 -32400 # Node ID 743d9fcc2cc050f8a299bc29a598332baa754d7a # Parent 0f340004e1cd48f5ede60a68283a850ae60c9ebe [PATCH][TEST]#2 Add the revision and the changeset of Cimtest to the test report I modify two points. *strip out everything but the revision number and changeset number *move Cimtest strings to the get_env_data() diff -r 0f340004e1cd -r 743d9fcc2cc0 suites/libvirt-cim/lib/XenKvmLib/reporting.py --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Fri Oct 24 01:04:38 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Wed Oct 29 16:52:18 2008 +0900 @@ -32,6 +32,11 @@ return "Unknown" return out +def get_cimtest_version(): + revision = commands.getoutput("hg parents --template \"{rev}\" 2>/dev/null") + changeset = commands.getoutput("hg parents --template \"{node|short}\" 2>/dev/null") + return revision, changeset + def get_libvirt_ver(ip): libvirt_ver = "Unknown" hyp_ver = "Unknown" @@ -80,11 +85,14 @@ % (distro, kernel_ver, libvirt_ver, hyp_ver, cimom, cimom_ver) rev, changeset = get_provider_version(virt, ip) + cimtest_revision, cimtest_changeset = get_cimtest_version() lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \ (rev, changeset) + cimtest_ver = "Cimtest revision: %s\nCimtest changeset: %s\n" % \ + (cimtest_revision, cimtest_changeset) - return env + lc_ver + return env + lc_ver + cimtest_ver def parse_run_output(log_file): rvals = { 'PASS' : 0, -- Toshifumi Fujimura. From fujimura.toshifumi at np.css.fujitsu.com Wed Oct 29 08:23:44 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Wed, 29 Oct 2008 17:23:44 +0900 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 29 2008 In-Reply-To: References: Message-ID: <49081D90.4090107@np.css.fujitsu.com> Hi, HostSystem - 02_hostsystem_to_rasd.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL These erres also exist in my Pegasus's test report. Who knows what causes these errors? Toshifumi Fujimura. > > ================================================= > KVM on sfcb Test Run Summary for Oct 29 2008 > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 727 > Libvirt-cim changeset: 2df4433a1060 > ================================================= > FAIL : 5 > XFAIL : 2 > SKIP : 4 > PASS : 127 > ----------------- > Total : 138 > ================================================= > FAIL Test Summary: > ComputerSystemIndication - 01_created_indication.py: FAIL > HostSystem - 02_hostsystem_to_rasd.py: FAIL > RedirectionService - 01_enum_crs.py: FAIL > RedirectionService - 02_enum_crscap.py: FAIL > SettingsDefineCapabilities - 03_forward_errs.py: FAIL > > ================================================= > 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'Domain Operation Failed') > ERROR - Unable to 'Reboot' dom 'cs_test_domain' using > RequestedStateChange() > InvokeMethod(RequestStateChange): Domain Operation Failed > Bug:<00005> > -------------------------------------------------------------------- > ComputerSystem - 33_suspend_reboot.py: XFAIL > ERROR - Exception: (1, u'Domain Operation Failed') > ERROR - Unable to 'Reboot' dom 'test_domain' using > RequestedStateChange() > 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: PASS > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: FAIL > ERROR - Exception: not enough arguments for format string > Got indication: KVM_ComputerSystemCreatedIndication > ERROR - Received indication error: 256 > ERROR - Exception: not enough arguments for format string > Got indication: KVM_ComputerSystemCreatedIndication > ERROR - Received indication error: 256 > -------------------------------------------------------------------- > 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: FAIL > ERROR - KVM_SettingsDefineState returned 0 > KVM_DisplayController objects > Class not found > -------------------------------------------------------------------- > 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 > -------------------------------------------------------------------- > RedirectionService - 01_enum_crs.py: FAIL > ERROR - 'KVM_ConsoleRedirectionService' returned 0 > records, expected 1 > Class not found > *** Inconsistent provider registration for > Virt_ConsoleRedirectionService (2) > -------------------------------------------------------------------- > RedirectionService - 02_enum_crscap.py: FAIL > ERROR - 'KVM_ConsoleRedirectionServiceCapabilities' > returned 0 records, expected 1 > *** Inconsistent provider registration for > Virt_ConsoleRedirectionServiceCapabilities (2) > -------------------------------------------------------------------- > 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: FAIL > ERROR - Unexpected rc code 6 and description No such > instance (INVALID_InstID_KeyValue) - resource pool type mismatch > > ERROR - ------ FAILED: Invalid InstanceID Key > Value.------ > -------------------------------------------------------------------- > 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 > -------------------------------------------------------------------- > VirtualSystemManagementService - 14_define_sys_disk.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 > -------------------------------------------------------------------- > > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Toshifumi Fujimura. From kaitlin at linux.vnet.ibm.com Wed Oct 29 16:10:23 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 09:10:23 -0700 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 29 2008 In-Reply-To: <49081D90.4090107@np.css.fujitsu.com> References: <49081D90.4090107@np.css.fujitsu.com> Message-ID: <49088AEF.10509@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > Hi, > HostSystem - 02_hostsystem_to_rasd.py: FAIL This is failing because the providers have been updated to include support for a new device: DisplayController. It looks like the test suite is unable to find this class. Daisy - did you run "sudo make preinstall" when you updated the providers? > SettingsDefineCapabilities - 03_forward_errs.py: FAIL > > These erres also exist in my Pegasus's test report. > Who knows what causes these errors? > > Toshifumi Fujimura. >> >> ================================================= >> KVM on sfcb Test Run Summary for Oct 29 2008 >> ================================================= >> Distro: Fedora release 9.90.1 (Rawhide) >> Kernel: 2.6.27-0.323.rc6.fc10.x86_64 >> libvirt: 0.4.5 >> Hypervisor: QEMU 0.9.1 >> CIMOM: sfcb sfcbd 1.3.3preview >> Libvirt-cim revision: 727 >> Libvirt-cim changeset: 2df4433a1060 >> ================================================= >> FAIL : 5 >> XFAIL : 2 >> SKIP : 4 >> PASS : 127 >> ----------------- >> Total : 138 >> ================================================= >> FAIL Test Summary: >> ComputerSystemIndication - 01_created_indication.py: FAIL >> HostSystem - 02_hostsystem_to_rasd.py: FAIL >> RedirectionService - 01_enum_crs.py: FAIL >> RedirectionService - 02_enum_crscap.py: FAIL >> SettingsDefineCapabilities - 03_forward_errs.py: FAIL >> >> ================================================= >> -------------------------------------------------------------------- >> HostSystem - 02_hostsystem_to_rasd.py: FAIL >> ERROR - KVM_SettingsDefineState returned 0 >> KVM_DisplayController objects >> Class not found >> -------------------------------------------------------------------- >> SettingsDefineCapabilities - 03_forward_errs.py: FAIL >> ERROR - Unexpected rc code 6 and description No such >> instance (INVALID_InstID_KeyValue) - resource pool type mismatch >> >> ERROR - ------ FAILED: Invalid InstanceID Key >> Value.------ >> -------------------------------------------------------------------- The test is expecting the provider to return the following error: "Unable to determine resource type" - the provider is returning: "No such instance (INVALID_InstID_KeyValue) - resource pool type mismatch". This is due to changeset 721 which changes the behavior of the SettingsDefineCapabilities provider. This test will need to be updated to reflect the new error message. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Oct 29 19:08:06 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 12:08:06 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from live.py to common_util.py and update related tc In-Reply-To: <5b2b14ed9401ac6398b3.1225259906@elm3b197.beaverton.ibm.com> References: <5b2b14ed9401ac6398b3.1225259906@elm3b197.beaverton.ibm.com> Message-ID: <4908B496.4080508@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1225259900 25200 > # Node ID 5b2b14ed9401ac6398b3cdbefa290553570ff195 > # Parent 0f340004e1cd48f5ede60a68283a850ae60c9ebe > [TEST] Move some functions from live.py to common_util.py and update related tc > > On the next, I will delete the removed functions in live.py and update other tests > > Signed-off-by: Guolian Yun > This patch didn't apply cleanly for me. Can you rebase on clean sources? Also, common_util.py is growing quite large. Can we put these in a separate module? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Oct 29 19:21:18 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 12:21:18 -0700 Subject: [Libvirt-cim] [PATCH][TEST]#2 Add the revision and the changeset of Cimtest to the test report In-Reply-To: <49081B0E.9030501@np.css.fujitsu.com> References: <490699FE.3070108@np.css.fujitsu.com> <49081B0E.9030501@np.css.fujitsu.com> Message-ID: <4908B7AE.1040901@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > # HG changeset patch > # User Toshifumi Fujimura > # Date 1225266738 -32400 > # Node ID 743d9fcc2cc050f8a299bc29a598332baa754d7a > # Parent 0f340004e1cd48f5ede60a68283a850ae60c9ebe > [PATCH][TEST]#2 Add the revision and the changeset of Cimtest to the > test report > I modify two points. > *strip out everything but the revision number and changeset number > *move Cimtest strings to the get_env_data() You'll need to include your DCO here. > > diff -r 0f340004e1cd -r 743d9fcc2cc0 > suites/libvirt-cim/lib/XenKvmLib/reporting.py > --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Fri Oct 24 > 01:04:38 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Wed Oct 29 > 16:52:18 2008 +0900 > @@ -32,6 +32,11 @@ > return "Unknown" > return out > > +def get_cimtest_version(): > + revision = commands.getoutput("hg parents --template \"{rev}\" > 2>/dev/null") > + changeset = commands.getoutput("hg parents --template > \"{node|short}\" 2>/dev/null") Can you split this line into two lines - it is longer than 80 characters. Also, I'm having trouble applying this patch. Can you send the next version as an attachment? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Wed Oct 29 19:33:39 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 29 Oct 2008 12:33:39 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] (#3) Add get_vnc_sessions() to determine all of VNC ports available or in use In-Reply-To: <63aa217c697828d29e5e.1225232323@localhost.localdomain> (Kaitlin Rupert's message of "Tue, 28 Oct 2008 15:18:43 -0700") References: <63aa217c697828d29e5e.1225232323@localhost.localdomain> Message-ID: <87d4hj5h7w.fsf@caffeine.danplanet.com> KR> + port_list.list = malloc(count * sizeof(struct vnc_port *)); KR> + if (!port_list.list) { Our CodingStyle says that this should be: if (port_list.list == NULL) KR> + port_list.list[i] = malloc(sizeof(struct vnc_port)); KR> + if (!port_list.list[i]) { Here too. KR> + port_list.list[port_list.cur]->name = strdup(dominfo->name); Your free() call later will handle this, but will other code expect 'name' to be non-NULL in the case of an allocation failure? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Wed Oct 29 21:25:26 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 14:25:26 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] #4 Update KVMRedirectionSAP to return avail sessions Message-ID: This updated uses the listening / established port entries in /proc/net/tcp to determine whether a guest has any available / enabled VNC sessions. Updates from 1 to 2: -Removed 2 patches of unecessary junk. From kaitlin at linux.vnet.ibm.com Wed Oct 29 21:25:28 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 14:25:28 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] (#3) Have get_console_sap_by_name() use Name attribute to determine session In-Reply-To: Message-ID: <739113a661c7a342e67b.1225315528@localhost.localdomain> # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224552270 25200 # Node ID 739113a661c7a342e67bd7f19ce8c744e283bbff # Parent 5a55c724920bbe6c3df77c9465a150ac6423f946 (#3) Have get_console_sap_by_name() use Name attribute to determine session Updates from 2 to 3: -Check malloc() and strdup() returns -Remove unneeded NULL initialization Updates from 1 to 2: -Removed function that parses the Name attribute Signed-off-by: Kaitlin Rupert diff -r 5a55c724920b -r 739113a661c7 src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 @@ -350,7 +350,7 @@ CMPIStatus get_console_sap_by_name(const CMPIBroker *broker, const CMPIObjectPath *ref, - const char *name, + const char *sys, CMPIInstance **_inst) { virConnectPtr conn; @@ -358,6 +358,10 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; struct domain *dominfo = NULL; + struct vnc_port *port = NULL; + const char *name = NULL; + int lport; + int rport; conn = connect_by_classname(broker, CLASSNAME(ref), &s); if (conn == NULL) { @@ -367,12 +371,12 @@ goto out; } - dom = virDomainLookupByName(conn, name); + dom = virDomainLookupByName(conn, sys); if (dom == NULL) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, "No such instance (%s)", - name); + sys); goto out; } @@ -380,9 +384,43 @@ cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "No console device for this guest"); + goto out; } - inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); + if (cu_get_str_path(ref, "Name", &name) != CMPI_RC_OK) { + cu_statusf(broker, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (System)"); + goto out; + } + + if (sscanf(name, "%d:%d", &lport, &rport) != 2) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to guest's console port"); + goto out; + } + + port = malloc(sizeof(struct vnc_port)); + if (port == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate guest port struct"); + goto out; + } + + port->name = strdup(dominfo->name); + if (port->name == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate string"); + goto out; + } + + port->port = lport; + port->remote_port = rport; + + inst = get_console_sap(_BROKER, ref, conn, port, &s); virDomainFree(dom); @@ -393,6 +431,8 @@ out: virConnectClose(conn); + free(port->name); + free(port); return s; } @@ -405,10 +445,10 @@ CMPIInstance *inst = NULL; const char *sys = NULL; - if (cu_get_str_path(reference, "System", &sys) != CMPI_RC_OK) { + if (cu_get_str_path(reference, "SystemName", &sys) != CMPI_RC_OK) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, - "No such instance (System)"); + "No such instance (SystemName)"); goto out; } From kaitlin at linux.vnet.ibm.com Wed Oct 29 21:25:27 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 14:25:27 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] (#4) Add get_vnc_sessions() to determine all of VNC ports available or in use In-Reply-To: Message-ID: <5a55c724920bbe6c3df7.1225315527@localhost.localdomain> # HG changeset patch # User kaitlin at elm3b43.beaverton.ibm.com # Date 1224552270 25200 # Node ID 5a55c724920bbe6c3df77c9465a150ac6423f946 # Parent 2df4433a10600aee5a8ed0aae0c1ded96a3e4d0f (#4) Add get_vnc_sessions() to determine all of VNC ports available or in use. Updated from 3 to 4: -Fix style issues -Add strdup allocation check Updates from 2 to 3: -Fix whitespace issues -Do entire vnc_port struct allocation at once Updates from 1 to 2: -Remove functions to convert port number to a string -Instead of using a hash table to hold the ports listed in /proc/net/tcp, use a list to hold the host/port values. Signed-off-by: Kaitlin Rupert diff -r 2df4433a1060 -r 5a55c724920b src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Tue Oct 28 08:27:45 2008 -0700 +++ b/src/Virt_KVMRedirectionSAP.c Mon Oct 20 18:24:30 2008 -0700 @@ -39,11 +39,25 @@ #include "Virt_KVMRedirectionSAP.h" +#define PROC_TCP "/proc/net/tcp" + const static CMPIBroker *_BROKER; + +struct vnc_port { + char *name; + int port; + int remote_port; +}; + +struct vnc_ports { + struct vnc_port **list; + unsigned int max; + unsigned int cur; +}; static int inst_from_dom(const CMPIBroker *broker, const CMPIObjectPath *ref, - struct domain *dominfo, + struct vnc_port *port, CMPIInstance *inst) { char *sccn = NULL; @@ -52,8 +66,7 @@ uint16_t prop_val; int ret = 1; - if (asprintf(&id, "%s:%s", dominfo->name, - dominfo->dev_graphics->dev.graphics.type) == -1) { + if (asprintf(&id, "%d:%d", port->port, port->remote_port) == -1) { CU_DEBUG("Unable to format name"); ret = 0; goto out; @@ -66,7 +79,7 @@ (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "SystemName", - (CMPIValue *)dominfo->name, CMPI_chars); + (CMPIValue *)port->name, CMPI_chars); CMSetProperty(inst, "SystemCreationClassName", (CMPIValue *)sccn, CMPI_chars); @@ -74,19 +87,16 @@ CMSetProperty(inst, "ElementName", (CMPIValue *)id, CMPI_chars); - if (STREQ(dominfo->dev_graphics->dev.graphics.type, "vnc")) - prop_val = (uint16_t)CIM_CRS_VNC; - else - prop_val = (uint16_t)CIM_CRS_OTHER; - + prop_val = (uint16_t)CIM_CRS_VNC; CMSetProperty(inst, "KVMProtocol", (CMPIValue *)&prop_val, CMPI_uint16); - /* Need to replace this with a check that determines whether - the console session is enabled (in use) or available (not actively - in use). - */ - prop_val = (uint16_t)CIM_CRS_ENABLED_STATE; + if (port->remote_port < 0) + prop_val = (uint16_t)CIM_SAP_INACTIVE_STATE; + else if (port->remote_port == 0) + prop_val = (uint16_t)CIM_SAP_AVAILABLE_STATE; + else + prop_val = (uint16_t)CIM_SAP_ACTIVE_STATE; CMSetProperty(inst, "EnabledState", (CMPIValue *)&prop_val, CMPI_uint16); @@ -101,7 +111,7 @@ static CMPIInstance *get_console_sap(const CMPIBroker *broker, const CMPIObjectPath *reference, virConnectPtr conn, - struct domain *dominfo, + struct vnc_port *port, CMPIStatus *s) { @@ -119,7 +129,7 @@ goto out; } - if (inst_from_dom(broker, reference, dominfo, inst) != 1) { + if (inst_from_dom(broker, reference, port, inst) != 1) { cu_statusf(broker, s, CMPI_RC_ERR_FAILED, "Unable to get instance from domain"); @@ -127,6 +137,84 @@ out: return inst; +} + +static CMPIStatus get_vnc_sessions(const CMPIObjectPath *ref, + virConnectPtr conn, + struct vnc_ports ports, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst; + const char *path = PROC_TCP; + unsigned int lport = 0; + unsigned int rport = 0; + FILE *tcp_info; + char *line = NULL; + size_t len = 0; + int val; + int ret; + int i; + + tcp_info = fopen(path, "r"); + if (tcp_info == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to open %s: %m", tcp_info); + goto out; + } + + if (getline(&line, &len, tcp_info) == -1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to read from %s", tcp_info); + goto out; + } + + while (getline(&line, &len, tcp_info) > 0) { + ret = sscanf(line, "%d: %*[^:]:%X %*[^:]:%X", &val, &lport, + &rport); + if (ret != 3) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to determine active sessions"); + goto out; + } + + for (i = 0; i < ports.max; i++) { + if (lport != ports.list[i]->port) + continue; + + ports.list[i]->remote_port = rport; + inst = get_console_sap(_BROKER, + ref, + conn, + ports.list[i], + &s); + if ((s.rc != CMPI_RC_OK) || (inst == NULL)) + goto out; + + inst_list_add(list, inst); + } + } + + /* Handle any guests that were missed. These guest don't have active + or enabled sessions. */ + for (i = 0; i < ports.max; i++) { + if (ports.list[i]->remote_port != -1) + continue; + + inst = get_console_sap(_BROKER, ref, conn, ports.list[i], &s); + if ((s.rc != CMPI_RC_OK) || (inst == NULL)) + goto out; + + inst_list_add(list, inst); + } + + out: + tcp_info = fopen(path, "r"); + fclose(tcp_info); + return s; } static bool check_graphics(virDomainPtr dom, @@ -157,7 +245,10 @@ virDomainPtr *domain_list; struct domain *dominfo = NULL; struct inst_list list; + struct vnc_ports port_list; int count; + int lport; + int ret; int i; conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); @@ -165,6 +256,10 @@ return s; inst_list_init(&list); + + port_list.list = NULL; + port_list.max = 0; + port_list.cur = 0; count = get_domain_list(conn, &domain_list); if (count < 0) { @@ -175,23 +270,64 @@ } else if (count == 0) goto out; + port_list.list = malloc(count * sizeof(struct vnc_port *)); + if (port_list.list == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate guest port list"); + goto out; + + } + for (i = 0; i < count; i++) { - CMPIInstance *inst = NULL; + port_list.list[i] = malloc(sizeof(struct vnc_port)); + if (port_list.list[i] == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate guest port list"); + goto out; + } + } + for (i = 0; i < count; i++) { if (!check_graphics(domain_list[i], &dominfo)) { virDomainFree(domain_list[i]); cleanup_dominfo(&dominfo); continue; } - inst = get_console_sap(_BROKER, ref, conn, dominfo, &s); + ret = sscanf(dominfo->dev_graphics->dev.graphics.port, + "%d", + &lport); + if (ret != 1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to guest's console port"); + goto out; + } + + port_list.list[port_list.cur]->name = strdup(dominfo->name); + if (port_list.list[port_list.cur]->name == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to allocate string"); + goto out; + } + + port_list.list[port_list.cur]->port = lport; + port_list.list[port_list.cur]->remote_port = -1; + port_list.cur++; virDomainFree(domain_list[i]); cleanup_dominfo(&dominfo); + } - if (inst != NULL) - inst_list_add(&list, inst); - } + port_list.max = port_list.cur; + port_list.cur = 0; + + s = get_vnc_sessions(ref, conn, port_list, &list); + if (s.rc != CMPI_RC_OK) + goto out; if (names_only) cu_return_instance_names(results, &list); @@ -201,6 +337,13 @@ out: free(domain_list); inst_list_free(&list); + + for (i = 0; i < count; i++) { + free(port_list.list[i]->name); + free(port_list.list[i]); + port_list.list[i] = NULL; + } + free(port_list.list); return s; } diff -r 2df4433a1060 -r 5a55c724920b src/svpc_types.h --- a/src/svpc_types.h Tue Oct 28 08:27:45 2008 -0700 +++ b/src/svpc_types.h Mon Oct 20 18:24:30 2008 -0700 @@ -60,6 +60,10 @@ #define CIM_CRS_OTHER 1 #define CIM_CRS_VNC 4 +#define CIM_SAP_ACTIVE_STATE 2 +#define CIM_SAP_INACTIVE_STATE 3 +#define CIM_SAP_AVAILABLE_STATE 6 + #include #include From kaitlin at linux.vnet.ibm.com Wed Oct 29 21:56:17 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 14:56:17 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Add input device support to device_parsing and Virt_Device In-Reply-To: <87skqg61qu.fsf@caffeine.danplanet.com> References: <2a6913abb79a442662cf.1225117882@localhost.localdomain> <87skqg61qu.fsf@caffeine.danplanet.com> Message-ID: <4908DC01.20604@linux.vnet.ibm.com> Dan Smith wrote: > KR> @@ -115,6 +121,7 @@ > > KR> struct virt_device *dev_graphics; > KR> struct virt_device *dev_emu; > KR> + struct virt_device *dev_input; > > Are you going to add a count as well? I think that by default > virt-manager configures guests with a PS2 mouse and a USB tablet. Not > sure if that's worth keeping track of, but we definitely want to > decide and make sure we don't ever create a list of the above that > won't get fully free()'d if we just expect it to be a single device. > Yep, this makes sense. I'll follow up with this change. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Wed Oct 29 22:24:19 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 29 Oct 2008 15:24:19 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Add input device. Message-ID: From yunguol at cn.ibm.com Wed Oct 29 22:24:21 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 29 Oct 2008 15:24:21 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] (#2) Add input device support to device_parsing and Virt_Device In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1224692656 25200 # Node ID d1220718e0223656c8e4fb2957c4167a16f0fb6f # Parent e13fa0c9fc7a654302632e1663a6325599d28710 (#2) Add input device support to device_parsing and Virt_Device. Updates: -Add a count value for input devcies Signed-off-by: Kaitlin Rupert diff -r e13fa0c9fc7a -r d1220718e022 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.c Wed Oct 22 09:24:16 2008 -0700 @@ -43,6 +43,7 @@ #define EMU_XPATH (xmlChar *)"/domain/devices/emulator" #define MEM_XPATH (xmlChar *)"/domain/memory | /domain/currentMemory" #define GRAPHICS_XPATH (xmlChar *)"/domain/devices/graphics" +#define INPUT_XPATH (xmlChar *)"/domain/devices/input" #define DEFAULT_BRIDGE "xenbr0" #define DEFAULT_NETWORK "default" @@ -77,6 +78,12 @@ free(dev->port); } +static void cleanup_input_device(struct input_device *dev) +{ + free(dev->type); + free(dev->bus); +} + void cleanup_virt_device(struct virt_device *dev) { if (dev == NULL) @@ -90,6 +97,8 @@ cleanup_emu_device(&dev->dev.emu); else if (dev->type == CIM_RES_TYPE_GRAPHICS) cleanup_graphics_device(&dev->dev.graphics); + else if (dev->type == CIM_RES_TYPE_INPUT) + cleanup_input_device(&dev->dev.input); free(dev->id); @@ -455,6 +464,36 @@ return 0; } +static int parse_input_device(xmlNode *node, struct virt_device **vdevs) +{ + struct virt_device *vdev = NULL; + struct input_device *idev = NULL; + + vdev = calloc(1, sizeof(*vdev)); + if (vdev == NULL) + goto err; + + idev = &(vdev->dev.input); + + idev->type = get_attr_value(node, "type"); + idev->bus = get_attr_value(node, "bus"); + + if ((idev->type == NULL) || (idev->bus == NULL)) + goto err; + + vdev->type = CIM_RES_TYPE_INPUT; + vdev->id = strdup("input"); + + *vdevs = vdev; + + return 1; + err: + cleanup_input_device(idev); + free(vdev); + + return 0; +} + static bool resize_devlist(struct virt_device **list, int newsize) { struct virt_device *_list; @@ -490,6 +529,8 @@ do_real_parse = parse_mem_device; else if (type == CIM_RES_TYPE_GRAPHICS) do_real_parse = parse_graphics_device; + else if (type == CIM_RES_TYPE_INPUT) + do_real_parse = parse_input_device; else goto out; @@ -558,6 +599,8 @@ xpathstr = MEM_XPATH; else if (type == CIM_RES_TYPE_GRAPHICS) xpathstr = GRAPHICS_XPATH; + else if (type == CIM_RES_TYPE_INPUT) + xpathstr = INPUT_XPATH; else goto err1; @@ -622,6 +665,9 @@ } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { DUP_FIELD(dev, _dev, dev.graphics.type); DUP_FIELD(dev, _dev, dev.graphics.port); + } else if (dev->type == CIM_RES_TYPE_INPUT) { + DUP_FIELD(dev, _dev, dev.input.type); + DUP_FIELD(dev, _dev, dev.input.bus); } return dev; @@ -876,6 +922,7 @@ parse_devices(xml, &(*dominfo)->dev_emu, CIM_RES_TYPE_EMU); parse_devices(xml, &(*dominfo)->dev_graphics, CIM_RES_TYPE_GRAPHICS); + parse_devices(xml, &(*dominfo)->dev_input, CIM_RES_TYPE_INPUT); (*dominfo)->dev_mem_ct = _get_mem_device(xml, &(*dominfo)->dev_mem); (*dominfo)->dev_net_ct = parse_devices(xml, diff -r e13fa0c9fc7a -r d1220718e022 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.h Wed Oct 22 09:24:16 2008 -0700 @@ -64,6 +64,11 @@ char *port; }; +struct input_device { + char *type; + char *bus; +}; + struct virt_device { uint16_t type; union { @@ -73,6 +78,7 @@ struct vcpu_device vcpu; struct emu_device emu; struct graphics_device graphics; + struct input_device input; } dev; char *id; }; @@ -115,6 +121,9 @@ struct virt_device *dev_graphics; struct virt_device *dev_emu; + + struct virt_device *dev_input; + int dev_input_ct; struct virt_device *dev_mem; int dev_mem_ct; diff -r e13fa0c9fc7a -r d1220718e022 src/Virt_Device.c --- a/src/Virt_Device.c Wed Oct 22 09:24:16 2008 -0700 +++ b/src/Virt_Device.c Wed Oct 22 09:24:16 2008 -0700 @@ -39,6 +39,9 @@ #define CIM_NET_UNKNOWN 0 #define CIM_NET_ETHERNET 2 + +#define CIM_INPUT_UNKNOWN 2 +#define CIM_INPUT_MOUSE 3 const static CMPIBroker *_BROKER; const static uint64_t XEN_MEM_BLOCKSIZE = 4096; @@ -214,6 +217,42 @@ return inst; } +static int input_set_attr(CMPIInstance *instance, + struct input_device *dev) +{ + uint16_t cim_type; + + if (STREQC(dev->type, "mouse")) + cim_type = CIM_INPUT_MOUSE; + else + cim_type = CIM_INPUT_UNKNOWN; + + CMSetProperty(instance, "PointingType", + (CMPIValue *)&cim_type, CMPI_uint16); + + return 1; +} + +static CMPIInstance *input_instance(const CMPIBroker *broker, + struct input_device *dev, + const virDomainPtr dom, + const char *ns) +{ + CMPIInstance *inst; + virConnectPtr conn; + + conn = virDomainGetConnect(dom); + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "PointingDevice", + ns); + + if (!input_set_attr(inst, dev)) + return NULL; + + return inst; +} + static int device_set_devid(CMPIInstance *instance, struct virt_device *dev, const virDomainPtr dom) @@ -358,6 +397,11 @@ &dev->dev.graphics, dom, ns); + else if (dev->type == CIM_RES_TYPE_INPUT) + instance = input_instance(broker, + &dev->dev.input, + dom, + ns); else return false; @@ -392,6 +436,8 @@ return CIM_RES_TYPE_PROC; else if (strstr(classname, "DisplayController")) return CIM_RES_TYPE_GRAPHICS; + else if (strstr(classname, "PointingDevice")) + return CIM_RES_TYPE_INPUT; else return CIM_RES_TYPE_UNKNOWN; } From yunguol at cn.ibm.com Wed Oct 29 22:24:20 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 29 Oct 2008 15:24:20 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add PointingDevice schema and input device type In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1224692656 25200 # Node ID e13fa0c9fc7a654302632e1663a6325599d28710 # Parent 43db70ed19ae5323b7521f21c582b0e7ccf2403c Add PointingDevice schema and input device type. PointingDevice will represent the input device. Using resource type 13 ("I/O Device") as the device type. Signed-off-by: Kaitlin Rupert diff -r 43db70ed19ae -r e13fa0c9fc7a Makefile.am --- a/Makefile.am Mon Oct 20 18:24:30 2008 -0700 +++ b/Makefile.am Wed Oct 22 09:24:16 2008 -0700 @@ -47,7 +47,8 @@ schema/ConsoleRedirectionServiceCapabilities.mof \ schema/ServiceAffectsElement.mof \ schema/KVMRedirectionSAP.mof \ - schema/DisplayController.mof + schema/DisplayController.mof \ + schema/PointingDevice.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -105,7 +106,8 @@ schema/ConsoleRedirectionServiceCapabilities.registration \ schema/ServiceAffectsElement.registration \ schema/KVMRedirectionSAP.registration \ - schema/DisplayController.registration + schema/DisplayController.registration \ + schema/PointingDevice.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 43db70ed19ae -r e13fa0c9fc7a schema/PointingDevice.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/PointingDevice.mof Wed Oct 22 09:24:16 2008 -0700 @@ -0,0 +1,17 @@ +// Copyright IBM Corp. 2007 + +[ Provider("cmpi::Virt_Device") ] +class Xen_PointingDevice : CIM_PointingDevice +{ +}; + +[ Provider("cmpi::Virt_Device") ] +class KVM_PointingDevice : CIM_PointingDevice +{ +}; + +[ Provider("cmpi::Virt_Device") ] +class LXC_PointingDevice : CIM_PointingDevice +{ +}; + diff -r 43db70ed19ae -r e13fa0c9fc7a schema/PointingDevice.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/PointingDevice.registration Wed Oct 22 09:24:16 2008 -0700 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2008 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_PointingDevice root/virt Virt_Device Virt_Device instance +KVM_PointingDevice root/virt Virt_Device Virt_Device instance +LXC_PointingDevice root/virt Virt_Device Virt_Device instance diff -r 43db70ed19ae -r e13fa0c9fc7a src/svpc_types.h --- a/src/svpc_types.h Mon Oct 20 18:24:30 2008 -0700 +++ b/src/svpc_types.h Wed Oct 22 09:24:16 2008 -0700 @@ -29,15 +29,17 @@ #define CIM_RES_TYPE_DISK 17 #define CIM_RES_TYPE_EMU 1 #define CIM_RES_TYPE_GRAPHICS 24 +#define CIM_RES_TYPE_INPUT 13 #define CIM_RES_TYPE_UNKNOWN 1000 -#define CIM_RES_TYPE_COUNT 5 +#define CIM_RES_TYPE_COUNT 6 const static int cim_res_types[CIM_RES_TYPE_COUNT] = {CIM_RES_TYPE_NET, CIM_RES_TYPE_DISK, CIM_RES_TYPE_MEM, CIM_RES_TYPE_PROC, CIM_RES_TYPE_GRAPHICS, + CIM_RES_TYPE_INPUT, }; #define CIM_VSSD_RECOVERY_NONE 2 From kaitlin at linux.vnet.ibm.com Wed Oct 29 22:12:43 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 15:12:43 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Add input device. In-Reply-To: References: Message-ID: <4908DFDB.2080605@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: Sorry - sent from a different machine than normal. It was set up with someone else's info. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Oct 29 22:15:10 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 15:15:10 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] #2 Add input device Message-ID: From kaitlin at linux.vnet.ibm.com Wed Oct 29 22:15:12 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 15:15:12 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] (#2) Add input device support to device_parsing and Virt_Device In-Reply-To: Message-ID: <468f398f95b0d521c811.1225318512@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224692656 25200 # Node ID 468f398f95b0d521c811f91143b1e5d8809c4a95 # Parent e53b108e82fc54142208dd48a6edd07c2eae0a68 (#2) Add input device support to device_parsing and Virt_Device. Updates: -Add a count value for input devcies Signed-off-by: Kaitlin Rupert diff -r e53b108e82fc -r 468f398f95b0 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.c Wed Oct 22 09:24:16 2008 -0700 @@ -43,6 +43,7 @@ #define EMU_XPATH (xmlChar *)"/domain/devices/emulator" #define MEM_XPATH (xmlChar *)"/domain/memory | /domain/currentMemory" #define GRAPHICS_XPATH (xmlChar *)"/domain/devices/graphics" +#define INPUT_XPATH (xmlChar *)"/domain/devices/input" #define DEFAULT_BRIDGE "xenbr0" #define DEFAULT_NETWORK "default" @@ -77,6 +78,12 @@ free(dev->port); } +static void cleanup_input_device(struct input_device *dev) +{ + free(dev->type); + free(dev->bus); +} + void cleanup_virt_device(struct virt_device *dev) { if (dev == NULL) @@ -90,6 +97,8 @@ cleanup_emu_device(&dev->dev.emu); else if (dev->type == CIM_RES_TYPE_GRAPHICS) cleanup_graphics_device(&dev->dev.graphics); + else if (dev->type == CIM_RES_TYPE_INPUT) + cleanup_input_device(&dev->dev.input); free(dev->id); @@ -455,6 +464,36 @@ return 0; } +static int parse_input_device(xmlNode *node, struct virt_device **vdevs) +{ + struct virt_device *vdev = NULL; + struct input_device *idev = NULL; + + vdev = calloc(1, sizeof(*vdev)); + if (vdev == NULL) + goto err; + + idev = &(vdev->dev.input); + + idev->type = get_attr_value(node, "type"); + idev->bus = get_attr_value(node, "bus"); + + if ((idev->type == NULL) || (idev->bus == NULL)) + goto err; + + vdev->type = CIM_RES_TYPE_INPUT; + vdev->id = strdup("input"); + + *vdevs = vdev; + + return 1; + err: + cleanup_input_device(idev); + free(vdev); + + return 0; +} + static bool resize_devlist(struct virt_device **list, int newsize) { struct virt_device *_list; @@ -490,6 +529,8 @@ do_real_parse = parse_mem_device; else if (type == CIM_RES_TYPE_GRAPHICS) do_real_parse = parse_graphics_device; + else if (type == CIM_RES_TYPE_INPUT) + do_real_parse = parse_input_device; else goto out; @@ -558,6 +599,8 @@ xpathstr = MEM_XPATH; else if (type == CIM_RES_TYPE_GRAPHICS) xpathstr = GRAPHICS_XPATH; + else if (type == CIM_RES_TYPE_INPUT) + xpathstr = INPUT_XPATH; else goto err1; @@ -622,6 +665,9 @@ } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { DUP_FIELD(dev, _dev, dev.graphics.type); DUP_FIELD(dev, _dev, dev.graphics.port); + } else if (dev->type == CIM_RES_TYPE_INPUT) { + DUP_FIELD(dev, _dev, dev.input.type); + DUP_FIELD(dev, _dev, dev.input.bus); } return dev; @@ -876,6 +922,7 @@ parse_devices(xml, &(*dominfo)->dev_emu, CIM_RES_TYPE_EMU); parse_devices(xml, &(*dominfo)->dev_graphics, CIM_RES_TYPE_GRAPHICS); + parse_devices(xml, &(*dominfo)->dev_input, CIM_RES_TYPE_INPUT); (*dominfo)->dev_mem_ct = _get_mem_device(xml, &(*dominfo)->dev_mem); (*dominfo)->dev_net_ct = parse_devices(xml, diff -r e53b108e82fc -r 468f398f95b0 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.h Wed Oct 22 09:24:16 2008 -0700 @@ -64,6 +64,11 @@ char *port; }; +struct input_device { + char *type; + char *bus; +}; + struct virt_device { uint16_t type; union { @@ -73,6 +78,7 @@ struct vcpu_device vcpu; struct emu_device emu; struct graphics_device graphics; + struct input_device input; } dev; char *id; }; @@ -115,6 +121,9 @@ struct virt_device *dev_graphics; struct virt_device *dev_emu; + + struct virt_device *dev_input; + int dev_input_ct; struct virt_device *dev_mem; int dev_mem_ct; diff -r e53b108e82fc -r 468f398f95b0 src/Virt_Device.c --- a/src/Virt_Device.c Wed Oct 22 09:24:16 2008 -0700 +++ b/src/Virt_Device.c Wed Oct 22 09:24:16 2008 -0700 @@ -39,6 +39,9 @@ #define CIM_NET_UNKNOWN 0 #define CIM_NET_ETHERNET 2 + +#define CIM_INPUT_UNKNOWN 2 +#define CIM_INPUT_MOUSE 3 const static CMPIBroker *_BROKER; const static uint64_t XEN_MEM_BLOCKSIZE = 4096; @@ -214,6 +217,42 @@ return inst; } +static int input_set_attr(CMPIInstance *instance, + struct input_device *dev) +{ + uint16_t cim_type; + + if (STREQC(dev->type, "mouse")) + cim_type = CIM_INPUT_MOUSE; + else + cim_type = CIM_INPUT_UNKNOWN; + + CMSetProperty(instance, "PointingType", + (CMPIValue *)&cim_type, CMPI_uint16); + + return 1; +} + +static CMPIInstance *input_instance(const CMPIBroker *broker, + struct input_device *dev, + const virDomainPtr dom, + const char *ns) +{ + CMPIInstance *inst; + virConnectPtr conn; + + conn = virDomainGetConnect(dom); + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "PointingDevice", + ns); + + if (!input_set_attr(inst, dev)) + return NULL; + + return inst; +} + static int device_set_devid(CMPIInstance *instance, struct virt_device *dev, const virDomainPtr dom) @@ -358,6 +397,11 @@ &dev->dev.graphics, dom, ns); + else if (dev->type == CIM_RES_TYPE_INPUT) + instance = input_instance(broker, + &dev->dev.input, + dom, + ns); else return false; @@ -392,6 +436,8 @@ return CIM_RES_TYPE_PROC; else if (strstr(classname, "DisplayController")) return CIM_RES_TYPE_GRAPHICS; + else if (strstr(classname, "PointingDevice")) + return CIM_RES_TYPE_INPUT; else return CIM_RES_TYPE_UNKNOWN; } From kaitlin at linux.vnet.ibm.com Wed Oct 29 22:15:11 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 15:15:11 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add PointingDevice schema and input device type In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1224692656 25200 # Node ID e53b108e82fc54142208dd48a6edd07c2eae0a68 # Parent 739113a661c7a342e67bd7f19ce8c744e283bbff Add PointingDevice schema and input device type. PointingDevice will represent the input device. Using resource type 13 ("I/O Device") as the device type. Signed-off-by: Kaitlin Rupert diff -r 739113a661c7 -r e53b108e82fc Makefile.am --- a/Makefile.am Mon Oct 20 18:24:30 2008 -0700 +++ b/Makefile.am Wed Oct 22 09:24:16 2008 -0700 @@ -47,7 +47,8 @@ schema/ConsoleRedirectionServiceCapabilities.mof \ schema/ServiceAffectsElement.mof \ schema/KVMRedirectionSAP.mof \ - schema/DisplayController.mof + schema/DisplayController.mof \ + schema/PointingDevice.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -105,7 +106,8 @@ schema/ConsoleRedirectionServiceCapabilities.registration \ schema/ServiceAffectsElement.registration \ schema/KVMRedirectionSAP.registration \ - schema/DisplayController.registration + schema/DisplayController.registration \ + schema/PointingDevice.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 739113a661c7 -r e53b108e82fc schema/PointingDevice.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/PointingDevice.mof Wed Oct 22 09:24:16 2008 -0700 @@ -0,0 +1,17 @@ +// Copyright IBM Corp. 2007 + +[ Provider("cmpi::Virt_Device") ] +class Xen_PointingDevice : CIM_PointingDevice +{ +}; + +[ Provider("cmpi::Virt_Device") ] +class KVM_PointingDevice : CIM_PointingDevice +{ +}; + +[ Provider("cmpi::Virt_Device") ] +class LXC_PointingDevice : CIM_PointingDevice +{ +}; + diff -r 739113a661c7 -r e53b108e82fc schema/PointingDevice.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/PointingDevice.registration Wed Oct 22 09:24:16 2008 -0700 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2008 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_PointingDevice root/virt Virt_Device Virt_Device instance +KVM_PointingDevice root/virt Virt_Device Virt_Device instance +LXC_PointingDevice root/virt Virt_Device Virt_Device instance diff -r 739113a661c7 -r e53b108e82fc src/svpc_types.h --- a/src/svpc_types.h Mon Oct 20 18:24:30 2008 -0700 +++ b/src/svpc_types.h Wed Oct 22 09:24:16 2008 -0700 @@ -29,15 +29,17 @@ #define CIM_RES_TYPE_DISK 17 #define CIM_RES_TYPE_EMU 1 #define CIM_RES_TYPE_GRAPHICS 24 +#define CIM_RES_TYPE_INPUT 13 #define CIM_RES_TYPE_UNKNOWN 1000 -#define CIM_RES_TYPE_COUNT 5 +#define CIM_RES_TYPE_COUNT 6 const static int cim_res_types[CIM_RES_TYPE_COUNT] = {CIM_RES_TYPE_NET, CIM_RES_TYPE_DISK, CIM_RES_TYPE_MEM, CIM_RES_TYPE_PROC, CIM_RES_TYPE_GRAPHICS, + CIM_RES_TYPE_INPUT, }; #define CIM_VSSD_RECOVERY_NONE 2 From kaitlin at linux.vnet.ibm.com Wed Oct 29 22:54:23 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 15:54:23 -0700 Subject: [Libvirt-cim] [PATCH] Fix schema for CRS, CRSC, and KVMRedirectionSAP Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1225318631 25200 # Node ID aa18184a3460b78e96353fd103443a3965317571 # Parent e53b108e82fc54142208dd48a6edd07c2eae0a68 Fix schema for CRS, CRSC, and KVMRedirectionSAP These aren't method providers currently. Pegasus doesn't complain if the registration include the method designation, but sfcb will. Signed-off-by: Kaitlin Rupert diff -r e53b108e82fc -r aa18184a3460 schema/ConsoleRedirectionService.registration --- a/schema/ConsoleRedirectionService.registration Wed Oct 22 09:24:16 2008 -0700 +++ b/schema/ConsoleRedirectionService.registration Wed Oct 29 15:17:11 2008 -0700 @@ -1,5 +1,5 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService method instance -KVM_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService method instance -LXC_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService method instance +Xen_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService instance +KVM_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService instance +LXC_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService instance diff -r e53b108e82fc -r aa18184a3460 schema/ConsoleRedirectionServiceCapabilities.registration --- a/schema/ConsoleRedirectionServiceCapabilities.registration Wed Oct 22 09:24:16 2008 -0700 +++ b/schema/ConsoleRedirectionServiceCapabilities.registration Wed Oct 29 15:17:11 2008 -0700 @@ -1,5 +1,5 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities method instance -KVM_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities method instance -LXC_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities method instance +Xen_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities instance +KVM_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities instance +LXC_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities instance diff -r e53b108e82fc -r aa18184a3460 schema/KVMRedirectionSAP.registration --- a/schema/KVMRedirectionSAP.registration Wed Oct 22 09:24:16 2008 -0700 +++ b/schema/KVMRedirectionSAP.registration Wed Oct 29 15:17:11 2008 -0700 @@ -1,5 +1,5 @@ # Copyright IBM Corp. 2007 # Classname Namespace ProviderName ProviderModule ProviderTypes -Xen_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP method instance -KVM_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP method instance -LXC_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP method instance +Xen_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP instance +KVM_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP instance +LXC_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP instance From kaitlin at linux.vnet.ibm.com Wed Oct 29 22:57:17 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 15:57:17 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] Fix cim_define() for LXC In-Reply-To: <87vdveku8j.fsf@caffeine.danplanet.com> References: <312f2fd4180272698731.1225079960@localhost.localdomain> <87vdveku8j.fsf@caffeine.danplanet.com> Message-ID: <4908EA4D.1000806@linux.vnet.ibm.com> Dan Smith wrote: > KR> LXC guests only support Memory and Disk RASDS currently. > > I just added ProcRASD support for LXC a week or so ago. It doesn't > support a VirtualQuantity, so perhaps it's not appropriate here, but > it does exist :) > Yep, this is an old patch. Instead of removing the ProcRASD, I need to modify it so that we build the proper RASD for container's guests. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Oct 29 23:17:38 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 16:17:38 -0700 Subject: [Libvirt-cim] [PATCH 0 of 3] #3 Add a test to verify ModifySystemSettings() Message-ID: From kaitlin at linux.vnet.ibm.com Wed Oct 29 23:17:41 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 16:17:41 -0700 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Fix cim_define() for LXC In-Reply-To: Message-ID: <3fe31c4399cc4b4df264.1225322261@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225321849 25200 # Node ID 3fe31c4399cc4b4df264013f612926361fd9b20d # Parent 3648a3f070f319d031110c8dba89ab5a47e90363 [TEST] #2 Fix cim_define() for LXC For LXC guests, don't supply a value for vcpu when creating a ProcRASD. The VirtualQuantity attribute isn't valid for containers guests. Signed-off-by: Kaitlin Rupert diff -r 3648a3f070f3 -r 3fe31c4399cc suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri Oct 10 13:03:57 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 29 16:10:49 2008 -0700 @@ -174,7 +174,7 @@ pass class CIM_ProcResourceAllocationSettingData(CIMClassMOF): - def __init__(self, vcpu, name, weight=None, limit=None): + def __init__(self, name, vcpu=None, weight=None, limit=None): self.ResourceType = RASD_TYPE_PROC if vcpu != None: diff -r 3648a3f070f3 -r 3fe31c4399cc suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Oct 10 13:03:57 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 29 16:10:49 2008 -0700 @@ -472,7 +472,10 @@ mac=net_mac, name=dom_name, virt_net=net_name) - self.pasd = vsms.get_pasd_class(virt)(vcpu=vcpus, name=dom_name) + if virt == 'LXC': + self.pasd = vsms.get_pasd_class(virt)(name=dom_name) + else: + self.pasd = vsms.get_pasd_class(virt)(vcpu=vcpus, name=dom_name) self.masd = vsms.get_masd_class(virt)(megabytes=mem, mallocunits=mem_allocunits, name=dom_name) From kaitlin at linux.vnet.ibm.com Wed Oct 29 23:17:39 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 16:17:39 -0700 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] Update inst_to_mof() to convert CIM_CimtestClass instances to inst In-Reply-To: Message-ID: <5809c74c1bfa4458ce4f.1225322259@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223669037 25200 # Node ID 5809c74c1bfa4458ce4fe72c4741d509215cd312 # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 [TEST] Update inst_to_mof() to convert CIM_CimtestClass instances to inst Also update GetInstance so it returns both CIMInstance and CIM_CimtestClass objects. Signed-off-by: Kaitlin Rupert diff -r 408dbb3a61b4 -r 5809c74c1bfa suites/libvirt-cim/lib/XenKvmLib/classes.py --- a/suites/libvirt-cim/lib/XenKvmLib/classes.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py Fri Oct 10 13:03:57 2008 -0700 @@ -18,6 +18,7 @@ # 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 virt_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -47,6 +48,9 @@ #FIXME This function is only needed for libcmpiutil versions 0.4 and later. #Once version 0.4 is obsolete, this function should be removed. def inst_to_mof(inst): + if not isinstance(inst, pywbem.cim_obj.CIMInstance): + inst = inst.inst + mof_str = inst.tomof() mof_inst = "" diff -r 408dbb3a61b4 -r 5809c74c1bfa suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Oct 10 13:03:57 2008 -0700 @@ -103,7 +103,7 @@ return list -def GetInstance(host, cn, keys): +def GetInstance(host, cn, keys, ret_cim_inst=False): '''Resolve the enumeration given the @cn. Return a list of CIMInstance objects.''' @@ -112,6 +112,9 @@ try: inst = CIM_CimtestClass(host, ref) + + if ret_cim_inst: + inst = inst.inst except pywbem.CIMError, arg: print arg[1] From kaitlin at linux.vnet.ibm.com Wed Oct 29 23:17:40 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 29 Oct 2008 16:17:40 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] #2 Add VSMS 15_mod_system_settings.py In-Reply-To: Message-ID: <3648a3f070f319d03111.1225322260@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1223669037 25200 # Node ID 3648a3f070f319d031110c8dba89ab5a47e90363 # Parent 5809c74c1bfa4458ce4fe72c4741d509215cd312 [TEST] #2 Add VSMS 15_mod_system_settings.py This test verifies the ModifySystemSettings() call. Updates: -Remove virt param from cleanup_env() -For LXC guests, return a XFAIL because the containers XML isn't updated by libvirt properly Signed-off-by: Kaitlin Rupert diff -r 5809c74c1bfa -r 3648a3f070f3 suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py Fri Oct 10 13:03:57 2008 -0700 @@ -0,0 +1,136 @@ +#!/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 import vsms +from XenKvmLib import vxml +from CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.const import do_main, default_network_name +from XenKvmLib.classes import get_typed_class, inst_to_mof +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.common_util import poll_for_state_change + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] +default_dom = 'rstest_domain' +cpu = 2 +RECOVERY_VAL = 3 +DEFINED_STATE = 3 +bug = "00008" + +def cleanup_env(ip, cxml): + cxml.cim_destroy(ip) + cxml.undefine(ip) + +def get_vssd(ip, virt, get_cim_inst): + cn = get_typed_class(virt, "VirtualSystemSettingData") + inst = None + + try: + if virt == "XenFV": + virt = "Xen" + + key_list = {"InstanceID" : "%s:%s" % (virt, default_dom) } + inst = GetInstance(ip, cn, key_list, get_cim_inst) + + except Exception, details: + logger.error(details) + return FAIL, inst + + if inst is None: + return FAIL, inst + + return PASS, inst + + at do_main(sup_types) +def main(): + options = main.options + + test_cases = ["define", "start"] + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) + service = vsms.get_vsms_class(options.virt)(options.ip) + + for case in test_cases: + #Each time through, define guest using a default XML + cxml.undefine(options.ip) + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + cleanup_env(options.ip, cxml) + return FAIL + + if case == "start": + ret = cxml.start(options.ip) + if not ret: + logger.error("Failed to start %s", default_dom) + cleanup_env(options.ip, cxml) + return FAIL + + status, inst = get_vssd(options.ip, options.virt, True) + if status != PASS: + logger.error("Failed to get the VSSD instance for %s", default_dom) + cleanup_env(options.ip, cxml) + return FAIL + + inst['AutomaticRecoveryAction'] = pywbem.cim_types.Uint16(RECOVERY_VAL) + vssd = inst_to_mof(inst) + + ret = service.ModifySystemSettings(SystemSettings=vssd) + if ret[0] != 0: + logger.error("Failed to modify dom: %s", default_dom) + cleanup_env(options.ip, cxml) + return FAIL + + if case == "start": + #This should be replaced with a RSC to shutdownt he guest + cxml.destroy(options.ip) + status, cs = poll_for_state_change(options.ip, options.virt, + default_dom, DEFINED_STATE) + if status != PASS: + logger.error("Failed to destroy %s", default_dom) + cleanup_env(options.ip, cxml) + return FAIL + + status, inst = get_vssd(options.ip, options.virt, False) + if status != PASS: + logger.error("Failed to get the VSSD instance for %s", default_dom) + cleanup_env(options.ip, cxml) + return FAIL + + if inst.AutomaticRecoveryAction != RECOVERY_VAL: + logger.error("%s not updated properly.", default_dom) + logger.error("Exp AutomaticRecoveryAction=%d, got %d", RECOVERY_VAL, + inst.AutomaticRecoveryAction) + cleanup_env(options.ip, cxml) + if options.virt == "LXC": + return XFAIL_RC(bug) + return FAIL + + cleanup_env(options.ip, cxml) + + return PASS + +if __name__ == "__main__": + sys.exit(main()) + From yunguol at cn.ibm.com Thu Oct 30 02:53:32 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 29 Oct 2008 19:53:32 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Create a new module of xm_virt_util.py in ../lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it Message-ID: <91f9a0bed4667b6b30a2.1225335212@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1225335207 25200 # Node ID 91f9a0bed4667b6b30a241569ef70a93b8bc0b2b # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 [TEST] #2 Create a new module of xm_virt_util.py in ../lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Wed Oct 29 19:53:27 2008 -0700 @@ -57,7 +57,7 @@ from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS from CimTest.ReturnCodes import PASS, SKIP, FAIL from XenKvmLib.common_util import try_getinstance -from VirtLib.live import net_list +from XenKvmLib.xm_virt_util import net_list from XenKvmLib.test_xml import netxml from XenKvmLib.test_doms import create_vnet from XenKvmLib.const import do_main, platform_sup, default_pool_name diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Wed Oct 29 19:53:27 2008 -0700 @@ -25,7 +25,7 @@ import sys from XenKvmLib.const import do_main from XenKvmLib import enumclass -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from XenKvmLib.classes import get_typed_class from VirtLib import utils from CimTest import Globals @@ -41,7 +41,7 @@ cs_class = get_typed_class(options.virt, 'ComputerSystem') try: cs = enumclass.EnumInstances(options.ip, cs_class) - live_cs = live.domain_list(options.ip, options.virt) + live_cs = domain_list(options.ip, options.virt) for system in cs: name = system.name try: diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Wed Oct 29 19:53:27 2008 -0700 @@ -25,7 +25,7 @@ import sys import pywbem from XenKvmLib import enumclass -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from VirtLib import utils from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE @@ -35,7 +35,7 @@ sup_types = ['KVM', 'LXC'] def clean_system(host, virt): - l = live.domain_list(host, virt) + l = domain_list(host, virt) if len(l) > 0: return False else: diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 29 19:53:27 2008 -0700 @@ -22,7 +22,7 @@ import sys from VirtLib import utils -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from XenKvmLib import vxml from XenKvmLib import assoc from XenKvmLib import enumclass @@ -114,7 +114,7 @@ logger.error("Failed to define the dom: %s", test_dom) return FAIL - cs = live.domain_list(server, virt) + cs = domain_list(server, virt) ccn = get_typed_class(virt, "ComputerSystem") for system in cs: try: diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Oct 29 19:53:27 2008 -0700 @@ -23,7 +23,7 @@ import sys from VirtLib import utils -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib import vxml @@ -154,7 +154,7 @@ logger.error("Failed to define the dom: %s" % test_dom) return FAIL - cs = live.domain_list(options.ip, options.virt) + cs = domain_list(options.ip, options.virt) for system in cs: cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities") status, elec_cs = call_assoc(options.ip, cn, system, options.virt) diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Wed Oct 29 19:53:27 2008 -0700 @@ -26,7 +26,7 @@ from XenKvmLib.classes import get_typed_class from CimTest import Globals from XenKvmLib.const import do_main -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from VirtLib import utils sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -44,7 +44,7 @@ return 1 - names = live.domain_list(options.ip, options.virt) + names = domain_list(options.ip, options.virt) if len(elec) != len(names): Globals.logger.error("Get domain list error, the number of domains is not equal") diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/Processor/01_processor.py --- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Wed Oct 29 19:53:27 2008 -0700 @@ -25,7 +25,7 @@ import sys import pywbem from VirtLib import utils -from VirtLib import live +from XenKvmLib.xm_virt_util import active_domain_list from XenKvmLib.enumclass import GetInstance from XenKvmLib.test_xml import testxml from XenKvmLib.classes import get_typed_class @@ -48,7 +48,7 @@ vsxml.start(options.ip) # Processor instance enumerate need the domain to be active - domlist = live.active_domain_list(options.ip, options.virt) + domlist = active_domain_list(options.ip, options.virt) proc_class = get_typed_class(options.virt, "Processor") if test_dom not in domlist: status = FAIL diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ResourcePool/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Wed Oct 29 19:53:27 2008 -0700 @@ -34,7 +34,7 @@ from CimTest.Globals import logger from XenKvmLib.const import do_main, default_pool_name from CimTest.ReturnCodes import PASS, FAIL, SKIP -from VirtLib.live import net_list +from XenKvmLib.xm_virt_util import net_list from XenKvmLib.vsms import RASD_TYPE_PROC, RASD_TYPE_MEM, RASD_TYPE_NET_ETHER, \ RASD_TYPE_DISK diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py --- a/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Wed Oct 29 19:53:27 2008 -0700 @@ -28,7 +28,7 @@ import os import sys import pywbem -from VirtLib.live import net_list +from XenKvmLib.xm_virt_util import net_list from XenKvmLib import assoc from XenKvmLib import vxml from XenKvmLib.common_util import try_getinstance diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 29 19:53:27 2008 -0700 @@ -57,7 +57,7 @@ from distutils.file_util import move_file from XenKvmLib import assoc from XenKvmLib import enumclass -from VirtLib.live import virsh_version +from XenKvmLib.xm_virt_util import virsh_version from CimTest.ReturnCodes import PASS, FAIL, SKIP from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS from XenKvmLib.const import do_main, default_pool_name, default_network_name diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/VSSD/01_enum.py --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Wed Oct 29 19:53:27 2008 -0700 @@ -27,7 +27,7 @@ # Date : 25-10-2007 import sys -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from XenKvmLib.test_doms import destroy_and_undefine_all @@ -53,7 +53,7 @@ status = FAIL try: - live_cs = live.domain_list(options.ip, options.virt) + live_cs = domain_list(options.ip, options.virt) vssd_class = get_typed_class(options.virt, "VirtualSystemSettingData") syslst = enumclass.EnumInstances(options.ip, vssd_class) found = 0 diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Wed Oct 29 19:53:27 2008 -0700 @@ -25,7 +25,7 @@ import pywbem from pywbem.cim_obj import CIMInstanceName from VirtLib import utils -from VirtLib.live import domain_list, active_domain_list +from XenKvmLib.xm_virt_util import domain_list, active_domain_list from XenKvmLib import vsms, vxml from XenKvmLib.classes import get_typed_class from XenKvmLib.const import do_main diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Wed Oct 29 19:53:27 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from pywbem.cim_obj import CIMInstanceName from VirtLib import utils -from VirtLib.live import network_by_bridge +from XenKvmLib.xm_virt_util import network_by_bridge from XenKvmLib import vsms from XenKvmLib import vxml from CimTest.Globals import logger diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Wed Oct 29 19:53:27 2008 -0700 @@ -22,7 +22,7 @@ import sys import pywbem -from VirtLib import live +from XenKvmLib.xm_virt_util import get_hv_ver from XenKvmLib import vsms from XenKvmLib.const import do_main from CimTest.Globals import logger @@ -47,7 +47,7 @@ try: cim_ver = service["Caption"] - local_ver = live.get_hv_ver(options.ip, options.virt) + local_ver = get_hv_ver(options.ip, options.virt) if cim_ver != local_ver: logger.error("CIM says version is `%s', but libvirt says `%s'" \ diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Oct 29 19:53:27 2008 -0700 @@ -0,0 +1,238 @@ +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Dan Smith +# Deepti B. Kalakeri +# Kaitlin Rupert +# Veerendra Chandrappa +# Zhengang Li +# +# 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 +from VirtLib import utils +import socket + +def xm_domname(ip, domid): + + cmd = "xm domname %s" % domid + + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return None + + return out + +def list_guests_on_bridge(ip, bridge): + """Returns a list of domU names that have vifs in the + specified bridge. + """ + + cmd = "brctl show %s | grep 'vif' | grep -v vif0.*" % bridge + + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return [] + + ret = [] + lines = out.splitlines() + for l in lines: + vif = l.split()[-1] + domid = vif.replace('vif', '').split('.')[0] + domname = xm_domname(ip, domid) + if domname != None: + ret.append(domname) + + return ret + +def disk_list(ip, vs_name): + """Returns the list of disk of the specified VS + """ + + guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' " + rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) + + if rc != 0: + return None + + return out + +def max_free_mem(server): + """Function to get max free mem on dom0. + + Returns an int containing the value in MB. + """ + + xm_ret, mfm = utils.run_remote(server, + "xm info | awk -F ': ' '/max_free_memory/ {print \$2}'") + if xm_ret != 0: + return None + + return int(mfm) + +def domain_list(server, virt="Xen"): + """Function to list all domains""" + if virt == "XenFV": + virt = "Xen" + + cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return None + names = [] + lines = out.split("\n") + for line in lines: + dinfo = line.split() + if len(dinfo) > 1: + names.append(dinfo[1]) + + return names + +def active_domain_list(server, virt="Xen"): + """Function to list all active domains""" + if virt == "XenFV": + virt = "Xen" + + cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return None + names = [] + lines = out.split("\n") + for line in lines: + dinfo = line.split() + if len(dinfo) > 1: + names.append(dinfo[1]) + + return names + +def bootloader(server, gtype = 0): + """ + Function to find the bootloader to be used. + It uses the following steps to determine the bootloader. + 1) The function checks if the machine is full virt or para virt. + 2) Checks if a Full virt guest option is set + NOTE : gtype = 1 for FV and gtype = 0 for PV + i) If yes, then verifies if the machine has the support to + create the full virt guest. If both options are true then + bootloader is set to 'hvmloader' + ii) Otherwise, a paravirt guest creation is requested. + a) Verfies the OS on which it is running is Red hat/Fedora/SLES. + b) sets the bootloader to pygrub for Red hat/Fedora + or domUloader.py for SLES. + 3) returns the bootloader. + """ + if fv_cap(server) and gtype == 1: + bootloader = "/usr/lib/xen/boot/hvmloader" + else: + cmd = "cat /etc/issue | grep -v ^$ | egrep 'Red Hat|Fedora'" + ret, out = utils.run_remote(server,cmd) + if ret != 0: + # For SLES + bootloader = "/usr/lib/xen/boot/domUloader.py" + else: + # For Red Hat or Fedora + bootloader = "/usr/bin/pygrub" + return bootloader + +def net_list(server, virt="Xen"): + """Function to list active network""" + names = [] + cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return names + lines = out.split("\n") + for line in lines: + virt_network = line.split() + if len(virt_network) >= 1 and virt_network[1] == "active": + names.append(virt_network[0]) + + return names + +def get_bridge_from_network_xml(network, server, virt="Xen"): + """Function returns bridge name for a given virtual network""" + + cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \ + (utils.virt2uri(virt), network) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return None + bridge = out.split("'") + if len(bridge) > 1: + return bridge[1] + +def network_by_bridge(bridge, server, virt="Xen"): + """Function returns virtual network for a given bridge""" + + networks = net_list(server, virt) + if len(networks) == 0: + return None + + for network in networks: + if bridge == get_bridge_from_network_xml(network, server, virt): + return network + + return None + +def virsh_version(server, virt="KVM"): + cmd = "virsh -c %s -v " % utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + if ret != 0: + return None + return out + +def diskpool_list(server, virt="KVM"): + """Function to list active DiskPool list""" + names = [] + cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return names + + lines = out.split("\n") + for line in lines: + disk_pool = line.split() + if len(disk_pool) >= 1 and disk_pool[1] == "active": + names.append(disk_pool[0]) + + return names + +def virsh_vcpuinfo(server, dom, virt="Xen"): + cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt), + dom) + ret, out = utils.run_remote(server, cmd) + if out.isdigit(): + return out + return None + +def get_hv_ver(server, virt="Xen"): + cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + if ret == 0: + return out + else: + return None + From fujimura.toshifumi at np.css.fujitsu.com Thu Oct 30 02:44:12 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 30 Oct 2008 11:44:12 +0900 Subject: [Libvirt-cim] [PATCH][TEST]#3 Add the revision and the changeset of Cimtest to the test report In-Reply-To: <49088AEF.10509@linux.vnet.ibm.com> References: <49081D90.4090107@np.css.fujitsu.com> <49088AEF.10509@linux.vnet.ibm.com> Message-ID: <49091F7C.3070201@np.css.fujitsu.com> # HG changeset patch # User Toshifumi Fujimura # Date 1225334079 -32400 # Node ID f3d6047cfe923377c63b50fa65bf41e847c82ed1 # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 [PATCH][TEST]#3 Add the revision and the changeset of Cimtest to the test report I fixed something to be pointed out. Signed-off-by: Toshifumi Fujimura diff -r 408dbb3a61b4 -r f3d6047cfe92 suites/libvirt-cim/lib/XenKvmLib/reporting.py --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Thu Oct 30 11:34:39 2008 +0900 @@ -32,6 +32,13 @@ return "Unknown" return out +def get_cimtest_version(): + revision = commands.getoutput("hg parents --template \ + \"{rev}\" 2>/dev/null") + changeset = commands.getoutput("hg parents --template \ + \"{node|short}\" 2>/dev/null") + return revision, changeset + def get_libvirt_ver(ip): libvirt_ver = "Unknown" hyp_ver = "Unknown" @@ -76,15 +83,19 @@ cimom, cimom_ver = get_cimom_ver(ip) - env = "Distro: %s\nKernel: %s\nlibvirt: %s\nHypervisor: %s\nCIMOM: %s %s\n"\ + 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) + cimtest_revision, cimtest_changeset = get_cimtest_version() lc_ver = "Libvirt-cim revision: %s\nLibvirt-cim changeset: %s\n" % \ (rev, changeset) + cimtest_ver = "Cimtest revision: %s\nCimtest changeset: %s\n" % \ + (cimtest_revision, cimtest_changeset) - return env + lc_ver + return env + lc_ver + cimtest_ver def parse_run_output(log_file): rvals = { 'PASS' : 0, -- Toshifumi Fujimura. From yunguol at cn.ibm.com Thu Oct 30 03:11:53 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 29 Oct 2008 20:11:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update helper function when remove some function in live.py Message-ID: # HG changeset patch # User Guolian Yun # Date 1225336307 25200 # Node ID fa88d86bab22a44ea4c1ce221b326c8f020437c0 # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 [TEST] Update helper function when remove some function in live.py Signed-off-by: Guolian Yun diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/test_doms.py --- a/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Wed Oct 29 20:11:47 2008 -0700 @@ -24,7 +24,7 @@ import tempfile import os from VirtLib import utils -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from CimTest.Globals import CIM_FUUID try: @@ -127,7 +127,7 @@ """Destroy and undefine all domain to keep a clean env for next testcase""" - names = live.domain_list(server, virt) + names = domain_list(server, virt) ids = virdomid_list(server, virt) names.extend(ids) uuid_list = get_uuid_list() diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/test_xml.py --- a/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Wed Oct 29 20:11:47 2008 -0700 @@ -29,12 +29,13 @@ import sys import random from VirtLib import utils -from VirtLib import live from xml import xpath from xml.dom import minidom, Node from CimTest.Globals import logger from XenKvmLib.test_doms import set_uuid, create_vnet -from VirtLib.live import net_list, available_bridges, get_bridge_from_network_xml +from VirtLib.live import available_bridges +from XenKvmLib.xm_virt_util import net_list, get_bridge_from_network_xml, \ +bootloader from CimTest.ReturnCodes import SKIP image_dir = "/tmp" @@ -116,7 +117,7 @@ - """ % ( test_dom, set_uuid(), live.bootloader(server, gtype), \ + """ % ( test_dom, set_uuid(), bootloader(server, gtype), \ kernel_path, init_path, mem*1024, vcpus, mac, disk_file_path, disk ) return test_xml diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 29 20:11:47 2008 -0700 @@ -25,7 +25,6 @@ import pywbem from CimTest.CimExt import CIMMethodClass, CIMClassMOF from CimTest import Globals -from VirtLib import live from XenKvmLib import const from XenKvmLib.classes import get_typed_class, get_class_type, virt_types diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 29 20:11:47 2008 -0700 @@ -38,6 +38,7 @@ from xml.dom import minidom, Node from xml import xpath from VirtLib import utils, live +from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader from XenKvmLib.test_doms import set_uuid, viruuid from XenKvmLib import vsms from XenKvmLib import const @@ -436,7 +437,7 @@ return br def _set_vbridge(self, ip, virt_type, net_name): - vbr = live.get_bridge_from_network_xml(net_name, ip, virt=virt_type) + vbr = get_bridge_from_network_xml(net_name, ip, virt=virt_type) interface = self.get_node('/domain/devices/interface') interface.setAttribute('type', 'bridge') @@ -562,7 +563,7 @@ self.set_interface_details(devices, net_mac, net_type, net_name, 'Xen') def set_bootloader(self, ip, gtype=0): - bldr = live.bootloader(ip, gtype) + bldr = bootloader(ip, gtype) self.add_sub_node('/domain', 'bootloader', bldr) self.vssd.Bootloader = bldr return bldr From yunguol at cn.ibm.com Thu Oct 30 02:56:31 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 30 Oct 2008 10:56:31 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Create a new module of xm_virt_util.py in ../lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it In-Reply-To: <91f9a0bed4667b6b30a2.1225335212@elm3b197.beaverton.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-30 10:53:32: > # HG changeset patch > # User Guolian Yun > # Date 1225335207 25200 > # Node ID 91f9a0bed4667b6b30a241569ef70a93b8bc0b2b > # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 > [TEST] #2 Create a new module of xm_virt_util.py in .. > /lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it Please ignore this patch, I missed my DCO here. I will resend a new patch. Thanks! > > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py > --- a/suites/libvirt- > cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Mon Oct > 27 20:03:31 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Wed Oct > 29 19:53:27 2008 -0700 > @@ -57,7 +57,7 @@ > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > from CimTest.ReturnCodes import PASS, SKIP, FAIL > from XenKvmLib.common_util import try_getinstance > -from VirtLib.live import net_list > +from XenKvmLib.xm_virt_util import net_list > from XenKvmLib.test_xml import netxml > from XenKvmLib.test_doms import create_vnet > from XenKvmLib.const import do_main, platform_sup, default_pool_name > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/ComputerSystem/01_enum.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Oct > 27 20:03:31 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Wed Oct > 29 19:53:27 2008 -0700 > @@ -25,7 +25,7 @@ > import sys > from XenKvmLib.const import do_main > from XenKvmLib import enumclass > -from VirtLib import live > +from XenKvmLib.xm_virt_util import domain_list > from XenKvmLib.classes import get_typed_class > from VirtLib import utils > from CimTest import Globals > @@ -41,7 +41,7 @@ > cs_class = get_typed_class(options.virt, 'ComputerSystem') > try: > cs = enumclass.EnumInstances(options.ip, cs_class) > - live_cs = live.domain_list(options.ip, options.virt) > + live_cs = domain_list(options.ip, options.virt) > for system in cs: > name = system.name > try: > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/ComputerSystem/02_nosystems.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py > Mon Oct 27 20:03:31 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py > Wed Oct 29 19:53:27 2008 -0700 > @@ -25,7 +25,7 @@ > import sys > import pywbem > from XenKvmLib import enumclass > -from VirtLib import live > +from XenKvmLib.xm_virt_util import domain_list > from VirtLib import utils > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > @@ -35,7 +35,7 @@ > sup_types = ['KVM', 'LXC'] > > def clean_system(host, virt): > - l = live.domain_list(host, virt) > + l = domain_list(host, virt) > if len(l) > 0: > return False > else: > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/ElementCapabilities/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py > Mon Oct 27 20:03:31 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py > Wed Oct 29 19:53:27 2008 -0700 > @@ -22,7 +22,7 @@ > > import sys > from VirtLib import utils > -from VirtLib import live > +from XenKvmLib.xm_virt_util import domain_list > from XenKvmLib import vxml > from XenKvmLib import assoc > from XenKvmLib import enumclass > @@ -114,7 +114,7 @@ > logger.error("Failed to define the dom: %s", test_dom) > return FAIL > > - cs = live.domain_list(server, virt) > + cs = domain_list(server, virt) > ccn = get_typed_class(virt, "ComputerSystem") > for system in cs: > try: > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/ElementCapabilities/02_reverse.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py > Mon Oct 27 20:03:31 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py > Wed Oct 29 19:53:27 2008 -0700 > @@ -23,7 +23,7 @@ > > import sys > from VirtLib import utils > -from VirtLib import live > +from XenKvmLib.xm_virt_util import domain_list > from XenKvmLib import assoc > from XenKvmLib import enumclass > from XenKvmLib import vxml > @@ -154,7 +154,7 @@ > logger.error("Failed to define the dom: %s" % test_dom) > return FAIL > > - cs = live.domain_list(options.ip, options.virt) > + cs = domain_list(options.ip, options.virt) > for system in cs: > cn = get_typed_class(options.virt, > "EnabledLogicalElementCapabilities") > status, elec_cs = call_assoc(options.ip, cn, system, options.virt) > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py > --- a/suites/libvirt- > cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Mon Oct > 27 20:03:31 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Wed Oct > 29 19:53:27 2008 -0700 > @@ -26,7 +26,7 @@ > from XenKvmLib.classes import get_typed_class > from CimTest import Globals > from XenKvmLib.const import do_main > -from VirtLib import live > +from XenKvmLib.xm_virt_util import domain_list > from VirtLib import utils > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > @@ -44,7 +44,7 @@ > return 1 > > > - names = live.domain_list(options.ip, options.virt) > + names = domain_list(options.ip, options.virt) > > if len(elec) != len(names): > Globals.logger.error("Get domain list error, the number of > domains is not equal") > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/Processor/01_processor.py > --- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Mon Oct > 27 20:03:31 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Wed Oct > 29 19:53:27 2008 -0700 > @@ -25,7 +25,7 @@ > import sys > import pywbem > from VirtLib import utils > -from VirtLib import live > +from XenKvmLib.xm_virt_util import active_domain_list > from XenKvmLib.enumclass import GetInstance > from XenKvmLib.test_xml import testxml > from XenKvmLib.classes import get_typed_class > @@ -48,7 +48,7 @@ > vsxml.start(options.ip) > > # Processor instance enumerate need the domain to be active > - domlist = live.active_domain_list(options.ip, options.virt) > + domlist = active_domain_list(options.ip, options.virt) > proc_class = get_typed_class(options.virt, "Processor") > if test_dom not in domlist: > status = FAIL > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/ResourcePool/01_enum.py > --- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Mon Oct > 27 20:03:31 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Wed Oct > 29 19:53:27 2008 -0700 > @@ -34,7 +34,7 @@ > from CimTest.Globals import logger > from XenKvmLib.const import do_main, default_pool_name > from CimTest.ReturnCodes import PASS, FAIL, SKIP > -from VirtLib.live import net_list > +from XenKvmLib.xm_virt_util import net_list > from XenKvmLib.vsms import RASD_TYPE_PROC, RASD_TYPE_MEM, > RASD_TYPE_NET_ETHER, \ > RASD_TYPE_DISK > > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/ResourcePool/02_rp_gi_errors.py > --- a/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py > Mon Oct 27 20:03:31 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py > Wed Oct 29 19:53:27 2008 -0700 > @@ -28,7 +28,7 @@ > import os > import sys > import pywbem > -from VirtLib.live import net_list > +from XenKvmLib.xm_virt_util import net_list > from XenKvmLib import assoc > from XenKvmLib import vxml > from XenKvmLib.common_util import try_getinstance > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/SettingsDefineCapabilities/01_forward.py > --- a/suites/libvirt- > cim/cimtest/SettingsDefineCapabilities/01_forward.py Mon Oct 27 > 20:03:31 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 29 > 19:53:27 2008 -0700 > @@ -57,7 +57,7 @@ > from distutils.file_util import move_file > from XenKvmLib import assoc > from XenKvmLib import enumclass > -from VirtLib.live import virsh_version > +from XenKvmLib.xm_virt_util import virsh_version > from CimTest.ReturnCodes import PASS, FAIL, SKIP > from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, > CIM_ERROR_ASSOCIATORS > from XenKvmLib.const import do_main, default_pool_name, default_network_name > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/VSSD/01_enum.py > --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 27 20:03: > 31 2008 -0700 > +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Wed Oct 29 19:53: > 27 2008 -0700 > @@ -27,7 +27,7 @@ > # Date : 25-10-2007 > > import sys > -from VirtLib import live > +from XenKvmLib.xm_virt_util import domain_list > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > from XenKvmLib.test_doms import destroy_and_undefine_all > @@ -53,7 +53,7 @@ > status = FAIL > > try: > - live_cs = live.domain_list(options.ip, options.virt) > + live_cs = domain_list(options.ip, options.virt) > vssd_class = get_typed_class(options.virt, > "VirtualSystemSettingData") > syslst = enumclass.EnumInstances(options.ip, vssd_class) > found = 0 > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/02_destroysystem.py > --- a/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Mon > Oct 27 20:03:31 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Wed > Oct 29 19:53:27 2008 -0700 > @@ -25,7 +25,7 @@ > import pywbem > from pywbem.cim_obj import CIMInstanceName > from VirtLib import utils > -from VirtLib.live import domain_list, active_domain_list > +from XenKvmLib.xm_virt_util import domain_list, active_domain_list > from XenKvmLib import vsms, vxml > from XenKvmLib.classes import get_typed_class > from XenKvmLib.const import do_main > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/08_modifyresource.py > --- a/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/08_modifyresource.py > Mon Oct 27 20:03:31 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/08_modifyresource.py > Wed Oct 29 19:53:27 2008 -0700 > @@ -26,7 +26,7 @@ > import pywbem > from pywbem.cim_obj import CIMInstanceName > from VirtLib import utils > -from VirtLib.live import network_by_bridge > +from XenKvmLib.xm_virt_util import network_by_bridge > from XenKvmLib import vsms > from XenKvmLib import vxml > from CimTest.Globals import logger > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/10_hv_version.py > --- a/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/10_hv_version.py Mon > Oct 27 20:03:31 2008 -0700 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/10_hv_version.py Wed > Oct 29 19:53:27 2008 -0700 > @@ -22,7 +22,7 @@ > > import sys > import pywbem > -from VirtLib import live > +from XenKvmLib.xm_virt_util import get_hv_ver > from XenKvmLib import vsms > from XenKvmLib.const import do_main > from CimTest.Globals import logger > @@ -47,7 +47,7 @@ > > try: > cim_ver = service["Caption"] > - local_ver = live.get_hv_ver(options.ip, options.virt) > + local_ver = get_hv_ver(options.ip, options.virt) > > if cim_ver != local_ver: > logger.error("CIM says version is `%s', but libvirt says `%s'" \ > diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt- > cim/lib/XenKvmLib/xm_virt_util.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Oct 29 > 19:53:27 2008 -0700 > @@ -0,0 +1,238 @@ > +# > +# Copyright 2008 IBM Corp. > +# > +# Authors: > +# Dan Smith > +# Deepti B. Kalakeri > +# Kaitlin Rupert > +# Veerendra Chandrappa > +# Zhengang Li > +# > +# 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 > +from VirtLib import utils > +import socket > + > +def xm_domname(ip, domid): > + > + cmd = "xm domname %s" % domid > + > + rc, out = utils.run_remote(ip, cmd) > + if rc != 0: > + return None > + > + return out > + > +def list_guests_on_bridge(ip, bridge): > + """Returns a list of domU names that have vifs in the > + specified bridge. > + """ > + > + cmd = "brctl show %s | grep 'vif' | grep -v vif0.*" % bridge > + > + rc, out = utils.run_remote(ip, cmd) > + if rc != 0: > + return [] > + > + ret = [] > + lines = out.splitlines() > + for l in lines: > + vif = l.split()[-1] > + domid = vif.replace('vif', '').split('.')[0] > + domname = xm_domname(ip, domid) > + if domname != None: > + ret.append(domname) > + > + return ret > + > +def disk_list(ip, vs_name): > + """Returns the list of disk of the specified VS > + """ > + > + guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' " > + rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) > + > + if rc != 0: > + return None > + > + return out > + > +def max_free_mem(server): > + """Function to get max free mem on dom0. > + > + Returns an int containing the value in MB. > + """ > + > + xm_ret, mfm = utils.run_remote(server, > + "xm info | awk -F ': ' '/max_free_memory/ {print \$2}'") > + if xm_ret != 0: > + return None > + > + return int(mfm) > + > +def domain_list(server, virt="Xen"): > + """Function to list all domains""" > + if virt == "XenFV": > + virt = "Xen" > + > + cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \ > + utils.virt2uri(virt) > + ret, out = utils.run_remote(server, cmd) > + > + if ret != 0: > + return None > + names = [] > + lines = out.split("\n") > + for line in lines: > + dinfo = line.split() > + if len(dinfo) > 1: > + names.append(dinfo[1]) > + > + return names > + > +def active_domain_list(server, virt="Xen"): > + """Function to list all active domains""" > + if virt == "XenFV": > + virt = "Xen" > + > + cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \ > + utils.virt2uri(virt) > + ret, out = utils.run_remote(server, cmd) > + > + if ret != 0: > + return None > + names = [] > + lines = out.split("\n") > + for line in lines: > + dinfo = line.split() > + if len(dinfo) > 1: > + names.append(dinfo[1]) > + > + return names > + > +def bootloader(server, gtype = 0): > + """ > + Function to find the bootloader to be used. > + It uses the following steps to determine the bootloader. > + 1) The function checks if the machine is full virt or para virt. > + 2) Checks if a Full virt guest option is set > + NOTE : gtype = 1 for FV and gtype = 0 for PV > + i) If yes, then verifies if the machine has the support to > + create the full virt guest. If both options are true then > + bootloader is set to 'hvmloader' > + ii) Otherwise, a paravirt guest creation is requested. > + a) Verfies the OS on which it is running is Red > hat/Fedora/SLES. > + b) sets the bootloader to pygrub for Red hat/Fedora > + or domUloader.py for SLES. > + 3) returns the bootloader. > + """ > + if fv_cap(server) and gtype == 1: > + bootloader = "/usr/lib/xen/boot/hvmloader" > + else: > + cmd = "cat /etc/issue | grep -v ^$ | egrep 'Red Hat|Fedora'" > + ret, out = utils.run_remote(server,cmd) > + if ret != 0: > + # For SLES > + bootloader = "/usr/lib/xen/boot/domUloader.py" > + else: > + # For Red Hat or Fedora > + bootloader = "/usr/bin/pygrub" > + return bootloader > + > +def net_list(server, virt="Xen"): > + """Function to list active network""" > + names = [] > + cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \ > + utils.virt2uri(virt) > + ret, out = utils.run_remote(server, cmd) > + > + if ret != 0: > + return names > + lines = out.split("\n") > + for line in lines: > + virt_network = line.split() > + if len(virt_network) >= 1 and virt_network[1] == "active": > + names.append(virt_network[0]) > + > + return names > + > +def get_bridge_from_network_xml(network, server, virt="Xen"): > + """Function returns bridge name for a given virtual network""" > + > + cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \ > + (utils.virt2uri(virt), network) > + ret, out = utils.run_remote(server, cmd) > + > + if ret != 0: > + return None > + bridge = out.split("'") > + if len(bridge) > 1: > + return bridge[1] > + > +def network_by_bridge(bridge, server, virt="Xen"): > + """Function returns virtual network for a given bridge""" > + > + networks = net_list(server, virt) > + if len(networks) == 0: > + return None > + > + for network in networks: > + if bridge == get_bridge_from_network_xml(network, server, virt): > + return network > + > + return None > + > +def virsh_version(server, virt="KVM"): > + cmd = "virsh -c %s -v " % utils.virt2uri(virt) > + ret, out = utils.run_remote(server, cmd) > + if ret != 0: > + return None > + return out > + > +def diskpool_list(server, virt="KVM"): > + """Function to list active DiskPool list""" > + names = [] > + cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \ > + utils.virt2uri(virt) > + ret, out = utils.run_remote(server, cmd) > + > + if ret != 0: > + return names > + > + lines = out.split("\n") > + for line in lines: > + disk_pool = line.split() > + if len(disk_pool) >= 1 and disk_pool[1] == "active": > + names.append(disk_pool[0]) > + > + return names > + > +def virsh_vcpuinfo(server, dom, virt="Xen"): > + cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils. > virt2uri(virt), > + dom) > + ret, out = utils.run_remote(server, cmd) > + if out.isdigit(): > + return out > + return None > + > +def get_hv_ver(server, virt="Xen"): > + cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" > % utils.virt2uri(virt) > + ret, out = utils.run_remote(server, cmd) > + if ret == 0: > + return out > + else: > + return None > + > > _______________________________________________ > 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 Oct 30 03:27:25 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 29 Oct 2008 20:27:25 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Create a new module of xm_virt_util.py in ../lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it Message-ID: # HG changeset patch # User Guolian Yun # Date 1225337240 25200 # Node ID eacab11799791c45e1ed35a5934b6ed7fe407bb3 # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 [TEST] #2 Create a new module of xm_virt_util.py in ../lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it Signed-off-by: Guolian Yun diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Wed Oct 29 20:27:20 2008 -0700 @@ -57,7 +57,7 @@ from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS from CimTest.ReturnCodes import PASS, SKIP, FAIL from XenKvmLib.common_util import try_getinstance -from VirtLib.live import net_list +from XenKvmLib.xm_virt_util import net_list from XenKvmLib.test_xml import netxml from XenKvmLib.test_doms import create_vnet from XenKvmLib.const import do_main, platform_sup, default_pool_name diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Wed Oct 29 20:27:20 2008 -0700 @@ -25,7 +25,7 @@ import sys from XenKvmLib.const import do_main from XenKvmLib import enumclass -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from XenKvmLib.classes import get_typed_class from VirtLib import utils from CimTest import Globals @@ -41,7 +41,7 @@ cs_class = get_typed_class(options.virt, 'ComputerSystem') try: cs = enumclass.EnumInstances(options.ip, cs_class) - live_cs = live.domain_list(options.ip, options.virt) + live_cs = domain_list(options.ip, options.virt) for system in cs: name = system.name try: diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Wed Oct 29 20:27:20 2008 -0700 @@ -25,7 +25,7 @@ import sys import pywbem from XenKvmLib import enumclass -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from VirtLib import utils from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_ERROR_ENUMERATE @@ -35,7 +35,7 @@ sup_types = ['KVM', 'LXC'] def clean_system(host, virt): - l = live.domain_list(host, virt) + l = domain_list(host, virt) if len(l) > 0: return False else: diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 29 20:27:20 2008 -0700 @@ -22,7 +22,7 @@ import sys from VirtLib import utils -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from XenKvmLib import vxml from XenKvmLib import assoc from XenKvmLib import enumclass @@ -114,7 +114,7 @@ logger.error("Failed to define the dom: %s", test_dom) return FAIL - cs = live.domain_list(server, virt) + cs = domain_list(server, virt) ccn = get_typed_class(virt, "ComputerSystem") for system in cs: try: diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Oct 29 20:27:20 2008 -0700 @@ -23,7 +23,7 @@ import sys from VirtLib import utils -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from XenKvmLib import assoc from XenKvmLib import enumclass from XenKvmLib import vxml @@ -154,7 +154,7 @@ logger.error("Failed to define the dom: %s" % test_dom) return FAIL - cs = live.domain_list(options.ip, options.virt) + cs = domain_list(options.ip, options.virt) for system in cs: cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities") status, elec_cs = call_assoc(options.ip, cn, system, options.virt) diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Wed Oct 29 20:27:20 2008 -0700 @@ -26,7 +26,7 @@ from XenKvmLib.classes import get_typed_class from CimTest import Globals from XenKvmLib.const import do_main -from VirtLib import live +from XenKvmLib.xm_virt_util import domain_list from VirtLib import utils sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -44,7 +44,7 @@ return 1 - names = live.domain_list(options.ip, options.virt) + names = domain_list(options.ip, options.virt) if len(elec) != len(names): Globals.logger.error("Get domain list error, the number of domains is not equal") diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/Processor/01_processor.py --- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Wed Oct 29 20:27:20 2008 -0700 @@ -25,7 +25,7 @@ import sys import pywbem from VirtLib import utils -from VirtLib import live +from XenKvmLib.xm_virt_util import active_domain_list from XenKvmLib.enumclass import GetInstance from XenKvmLib.test_xml import testxml from XenKvmLib.classes import get_typed_class @@ -48,7 +48,7 @@ vsxml.start(options.ip) # Processor instance enumerate need the domain to be active - domlist = live.active_domain_list(options.ip, options.virt) + domlist = active_domain_list(options.ip, options.virt) proc_class = get_typed_class(options.virt, "Processor") if test_dom not in domlist: status = FAIL diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ResourcePool/01_enum.py --- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Wed Oct 29 20:27:20 2008 -0700 @@ -34,7 +34,7 @@ from CimTest.Globals import logger from XenKvmLib.const import do_main, default_pool_name from CimTest.ReturnCodes import PASS, FAIL, SKIP -from VirtLib.live import net_list +from XenKvmLib.xm_virt_util import net_list from XenKvmLib.vsms import RASD_TYPE_PROC, RASD_TYPE_MEM, RASD_TYPE_NET_ETHER, \ RASD_TYPE_DISK diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py --- a/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Wed Oct 29 20:27:20 2008 -0700 @@ -28,7 +28,7 @@ import os import sys import pywbem -from VirtLib.live import net_list +from XenKvmLib.xm_virt_util import net_list from XenKvmLib import assoc from XenKvmLib import vxml from XenKvmLib.common_util import try_getinstance diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 29 20:27:20 2008 -0700 @@ -57,7 +57,7 @@ from distutils.file_util import move_file from XenKvmLib import assoc from XenKvmLib import enumclass -from VirtLib.live import virsh_version +from XenKvmLib.xm_virt_util import virsh_version from CimTest.ReturnCodes import PASS, FAIL, SKIP from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS from XenKvmLib.const import do_main, default_pool_name, default_network_name diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Wed Oct 29 20:27:20 2008 -0700 @@ -25,7 +25,7 @@ import pywbem from pywbem.cim_obj import CIMInstanceName from VirtLib import utils -from VirtLib.live import domain_list, active_domain_list +from XenKvmLib.xm_virt_util import domain_list, active_domain_list from XenKvmLib import vsms, vxml from XenKvmLib.classes import get_typed_class from XenKvmLib.const import do_main diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Wed Oct 29 20:27:20 2008 -0700 @@ -26,7 +26,7 @@ import pywbem from pywbem.cim_obj import CIMInstanceName from VirtLib import utils -from VirtLib.live import network_by_bridge +from XenKvmLib.xm_virt_util import network_by_bridge from XenKvmLib import vsms from XenKvmLib import vxml from CimTest.Globals import logger diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Wed Oct 29 20:27:20 2008 -0700 @@ -22,7 +22,7 @@ import sys import pywbem -from VirtLib import live +from XenKvmLib.xm_virt_util import get_hv_ver from XenKvmLib import vsms from XenKvmLib.const import do_main from CimTest.Globals import logger @@ -47,7 +47,7 @@ try: cim_ver = service["Caption"] - local_ver = live.get_hv_ver(options.ip, options.virt) + local_ver = get_hv_ver(options.ip, options.virt) if cim_ver != local_ver: logger.error("CIM says version is `%s', but libvirt says `%s'" \ diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Oct 29 20:27:20 2008 -0700 @@ -0,0 +1,238 @@ +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Dan Smith +# Deepti B. Kalakeri +# Kaitlin Rupert +# Veerendra Chandrappa +# Zhengang Li +# +# 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 +from VirtLib import utils +import socket + +def xm_domname(ip, domid): + + cmd = "xm domname %s" % domid + + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return None + + return out + +def list_guests_on_bridge(ip, bridge): + """Returns a list of domU names that have vifs in the + specified bridge. + """ + + cmd = "brctl show %s | grep 'vif' | grep -v vif0.*" % bridge + + rc, out = utils.run_remote(ip, cmd) + if rc != 0: + return [] + + ret = [] + lines = out.splitlines() + for l in lines: + vif = l.split()[-1] + domid = vif.replace('vif', '').split('.')[0] + domname = xm_domname(ip, domid) + if domname != None: + ret.append(domname) + + return ret + +def disk_list(ip, vs_name): + """Returns the list of disk of the specified VS + """ + + guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' " + rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) + + if rc != 0: + return None + + return out + +def max_free_mem(server): + """Function to get max free mem on dom0. + + Returns an int containing the value in MB. + """ + + xm_ret, mfm = utils.run_remote(server, + "xm info | awk -F ': ' '/max_free_memory/ {print \$2}'") + if xm_ret != 0: + return None + + return int(mfm) + +def domain_list(server, virt="Xen"): + """Function to list all domains""" + if virt == "XenFV": + virt = "Xen" + + cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return None + names = [] + lines = out.split("\n") + for line in lines: + dinfo = line.split() + if len(dinfo) > 1: + names.append(dinfo[1]) + + return names + +def active_domain_list(server, virt="Xen"): + """Function to list all active domains""" + if virt == "XenFV": + virt = "Xen" + + cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return None + names = [] + lines = out.split("\n") + for line in lines: + dinfo = line.split() + if len(dinfo) > 1: + names.append(dinfo[1]) + + return names + +def bootloader(server, gtype = 0): + """ + Function to find the bootloader to be used. + It uses the following steps to determine the bootloader. + 1) The function checks if the machine is full virt or para virt. + 2) Checks if a Full virt guest option is set + NOTE : gtype = 1 for FV and gtype = 0 for PV + i) If yes, then verifies if the machine has the support to + create the full virt guest. If both options are true then + bootloader is set to 'hvmloader' + ii) Otherwise, a paravirt guest creation is requested. + a) Verfies the OS on which it is running is Red hat/Fedora/SLES. + b) sets the bootloader to pygrub for Red hat/Fedora + or domUloader.py for SLES. + 3) returns the bootloader. + """ + if fv_cap(server) and gtype == 1: + bootloader = "/usr/lib/xen/boot/hvmloader" + else: + cmd = "cat /etc/issue | grep -v ^$ | egrep 'Red Hat|Fedora'" + ret, out = utils.run_remote(server,cmd) + if ret != 0: + # For SLES + bootloader = "/usr/lib/xen/boot/domUloader.py" + else: + # For Red Hat or Fedora + bootloader = "/usr/bin/pygrub" + return bootloader + +def net_list(server, virt="Xen"): + """Function to list active network""" + names = [] + cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return names + lines = out.split("\n") + for line in lines: + virt_network = line.split() + if len(virt_network) >= 1 and virt_network[1] == "active": + names.append(virt_network[0]) + + return names + +def get_bridge_from_network_xml(network, server, virt="Xen"): + """Function returns bridge name for a given virtual network""" + + cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \ + (utils.virt2uri(virt), network) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return None + bridge = out.split("'") + if len(bridge) > 1: + return bridge[1] + +def network_by_bridge(bridge, server, virt="Xen"): + """Function returns virtual network for a given bridge""" + + networks = net_list(server, virt) + if len(networks) == 0: + return None + + for network in networks: + if bridge == get_bridge_from_network_xml(network, server, virt): + return network + + return None + +def virsh_version(server, virt="KVM"): + cmd = "virsh -c %s -v " % utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + if ret != 0: + return None + return out + +def diskpool_list(server, virt="KVM"): + """Function to list active DiskPool list""" + names = [] + cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \ + utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + + if ret != 0: + return names + + lines = out.split("\n") + for line in lines: + disk_pool = line.split() + if len(disk_pool) >= 1 and disk_pool[1] == "active": + names.append(disk_pool[0]) + + return names + +def virsh_vcpuinfo(server, dom, virt="Xen"): + cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt), + dom) + ret, out = utils.run_remote(server, cmd) + if out.isdigit(): + return out + return None + +def get_hv_ver(server, virt="Xen"): + cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt) + ret, out = utils.run_remote(server, cmd) + if ret == 0: + return out + else: + return None + From yunguol at cn.ibm.com Thu Oct 30 05:30:05 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 29 Oct 2008 22:30:05 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Delete the functions have been removed to xm_virt_util.py and update common_util.py Message-ID: <2c9e9038145f1177e5e6.1225344605@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1225344599 25200 # Node ID 2c9e9038145f1177e5e61258ea44da9c61dc1647 # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 [TEST] Delete the functions have been removed to xm_virt_util.py and update common_util.py Signed-off-by: Guolian Yun diff -r 408dbb3a61b4 -r 2c9e9038145f lib/VirtLib/live.py --- a/lib/VirtLib/live.py Mon Oct 27 20:03:31 2008 -0700 +++ b/lib/VirtLib/live.py Wed Oct 29 22:29:59 2008 -0700 @@ -112,50 +112,6 @@ return out.splitlines() -def xm_domname(ip, domid): - - cmd = "xm domname %s" % domid - - rc, out = utils.run_remote(ip, cmd) - if rc != 0: - return None - - return out - -def list_guests_on_bridge(ip, bridge): - """Returns a list of domU names that have vifs in the - specified bridge. - """ - - cmd = "brctl show %s | grep 'vif' | grep -v vif0.*" % bridge - - rc, out = utils.run_remote(ip, cmd) - if rc != 0: - return [] - - ret = [] - lines = out.splitlines() - for l in lines: - vif = l.split()[-1] - domid = vif.replace('vif', '').split('.')[0] - domname = xm_domname(ip, domid) - if domname != None: - ret.append(domname) - - return ret - -def disk_list(ip, vs_name): - """Returns the list of disk of the specified VS - """ - - guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' " - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) - - if rc != 0: - return None - - return out - def create_disk_file(ip, size, diskfile) : """Creates a disk file 1MB block-size ,and if succsess returns disk created. """ @@ -181,74 +137,6 @@ return int(mfm) -def domain_list(server, virt="Xen"): - """Function to list all domains""" - if virt == "XenFV": - virt = "Xen" - - cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) - ret, out = utils.run_remote(server, cmd) - - if ret != 0: - return None - names = [] - lines = out.split("\n") - for line in lines: - dinfo = line.split() - if len(dinfo) > 1: - names.append(dinfo[1]) - - return names - -def active_domain_list(server, virt="Xen"): - """Function to list all active domains""" - if virt == "XenFV": - virt = "Xen" - - cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) - ret, out = utils.run_remote(server, cmd) - - if ret != 0: - return None - names = [] - lines = out.split("\n") - for line in lines: - dinfo = line.split() - if len(dinfo) > 1: - names.append(dinfo[1]) - - return names - -def bootloader(server, gtype = 0): - """ - Function to find the bootloader to be used. - It uses the following steps to determine the bootloader. - 1) The function checks if the machine is full virt or para virt. - 2) Checks if a Full virt guest option is set - NOTE : gtype = 1 for FV and gtype = 0 for PV - i) If yes, then verifies if the machine has the support to - create the full virt guest. If both options are true then - bootloader is set to 'hvmloader' - ii) Otherwise, a paravirt guest creation is requested. - a) Verfies the OS on which it is running is Red hat/Fedora/SLES. - b) sets the bootloader to pygrub for Red hat/Fedora - or domUloader.py for SLES. - 3) returns the bootloader. - """ - if fv_cap(server) and gtype == 1: - bootloader = "/usr/lib/xen/boot/hvmloader" - else: - cmd = "cat /etc/issue | grep -v ^$ | egrep 'Red Hat|Fedora'" - ret, out = utils.run_remote(server,cmd) - if ret != 0: - # For SLES - bootloader = "/usr/lib/xen/boot/domUloader.py" - else: - # For Red Hat or Fedora - bootloader = "/usr/bin/pygrub" - return bootloader def fv_cap(server): cmd = "egrep flags /proc/cpuinfo | uniq | egrep 'vmx|svm'" @@ -270,87 +158,3 @@ return socket.gethostbyaddr(socket.gethostname())[0] - -def net_list(server, virt="Xen"): - """Function to list active network""" - names = [] - cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) - ret, out = utils.run_remote(server, cmd) - - if ret != 0: - return names - lines = out.split("\n") - for line in lines: - virt_network = line.split() - if len(virt_network) >= 1 and virt_network[1] == "active": - names.append(virt_network[0]) - - return names - -def get_bridge_from_network_xml(network, server, virt="Xen"): - """Function returns bridge name for a given virtual network""" - - cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \ - (utils.virt2uri(virt), network) - ret, out = utils.run_remote(server, cmd) - - if ret != 0: - return None - bridge = out.split("'") - if len(bridge) > 1: - return bridge[1] - -def network_by_bridge(bridge, server, virt="Xen"): - """Function returns virtual network for a given bridge""" - - networks = net_list(server, virt) - if len(networks) == 0: - return None - - for network in networks: - if bridge == get_bridge_from_network_xml(network, server, virt): - return network - - return None - -def virsh_version(server, virt="KVM"): - cmd = "virsh -c %s -v " % utils.virt2uri(virt) - ret, out = utils.run_remote(server, cmd) - if ret != 0: - return None - return out - -def diskpool_list(server, virt="KVM"): - """Function to list active DiskPool list""" - names = [] - cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) - ret, out = utils.run_remote(server, cmd) - - if ret != 0: - return names - - lines = out.split("\n") - for line in lines: - disk_pool = line.split() - if len(disk_pool) >= 1 and disk_pool[1] == "active": - names.append(disk_pool[0]) - - return names - -def virsh_vcpuinfo(server, dom, virt="Xen"): - cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt), - dom) - ret, out = utils.run_remote(server, cmd) - if out.isdigit(): - return out - return None - -def get_hv_ver(server, virt="Xen"): - cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt) - ret, out = utils.run_remote(server, cmd) - if ret == 0: - return out - else: - return None diff -r 408dbb3a61b4 -r 2c9e9038145f suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Oct 29 22:29:59 2008 -0700 @@ -36,7 +36,7 @@ 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 +from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list, domain_list from XenKvmLib.vxml import PoolXML, NetXML from VirtLib import utils from XenKvmLib.const import default_pool_name, default_network_name From yunguol at cn.ibm.com Thu Oct 30 05:16:12 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 30 Oct 2008 13:16:12 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from live.py to common_util.py and update related tc In-Reply-To: <4908B496.4080508@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-30 03:08:06: > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1225259900 25200 > > # Node ID 5b2b14ed9401ac6398b3cdbefa290553570ff195 > > # Parent 0f340004e1cd48f5ede60a68283a850ae60c9ebe > > [TEST] Move some functions from live.py to common_util.py and > update related tc > > > > On the next, I will delete the removed functions in live.py and > update other tests > > > > Signed-off-by: Guolian Yun > > > > This patch didn't apply cleanly for me. Can you rebase on clean sources? > > Also, common_util.py is growing quite large. Can we put these in a > separate module? I rebased this patch and create it as a new module of xm_virt_util.py. Three patches are on the way, all related functions are removed from live.py to xm_virt_util.py, also tc are updated. Thanks! > > 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 Thu Oct 30 05:29:27 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 30 Oct 2008 13:29:27 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 29 2008 In-Reply-To: <49088AEF.10509@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-30 00:10:23: > Toshifumi Fujimura wrote: > > Hi, > > HostSystem - 02_hostsystem_to_rasd.py: FAIL > > This is failing because the providers have been updated to include > support for a new device: DisplayController. It looks like the test > suite is unable to find this class. > > Daisy - did you run "sudo make preinstall" when you updated the providers? Generally, I run below commands when I update the providers: make preuninstall make uninstall make clean I will restart cimom during this time, then do follows: make make install make postinstall Any mistake? Thanks! > > > SettingsDefineCapabilities - 03_forward_errs.py: FAIL > > > > These erres also exist in my Pegasus's test report. > > Who knows what causes these errors? > > > > Toshifumi Fujimura. > >> > >> ================================================= > >> KVM on sfcb Test Run Summary for Oct 29 2008 > >> ================================================= > >> Distro: Fedora release 9.90.1 (Rawhide) > >> Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > >> libvirt: 0.4.5 > >> Hypervisor: QEMU 0.9.1 > >> CIMOM: sfcb sfcbd 1.3.3preview > >> Libvirt-cim revision: 727 > >> Libvirt-cim changeset: 2df4433a1060 > >> ================================================= > >> FAIL : 5 > >> XFAIL : 2 > >> SKIP : 4 > >> PASS : 127 > >> ----------------- > >> Total : 138 > >> ================================================= > >> FAIL Test Summary: > >> ComputerSystemIndication - 01_created_indication.py: FAIL > >> HostSystem - 02_hostsystem_to_rasd.py: FAIL > >> RedirectionService - 01_enum_crs.py: FAIL > >> RedirectionService - 02_enum_crscap.py: FAIL > >> SettingsDefineCapabilities - 03_forward_errs.py: FAIL > >> > >> ================================================= > > >> -------------------------------------------------------------------- > >> HostSystem - 02_hostsystem_to_rasd.py: FAIL > >> ERROR - KVM_SettingsDefineState returned 0 > >> KVM_DisplayController objects > >> Class not found > >> -------------------------------------------------------------------- > > >> SettingsDefineCapabilities - 03_forward_errs.py: FAIL > >> ERROR - Unexpected rc code 6 and description No such > >> instance (INVALID_InstID_KeyValue) - resource pool type mismatch > >> > >> ERROR - ------ FAILED: Invalid InstanceID Key > >> Value.------ > >> -------------------------------------------------------------------- > > The test is expecting the provider to return the following error: > "Unable to determine resource type" - the provider is returning: "No > such instance (INVALID_InstID_KeyValue) - resource pool type mismatch". > > This is due to changeset 721 which changes the behavior of the > SettingsDefineCapabilities provider. This test will need to be updated > to reflect the new error message. > > > -- > 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 Thu Oct 30 06:57:31 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 30 Oct 2008 14:57:31 +0800 Subject: [Libvirt-cim] LXC on sfcb Test Run Summary for Oct 30 2008 Message-ID: ================================================= LXC on sfcb Test Run Summary for Oct 30 2008 ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 728 Libvirt-cim changeset: 7e87289dbb29 ================================================= FAIL : 19 XFAIL : 0 SKIP : 38 PASS : 81 ----------------- Total : 138 ================================================= FAIL Test Summary: ComputerSystem - 03_defineVS.py: FAIL ComputerSystem - 05_activate_defined_start.py: FAIL ElementCapabilities - 01_forward.py: FAIL ElementCapabilities - 02_reverse.py: FAIL ElementConforms - 01_forward.py: FAIL ElementSettingData - 01_forward.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL HostSystem - 03_hs_to_settdefcap.py: FAIL HostSystem - 04_hs_to_EAPF.py: FAIL HostedDependency - 02_reverse.py: FAIL Memory - 01_memory.py: FAIL RASD - 02_enum.py: FAIL RedirectionService - 01_enum_crs.py: FAIL RedirectionService - 02_enum_crscap.py: FAIL ResourceAllocationFromPool - 01_forward.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL SystemDevice - 01_forward.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 12_referenced_config.py: FAIL ================================================= 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 SettingsDefineCapabilities - 05_reverse_vsmcap.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 VirtualSystemManagementService - 13_refconfig_additional_devs.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: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to define a domain with the name domU1 from virsh InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - ERROR: VS DomST1 was not defined InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- 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: FAIL ERROR - 'LXC_ElementCapabilities' association classname error Class not found -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to define the dom: dom_elecap Class not found InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Unable to define domain domU InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to define the dom: esd_dom InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- 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 - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to define the dom: CrossClass_GuestDom Class not found InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to define the dom: domgst_test InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to define the dom: 'CrossClass_GuestDom' Class not found InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to define the dom: hd_domain InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- 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: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - AttributeError : 'NoneType' object has no attribute 'ConsumableBlocks' Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 116, in do_try File "01_memory.py", line 59, in main if dev.ConsumableBlocks > dev.NumberOfBlocks: AttributeError: 'NoneType' object has no attribute 'ConsumableBlocks' ERROR - None InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC No such instance (no domain for test_domain/mem) -------------------------------------------------------------------- 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: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to Define the domain: VSSDC_dom InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: FAIL ERROR - 'LXC_ConsoleRedirectionService' returned 0 records, expected 1 Class not found *** Inconsistent provider registration for Virt_ConsoleRedirectionService (2) -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: FAIL ERROR - 'LXC_ConsoleRedirectionServiceCapabilities' returned 0 records, expected 1 *** Inconsistent provider registration for Virt_ConsoleRedirectionServiceCapabilities (2) -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: FAIL ERROR - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to Define the domain: RAFP_dom InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- 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: FAIL ERROR - Unexpected rc code 6 and description No such instance (INVALID_InstID_KeyValue) - resource pool type mismatch ERROR - ------ FAILED: Invalid InstanceID Key Value.------ -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: SKIP -------------------------------------------------------------------- SystemDevice - 01_forward.py: FAIL ERROR - NameError : name 'LXC_Memory' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 116, in do_try File "01_forward.py", line 92, in main device = devices.device_of(options.ip, key_list) File "./lib/XenKvmLib/devices.py", line 48, in device_of File "", line 1, in NameError: name 'LXC_Memory' is not defined ERROR - None -------------------------------------------------------------------- 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 - Got CIM error ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC with return code 1 ERROR - Failed to Define the domain: VSSDC_dom InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field VirtualQuantity not valid for LXC -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: FAIL ERROR - Unable to build VSSD and RASD instances for rstest_domain2 -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Oct 30 06:59:09 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 30 Oct 2008 14:59:09 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update get_vssd_mof() to include a bootloader param In-Reply-To: <912c63b6033764917aa5.1224607346@localhost.localdomain> 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-10-22 00:42 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH] [TEST] Update get_vssd_mof() to include a bootloader param # HG changeset patch # User Kaitlin Rupert # Date 1224607344 25200 # Node ID 912c63b6033764917aa5a5438e2e12ce1d12ea99 # Parent f35b3e65944d83f758656717a903eee38b7d5b19 [TEST] Update get_vssd_mof() to include a bootloader param. Signed-off-by: Kaitlin Rupert diff -r f35b3e65944d -r 912c63b60337 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Oct 21 09:42:24 2008 -0700 @@ -89,7 +89,7 @@ # classes to define VSSD parameters class CIM_VirtualSystemSettingData(CIMClassMOF): - def __init__(self, name, virt): + def __init__(self, name, virt, bldr=None): type = get_class_type(self.__class__.__name__) self.InstanceID = '%s:%s' % (type, name) self.Caption = self.Description = 'Virtual System' @@ -107,6 +107,9 @@ else: self.Kernel = const.Xen_kernel_path self.Ramdisk = const.Xen_init_path + + if bldr is not None: + self.Bootloader = bldr class Xen_VirtualSystemSettingData(CIM_VirtualSystemSettingData): pass @@ -117,9 +120,9 @@ class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData): pass -def get_vssd_mof(virt, dom_name): +def get_vssd_mof(virt, dom_name, bldr=None): vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData")) - vssd = vssd_cn(dom_name, virt) + vssd = vssd_cn(dom_name, virt, bldr) return vssd.mof() # classes to define RASD parameters diff -r f35b3e65944d -r 912c63b60337 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Sun Oct 19 19:28:33 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Oct 21 09:42:24 2008 -0700 @@ -564,7 +564,7 @@ def set_bootloader(self, ip, gtype=0): bldr = live.bootloader(ip, gtype) self.add_sub_node('/domain', 'bootloader', bldr) - self.vssd.Bootloader = bldr + self.vssd = vsms.get_vssd_mof(self.virt, self.domain_name, bldr) return bldr def set_bridge(self, ip): _______________________________________________ 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 Oct 30 07:19:24 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 30 Oct 2008 15:19:24 +0800 Subject: [Libvirt-cim] LXC on sfcb Test Run Summary for Oct 30 2008 In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-30 14:57:31: > > ================================================= > LXC on sfcb Test Run Summary for Oct 30 2008 > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 728 > Libvirt-cim changeset: 7e87289dbb29 > ================================================= > FAIL : 19 > XFAIL : 0 > SKIP : 38 > PASS : 81 > ----------------- > Total : 138 > ================================================= > FAIL Test Summary: > ComputerSystem - 03_defineVS.py: FAIL > ComputerSystem - 05_activate_defined_start.py: FAIL > ElementCapabilities - 01_forward.py: FAIL > ElementCapabilities - 02_reverse.py: FAIL > ElementConforms - 01_forward.py: FAIL > ElementSettingData - 01_forward.py: FAIL > HostSystem - 02_hostsystem_to_rasd.py: FAIL > HostSystem - 03_hs_to_settdefcap.py: FAIL > HostSystem - 04_hs_to_EAPF.py: FAIL > HostedDependency - 02_reverse.py: FAIL > Memory - 01_memory.py: FAIL > RASD - 02_enum.py: FAIL > RedirectionService - 01_enum_crs.py: FAIL > RedirectionService - 02_enum_crscap.py: FAIL > ResourceAllocationFromPool - 01_forward.py: FAIL > SettingsDefineCapabilities - 03_forward_errs.py: FAIL > SystemDevice - 01_forward.py: FAIL > VSSD - 04_vssd_to_rasd.py: FAIL > VirtualSystemManagementService - 12_referenced_config.py: FAIL Some of them fail because that VirtualQuantity attribute isn't valid for containers guests, Kaitlin had sent a patch for these, I will do a new test when it's applied. Thanks! > > ================================================= > 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 > SettingsDefineCapabilities - 05_reverse_vsmcap.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 > VirtualSystemManagementService - 13_refconfig_additional_devs.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: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to define a domain with the name > domU1 from virsh > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > ComputerSystem - 04_defineStartVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 05_activate_defined_start.py: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - ERROR: VS DomST1 was not defined > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > 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: FAIL > ERROR - 'LXC_ElementCapabilities' association classname error > Class not found > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to define the dom: dom_elecap > Class not found > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Unable to define domain domU > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementConforms - 03_ectp_fwd_errs.py: PASS > -------------------------------------------------------------------- > ElementConforms - 04_ectp_rev_errs.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to define the dom: esd_dom > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > 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 - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to define the dom: CrossClass_GuestDom > Class not found > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to define the dom: domgst_test > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to define the dom: 'CrossClass_GuestDom' > Class not found > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > HostedDependency - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedDependency - 02_reverse.py: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to define the dom: hd_domain > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > 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: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - AttributeError : 'NoneType' object has no > attribute 'ConsumableBlocks' > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 116, in do_try > File "01_memory.py", line 59, in main > if dev.ConsumableBlocks > dev.NumberOfBlocks: > AttributeError: 'NoneType' object has no attribute 'ConsumableBlocks' > ERROR - None > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > No such instance (no domain for test_domain/mem) > -------------------------------------------------------------------- > 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: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to Define the domain: VSSDC_dom > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > RASD - 03_rasd_errs.py: PASS > -------------------------------------------------------------------- > RASD - 04_disk_rasd_size.py: SKIP > -------------------------------------------------------------------- > RedirectionService - 01_enum_crs.py: FAIL > ERROR - 'LXC_ConsoleRedirectionService' returned 0 > records, expected 1 > Class not found > *** Inconsistent provider registration for Virt_ConsoleRedirectionService (2) > -------------------------------------------------------------------- > RedirectionService - 02_enum_crscap.py: FAIL > ERROR - 'LXC_ConsoleRedirectionServiceCapabilities' > returned 0 records, expected 1 > *** Inconsistent provider registration for > Virt_ConsoleRedirectionServiceCapabilities (2) > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: FAIL > ERROR - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to Define the domain: RAFP_dom > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > 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: FAIL > ERROR - Unexpected rc code 6 and description No > such instance (INVALID_InstID_KeyValue) - resource pool type mismatch > > ERROR - ------ FAILED: Invalid InstanceID Key Value.------ > -------------------------------------------------------------------- > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 05_reverse_vsmcap.py: SKIP > -------------------------------------------------------------------- > SystemDevice - 01_forward.py: FAIL > ERROR - NameError : name 'LXC_Memory' is not defined > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 116, in do_try > File "01_forward.py", line 92, in main > device = devices.device_of(options.ip, key_list) > File "./lib/XenKvmLib/devices.py", line 48, in device_of > File "", line 1, in > NameError: name 'LXC_Memory' is not defined > ERROR - None > -------------------------------------------------------------------- > 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 - Got CIM error ResourceSettings Error: > ProcRASD field VirtualQuantity not valid for LXC with return code 1 > ERROR - Failed to Define the domain: VSSDC_dom > InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field > VirtualQuantity not valid for LXC > -------------------------------------------------------------------- > 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: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 12_referenced_config.py: FAIL > ERROR - Unable to build VSSD and RASD instances for > rstest_domain2 > -------------------------------------------------------------------- > VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 14_define_sys_disk.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 > -------------------------------------------------------------------- > _______________________________________________ > 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 Oct 30 07:26:57 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 30 Oct 2008 15:26:57 +0800 Subject: [Libvirt-cim] [PATCH 1 of 3] [TEST] Update inst_to_mof() to convert CIM_CimtestClass instances to inst In-Reply-To: <5809c74c1bfa4458ce4f.1225322259@localhost.localdomain> 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-10-30 07:17 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH 1 of 3] [TEST] Update inst_to_mof() to convert CIM_CimtestClass instances to inst # HG changeset patch # User Kaitlin Rupert # Date 1223669037 25200 # Node ID 5809c74c1bfa4458ce4fe72c4741d509215cd312 # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 [TEST] Update inst_to_mof() to convert CIM_CimtestClass instances to inst Also update GetInstance so it returns both CIMInstance and CIM_CimtestClass objects. Signed-off-by: Kaitlin Rupert diff -r 408dbb3a61b4 -r 5809c74c1bfa suites/libvirt-cim/lib/XenKvmLib/classes.py --- a/suites/libvirt-cim/lib/XenKvmLib/classes.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/classes.py Fri Oct 10 13:03:57 2008 -0700 @@ -18,6 +18,7 @@ # 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 virt_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -47,6 +48,9 @@ #FIXME This function is only needed for libcmpiutil versions 0.4 and later. #Once version 0.4 is obsolete, this function should be removed. def inst_to_mof(inst): + if not isinstance(inst, pywbem.cim_obj.CIMInstance): + inst = inst.inst + mof_str = inst.tomof() mof_inst = "" diff -r 408dbb3a61b4 -r 5809c74c1bfa suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Mon Oct 27 20:03:31 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Oct 10 13:03:57 2008 -0700 @@ -103,7 +103,7 @@ return list -def GetInstance(host, cn, keys): +def GetInstance(host, cn, keys, ret_cim_inst=False): '''Resolve the enumeration given the @cn. Return a list of CIMInstance objects.''' @@ -112,6 +112,9 @@ try: inst = CIM_CimtestClass(host, ref) + + if ret_cim_inst: + inst = inst.inst except pywbem.CIMError, arg: print arg[1] _______________________________________________ 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 Oct 30 07:38:43 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 30 Oct 2008 15:38:43 +0800 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] #2 Add VSMS 15_mod_system_settings.py In-Reply-To: <3648a3f070f319d03111.1225322260@localhost.localdomain> Message-ID: +1 from me. I have a question of ModifySystemSettings() and ModifyResourceSettings(). ModifySystemSettings() method modify the attributes of VSSD, and ModifyResourceSettings() intends to modify RASD properties, right? I have to pass both RASD and VSSD instances to DefineSystem() when I try to define a vs. Would you please explain more about VSSD and RASD instance 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 libvirt-cim-bounces at redhat.com wrote on 2008-10-30 07:17:40: > # HG changeset patch > # User Kaitlin Rupert > # Date 1223669037 25200 > # Node ID 3648a3f070f319d031110c8dba89ab5a47e90363 > # Parent 5809c74c1bfa4458ce4fe72c4741d509215cd312 > [TEST] #2 Add VSMS 15_mod_system_settings.py > > This test verifies the ModifySystemSettings() call. > > Updates: > -Remove virt param from cleanup_env() > -For LXC guests, return a XFAIL because the containers XML isn't > updated by libvirt properly > > Signed-off-by: Kaitlin Rupert > > diff -r 5809c74c1bfa -r 3648a3f070f3 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py > Fri Oct 10 13:03:57 2008 -0700 > @@ -0,0 +1,136 @@ > +#!/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 import vsms > +from XenKvmLib import vxml > +from CimTest.Globals import logger > +from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > +from XenKvmLib.const import do_main, default_network_name > +from XenKvmLib.classes import get_typed_class, inst_to_mof > +from XenKvmLib.enumclass import GetInstance > +from XenKvmLib.common_util import poll_for_state_change > + > +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > +default_dom = 'rstest_domain' > +cpu = 2 > +RECOVERY_VAL = 3 > +DEFINED_STATE = 3 > +bug = "00008" > + > +def cleanup_env(ip, cxml): > + cxml.cim_destroy(ip) > + cxml.undefine(ip) > + > +def get_vssd(ip, virt, get_cim_inst): > + cn = get_typed_class(virt, "VirtualSystemSettingData") > + inst = None > + > + try: > + if virt == "XenFV": > + virt = "Xen" > + > + key_list = {"InstanceID" : "%s:%s" % (virt, default_dom) } > + inst = GetInstance(ip, cn, key_list, get_cim_inst) > + > + except Exception, details: > + logger.error(details) > + return FAIL, inst > + > + if inst is None: > + return FAIL, inst > + > + return PASS, inst > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + test_cases = ["define", "start"] > + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) > + service = vsms.get_vsms_class(options.virt)(options.ip) > + > + for case in test_cases: > + #Each time through, define guest using a default XML > + cxml.undefine(options.ip) > + cxml = vxml.get_class(options.virt)(default_dom, vcpus=cpu) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to define the dom: %s", default_dom) > + cleanup_env(options.ip, cxml) > + return FAIL > + > + if case == "start": > + ret = cxml.start(options.ip) > + if not ret: > + logger.error("Failed to start %s", default_dom) > + cleanup_env(options.ip, cxml) > + return FAIL > + > + status, inst = get_vssd(options.ip, options.virt, True) > + if status != PASS: > + logger.error("Failed to get the VSSD instance for %s", > default_dom) > + cleanup_env(options.ip, cxml) > + return FAIL > + > + inst['AutomaticRecoveryAction'] = pywbem.cim_types. > Uint16(RECOVERY_VAL) > + vssd = inst_to_mof(inst) > + > + ret = service.ModifySystemSettings(SystemSettings=vssd) > + if ret[0] != 0: > + logger.error("Failed to modify dom: %s", default_dom) > + cleanup_env(options.ip, cxml) > + return FAIL > + > + if case == "start": > + #This should be replaced with a RSC to shutdownt he guest > + cxml.destroy(options.ip) > + status, cs = poll_for_state_change(options.ip, options.virt, > + default_dom, DEFINED_STATE) > + if status != PASS: > + logger.error("Failed to destroy %s", default_dom) > + cleanup_env(options.ip, cxml) > + return FAIL > + > + status, inst = get_vssd(options.ip, options.virt, False) > + if status != PASS: > + logger.error("Failed to get the VSSD instance for %s", > default_dom) > + cleanup_env(options.ip, cxml) > + return FAIL > + > + if inst.AutomaticRecoveryAction != RECOVERY_VAL: > + logger.error("%s not updated properly.", default_dom) > + logger.error("Exp AutomaticRecoveryAction=%d, got %d", > RECOVERY_VAL, > + inst.AutomaticRecoveryAction) > + cleanup_env(options.ip, cxml) > + if options.virt == "LXC": > + return XFAIL_RC(bug) > + return FAIL > + > + cleanup_env(options.ip, cxml) > + > + return PASS > + > +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 Thu Oct 30 07:39:12 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 30 Oct 2008 15:39:12 +0800 Subject: [Libvirt-cim] [PATCH 3 of 3] [TEST] #2 Fix cim_define() for LXC In-Reply-To: <3fe31c4399cc4b4df264.1225322261@localhost.localdomain> 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-10-30 07:17:41: > # HG changeset patch > # User Kaitlin Rupert > # Date 1225321849 25200 > # Node ID 3fe31c4399cc4b4df264013f612926361fd9b20d > # Parent 3648a3f070f319d031110c8dba89ab5a47e90363 > [TEST] #2 Fix cim_define() for LXC > > For LXC guests, don't supply a value for vcpu when creating a ProcRASD. > The VirtualQuantity attribute isn't valid for containers guests. > > Signed-off-by: Kaitlin Rupert > > diff -r 3648a3f070f3 -r 3fe31c4399cc suites/libvirt-cim/lib/XenKvmLib/vsms.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri Oct 10 13:03:572008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 29 16:10:492008 -0700 > @@ -174,7 +174,7 @@ > pass > > class CIM_ProcResourceAllocationSettingData(CIMClassMOF): > - def __init__(self, vcpu, name, weight=None, limit=None): > + def __init__(self, name, vcpu=None, weight=None, limit=None): > self.ResourceType = RASD_TYPE_PROC > > if vcpu != None: > diff -r 3648a3f070f3 -r 3fe31c4399cc suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Oct 10 13:03:572008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 29 16:10:492008 -0700 > @@ -472,7 +472,10 @@ > mac=net_mac, > name=dom_name, > virt_net=net_name) > - self.pasd = vsms.get_pasd_class(virt)(vcpu=vcpus, name=dom_name) > + if virt == 'LXC': > + self.pasd = vsms.get_pasd_class(virt)(name=dom_name) > + else: > + self.pasd = vsms.get_pasd_class(virt)(vcpu=vcpus, name=dom_name) > self.masd = vsms.get_masd_class(virt)(megabytes=mem, > mallocunits=mem_allocunits, > name=dom_name) > > _______________________________________________ > 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 Thu Oct 30 15:06:12 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 30 Oct 2008 08:06:12 -0700 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Oct 29 2008 In-Reply-To: References: Message-ID: <4909CD64.4000102@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-10-30 00:10:23: > > > Toshifumi Fujimura wrote: > > > Hi, > > > HostSystem - 02_hostsystem_to_rasd.py: FAIL > > > > This is failing because the providers have been updated to include > > support for a new device: DisplayController. It looks like the test > > suite is unable to find this class. > > > > Daisy - did you run "sudo make preinstall" when you updated the > providers? > > Generally, I run below commands when I update the providers: > > make preuninstall > make uninstall > make clean > > I will restart cimom during this time, then do follows: > > make > make install > make postinstall > > Any mistake? > Thanks! That's the correct procedure. After taking another look, I think the test needs to be updated so that it'll work with the new DisplayController device. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 30 15:56:15 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 30 Oct 2008 08:56:15 -0700 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] #2 Add VSMS 15_mod_system_settings.py In-Reply-To: References: Message-ID: <4909D91F.80505@linux.vnet.ibm.com> Guo Lian Yun wrote: > > +1 from me. > > I have a question of ModifySystemSettings() and ModifyResourceSettings(). > ModifySystemSettings() method modify the attributes of VSSD, and > ModifyResourceSettings() > intends to modify RASD properties, right? The VSSD and RASD instances are just a way of representing the properties of the guest. So these functions really aren't modifying the VSSD or RASD instances themselves. > I have to pass both RASD and > VSSD instances to > DefineSystem() when I try to define a vs. Would you please explain more > about VSSD and RASD instance > for me? The RASD describes the guest resources. When you define a system, you pass a RASD for each resource you want the guest to have. If you want it to have a disk, you pass in a DiskRASD. Same thing for proc, mem, network, etc. The RASD is then used by the DefineSystem() call to determine what virtual resources to add to the guest. In the case of disk, the DiskRASD tells us the path to the disk we're adding. ModifyResourceSettings() works in a similar way. If a guest has a disk with path /boot/myimage and we want to change it to /boot/not_myimage, we set the Address of the DiskRASD to "/boot/not_myimage" and pass that DiskRASD to ModifyResourceSettings(). The VSSD is a similar concept, except that it describes the properties of the guest itself. So, we set the VirtualSystemIdentifier attribute of the VSSD to give the guest a name. This is passed to the DefineSystem() call, so the provider knows what kinds of settings the guest should have. ModifySystemSettings() is used to modify the guest's settings. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 30 16:04:17 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 30 Oct 2008 09:04:17 -0700 Subject: [Libvirt-cim] [PATCH][TEST]#3 Add the revision and the changeset of Cimtest to the test report In-Reply-To: <49091F7C.3070201@np.css.fujitsu.com> References: <49081D90.4090107@np.css.fujitsu.com> <49088AEF.10509@linux.vnet.ibm.com> <49091F7C.3070201@np.css.fujitsu.com> Message-ID: <4909DB01.2040603@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > # HG changeset patch > # User Toshifumi Fujimura > # Date 1225334079 -32400 > # Node ID f3d6047cfe923377c63b50fa65bf41e847c82ed1 > # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 > [PATCH][TEST]#3 Add the revision and the changeset of Cimtest to the > test report > I fixed something to be pointed out. > > Signed-off-by: Toshifumi Fujimura This is in the tree now. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Oct 30 16:30:34 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 30 Oct 2008 09:30:34 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Delete the functions have been removed to xm_virt_util.py and update common_util.py In-Reply-To: <2c9e9038145f1177e5e6.1225344605@elm3b197.beaverton.ibm.com> References: <2c9e9038145f1177e5e6.1225344605@elm3b197.beaverton.ibm.com> Message-ID: <4909E12A.8030706@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1225344599 25200 > # Node ID 2c9e9038145f1177e5e61258ea44da9c61dc1647 > # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 > [TEST] Delete the functions have been removed to xm_virt_util.py and update common_util.py > > Signed-off-by: Guolian Yun > This patch looks good, but a fair number of tests fail because they are dependent on live.py. Can you update the following tests? After that, I'll apply this patch. Thanks! RedirectionService - 01_enum_crs.py: FAIL Traceback (most recent call last): File "01_enum_crs.py", line 29, in from VirtLib.live import domain_list ImportError: cannot import name domain_list -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: FAIL Traceback (most recent call last): File "02_enum_crscap.py", line 29, in from VirtLib.live import domain_list ImportError: cannot import name domain_list -------------------------------------------------------------------- SystemDevice - 01_forward.py: FAIL ERROR - NameError : name 'KVM_NetworkPort' is not defined Traceback (most recent call last): File "/data/users/kaitlin/sandbox/cimtest/suites/libvirt-cim/lib/XenKvmLib/const.py", line 116, in do_try rc = f() File "01_forward.py", line 92, in main device = devices.device_of(options.ip, key_list) File "/data/users/kaitlin/sandbox/cimtest/suites/libvirt-cim/lib/XenKvmLib/devices.py", line 48, in device_of t = eval(key_list["CreationClassName"]) File "", line 1, in NameError: name 'KVM_NetworkPort' is not defined ERROR - None -------------------------------------------------------------------- VSSD - 01_enum.py: FAIL ERROR - Exception 'module' object has no attribute 'domain_list' -------------------------------------------------------------------- VSSD - 02_bootldr.py: FAIL Traceback (most recent call last): File "02_bootldr.py", line 33, in from VirtLib.live import bootloader ImportError: cannot import name bootloader -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: FAIL Traceback (most recent call last): File "06_addresource.py", line 35, in from XenKvmLib import vsms_util File "/data/users/kaitlin/sandbox/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsms_util.py", line 27, in from VirtLib.live import network_by_bridge, virsh_vcpuinfo, \ ImportError: cannot import name network_by_bridge -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: FAIL Traceback (most recent call last): File "08_modifyresource.py", line 35, in from XenKvmLib import vsms_util File "/data/users/kaitlin/sandbox/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsms_util.py", line 27, in from VirtLib.live import network_by_bridge, virsh_vcpuinfo, \ ImportError: cannot import name network_by_bridge -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL Traceback (most recent call last): File "01_migratable_host.py", line 32, in from XenKvmLib import vsmigrations File "/data/users/kaitlin/sandbox/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py", line 30, in from VirtLib.live import domain_list ImportError: cannot import name domain_list -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL Traceback (most recent call last): File "02_host_migrate_type.py", line 30, in from XenKvmLib import vsmigrations File "/data/users/kaitlin/sandbox/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py", line 30, in from VirtLib.live import domain_list ImportError: cannot import name domain_list -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL Traceback (most recent call last): File "05_migratable_host_errs.py", line 28, in from XenKvmLib import vsmigrations File "/data/users/kaitlin/sandbox/cimtest/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py", line 30, in from VirtLib.live import domain_list ImportError: cannot import name domain_list -------------------------------------------------------------------- VSSD - 01_enum.py: FAIL ERROR - Exception 'module' object has no attribute 'domain_list' -------------------------------------------------------------------- VSSD - 02_bootldr.py: FAIL Traceback (most recent call last): File "02_bootldr.py", line 33, in from VirtLib.live import bootloader ImportError: cannot import name bootloader -------------------------------------------------------------------- -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From fujimura.toshifumi at np.css.fujitsu.com Thu Oct 30 23:32:35 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Fri, 31 Oct 2008 08:32:35 +0900 Subject: [Libvirt-cim] Documents about CIM structure Message-ID: <490A4413.5080306@np.css.fujitsu.com> Hi, I'm researching the CIM's structure of classes. Would you have something documents of it? (ex. class tree..) Works for me. -- Toshifumi Fujimura. From yunguol at cn.ibm.com Fri Oct 31 05:05:49 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 31 Oct 2008 13:05:49 +0800 Subject: [Libvirt-cim] [PATCH 2 of 3] [TEST] #2 Add VSMS 15_mod_system_settings.py In-Reply-To: <4909D91F.80505@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-30 23:56:15: > Guo Lian Yun wrote: > > > > +1 from me. > > > > I have a question of ModifySystemSettings() and ModifyResourceSettings(). > > ModifySystemSettings() method modify the attributes of VSSD, and > > ModifyResourceSettings() > > intends to modify RASD properties, right? > > The VSSD and RASD instances are just a way of representing the > properties of the guest. So these functions really aren't modifying the > VSSD or RASD instances themselves. > > > I have to pass both RASD and > > VSSD instances to > > DefineSystem() when I try to define a vs. Would you please explain more > > about VSSD and RASD instance > > for me? > > The RASD describes the guest resources. When you define a system, you > pass a RASD for each resource you want the guest to have. If you want > it to have a disk, you pass in a DiskRASD. Same thing for proc, mem, > network, etc. > > The RASD is then used by the DefineSystem() call to determine what > virtual resources to add to the guest. In the case of disk, the DiskRASD > tells us the path to the disk we're adding. > > ModifyResourceSettings() works in a similar way. If a guest has a disk > with path /boot/myimage and we want to change it to /boot/not_myimage, > we set the Address of the DiskRASD to "/boot/not_myimage" and pass that > DiskRASD to ModifyResourceSettings(). > > The VSSD is a similar concept, except that it describes the properties > of the guest itself. So, we set the VirtualSystemIdentifier attribute > of the VSSD to give the guest a name. This is passed to the > DefineSystem() call, so the provider knows what kinds of settings the > guest should have. > > ModifySystemSettings() is used to modify the guest's settings. Thanks a lot - Kaitlin. I'm so grateful for your clear explanation. > > -- > 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 Fri Oct 31 08:21:58 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 31 Oct 2008 16:21:58 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Delete the functions have been removed to xm_virt_util.py and update common_util.py In-Reply-To: <4909E12A.8030706@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-10-31 00:30:34: > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1225344599 25200 > > # Node ID 2c9e9038145f1177e5e61258ea44da9c61dc1647 > > # Parent 408dbb3a61b43bd0def587a9ea7e648105def002 > > [TEST] Delete the functions have been removed to xm_virt_util.py > and update common_util.py > > > > Signed-off-by: Guolian Yun > > > > This patch looks good, but a fair number of tests fail because they are > dependent on live.py. Can you update the following tests? After that, > I'll apply this patch. Thanks! Sure, I think you forgot to update the cimtest in the repository. May I update all the following tests next Monday? Thanks! > > RedirectionService - 01_enum_crs.py: FAIL > Traceback (most recent call last): > File "01_enum_crs.py", line 29, in > from VirtLib.live import domain_list > ImportError: cannot import name domain_list > -------------------------------------------------------------------- > RedirectionService - 02_enum_crscap.py: FAIL > Traceback (most recent call last): > File "02_enum_crscap.py", line 29, in > from VirtLib.live import domain_list > ImportError: cannot import name domain_list > -------------------------------------------------------------------- > SystemDevice - 01_forward.py: FAIL > ERROR - NameError : name 'KVM_NetworkPort' is not defined > Traceback (most recent call last): > File > "/data/users/kaitlin/sandbox/cimtest/suites/libvirt- > cim/lib/XenKvmLib/const.py", > line 116, in do_try > rc = f() > File "01_forward.py", line 92, in main > device = devices.device_of(options.ip, key_list) > File > "/data/users/kaitlin/sandbox/cimtest/suites/libvirt- > cim/lib/XenKvmLib/devices.py", > line 48, in device_of > t = eval(key_list["CreationClassName"]) > File "", line 1, in > NameError: name 'KVM_NetworkPort' is not defined > ERROR - None > -------------------------------------------------------------------- > VSSD - 01_enum.py: FAIL > ERROR - Exception 'module' object has no attribute 'domain_list' > -------------------------------------------------------------------- > VSSD - 02_bootldr.py: FAIL > Traceback (most recent call last): > File "02_bootldr.py", line 33, in > from VirtLib.live import bootloader > ImportError: cannot import name bootloader > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: FAIL > Traceback (most recent call last): > File "06_addresource.py", line 35, in > from XenKvmLib import vsms_util > File > "/data/users/kaitlin/sandbox/cimtest/suites/libvirt- > cim/lib/XenKvmLib/vsms_util.py", > line 27, in > from VirtLib.live import network_by_bridge, virsh_vcpuinfo, \ > ImportError: cannot import name network_by_bridge > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: FAIL > Traceback (most recent call last): > File "08_modifyresource.py", line 35, in > from XenKvmLib import vsms_util > File > "/data/users/kaitlin/sandbox/cimtest/suites/libvirt- > cim/lib/XenKvmLib/vsms_util.py", > line 27, in > from VirtLib.live import network_by_bridge, virsh_vcpuinfo, \ > ImportError: cannot import name network_by_bridge > -------------------------------------------------------------------- > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > Traceback (most recent call last): > File "01_migratable_host.py", line 32, in > from XenKvmLib import vsmigrations > File > "/data/users/kaitlin/sandbox/cimtest/suites/libvirt- > cim/lib/XenKvmLib/vsmigrations.py", > line 30, in > from VirtLib.live import domain_list > ImportError: cannot import name domain_list > -------------------------------------------------------------------- > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > Traceback (most recent call last): > File "02_host_migrate_type.py", line 30, in > from XenKvmLib import vsmigrations > File > "/data/users/kaitlin/sandbox/cimtest/suites/libvirt- > cim/lib/XenKvmLib/vsmigrations.py", > line 30, in > from VirtLib.live import domain_list > ImportError: cannot import name domain_list > -------------------------------------------------------------------- > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > Traceback (most recent call last): > File "05_migratable_host_errs.py", line 28, in > from XenKvmLib import vsmigrations > File > "/data/users/kaitlin/sandbox/cimtest/suites/libvirt- > cim/lib/XenKvmLib/vsmigrations.py", > line 30, in > from VirtLib.live import domain_list > ImportError: cannot import name domain_list > -------------------------------------------------------------------- > VSSD - 01_enum.py: FAIL > ERROR - Exception 'module' object has no attribute 'domain_list' > -------------------------------------------------------------------- > VSSD - 02_bootldr.py: FAIL > Traceback (most recent call last): > File "02_bootldr.py", line 33, in > from VirtLib.live import bootloader > ImportError: cannot import name bootloader > -------------------------------------------------------------------- > > -- > 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 Fri Oct 31 11:37:14 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 31 Oct 2008 17:07:14 +0530 Subject: [Libvirt-cim] make postinstall error Message-ID: <490AEDEA.4050502@linux.vnet.ibm.com> Hi, I see the following postinstall error: Parsing error: parse error: Error adding class Xen_ResourceAllocationSettingData to the repository: CIM_ERR_CLASS_HAS_CHILDREN: Xen_ResourceAllocationSettingData Here is the description and the probable solution for it: CIM_ERR_CLASS_HAS_CHILDREN *Description: * This error message uses one parameter, {0}, which is replaced by the class name. *Cause: * This exception is thrown by the CIMOM to disallow invalidation of the subclasses by a superclass deletion. Clients must explicitly delete the subclasses first. The check for subclasses is made before the check for class instances. *Solution: * Remove the subclasses of the given class. Here is the list of RASD related classes and subclasses. wbemcli ecn http://u:p at localhost/root/virt | grep ResourceAllocationSettingData localhost:5988/root/virt:LXC_InputResourceAllocationSettingData localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData localhost:5988/root/virt:LXC_GraphicsResourceAllocationSettingData localhost:5988/root/virt:Xen_GraphicsResourceAllocationSettingData localhost:5988/root/virt:Xen_InputResourceAllocationSettingData localhost:5988/root/virt:CIM_ResourceAllocationSettingData localhost:5988/root/virt:KVM_ResourceAllocationSettingData localhost:5988/root/virt:KVM_InputResourceAllocationSettingData localhost:5988/root/virt:LXC_ResourceAllocationSettingData localhost:5988/root/virt:Xen_ResourceAllocationSettingData I tried modifying the mof file, Makefile but nothing worked. I also made sure there were no RASD subclasses like DiskRASD and alike before postinstall as suggested above, but nothing worked. Can you suggest how and why we could be facing this error. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Fri Oct 31 13:16:17 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 31 Oct 2008 18:46:17 +0530 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Oct 31 2008 [ with F9 rpm ] Message-ID: <490B0521.6050502@linux.vnet.ibm.com> ================================================= KVM on Pegasus Test Run Summary for Oct 31 2008 ================================================= Distro: Fedora release 9 (Sulphur) Kernel: 2.6.25.14-108.fc9.x86_64 libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 712 Libvirt-cim changeset: 668097d4b27c ================================================= FAIL : 3 XFAIL : 2 SKIP : 6 PASS : 127 ----------------- Total : 138 ================================================= FAIL Test Summary: RedirectionService - 01_enum_crs.py: FAIL SystemDevice - 01_forward.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP 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: 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: 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: 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: 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 -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: FAIL ERROR - 'MaxConcurrentEnabledSAPs' Mismatch ERROR - Expected '65535', Got '2' CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.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: FAIL ERROR - NameError : name 'KVM_NetworkPort' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 116, in do_try File "01_forward.py", line 92, in main device = devices.device_of(options.ip, key_list) File "./lib/XenKvmLib/devices.py", line 48, in device_of File "", line 1, in NameError: name 'KVM_NetworkPort' is not defined ERROR - None -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Unexpected rc code 1 and description: CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD ERROR - Unable to define rstest_disk_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Memory RASD -------------------------------------------------------------------- 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 -------------------------------------------------------------------- Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Fri Oct 31 13:30:46 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 31 Oct 2008 19:00:46 +0530 Subject: [Libvirt-cim] Re: KVM on Pegasus Test Run Summary for Oct 31 2008 [ with F9 rpm ] In-Reply-To: <490B0521.6050502@linux.vnet.ibm.com> References: <490B0521.6050502@linux.vnet.ibm.com> Message-ID: <490B0886.2020508@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > KVM on Pegasus Test Run Summary for Oct 31 2008 > ================================================= > Distro: Fedora release 9 (Sulphur) > Kernel: 2.6.25.14-108.fc9.x86_64 > libvirt: 0.4.4 > Hypervisor: QEMU 0.9.1 > CIMOM: Pegasus 2.7.0 > Libvirt-cim revision: 712 > Libvirt-cim changeset: 668097d4b27c > ================================================= > FAIL : 3 > XFAIL : 2 > SKIP : 6 > PASS : 127 > ----------------- > Total : 138 > ================================================= > FAIL Test Summary: > RedirectionService - 01_enum_crs.py: FAIL The tc assumes MaxConcurrentEnabledSAPs = 65535, this is in accordance with the latest libvirt-cim changes. These changes are not present in the rpm installed on the machine. The provider assigns the following values with the current F9 rpm: 2 * list of *defined* domains and it does not take into account the *active *domains. Is this right ? > SystemDevice - 01_forward.py: FAIL This tc is failing due to the recent changes to the devices.py. > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL > > Thanks and Regards, Deepti. From kaitlin at linux.vnet.ibm.com Fri Oct 31 14:45:15 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 31 Oct 2008 07:45:15 -0700 Subject: [Libvirt-cim] Documents about CIM structure In-Reply-To: <490A4413.5080306@np.css.fujitsu.com> References: <490A4413.5080306@np.css.fujitsu.com> Message-ID: <490B19FB.4010700@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > Hi, > I'm researching the CIM's structure of classes. > Would you have something documents of it? > (ex. class tree..) > > Works for me. > We don't have any documents the include the class trees. However, all of the profiles have a class diagram, which may be what you're looking for. The profiles we support currently can be discovered using: wbemcli ein http://localhost/root/interop:Xen_RegisteredProfile You can look up the profile documents at: http://www.dmtf.org/standards/profiles/ Let me know if this isn't what you're looking for. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Fri Oct 31 15:28:50 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 31 Oct 2008 08:28:50 -0700 Subject: [Libvirt-cim] [PATCH] Add support for graphics device to Virt_RASD.c In-Reply-To: <8b08dc1aa0f1cab258bc.1225210809@localhost.localdomain> (Kaitlin Rupert's message of "Tue, 28 Oct 2008 09:20:09 -0700") References: <8b08dc1aa0f1cab258bc.1225210809@localhost.localdomain> Message-ID: <87ej1wvl59.fsf@caffeine.danplanet.com> KR> # HG changeset patch KR> # User Kaitlin Rupert KR> # Date 1224705263 25200 KR> # Node ID 8b08dc1aa0f1cab258bc23e7f80e210761be187d KR> # Parent 52bef91a7296c176c1dcd732a25ea1c9146773ff KR> Add support for graphics device to Virt_RASD.c This looks like a good start, but I think that before we put it in, we should have all of our associations updated as well to provide the appropriate linkage. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Fri Oct 31 15:30:49 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 31 Oct 2008 08:30:49 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] (#2) Add input device support to device_parsing and Virt_Device In-Reply-To: <468f398f95b0d521c811.1225318512@localhost.localdomain> (Kaitlin Rupert's message of "Wed, 29 Oct 2008 15:15:12 -0700") References: <468f398f95b0d521c811.1225318512@localhost.localdomain> Message-ID: <87abckvl1y.fsf@caffeine.danplanet.com> KR> # HG changeset patch KR> # User Kaitlin Rupert KR> # Date 1224692656 25200 KR> # Node ID 468f398f95b0d521c811f91143b1e5d8809c4a95 KR> # Parent e53b108e82fc54142208dd48a6edd07c2eae0a68 KR> (#2) Add input device support to device_parsing and Virt_Device. I think with this one as well, before we expose a new device in Virt_Device, we want to have the corresponding RASD and the associations to link them all. What do you think? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 31 15:10:31 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 31 Oct 2008 08:10:31 -0700 Subject: [Libvirt-cim] Re: KVM on Pegasus Test Run Summary for Oct 31 2008 [ with F9 rpm ] In-Reply-To: <490B0886.2020508@linux.vnet.ibm.com> References: <490B0521.6050502@linux.vnet.ibm.com> <490B0886.2020508@linux.vnet.ibm.com> Message-ID: <490B1FE7.2020100@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Deepti B Kalakeri wrote: >> ================================================= >> KVM on Pegasus Test Run Summary for Oct 31 2008 >> ================================================= >> Distro: Fedora release 9 (Sulphur) >> Kernel: 2.6.25.14-108.fc9.x86_64 >> libvirt: 0.4.4 >> Hypervisor: QEMU 0.9.1 >> CIMOM: Pegasus 2.7.0 >> Libvirt-cim revision: 712 >> Libvirt-cim changeset: 668097d4b27c >> ================================================= >> FAIL : 3 >> XFAIL : 2 >> SKIP : 6 >> PASS : 127 >> ----------------- >> Total : 138 >> ================================================= >> FAIL Test Summary: >> RedirectionService - 01_enum_crs.py: FAIL > The tc assumes MaxConcurrentEnabledSAPs = 65535, this is in accordance > with the latest libvirt-cim changes. > These changes are not present in the rpm installed on the machine. > The provider assigns the following values with the current F9 rpm: > > 2 * list of *defined* domains > > and it does not take into account the *active *domains. Is this right ? Yes - that's correct. There was a bug in the provider. Can you work up a fix for this test - you'll need to check the revision number and then have the test check a different value depending on the revision of the the providers. >> SystemDevice - 01_forward.py: FAIL > This tc is failing due to the recent changes to the devices.py. Same here for this one. >> VirtualSystemManagementService - 14_define_sys_disk.py: FAIL >> Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 31 16:40:19 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 31 Oct 2008 09:40:19 -0700 Subject: [Libvirt-cim] make postinstall error In-Reply-To: <490AEDEA.4050502@linux.vnet.ibm.com> References: <490AEDEA.4050502@linux.vnet.ibm.com> Message-ID: <490B34F3.5020706@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > Hi, > > > I see the following postinstall error: > > Parsing error: parse error: Error adding class > Xen_ResourceAllocationSettingData to the repository: > CIM_ERR_CLASS_HAS_CHILDREN: Xen_ResourceAllocationSettingData > > Here is the description and the probable solution for it: > > CIM_ERR_CLASS_HAS_CHILDREN > > I tried modifying the mof file, Makefile but nothing worked. > I also made sure there were no RASD subclasses like DiskRASD and alike > before postinstall as suggested above, but nothing worked. > Can you suggest how and why we could be facing this error. This is caused by the way the providers are unregistered is handled in "make preuninstall". The RASDs are defined in on mof / registration file. So when the RASD classes are registered, <>_ResourceAllocationSettingData gets registered before <>_ProcResourceAllocationSettingData (etc). When the providers are unregistered, <>_ResourceAllocationSettingData is unregistered first because it's first in the mof file. However, it can't be unregistered because <>_ProcResourceAllocationSettingData (etc) are still registered, so it gets left behind. The next time you go to post install, <>_ResourceAllocationSettingData is already there because it wasn't cleaned up properly beforehand. There's an ugly way to handle this in the Makefile. I'll see if I can come up with a cleaner way to do this and then submit a patch. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Oct 31 17:29:45 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 31 Oct 2008 10:29:45 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 01_enum_crs.py of RedirectionService Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225474164 25200 # Node ID e3bfd8360898b9b7a940d170667638c487793883 # Parent d1614c101c281b57bd2bc98dfb6625f790748e54 [TEST] Updating 01_enum_crs.py of RedirectionService . Updating 01_enum_crs.py to use appropriate 'MaxConcurrentEnabledSAPs' depending on the revision of provider < 723 Signed-off-by: Deepti B. Kalakeri diff -r d1614c101c28 -r e3bfd8360898 suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py --- a/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Fri Oct 31 10:29:24 2008 -0700 @@ -26,17 +26,19 @@ # import sys -from VirtLib.live import domain_list +from sets import Set +from XenKvmLib.xm_virt_util import domain_list, active_domain_list from XenKvmLib.enumclass import EnumInstances from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib.classes import get_typed_class from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import get_host_info +from XenKvmLib.const import get_provider_version SHAREMODE = 3 REDIRECTION_SER_TYPE = 3 -MAX_SAP_SESSIONS = 65535 +CRS_MAX_SAP_REV = 723 sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) @@ -50,6 +52,19 @@ cname = 'ConsoleRedirectionService' classname = get_typed_class(virt, cname) + + cim_rev, changeset = get_provider_version(virt, server) + # This branch should be removed once the F9 rpm has changes with + # Revision >= 723, and max_sap_sessions = 65535 should be used + # for verification. + if cim_rev < CRS_MAX_SAP_REV: + inactive_active_doms = domain_list(server, virt) + active_doms = active_domain_list(server, virt) + inactive_doms = len(Set(inactive_active_doms) - Set(active_doms)) + max_sap_sessions = 2 * inactive_doms + else: + max_sap_sessions = 65535 + crs_list = { 'ElementName' : cname, 'SystemCreationClassName' : host_cn, @@ -61,7 +76,7 @@ 'EnabledState' : 2, 'EnabledDefault' : 2, 'RequestedState' : 12, - 'MaxConcurrentEnabledSAPs': MAX_SAP_SESSIONS + 'MaxConcurrentEnabledSAPs': max_sap_sessions } try: From kaitlin at linux.vnet.ibm.com Fri Oct 31 19:18:17 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 31 Oct 2008 12:18:17 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] (#2) Add input device support to device_parsing and Virt_Device In-Reply-To: <87abckvl1y.fsf@caffeine.danplanet.com> References: <468f398f95b0d521c811.1225318512@localhost.localdomain> <87abckvl1y.fsf@caffeine.danplanet.com> Message-ID: <490B59F9.6060804@linux.vnet.ibm.com> Dan Smith wrote: > KR> # HG changeset patch > KR> # User Kaitlin Rupert > KR> # Date 1224692656 25200 > KR> # Node ID 468f398f95b0d521c811f91143b1e5d8809c4a95 > KR> # Parent e53b108e82fc54142208dd48a6edd07c2eae0a68 > KR> (#2) Add input device support to device_parsing and Virt_Device. > > I think with this one as well, before we expose a new device in > Virt_Device, we want to have the corresponding RASD and the > associations to link them all. > > What do you think? > Sure, this sounds good. Since the graphics device is already in place, I'll do all the updates for it. Then I'll send the input device / rasd / association updates in a patchset. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 31 20:14:33 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 31 Oct 2008 13:14:33 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Delete the functions have been removed to xm_virt_util.py and update common_util.py In-Reply-To: References: Message-ID: <490B6729.1080502@linux.vnet.ibm.com> > > This patch looks good, but a fair number of tests fail because they are > > dependent on live.py. Can you update the following tests? After that, > > I'll apply this patch. Thanks! > > Sure, I think you forgot to update the cimtest in the repository. May I > update all the following tests next Monday? > > Thanks! Sure - sounds good. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Oct 31 20:30:12 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 31 Oct 2008 13:30:12 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Update associations to support GraphicsRASD & DisplayController In-Reply-To: Message-ID: <679af3108aa161d77f76.1225485012@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225483570 25200 # Node ID 679af3108aa161d77f76e9220dd866cafb1d9615 # Parent d596bd28133bc08ff45efe70423a43a8e7ce9ea4 Update associations to support GraphicsRASD & DisplayController. Signed-off-by: Kaitlin Rupert diff -r d596bd28133b -r 679af3108aa1 src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Wed Oct 22 12:54:23 2008 -0700 +++ b/src/Virt_ElementSettingData.c Fri Oct 31 13:06:10 2008 -0700 @@ -127,14 +127,17 @@ "Xen_MemResourceAllocationSettingData", "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", + "Xen_GraphicsResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", + "KVM_GraphicsResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", + "LXC_GraphicsResourceAllocationSettingData", NULL }; diff -r d596bd28133b -r 679af3108aa1 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Wed Oct 22 12:54:23 2008 -0700 +++ b/src/Virt_SettingsDefineState.c Fri Oct 31 13:06:10 2008 -0700 @@ -326,14 +326,17 @@ "Xen_Memory", "Xen_NetworkPort", "Xen_LogicalDisk", + "Xen_DisplayController", "KVM_Processor", "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", + "KVM_DisplayController", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", "LXC_LogicalDisk", + "LXC_DisplayController", NULL }; @@ -342,14 +345,17 @@ "Xen_MemResourceAllocationSettingData", "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", + "Xen_GraphicsResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", + "KVM_GraphicsResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", + "LXC_GraphicsResourceAllocationSettingData", NULL }; diff -r d596bd28133b -r 679af3108aa1 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Wed Oct 22 12:54:23 2008 -0700 +++ b/src/Virt_SystemDevice.c Fri Oct 31 13:06:10 2008 -0700 @@ -134,14 +134,17 @@ "Xen_Memory", "Xen_NetworkPort", "Xen_LogicalDisk", + "Xen_DisplayController", "KVM_Processor", "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", + "KVM_DisplayController", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", "LXC_LogicalDisk", + "LXC_DisplayController", NULL }; diff -r d596bd28133b -r 679af3108aa1 src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Wed Oct 22 12:54:23 2008 -0700 +++ b/src/Virt_VSSDComponent.c Fri Oct 31 13:06:10 2008 -0700 @@ -131,14 +131,17 @@ "Xen_MemResourceAllocationSettingData", "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", + "Xen_GraphicsResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", + "KVM_GraphicsResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", + "LXC_GraphicsResourceAllocationSettingData", NULL }; From kaitlin at linux.vnet.ibm.com Fri Oct 31 20:30:10 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 31 Oct 2008 13:30:10 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add GraphicsRASD - update related associations Message-ID: Not all of the associations that take a RASD were updated because there's currently no resource pool for DisplayController devices. From kaitlin at linux.vnet.ibm.com Fri Oct 31 20:30:11 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 31 Oct 2008 13:30:11 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add support for graphics device to Virt_RASD.c In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1224705263 25200 # Node ID d596bd28133bc08ff45efe70423a43a8e7ce9ea4 # Parent 3d734d8e65009230d91887b934567d3f4548d1ba Add support for graphics device to Virt_RASD.c Also add field for a hostname / IP address to the graphics struct. This field is for storing the console's listen address. This will allow the user to set a specific address to listen on, in addition to a specific port. Signed-off-by: Kaitlin Rupert diff -r 3d734d8e6500 -r d596bd28133b libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.c Wed Oct 22 12:54:23 2008 -0700 @@ -76,6 +76,7 @@ { free(dev->type); free(dev->port); + free(dev->host); } static void cleanup_input_device(struct input_device *dev) @@ -447,9 +448,13 @@ gdev->type = get_attr_value(node, "type"); gdev->port = get_attr_value(node, "port"); + gdev->host = get_attr_value(node, "listen"); if ((gdev->type == NULL) || (gdev->port == NULL)) goto err; + + if (gdev->host == NULL) + gdev->host = strdup("127.0.0.1"); vdev->type = CIM_RES_TYPE_GRAPHICS; vdev->id = strdup("graphics"); @@ -665,6 +670,7 @@ } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { DUP_FIELD(dev, _dev, dev.graphics.type); DUP_FIELD(dev, _dev, dev.graphics.port); + DUP_FIELD(dev, _dev, dev.graphics.host); } else if (dev->type == CIM_RES_TYPE_INPUT) { DUP_FIELD(dev, _dev, dev.input.type); DUP_FIELD(dev, _dev, dev.input.bus); diff -r 3d734d8e6500 -r d596bd28133b libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Wed Oct 22 09:24:16 2008 -0700 +++ b/libxkutil/device_parsing.h Wed Oct 22 12:54:23 2008 -0700 @@ -62,6 +62,7 @@ struct graphics_device { char *type; char *port; + char *host; }; struct input_device { diff -r 3d734d8e6500 -r d596bd28133b schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Wed Oct 22 09:24:16 2008 -0700 +++ b/schema/ResourceAllocationSettingData.mof Wed Oct 22 12:54:23 2008 -0700 @@ -115,3 +115,25 @@ class LXC_MemResourceAllocationSettingData : LXC_ResourceAllocationSettingData { }; + +[Description ("Xen virtual graphics device"), + Provider("cmpi::Virt_RASD") +] +class Xen_GraphicsResourceAllocationSettingData : Xen_ResourceAllocationSettingData +{ +}; + +[Description ("KVM virtual graphics device"), + Provider("cmpi::Virt_RASD") +] +class KVM_GraphicsResourceAllocationSettingData : KVM_ResourceAllocationSettingData +{ +}; + +[Description ("LXC virtual graphics device"), + Provider("cmpi::Virt_RASD") +] +class LXC_GraphicsResourceAllocationSettingData : LXC_ResourceAllocationSettingData +{ +}; + diff -r 3d734d8e6500 -r d596bd28133b schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Wed Oct 22 09:24:16 2008 -0700 +++ b/schema/ResourceAllocationSettingData.registration Wed Oct 22 12:54:23 2008 -0700 @@ -4,10 +4,13 @@ Xen_NetResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance Xen_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance Xen_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +Xen_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance KVM_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance KVM_NetResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance KVM_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance KVM_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +KVM_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_MemResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_DiskResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance LXC_ProcResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance +LXC_GraphicsResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance diff -r 3d734d8e6500 -r d596bd28133b src/Virt_RASD.c --- a/src/Virt_RASD.c Wed Oct 22 09:24:16 2008 -0700 +++ b/src/Virt_RASD.c Wed Oct 22 12:54:23 2008 -0700 @@ -247,6 +247,29 @@ return s; } +static CMPIStatus set_graphics_rasd_params(const struct virt_device *dev, + CMPIInstance *inst) +{ + int rc; + char *addr_str = NULL; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + rc = asprintf(&addr_str, + "%s:%s", + dev->dev.graphics.host, + dev->dev.graphics.port); + if (rc == -1) { + goto out; + } + + CMSetProperty(inst, "Address", (CMPIValue *)addr_str, CMPI_chars); + + out: + free(addr_str); + + return s; +} + static CMPIInstance *rasd_from_vdev(const CMPIBroker *broker, struct virt_device *dev, const char *host, @@ -272,6 +295,9 @@ } else if (dev->type == CIM_RES_TYPE_MEM) { type = CIM_RES_TYPE_MEM; base = "MemResourceAllocationSettingData"; + } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { + type = CIM_RES_TYPE_GRAPHICS; + base = "GraphicsResourceAllocationSettingData"; } else { return NULL; } @@ -320,6 +346,8 @@ (CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64); } else if (dev->type == CIM_RES_TYPE_PROC) { set_proc_rasd_params(broker, ref, dev, host, inst); + } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { + s = set_graphics_rasd_params(dev, inst); } /* FIXME: Put the HostResource in place */ @@ -441,6 +469,8 @@ *type = CIM_RES_TYPE_PROC; else if (STREQ(base, "MemResourceAllocationSettingData")) *type = CIM_RES_TYPE_MEM; + else if (STREQ(base, "GraphicsResourceAllocationSettingData")) + *type = CIM_RES_TYPE_GRAPHICS; else goto out; @@ -468,6 +498,9 @@ break; case CIM_RES_TYPE_DISK: *classname = "DiskResourceAllocationSettingData"; + break; + case CIM_RES_TYPE_GRAPHICS: + *classname = "GraphicsResourceAllocationSettingData"; break; default: rc = CMPI_RC_ERR_FAILED;