From deeptik at linux.vnet.ibm.com Sat Nov 1 19:36:22 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sat, 01 Nov 2008 12:36:22 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 01_forward.py tc of SystemDevice Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225568161 25200 # Node ID e92fbb2fe87e11509a5d506f4529368f97ee59cd # Parent d1614c101c281b57bd2bc98dfb6625f790748e54 [TEST] Fixing 01_forward.py tc of SystemDevice. Signed-off-by: Deepti B. Kalakeri diff -r d1614c101c28 -r e92fbb2fe87e suites/libvirt-cim/cimtest/SystemDevice/01_forward.py --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Sat Nov 01 12:36:01 2008 -0700 @@ -28,7 +28,6 @@ from VirtLib import utils from XenKvmLib import assoc from XenKvmLib import vxml -from XenKvmLib import devices from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -54,7 +53,8 @@ if options.virt == 'LXC': cxml = virt_xml(test_dom) else: - cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, disk = test_disk) + cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, + disk = test_disk) ret = cxml.create(options.ip) if not ret: logger.error('Unable to create domain %s' % test_dom) @@ -67,39 +67,36 @@ Name=test_dom, CreationClassName=cs_classname) if devs == None: logger.error("System association failed") - return FAIL - elif len(devs) == 0: - logger.error("No devices returned") + cxml.destroy(options.ip) + cxml.undefine(options.ip) return FAIL + if len(devs) == 0: + logger.error("No devices returned") + cxml.destroy(options.ip) + cxml.undefine(options.ip) + return FAIL + + net_cn = get_typed_class(options.virt, "NetworkPort") + mem_cn = get_typed_class(options.virt, "Memory") + disk_cn = get_typed_class(options.virt, "LogicalDisk") + proc_cn = get_typed_class(options.virt, "Processor") cn_devid = { - get_typed_class(options.virt, "NetworkPort") : '%s/%s' % (test_dom, test_mac), - get_typed_class(options.virt, "Memory") : '%s/mem' % test_dom, - get_typed_class(options.virt, "LogicalDisk") : '%s/%s' % (test_dom, test_disk), - get_typed_class(options.virt, "Processor") : '%s/%s' % (test_dom, test_cpu-1) - } + net_cn : '%s/%s' % (test_dom, test_mac), + mem_cn : '%s/mem' % test_dom, + disk_cn : '%s/%s' % (test_dom, test_disk), + proc_cn : '%s/%s' % (test_dom, test_cpu-1) + } - key_list = {'DeviceID' : '', - 'CreationClassName' : '', - 'SystemName' : test_dom, - 'SystemCreationClassname' : cs_classname - } - - for dev_cn in cn_devid.keys(): - for dev in devs: - key_list['CreationClassName'] = dev['CreationClassname'] - key_list['DeviceID'] = dev['DeviceID'] - device = devices.device_of(options.ip, key_list) - if device.CreationClassName != dev_cn: - continue - devid = device.DeviceID - - _devid = cn_devid[dev_cn] - if devid != _devid: - logger.error("DeviceID `%s` != `%s'" % (devid, _devid)) - status = FAIL - else: - logger.info("Examined %s" % _devid) + for dev in devs: + dev_cn = dev['CreationClassname'] + devid = dev['DeviceID'] + _devid = cn_devid[dev_cn] + if devid != _devid: + logger.error("DeviceID `%s` != `%s'" % (devid, _devid)) + status = FAIL + else: + logger.info("Examined %s" % _devid) cxml.destroy(options.ip) cxml.undefine(options.ip) From deeptik at linux.vnet.ibm.com Sat Nov 1 19:49:16 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Sun, 02 Nov 2008 01:19:16 +0530 Subject: [Libvirt-cim] Re: KVM on Pegasus Test Run Summary for Oct 31 2008 [ with F9 rpm ] In-Reply-To: <490B1FE7.2020100@linux.vnet.ibm.com> References: <490B0521.6050502@linux.vnet.ibm.com> <490B0886.2020508@linux.vnet.ibm.com> <490B1FE7.2020100@linux.vnet.ibm.com> Message-ID: <490CB2BC.1040706@linux.vnet.ibm.com> Kaitlin Rupert wrote: > 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. Fix submitted for this. > >>> SystemDevice - 01_forward.py: FAIL >> This tc is failing due to the recent changes to the devices.py. > > Same here for this one. Fix submitted for this as well. > >>> VirtualSystemManagementService - 14_define_sys_disk.py: FAIL >>> > This tc was failing because of the tomof() function of the class CIMInstance() was missing the implementation that was required to convert the instance to mof representation. The tc now passes with the latest svn checkout of the pywbem installed on the machine. Thanks and Regards, Deepti. > Thanks! > From yunguol at cn.ibm.com Mon Nov 3 03:16:39 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 02 Nov 2008 19:16:39 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Delete the functions have been removed to xm_virt_util.py and update related tc and library Message-ID: # HG changeset patch # User Guolian Yun # Date 1225682193 28800 # Node ID a13401dd0d0f52a72e6d82f13c0b2142c47a869a # Parent d1614c101c281b57bd2bc98dfb6625f790748e54 [TEST]#2 Delete the functions have been removed to xm_virt_util.py and update related tc and library Signed-off-by: Guolian Yun diff -r d1614c101c28 -r a13401dd0d0f lib/VirtLib/live.py --- a/lib/VirtLib/live.py Wed Oct 29 20:11:47 2008 -0700 +++ b/lib/VirtLib/live.py Sun Nov 02 19:16:33 2008 -0800 @@ -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. """ @@ -180,75 +136,6 @@ 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 fv_cap(server): cmd = "egrep flags /proc/cpuinfo | uniq | egrep 'vmx|svm'" @@ -269,88 +156,3 @@ """To return the fully qualifiec domain name(FQDN) of the system""" 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 d1614c101c28 -r a13401dd0d0f 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 Sun Nov 02 19:16:33 2008 -0800 @@ -26,7 +26,7 @@ # import sys -from VirtLib.live import domain_list +from XenKvmLib.xm_virt_util import domain_list from XenKvmLib.enumclass import EnumInstances from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib.classes import get_typed_class diff -r d1614c101c28 -r a13401dd0d0f suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py --- a/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Sun Nov 02 19:16:33 2008 -0800 @@ -26,7 +26,7 @@ # import sys -from VirtLib.live import domain_list +from XenKvmLib.xm_virt_util import domain_list from XenKvmLib.enumclass import EnumInstances from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib.classes import get_typed_class diff -r d1614c101c28 -r a13401dd0d0f suites/libvirt-cim/cimtest/VSSD/01_enum.py --- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Sun Nov 02 19:16:33 2008 -0800 @@ -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 d1614c101c28 -r a13401dd0d0f suites/libvirt-cim/cimtest/VSSD/02_bootldr.py --- a/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/cimtest/VSSD/02_bootldr.py Sun Nov 02 19:16:33 2008 -0800 @@ -30,7 +30,7 @@ from XenKvmLib import enumclass from XenKvmLib.vxml import get_class from VirtLib import utils -from VirtLib.live import bootloader +from XenKvmLib.xm_virt_util import bootloader from XenKvmLib.test_doms import destroy_and_undefine_all from CimTest.Globals import logger from XenKvmLib.const import do_main diff -r d1614c101c28 -r a13401dd0d0f suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Sun Nov 02 19:16:33 2008 -0800 @@ -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 diff -r d1614c101c28 -r a13401dd0d0f suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Nov 02 19:16:33 2008 -0800 @@ -27,7 +27,7 @@ from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class -from VirtLib.live import domain_list +from XenKvmLib.xm_virt_util import domain_list class CIM_VirtualSystemMigrationService(CIMMethodClass): conn = None diff -r d1614c101c28 -r a13401dd0d0f suites/libvirt-cim/lib/XenKvmLib/vsms_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms_util.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms_util.py Sun Nov 02 19:16:33 2008 -0800 @@ -24,8 +24,8 @@ from CimTest import Globals from CimTest.ReturnCodes import FAIL, PASS from CimTest.Globals import logger -from VirtLib.live import network_by_bridge, virsh_vcpuinfo, \ - get_bridge_from_network_xml +from XenKvmLib.xm_virt_util import network_by_bridge, virsh_vcpuinfo, \ +get_bridge_from_network_xml def print_mod_err_msg(func_str, details): logger.error('Error invoking ModifyRS: %s' % func_str) From yunguol at cn.ibm.com Mon Nov 3 05:16:42 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 3 Nov 2008 13:16:42 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Nov 03 2008 Message-ID: ================================================= KVM on sfcb Test Run Summary for Nov 03 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 Cimtest revision: 467 Cimtest changeset: d1614c101c28 ================================================= FAIL : 8 XFAIL : 2 SKIP : 6 PASS : 123 ----------------- Total : 139 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.py: FAIL ElementCapabilities - 01_forward.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 SystemDevice - 01_forward.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.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: FAIL ERROR - 'KVM_ElementCapabilities' association classname error Class not found -------------------------------------------------------------------- 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: 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 - '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: 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: FAIL ERROR - Exception: details (1, u'*** Provider Virt_VirtualSystemManagementService(17897) exiting due to a SIGSEGV signal ') InvokeMethod(DefineSystem): *** Provider Virt_VirtualSystemManagementService(17897) exiting due to a SIGSEGV signal -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.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 Mon Nov 3 08:40:49 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 03 Nov 2008 00:40:49 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py Message-ID: <636e060429738891aae9.1225701649@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1225701642 28800 # Node ID 636e060429738891aae9d1c5ca43e12d1508773c # Parent d1614c101c281b57bd2bc98dfb6625f790748e54 [TEST] Move some functions from utils.py to xm_virt_util.py I will do below on the next: 1) Update common_util.py 2) Delete these functions in utils.py 3) Update all related tc Signed-off-by: Guolian Yun diff -r d1614c101c28 -r 636e06042973 suites/libvirt-cim/lib/XenKvmLib/test_doms.py --- a/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Mon Nov 03 00:40:42 2008 -0800 @@ -24,7 +24,7 @@ import tempfile import os from VirtLib import utils -from XenKvmLib.xm_virt_util import domain_list +from XenKvmLib.xm_virt_util import domain_list, virt2uri from CimTest.Globals import CIM_FUUID try: @@ -47,19 +47,19 @@ f.write(xml) f.close() - cmd = "virsh -c %s define %s" % (utils.virt2uri(virt), name) + cmd = "virsh -c %s define %s" % (virt2uri(virt), name) s, o = utils.run_remote(server, cmd) return s == 0 def undefine_test_domain(name, server, virt="Xen"): - cmd = "virsh -c %s undefine %s" % (utils.virt2uri(virt), name) + cmd = "virsh -c %s undefine %s" % (virt2uri(virt), name) s, o = utils.run_remote(server, cmd) return s == 0 def start_test_domain(name, server, virt="Xen"): - cmd = "virsh -c %s start %s" % (utils.virt2uri(virt), name) + cmd = "virsh -c %s start %s" % (virt2uri(virt), name) s, o = utils.run_remote(server, cmd) return s == 0 @@ -68,7 +68,7 @@ """Get a list of domid from virsh""" cmd = "virsh -c %s list 2>/dev/null | sed '1,2 d; /^$/d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: return None @@ -109,7 +109,7 @@ def viruuid(name, server, virt="Xen"): """Return domain uuid given domid or domname""" cmd = "virsh -c %s domuuid %s 2>/dev/null | sed '/^$/d'" % \ - (utils.virt2uri(virt), name) + (virt2uri(virt), name) ret, out = utils.run_remote(server, cmd) if ret == 0: return out.strip(" \n") @@ -120,7 +120,7 @@ """Destroy and undefine a domain. name could be domid or domname""" cmd = "virsh -c %s 'destroy %s ; undefine %s'" % \ - (utils.virt2uri(virt), name, name) + (virt2uri(virt), name, name) utils.run_remote(server, cmd) def destroy_and_undefine_all(server, virt="Xen", aggressive = False): @@ -154,7 +154,7 @@ else: name = xmlfile_domname - vcmd = "virsh -c %s %s %s" % (utils.virt2uri(virt), cmd, name) + vcmd = "virsh -c %s %s %s" % (virt2uri(virt), cmd, name) s, o = utils.run_remote(server, vcmd) if cmd == "define" or cmd == "create": f.close() @@ -165,7 +165,7 @@ Get the vcpu lists. The input is either the domid or domname. """ cmd = "virsh -c %s vcpuinfo %s | grep '^$' | wc -l" % \ - (utils.virt2uri(virt), name_id) + (virt2uri(virt), name_id) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -180,7 +180,7 @@ nf.write(net_xml) nf.flush() fname = nf.name - cmd = "virsh -c %s net-create %s" % (utils.virt2uri(virt), fname) + cmd = "virsh -c %s net-create %s" % (virt2uri(virt), fname) ret, out = utils.run_remote(server, cmd) nf.close() if ret != 0: diff -r d1614c101c28 -r 636e06042973 suites/libvirt-cim/lib/XenKvmLib/test_xml.py --- a/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Mon Nov 03 00:40:42 2008 -0800 @@ -35,7 +35,7 @@ from XenKvmLib.test_doms import set_uuid, create_vnet from VirtLib.live import available_bridges from XenKvmLib.xm_virt_util import net_list, get_bridge_from_network_xml, \ - bootloader + bootloader, virt2uri from CimTest.ReturnCodes import SKIP image_dir = "/tmp" @@ -201,7 +201,7 @@ def dumpxml(name, server, virt="Xen"): - cmd = "virsh -c %s dumpxml %s" % (utils.virt2uri(virt), name) + cmd = "virsh -c %s dumpxml %s" % (virt2uri(virt), name) s, o = utils.run_remote(server, cmd) if s == 0: return o diff -r d1614c101c28 -r 636e06042973 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Mon Nov 03 00:40:42 2008 -0800 @@ -63,7 +63,7 @@ """ guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' " - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) + rc, out = run_remote_guest(ip, vs_name, guest_cmd) if rc != 0: return None @@ -89,7 +89,7 @@ virt = "Xen" cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -109,7 +109,7 @@ virt = "Xen" cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -156,7 +156,7 @@ """Function to list active network""" names = [] cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -173,7 +173,7 @@ """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) + (virt2uri(virt), network) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -196,7 +196,7 @@ return None def virsh_version(server, virt="KVM"): - cmd = "virsh -c %s -v " % utils.virt2uri(virt) + cmd = "virsh -c %s -v " % virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: return None @@ -206,7 +206,7 @@ """Function to list active DiskPool list""" names = [] cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -221,7 +221,7 @@ return names def virsh_vcpuinfo(server, dom, virt="Xen"): - cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt), + cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (virt2uri(virt), dom) ret, out = utils.run_remote(server, cmd) if out.isdigit(): @@ -229,10 +229,70 @@ return None def get_hv_ver(server, virt="Xen"): - cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt) + cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" %virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret == 0: return out else: return None +def run_remote_guest(ip, domain, command): + """ Execute commands on remote guest console. + """ + + cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) + + return run_remote(ip, cmd) + + +def get_xmtest_files(ip, kernel): + # get the xm-test disk from morbo + rc, out = run_remote(ip, + "rm -rf /tmp/boot ; mkdir -p /tmp/boot /tmp/xmtest") + rc, out = run_remote(ip, + "cd /tmp/boot ; wget http://morbo.linux.ibm.com/pub/xmtest.disk.gz") + if rc != 0: + return 2, "fetching xmtest.disk failed:\n%s" % out + + # mount on /tmp/xmtest + rc, out = run_remote(ip, + "gzip -d /tmp/boot/xmtest.disk.gz ; mount -o loop /tmp/boot/xmtest.disk /tmp/xmtest") + if rc != 0: + run_remote(ip, "umount /tmp/xmtest") + return 2, "mounting xmtest.disk failed:\n%s" % out + + # We need "uname -r" to name the kernel correctly + rc, uname = run_remote(ip, "uname -r") + if rc != 0: + run_remote(ip, "umount /tmp/xmtest") + return 2, "uname failed:\n%s" % out + + # get the kernel binary, put in /tmp/boot + rc, out = run_remote(ip, + "wget %s -O /tmp/boot/vmlinuz-\`uname -r\`" % kernel) + if rc != 0: + run_remote(ip, "umount /tmp/xmtest") + return 2, "fetching kernel failed:\n%s" % out + + return 0, "" + +def customize_xmtest_ramdisk(ip): + # customize modules on xm-test ramdisk + # cd $xmtestdir/ramdisk ; bin/add_modules_to_initrd ; cd + rc, out = run_remote(ip, + "cd /tmp/xmtest/ramdisk ; bin/add_modules_to_initrd") + if rc != 0: + run_remote(ip, "umount /tmp/xmtest") + return 2, "customizing ramdisk failed:\n%s" % out + + return 0, "" + +def virt2uri(virt): + # convert cimtest --virt param string to libvirt uri + if virt == "Xen" or virt == "XenFV": + return "xen:///" + if virt == "KVM": + return "qemu:///system" + if virt == "LXC": + return "lxc:///system" + return "" diff -r d1614c101c28 -r 636e06042973 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/main.py Mon Nov 03 00:40:42 2008 -0800 @@ -36,6 +36,7 @@ default_pool_name from XenKvmLib.reporting import gen_report, send_report from VirtLib import utils +from XenKvmLib.xm_virt_util import virt2uri from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import create_netpool_conf, destroy_netpool, \ create_diskpool_conf, destroy_diskpool @@ -90,12 +91,12 @@ print "Cleaned log files." def pre_check(ip, virt): - cmd = "virsh -c %s list --all" % utils.virt2uri(virt) + cmd = "virsh -c %s list --all" % 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) + cmd = "virsh -c %s version" % virt2uri(virt) ret, out = utils.run_remote(ip, cmd) if ret != 0: return "Encountered an error querying libvirt with: %s" % cmd From yunguol at cn.ibm.com Mon Nov 3 08:57:39 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 3 Nov 2008 16:57:39 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py In-Reply-To: <636e060429738891aae9.1225701649@elm3b197.beaverton.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-03 16:40:49: > # HG changeset patch > # User Guolian Yun > # Date 1225701642 28800 > # Node ID 636e060429738891aae9d1c5ca43e12d1508773c > # Parent d1614c101c281b57bd2bc98dfb6625f790748e54 > [TEST] Move some functions from utils.py to xm_virt_util.py > > I will do below on the next: > 1) Update common_util.py > 2) Delete these functions in utils.py > 3) Update all related tc > > Signed-off-by: Guolian Yun > > diff -r d1614c101c28 -r 636e06042973 suites/libvirt- > cim/lib/XenKvmLib/test_doms.py > --- a/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Wed Oct 29 20: > 11:47 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Mon Nov 03 00: > 40:42 2008 -0800 > @@ -24,7 +24,7 @@ > import tempfile > import os > from VirtLib import utils > -from XenKvmLib.xm_virt_util import domain_list > +from XenKvmLib.xm_virt_util import domain_list, virt2uri > from CimTest.Globals import CIM_FUUID > > try: > @@ -47,19 +47,19 @@ > f.write(xml) > f.close() > > - cmd = "virsh -c %s define %s" % (utils.virt2uri(virt), name) > + cmd = "virsh -c %s define %s" % (virt2uri(virt), name) > s, o = utils.run_remote(server, cmd) > > return s == 0 > > def undefine_test_domain(name, server, virt="Xen"): > - cmd = "virsh -c %s undefine %s" % (utils.virt2uri(virt), name) > + cmd = "virsh -c %s undefine %s" % (virt2uri(virt), name) > s, o = utils.run_remote(server, cmd) > > return s == 0 > > def start_test_domain(name, server, virt="Xen"): > - cmd = "virsh -c %s start %s" % (utils.virt2uri(virt), name) > + cmd = "virsh -c %s start %s" % (virt2uri(virt), name) > s, o = utils.run_remote(server, cmd) > > return s == 0 > @@ -68,7 +68,7 @@ > """Get a list of domid from virsh""" > > cmd = "virsh -c %s list 2>/dev/null | sed '1,2 d; /^$/d'" % \ > - utils.virt2uri(virt) > + virt2uri(virt) > ret, out = utils.run_remote(server, cmd) > if ret != 0: > return None > @@ -109,7 +109,7 @@ > def viruuid(name, server, virt="Xen"): > """Return domain uuid given domid or domname""" > cmd = "virsh -c %s domuuid %s 2>/dev/null | sed '/^$/d'" % \ > - (utils.virt2uri(virt), name) > + (virt2uri(virt), name) > ret, out = utils.run_remote(server, cmd) > if ret == 0: > return out.strip(" \n") > @@ -120,7 +120,7 @@ > """Destroy and undefine a domain. > name could be domid or domname""" > cmd = "virsh -c %s 'destroy %s ; undefine %s'" % \ > - (utils.virt2uri(virt), name, name) > + (virt2uri(virt), name, name) > utils.run_remote(server, cmd) > > def destroy_and_undefine_all(server, virt="Xen", aggressive = False): > @@ -154,7 +154,7 @@ > else: > name = xmlfile_domname > > - vcmd = "virsh -c %s %s %s" % (utils.virt2uri(virt), cmd, name) > + vcmd = "virsh -c %s %s %s" % (virt2uri(virt), cmd, name) > s, o = utils.run_remote(server, vcmd) > if cmd == "define" or cmd == "create": > f.close() > @@ -165,7 +165,7 @@ > Get the vcpu lists. The input is either the domid or domname. > """ > cmd = "virsh -c %s vcpuinfo %s | grep '^$' | wc -l" % \ > - (utils.virt2uri(virt), name_id) > + (virt2uri(virt), name_id) > ret, out = utils.run_remote(server, cmd) > > if ret != 0: > @@ -180,7 +180,7 @@ > nf.write(net_xml) > nf.flush() > fname = nf.name > - cmd = "virsh -c %s net-create %s" % (utils.virt2uri(virt), fname) > + cmd = "virsh -c %s net-create %s" % (virt2uri(virt), fname) > ret, out = utils.run_remote(server, cmd) > nf.close() > if ret != 0: > diff -r d1614c101c28 -r 636e06042973 suites/libvirt- > cim/lib/XenKvmLib/test_xml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Wed Oct 29 20: > 11:47 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Mon Nov 03 00: > 40:42 2008 -0800 > @@ -35,7 +35,7 @@ > from XenKvmLib.test_doms import set_uuid, create_vnet > from VirtLib.live import available_bridges > from XenKvmLib.xm_virt_util import net_list, get_bridge_from_network_xml, \ > - bootloader > + bootloader, virt2uri > from CimTest.ReturnCodes import SKIP > > image_dir = "/tmp" > @@ -201,7 +201,7 @@ > > > def dumpxml(name, server, virt="Xen"): > - cmd = "virsh -c %s dumpxml %s" % (utils.virt2uri(virt), name) > + cmd = "virsh -c %s dumpxml %s" % (virt2uri(virt), name) > s, o = utils.run_remote(server, cmd) > if s == 0: > return o > diff -r d1614c101c28 -r 636e06042973 suites/libvirt- > cim/lib/XenKvmLib/xm_virt_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Oct 29 > 20:11:47 2008 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Mon Nov 03 > 00:40:42 2008 -0800 > @@ -63,7 +63,7 @@ > """ > > guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' " > - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) > + rc, out = run_remote_guest(ip, vs_name, guest_cmd) > > if rc != 0: > return None > @@ -89,7 +89,7 @@ > virt = "Xen" > > cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \ > - utils.virt2uri(virt) > + virt2uri(virt) > ret, out = utils.run_remote(server, cmd) > > if ret != 0: > @@ -109,7 +109,7 @@ > virt = "Xen" > > cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \ > - utils.virt2uri(virt) > + virt2uri(virt) > ret, out = utils.run_remote(server, cmd) > > if ret != 0: > @@ -156,7 +156,7 @@ > """Function to list active network""" > names = [] > cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \ > - utils.virt2uri(virt) > + virt2uri(virt) > ret, out = utils.run_remote(server, cmd) > > if ret != 0: > @@ -173,7 +173,7 @@ > """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) > + (virt2uri(virt), network) > ret, out = utils.run_remote(server, cmd) > > if ret != 0: > @@ -196,7 +196,7 @@ > return None > > def virsh_version(server, virt="KVM"): > - cmd = "virsh -c %s -v " % utils.virt2uri(virt) > + cmd = "virsh -c %s -v " % virt2uri(virt) > ret, out = utils.run_remote(server, cmd) > if ret != 0: > return None > @@ -206,7 +206,7 @@ > """Function to list active DiskPool list""" > names = [] > cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \ > - utils.virt2uri(virt) > + virt2uri(virt) > ret, out = utils.run_remote(server, cmd) > > if ret != 0: > @@ -221,7 +221,7 @@ > return names > > def virsh_vcpuinfo(server, dom, virt="Xen"): > - cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils. > virt2uri(virt), > + cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (virt2uri(virt), > dom) > ret, out = utils.run_remote(server, cmd) > if out.isdigit(): > @@ -229,10 +229,70 @@ > return None > > def get_hv_ver(server, virt="Xen"): > - cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" > % utils.virt2uri(virt) > + cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" > %virt2uri(virt) > ret, out = utils.run_remote(server, cmd) > if ret == 0: > return out > else: > return None > > +def run_remote_guest(ip, domain, command): > + """ Execute commands on remote guest console. > + """ > + > + cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) > + > + return run_remote(ip, cmd) > + > + Kaitlin, I think we can remove run_remote_guest to xm_virt_util.py under ../ libvirt-cim/lib/XenKvmLib, because it have to be used by live.py under lib/VirtLib. We have to make it stay in utils.py. Thoughts? If you agree to make it stay in utils.py, I will rework on this patch. Thanks! > +def get_xmtest_files(ip, kernel): > + # get the xm-test disk from morbo > + rc, out = run_remote(ip, > + "rm -rf /tmp/boot ; mkdir -p /tmp/boot /tmp/xmtest") > + rc, out = run_remote(ip, > + "cd /tmp/boot ; wget http://morbo.linux.ibm.com/pub/xmtest.disk.gz") > + if rc != 0: > + return 2, "fetching xmtest.disk failed:\n%s" % out > + > + # mount on /tmp/xmtest > + rc, out = run_remote(ip, > + "gzip -d /tmp/boot/xmtest.disk.gz ; mount -o loop > /tmp/boot/xmtest.disk /tmp/xmtest") > + if rc != 0: > + run_remote(ip, "umount /tmp/xmtest") > + return 2, "mounting xmtest.disk failed:\n%s" % out > + > + # We need "uname -r" to name the kernel correctly > + rc, uname = run_remote(ip, "uname -r") > + if rc != 0: > + run_remote(ip, "umount /tmp/xmtest") > + return 2, "uname failed:\n%s" % out > + > + # get the kernel binary, put in /tmp/boot > + rc, out = run_remote(ip, > + "wget %s -O /tmp/boot/vmlinuz-\`uname -r\`" % kernel) > + if rc != 0: > + run_remote(ip, "umount /tmp/xmtest") > + return 2, "fetching kernel failed:\n%s" % out > + > + return 0, "" > + > +def customize_xmtest_ramdisk(ip): > + # customize modules on xm-test ramdisk > + # cd $xmtestdir/ramdisk ; bin/add_modules_to_initrd ; cd > + rc, out = run_remote(ip, > + "cd /tmp/xmtest/ramdisk ; bin/add_modules_to_initrd") > + if rc != 0: > + run_remote(ip, "umount /tmp/xmtest") > + return 2, "customizing ramdisk failed:\n%s" % out > + > + return 0, "" > + > +def virt2uri(virt): > + # convert cimtest --virt param string to libvirt uri > + if virt == "Xen" or virt == "XenFV": > + return "xen:///" > + if virt == "KVM": > + return "qemu:///system" > + if virt == "LXC": > + return "lxc:///system" > + return "" > diff -r d1614c101c28 -r 636e06042973 suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Wed Oct 29 20:11:47 2008 -0700 > +++ b/suites/libvirt-cim/main.py Mon Nov 03 00:40:42 2008 -0800 > @@ -36,6 +36,7 @@ > default_pool_name > from XenKvmLib.reporting import gen_report, send_report > from VirtLib import utils > +from XenKvmLib.xm_virt_util import virt2uri > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.common_util import create_netpool_conf, destroy_netpool, \ > create_diskpool_conf, destroy_diskpool > @@ -90,12 +91,12 @@ > print "Cleaned log files." > > def pre_check(ip, virt): > - cmd = "virsh -c %s list --all" % utils.virt2uri(virt) > + cmd = "virsh -c %s list --all" % 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) > + cmd = "virsh -c %s version" % virt2uri(virt) > ret, out = utils.run_remote(ip, cmd) > if ret != 0: > return "Encountered an error querying libvirt with: %s" % 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 Mon Nov 3 09:13:40 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 3 Nov 2008 17:13:40 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-03 16:57:39: > > libvirt-cim-bounces at redhat.com wrote on 2008-11-03 16:40:49: > > > # HG changeset patch > > # User Guolian Yun > > # Date 1225701642 28800 > > # Node ID 636e060429738891aae9d1c5ca43e12d1508773c > > # Parent d1614c101c281b57bd2bc98dfb6625f790748e54 > > [TEST] Move some functions from utils.py to xm_virt_util.py > > > > I will do below on the next: > > 1) Update common_util.py > > 2) Delete these functions in utils.py > > 3) Update all related tc > > > > Signed-off-by: Guolian Yun > > > > diff -r d1614c101c28 -r 636e06042973 suites/libvirt- > > cim/lib/XenKvmLib/test_doms.py > > --- a/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Wed Oct 29 20: > > 11:47 2008 -0700 > > +++ b/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Mon Nov 03 00: > > 40:42 2008 -0800 > > @@ -24,7 +24,7 @@ > > import tempfile > > import os > > from VirtLib import utils > > -from XenKvmLib.xm_virt_util import domain_list > > +from XenKvmLib.xm_virt_util import domain_list, virt2uri > > from CimTest.Globals import CIM_FUUID > > > > try: > > @@ -47,19 +47,19 @@ > > f.write(xml) > > f.close() > > > > - cmd = "virsh -c %s define %s" % (utils.virt2uri(virt), name) > > + cmd = "virsh -c %s define %s" % (virt2uri(virt), name) > > s, o = utils.run_remote(server, cmd) > > > > return s == 0 > > > > def undefine_test_domain(name, server, virt="Xen"): > > - cmd = "virsh -c %s undefine %s" % (utils.virt2uri(virt), name) > > + cmd = "virsh -c %s undefine %s" % (virt2uri(virt), name) > > s, o = utils.run_remote(server, cmd) > > > > return s == 0 > > > > def start_test_domain(name, server, virt="Xen"): > > - cmd = "virsh -c %s start %s" % (utils.virt2uri(virt), name) > > + cmd = "virsh -c %s start %s" % (virt2uri(virt), name) > > s, o = utils.run_remote(server, cmd) > > > > return s == 0 > > @@ -68,7 +68,7 @@ > > """Get a list of domid from virsh""" > > > > cmd = "virsh -c %s list 2>/dev/null | sed '1,2 d; /^$/d'" % \ > > - utils.virt2uri(virt) > > + virt2uri(virt) > > ret, out = utils.run_remote(server, cmd) > > if ret != 0: > > return None > > @@ -109,7 +109,7 @@ > > def viruuid(name, server, virt="Xen"): > > """Return domain uuid given domid or domname""" > > cmd = "virsh -c %s domuuid %s 2>/dev/null | sed '/^$/d'" % \ > > - (utils.virt2uri(virt), name) > > + (virt2uri(virt), name) > > ret, out = utils.run_remote(server, cmd) > > if ret == 0: > > return out.strip(" \n") > > @@ -120,7 +120,7 @@ > > """Destroy and undefine a domain. > > name could be domid or domname""" > > cmd = "virsh -c %s 'destroy %s ; undefine %s'" % \ > > - (utils.virt2uri(virt), name, name) > > + (virt2uri(virt), name, name) > > utils.run_remote(server, cmd) > > > > def destroy_and_undefine_all(server, virt="Xen", aggressive = False): > > @@ -154,7 +154,7 @@ > > else: > > name = xmlfile_domname > > > > - vcmd = "virsh -c %s %s %s" % (utils.virt2uri(virt), cmd, name) > > + vcmd = "virsh -c %s %s %s" % (virt2uri(virt), cmd, name) > > s, o = utils.run_remote(server, vcmd) > > if cmd == "define" or cmd == "create": > > f.close() > > @@ -165,7 +165,7 @@ > > Get the vcpu lists. The input is either the domid or domname. > > """ > > cmd = "virsh -c %s vcpuinfo %s | grep '^$' | wc -l" % \ > > - (utils.virt2uri(virt), name_id) > > + (virt2uri(virt), name_id) > > ret, out = utils.run_remote(server, cmd) > > > > if ret != 0: > > @@ -180,7 +180,7 @@ > > nf.write(net_xml) > > nf.flush() > > fname = nf.name > > - cmd = "virsh -c %s net-create %s" % (utils.virt2uri(virt), fname) > > + cmd = "virsh -c %s net-create %s" % (virt2uri(virt), fname) > > ret, out = utils.run_remote(server, cmd) > > nf.close() > > if ret != 0: > > diff -r d1614c101c28 -r 636e06042973 suites/libvirt- > > cim/lib/XenKvmLib/test_xml.py > > --- a/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Wed Oct 29 20: > > 11:47 2008 -0700 > > +++ b/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Mon Nov 03 00: > > 40:42 2008 -0800 > > @@ -35,7 +35,7 @@ > > from XenKvmLib.test_doms import set_uuid, create_vnet > > from VirtLib.live import available_bridges > > from XenKvmLib.xm_virt_util import net_list, get_bridge_from_network_xml, \ > > - bootloader > > + bootloader, virt2uri > > from CimTest.ReturnCodes import SKIP > > > > image_dir = "/tmp" > > @@ -201,7 +201,7 @@ > > > > > > def dumpxml(name, server, virt="Xen"): > > - cmd = "virsh -c %s dumpxml %s" % (utils.virt2uri(virt), name) > > + cmd = "virsh -c %s dumpxml %s" % (virt2uri(virt), name) > > s, o = utils.run_remote(server, cmd) > > if s == 0: > > return o > > diff -r d1614c101c28 -r 636e06042973 suites/libvirt- > > cim/lib/XenKvmLib/xm_virt_util.py > > --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Oct 29 > > 20:11:47 2008 -0700 > > +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Mon Nov 03 > > 00:40:42 2008 -0800 > > @@ -63,7 +63,7 @@ > > """ > > > > guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' " > > - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) > > + rc, out = run_remote_guest(ip, vs_name, guest_cmd) > > > > if rc != 0: > > return None > > @@ -89,7 +89,7 @@ > > virt = "Xen" > > > > cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \ > > - utils.virt2uri(virt) > > + virt2uri(virt) > > ret, out = utils.run_remote(server, cmd) > > > > if ret != 0: > > @@ -109,7 +109,7 @@ > > virt = "Xen" > > > > cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \ > > - utils.virt2uri(virt) > > + virt2uri(virt) > > ret, out = utils.run_remote(server, cmd) > > > > if ret != 0: > > @@ -156,7 +156,7 @@ > > """Function to list active network""" > > names = [] > > cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \ > > - utils.virt2uri(virt) > > + virt2uri(virt) > > ret, out = utils.run_remote(server, cmd) > > > > if ret != 0: > > @@ -173,7 +173,7 @@ > > """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) > > + (virt2uri(virt), network) > > ret, out = utils.run_remote(server, cmd) > > > > if ret != 0: > > @@ -196,7 +196,7 @@ > > return None > > > > def virsh_version(server, virt="KVM"): > > - cmd = "virsh -c %s -v " % utils.virt2uri(virt) > > + cmd = "virsh -c %s -v " % virt2uri(virt) > > ret, out = utils.run_remote(server, cmd) > > if ret != 0: > > return None > > @@ -206,7 +206,7 @@ > > """Function to list active DiskPool list""" > > names = [] > > cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \ > > - utils.virt2uri(virt) > > + virt2uri(virt) > > ret, out = utils.run_remote(server, cmd) > > > > if ret != 0: > > @@ -221,7 +221,7 @@ > > return names > > > > def virsh_vcpuinfo(server, dom, virt="Xen"): > > - cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils. > > virt2uri(virt), > > + cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (virt2uri(virt), > > dom) > > ret, out = utils.run_remote(server, cmd) > > if out.isdigit(): > > @@ -229,10 +229,70 @@ > > return None > > > > def get_hv_ver(server, virt="Xen"): > > - cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" > > % utils.virt2uri(virt) > > + cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" > > %virt2uri(virt) > > ret, out = utils.run_remote(server, cmd) > > if ret == 0: > > return out > > else: > > return None > > > > +def run_remote_guest(ip, domain, command): > > + """ Execute commands on remote guest console. > > + """ > > + > > + cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) > > + > > + return run_remote(ip, cmd) > > + > > + > > Kaitlin, > > I think we can remove run_remote_guest to xm_virt_util.py under > ../libvirt-cim/lib/XenKvmLib, > because it have to be used by live.py under lib/VirtLib. We have > to make it stay in utils.py. I'm sorry, I intend to say we cann't remove run_remote_guest() from ../lib/XenKvmLib to xm_virt_util.py =) > Thoughts? > > If you agree to make it stay in utils.py, I will rework on this patch. > Thanks! > > > +def get_xmtest_files(ip, kernel): > > + # get the xm-test disk from morbo > > + rc, out = run_remote(ip, > > + "rm -rf /tmp/boot ; mkdir -p /tmp/boot /tmp/xmtest") > > + rc, out = run_remote(ip, > > + "cd /tmp/boot ; wget http://morbo.linux.ibm.com/pub/xmtest.disk.gz > ") > > + if rc != 0: > > + return 2, "fetching xmtest.disk failed:\n%s" % out > > + > > + # mount on /tmp/xmtest > > + rc, out = run_remote(ip, > > + "gzip -d /tmp/boot/xmtest.disk.gz ; mount -o loop > > /tmp/boot/xmtest.disk /tmp/xmtest") > > + if rc != 0: > > + run_remote(ip, "umount /tmp/xmtest") > > + return 2, "mounting xmtest.disk failed:\n%s" % out > > + > > + # We need "uname -r" to name the kernel correctly > > + rc, uname = run_remote(ip, "uname -r") > > + if rc != 0: > > + run_remote(ip, "umount /tmp/xmtest") > > + return 2, "uname failed:\n%s" % out > > + > > + # get the kernel binary, put in /tmp/boot > > + rc, out = run_remote(ip, > > + "wget %s -O /tmp/boot/vmlinuz-\`uname -r\`" % kernel) > > + if rc != 0: > > + run_remote(ip, "umount /tmp/xmtest") > > + return 2, "fetching kernel failed:\n%s" % out > > + > > + return 0, "" > > + > > +def customize_xmtest_ramdisk(ip): > > + # customize modules on xm-test ramdisk > > + # cd $xmtestdir/ramdisk ; bin/add_modules_to_initrd ; cd > > + rc, out = run_remote(ip, > > + "cd /tmp/xmtest/ramdisk ; bin/add_modules_to_initrd") > > + if rc != 0: > > + run_remote(ip, "umount /tmp/xmtest") > > + return 2, "customizing ramdisk failed:\n%s" % out > > + > > + return 0, "" > > + > > +def virt2uri(virt): > > + # convert cimtest --virt param string to libvirt uri > > + if virt == "Xen" or virt == "XenFV": > > + return "xen:///" > > + if virt == "KVM": > > + return "qemu:///system" > > + if virt == "LXC": > > + return "lxc:///system" > > + return "" > > diff -r d1614c101c28 -r 636e06042973 suites/libvirt-cim/main.py > > --- a/suites/libvirt-cim/main.py Wed Oct 29 20:11:47 2008 -0700 > > +++ b/suites/libvirt-cim/main.py Mon Nov 03 00:40:42 2008 -0800 > > @@ -36,6 +36,7 @@ > > default_pool_name > > from XenKvmLib.reporting import gen_report, send_report > > from VirtLib import utils > > +from XenKvmLib.xm_virt_util import virt2uri > > from CimTest.ReturnCodes import PASS, FAIL > > from XenKvmLib.common_util import create_netpool_conf, destroy_netpool, \ > > create_diskpool_conf, destroy_diskpool > > @@ -90,12 +91,12 @@ > > print "Cleaned log files." > > > > def pre_check(ip, virt): > > - cmd = "virsh -c %s list --all" % utils.virt2uri(virt) > > + cmd = "virsh -c %s list --all" % 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) > > + cmd = "virsh -c %s version" % virt2uri(virt) > > ret, out = utils.run_remote(ip, cmd) > > if ret != 0: > > return "Encountered an error querying libvirt with: %s" % cmd > > > > _______________________________________________ > > 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 Mon Nov 3 10:29:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 03 Nov 2008 02:29:09 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 01_enum_crs.py of RedirectionService Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225708131 28800 # Node ID f329099ae2a796631764b0ce6d533800bb4546e2 # 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 < 725 Signed-off-by: Deepti B. Kalakeri diff -r d1614c101c28 -r f329099ae2a7 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 Mon Nov 03 02:28:51 2008 -0800 @@ -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 = 725 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 >= 725, 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 deeptik at linux.vnet.ibm.com Mon Nov 3 10:40:56 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 03 Nov 2008 16:10:56 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 01_enum_crs.py of RedirectionService In-Reply-To: References: Message-ID: <490ED538.5020303@linux.vnet.ibm.com> Please ignore this patch, the revision number needs to be 725 and not 723. I have submitted patch with correct revision is submitted. Thanks and Regards, Deepti. Deepti B. Kalakeri wrote: > # 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: > > _______________________________________________ > 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 Nov 3 11:08:51 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 03 Nov 2008 03:08:51 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 01_enum_crs.py of RedirectionService Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225710470 28800 # Node ID b9492878a0b373595b6b0cbdaa10f6283a036eea # 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 < 724 Signed-off-by: Deepti B. Kalakeri diff -r d1614c101c28 -r b9492878a0b3 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 Mon Nov 03 03:07:50 2008 -0800 @@ -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 = 724 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 >= 724, 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 danms at us.ibm.com Mon Nov 3 15:23:52 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Nov 2008 07:23:52 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Add support for graphics device to Virt_RASD.c In-Reply-To: (Kaitlin Rupert's message of "Fri, 31 Oct 2008 13:30:11 -0700") References: Message-ID: <873ai8bzp3.fsf@caffeine.danplanet.com> KR> # HG changeset patch KR> # User Kaitlin Rupert KR> # Date 1224705263 25200 KR> # Node ID d596bd28133bc08ff45efe70423a43a8e7ce9ea4 KR> # Parent 3d734d8e65009230d91887b934567d3f4548d1ba KR> Add support for graphics device to Virt_RASD.c This patch fails to apply on tip for me. That's probably because I forgot to push a few changesets from last week, so sorry about that :) Anyway, can you rebase them? Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Mon Nov 3 16:51:44 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Nov 2008 08:51:44 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Add support for graphics device to Virt_RASD.c In-Reply-To: <873ai8bzp3.fsf@caffeine.danplanet.com> References: <873ai8bzp3.fsf@caffeine.danplanet.com> Message-ID: <490F2C20.6080408@linux.vnet.ibm.com> Dan Smith wrote: > KR> # HG changeset patch > KR> # User Kaitlin Rupert > KR> # Date 1224705263 25200 > KR> # Node ID d596bd28133bc08ff45efe70423a43a8e7ce9ea4 > KR> # Parent 3d734d8e65009230d91887b934567d3f4548d1ba > KR> Add support for graphics device to Virt_RASD.c > > This patch fails to apply on tip for me. That's probably because I > forgot to push a few changesets from last week, so sorry about that :) > > Anyway, can you rebase them? Thanks! > sure. I think this might have been my fault. I have a lot of patches in my queue, and these were higher up in the stack then they should have been. Will send a new set. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Nov 3 17:05:36 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Nov 2008 09:05:36 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] #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 Mon Nov 3 17:05:38 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Nov 2008 09:05:38 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] Update associations to support GraphicsRASD & DisplayController In-Reply-To: Message-ID: <1e1954312a8adb776cc6.1225731938@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225483570 25200 # Node ID 1e1954312a8adb776cc62703d3363fe7f82c0069 # Parent bd2efefa96d84a831af0a2b4fc87f4ae2374b37d Update associations to support GraphicsRASD & DisplayController. Signed-off-by: Kaitlin Rupert diff -r bd2efefa96d8 -r 1e1954312a8a 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 bd2efefa96d8 -r 1e1954312a8a 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 bd2efefa96d8 -r 1e1954312a8a 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 bd2efefa96d8 -r 1e1954312a8a 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 Mon Nov 3 17:05:37 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Nov 2008 09:05:37 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] (#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 bd2efefa96d84a831af0a2b4fc87f4ae2374b37d # Parent 0d457a0fb221a91662cdbd90ccd803941a07db48 (#2) 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. Updates: -Rebased patch on recent sources Signed-off-by: Kaitlin Rupert diff -r 0d457a0fb221 -r bd2efefa96d8 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Oct 29 15:17:11 2008 -0700 +++ b/libxkutil/device_parsing.c Wed Oct 22 12:54:23 2008 -0700 @@ -75,6 +75,7 @@ { free(dev->type); free(dev->port); + free(dev->host); } void cleanup_virt_device(struct virt_device *dev) @@ -438,9 +439,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"); @@ -622,6 +627,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); } return dev; diff -r 0d457a0fb221 -r bd2efefa96d8 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Wed Oct 29 15:17:11 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 virt_device { diff -r 0d457a0fb221 -r bd2efefa96d8 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Wed Oct 29 15:17:11 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 0d457a0fb221 -r bd2efefa96d8 schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Wed Oct 29 15:17:11 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 0d457a0fb221 -r bd2efefa96d8 src/Virt_RASD.c --- a/src/Virt_RASD.c Wed Oct 29 15:17:11 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 Mon Nov 3 19:51:36 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Nov 2008 11:51:36 -0800 Subject: [Libvirt-cim] [PATCH 1 of 5] Add a function that converts a SBLIM host system instance to something with In-Reply-To: Message-ID: <7e9da8337ee60e6c73f0.1225741896@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225739070 28800 # Node ID 7e9da8337ee60e6c73f020e37d22d692c0c7d494 # Parent 0d457a0fb221a91662cdbd90ccd803941a07db48 Add a function that converts a SBLIM host system instance to something with a platform prefix. This is just used to satisfy lower layers that key off the platform prefix (i.e. KVM_) of a class name to determine how to connect to libvirt. Signed-off-by: Dan Smith diff -r 0d457a0fb221 -r 7e9da8337ee6 libxkutil/misc_util.c --- a/libxkutil/misc_util.c Wed Oct 29 15:17:11 2008 -0700 +++ b/libxkutil/misc_util.c Mon Nov 03 11:04:30 2008 -0800 @@ -37,6 +37,8 @@ #include "misc_util.h" #include "cs_util.h" + +#include #define URI_ENV "HYPURI" @@ -580,6 +582,31 @@ return actual; } +CMPIObjectPath *convert_sblim_hostsystem(const CMPIBroker *broker, + const CMPIObjectPath *ref, + struct std_assoc_info *info) +{ + CMPIObjectPath *vref = NULL; + CMPIStatus s; + char *base = NULL; + char *cn = NULL; + + base = class_base_name(CLASSNAME(ref)); + if (base == NULL) + goto out; + + cn = get_typed_class(info->assoc_class, base); + if (cn == NULL) + goto out; + + vref = CMNewObjectPath(broker, CIM_VIRT_NS, cn, &s); + out: + free(base); + free(cn); + + return vref; +} + /* * Local Variables: * mode: C diff -r 0d457a0fb221 -r 7e9da8337ee6 libxkutil/misc_util.h --- a/libxkutil/misc_util.h Wed Oct 29 15:17:11 2008 -0700 +++ b/libxkutil/misc_util.h Mon Nov 03 11:04:30 2008 -0800 @@ -126,6 +126,10 @@ int domain_vcpu_count(virDomainPtr dom); +CMPIObjectPath *convert_sblim_hostsystem(const CMPIBroker *broker, + const CMPIObjectPath *ref, + struct std_assoc_info *info); + #define LIBVIRT_CIM_DEFAULT_MAKEREF() \ static CMPIInstance* make_ref(const CMPIObjectPath *source_ref, \ const CMPIInstance *target_inst, \ From danms at us.ibm.com Mon Nov 3 19:51:35 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Nov 2008 11:51:35 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] Fix up associations to SBLIM host system Message-ID: This patch set attempts to patch up our associations for the case where the SBLIM providers are installed and we use them for our HostSystem class. Since that class exists in root/cimv2, we have to register our associations there as well, and make sure they provide paths back to the rest of our providers. The convert_sblim_hostsystem() function that I use to do this is a bit of a hack, given that it requires knowledge of how the reference we're passing to all of our factory functions is used. However, I think it's definitely the easiest thing to do right now. Comments are welcome as usual :) From danms at us.ibm.com Mon Nov 3 19:51:39 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Nov 2008 11:51:39 -0800 Subject: [Libvirt-cim] [PATCH 4 of 5] Make HostedService work from root/cimv2 and register it there In-Reply-To: Message-ID: <75e2ff1a50ea0bc13256.1225741899@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225741860 28800 # Node ID 75e2ff1a50ea0bc13256fae712e6a96aba024d80 # Parent adc1744e281a77c4e8a0ee7726b42af035b7656b Make HostedService work from root/cimv2 and register it there ...so we can get back from HostSystem to our Services. Signed-off-by: Dan Smith diff -r adc1744e281a -r 75e2ff1a50ea Makefile.am --- a/Makefile.am Mon Nov 03 11:50:51 2008 -0800 +++ b/Makefile.am Mon Nov 03 11:51:00 2008 -0800 @@ -63,7 +63,8 @@ CIMV2_MOFS = \ schema/HostedResourcePool.mof \ - schema/ElementCapabilities.mof + schema/ElementCapabilities.mof \ + schema/HostedService.mof REGS = \ schema/ComputerSystem.registration \ @@ -117,7 +118,8 @@ CIMV2_REGS = \ schema/HostedResourcePool.registration \ - schema/ElementCapabilities.registration + schema/ElementCapabilities.registration \ + schema/HostedService.registration pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh diff -r adc1744e281a -r 75e2ff1a50ea schema/HostedService.registration --- a/schema/HostedService.registration Mon Nov 03 11:50:51 2008 -0800 +++ b/schema/HostedService.registration Mon Nov 03 11:51:00 2008 -0800 @@ -3,3 +3,6 @@ Xen_HostedService root/virt Virt_HostedService Virt_HostedService association KVM_HostedService root/virt Virt_HostedService Virt_HostedService association LXC_HostedService root/virt Virt_HostedService Virt_HostedService association +Xen_HostedService root/cimv2 Virt_HostedService Virt_HostedService association +KVM_HostedService root/cimv2 Virt_HostedService Virt_HostedService association +LXC_HostedService root/cimv2 Virt_HostedService Virt_HostedService association diff -r adc1744e281a -r 75e2ff1a50ea src/Virt_HostedService.c --- a/src/Virt_HostedService.c Mon Nov 03 11:50:51 2008 -0800 +++ b/src/Virt_HostedService.c Mon Nov 03 11:51:00 2008 -0800 @@ -89,38 +89,44 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; + CMPIObjectPath *vref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) return s; s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) return s; - s = get_rpcs(ref, &inst, _BROKER, info->context, false); + vref = convert_sblim_hostsystem(_BROKER, ref, info); + if (vref == NULL) + goto out; + + s = get_rpcs(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_vsms(ref, &inst, _BROKER, info->context, false); + s = get_vsms(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_migration_service(ref, &inst, _BROKER, info->context, false); + s = get_migration_service(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_console_rs(ref, &inst, _BROKER, info->context, false); + s = get_console_rs(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - + out: return s; } @@ -130,6 +136,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; From danms at us.ibm.com Mon Nov 3 19:51:37 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Nov 2008 11:51:37 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] Make HostedResourcePool work from root/cimv2 and register it there In-Reply-To: Message-ID: <44b096b7f0a02506efef.1225741897@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225739071 28800 # Node ID 44b096b7f0a02506efef9091854e182daf4bc812 # Parent 7e9da8337ee60e6c73f020e37d22d692c0c7d494 Make HostedResourcePool work from root/cimv2 and register it there ...so we can get back from HostSystem to our pools. Signed-off-by: Dan Smith diff -r 7e9da8337ee6 -r 44b096b7f0a0 Makefile.am --- a/Makefile.am Mon Nov 03 11:04:30 2008 -0800 +++ b/Makefile.am Mon Nov 03 11:04:31 2008 -0800 @@ -61,6 +61,8 @@ schema/ElementConformsToProfile.mof \ schema/ReferencedProfile.mof +CIMV2_MOFS = \ + schema/HostedResourcePool.mof REGS = \ schema/ComputerSystem.registration \ @@ -112,6 +114,9 @@ schema/ElementConformsToProfile.registration \ schema/ReferencedProfile.registration +CIMV2_REGS = \ + schema/HostedResourcePool.registration + pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh @@ -129,12 +134,14 @@ postinstall: sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) + sh provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(CIMV2_REGS) -m $(CIMV2_MOFS) virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true mkdir -p $(INFO_STORE) preuninstall: sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) + sh provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(CIMV2_REGS) -m $(CIMV2_MOFS) rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) diff -r 7e9da8337ee6 -r 44b096b7f0a0 schema/HostedResourcePool.registration --- a/schema/HostedResourcePool.registration Mon Nov 03 11:04:30 2008 -0800 +++ b/schema/HostedResourcePool.registration Mon Nov 03 11:04:31 2008 -0800 @@ -3,3 +3,6 @@ Xen_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association KVM_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association LXC_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association +Xen_HostedResourcePool root/cimv2 Virt_HostedResourcePool Virt_HostedResourcePool association +KVM_HostedResourcePool root/cimv2 Virt_HostedResourcePool Virt_HostedResourcePool association +LXC_HostedResourcePool root/cimv2 Virt_HostedResourcePool Virt_HostedResourcePool association diff -r 7e9da8337ee6 -r 44b096b7f0a0 src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Mon Nov 03 11:04:30 2008 -0800 +++ b/src/Virt_HostedResourcePool.c Mon Nov 03 11:04:31 2008 -0800 @@ -31,6 +31,8 @@ #include #include "misc_util.h" #include + +#include #include "Virt_HostSystem.h" #include "Virt_DevicePool.h" @@ -68,15 +70,21 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; + CMPIObjectPath *virtref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) + goto out; + + virtref = convert_sblim_hostsystem(_BROKER, ref, info); + if (virtref == NULL) goto out; s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) goto out; - s = enum_pools(_BROKER, ref, CIM_RES_TYPE_ALL, list); + s = enum_pools(_BROKER, virtref, CIM_RES_TYPE_ALL, list); out: return s; @@ -88,6 +96,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; From danms at us.ibm.com Mon Nov 3 19:51:40 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Nov 2008 11:51:40 -0800 Subject: [Libvirt-cim] [PATCH 5 of 5] Make HostedDependency work from root/cimv2 and register it there In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1225741865 28800 # Node ID a154c8327a1217cb27339059600f0bcf7347ecd5 # Parent 75e2ff1a50ea0bc13256fae712e6a96aba024d80 Make HostedDependency work from root/cimv2 and register it there ...so we can get back from HostSystem to our ComputerSystems Signed-off-by: Dan Smith diff -r 75e2ff1a50ea -r a154c8327a12 Makefile.am --- a/Makefile.am Mon Nov 03 11:51:00 2008 -0800 +++ b/Makefile.am Mon Nov 03 11:51:05 2008 -0800 @@ -64,7 +64,8 @@ CIMV2_MOFS = \ schema/HostedResourcePool.mof \ schema/ElementCapabilities.mof \ - schema/HostedService.mof + schema/HostedService.mof \ + schema/HostedDependency.mof REGS = \ schema/ComputerSystem.registration \ @@ -119,7 +120,8 @@ CIMV2_REGS = \ schema/HostedResourcePool.registration \ schema/ElementCapabilities.registration \ - schema/HostedService.registration + schema/HostedService.registration \ + schema/HostedDependency.registration pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh diff -r 75e2ff1a50ea -r a154c8327a12 schema/HostedDependency.registration --- a/schema/HostedDependency.registration Mon Nov 03 11:51:00 2008 -0800 +++ b/schema/HostedDependency.registration Mon Nov 03 11:51:05 2008 -0800 @@ -3,3 +3,6 @@ Xen_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association KVM_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association LXC_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association +Xen_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association +KVM_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association +LXC_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association diff -r 75e2ff1a50ea -r a154c8327a12 src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Mon Nov 03 11:51:00 2008 -0800 +++ b/src/Virt_HostedDependency.c Mon Nov 03 11:51:05 2008 -0800 @@ -64,15 +64,21 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *instance = NULL; + CMPIObjectPath *vref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) goto out; s = get_host(_BROKER, info->context, ref, &instance, true); if (s.rc != CMPI_RC_OK) goto out; - s = enum_domains(_BROKER, ref, list); + vref = convert_sblim_hostsystem(_BROKER, ref, info); + if (vref == NULL) + goto out; + + s = enum_domains(_BROKER, vref, list); out: return s; @@ -91,6 +97,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; From danms at us.ibm.com Mon Nov 3 19:51:38 2008 From: danms at us.ibm.com (Dan Smith) Date: Mon, 03 Nov 2008 11:51:38 -0800 Subject: [Libvirt-cim] [PATCH 3 of 5] Make ElementCapabilities work from root/cimv2 and register it there In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1225741851 28800 # Node ID adc1744e281a77c4e8a0ee7726b42af035b7656b # Parent 44b096b7f0a02506efef9091854e182daf4bc812 Make ElementCapabilities work from root/cimv2 and register it there ...so we can get back from HostSystem to our Capabilities Signed-off-by: Dan Smith diff -r 44b096b7f0a0 -r adc1744e281a Makefile.am --- a/Makefile.am Mon Nov 03 11:04:31 2008 -0800 +++ b/Makefile.am Mon Nov 03 11:50:51 2008 -0800 @@ -62,7 +62,8 @@ schema/ReferencedProfile.mof CIMV2_MOFS = \ - schema/HostedResourcePool.mof + schema/HostedResourcePool.mof \ + schema/ElementCapabilities.mof REGS = \ schema/ComputerSystem.registration \ @@ -115,7 +116,8 @@ schema/ReferencedProfile.registration CIMV2_REGS = \ - schema/HostedResourcePool.registration + schema/HostedResourcePool.registration \ + schema/ElementCapabilities.registration pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh diff -r 44b096b7f0a0 -r adc1744e281a schema/ElementCapabilities.registration --- a/schema/ElementCapabilities.registration Mon Nov 03 11:04:31 2008 -0800 +++ b/schema/ElementCapabilities.registration Mon Nov 03 11:50:51 2008 -0800 @@ -3,3 +3,6 @@ Xen_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association KVM_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association LXC_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association +Xen_ElementCapabilities root/cimv2 Virt_ElementCapabilities Virt_ElementCapabilities association +KVM_ElementCapabilities root/cimv2 Virt_ElementCapabilities Virt_ElementCapabilities association +LXC_ElementCapabilities root/cimv2 Virt_ElementCapabilities Virt_ElementCapabilities association diff -r 44b096b7f0a0 -r adc1744e281a src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Mon Nov 03 11:04:31 2008 -0800 +++ b/src/Virt_ElementCapabilities.c Mon Nov 03 11:50:51 2008 -0800 @@ -146,27 +146,33 @@ { CMPIInstance *inst = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIObjectPath *vref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) goto out; s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) goto out; - s = get_vsm_cap(_BROKER, ref, &inst, false); + vref = convert_sblim_hostsystem(_BROKER, ref, info); + if (vref == NULL) + goto out; + + s = get_vsm_cap(_BROKER, vref, &inst, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); - s = get_migration_caps(ref, &inst, _BROKER, false); + s = get_migration_caps(vref, &inst, _BROKER, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); - s = get_console_rs_caps(_BROKER, ref, &inst, false); + s = get_console_rs_caps(_BROKER, vref, &inst, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); - s = enum_alloc_cap_instances(_BROKER, ref, NULL, NULL, list); + s = enum_alloc_cap_instances(_BROKER, vref, NULL, NULL, list); if (s.rc != CMPI_RC_OK) { CU_DEBUG("Failed to enum AC: %s", CMGetCharPtr(s.msg)); @@ -393,6 +399,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; @@ -409,6 +416,7 @@ "LXC_VirtualSystemManagementService", "LXC_VirtualSystemMigrationService", "LXC_ConsoleRedirectionService", + "Linux_ComputerSystem", NULL }; From kaitlin at linux.vnet.ibm.com Mon Nov 3 21:37:38 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Nov 2008 13:37:38 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 01_forward.py tc of SystemDevice In-Reply-To: References: Message-ID: <490F6F22.9080109@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1225568161 25200 > # Node ID e92fbb2fe87e11509a5d506f4529368f97ee59cd > # Parent d1614c101c281b57bd2bc98dfb6625f790748e54 > [TEST] Fixing 01_forward.py tc of SystemDevice. > > Signed-off-by: Deepti B. Kalakeri > > diff -r d1614c101c28 -r e92fbb2fe87e suites/libvirt-cim/cimtest/SystemDevice/01_forward.py This loop doesn't verify we got back the instances expected. If we get only 3 instances back, but we expected 4, then we should return an error. Although, we need to check more than the numbers of instances returned. If we get 1 proc inst, 2 net instances when we expected 1 proc, 1 net, and 1 mem inst - we should return an error. > + for dev in devs: > + dev_cn = dev['CreationClassname'] > + devid = dev['DeviceID'] > + _devid = cn_devid[dev_cn] > + if devid != _devid: > + logger.error("DeviceID `%s` != `%s'" % (devid, _devid)) > + status = FAIL If the test encounters an error, the test should break from the loop. > + else: > + logger.info("Examined %s" % _devid) I don't think logging we ids we examined is important. Instead, there should be some kind of check as mentioned above. > > cxml.destroy(options.ip) > cxml.undefine(options.ip) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Nov 3 22:13:53 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Nov 2008 14:13:53 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py In-Reply-To: References: Message-ID: <490F77A1.1090307@linux.vnet.ibm.com> > > > +def run_remote_guest(ip, domain, command): > > > + """ Execute commands on remote guest console. > > > + """ > > > + > > > + cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) > > > + > > > + return run_remote(ip, cmd) > > > + > > > + > > > > Kaitlin, > > > > I think we can remove run_remote_guest to xm_virt_util.py under > > ../libvirt-cim/lib/XenKvmLib, > > because it have to be used by live.py under lib/VirtLib. We have > > to make it stay in utils.py. > > I'm sorry, I intend to say we cann't remove run_remote_guest() from > ../lib/XenKvmLib to xm_virt_util.py =) > > > Thoughts? > > > > If you agree to make it stay in utils.py, I will rework on this > patch. > > Thanks! I'm sorry Daisy - I'm not sure I understand what you mean here. Are you saying that run_remote_guest() needs to stay in lib/VirtLib/utils.py? If so, why? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Nov 3 22:53:50 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Nov 2008 14:53:50 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] Make HostedResourcePool work from root/cimv2 and register it there In-Reply-To: <44b096b7f0a02506efef.1225741897@guaranine.danplanet.com> References: <44b096b7f0a02506efef.1225741897@guaranine.danplanet.com> Message-ID: <490F80FE.9000009@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1225739071 28800 > # Node ID 44b096b7f0a02506efef9091854e182daf4bc812 > # Parent 7e9da8337ee60e6c73f020e37d22d692c0c7d494 > Make HostedResourcePool work from root/cimv2 and register it there > ...so we can get back from HostSystem to our pools. > > Signed-off-by: Dan Smith > > diff -r 7e9da8337ee6 -r 44b096b7f0a0 Makefile.am I see the following error after postinstall: Parsing error: parse error: Error adding class Xen_HostedResourcePool to the repository: CIM_ERR_INVALID_SUPERCLASS: CIM_HostedResourcePool If you just have sblim-cmpi-base installed, HRP isn't registered to cimv2. So you'll probably need to add that to the list of classes that get installed during make preinstall. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Nov 3 22:55:53 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 03 Nov 2008 14:55:53 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] Fix up associations to SBLIM host system In-Reply-To: References: Message-ID: <490F8179.1060509@linux.vnet.ibm.com> Dan Smith wrote: > This patch set attempts to patch up our associations for the case where the > SBLIM providers are installed and we use them for our HostSystem class. Since > that class exists in root/cimv2, we have to register our associations there > as well, and make sure they provide paths back to the rest of our providers. > > The convert_sblim_hostsystem() function that I use to do this is a bit of a > hack, given that it requires knowledge of how the reference we're passing to > all of our factory functions is used. However, I think it's definitely the > easiest thing to do right now. > > Comments are welcome as usual :) I think this is a reasonable enough away to handle the cross-namespace issue. We make the same kind of assumptions about the reference elsewhere in the code. So if this ever changes in the future, this will just be one of many changes that'll need to be made changed. Is there any need to update ECTP as well? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Tue Nov 4 02:17:18 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 4 Nov 2008 10:17:18 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py In-Reply-To: <490F77A1.1090307@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-04 06:13:53: > > > > +def run_remote_guest(ip, domain, command): > > > > + """ Execute commands on remote guest console. > > > > + """ > > > > + > > > > + cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) > > > > + > > > > + return run_remote(ip, cmd) > > > > + > > > > + > > > > > > Kaitlin, > > > > > > I think we can remove run_remote_guest to xm_virt_util.py under > > > ../libvirt-cim/lib/XenKvmLib, > > > because it have to be used by live.py under lib/VirtLib. We have > > > to make it stay in utils.py. > > > > I'm sorry, I intend to say we cann't remove run_remote_guest() from > > ../lib/XenKvmLib to xm_virt_util.py =) > > > > > Thoughts? > > > > > > If you agree to make it stay in utils.py, I will rework on this > > patch. > > > Thanks! > > I'm sorry Daisy - I'm not sure I understand what you mean here. Are you > saying that run_remote_guest() needs to stay in lib/VirtLib/utils.py? > Yeah, I want to say that run_remote_guest() needs to stay in lib/VirtLib/utils.py. It because that lib/VirtLib/live.py have to call run_remote_guest(), such as below function in live.py: def processors_count(ip, vs_name): """Returns the number of processors of the specified VS """ guest_cmd = "grep '^$' /proc/cpuinfo | wc -l" rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) if rc != 0: return -1 try: cpus = int(out) return cpus except ValueError: return -1 If we move it to /libvirt-cim/lib/XenKvmLib/xm_virt_util.py, how does live.py work? Thanks! > If so, why? > > -- > 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 Nov 4 05:33:29 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 4 Nov 2008 13:33:29 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py In-Reply-To: <490F77A1.1090307@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-04 06:13:53: > > > > +def run_remote_guest(ip, domain, command): > > > > + """ Execute commands on remote guest console. > > > > + """ > > > > + > > > > + cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) > > > > + > > > > + return run_remote(ip, cmd) > > > > + > > > > + > > > > > > Kaitlin, > > > > > > I think we can remove run_remote_guest to xm_virt_util.py under > > > ../libvirt-cim/lib/XenKvmLib, > > > because it have to be used by live.py under lib/VirtLib. We have > > > to make it stay in utils.py. > > > > I'm sorry, I intend to say we cann't remove run_remote_guest() from > > ../lib/XenKvmLib to xm_virt_util.py =) > > > > > Thoughts? > > > > > > If you agree to make it stay in utils.py, I will rework on this > > patch. > > > Thanks! > > I'm sorry Daisy - I'm not sure I understand what you mean here. Are you > saying that run_remote_guest() needs to stay in lib/VirtLib/utils.py? > > If so, why? Kaitlin, I make run_remote_guest() stay in lib/VirtLib/utils in my patch today. Also I update all related helper functions. If this function has to be moved to libvirt-cim/lib/XenKvmLib, I will cook up it on follow up patch. 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 Nov 4 02:52:52 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 03 Nov 2008 18:52:52 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Move some functions from utils.py to xm_virt_util.py and update helper function Message-ID: <388b8ffc2c4e11fde0ec.1225767172@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1225767133 28800 # Node ID 388b8ffc2c4e11fde0ec8373161698b9215811a0 # Parent 8118a0e17d219b6886b34176423c45c855f08576 [TEST] #2 Move some functions from utils.py to xm_virt_util.py and update helper function Updates from 1 to 2: run_remote_guest() still stays in lib/VirtLib/utils.py. If you think it has to be moved to xm_virt_util.py, follow up patch will do this. Signed-off-by: Guolian Yun diff -r 8118a0e17d21 -r 388b8ffc2c4e suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Sun Nov 02 19:16:33 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Nov 03 18:52:13 2008 -0800 @@ -36,7 +36,8 @@ from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, \ CIM_ERROR_GETINSTANCE from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list, domain_list +from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list,\ + domain_list, virt2uri from XenKvmLib.vxml import PoolXML, NetXML from VirtLib import utils from XenKvmLib.const import default_pool_name, default_network_name @@ -382,7 +383,7 @@ if dpoolname == None: cmd = "virsh -c %s pool-list --all | grep %s" % \ - (utils.virt2uri(virt), dpool) + (virt2uri(virt), dpool) ret, out = utils.run_remote(server, cmd) if out != "": logger.error("Disk pool with name '%s' already exists", dpool) @@ -444,7 +445,7 @@ if test_network == None: cmd = "virsh -c %s net-list --all | grep -w %s" % \ - (utils.virt2uri(virt), net_name) + (virt2uri(virt), net_name) ret, out = utils.run_remote(server, cmd) # If success, network pool with name net_name already exists if ret == 0: diff -r 8118a0e17d21 -r 388b8ffc2c4e suites/libvirt-cim/lib/XenKvmLib/test_doms.py --- a/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Sun Nov 02 19:16:33 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Mon Nov 03 18:52:13 2008 -0800 @@ -24,7 +24,7 @@ import tempfile import os from VirtLib import utils -from XenKvmLib.xm_virt_util import domain_list +from XenKvmLib.xm_virt_util import domain_list, virt2uri from CimTest.Globals import CIM_FUUID try: @@ -47,19 +47,19 @@ f.write(xml) f.close() - cmd = "virsh -c %s define %s" % (utils.virt2uri(virt), name) + cmd = "virsh -c %s define %s" % (virt2uri(virt), name) s, o = utils.run_remote(server, cmd) return s == 0 def undefine_test_domain(name, server, virt="Xen"): - cmd = "virsh -c %s undefine %s" % (utils.virt2uri(virt), name) + cmd = "virsh -c %s undefine %s" % (virt2uri(virt), name) s, o = utils.run_remote(server, cmd) return s == 0 def start_test_domain(name, server, virt="Xen"): - cmd = "virsh -c %s start %s" % (utils.virt2uri(virt), name) + cmd = "virsh -c %s start %s" % (virt2uri(virt), name) s, o = utils.run_remote(server, cmd) return s == 0 @@ -68,7 +68,7 @@ """Get a list of domid from virsh""" cmd = "virsh -c %s list 2>/dev/null | sed '1,2 d; /^$/d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: return None @@ -109,7 +109,7 @@ def viruuid(name, server, virt="Xen"): """Return domain uuid given domid or domname""" cmd = "virsh -c %s domuuid %s 2>/dev/null | sed '/^$/d'" % \ - (utils.virt2uri(virt), name) + (virt2uri(virt), name) ret, out = utils.run_remote(server, cmd) if ret == 0: return out.strip(" \n") @@ -120,7 +120,7 @@ """Destroy and undefine a domain. name could be domid or domname""" cmd = "virsh -c %s 'destroy %s ; undefine %s'" % \ - (utils.virt2uri(virt), name, name) + (virt2uri(virt), name, name) utils.run_remote(server, cmd) def destroy_and_undefine_all(server, virt="Xen", aggressive = False): @@ -154,7 +154,7 @@ else: name = xmlfile_domname - vcmd = "virsh -c %s %s %s" % (utils.virt2uri(virt), cmd, name) + vcmd = "virsh -c %s %s %s" % (virt2uri(virt), cmd, name) s, o = utils.run_remote(server, vcmd) if cmd == "define" or cmd == "create": f.close() @@ -165,7 +165,7 @@ Get the vcpu lists. The input is either the domid or domname. """ cmd = "virsh -c %s vcpuinfo %s | grep '^$' | wc -l" % \ - (utils.virt2uri(virt), name_id) + (virt2uri(virt), name_id) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -180,7 +180,7 @@ nf.write(net_xml) nf.flush() fname = nf.name - cmd = "virsh -c %s net-create %s" % (utils.virt2uri(virt), fname) + cmd = "virsh -c %s net-create %s" % (virt2uri(virt), fname) ret, out = utils.run_remote(server, cmd) nf.close() if ret != 0: diff -r 8118a0e17d21 -r 388b8ffc2c4e suites/libvirt-cim/lib/XenKvmLib/test_xml.py --- a/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Sun Nov 02 19:16:33 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Mon Nov 03 18:52:13 2008 -0800 @@ -35,7 +35,7 @@ from XenKvmLib.test_doms import set_uuid, create_vnet from VirtLib.live import available_bridges from XenKvmLib.xm_virt_util import net_list, get_bridge_from_network_xml, \ - bootloader + bootloader, virt2uri from CimTest.ReturnCodes import SKIP image_dir = "/tmp" @@ -201,7 +201,7 @@ def dumpxml(name, server, virt="Xen"): - cmd = "virsh -c %s dumpxml %s" % (utils.virt2uri(virt), name) + cmd = "virsh -c %s dumpxml %s" % (virt2uri(virt), name) s, o = utils.run_remote(server, cmd) if s == 0: return o diff -r 8118a0e17d21 -r 388b8ffc2c4e suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Sun Nov 02 19:16:33 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Mon Nov 03 18:52:13 2008 -0800 @@ -63,7 +63,7 @@ """ guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' " - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) + rc, out = run_remote_guest(ip, vs_name, guest_cmd) if rc != 0: return None @@ -89,7 +89,7 @@ virt = "Xen" cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -109,7 +109,7 @@ virt = "Xen" cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -156,7 +156,7 @@ """Function to list active network""" names = [] cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -173,7 +173,7 @@ """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) + (virt2uri(virt), network) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -196,7 +196,7 @@ return None def virsh_version(server, virt="KVM"): - cmd = "virsh -c %s -v " % utils.virt2uri(virt) + cmd = "virsh -c %s -v " % virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: return None @@ -206,7 +206,7 @@ """Function to list active DiskPool list""" names = [] cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \ - utils.virt2uri(virt) + virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret != 0: @@ -221,7 +221,7 @@ return names def virsh_vcpuinfo(server, dom, virt="Xen"): - cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt), + cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (virt2uri(virt), dom) ret, out = utils.run_remote(server, cmd) if out.isdigit(): @@ -229,10 +229,61 @@ return None def get_hv_ver(server, virt="Xen"): - cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt) + cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" %virt2uri(virt) ret, out = utils.run_remote(server, cmd) if ret == 0: return out else: return None +def get_xmtest_files(ip, kernel): + # get the xm-test disk from morbo + rc, out = run_remote(ip, + "rm -rf /tmp/boot ; mkdir -p /tmp/boot /tmp/xmtest") + rc, out = run_remote(ip, + "cd /tmp/boot ; wget http://morbo.linux.ibm.com/pub/xmtest.disk.gz") + if rc != 0: + return 2, "fetching xmtest.disk failed:\n%s" % out + + # mount on /tmp/xmtest + rc, out = run_remote(ip, + "gzip -d /tmp/boot/xmtest.disk.gz ; mount -o loop /tmp/boot/xmtest.disk /tmp/xmtest") + if rc != 0: + run_remote(ip, "umount /tmp/xmtest") + return 2, "mounting xmtest.disk failed:\n%s" % out + + # We need "uname -r" to name the kernel correctly + rc, uname = run_remote(ip, "uname -r") + if rc != 0: + run_remote(ip, "umount /tmp/xmtest") + return 2, "uname failed:\n%s" % out + + # get the kernel binary, put in /tmp/boot + rc, out = run_remote(ip, + "wget %s -O /tmp/boot/vmlinuz-\`uname -r\`" % kernel) + if rc != 0: + run_remote(ip, "umount /tmp/xmtest") + return 2, "fetching kernel failed:\n%s" % out + + return 0, "" + +def customize_xmtest_ramdisk(ip): + # customize modules on xm-test ramdisk + # cd $xmtestdir/ramdisk ; bin/add_modules_to_initrd ; cd + rc, out = run_remote(ip, + "cd /tmp/xmtest/ramdisk ; bin/add_modules_to_initrd") + if rc != 0: + run_remote(ip, "umount /tmp/xmtest") + return 2, "customizing ramdisk failed:\n%s" % out + + return 0, "" + +def virt2uri(virt): + # convert cimtest --virt param string to libvirt uri + if virt == "Xen" or virt == "XenFV": + return "xen:///" + if virt == "KVM": + return "qemu:///system" + if virt == "LXC": + return "lxc:///system" + return "" diff -r 8118a0e17d21 -r 388b8ffc2c4e suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Sun Nov 02 19:16:33 2008 -0800 +++ b/suites/libvirt-cim/main.py Mon Nov 03 18:52:13 2008 -0800 @@ -36,6 +36,7 @@ default_pool_name from XenKvmLib.reporting import gen_report, send_report from VirtLib import utils +from XenKvmLib.xm_virt_util import virt2uri from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import create_netpool_conf, destroy_netpool, \ create_diskpool_conf, destroy_diskpool @@ -90,12 +91,12 @@ print "Cleaned log files." def pre_check(ip, virt): - cmd = "virsh -c %s list --all" % utils.virt2uri(virt) + cmd = "virsh -c %s list --all" % 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) + cmd = "virsh -c %s version" % virt2uri(virt) ret, out = utils.run_remote(ip, cmd) if ret != 0: return "Encountered an error querying libvirt with: %s" % cmd From yunguol at cn.ibm.com Tue Nov 4 05:44:23 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 03 Nov 2008 21:44:23 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]Delete the functions had been moved to xm_virt_util.py in lib/VirtLib/utils.py Message-ID: # HG changeset patch # User Guolian Yun # Date 1225777457 28800 # Node ID a6816c4c82d9557d52d93ee0fcc9133d9b03055c # Parent 8118a0e17d219b6886b34176423c45c855f08576 [TEST]Delete the functions had been moved to xm_virt_util.py in lib/VirtLib/utils.py Signed-off-by: Guolian Yun diff -r 8118a0e17d21 -r a6816c4c82d9 lib/VirtLib/utils.py --- a/lib/VirtLib/utils.py Sun Nov 02 19:16:33 2008 -0800 +++ b/lib/VirtLib/utils.py Mon Nov 03 21:44:17 2008 -0800 @@ -111,57 +111,3 @@ cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) return run_remote(ip, cmd) - - -def get_xmtest_files(ip, kernel): - # get the xm-test disk from morbo - rc, out = run_remote(ip, - "rm -rf /tmp/boot ; mkdir -p /tmp/boot /tmp/xmtest") - rc, out = run_remote(ip, - "cd /tmp/boot ; wget http://morbo.linux.ibm.com/pub/xmtest.disk.gz") - if rc != 0: - return 2, "fetching xmtest.disk failed:\n%s" % out - - # mount on /tmp/xmtest - rc, out = run_remote(ip, - "gzip -d /tmp/boot/xmtest.disk.gz ; mount -o loop /tmp/boot/xmtest.disk /tmp/xmtest") - if rc != 0: - run_remote(ip, "umount /tmp/xmtest") - return 2, "mounting xmtest.disk failed:\n%s" % out - - # We need "uname -r" to name the kernel correctly - rc, uname = run_remote(ip, "uname -r") - if rc != 0: - run_remote(ip, "umount /tmp/xmtest") - return 2, "uname failed:\n%s" % out - - # get the kernel binary, put in /tmp/boot - rc, out = run_remote(ip, - "wget %s -O /tmp/boot/vmlinuz-\`uname -r\`" % kernel) - if rc != 0: - run_remote(ip, "umount /tmp/xmtest") - return 2, "fetching kernel failed:\n%s" % out - - return 0, "" - -def customize_xmtest_ramdisk(ip): - # customize modules on xm-test ramdisk - # cd $xmtestdir/ramdisk ; bin/add_modules_to_initrd ; cd - rc, out = run_remote(ip, - "cd /tmp/xmtest/ramdisk ; bin/add_modules_to_initrd") - if rc != 0: - run_remote(ip, "umount /tmp/xmtest") - return 2, "customizing ramdisk failed:\n%s" % out - - return 0, "" - -def virt2uri(virt): - # convert cimtest --virt param string to libvirt uri - if virt == "Xen" or virt == "XenFV": - return "xen:///" - if virt == "KVM": - return "qemu:///system" - if virt == "LXC": - return "lxc:///system" - return "" - From deeptik at linux.vnet.ibm.com Tue Nov 4 09:57:57 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 01:57:57 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fixing 01_forward.py tc of SystemDevice Message-ID: <3ce5cf8fb12feb015f5e.1225792677@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1225792617 28800 # Node ID 3ce5cf8fb12feb015f5ecce5c72517c7836b407c # Parent d1614c101c281b57bd2bc98dfb6625f790748e54 [TEST] #2 Fixing 01_forward.py tc of SystemDevice. The test needs to be updated with cim_define(). Tested on KVM, LXC and Xen with current sources and F9 rpm. Signed-off-by: Deepti B. Kalakeri diff -r d1614c101c28 -r 3ce5cf8fb12f suites/libvirt-cim/cimtest/SystemDevice/01_forward.py --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Wed Oct 29 20:11:47 2008 -0700 +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Tue Nov 04 01:56:57 2008 -0800 @@ -8,6 +8,7 @@ # Kaitlin Rupert # Veerendra Chandrappa # Zhengang Li +# Deepti B. Kalakeri # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public @@ -25,10 +26,10 @@ # import sys +from sets import Set from VirtLib import utils from XenKvmLib import assoc from XenKvmLib import vxml -from XenKvmLib import devices from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -38,72 +39,99 @@ test_dom = "test_domain" test_mac = "00:11:22:33:44:55" -test_cpu = 1 +test_cpu = 3 @do_main(sup_types) def main(): - options= main.options - - if options.virt == 'Xen': + options = main.options + server = options.ip + virt = options.virt + + if virt == 'Xen': test_disk = 'xvdb' else: test_disk = 'hdb' status = PASS - virt_xml = vxml.get_class(options.virt) - if options.virt == 'LXC': - cxml = virt_xml(test_dom) + virt_xml = vxml.get_class(virt) + if virt == 'LXC': + cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac) else: - cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, disk = test_disk) - ret = cxml.create(options.ip) + cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, + disk = test_disk) + + ret = cxml.create(server) if not ret: logger.error('Unable to create domain %s' % test_dom) return FAIL - sd_classname = get_typed_class(options.virt, 'SystemDevice') - cs_classname = get_typed_class(options.virt, 'ComputerSystem') + sd_classname = get_typed_class(virt, 'SystemDevice') + cs_classname = get_typed_class(virt, 'ComputerSystem') - devs = assoc.AssociatorNames(options.ip, sd_classname, cs_classname, + devs = assoc.AssociatorNames(server, sd_classname, cs_classname, Name=test_dom, CreationClassName=cs_classname) if devs == None: - logger.error("System association failed") - return FAIL - elif len(devs) == 0: - logger.error("No devices returned") + logger.error("'%s' association failed", sd_classname) + cxml.destroy(server) return FAIL - cn_devid = { - get_typed_class(options.virt, "NetworkPort") : '%s/%s' % (test_dom, test_mac), - get_typed_class(options.virt, "Memory") : '%s/mem' % test_dom, - get_typed_class(options.virt, "LogicalDisk") : '%s/%s' % (test_dom, test_disk), - get_typed_class(options.virt, "Processor") : '%s/%s' % (test_dom, test_cpu-1) - } + if len(devs) == 0: + logger.error("No devices returned") + cxml.destroy(server) + return FAIL - key_list = {'DeviceID' : '', - 'CreationClassName' : '', - 'SystemName' : test_dom, - 'SystemCreationClassname' : cs_classname - } - - for dev_cn in cn_devid.keys(): - for dev in devs: - key_list['CreationClassName'] = dev['CreationClassname'] - key_list['DeviceID'] = dev['DeviceID'] - device = devices.device_of(options.ip, key_list) - if device.CreationClassName != dev_cn: - continue - devid = device.DeviceID + mem_cn = get_typed_class(virt, "Memory") + exp_pllist = { mem_cn : ['%s/mem' % test_dom] } + proc_cn = get_typed_class(virt, "Processor") + exp_pllist[proc_cn] = [] + for i in range(test_cpu): + exp_pllist[proc_cn].append( '%s/%s' % (test_dom, i)) - _devid = cn_devid[dev_cn] - if devid != _devid: - logger.error("DeviceID `%s` != `%s'" % (devid, _devid)) - status = FAIL + if virt != 'LXC': + net_cn = get_typed_class(virt, "NetworkPort") + disk_cn = get_typed_class(virt, "LogicalDisk") + exp_pllist[net_cn] = ['%s/%s' % (test_dom, test_mac)] + exp_pllist[disk_cn] = [ '%s/%s' % (test_dom, test_disk)] + + try: + res_pllist = {} + for items in devs: + # 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['DeviceID']) + 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['DeviceID']] else: - logger.info("Examined %s" % _devid) - - cxml.destroy(options.ip) - cxml.undefine(options.ip) + # When the dict is empty + res_pllist[items.classname] = [items['DeviceID']] + #Verifying we get all the expected device class info + if Set(exp_pllist.keys()) != Set(res_pllist.keys()): + logger.error("Device Class mismatch") + raise Exception("Expected Device class list: %s \n \t Got: %s" + % (sorted(exp_pllist.keys()), + sorted(res_pllist.keys()))) + + #Verifying that we get only the expected deviceid + #for every device class + for key in exp_pllist.keys(): + if Set(exp_pllist[key]) != Set(res_pllist[key]): + logger.error("DeviceID mismatch") + raise Exception("Expected DeviceID: %s \n \t Got: %s" + % (sorted(exp_pllist[key]), + sorted(res_pllist[key]))) + except Exception, details: + logger.error("Exception %s", details) + status = FAIL + + cxml.destroy(server) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Tue Nov 4 09:57:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 04 Nov 2008 15:27:09 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 01_forward.py tc of SystemDevice In-Reply-To: <490F6F22.9080109@linux.vnet.ibm.com> References: <490F6F22.9080109@linux.vnet.ibm.com> Message-ID: <49101C75.9000500@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B. Kalakeri wrote: >> # HG changeset patch >> # User Deepti B. Kalakeri >> # Date 1225568161 25200 >> # Node ID e92fbb2fe87e11509a5d506f4529368f97ee59cd >> # Parent d1614c101c281b57bd2bc98dfb6625f790748e54 >> [TEST] Fixing 01_forward.py tc of SystemDevice. >> >> Signed-off-by: Deepti B. Kalakeri >> >> diff -r d1614c101c28 -r e92fbb2fe87e >> suites/libvirt-cim/cimtest/SystemDevice/01_forward.py > > > This loop doesn't verify we got back the instances expected. If we get > only 3 instances back, but we expected 4, then we should return an error. > > Although, we need to check more than the numbers of instances > returned. If we get 1 proc inst, 2 net instances when we expected 1 > proc, 1 net, and 1 mem inst - we should return an error. > Thats very good points , patch with changes submitted. >> + for dev in devs: >> + dev_cn = dev['CreationClassname'] >> + devid = dev['DeviceID'] >> + _devid = cn_devid[dev_cn] >> + if devid != _devid: >> + logger.error("DeviceID `%s` != `%s'" % (devid, _devid)) >> + status = FAIL > > If the test encounters an error, the test should break from the loop. > >> + else: >> + logger.info("Examined %s" % _devid) > > I don't think logging we ids we examined is important. Instead, there > should be some kind of check as mentioned above. > >> cxml.destroy(options.ip) >> cxml.undefine(options.ip) > > From deeptik at linux.vnet.ibm.com Tue Nov 4 11:40:59 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 03:40:59 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 01_forward.py tc of HostedService Message-ID: <257b23f359d1bc274222.1225798859@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1225798839 28800 # Node ID 257b23f359d1bc274222fa25d0f74b222775fae4 # Parent cd24946b4a7f060f0af9299787dbad3e387d81d6 [TEST] Updating 01_forward.py tc of HostedService. Updating 01_forward.py tc of HostedService to include CRS provider information when the libvirt_cim_revision >= 695. Signed-off-by: Deepti B. Kalakeri diff -r cd24946b4a7f -r 257b23f359d1 suites/libvirt-cim/cimtest/HostedService/01_forward.py --- a/suites/libvirt-cim/cimtest/HostedService/01_forward.py Tue Nov 04 01:04:17 2008 -0800 +++ b/suites/libvirt-cim/cimtest/HostedService/01_forward.py Tue Nov 04 03:40:39 2008 -0800 @@ -32,9 +32,11 @@ from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.common_util import get_host_info +from XenKvmLib.const import get_provider_version sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] bug_sblim = '00007' +libvirtcim_hr_crs_changes = 695 @do_main(sup_types) def main(): @@ -61,10 +63,17 @@ logger.error("No association return") return FAIL - val_serv = Set([get_typed_class(virt, "ResourcePoolConfigurationService"), - get_typed_class(virt, "VirtualSystemManagementService"), - get_typed_class(virt, "VirtualSystemMigrationService"), - get_typed_class(virt, "ConsoleRedirectionService")]) + val_serv = [get_typed_class(virt, "ResourcePoolConfigurationService"), + get_typed_class(virt, "VirtualSystemManagementService"), + get_typed_class(virt, "VirtualSystemMigrationService")] + + # This check is required for libivirt-cim providers which do not have + # CRS changes in it and the CRS provider is available with revision >= 695. + cim_rev, changeset = get_provider_version(virt, server) + if cim_rev >= libvirtcim_hr_crs_changes: + val_serv.append(get_typed_class(virt, "ConsoleRedirectionService")) + + val_serv = Set(val_serv) ccn_list = [] for item in service: From deeptik at linux.vnet.ibm.com Tue Nov 4 12:23:39 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 04:23:39 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 02_reverse.py tc of HostedService Message-ID: <302c90a9915261a1aebe.1225801419@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1225801400 28800 # Node ID 302c90a9915261a1aebe6e0f20785cb8ccf3caaf # Parent e0860bbf3ed4cf3d4adb20b5de805ec5ca8818be [TEST] Updating 02_reverse.py tc of HostedService. Updating 02_reverse.py tc of HostedService to include CRS provider information when the libvirt_cim_revision >= 695. Signed-off-by: Deepti B. Kalakeri diff -r e0860bbf3ed4 -r 302c90a99152 suites/libvirt-cim/cimtest/HostedService/02_reverse.py --- a/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Tue Nov 04 03:47:46 2008 -0800 +++ b/suites/libvirt-cim/cimtest/HostedService/02_reverse.py Tue Nov 04 04:23:20 2008 -0800 @@ -31,20 +31,28 @@ from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL, XFAIL from XenKvmLib.common_util import get_host_info +from XenKvmLib.const import get_provider_version sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +libvirtcim_hr_crs_changes = 695 @do_main(sup_types) def main(): options = main.options + server = options.ip virt = options.virt servicelist = {"ResourcePoolConfigurationService" : "RPCS", "VirtualSystemManagementService" : "Management Service", - "VirtualSystemMigrationService" : "MigrationService", - "ConsoleRedirectionService" : "ConsoleRedirectionService" } + "VirtualSystemMigrationService" : "MigrationService"} - status, host_name, host_ccn = get_host_info(options.ip, virt) + # This check is required for libivirt-cim providers which do not have + # CRS changes in it and the CRS provider is available with revision >= 695. + cim_rev, changeset = get_provider_version(virt, server) + if cim_rev >= libvirtcim_hr_crs_changes: + servicelist['ConsoleRedirectionService'] = "ConsoleRedirectionService" + + status, host_name, host_ccn = get_host_info(server, virt) if status != PASS: logger.error("Failed to get host info.") return status @@ -53,7 +61,7 @@ for k, v in servicelist.iteritems(): cn = get_typed_class(virt, k) try: - assoc_host = assoc.AssociatorNames(options.ip, an, cn, + assoc_host = assoc.AssociatorNames(server, an, cn, Name = v, CreationClassName = cn, SystemCreationClassName = host_ccn, @@ -63,7 +71,7 @@ return FAIL if len(assoc_host) != 1: - logger.error("Too many hosts") + logger.error("'%s' association failed", an) return FAIL ccn = assoc_host[0].keybindings['CreationClassName'] From deeptik at linux.vnet.ibm.com Tue Nov 4 12:49:08 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 04:49:08 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 01_enum_crs.py tc of RedirectionService to work with libvirt-cim provider with no CRS support Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225802905 28800 # Node ID a63c661d0e709149d874d7632ac16f721aea60e6 # Parent d7c8a05587743fd0fafb2d4d53a62896f45d1b31 [TEST] Updating 01_enum_crs.py tc of RedirectionService to work with libvirt-cim provider with no CRS support. Updating 01_enum_crs.py tc of RedirectionService to skip the tc which if CRS provider is not present in the libvirt_cim provider when the libvirt_cim_revision < 695. Signed-off-by: Deepti B. Kalakeri diff -r d7c8a0558774 -r a63c661d0e70 suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py --- a/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Tue Nov 04 04:05:05 2008 -0800 +++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Tue Nov 04 04:48:25 2008 -0800 @@ -32,19 +32,28 @@ 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 CimTest.ReturnCodes import PASS, FAIL, SKIP from XenKvmLib.common_util import get_host_info from XenKvmLib.const import get_provider_version SHAREMODE = 3 REDIRECTION_SER_TYPE = 3 CRS_MAX_SAP_REV = 724 +libvirtcim_hr_crs_changes = 695 sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) def main(): virt = main.options.virt server = main.options.ip + + # This check is required for libivirt-cim providers which do not have + # CRS changes in it and the CRS provider is available with revision >= 695. + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev < libvirtcim_hr_crs_changes: + logger.info("ConsoleRedirectionService provider not supported, " + "hence skipping the tc ....") + return SKIP status, host_name, host_cn = get_host_info(server, virt) if status != PASS: From deeptik at linux.vnet.ibm.com Tue Nov 4 13:19:40 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 05:19:40 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 02_enum_crscap.py tc of RedirectionService to work with libvirt-cim provider with no CRS CAP support Message-ID: <82afd0f6f9b91ef42c6f.1225804780@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1225804761 28800 # Node ID 82afd0f6f9b91ef42c6fd1602d9929faecb94c9e # Parent a63c661d0e709149d874d7632ac16f721aea60e6 [TEST] Updating 02_enum_crscap.py tc of RedirectionService to work with libvirt-cim provider with no CRS CAP support. Updating 02_enum_crscap.py tc of RedirectionService to skip the tc if CRS CAP provider is not present in the libvirt_cim provider when the libvirt_cim_revision < 691. Signed-off-by: Deepti B. Kalakeri diff -r a63c661d0e70 -r 82afd0f6f9b9 suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py --- a/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Tue Nov 04 04:48:25 2008 -0800 +++ b/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Tue Nov 04 05:19:21 2008 -0800 @@ -31,15 +31,29 @@ 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 CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.const import get_provider_version SHAREMODESUPP = 3 sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] +libvirtcim_crscap_changes = 691 + @do_main(sup_types) def main(): virt = main.options.virt server = main.options.ip + + # This check is required for libivirt-cim providers which do not have + # CRSCAP changes in it and the CRSCAP provider is available with + # revision >= 691. + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev < libvirtcim_crscap_changes: + logger.info("ConsoleRedirectionServiceCapabilities provider not" + " supported, hence skipping the tc ....") + return SKIP + + cname = 'ConsoleRedirectionServiceCapabilities' cap_name = 'ConsoleRedirectionCapabilities' classname = get_typed_class(virt, cname) From deeptik at linux.vnet.ibm.com Tue Nov 4 13:22:32 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 05:22:32 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 01_enum_crs.py tc of RedirectionService to work with libvirt-cim provider with no CRS support Message-ID: <914e2bbfeb62295a2a0a.1225804952@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1225804941 28800 # Node ID 914e2bbfeb62295a2a0afb976ed5b2a72e38daed # Parent 8118a0e17d219b6886b34176423c45c855f08576 [TEST] Updating 01_enum_crs.py tc of RedirectionService to work with libvirt-cim provider with no CRS support. Updating 01_enum_crs.py tc of RedirectionService to skip the tc which if CRS provider is not present in the libvirt_cim provider when the libvirt_cim_revision < 688. Signed-off-by: Deepti B. Kalakeri diff -r 8118a0e17d21 -r 914e2bbfeb62 suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py --- a/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Sun Nov 02 19:16:33 2008 -0800 +++ b/suites/libvirt-cim/cimtest/RedirectionService/01_enum_crs.py Tue Nov 04 05:22:21 2008 -0800 @@ -32,19 +32,28 @@ 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 CimTest.ReturnCodes import PASS, FAIL, SKIP from XenKvmLib.common_util import get_host_info from XenKvmLib.const import get_provider_version SHAREMODE = 3 REDIRECTION_SER_TYPE = 3 CRS_MAX_SAP_REV = 724 +libvirtcim_hr_crs_changes = 688 sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @do_main(sup_types) def main(): virt = main.options.virt server = main.options.ip + + # This check is required for libivirt-cim providers which do not have + # CRS changes in it and the CRS provider is available with revision >= 688. + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev < libvirtcim_hr_crs_changes: + logger.info("ConsoleRedirectionService provider not supported, " + "hence skipping the tc ....") + return SKIP status, host_name, host_cn = get_host_info(server, virt) if status != PASS: From danms at us.ibm.com Tue Nov 4 15:03:40 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Nov 2008 07:03:40 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] Make HostedResourcePool work from root/cimv2 and register it there In-Reply-To: <490F80FE.9000009@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Mon, 03 Nov 2008 14:53:50 -0800") References: <44b096b7f0a02506efef.1225741897@guaranine.danplanet.com> <490F80FE.9000009@linux.vnet.ibm.com> Message-ID: <871vxr8reb.fsf@caffeine.danplanet.com> KR> If you just have sblim-cmpi-base installed, HRP isn't registered to KR> cimv2. So you'll probably need to add that to the list of classes KR> that get installed during make preinstall. Yep, and I did. If you re-run preinstall you should be good. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Tue Nov 4 15:04:39 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Nov 2008 07:04:39 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] Fix up associations to SBLIM host system In-Reply-To: <490F8179.1060509@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Mon, 03 Nov 2008 14:55:53 -0800") References: <490F8179.1060509@linux.vnet.ibm.com> Message-ID: <87wsfj7cs8.fsf@caffeine.danplanet.com> KR> Is there any need to update ECTP as well? ECTP should work for the profile->hostsys direction now, but if you want to make it back from hostsys->profile, I guess we do need a change. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Nov 4 16:11:49 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Nov 2008 08:11:49 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py In-Reply-To: References: Message-ID: <49107445.6080705@linux.vnet.ibm.com> > > I'm sorry Daisy - I'm not sure I understand what you mean here. Are you > > saying that run_remote_guest() needs to stay in lib/VirtLib/utils.py? > > > Yeah, I want to say that run_remote_guest() needs to stay in > lib/VirtLib/utils.py. > It because that lib/VirtLib/live.py have to call run_remote_guest(), > such as below > function in live.py: > > def processors_count(ip, vs_name): > """Returns the number of processors of the specified VS > """ > > guest_cmd = "grep '^$' /proc/cpuinfo | wc -l" > > rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) > if rc != 0: > return -1 > > try: > cpus = int(out) > return cpus > except ValueError: > return -1 > > If we move it to /libvirt-cim/lib/XenKvmLib/xm_virt_util.py, how does > live.py work? Oh, I see. I had missed this before when we discussed what functions should be moved. Any function that is run within the guest should also be moved. So the following should be moved to libvirt-cim/lib/XenKvmLib/xm_virt_util.p: processors_count() memory_count() network_macs() I had originally thought these were running on the host, not within the guest. Sorry for the confusion! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Nov 4 17:31:02 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Nov 2008 09:31:02 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fixing 01_forward.py tc of SystemDevice In-Reply-To: <3ce5cf8fb12feb015f5e.1225792677@localhost.localdomain> References: <3ce5cf8fb12feb015f5e.1225792677@localhost.localdomain> Message-ID: <491086D6.4040701@linux.vnet.ibm.com> > + res_pllist = {} > + for items in devs: > + # 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['DeviceID']) > + res_pllist[items.classname] = list Couldn't these 4 lines be replaced by: res_pllist[items.classname].append(items['DeviceID'])? > + else: > + # If the dict is not empty, but does not yet contain > + # items.classname, we create new item > + res_pllist[items.classname] = [items['DeviceID']] This whole for loop can be replaced by: for items in devs: if items.classname in res_pllist.keys(): res_pllist[items.classname].append(items['DeviceID']) else: res_pllist[items.classname] = [items['DeviceID']] You don't need to handle a separate case for when the dict has len() == 0 because items.classname definitely won't be in the dict if the dict is empty. Thanks for adding these extra checks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Nov 4 18:30:58 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Nov 2008 10:30:58 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 02_enum_crscap.py tc of RedirectionService to work with libvirt-cim provider with no CRS CAP support In-Reply-To: <82afd0f6f9b91ef42c6f.1225804780@elm3b193.beaverton.ibm.com> References: <82afd0f6f9b91ef42c6f.1225804780@elm3b193.beaverton.ibm.com> Message-ID: <491094E2.10003@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1225804761 28800 > # Node ID 82afd0f6f9b91ef42c6fd1602d9929faecb94c9e > # Parent a63c661d0e709149d874d7632ac16f721aea60e6 > [TEST] Updating 02_enum_crscap.py tc of RedirectionService to work with libvirt-cim provider with no CRS CAP support. > > Updating 02_enum_crscap.py tc of RedirectionService to skip the tc if CRS CAP provider is not present > in the libvirt_cim provider when the libvirt_cim_revision < 691. > > Signed-off-by: Deepti B. Kalakeri > > diff -r a63c661d0e70 -r 82afd0f6f9b9 suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py > --- a/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Tue Nov 04 04:48:25 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py Tue Nov 04 05:19:21 2008 -0800 > @@ -31,15 +31,29 @@ > 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 CimTest.ReturnCodes import PASS, FAIL, SKIP > +from XenKvmLib.const import get_provider_version > > SHAREMODESUPP = 3 > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > +libvirtcim_crscap_changes = 691 > + > @do_main(sup_types) > def main(): > virt = main.options.virt > server = main.options.ip > + > + # This check is required for libivirt-cim providers which do not have > + # CRSCAP changes in it and the CRSCAP provider is available with > + # revision >= 691. > + curr_cim_rev, changeset = get_provider_version(virt, server) > + if curr_cim_rev < libvirtcim_crscap_changes: > + logger.info("ConsoleRedirectionServiceCapabilities provider not" > + " supported, hence skipping the tc ....") > + return SKIP > + > + > cname = 'ConsoleRedirectionServiceCapabilities' > cap_name = 'ConsoleRedirectionCapabilities' > classname = get_typed_class(virt, cname) > This approach works for handling test cases that run against new providers. However, I think it'd be useful to have a function that calls GetClass() to determine whether the class is registered with the CIMOM. If the class isn't registered, the test would be skipped and an error message would be printed indicating that the class isn't registered. If all of the libvirt-cim classes aren't registered properly, then all of the tests would be skipped instead of all of them failing. This is something you could embed into the do_main() call, so that it happens before the test is even run. The tricky part is determining the classname or classnames associated with each test. I'm going to apply this change for now, and I'll add a to-do on the wiki for coming up with a way to check the classnames before running a test. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Tue Nov 4 18:59:53 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Nov 2008 10:59:53 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] (#2) Fix up associations to SBLIM host system Message-ID: This time with the base schema changes... From danms at us.ibm.com Tue Nov 4 18:59:54 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Nov 2008 10:59:54 -0800 Subject: [Libvirt-cim] [PATCH 1 of 5] Add a function that converts a SBLIM host system instance to something with In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1225811646 28800 # Node ID e6f0f20c357e04f9285ef99ab642ec398e7f51b2 # Parent 1e1954312a8adb776cc62703d3363fe7f82c0069 Add a function that converts a SBLIM host system instance to something with a platform prefix. This is just used to satisfy lower layers that key off the platform prefix (i.e. KVM_) of a class name to determine how to connect to libvirt. Signed-off-by: Dan Smith diff -r 1e1954312a8a -r e6f0f20c357e libxkutil/misc_util.c --- a/libxkutil/misc_util.c Fri Oct 31 13:06:10 2008 -0700 +++ b/libxkutil/misc_util.c Tue Nov 04 07:14:06 2008 -0800 @@ -37,6 +37,8 @@ #include "misc_util.h" #include "cs_util.h" + +#include #define URI_ENV "HYPURI" @@ -580,6 +582,31 @@ return actual; } +CMPIObjectPath *convert_sblim_hostsystem(const CMPIBroker *broker, + const CMPIObjectPath *ref, + struct std_assoc_info *info) +{ + CMPIObjectPath *vref = NULL; + CMPIStatus s; + char *base = NULL; + char *cn = NULL; + + base = class_base_name(CLASSNAME(ref)); + if (base == NULL) + goto out; + + cn = get_typed_class(info->assoc_class, base); + if (cn == NULL) + goto out; + + vref = CMNewObjectPath(broker, CIM_VIRT_NS, cn, &s); + out: + free(base); + free(cn); + + return vref; +} + /* * Local Variables: * mode: C diff -r 1e1954312a8a -r e6f0f20c357e libxkutil/misc_util.h --- a/libxkutil/misc_util.h Fri Oct 31 13:06:10 2008 -0700 +++ b/libxkutil/misc_util.h Tue Nov 04 07:14:06 2008 -0800 @@ -126,6 +126,10 @@ int domain_vcpu_count(virDomainPtr dom); +CMPIObjectPath *convert_sblim_hostsystem(const CMPIBroker *broker, + const CMPIObjectPath *ref, + struct std_assoc_info *info); + #define LIBVIRT_CIM_DEFAULT_MAKEREF() \ static CMPIInstance* make_ref(const CMPIObjectPath *source_ref, \ const CMPIInstance *target_inst, \ From danms at us.ibm.com Tue Nov 4 18:59:55 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Nov 2008 10:59:55 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] Make HostedResourcePool work from root/cimv2 and register it there In-Reply-To: Message-ID: <39f290b8978e20c122a7.1225825195@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225825154 28800 # Node ID 39f290b8978e20c122a7ccf3ad702feeaae4e52a # Parent e6f0f20c357e04f9285ef99ab642ec398e7f51b2 Make HostedResourcePool work from root/cimv2 and register it there ...so we can get back from HostSystem to our pools. Signed-off-by: Dan Smith diff -r e6f0f20c357e -r 39f290b8978e Makefile.am --- a/Makefile.am Tue Nov 04 07:14:06 2008 -0800 +++ b/Makefile.am Tue Nov 04 10:59:14 2008 -0800 @@ -61,6 +61,8 @@ schema/ElementConformsToProfile.mof \ schema/ReferencedProfile.mof +CIMV2_MOFS = \ + schema/HostedResourcePool.mof REGS = \ schema/ComputerSystem.registration \ @@ -112,6 +114,9 @@ schema/ElementConformsToProfile.registration \ schema/ReferencedProfile.registration +CIMV2_REGS = \ + schema/HostedResourcePool.registration + pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh @@ -129,12 +134,14 @@ postinstall: sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) + sh provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(CIMV2_REGS) -m $(CIMV2_MOFS) virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true mkdir -p $(INFO_STORE) preuninstall: sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) + sh provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(CIMV2_REGS) -m $(CIMV2_MOFS) rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) diff -r e6f0f20c357e -r 39f290b8978e base_schema/cimv216-cimv2_mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/cimv216-cimv2_mof Tue Nov 04 10:59:14 2008 -0800 @@ -0,0 +1,7 @@ +Qualifier IsPUnit : boolean = false, + Scope(property, method, parameter); + +#pragma include ("Core/CIM_ResourcePool.mof") +#pragma include ("Core/CIM_HostedResourcePool.mof") +#pragma include ("Core/CIM_ElementCapabilities.mof") +#pragma include ("Core/CIM_HostedService.mof") diff -r e6f0f20c357e -r 39f290b8978e base_schema/install_base_schema.sh.in --- a/base_schema/install_base_schema.sh.in Tue Nov 04 07:14:06 2008 -0800 +++ b/base_schema/install_base_schema.sh.in Tue Nov 04 10:59:14 2008 -0800 @@ -22,6 +22,8 @@ fix_schema() { (cd ${TMPDIR} && patch -p0 < ${DATA}/fix_schema.patch) cp -a ${DATA}/cimv216-interop_mof ${TMPDIR}/cimv216-interop.mof + cp -a ${DATA}/cimv216-cimv2_mof ${TMPDIR}/cimv216-cimv2.mof + } detect_peg_repo() { @@ -72,6 +74,7 @@ cimmofl -uc -aEV -R$repo -n $NS qualifiers.mof cimmofl -uc -aEV -R$repo -n $NS qualifiers_optional.mof cimmofl -uc -aEV -R$repo -n /root/interop cimv???-interop.mof + cimmofl -uc -aEV -R$repo -n /root/interop cimv???-cimv2.mof } install_schema_sfcb() { diff -r e6f0f20c357e -r 39f290b8978e schema/HostedResourcePool.registration --- a/schema/HostedResourcePool.registration Tue Nov 04 07:14:06 2008 -0800 +++ b/schema/HostedResourcePool.registration Tue Nov 04 10:59:14 2008 -0800 @@ -3,3 +3,6 @@ Xen_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association KVM_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association LXC_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association +Xen_HostedResourcePool root/cimv2 Virt_HostedResourcePool Virt_HostedResourcePool association +KVM_HostedResourcePool root/cimv2 Virt_HostedResourcePool Virt_HostedResourcePool association +LXC_HostedResourcePool root/cimv2 Virt_HostedResourcePool Virt_HostedResourcePool association diff -r e6f0f20c357e -r 39f290b8978e src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Tue Nov 04 07:14:06 2008 -0800 +++ b/src/Virt_HostedResourcePool.c Tue Nov 04 10:59:14 2008 -0800 @@ -31,6 +31,8 @@ #include #include "misc_util.h" #include + +#include #include "Virt_HostSystem.h" #include "Virt_DevicePool.h" @@ -68,15 +70,21 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; + CMPIObjectPath *virtref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) + goto out; + + virtref = convert_sblim_hostsystem(_BROKER, ref, info); + if (virtref == NULL) goto out; s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) goto out; - s = enum_pools(_BROKER, ref, CIM_RES_TYPE_ALL, list); + s = enum_pools(_BROKER, virtref, CIM_RES_TYPE_ALL, list); out: return s; @@ -88,6 +96,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; From danms at us.ibm.com Tue Nov 4 18:59:57 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Nov 2008 10:59:57 -0800 Subject: [Libvirt-cim] [PATCH 4 of 5] Make HostedService work from root/cimv2 and register it there In-Reply-To: Message-ID: <3471549119039b87933a.1225825197@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225825186 28800 # Node ID 3471549119039b87933a07cc55ba0d4a2911149e # Parent a469400c34e0657bd01b9ef91789b0686c661ca4 Make HostedService work from root/cimv2 and register it there ...so we can get back from HostSystem to our Services. Signed-off-by: Dan Smith diff -r a469400c34e0 -r 347154911903 Makefile.am --- a/Makefile.am Tue Nov 04 10:59:46 2008 -0800 +++ b/Makefile.am Tue Nov 04 10:59:46 2008 -0800 @@ -63,7 +63,8 @@ CIMV2_MOFS = \ schema/HostedResourcePool.mof \ - schema/ElementCapabilities.mof + schema/ElementCapabilities.mof \ + schema/HostedService.mof REGS = \ schema/ComputerSystem.registration \ @@ -117,7 +118,8 @@ CIMV2_REGS = \ schema/HostedResourcePool.registration \ - schema/ElementCapabilities.registration + schema/ElementCapabilities.registration \ + schema/HostedService.registration pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh diff -r a469400c34e0 -r 347154911903 schema/HostedService.registration --- a/schema/HostedService.registration Tue Nov 04 10:59:46 2008 -0800 +++ b/schema/HostedService.registration Tue Nov 04 10:59:46 2008 -0800 @@ -3,3 +3,6 @@ Xen_HostedService root/virt Virt_HostedService Virt_HostedService association KVM_HostedService root/virt Virt_HostedService Virt_HostedService association LXC_HostedService root/virt Virt_HostedService Virt_HostedService association +Xen_HostedService root/cimv2 Virt_HostedService Virt_HostedService association +KVM_HostedService root/cimv2 Virt_HostedService Virt_HostedService association +LXC_HostedService root/cimv2 Virt_HostedService Virt_HostedService association diff -r a469400c34e0 -r 347154911903 src/Virt_HostedService.c --- a/src/Virt_HostedService.c Tue Nov 04 10:59:46 2008 -0800 +++ b/src/Virt_HostedService.c Tue Nov 04 10:59:46 2008 -0800 @@ -89,38 +89,44 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; + CMPIObjectPath *vref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) return s; s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) return s; - s = get_rpcs(ref, &inst, _BROKER, info->context, false); + vref = convert_sblim_hostsystem(_BROKER, ref, info); + if (vref == NULL) + goto out; + + s = get_rpcs(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_vsms(ref, &inst, _BROKER, info->context, false); + s = get_vsms(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_migration_service(ref, &inst, _BROKER, info->context, false); + s = get_migration_service(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_console_rs(ref, &inst, _BROKER, info->context, false); + s = get_console_rs(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - + out: return s; } @@ -130,6 +136,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; From danms at us.ibm.com Tue Nov 4 18:59:58 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Nov 2008 10:59:58 -0800 Subject: [Libvirt-cim] [PATCH 5 of 5] Make HostedDependency work from root/cimv2 and register it there In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1225825186 28800 # Node ID bb67f1fc046db9dac69343edf07cc57e0941c6c8 # Parent 3471549119039b87933a07cc55ba0d4a2911149e Make HostedDependency work from root/cimv2 and register it there ...so we can get back from HostSystem to our ComputerSystems Signed-off-by: Dan Smith diff -r 347154911903 -r bb67f1fc046d Makefile.am --- a/Makefile.am Tue Nov 04 10:59:46 2008 -0800 +++ b/Makefile.am Tue Nov 04 10:59:46 2008 -0800 @@ -64,7 +64,8 @@ CIMV2_MOFS = \ schema/HostedResourcePool.mof \ schema/ElementCapabilities.mof \ - schema/HostedService.mof + schema/HostedService.mof \ + schema/HostedDependency.mof REGS = \ schema/ComputerSystem.registration \ @@ -119,7 +120,8 @@ CIMV2_REGS = \ schema/HostedResourcePool.registration \ schema/ElementCapabilities.registration \ - schema/HostedService.registration + schema/HostedService.registration \ + schema/HostedDependency.registration pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh diff -r 347154911903 -r bb67f1fc046d schema/HostedDependency.registration --- a/schema/HostedDependency.registration Tue Nov 04 10:59:46 2008 -0800 +++ b/schema/HostedDependency.registration Tue Nov 04 10:59:46 2008 -0800 @@ -3,3 +3,6 @@ Xen_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association KVM_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association LXC_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association +Xen_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association +KVM_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association +LXC_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association diff -r 347154911903 -r bb67f1fc046d src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Tue Nov 04 10:59:46 2008 -0800 +++ b/src/Virt_HostedDependency.c Tue Nov 04 10:59:46 2008 -0800 @@ -64,15 +64,21 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *instance = NULL; + CMPIObjectPath *vref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) goto out; s = get_host(_BROKER, info->context, ref, &instance, true); if (s.rc != CMPI_RC_OK) goto out; - s = enum_domains(_BROKER, ref, list); + vref = convert_sblim_hostsystem(_BROKER, ref, info); + if (vref == NULL) + goto out; + + s = enum_domains(_BROKER, vref, list); out: return s; @@ -91,6 +97,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; From danms at us.ibm.com Tue Nov 4 18:59:56 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Nov 2008 10:59:56 -0800 Subject: [Libvirt-cim] [PATCH 3 of 5] Make ElementCapabilities work from root/cimv2 and register it there In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1225825186 28800 # Node ID a469400c34e0657bd01b9ef91789b0686c661ca4 # Parent 39f290b8978e20c122a7ccf3ad702feeaae4e52a Make ElementCapabilities work from root/cimv2 and register it there ...so we can get back from HostSystem to our Capabilities Signed-off-by: Dan Smith diff -r 39f290b8978e -r a469400c34e0 Makefile.am --- a/Makefile.am Tue Nov 04 10:59:14 2008 -0800 +++ b/Makefile.am Tue Nov 04 10:59:46 2008 -0800 @@ -62,7 +62,8 @@ schema/ReferencedProfile.mof CIMV2_MOFS = \ - schema/HostedResourcePool.mof + schema/HostedResourcePool.mof \ + schema/ElementCapabilities.mof REGS = \ schema/ComputerSystem.registration \ @@ -115,7 +116,8 @@ schema/ReferencedProfile.registration CIMV2_REGS = \ - schema/HostedResourcePool.registration + schema/HostedResourcePool.registration \ + schema/ElementCapabilities.registration pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh diff -r 39f290b8978e -r a469400c34e0 schema/ElementCapabilities.registration --- a/schema/ElementCapabilities.registration Tue Nov 04 10:59:14 2008 -0800 +++ b/schema/ElementCapabilities.registration Tue Nov 04 10:59:46 2008 -0800 @@ -3,3 +3,6 @@ Xen_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association KVM_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association LXC_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association +Xen_ElementCapabilities root/cimv2 Virt_ElementCapabilities Virt_ElementCapabilities association +KVM_ElementCapabilities root/cimv2 Virt_ElementCapabilities Virt_ElementCapabilities association +LXC_ElementCapabilities root/cimv2 Virt_ElementCapabilities Virt_ElementCapabilities association diff -r 39f290b8978e -r a469400c34e0 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Tue Nov 04 10:59:14 2008 -0800 +++ b/src/Virt_ElementCapabilities.c Tue Nov 04 10:59:46 2008 -0800 @@ -146,27 +146,33 @@ { CMPIInstance *inst = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIObjectPath *vref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) goto out; s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) goto out; - s = get_vsm_cap(_BROKER, ref, &inst, false); + vref = convert_sblim_hostsystem(_BROKER, ref, info); + if (vref == NULL) + goto out; + + s = get_vsm_cap(_BROKER, vref, &inst, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); - s = get_migration_caps(ref, &inst, _BROKER, false); + s = get_migration_caps(vref, &inst, _BROKER, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); - s = get_console_rs_caps(_BROKER, ref, &inst, false); + s = get_console_rs_caps(_BROKER, vref, &inst, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); - s = enum_alloc_cap_instances(_BROKER, ref, NULL, NULL, list); + s = enum_alloc_cap_instances(_BROKER, vref, NULL, NULL, list); if (s.rc != CMPI_RC_OK) { CU_DEBUG("Failed to enum AC: %s", CMGetCharPtr(s.msg)); @@ -393,6 +399,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; @@ -409,6 +416,7 @@ "LXC_VirtualSystemManagementService", "LXC_VirtualSystemMigrationService", "LXC_ConsoleRedirectionService", + "Linux_ComputerSystem", NULL }; From kaitlin at linux.vnet.ibm.com Tue Nov 4 20:36:47 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Nov 2008 12:36:47 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] Make HostedResourcePool work from root/cimv2 and register it there In-Reply-To: <39f290b8978e20c122a7.1225825195@guaranine.danplanet.com> References: <39f290b8978e20c122a7.1225825195@guaranine.danplanet.com> Message-ID: <4910B25F.9050201@linux.vnet.ibm.com> > diff -r e6f0f20c357e -r 39f290b8978e base_schema/install_base_schema.sh.in > --- a/base_schema/install_base_schema.sh.in Tue Nov 04 07:14:06 2008 -0800 > +++ b/base_schema/install_base_schema.sh.in Tue Nov 04 10:59:14 2008 -0800 > @@ -22,6 +22,8 @@ > fix_schema() { > (cd ${TMPDIR} && patch -p0 < ${DATA}/fix_schema.patch) > cp -a ${DATA}/cimv216-interop_mof ${TMPDIR}/cimv216-interop.mof > + cp -a ${DATA}/cimv216-cimv2_mof ${TMPDIR}/cimv216-cimv2.mof > + > } > > detect_peg_repo() { > @@ -72,6 +74,7 @@ > cimmofl -uc -aEV -R$repo -n $NS qualifiers.mof > cimmofl -uc -aEV -R$repo -n $NS qualifiers_optional.mof > cimmofl -uc -aEV -R$repo -n /root/interop cimv???-interop.mof > + cimmofl -uc -aEV -R$repo -n /root/interop cimv???-cimv2.mof The namespace should be /root/cimv2, not /root/interop. Also, I had to add the following line prior to this addition: cimmofl -uc -aEV -R$repo -n /root/cimv2 qualifiers.mof Otherwise, I get an error complaining the "Experimental" qualifier isn't available in the cimv2 namespace. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Tue Nov 4 20:43:11 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 04 Nov 2008 12:43:11 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] Make HostedResourcePool work from root/cimv2 and register it there In-Reply-To: <4910B25F.9050201@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Tue, 04 Nov 2008 12:36:47 -0800") References: <39f290b8978e20c122a7.1225825195@guaranine.danplanet.com> <4910B25F.9050201@linux.vnet.ibm.com> Message-ID: <87wsfj5ijk.fsf@caffeine.danplanet.com> KR> The namespace should be /root/cimv2, not /root/interop. Oops. The reason this wasn't initially included is because I modified the .sh instead of the .sh.in. Then when I went to move it, I moved it wrong. KR> Also, I had to add the following line prior to this addition: KR> cimmofl -uc -aEV -R$repo -n /root/cimv2 qualifiers.mof Hmm. The cimv2 mof that I created has one of the needed qualifiers in it, but not the experimental one. It seems like we should avoid dumping all the new qualifiers into cimv2, don't you think? KR> Otherwise, I get an error complaining the "Experimental" qualifier KR> isn't available in the cimv2 namespace. I'll add Experimental and fix the path above. I guess I need to kill my entire pegasus installation to really test :( -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Nov 4 20:50:35 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Nov 2008 12:50:35 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] Make HostedResourcePool work from root/cimv2 and register it there In-Reply-To: <87wsfj5ijk.fsf@caffeine.danplanet.com> References: <39f290b8978e20c122a7.1225825195@guaranine.danplanet.com> <4910B25F.9050201@linux.vnet.ibm.com> <87wsfj5ijk.fsf@caffeine.danplanet.com> Message-ID: <4910B59B.8020900@linux.vnet.ibm.com> Dan Smith wrote: > KR> The namespace should be /root/cimv2, not /root/interop. > > Oops. The reason this wasn't initially included is because I modified > the .sh instead of the .sh.in. Then when I went to move it, I moved > it wrong. > > KR> Also, I had to add the following line prior to this addition: > > KR> cimmofl -uc -aEV -R$repo -n /root/cimv2 qualifiers.mof > > Hmm. The cimv2 mof that I created has one of the needed qualifiers in > it, but not the experimental one. It seems like we should avoid > dumping all the new qualifiers into cimv2, don't you think? Agreed - that's a better approach. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Nov 4 21:39:50 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 04 Nov 2008 13:39:50 -0800 Subject: [Libvirt-cim] [PATCH] Add KVMRedirectionSAP header to noinst_HEADERS list Message-ID: <29c875cab8b808655c04.1225834790@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225833046 28800 # Node ID 29c875cab8b808655c04d2f971c0d6c9a9f03dbd # Parent 1e1954312a8adb776cc62703d3363fe7f82c0069 Add KVMRedirectionSAP header to noinst_HEADERS list. Without this, building an rpm fails. Signed-off-by: Kaitlin Rupert diff -r 1e1954312a8a -r 29c875cab8b8 src/Makefile.am --- a/src/Makefile.am Fri Oct 31 13:06:10 2008 -0700 +++ b/src/Makefile.am Tue Nov 04 13:10:46 2008 -0800 @@ -22,7 +22,8 @@ Virt_VirtualSystemSnapshotServiceCapabilities.h \ Virt_VSMigrationSettingData.h \ Virt_ConsoleRedirectionService.h \ - Virt_ConsoleRedirectionServiceCapabilities.h + Virt_ConsoleRedirectionServiceCapabilities.h \ + Virt_KVMRedirectionSAP.h XKUADD = $(top_builddir)/libxkutil/libxkutil.la From sakaia at jp.fujitsu.com Wed Nov 5 05:04:12 2008 From: sakaia at jp.fujitsu.com (Atsushi SAKAI) Date: Wed, 05 Nov 2008 14:04:12 +0900 Subject: [Libvirt-cim] [PATCH] Add KVMRedirectionSAP header tonoinst_HEADERS list In-Reply-To: <29c875cab8b808655c04.1225834790@localhost.localdomain> References: <29c875cab8b808655c04.1225834790@localhost.localdomain> Message-ID: <20081105050415.3DEF6480002@m023.s.css.fujitsu.com> Hello Simple Question. Is there any plan to do Test-Autobuild? http://builder.virt-manager.org/ Thanks Atsushi SAKAI Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1225833046 28800 > # Node ID 29c875cab8b808655c04d2f971c0d6c9a9f03dbd > # Parent 1e1954312a8adb776cc62703d3363fe7f82c0069 > Add KVMRedirectionSAP header to noinst_HEADERS list. > > Without this, building an rpm fails. > > Signed-off-by: Kaitlin Rupert > > diff -r 1e1954312a8a -r 29c875cab8b8 src/Makefile.am > --- a/src/Makefile.am Fri Oct 31 13:06:10 2008 -0700 > +++ b/src/Makefile.am Tue Nov 04 13:10:46 2008 -0800 > @@ -22,7 +22,8 @@ > Virt_VirtualSystemSnapshotServiceCapabilities.h \ > Virt_VSMigrationSettingData.h \ > Virt_ConsoleRedirectionService.h \ > - Virt_ConsoleRedirectionServiceCapabilities.h > + Virt_ConsoleRedirectionServiceCapabilities.h \ > + Virt_KVMRedirectionSAP.h > > XKUADD = $(top_builddir)/libxkutil/libxkutil.la > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From deeptik at linux.vnet.ibm.com Wed Nov 5 05:49:24 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 05 Nov 2008 11:19:24 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 02_enum_crscap.py tc of RedirectionService to work with libvirt-cim provider with no CRS CAP support In-Reply-To: <491094E2.10003@linux.vnet.ibm.com> References: <82afd0f6f9b91ef42c6f.1225804780@elm3b193.beaverton.ibm.com> <491094E2.10003@linux.vnet.ibm.com> Message-ID: <491133E4.3060707@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B. Kalakeri wrote: >> # HG changeset patch >> # User Deepti B. Kalakeri >> # Date 1225804761 28800 >> # Node ID 82afd0f6f9b91ef42c6fd1602d9929faecb94c9e >> # Parent a63c661d0e709149d874d7632ac16f721aea60e6 >> [TEST] Updating 02_enum_crscap.py tc of RedirectionService to work >> with libvirt-cim provider with no CRS CAP support. >> >> Updating 02_enum_crscap.py tc of RedirectionService to skip the tc if >> CRS CAP provider is not present >> in the libvirt_cim provider when the libvirt_cim_revision < 691. >> >> Signed-off-by: Deepti B. Kalakeri >> >> diff -r a63c661d0e70 -r 82afd0f6f9b9 >> suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py >> --- a/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py >> Tue Nov 04 04:48:25 2008 -0800 >> +++ b/suites/libvirt-cim/cimtest/RedirectionService/02_enum_crscap.py >> Tue Nov 04 05:19:21 2008 -0800 >> @@ -31,15 +31,29 @@ >> 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 CimTest.ReturnCodes import PASS, FAIL, SKIP >> +from XenKvmLib.const import get_provider_version >> >> SHAREMODESUPP = 3 >> >> sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] >> +libvirtcim_crscap_changes = 691 >> + >> @do_main(sup_types) >> def main(): >> virt = main.options.virt >> server = main.options.ip >> + >> + # This check is required for libivirt-cim providers which do not >> have + # CRSCAP changes in it and the CRSCAP provider is available >> with + # revision >= 691. >> + curr_cim_rev, changeset = get_provider_version(virt, server) >> + if curr_cim_rev < libvirtcim_crscap_changes: >> + logger.info("ConsoleRedirectionServiceCapabilities provider not" >> + " supported, hence skipping the tc ....") >> + return SKIP + >> + >> cname = 'ConsoleRedirectionServiceCapabilities' >> cap_name = 'ConsoleRedirectionCapabilities' >> classname = get_typed_class(virt, cname) >> > > This approach works for handling test cases that run against new > providers. However, I think it'd be useful to have a function that > calls GetClass() to determine whether the class is registered with the > CIMOM. If the class isn't registered, the test would be skipped and an > error message would be printed indicating that the class isn't > registered. > > If all of the libvirt-cim classes aren't registered properly, then all > of the tests would be skipped instead of all of them failing. > > This is something you could embed into the do_main() call, so that it > happens before the test is even run. The tricky part is determining > the classname or classnames associated with each test. > > I'm going to apply this change for now, and I'll add a to-do on the > wiki for coming up with a way to check the classnames before running a > test. > Yes I agree with you that we need to better the way to verify if tc in a particular directory needs to be run or not. This has two fold advantage: 1) It will tell us if the providers are registered properly or not, if its a setup issue. 2) It will save some batch test run time, by skipping those directories. Implementing this is not straight forward though. Here is an initial thought how we can implement this check Once the test run in batch mode is started even before we invoke the tests, we can have a list of all the providers which we think should be present for the providers to be verified. We can then have two list 1) The first list should contain information of the providers which are registered on the machine and the tests for which have to be run. 2) Second list should contain the list of all providers which have not been registered on the machine. -- The error here would depend on two things: -- If the providers is not registered properly because of the setup issue -- Or the provider is not registered since the installed source/ rpm does not yet contain support for that particular provider. Thanks and Regards, Deepti. From yunguol at cn.ibm.com Wed Nov 5 06:05:55 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 04 Nov 2008 22:05:55 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from live.py and utils.py to xm_virt_util.py Message-ID: <79b321ebebfda4cde38e.1225865155@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1225865149 28800 # Node ID 79b321ebebfda4cde38ecb4fe0ea7bd9e4f51539 # Parent 319e2e9509d360334c0e38e17abc9bf2b163e1cb [TEST] Move some functions from live.py and utils.py to xm_virt_util.py The moved functions are: processors_count() memory_count() network_macs() run_remote_guest() Signed-off-by: Guolian Yun diff -r 319e2e9509d3 -r 79b321ebebfd lib/VirtLib/live.py --- a/lib/VirtLib/live.py Tue Nov 04 05:22:21 2008 -0800 +++ b/lib/VirtLib/live.py Tue Nov 04 22:05:49 2008 -0800 @@ -25,59 +25,6 @@ import os import utils import socket - -def processors_count(ip, vs_name): - """Returns the number of processors of the specified VS - """ - - guest_cmd = "grep '^$' /proc/cpuinfo | wc -l" - - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) - if rc != 0: - return -1 - - try: - cpus = int(out) - return cpus - except ValueError: - return -1 - -def memory_count(ip, vs_name): - """Returns the memory size (in Bytes) of the specified VS. - """ - - guest_cmd = "grep MemTotal /proc/meminfo" - - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) - if rc != 0: - return -1 - - try: - mem = int( out.split()[1] ) - return mem * 1024 - except (IndexError, ValueError): - return -1 - -def network_macs(ip, vs_name): - """Returns a list of MAC address of the specified VS. - """ - - guest_cmd = "ifconfig -a | grep eth" - - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) - if rc != 0: - return [] - - ret = [] - lines = out.splitlines() - for l in lines: - try: - mac = l.split()[-1] - ret.append( mac ) - except IndexError: - pass - - return ret def available_bridges(ip): """Return a list of the available bridges in the running dom0. diff -r 319e2e9509d3 -r 79b321ebebfd lib/VirtLib/utils.py --- a/lib/VirtLib/utils.py Tue Nov 04 05:22:21 2008 -0800 +++ b/lib/VirtLib/utils.py Tue Nov 04 22:05:49 2008 -0800 @@ -103,11 +103,3 @@ cmd = 'ssh-keygen -y -f %s' % SSH_KEY pubkey = commands.getoutput(cmd) write_pubkey(pubkey) - -def run_remote_guest(ip, domain, command): - """ Execute commands on remote guest console. - """ - - cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) - - return run_remote(ip, cmd) diff -r 319e2e9509d3 -r 79b321ebebfd suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Nov 04 05:22:21 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Nov 04 22:05:49 2008 -0800 @@ -287,3 +287,65 @@ if virt == "LXC": return "lxc:///system" return "" + +def run_remote_guest(ip, domain, command): + """ Execute commands on remote guest console. + """ + + cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) + + return run_remote(ip, cmd) + +def processors_count(ip, vs_name): + """Returns the number of processors of the specified VS + """ + + guest_cmd = "grep '^$' /proc/cpuinfo | wc -l" + + rc, out = run_remote_guest(ip, vs_name, guest_cmd) + if rc != 0: + return -1 + + try: + cpus = int(out) + return cpus + except ValueError: + return -1 + +def memory_count(ip, vs_name): + """Returns the memory size (in Bytes) of the specified VS. + """ + + guest_cmd = "grep MemTotal /proc/meminfo" + + rc, out = run_remote_guest(ip, vs_name, guest_cmd) + if rc != 0: + return -1 + + try: + mem = int( out.split()[1] ) + return mem * 1024 + except (IndexError, ValueError): + return -1 + +def network_macs(ip, vs_name): + """Returns a list of MAC address of the specified VS. + """ + + guest_cmd = "ifconfig -a | grep eth" + + rc, out = run_remote_guest(ip, vs_name, guest_cmd) + if rc != 0: + return [] + + ret = [] + lines = out.splitlines() + for l in lines: + try: + mac = l.split()[-1] + ret.append( mac ) + except IndexError: + pass + + return ret + From yunguol at cn.ibm.com Wed Nov 5 05:52:18 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 5 Nov 2008 13:52:18 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py In-Reply-To: <49107445.6080705@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-05 00:11:49: > > > I'm sorry Daisy - I'm not sure I understand what you mean here. Are you > > > saying that run_remote_guest() needs to stay in lib/VirtLib/utils.py? > > > > > Yeah, I want to say that run_remote_guest() needs to stay in > > lib/VirtLib/utils.py. > > It because that lib/VirtLib/live.py have to call run_remote_guest(), > > such as below > > function in live.py: > > > > def processors_count(ip, vs_name): > > """Returns the number of processors of the specified VS > > """ > > > > guest_cmd = "grep '^$' /proc/cpuinfo | wc -l" > > > > rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) > > if rc != 0: > > return -1 > > > > try: > > cpus = int(out) > > return cpus > > except ValueError: > > return -1 > > > > If we move it to /libvirt-cim/lib/XenKvmLib/xm_virt_util.py, how does > > live.py work? > > Oh, I see. I had missed this before when we discussed what functions > should be moved. Any function that is run within the guest should also > be moved. > > So the following should be moved to > libvirt-cim/lib/XenKvmLib/xm_virt_util.p: > > processors_count() > memory_count() > network_macs() > > I had originally thought these were running on the host, not within the > guest. Sorry for the confusion! I have moved below functions to xm_virt_util.py: processors_count() memory_count() network_macs() run_remote_guest() So far, this work item is done. I'm going to fix the test failure. Thoughts? 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 Wed Nov 5 08:32:54 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 05 Nov 2008 00:32:54 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fixing 01_forward.py tc of SystemDevice Message-ID: <0814061c13e22cdfa552.1225873974@elm3b193.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1225873834 28800 # Node ID 0814061c13e22cdfa552a2e7e578fb717195e26c # Parent 319e2e9509d360334c0e38e17abc9bf2b163e1cb [TEST] #3 Fixing 01_forward.py tc of SystemDevice. changes form patch2: -------------------- Modified the for loop. The test needs to be updated with cim_define(). Tested on KVM, LXC and Xen with current sources and F9 rpm. Signed-off-by: Deepti B. Kalakeri diff -r 319e2e9509d3 -r 0814061c13e2 suites/libvirt-cim/cimtest/SystemDevice/01_forward.py --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Tue Nov 04 05:22:21 2008 -0800 +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Wed Nov 05 00:30:34 2008 -0800 @@ -8,6 +8,7 @@ # Kaitlin Rupert # Veerendra Chandrappa # Zhengang Li +# Deepti B. Kalakeri # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public @@ -25,10 +26,10 @@ # import sys +from sets import Set from VirtLib import utils from XenKvmLib import assoc from XenKvmLib import vxml -from XenKvmLib import devices from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -38,72 +39,88 @@ test_dom = "test_domain" test_mac = "00:11:22:33:44:55" -test_cpu = 1 +test_cpu = 3 @do_main(sup_types) def main(): - options= main.options - - if options.virt == 'Xen': + options = main.options + server = options.ip + virt = options.virt + + if virt == 'Xen': test_disk = 'xvdb' else: test_disk = 'hdb' status = PASS - virt_xml = vxml.get_class(options.virt) - if options.virt == 'LXC': - cxml = virt_xml(test_dom) + virt_xml = vxml.get_class(virt) + if virt == 'LXC': + cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac) else: - cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, disk = test_disk) - ret = cxml.create(options.ip) + cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, + disk = test_disk) + + ret = cxml.create(server) if not ret: logger.error('Unable to create domain %s' % test_dom) return FAIL - sd_classname = get_typed_class(options.virt, 'SystemDevice') - cs_classname = get_typed_class(options.virt, 'ComputerSystem') + sd_classname = get_typed_class(virt, 'SystemDevice') + cs_classname = get_typed_class(virt, 'ComputerSystem') - devs = assoc.AssociatorNames(options.ip, sd_classname, cs_classname, + devs = assoc.AssociatorNames(server, sd_classname, cs_classname, Name=test_dom, CreationClassName=cs_classname) if devs == None: - logger.error("System association failed") - return FAIL - elif len(devs) == 0: - logger.error("No devices returned") + logger.error("'%s' association failed", sd_classname) + cxml.destroy(server) return FAIL - cn_devid = { - get_typed_class(options.virt, "NetworkPort") : '%s/%s' % (test_dom, test_mac), - get_typed_class(options.virt, "Memory") : '%s/mem' % test_dom, - get_typed_class(options.virt, "LogicalDisk") : '%s/%s' % (test_dom, test_disk), - get_typed_class(options.virt, "Processor") : '%s/%s' % (test_dom, test_cpu-1) - } + if len(devs) == 0: + logger.error("No devices returned") + cxml.destroy(server) + return FAIL - key_list = {'DeviceID' : '', - 'CreationClassName' : '', - 'SystemName' : test_dom, - 'SystemCreationClassname' : cs_classname - } - - for dev_cn in cn_devid.keys(): - for dev in devs: - key_list['CreationClassName'] = dev['CreationClassname'] - key_list['DeviceID'] = dev['DeviceID'] - device = devices.device_of(options.ip, key_list) - if device.CreationClassName != dev_cn: - continue - devid = device.DeviceID + mem_cn = get_typed_class(virt, "Memory") + exp_pllist = { mem_cn : ['%s/mem' % test_dom] } + proc_cn = get_typed_class(virt, "Processor") + exp_pllist[proc_cn] = [] + for i in range(test_cpu): + exp_pllist[proc_cn].append( '%s/%s' % (test_dom, i)) - _devid = cn_devid[dev_cn] - if devid != _devid: - logger.error("DeviceID `%s` != `%s'" % (devid, _devid)) - status = FAIL - else: - logger.info("Examined %s" % _devid) - - cxml.destroy(options.ip) - cxml.undefine(options.ip) + if virt != 'LXC': + net_cn = get_typed_class(virt, "NetworkPort") + disk_cn = get_typed_class(virt, "LogicalDisk") + exp_pllist[net_cn] = ['%s/%s' % (test_dom, test_mac)] + exp_pllist[disk_cn] = [ '%s/%s' % (test_dom, test_disk)] + try: + res_pllist = {} + for items in devs: + if items.classname in res_pllist.keys(): + res_pllist[items.classname].append(items['DeviceID']) + else: + res_pllist[items.classname] = [items['DeviceID']] + + #Verifying we get all the expected device class info + if Set(exp_pllist.keys()) != Set(res_pllist.keys()): + logger.error("Device Class mismatch") + raise Exception("Expected Device class list: %s \n \t Got: %s" + % (sorted(exp_pllist.keys()), + sorted(res_pllist.keys()))) + + #Verifying that we get only the expected deviceid + #for every device class + for key in exp_pllist.keys(): + if Set(exp_pllist[key]) != Set(res_pllist[key]): + logger.error("DeviceID mismatch") + raise Exception("Expected DeviceID: %s \n \t Got: %s" + % (sorted(exp_pllist[key]), + sorted(res_pllist[key]))) + except Exception, details: + logger.error("Exception %s", details) + status = FAIL + + cxml.destroy(server) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Wed Nov 5 10:26:35 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 05 Nov 2008 02:26:35 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 09_procrasd_persist.py of VSMS Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225880784 28800 # Node ID b1d7f871c2553a461600ef7f82cc8fd931e11551 # Parent 319e2e9509d360334c0e38e17abc9bf2b163e1cb [TEST] Fixing 09_procrasd_persist.py of VSMS. The tc was failing bcs of the changes made to ProcResourceAllocationSettingData of vsms.py Signed-off-by: Deepti B. Kalakeri diff -r 319e2e9509d3 -r b1d7f871c255 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Nov 04 05:22:21 2008 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Wed Nov 05 02:26:24 2008 -0800 @@ -47,7 +47,7 @@ vssd, rasd = vsms.default_vssd_rasd_str(default_dom, virt=vtype) class_pasd = vsms.get_pasd_class(vtype) - proc_inst = class_pasd(nvcpu, default_dom, weight, limit) + proc_inst = class_pasd(default_dom, nvcpu, weight, limit) proc_mof = proc_inst.mof() for i in range(len(rasd)): From deeptik at linux.vnet.ibm.com Wed Nov 5 10:46:30 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 05 Nov 2008 16:16:30 +0530 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Nov 05 2008 [ F9 rpm ] Message-ID: <49117986.1030109@linux.vnet.ibm.com> ================================================= KVM on Pegasus Test Run Summary for Nov 05 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 Cimtest revision: 475 Cimtest changeset: 319e2e9509d3 ================================================= FAIL : 3 XFAIL : 2 SKIP : 6 PASS : 128 ----------------- Total : 139 ================================================= FAIL Test Summary: SystemDevice - 01_forward.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL VirtualSystemManagementService - 15_mod_system_settings.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: 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: 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: FAIL ERROR - Exception: details (1, u"CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Processor RASD") InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualQuantity' field in Processor RASD -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: FAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 -------------------------------------------------------------------- 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 Wed Nov 5 04:58:36 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 20:58:36 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing xm_virt_util.py to import fv_cap Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225860900 28800 # Node ID f5bac806db6e00499b572364216031240a31fe8f # Parent 319e2e9509d360334c0e38e17abc9bf2b163e1cb [TEST] Fixing xm_virt_util.py to import fv_cap. This is req for tc which use bootloader() will fail otherwise. Signed-off-by: Deepti B. Kalakeri diff -r 319e2e9509d3 -r f5bac806db6e suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Nov 04 05:22:21 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Nov 04 20:55:00 2008 -0800 @@ -25,6 +25,7 @@ import os import os from VirtLib import utils import socket +from VirtLib.live import fv_cap def xm_domname(ip, domid): From deeptik at linux.vnet.ibm.com Wed Nov 5 12:13:17 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 05 Nov 2008 17:43:17 +0530 Subject: [Libvirt-cim] Re: KVM on Pegasus Test Run Summary for Nov 05 2008 [ F9 rpm ] In-Reply-To: <49117986.1030109@linux.vnet.ibm.com> References: <49117986.1030109@linux.vnet.ibm.com> Message-ID: <49118DDD.4050705@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > KVM on Pegasus Test Run Summary for Nov 05 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 > Cimtest revision: 475 > Cimtest changeset: 319e2e9509d3 > ================================================= > FAIL : 3 > XFAIL : 2 > SKIP : 6 > PASS : 128 > ----------------- > Total : 139 > ================================================= > FAIL Test Summary: > SystemDevice - 01_forward.py: FAIL Fix under review. > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL Fix submitted for the same. > VirtualSystemManagementService - 15_mod_system_settings.py: FAIL > > From deeptik at linux.vnet.ibm.com Wed Nov 5 05:26:08 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 21:26:08 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating the tc to verify fewer Profile when rev < 680 Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225862746 28800 # Node ID b1634f5d4f0b0cb0f373e3790754536786e9b008 # Parent f5bac806db6e00499b572364216031240a31fe8f [TEST] Updating the tc to verify fewer Profile when rev < 680. This tc will still fail since the following query does not work yet. Will send a follow up patch for the same. Signed-off-by: Deepti B. Kalakeri diff -r f5bac806db6e -r b1634f5d4f0b suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Nov 04 20:55:00 2008 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Nov 04 21:25:46 2008 -0800 @@ -51,11 +51,13 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.enumclass import EnumInstances from XenKvmLib.const import default_network_name, default_pool_name +from XenKvmLib.const import get_provider_version sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "domU" bug_sblim = '00007' +libvirt_cim_ectp_changes = 680 def pool_init(verify_list, pool_cn, pool_name, virt): ccn = get_typed_class(virt, pool_cn) @@ -141,9 +143,14 @@ def get_proflist(server, reg_classname, status = PASS try: proflist = EnumInstances(server, reg_classname) - if len(proflist) < 7: - logger.error("'%s' returned '%d' '%s' objects, expected atleast 7", - reg_classname, len(proflist), 'Profile') + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev < libvirt_cim_ectp_changes: + len_prof_list = 5 + else: + len_prof_list = 7 + if len(proflist) < len_prof_list: + logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", + reg_classname, len(proflist), 'Profile', len_prof_list) status = FAIL except Exception, detail: From deeptik at linux.vnet.ibm.com Wed Nov 5 06:10:00 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 22:10:00 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 03_hs_to_settdefcap.py tc of HostSystem Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225865381 28800 # Node ID f5a2c1cc3df0bc76fbdcefad05c2254669a42428 # Parent b1634f5d4f0b0cb0f373e3790754536786e9b008 [TEST] Updating 03_hs_to_settdefcap.py tc of HostSystem . This modification is required for libvirt-cim providers which does not include the properties of template RASDs changes. Signed-off-by: Deepti B. Kalakeri diff -r b1634f5d4f0b -r f5a2c1cc3df0 suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py --- a/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Nov 04 21:25:46 2008 -0800 +++ b/suites/libvirt-cim/cimtest/HostSystem/03_hs_to_settdefcap.py Tue Nov 04 22:09:41 2008 -0800 @@ -50,11 +50,13 @@ from CimTest.ReturnCodes import PASS, FA from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.test_xml import testxml from XenKvmLib.test_doms import destroy_and_undefine_all +from XenKvmLib.const import get_provider_version sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "domgst_test" test_vcpus = 1 bug_sblim='00007' +libvirt_rasd_template_changes = 707 def setup_env(server, virt="Xen"): status = PASS @@ -215,7 +217,9 @@ def get_rasddetails(server, alloccap, vi ccn, InstanceID = ap['InstanceID']) - if 'DiskPool' in ap['InstanceID'] and virt =='Xen': + curr_cim_rev, changeset = get_provider_version(virt, server) + if 'DiskPool' in ap['InstanceID'] and virt =='Xen' and \ + curr_cim_rev >= libvirt_rasd_template_changes: # 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 From deeptik at linux.vnet.ibm.com Wed Nov 5 06:20:42 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 04 Nov 2008 22:20:42 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 01_forward.py tc of SettingsDefineCapabilities Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1225865973 28800 # Node ID f0c349a1321c590b172b3ecaa279e5d0c2f0b26d # Parent f5a2c1cc3df0bc76fbdcefad05c2254669a42428 [TEST] Updating 01_forward.py tc of SettingsDefineCapabilities. This modification is required for libvirt-cim providers which does not include the properties of template RASDs changes. Signed-off-by: Deepti B. Kalakeri diff -r f5a2c1cc3df0 -r f0c349a1321c suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Tue Nov 04 22:09:41 2008 -0800 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Tue Nov 04 22:19:33 2008 -0800 @@ -63,8 +63,10 @@ from XenKvmLib.const import do_main, def 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.const import get_provider_version platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] +libvirt_rasd_template_changes = 707 memid = "MemoryPool/0" procid = "ProcessorPool/0" @@ -168,7 +170,9 @@ def verify_sdc_with_ac(virt, server, poo assoc_info = assoc.Associators(server, assoc_cname, cn, InstanceID = instid) - if 'DiskPool' in instid and (virt =='Xen' or virt == 'XenFV'): + curr_cim_rev, changeset = get_provider_version(virt, server) + if 'DiskPool' in instid and (virt =='Xen' or virt == 'XenFV') and \ + curr_cim_rev >= libvirt_rasd_template_changes: # 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 From danms at us.ibm.com Wed Nov 5 14:52:15 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Nov 2008 06:52:15 -0800 Subject: [Libvirt-cim] [PATCH] Add KVMRedirectionSAP header tonoinst_HEADERS list In-Reply-To: <20081105050415.3DEF6480002@m023.s.css.fujitsu.com> (Atsushi SAKAI's message of "Wed, 05 Nov 2008 14:04:12 +0900") References: <29c875cab8b808655c04.1225834790@localhost.localdomain> <20081105050415.3DEF6480002@m023.s.css.fujitsu.com> Message-ID: <87iqr22pk0.fsf@caffeine.danplanet.com> AS> Simple Question. Is there any plan to do Test-Autobuild? AS> http://builder.virt-manager.org/ Not at the moment, but patches are welcome :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Wed Nov 5 16:00:10 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Nov 2008 08:00:10 -0800 Subject: [Libvirt-cim] [PATCH] Store and preserve keymap attribute for graphics device Message-ID: <20af5ae5b01c308d2cfa.1225900810@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225900807 28800 # Node ID 20af5ae5b01c308d2cfab62899b2dbcb8d186567 # Parent 29c875cab8b808655c04d2f971c0d6c9a9f03dbd Store and preserve keymap attribute for graphics device This prevents us from discarding the keymap setting when we redefine a domain. Signed-off-by: Dan Smith diff -r 29c875cab8b8 -r 20af5ae5b01c libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Tue Nov 04 13:10:46 2008 -0800 +++ b/libxkutil/device_parsing.c Wed Nov 05 08:00:07 2008 -0800 @@ -76,6 +76,7 @@ free(dev->type); free(dev->port); free(dev->host); + free(dev->keymap); } void cleanup_virt_device(struct virt_device *dev) @@ -440,6 +441,7 @@ gdev->type = get_attr_value(node, "type"); gdev->port = get_attr_value(node, "port"); gdev->host = get_attr_value(node, "listen"); + gdev->keymap = get_attr_value(node, "keymap"); if ((gdev->type == NULL) || (gdev->port == NULL)) goto err; @@ -628,6 +630,7 @@ DUP_FIELD(dev, _dev, dev.graphics.type); DUP_FIELD(dev, _dev, dev.graphics.port); DUP_FIELD(dev, _dev, dev.graphics.host); + DUP_FIELD(dev, _dev, dev.graphics.keymap); } return dev; diff -r 29c875cab8b8 -r 20af5ae5b01c libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Tue Nov 04 13:10:46 2008 -0800 +++ b/libxkutil/device_parsing.h Wed Nov 05 08:00:07 2008 -0800 @@ -63,6 +63,7 @@ char *type; char *port; char *host; + char *keymap; }; struct virt_device { diff -r 29c875cab8b8 -r 20af5ae5b01c libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Tue Nov 04 13:10:46 2008 -0800 +++ b/libxkutil/xmlgen.c Wed Nov 05 08:00:07 2008 -0800 @@ -342,9 +342,12 @@ struct graphics_device *graphics = &dev->dev.graphics; ret = asprintf(&_xml, - "\n", + "\n", graphics->type, - graphics->port); + graphics->port, + graphics->host != NULL ? graphics->host : "127.0.0.1", + graphics->keymap != NULL ? graphics->keymap : "en-us"); if (ret == -1) return false; else From danms at us.ibm.com Wed Nov 5 16:16:05 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Nov 2008 08:16:05 -0800 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine Message-ID: # HG changeset patch # User Dan Smith # Date 1225901751 28800 # Node ID ece7c71cd2aab612dec19cc6247194cdf8b5b049 # Parent 20af5ae5b01c308d2cfab62899b2dbcb8d186567 Avoid clobbering disk flags on redefine This patch makes sure we track the shareable and readonly flags that can be present in a disk device. Signed-off-by: Dan Smith diff -r 20af5ae5b01c -r ece7c71cd2aa libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Nov 05 08:00:07 2008 -0800 +++ b/libxkutil/device_parsing.c Wed Nov 05 08:15:51 2008 -0800 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -235,6 +236,10 @@ ddev->virtual_dev = get_attr_value(child, "dev"); if (ddev->virtual_dev == NULL) goto err; + } else if (XSTREQ(child->name, "readonly")) { + ddev->readonly = true; + } else if (XSTREQ(child->name, "shareable")) { + ddev->shareable = true; } } if ((ddev->source == NULL) || (ddev->virtual_dev == NULL)) @@ -619,6 +624,8 @@ DUP_FIELD(dev, _dev, dev.disk.driver); DUP_FIELD(dev, _dev, dev.disk.source); DUP_FIELD(dev, _dev, dev.disk.virtual_dev); + dev->dev.disk.readonly = dev->dev.disk.readonly; + dev->dev.disk.shareable = dev->dev.disk.shareable; } else if (dev->type == CIM_RES_TYPE_MEM) { dev->dev.mem.size = _dev->dev.mem.size; dev->dev.mem.maxsize = _dev->dev.mem.maxsize; diff -r 20af5ae5b01c -r ece7c71cd2aa libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Wed Nov 05 08:00:07 2008 -0800 +++ b/libxkutil/device_parsing.h Wed Nov 05 08:15:51 2008 -0800 @@ -25,6 +25,7 @@ #define __DEVICE_PARSING_H #include +#include #include #include "../src/svpc_types.h" @@ -36,6 +37,8 @@ char *source; char *virtual_dev; enum {DISK_UNKNOWN, DISK_PHY, DISK_FILE, DISK_FS} disk_type; + bool readonly; + bool shareable; }; struct net_device { diff -r 20af5ae5b01c -r ece7c71cd2aa libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Wed Nov 05 08:00:07 2008 -0800 +++ b/libxkutil/xmlgen.c Wed Nov 05 08:15:51 2008 -0800 @@ -113,7 +113,7 @@ return 1; } -static char *disk_block_xml(const char *path, const char *vdev) +static char *disk_block_xml(struct disk_device *dev) { char *xml; int ret; @@ -122,16 +122,20 @@ "\n" " \n" " \n" + "%s" + "%s" "\n", - path, - vdev); + dev->source, + dev->virtual_dev, + dev->readonly ? "\n" : "", + dev->shareable ? "\n" : ""); if (ret == -1) xml = NULL; return xml; } -static char *disk_file_xml(const char *path, const char *vdev) +static char *disk_file_xml(struct disk_device *dev) { char *xml; int ret; @@ -140,16 +144,20 @@ "\n" " \n" " \n" + "%s" + "%s" "\n", - path, - vdev); + dev->source, + dev->virtual_dev, + dev->readonly ? "" : "", + dev->shareable ? "shareable/>" : ""); if (ret == -1) xml = NULL; return xml; } -static char *disk_fs_xml(const char *path, const char *vdev) +static char *disk_fs_xml(struct disk_device *dev) { char *xml; int ret; @@ -159,8 +167,8 @@ " \n" " \n" "\n", - path, - vdev); + dev->source, + dev->virtual_dev); if (ret == -1) xml = NULL; @@ -173,13 +181,13 @@ struct disk_device *disk = &dev->dev.disk; if (disk->disk_type == DISK_PHY) - _xml = disk_block_xml(disk->source, disk->virtual_dev); + _xml = disk_block_xml(disk); 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); + _xml = disk_file_xml(disk); else if (disk->disk_type == DISK_FS) - _xml = disk_fs_xml(disk->source, disk->virtual_dev); + _xml = disk_fs_xml(disk); else return false; From danms at us.ibm.com Wed Nov 5 16:22:58 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 05 Nov 2008 08:22:58 -0800 Subject: [Libvirt-cim] [PATCH] Don't drop disk type on redefine Message-ID: <1d696e80fccc41c9b21b.1225902178@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225902171 28800 # Node ID 1d696e80fccc41c9b21b5f24b84deab82d1416cc # Parent ece7c71cd2aab612dec19cc6247194cdf8b5b049 Don't drop disk type on redefine Right now, we track the status of disk/cdrom of a disk device, but don't use it in the XML define. This patch uses the value instead of a static device='disk'. Signed-off-by: Dan Smith diff -r ece7c71cd2aa -r 1d696e80fccc libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Wed Nov 05 08:15:51 2008 -0800 +++ b/libxkutil/xmlgen.c Wed Nov 05 08:22:51 2008 -0800 @@ -119,12 +119,13 @@ int ret; ret = asprintf(&xml, - "\n" + "\n" " \n" " \n" "%s" "%s" "\n", + dev->device, dev->source, dev->virtual_dev, dev->readonly ? "\n" : "", @@ -141,12 +142,13 @@ int ret; ret = asprintf(&xml, - "\n" + "\n" " \n" " \n" "%s" "%s" "\n", + dev->device, dev->source, dev->virtual_dev, dev->readonly ? "" : "", From kaitlin at linux.vnet.ibm.com Wed Nov 5 18:59:02 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 05 Nov 2008 10:59:02 -0800 Subject: [Libvirt-cim] [PATCH] Don't drop disk type on redefine In-Reply-To: <1d696e80fccc41c9b21b.1225902178@guaranine.danplanet.com> References: <1d696e80fccc41c9b21b.1225902178@guaranine.danplanet.com> Message-ID: <4911ECF6.5070208@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1225902171 28800 > # Node ID 1d696e80fccc41c9b21b5f24b84deab82d1416cc > # Parent ece7c71cd2aab612dec19cc6247194cdf8b5b049 > Don't drop disk type on redefine > > Right now, we track the status of disk/cdrom of a disk device, but don't > use it in the XML define. This patch uses the value instead of a static > device='disk'. > The disk_rasd_to_vdev() function in VSMS doesn't set the device value of the disk struct. The guest fails to define due to a null device. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 5 19:35:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 05 Nov 2008 11:35:59 -0800 Subject: [Libvirt-cim] [PATCH] Store and preserve keymap attribute for graphics device In-Reply-To: <20af5ae5b01c308d2cfa.1225900810@guaranine.danplanet.com> References: <20af5ae5b01c308d2cfa.1225900810@guaranine.danplanet.com> Message-ID: <4911F59F.8060701@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1225900807 28800 > # Node ID 20af5ae5b01c308d2cfab62899b2dbcb8d186567 > # Parent 29c875cab8b808655c04d2f971c0d6c9a9f03dbd > Store and preserve keymap attribute for graphics device > > This prevents us from discarding the keymap setting when we redefine a domain. > DefineSystem() doesn't check to see if the guest already exists. In create_system(), before calling get_reference_domain(), there should be such a check. If the domain exists, we should get the domain struct and then update the struct accordingly. Otherwise, we drop the existing graphics device settings. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 5 20:04:44 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 05 Nov 2008 12:04:44 -0800 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine In-Reply-To: References: Message-ID: <4911FC5C.2090704@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1225901751 28800 > # Node ID ece7c71cd2aab612dec19cc6247194cdf8b5b049 > # Parent 20af5ae5b01c308d2cfab62899b2dbcb8d186567 > Avoid clobbering disk flags on redefine > > This patch makes sure we track the shareable and readonly flags that can > be present in a disk device. +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 5 20:27:02 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 05 Nov 2008 12:27:02 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from live.py and utils.py to xm_virt_util.py In-Reply-To: <79b321ebebfda4cde38e.1225865155@elm3b197.beaverton.ibm.com> References: <79b321ebebfda4cde38e.1225865155@elm3b197.beaverton.ibm.com> Message-ID: <49120196.1060102@linux.vnet.ibm.com> > diff -r 319e2e9509d3 -r 79b321ebebfd lib/VirtLib/utils.py > --- a/lib/VirtLib/utils.py Tue Nov 04 05:22:21 2008 -0800 > +++ b/lib/VirtLib/utils.py Tue Nov 04 22:05:49 2008 -0800 > @@ -103,11 +103,3 @@ > cmd = 'ssh-keygen -y -f %s' % SSH_KEY > pubkey = commands.getoutput(cmd) > write_pubkey(pubkey) > - > -def run_remote_guest(ip, domain, command): > - """ Execute commands on remote guest console. > - """ > - > - cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) > - > - return run_remote(ip, cmd) CONSOLE_APP_PATH = "/tmp/Console.py" This needs to be removed from this file and placed in lib/XenKvmLib/xm_virt_util.py -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 5 20:27:55 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 05 Nov 2008 12:27:55 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py In-Reply-To: References: Message-ID: <491201CB.9040209@linux.vnet.ibm.com> > > > > Oh, I see. I had missed this before when we discussed what functions > > should be moved. Any function that is run within the guest should also > > be moved. > > > > So the following should be moved to > > libvirt-cim/lib/XenKvmLib/xm_virt_util.p: > > > > processors_count() > > memory_count() > > network_macs() > > > > I had originally thought these were running on the host, not within the > > guest. Sorry for the confusion! > > I have moved below functions to xm_virt_util.py: > > processors_count() > memory_count() > network_macs() > run_remote_guest() > > So far, this work item is done. I'm going to fix the test failure. > Thoughts? > > Thanks I have a minor comment on the last patch, but after that is fixed, I think this item is complete. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From jfehlig at novell.com Wed Nov 5 22:01:23 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Wed, 05 Nov 2008 15:01:23 -0700 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine In-Reply-To: References: Message-ID: <491217B3.80905@novell.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1225901751 28800 > # Node ID ece7c71cd2aab612dec19cc6247194cdf8b5b049 > # Parent 20af5ae5b01c308d2cfab62899b2dbcb8d186567 > Avoid clobbering disk flags on redefine > > This patch makes sure we track the shareable and readonly flags that can > be present in a disk device. > +1. These attributes no longer disappear on redefine. Thanks, Jim From kaitlin at linux.vnet.ibm.com Wed Nov 5 23:10:27 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 05 Nov 2008 15:10:27 -0800 Subject: [Libvirt-cim] [PATCH] Fix potiential seg fault in SDC Message-ID: <16aa18cf5325f5e689c4.1225926627@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225926589 28800 # Node ID 16aa18cf5325f5e689c4967d35288d15825fc2be # Parent ece7c71cd2aab612dec19cc6247194cdf8b5b049 Fix potiential seg fault in SDC. Signed-off-by: Kaitlin Rupert diff -r ece7c71cd2aa -r 16aa18cf5325 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Nov 05 08:15:51 2008 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Wed Nov 05 15:09:49 2008 -0800 @@ -270,6 +270,14 @@ base, NAMESPACE(ref)); + if (inst == NULL) { + cu_statusf(_BROKER, s, + CMPI_RC_ERR_FAILED, + "Unable to create instance of type %s", + base); + goto out; + } + CMSetProperty(inst, "ResourceType", &resource_type, CMPI_uint16); out: @@ -310,6 +318,8 @@ } inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_MEM); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "AllocationUnits", @@ -395,6 +405,8 @@ } inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_PROC); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "AllocationUnits", @@ -528,6 +540,8 @@ } inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_NET); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "VirtualQuantity", @@ -606,6 +620,8 @@ } inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "AllocationQuantity", @@ -632,6 +648,7 @@ inst_list_add(list, inst); + out: return s; } From jfehlig at novell.com Wed Nov 5 23:22:05 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Wed, 05 Nov 2008 16:22:05 -0700 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine In-Reply-To: References: Message-ID: <49122A9D.3050704@novell.com> Dan Smith wrote: [...] > > -static char *disk_file_xml(const char *path, const char *vdev) > +static char *disk_file_xml(struct disk_device *dev) > { > char *xml; > int ret; > @@ -140,16 +144,20 @@ > "\n" > " \n" > " \n" > + "%s" > + "%s" > "\n", > - path, > - vdev); > + dev->source, > + dev->virtual_dev, > + dev->readonly ? "" : "", > + dev->shareable ? "shareable/>" : ""); > Pulled the trigger a little early on my previous ack. That last line needs to be + dev->shareable ? "" : ""); Jim From kaitlin at linux.vnet.ibm.com Wed Nov 5 23:37:04 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 05 Nov 2008 15:37:04 -0800 Subject: [Libvirt-cim] [PATCH] Fix RASD provider unregistration Message-ID: <6f62d6165aa6f5b60156.1225928224@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225926818 28800 # Node ID 6f62d6165aa6f5b60156c2c56c2d72a12a021886 # Parent 16aa18cf5325f5e689c4967d35288d15825fc2be Fix RASD provider unregistration. Since <>_ResourceAllocationSettingData is listed first in the mof, it doesn't get properly unregistered because <>_ProcResourceAllocationSettingData (etc) hasn't been unregistered yet. This patch forces the ResourceAllocationSettingData unregistration to be run twice, which isn't ideal, but ensures the classes are properly cleaned up. Signed-off-by: Kaitlin Rupert diff -r 16aa18cf5325 -r 6f62d6165aa6 Makefile.am --- a/Makefile.am Wed Nov 05 15:09:49 2008 -0800 +++ b/Makefile.am Wed Nov 05 15:13:38 2008 -0800 @@ -112,6 +112,10 @@ schema/ElementConformsToProfile.registration \ schema/ReferencedProfile.registration +# This definition is needed during provider unregistration +RASD_MOF = schema/ResourceAllocationSettingData.mof +RASD_REG = schema/ResourceAllocationSettingData.registration + pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh @@ -134,6 +138,7 @@ preuninstall: sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) + sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(RASD_REG) -m $(RASD_MOF) sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) rpm: clean From jfehlig at novell.com Wed Nov 5 23:49:33 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Wed, 05 Nov 2008 16:49:33 -0700 Subject: [Libvirt-cim] PoolID RASD property Message-ID: <4912310D.3010903@novell.com> Should this property be filled in on get of RASD? Or is client expected to follow associations to determine pool from which the allocation occurs? AFAICT, DSP1041 (RAP) is not clear on this. Thanks, Jim From fujimura.toshifumi at np.css.fujitsu.com Thu Nov 6 00:09:01 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 06 Nov 2008 09:09:01 +0900 Subject: [Libvirt-cim] [PATCH][TEST] Fixed a misused character Message-ID: <4912359D.7050407@np.css.fujitsu.com> [PATCH][TEST] Fixed a misused character I found a misused character. Signed-off-by: Toshifumi Fujimura diff -r 29c875cab8b8 doc/architecture.html.in --- a/doc/architecture.html.in Tue Nov 04 13:10:46 2008 -0800 +++ b/doc/architecture.html.in Wed Nov 05 18:42:43 2008 +0900 @@ -15,7 +15,7 @@

The provider classes implement the actual CIM class model. Some of - the provider libraries implement one CIM class and one providier. + the provider libraries implement one CIM class and one provider. However, many of them perform more than one task. For example, the Virt_Device and Virt_DevicePool providers implement the device and device pool classes for each of the major -- Toshifumi Fujimura. From kaitlin at linux.vnet.ibm.com Thu Nov 6 00:40:50 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 05 Nov 2008 16:40:50 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VSMS 14_define_sys_disk.py to specify FV or PV disk for Xen guests Message-ID: <78c534011b848cade458.1225932050@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225932047 28800 # Node ID 78c534011b848cade45897c0c35dac4ebc53fce1 # Parent ddd395416461b33536e9475521548ba8e2c16d84 [TEST] Fix VSMS 14_define_sys_disk.py to specify FV or PV disk for Xen guests. Without this fix, both FV and PV rasds are passed to the DefineSystem() call which isn't valid on PV systems. Signed-off-by: Kaitlin Rupert diff -r ddd395416461 -r 78c534011b84 suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue Nov 04 22:19:33 2008 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Wed Nov 05 16:40:47 2008 -0800 @@ -48,18 +48,22 @@ return path -def get_vssd_rasd(ip, virt, addr): +def get_vssd_rasd(ip, virt, addr, disk_type): vssd = get_vssd_mof(virt, test_dom) rasds = get_default_rasds(ip, virt) - for i in range(len(rasds)): - if 'DiskPool' in rasds[i]['PoolID']: - rasds[i]['Address'] = addr - rasds[i] = inst_to_mof(rasds[i]) + rasd_list = [] + + for rasd in rasds: + if 'DiskPool' in rasd['PoolID']: + if disk_type != "" and rasd['Caption'] != disk_type: + continue + rasd['Address'] = addr + rasd_list.append(inst_to_mof(rasd)) params = { 'vssd' : vssd, - 'rasd' : rasds + 'rasd' : rasd_list } return params @@ -68,12 +72,19 @@ def main(): options = main.options + if options.virt == "Xen": + disk_cap = "PV disk" + elif options.virt == "XenFV": + disk_cap = "FV disk" + else: + disk_cap = "" + 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) + define_params = get_vssd_rasd(options.ip, options.virt, addr, disk_cap) if len(define_params) != 2: raise Exception("Unable to get VSSD and RASDs for %s" % test_dom) From yunguol at cn.ibm.com Thu Nov 6 06:05:49 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 05 Nov 2008 22:05:49 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Move some functions from live.py and utils.py to xm_virt_util.py Message-ID: # HG changeset patch # User Guolian Yun # Date 1225951428 28800 # Node ID a56da9383d25d808284820338091e2d1cc2fdf0c # Parent 319e2e9509d360334c0e38e17abc9bf2b163e1cb [TEST]#2 Move some functions from live.py and utils.py to xm_virt_util.py Also remove CONSOLE_APP_PATH to lib/XenKvmLib/xm_virt_util.py Signed-off-by: Guolian Yun diff -r 319e2e9509d3 -r a56da9383d25 lib/VirtLib/live.py --- a/lib/VirtLib/live.py Tue Nov 04 05:22:21 2008 -0800 +++ b/lib/VirtLib/live.py Wed Nov 05 22:03:48 2008 -0800 @@ -25,59 +25,6 @@ import os import utils import socket - -def processors_count(ip, vs_name): - """Returns the number of processors of the specified VS - """ - - guest_cmd = "grep '^$' /proc/cpuinfo | wc -l" - - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) - if rc != 0: - return -1 - - try: - cpus = int(out) - return cpus - except ValueError: - return -1 - -def memory_count(ip, vs_name): - """Returns the memory size (in Bytes) of the specified VS. - """ - - guest_cmd = "grep MemTotal /proc/meminfo" - - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) - if rc != 0: - return -1 - - try: - mem = int( out.split()[1] ) - return mem * 1024 - except (IndexError, ValueError): - return -1 - -def network_macs(ip, vs_name): - """Returns a list of MAC address of the specified VS. - """ - - guest_cmd = "ifconfig -a | grep eth" - - rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd) - if rc != 0: - return [] - - ret = [] - lines = out.splitlines() - for l in lines: - try: - mac = l.split()[-1] - ret.append( mac ) - except IndexError: - pass - - return ret def available_bridges(ip): """Return a list of the available bridges in the running dom0. diff -r 319e2e9509d3 -r a56da9383d25 lib/VirtLib/utils.py --- a/lib/VirtLib/utils.py Tue Nov 04 05:22:21 2008 -0800 +++ b/lib/VirtLib/utils.py Wed Nov 05 22:03:48 2008 -0800 @@ -23,8 +23,6 @@ import os import commands - -CONSOLE_APP_PATH = "/tmp/Console.py" # ssh utils @@ -103,11 +101,3 @@ cmd = 'ssh-keygen -y -f %s' % SSH_KEY pubkey = commands.getoutput(cmd) write_pubkey(pubkey) - -def run_remote_guest(ip, domain, command): - """ Execute commands on remote guest console. - """ - - cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) - - return run_remote(ip, cmd) diff -r 319e2e9509d3 -r a56da9383d25 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Nov 04 05:22:21 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Nov 05 22:03:48 2008 -0800 @@ -26,6 +26,7 @@ from VirtLib import utils import socket +CONSOLE_APP_PATH = "/tmp/Console.py" def xm_domname(ip, domid): cmd = "xm domname %s" % domid @@ -287,3 +288,65 @@ if virt == "LXC": return "lxc:///system" return "" + +def run_remote_guest(ip, domain, command): + """ Execute commands on remote guest console. + """ + + cmd = 'python %s %s "%s"' % (CONSOLE_APP_PATH, domain, command) + + return run_remote(ip, cmd) + +def processors_count(ip, vs_name): + """Returns the number of processors of the specified VS + """ + + guest_cmd = "grep '^$' /proc/cpuinfo | wc -l" + + rc, out = run_remote_guest(ip, vs_name, guest_cmd) + if rc != 0: + return -1 + + try: + cpus = int(out) + return cpus + except ValueError: + return -1 + +def memory_count(ip, vs_name): + """Returns the memory size (in Bytes) of the specified VS. + """ + + guest_cmd = "grep MemTotal /proc/meminfo" + + rc, out = run_remote_guest(ip, vs_name, guest_cmd) + if rc != 0: + return -1 + + try: + mem = int( out.split()[1] ) + return mem * 1024 + except (IndexError, ValueError): + return -1 + +def network_macs(ip, vs_name): + """Returns a list of MAC address of the specified VS. + """ + + guest_cmd = "ifconfig -a | grep eth" + + rc, out = run_remote_guest(ip, vs_name, guest_cmd) + if rc != 0: + return [] + + ret = [] + lines = out.splitlines() + for l in lines: + try: + mac = l.split()[-1] + ret.append( mac ) + except IndexError: + pass + + return ret + From yunguol at cn.ibm.com Thu Nov 6 05:48:54 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 6 Nov 2008 13:48:54 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Move some functions from utils.py to xm_virt_util.py In-Reply-To: <491201CB.9040209@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-06 04:27:55: > > > > > > Oh, I see. I had missed this before when we discussed what functions > > > should be moved. Any function that is run within the guest should also > > > be moved. > > > > > > So the following should be moved to > > > libvirt-cim/lib/XenKvmLib/xm_virt_util.p: > > > > > > processors_count() > > > memory_count() > > > network_macs() > > > > > > I had originally thought these were running on the host, not within the > > > guest. Sorry for the confusion! > > > > I have moved below functions to xm_virt_util.py: > > > > processors_count() > > memory_count() > > network_macs() > > run_remote_guest() > > > > So far, this work item is done. I'm going to fix the test failure. > > Thoughts? > > > > Thanks > > I have a minor comment on the last patch, but after that is fixed, I > think this item is complete. > Cool. The #2 patch is on the way. > -- > 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 Thu Nov 6 07:11:31 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 06 Nov 2008 16:11:31 +0900 Subject: [Libvirt-cim] Where are the DSP1081 documents? Message-ID: <491298A3.2060903@np.css.fujitsu.com> Hi, I'm seeking the DSP1081 documents. There are not in the DMTF homepage. Would you tell me where they are? Works for me. -- Toshifumi Fujimura. From yunguol at cn.ibm.com Thu Nov 6 09:30:24 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 6 Nov 2008 17:30:24 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VSMS 14_define_sys_disk.py to specify FV or PV disk for Xen guests In-Reply-To: <78c534011b848cade458.1225932050@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-11-06 08:40 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH] [TEST] Fix VSMS 14_define_sys_disk.py to specify FV or PV disk for Xen guests # HG changeset patch # User Kaitlin Rupert # Date 1225932047 28800 # Node ID 78c534011b848cade45897c0c35dac4ebc53fce1 # Parent ddd395416461b33536e9475521548ba8e2c16d84 [TEST] Fix VSMS 14_define_sys_disk.py to specify FV or PV disk for Xen guests. Without this fix, both FV and PV rasds are passed to the DefineSystem() call which isn't valid on PV systems. Signed-off-by: Kaitlin Rupert diff -r ddd395416461 -r 78c534011b84 suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue Nov 04 22:19:33 2008 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Wed Nov 05 16:40:47 2008 -0800 @@ -48,18 +48,22 @@ return path -def get_vssd_rasd(ip, virt, addr): +def get_vssd_rasd(ip, virt, addr, disk_type): vssd = get_vssd_mof(virt, test_dom) rasds = get_default_rasds(ip, virt) - for i in range(len(rasds)): - if 'DiskPool' in rasds[i]['PoolID']: - rasds[i]['Address'] = addr - rasds[i] = inst_to_mof(rasds[i]) + rasd_list = [] + + for rasd in rasds: + if 'DiskPool' in rasd['PoolID']: + if disk_type != "" and rasd['Caption'] != disk_type: + continue + rasd['Address'] = addr + rasd_list.append(inst_to_mof(rasd)) params = { 'vssd' : vssd, - 'rasd' : rasds + 'rasd' : rasd_list } return params @@ -68,12 +72,19 @@ def main(): options = main.options + if options.virt == "Xen": + disk_cap = "PV disk" + elif options.virt == "XenFV": + disk_cap = "FV disk" + else: + disk_cap = "" + 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) + define_params = get_vssd_rasd(options.ip, options.virt, addr, disk_cap) if len(define_params) != 2: raise Exception("Unable to get VSSD and RASDs for %s" % test_dom) _______________________________________________ Libvirt-cim mailing list Libvirt-cim at redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From danms at us.ibm.com Thu Nov 6 15:05:45 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 07:05:45 -0800 Subject: [Libvirt-cim] [PATCH] Store and preserve keymap attribute for graphics device In-Reply-To: <4911F59F.8060701@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Wed, 05 Nov 2008 11:35:59 -0800") References: <20af5ae5b01c308d2cfa.1225900810@guaranine.danplanet.com> <4911F59F.8060701@linux.vnet.ibm.com> Message-ID: <8763n0nbcm.fsf@caffeine.danplanet.com> KR> DefineSystem() doesn't check to see if the guest already exists. Hmm, I think it used to because I remember having to undefine a guest while testing it. KR> In create_system(), before calling get_reference_domain(), there KR> should be such a check. If the domain exists, we should get the KR> domain struct and then update the struct accordingly. That seems like a different issue to me than the one that this patch addresses. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Thu Nov 6 15:06:25 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 07:06:25 -0800 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine In-Reply-To: <49122A9D.3050704@novell.com> (Jim Fehlig's message of "Wed, 05 Nov 2008 16:22:05 -0700") References: <49122A9D.3050704@novell.com> Message-ID: <871vxonbbi.fsf@caffeine.danplanet.com> JF> Pulled the trigger a little early on my previous ack. That last JF> line needs to be Whoops. I'll fix before commit. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Thu Nov 6 15:09:58 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 07:09:58 -0800 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine In-Reply-To: <49122A9D.3050704@novell.com> (Jim Fehlig's message of "Wed, 05 Nov 2008 16:22:05 -0700") References: <49122A9D.3050704@novell.com> Message-ID: <87skq4lwl5.fsf@caffeine.danplanet.com> JF> Pulled the trigger a little early on my previous ack. That last JF> line needs to be Er, the patch I sent was correct. Not sure how it got snipped from your mailer. Maybe check it out in the archives: https://www.redhat.com/archives/libvirt-cim/2008-November/msg00065.html I was wondering how that had passed my tests with a broken XML tag :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Thu Nov 6 15:13:33 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 07:13:33 -0800 Subject: [Libvirt-cim] PoolID RASD property In-Reply-To: <4912310D.3010903@novell.com> (Jim Fehlig's message of "Wed, 05 Nov 2008 16:49:33 -0700") References: <4912310D.3010903@novell.com> Message-ID: <87od0slwf6.fsf@caffeine.danplanet.com> JF> Should this property be filled in on get of RASD? Or is client JF> expected to follow associations to determine pool from which the JF> allocation occurs? AFAICT, DSP1041 (RAP) is not clear on this. You mean on regular RASDs that belong to guests? We do set this property on the template RASDs that come from AllocationCapabilities, but that's because we need to know the pool membership on DefineSystem(). Looking up the pool membership during, say, enum of the regular RASDs is just another latency-inducing step, but I suppose it should be done... -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Thu Nov 6 15:07:09 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 07:07:09 -0800 Subject: [Libvirt-cim] [PATCH] Don't drop disk type on redefine In-Reply-To: <4911ECF6.5070208@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Wed, 05 Nov 2008 10:59:02 -0800") References: <1d696e80fccc41c9b21b.1225902178@guaranine.danplanet.com> <4911ECF6.5070208@linux.vnet.ibm.com> Message-ID: <87wsfglwpu.fsf@caffeine.danplanet.com> KR> The disk_rasd_to_vdev() function in VSMS doesn't set the device value KR> of the disk struct. The guest fails to define due to a null device. KR> KR> KR> KR> Okay, good call. Before I commit this patch I'll write one that defaults that to disk. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From jfehlig at novell.com Thu Nov 6 16:01:08 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Thu, 06 Nov 2008 09:01:08 -0700 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine In-Reply-To: <87skq4lwl5.fsf@caffeine.danplanet.com> References: <49122A9D.3050704@novell.com> <87skq4lwl5.fsf@caffeine.danplanet.com> Message-ID: <491314C4.8010404@novell.com> Dan Smith wrote: > JF> Pulled the trigger a little early on my previous ack. That last > JF> line needs to be > > Er, the patch I sent was correct. Not sure how it got snipped from > your mailer. Maybe check it out in the archives: > > https://www.redhat.com/archives/libvirt-cim/2008-November/msg00065.html > Uhm, I see it there too :-). There are two hunks that have similar code, disk_block_xml() and disk_file_xml(). The missing '<' is in disk_file_xml() hunk. Jim From jfehlig at novell.com Thu Nov 6 16:57:27 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Thu, 06 Nov 2008 09:57:27 -0700 Subject: [Libvirt-cim] PoolID RASD property In-Reply-To: <87od0slwf6.fsf@caffeine.danplanet.com> References: <4912310D.3010903@novell.com> <87od0slwf6.fsf@caffeine.danplanet.com> Message-ID: <491321F7.9060406@novell.com> Dan Smith wrote: > JF> Should this property be filled in on get of RASD? Or is client > JF> expected to follow associations to determine pool from which the > JF> allocation occurs? AFAICT, DSP1041 (RAP) is not clear on this. > > You mean on regular RASDs that belong to guests? Yes. > Looking up the pool membership during, say, enum of > the regular RASDs is just another latency-inducing step, but I suppose > it should be done... > Latency will be induced regardless, either on backend or by client following associations :-(. But is it wise to induce latency on the backend, where all users are affected? Is the latency increase on backend small compared to client following associations? I guess my question should really be directed at SVPC. Client developers assume they can get resource pool from PoolID. Generally I think the CIM model advocates associations to describe such relationships. But RAP is not clear on this. Thanks, Jim From kaitlin at linux.vnet.ibm.com Thu Nov 6 17:10:26 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Nov 2008 09:10:26 -0800 Subject: [Libvirt-cim] [PATCH] Store and preserve keymap attribute for graphics device In-Reply-To: <8763n0nbcm.fsf@caffeine.danplanet.com> References: <20af5ae5b01c308d2cfa.1225900810@guaranine.danplanet.com> <4911F59F.8060701@linux.vnet.ibm.com> <8763n0nbcm.fsf@caffeine.danplanet.com> Message-ID: <49132502.3000200@linux.vnet.ibm.com> Dan Smith wrote: > KR> DefineSystem() doesn't check to see if the guest already exists. > > Hmm, I think it used to because I remember having to undefine a guest > while testing it. > > KR> In create_system(), before calling get_reference_domain(), there > KR> should be such a check. If the domain exists, we should get the > KR> domain struct and then update the struct accordingly. > > That seems like a different issue to me than the one that this patch > addresses. > That's a fair point. I can follow up with it after this patch goes in. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Nov 6 17:12:34 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 09:12:34 -0800 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine In-Reply-To: <491314C4.8010404@novell.com> (Jim Fehlig's message of "Thu, 06 Nov 2008 09:01:08 -0700") References: <49122A9D.3050704@novell.com> <87skq4lwl5.fsf@caffeine.danplanet.com> <491314C4.8010404@novell.com> Message-ID: <87k5bglqwt.fsf@caffeine.danplanet.com> JF> Uhm, I see it there too :-). There are two hunks that have JF> similar code, disk_block_xml() and disk_file_xml(). The missing JF> '<' is in disk_file_xml() hunk. Hehe, okay, I'm a doofus. *That* is why my test worked. I'll resend... Thanks :) -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Thu Nov 6 17:24:34 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 09:24:34 -0800 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine Message-ID: <9385e61cd401162bef9c.1225992274@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1225992264 28800 # Node ID 9385e61cd401162bef9c44bc11f64ca349a41abf # Parent 20af5ae5b01c308d2cfab62899b2dbcb8d186567 Avoid clobbering disk flags on redefine This patch makes sure we track the shareable and readonly flags that can be present in a disk device. Signed-off-by: Dan Smith diff -r 20af5ae5b01c -r 9385e61cd401 libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Nov 05 08:00:07 2008 -0800 +++ b/libxkutil/device_parsing.c Thu Nov 06 09:24:24 2008 -0800 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -235,6 +236,10 @@ ddev->virtual_dev = get_attr_value(child, "dev"); if (ddev->virtual_dev == NULL) goto err; + } else if (XSTREQ(child->name, "readonly")) { + ddev->readonly = true; + } else if (XSTREQ(child->name, "shareable")) { + ddev->shareable = true; } } if ((ddev->source == NULL) || (ddev->virtual_dev == NULL)) @@ -619,6 +624,8 @@ DUP_FIELD(dev, _dev, dev.disk.driver); DUP_FIELD(dev, _dev, dev.disk.source); DUP_FIELD(dev, _dev, dev.disk.virtual_dev); + dev->dev.disk.readonly = dev->dev.disk.readonly; + dev->dev.disk.shareable = dev->dev.disk.shareable; } else if (dev->type == CIM_RES_TYPE_MEM) { dev->dev.mem.size = _dev->dev.mem.size; dev->dev.mem.maxsize = _dev->dev.mem.maxsize; diff -r 20af5ae5b01c -r 9385e61cd401 libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h Wed Nov 05 08:00:07 2008 -0800 +++ b/libxkutil/device_parsing.h Thu Nov 06 09:24:24 2008 -0800 @@ -25,6 +25,7 @@ #define __DEVICE_PARSING_H #include +#include #include #include "../src/svpc_types.h" @@ -36,6 +37,8 @@ char *source; char *virtual_dev; enum {DISK_UNKNOWN, DISK_PHY, DISK_FILE, DISK_FS} disk_type; + bool readonly; + bool shareable; }; struct net_device { diff -r 20af5ae5b01c -r 9385e61cd401 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Wed Nov 05 08:00:07 2008 -0800 +++ b/libxkutil/xmlgen.c Thu Nov 06 09:24:24 2008 -0800 @@ -113,7 +113,7 @@ return 1; } -static char *disk_block_xml(const char *path, const char *vdev) +static char *disk_block_xml(struct disk_device *dev) { char *xml; int ret; @@ -122,16 +122,20 @@ "\n" " \n" " \n" + "%s" + "%s" "\n", - path, - vdev); + dev->source, + dev->virtual_dev, + dev->readonly ? "\n" : "", + dev->shareable ? "\n" : ""); if (ret == -1) xml = NULL; return xml; } -static char *disk_file_xml(const char *path, const char *vdev) +static char *disk_file_xml(struct disk_device *dev) { char *xml; int ret; @@ -140,16 +144,20 @@ "\n" " \n" " \n" + "%s" + "%s" "\n", - path, - vdev); + dev->source, + dev->virtual_dev, + dev->readonly ? "" : "", + dev->shareable ? "" : ""); if (ret == -1) xml = NULL; return xml; } -static char *disk_fs_xml(const char *path, const char *vdev) +static char *disk_fs_xml(struct disk_device *dev) { char *xml; int ret; @@ -159,8 +167,8 @@ " \n" " \n" "\n", - path, - vdev); + dev->source, + dev->virtual_dev); if (ret == -1) xml = NULL; @@ -173,13 +181,13 @@ struct disk_device *disk = &dev->dev.disk; if (disk->disk_type == DISK_PHY) - _xml = disk_block_xml(disk->source, disk->virtual_dev); + _xml = disk_block_xml(disk); 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); + _xml = disk_file_xml(disk); else if (disk->disk_type == DISK_FS) - _xml = disk_fs_xml(disk->source, disk->virtual_dev); + _xml = disk_fs_xml(disk); else return false; From kaitlin at linux.vnet.ibm.com Thu Nov 6 17:15:30 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Nov 2008 09:15:30 -0800 Subject: [Libvirt-cim] [PATCH] Store and preserve keymap attribute for graphics device In-Reply-To: <20af5ae5b01c308d2cfa.1225900810@guaranine.danplanet.com> References: <20af5ae5b01c308d2cfa.1225900810@guaranine.danplanet.com> Message-ID: <49132632.3090404@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1225900807 28800 > # Node ID 20af5ae5b01c308d2cfab62899b2dbcb8d186567 > # Parent 29c875cab8b808655c04d2f971c0d6c9a9f03dbd > Store and preserve keymap attribute for graphics device > > This prevents us from discarding the keymap setting when we redefine a domain. > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Nov 6 17:19:29 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 09:19:29 -0800 Subject: [Libvirt-cim] PoolID RASD property In-Reply-To: <491321F7.9060406@novell.com> (Jim Fehlig's message of "Thu, 06 Nov 2008 09:57:27 -0700") References: <4912310D.3010903@novell.com> <87od0slwf6.fsf@caffeine.danplanet.com> <491321F7.9060406@novell.com> Message-ID: <87fxm4lqla.fsf@caffeine.danplanet.com> JF> I guess my question should really be directed at SVPC. Client JF> developers assume they can get resource pool from PoolID. JF> Generally I think the CIM model advocates associations to describe JF> such relationships. But RAP is not clear on this. Right, PoolID seems like quite a hack to me, and definitely out of place compared to the rest of SVPC. It helps us a little with the template RASDs but we could get by without it. I don't have a strong feeling about it one way or the other, so I'll let someone who does make the call. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 6 17:36:38 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Nov 2008 09:36:38 -0800 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine In-Reply-To: <9385e61cd401162bef9c.1225992274@guaranine.danplanet.com> References: <9385e61cd401162bef9c.1225992274@guaranine.danplanet.com> Message-ID: <49132B26.8080100@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1225992264 28800 > # Node ID 9385e61cd401162bef9c44bc11f64ca349a41abf > # Parent 20af5ae5b01c308d2cfab62899b2dbcb8d186567 > Avoid clobbering disk flags on redefine > > This patch makes sure we track the shareable and readonly flags that can > be present in a disk device. > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 6 18:43:28 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Nov 2008 10:43:28 -0800 Subject: [Libvirt-cim] [PATCH][TEST] Fixed a misused character In-Reply-To: <4912359D.7050407@np.css.fujitsu.com> References: <4912359D.7050407@np.css.fujitsu.com> Message-ID: <49133AD0.2030606@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > [PATCH][TEST] Fixed a misused character > > I found a misused character. > > Signed-off-by: Toshifumi Fujimura > > diff -r 29c875cab8b8 doc/architecture.html.in > --- a/doc/architecture.html.in Tue Nov 04 13:10:46 2008 -0800 > +++ b/doc/architecture.html.in Wed Nov 05 18:42:43 2008 +0900 > @@ -15,7 +15,7 @@ > >

> The provider classes implement the actual CIM class model. Some of > - the provider libraries implement one CIM class and one providier. > + the provider libraries implement one CIM class and one provider. > However, many of them perform more than one task. For example, > the Virt_Device and Virt_DevicePool providers > implement the device and device pool classes for each of the major > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 6 19:07:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Nov 2008 11:07:21 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Updating 02_enum_crscap.py tc of RedirectionService to work with libvirt-cim provider with no CRS CAP support In-Reply-To: <491133E4.3060707@linux.vnet.ibm.com> References: <82afd0f6f9b91ef42c6f.1225804780@elm3b193.beaverton.ibm.com> <491094E2.10003@linux.vnet.ibm.com> <491133E4.3060707@linux.vnet.ibm.com> Message-ID: <49134069.9000007@linux.vnet.ibm.com> > Yes I agree with you that we need to better the way to verify if tc in a > particular directory needs to be run or not. > This has two fold advantage: > 1) It will tell us if the providers are registered properly or not, if > its a setup issue. > 2) It will save some batch test run time, by skipping those directories. > > Implementing this is not straight forward though. Here is an initial > thought how we can implement this check > > Once the test run in batch mode is started even before we invoke the > tests, we can have a list of all the providers which we think should be > present for the providers to be verified. > We can then have two list > 1) The first list should contain information of the providers which are > registered on the machine and the tests for which have to be run. My concern with this kind of approach is the maintainability of the lists. Each time a test is updated to support a new provider, the test writer also needs to update the list. There's over a hundred tests, so the list would be quite large already, and it would only continue to grow. Most of the tests query several different providers, so this would make the list somewhat complex. I was thinking of each test maintaining its own list of providers it tests, and then having the test suite check the test case's list before calling the test. > 2) Second list should contain the list of all providers which have not > been registered on the machine. This kind of list should be easy to generate. I would generate a list of providers that have been registered. If the list is empty, you could bail from the test suite before even attempting to run any of the tests. It'd be a good first check. > -- The error here would depend on two things: > -- If the providers is not registered properly because of the setup issue > -- Or the provider is not registered since the installed source/ rpm > does not yet contain support for that particular provider. > -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From jfehlig at novell.com Thu Nov 6 19:14:44 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Thu, 06 Nov 2008 12:14:44 -0700 Subject: [Libvirt-cim] [PATCH] Avoid clobbering disk flags on redefine In-Reply-To: <9385e61cd401162bef9c.1225992274@guaranine.danplanet.com> References: <9385e61cd401162bef9c.1225992274@guaranine.danplanet.com> Message-ID: <49134224.7040804@novell.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1225992264 28800 > # Node ID 9385e61cd401162bef9c44bc11f64ca349a41abf > # Parent 20af5ae5b01c308d2cfab62899b2dbcb8d186567 > Avoid clobbering disk flags on redefine > > This patch makes sure we track the shareable and readonly flags that can > be present in a disk device. > > +1 :-). Jim From danms at us.ibm.com Thu Nov 6 21:11:24 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 13:11:24 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Add an EmulatedType field to DiskRASD to select CDROM or Disk In-Reply-To: Message-ID: <049f0bb012190e680257.1226005884@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1226005676 28800 # Node ID 049f0bb012190e680257d00463138391405a5c60 # Parent 9385e61cd401162bef9c44bc11f64ca349a41abf Add an EmulatedType field to DiskRASD to select CDROM or Disk This seems like a pretty reasonable way to do this, but comments are welcome. I had initially planned to have a specific RASD type to represent a CDROM, but I don't think that makes much sense, and is significantly more complex. Adding this gives us a way to set and query the CDROM-ness of a disk, and with the following patch, avoids dropping this qualifier from existing configurations. Signed-off-by: Dan Smith diff -r 9385e61cd401 -r 049f0bb01219 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Thu Nov 06 09:24:24 2008 -0800 +++ b/schema/ResourceAllocationSettingData.mof Thu Nov 06 13:07:56 2008 -0800 @@ -21,6 +21,10 @@ [Description ("Device as seen by the guest")] string VirtualDevice; + [Description ("Device emulation type"), + ValueMap {"0", "1"}, + Values {"Disk", "CDROM"}] + uint16 EmulatedType; }; [Description ("KVM virtual disk configuration"), @@ -32,6 +36,10 @@ [Description ("Device as seen by the guest")] string VirtualDevice; + [Description ("Device emulation type"), + ValueMap {"0", "1"}, + Values {"Disk", "CDROM"}] + uint16 EmulatedType; }; [Description ("LXC virtual disk configuration"), diff -r 9385e61cd401 -r 049f0bb01219 src/Virt_RASD.c --- a/src/Virt_RASD.c Thu Nov 06 09:24:24 2008 -0800 +++ b/src/Virt_RASD.c Thu Nov 06 13:07:56 2008 -0800 @@ -224,6 +224,7 @@ CMPIInstance *inst) { uint64_t cap = 0; + uint16_t type; CMPIStatus s = {CMPI_RC_OK, NULL}; get_vol_size(broker, ref, dev->dev.disk.source, &cap); @@ -243,6 +244,20 @@ "Address", (CMPIValue *)dev->dev.disk.source, CMPI_chars); + + /* There's not much we can do here if we don't recognize the type, + * so it seems that assuming 'disk' is a reasonable default + */ + if ((dev->dev.disk.device != NULL) && + STREQ(dev->dev.disk.device, "cdrom")) + type = VIRT_DISK_TYPE_CDROM; + else + type = VIRT_DISK_TYPE_DISK; + + CMSetProperty(inst, + "EmulatedType", + (CMPIValue *)&type, + CMPI_uint16); return s; } diff -r 9385e61cd401 -r 049f0bb01219 src/Virt_RASD.h --- a/src/Virt_RASD.h Thu Nov 06 09:24:24 2008 -0800 +++ b/src/Virt_RASD.h Thu Nov 06 13:07:56 2008 -0800 @@ -22,6 +22,9 @@ #define __VIRT_RASD_H #include "device_parsing.h" + +#define VIRT_DISK_TYPE_DISK 0 +#define VIRT_DISK_TYPE_CDROM 1 char *rasd_to_xml(CMPIInstance *rasd); diff -r 9385e61cd401 -r 049f0bb01219 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Thu Nov 06 09:24:24 2008 -0800 +++ b/src/Virt_VirtualSystemManagementService.c Thu Nov 06 13:07:56 2008 -0800 @@ -402,6 +402,7 @@ struct virt_device *dev) { const char *val = NULL; + uint16_t type; if (cu_get_str_prop(inst, "VirtualDevice", &val) != CMPI_RC_OK) return "Missing `VirtualDevice' property"; @@ -415,6 +416,16 @@ free(dev->dev.disk.source); dev->dev.disk.source = strdup(val); dev->dev.disk.disk_type = disk_type_from_file(val); + + if (cu_get_u16_prop(inst, "EmulatedType", &type) != CMPI_RC_OK) + type = VIRT_DISK_TYPE_DISK; + + if (type == VIRT_DISK_TYPE_DISK) + dev->dev.disk.device = strdup("disk"); + else if (type == VIRT_DISK_TYPE_CDROM) + dev->dev.disk.device = strdup("cdrom"); + else + return "Invalid value for EmulatedType"; free(dev->id); dev->id = strdup(dev->dev.disk.virtual_dev); From danms at us.ibm.com Thu Nov 6 21:11:25 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 13:11:25 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] Don't drop disk type on redefine In-Reply-To: Message-ID: <9d100a5442150eedf372.1226005885@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1226005678 28800 # Node ID 9d100a5442150eedf372598f5033db100f47eddd # Parent 049f0bb012190e680257d00463138391405a5c60 Don't drop disk type on redefine Right now, we track the status of disk/cdrom of a disk device, but don't use it in the XML define. This patch uses the value instead of a static device='disk'. Signed-off-by: Dan Smith diff -r 049f0bb01219 -r 9d100a544215 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Thu Nov 06 13:07:56 2008 -0800 +++ b/libxkutil/xmlgen.c Thu Nov 06 13:07:58 2008 -0800 @@ -119,12 +119,13 @@ int ret; ret = asprintf(&xml, - "\n" + "\n" " \n" " \n" "%s" "%s" "\n", + dev->device, dev->source, dev->virtual_dev, dev->readonly ? "\n" : "", @@ -141,12 +142,13 @@ int ret; ret = asprintf(&xml, - "\n" + "\n" " \n" " \n" "%s" "%s" "\n", + dev->device, dev->source, dev->virtual_dev, dev->readonly ? "" : "", From danms at us.ibm.com Thu Nov 6 21:11:23 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 13:11:23 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] CDROM Support Message-ID: This is not how I envisioned (or started to implement) CDROM support, but I think this is the better way. The second patch is the bit I sent before that makes xmlgen not clobber the device property. The new first patch adds the ability to set this in the Disk RASD on create, which gives us our CDROM support. If this is okay with people, I can follow it up with making Virt_Device expose a KVM_CDROMDrive instead of KVM_LogicalDisk for devices so configured. From danms at us.ibm.com Thu Nov 6 21:04:38 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 13:04:38 -0800 Subject: [Libvirt-cim] [PATCH][TEST] Fixed a misused character In-Reply-To: <4912359D.7050407@np.css.fujitsu.com> (Toshifumi Fujimura's message of "Thu, 06 Nov 2008 09:09:01 +0900") References: <4912359D.7050407@np.css.fujitsu.com> Message-ID: <87bpwslg61.fsf@caffeine.danplanet.com> TF> [PATCH][TEST] Fixed a misused character Can you resend in HG format? Ideally with patchbomb, but if that's not an option, the output of "hg export" would be preferred for proper attribution. Also, this isn't a test patch, so it would be nice to remove that from the subject line too :) Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 6 22:07:16 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Nov 2008 14:07:16 -0800 Subject: [Libvirt-cim] Where are the DSP1081 documents? In-Reply-To: <491298A3.2060903@np.css.fujitsu.com> References: <491298A3.2060903@np.css.fujitsu.com> Message-ID: <49136A94.2050108@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > Hi, > I'm seeking the DSP1081 documents. > There are not in the DMTF homepage. > Would you tell me where they are? This document is still in development by the System Virtualization, Partitioning, and Clustering workgroup. For more information, you can look at the SVPC's charter: http://www.dmtf.org/about/committees/SVPCWGCharter.pdf -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 6 22:29:39 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Nov 2008 14:29:39 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Add an EmulatedType field to DiskRASD to select CDROM or Disk In-Reply-To: <049f0bb012190e680257.1226005884@guaranine.danplanet.com> References: <049f0bb012190e680257.1226005884@guaranine.danplanet.com> Message-ID: <49136FD3.9050302@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1226005676 28800 > # Node ID 049f0bb012190e680257d00463138391405a5c60 > # Parent 9385e61cd401162bef9c44bc11f64ca349a41abf > Add an EmulatedType field to DiskRASD to select CDROM or Disk > > This seems like a pretty reasonable way to do this, but comments are welcome. > I had initially planned to have a specific RASD type to represent a CDROM, > but I don't think that makes much sense, and is significantly more complex. > Adding this gives us a way to set and query the CDROM-ness of a disk, and > with the following patch, avoids dropping this qualifier from existing > configurations. I like this approach. You'd mentioned in the previous set that you wanted the CDROM support to be an extension of the current disk support. I think this achieves this well. I don't think there's a reason to have a different CDROM device, since it's just an extension of the disk device. It similar to how a guest might have both a mouse and a tablet device (even though both are input devices). +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Nov 6 22:31:38 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 06 Nov 2008 14:31:38 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Add an EmulatedType field to DiskRASD to select CDROM or Disk In-Reply-To: <49136FD3.9050302@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Thu, 06 Nov 2008 14:29:39 -0800") References: <049f0bb012190e680257.1226005884@guaranine.danplanet.com> <49136FD3.9050302@linux.vnet.ibm.com> Message-ID: <877i7glc51.fsf@caffeine.danplanet.com> KR> I don't think there's a reason to have a different CDROM device, KR> since it's just an extension of the disk device. It similar to KR> how a guest might have both a mouse and a tablet device (even KR> though both are input devices). Well, I think a consolidated RASD is a good idea, but having the device itself as the appropriate class might help a GUI show the right icon, for example, for a given device. Anyway, we can do/decide that later. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 6 22:33:40 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Nov 2008 14:33:40 -0800 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Nov 06 2008 Message-ID: <491370C4.9090500@linux.vnet.ibm.com> ================================================= KVM on Pegasus Test Run Summary for Nov 06 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: 738 Libvirt-cim changeset: 3ba943cb2844 Cimtest revision: 483 Cimtest changeset: 6591949e8afd ================================================= FAIL : 5 XFAIL : 2 SKIP : 6 PASS : 126 ----------------- Total : 139 ================================================= FAIL Test Summary: ElementCapabilities - 01_forward.py: FAIL ElementConforms - 01_forward.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL VSSD - 04_vssd_to_rasd.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: FAIL ERROR - 'KVM_ElementCapabilities' association classname error CIM_ERR_FAILED: For provider OSBase_ComputerSystemProvider the library name was empty. Check provider registered location. -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - InstanceID Mismatch ERROR - Returned NetworkPool/default instead of NetworkPool/cimtest-networkpool -------------------------------------------------------------------- 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 - Failed to get associators information for KVM_SettingsDefineState ERROR - Exception: u'KVM_DisplayController' CIM_ERR_FAILED: For provider OSBase_ComputerSystemProvider the library name was empty. Check provider registered location. -------------------------------------------------------------------- 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: FAIL ERROR - Mistmatching KVM_GraphicsResourceAllocationSettingData values -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.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 -------------------------------------------------------------------- -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 6 22:38:39 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 06 Nov 2008 14:38:39 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] Don't drop disk type on redefine In-Reply-To: <9d100a5442150eedf372.1226005885@guaranine.danplanet.com> References: <9d100a5442150eedf372.1226005885@guaranine.danplanet.com> Message-ID: <491371EF.6040307@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1226005678 28800 > # Node ID 9d100a5442150eedf372598f5033db100f47eddd > # Parent 049f0bb012190e680257d00463138391405a5c60 > Don't drop disk type on redefine > > Right now, we track the status of disk/cdrom of a disk device, but don't > use it in the XML define. This patch uses the value instead of a static > device='disk'. > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Nov 7 10:36:11 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 07 Nov 2008 16:06:11 +0530 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Nov 07 2008 Message-ID: <49141A1B.6000603@linux.vnet.ibm.com> ================================================= Xen on Pegasus Test Run Summary for Nov 07 2008 ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) Kernel: 2.6.18-88.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 734 Libvirt-cim changeset: 29c875cab8b8 Cimtest revision: 483 Cimtest changeset: 6591949e8afd ================================================= FAIL : 8 XFAIL : 0 SKIP : 3 PASS : 128 ----------------- Total : 139 ================================================= FAIL Test Summary: ElementCapabilities - 01_forward.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL VSSD - 02_bootldr.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 15_mod_system_settings.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: FAIL ERROR - 'Xen_ElementCapabilities' association classname error CIM_ERR_FAILED: For provider OSBase_ComputerSystemProvider the library name was empty. Check provider registered location. -------------------------------------------------------------------- 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 - Failed to get associators information for Xen_SettingsDefineState ERROR - Exception: u'Xen_DisplayController' CIM_ERR_FAILED: For provider OSBase_ComputerSystemProvider the library name was empty. Check provider registered location. -------------------------------------------------------------------- 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 -------------------------------------------------------------------- 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: FAIL ERROR - Exception : 'NoneType' object has no attribute 'ElementName' CIM_ERR_NOT_FOUND: No such instance (dom) -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: FAIL ERROR - Mistmatching Xen_GraphicsResourceAllocationSettingData values -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: FAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error invoke method 'MigrateVirtualSystemToHost'. ERROR - (1, u'CIM_ERR_FAILED: Malformed HTTP response message.') ERROR - MigrateVirtualSystemToHost: unexpected list length 0 InvokeMethod(MigrateVirtualSystemToHost): CIM_ERR_FAILED: Malformed HTTP response message. -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Error invoke method 'MigrateVirtualSystemToHost'. ERROR - (1, u'CIM_ERR_FAILED: Malformed HTTP response message.') ERROR - MigrateVirtualSystemToHost: unexpected list length 0 InvokeMethod(MigrateVirtualSystemToHost): CIM_ERR_FAILED: Malformed HTTP response message. -------------------------------------------------------------------- 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 jfehlig at novell.com Fri Nov 7 16:38:48 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Fri, 07 Nov 2008 09:38:48 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add an EmulatedType field to DiskRASD to select CDROM or Disk In-Reply-To: <049f0bb012190e680257.1226005884@guaranine.danplanet.com> References: <049f0bb012190e680257.1226005884@guaranine.danplanet.com> Message-ID: <49146F18.1030500@novell.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1226005676 28800 > # Node ID 049f0bb012190e680257d00463138391405a5c60 > # Parent 9385e61cd401162bef9c44bc11f64ca349a41abf > Add an EmulatedType field to DiskRASD to select CDROM or Disk > > This seems like a pretty reasonable way to do this, but comments are welcome. > I had initially planned to have a specific RASD type to represent a CDROM, > but I don't think that makes much sense, and is significantly more complex. > Adding this gives us a way to set and query the CDROM-ness of a disk, and > with the following patch, avoids dropping this qualifier from existing > configurations. > > Tested on Xen only, +1. Jim From jfehlig at novell.com Fri Nov 7 17:21:45 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Fri, 07 Nov 2008 10:21:45 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add an EmulatedType field to DiskRASD to select CDROM or Disk In-Reply-To: <049f0bb012190e680257.1226005884@guaranine.danplanet.com> References: <049f0bb012190e680257.1226005884@guaranine.danplanet.com> Message-ID: <49147929.3020004@novell.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1226005676 28800 > # Node ID 049f0bb012190e680257d00463138391405a5c60 > # Parent 9385e61cd401162bef9c44bc11f64ca349a41abf > Add an EmulatedType field to DiskRASD to select CDROM or Disk > > This seems like a pretty reasonable way to do this, but comments are welcome. > I had initially planned to have a specific RASD type to represent a CDROM, > but I don't think that makes much sense, and is significantly more complex. > Adding this gives us a way to set and query the CDROM-ness of a disk, and > with the following patch, avoids dropping this qualifier from existing > configurations. > > Signed-off-by: Dan Smith > > diff -r 9385e61cd401 -r 049f0bb01219 schema/ResourceAllocationSettingData.mof > --- a/schema/ResourceAllocationSettingData.mof Thu Nov 06 09:24:24 2008 -0800 > +++ b/schema/ResourceAllocationSettingData.mof Thu Nov 06 13:07:56 2008 -0800 > @@ -21,6 +21,10 @@ > [Description ("Device as seen by the guest")] > string VirtualDevice; > > + [Description ("Device emulation type"), > + ValueMap {"0", "1"}, > + Values {"Disk", "CDROM"}] > + uint16 EmulatedType; > }; > > [Description ("KVM virtual disk configuration"), > @@ -32,6 +36,10 @@ > [Description ("Device as seen by the guest")] > string VirtualDevice; > > + [Description ("Device emulation type"), > + ValueMap {"0", "1"}, > + Values {"Disk", "CDROM"}] > + uint16 EmulatedType; > }; > After thinking about this more (and taking another look at CIM_RASD), couldn't the existing ResourceType CD Drive or DVD drive be leveraged instead of adding a new property? Jim From jfehlig at novell.com Fri Nov 7 17:22:11 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Fri, 07 Nov 2008 10:22:11 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Don't drop disk type on redefine In-Reply-To: <9d100a5442150eedf372.1226005885@guaranine.danplanet.com> References: <9d100a5442150eedf372.1226005885@guaranine.danplanet.com> Message-ID: <49147943.9010105@novell.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1226005678 28800 > # Node ID 9d100a5442150eedf372598f5033db100f47eddd > # Parent 049f0bb012190e680257d00463138391405a5c60 > Don't drop disk type on redefine > > Right now, we track the status of disk/cdrom of a disk device, but don't > use it in the XML define. This patch uses the value instead of a static > device='disk'. > > Tested on xen only, +1. Jim From danms at us.ibm.com Fri Nov 7 21:02:47 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 07 Nov 2008 13:02:47 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] Add an EmulatedType field to DiskRASD to select CDROM or Disk In-Reply-To: <49147929.3020004@novell.com> (Jim Fehlig's message of "Fri, 07 Nov 2008 10:21:45 -0700") References: <049f0bb012190e680257.1226005884@guaranine.danplanet.com> <49147929.3020004@novell.com> Message-ID: <87mygb6yh4.fsf@caffeine.danplanet.com> JF> After thinking about this more (and taking another look at JF> CIM_RASD), couldn't the existing ResourceType CD Drive or DVD JF> drive be leveraged instead of adding a new property? I went down this path a few weeks ago, which ended in frustration and patches sitting in my tree for a while. Because of the way we correlate things, we end up having to change the implementation of a lot of bits to handle that new ResourceType all the way through the stack. Every time I tried to compress Disk,CD to Disk, I'd find something further down the stack that expected them to be separate. ResourcePools, Devices, etc. Now, that's not a good justification for deciding how the model is designed, for sure, and it's definitely doable. If the preference is for this method, then I can revert the patch and we can go for the more heavy-weight option. I probably won't have time to finish my half-complete set for a while though. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Fri Nov 7 21:04:46 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 07 Nov 2008 13:04:46 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update EC 01_forward.py to work with ConsoleRedirectionServiceCapabilites Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1226091880 28800 # Node ID ceff8a7a75e001a24da909528ea8f333d6a7021c # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 [TEST] Update EC 01_forward.py to work with ConsoleRedirectionServiceCapabilites Signed-off-by: Kaitlin Rupert diff -r 6591949e8afd -r ceff8a7a75e0 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Nov 05 22:03:48 2008 -0800 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Nov 07 13:04:40 2008 -0800 @@ -32,10 +32,12 @@ from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC from XenKvmLib.enumclass import EnumInstances from XenKvmLib.common_util import get_host_info +from XenKvmLib.const import get_provider_version sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "dom_elecap" bug_sblim = "00007" +libvirtcim_crsc_changes = 723 def append_to_list(server, virt, poolname, valid_elc_id): poolname = get_typed_class(virt, poolname) @@ -79,12 +81,17 @@ logger.error(CIM_ERROR_ASSOCIATORNAMES, an) return FAIL - valid_elc_name = [get_typed_class(virt, "VirtualSystemManagementCapabilities"), get_typed_class(virt, "VirtualSystemMigrationCapabilities")] valid_elc_id = ["ManagementCapabilities", "MigrationCapabilities"] + + cim_rev, changeset = get_provider_version(virt, server) + if cim_rev >= libvirtcim_crsc_changes: + crsc = get_typed_class(virt, "ConsoleRedirectionServiceCapabilities") + valid_elc_name.append(crsc) + valid_elc_id.append("ConsoleRedirectionCapabilities") valid_elc_name.append(get_typed_class(virt, "AllocationCapabilities")) status, valid_elc_id = set_pool_info(server, virt, valid_elc_id) From kaitlin at linux.vnet.ibm.com Sun Nov 9 00:42:32 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 08 Nov 2008 16:42:32 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ECTP 01_forward.py to support system with multiple networks defined Message-ID: <37e34f4f2e7187358449.1226191352@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1226191230 28800 # Node ID 37e34f4f2e718735844919a9f064ab91a6e640e7 # Parent ceff8a7a75e001a24da909528ea8f333d6a7021c [TEST] Fix ECTP 01_forward.py to support system with multiple networks defined This test was doing a lot of unnecessary checking (and unessary building of lists). Instead, this test calls EnumInstances on each of the classes expected to be returned by the association. These instances are then compared against the list of instances returned by the ECTP association query. The FIXME will be fixed when bug 0007 is fixed. Signed-off-by: Kaitlin Rupert diff -r ceff8a7a75e0 -r 37e34f4f2e71 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Nov 07 13:04:40 2008 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Sat Nov 08 16:40:30 2008 -0800 @@ -23,10 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and -# the Classname are set appropriately for the results returned by the -# ElementConformsToProfile association for the RegisteredProfile class -# and ManagedElement Class +# This tc is used to verify the results of the ElementConformsToProfile +# association. This test focuses on RegisteredProfile -> ManagedElement # # "CIM:DSP1042-SystemVirtualization-1.0.0" , # "CIM:DSP1057-VirtualSystem-1.0.0a" @@ -39,104 +37,71 @@ # Date : 04-12-2007 import sys +from sets import Set from VirtLib import utils, live from XenKvmLib import assoc from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml from CimTest import Globals -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 XenKvmLib.common_util import print_field_error, check_sblim, get_host_info +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.enumclass import EnumInstances -from XenKvmLib.const import default_network_name, default_pool_name -from XenKvmLib.const import get_provider_version - sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "domU" bug_sblim = '00007' libvirt_cim_ectp_changes = 680 -def pool_init(verify_list, pool_cn, pool_name, virt): - ccn = get_typed_class(virt, pool_cn) - instid = '%s/%s' %(pool_cn, pool_name) - verify_list[ccn]= {'InstanceID' : instid } - return verify_list - def init_vs_pool_values(server, virt): - verify_ectp_list = { } - hs_ccn = get_typed_class(virt, 'HostSystem') - host = live.hostname(server) - cs_fields = { - 'CreationClassName' : hs_ccn, - 'Name' : host - } + verify_ectp_list = {} - verify_ectp_list[hs_ccn] = cs_fields + cn_names = ["VirtualSystemMigrationService", "ComputerSystem", "DiskPool", + "NetworkPool", "ProcessorPool", "MemoryPool"] - cs_ccn = get_typed_class(virt, 'ComputerSystem') - verify_ectp_list[cs_ccn] = cs_fields.copy() - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn - verify_ectp_list[cs_ccn]['Name'] = test_dom + status, host_name, host_ccn = get_host_info(server, virt) + if status != PASS: + logger.error("Unable to get host system instance objects") + return FAIL, verify_ectp_list - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') - verify_ectp_list[vs_ccn] = cs_fields.copy() - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn - verify_ectp_list[vs_ccn]['SystemName'] = host - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' + #FIXME - get_host_info() should be updated to return the host instance + insts = EnumInstances(server, host_ccn, True) + if len(insts) < 1: + logger.error("Expected 1 %s instance", host_ccn) + return FAIL, verify_ectp_list - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', - default_pool_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', - default_network_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) + verify_ectp_list[host_ccn] = insts - - return verify_ectp_list + for cn_base in cn_names: + cn = get_typed_class(virt, cn_base) + insts = EnumInstances(server, cn, True) + + if len(insts) < 1: + logger.error("Expected at least 1 %s instance", cn) + return FAIL, verify_ectp_list -def verify_fields(assoc_val, pllst_index, vs_pool_values): + verify_ectp_list[cn] = insts + + return PASS, verify_ectp_list + +def verify_fields(assoc_val, managed_ele_values): try: - field_names = vs_pool_values[pllst_index].keys() - values = vs_pool_values[pllst_index] - for field in field_names: - if values[field] != assoc_val[field]: - print_field_error(field, assoc_val[field], values[field]) - return FAIL + cn = assoc_val.classname + elements = managed_ele_values[cn] + + for ele in elements: + if assoc_val.items() == ele.items(): + managed_ele_values[cn].remove(ele) + return PASS, managed_ele_values + except Exception, details: - logger.error("Exception: In fn verify_fields() %s", details) - return FAIL + logger.error("verify_fields() exception: %s", details) + return FAIL, managed_ele_values - return PASS - -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): - try: - pllst_index = assoc_info[0]['CreationClassName'] - assoc_val = None - if 'HostSystem' in pllst_index or \ - 'VirtualSystemMigrationService' in pllst_index: - if len(assoc_info) != 1: - logger.error("'%s' returned '%d' records, expected 1", - pllst_index, len(assoc_info)) - return FAIL - assoc_val = assoc_info[0] - else: - # For ComputerSystem info - for inst in assoc_info: - if inst['Name'] == test_dom: - assoc_val = inst - break - except Exception, details: - logger.error("Exception: In fn verify_cs_hs_mig_fields() %s", details) - return FAIL - - if assoc_val == None: - return FAIL - - return verify_fields(assoc_val, pllst_index, vs_pool_values) + logger.error("%s not in expected list %s", assoc_val, elements) + return FAIL, managed_ele_values def get_proflist(server, reg_classname, virt): profiles_instid_list = [] @@ -150,7 +115,7 @@ len_prof_list = 7 if len(proflist) < len_prof_list: logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", - reg_classname, len(proflist), 'Profile', len_prof_list) + reg_classname, len(proflist), 'Profile', len_prof_list) status = FAIL except Exception, detail: @@ -164,51 +129,6 @@ profiles_instid_list = [ profile.InstanceID for profile in proflist ] return status, profiles_instid_list - - -def verify_ectp_assoc(server, virt): - 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: - return status - - verify_ectp_list = init_vs_pool_values(server, virt) - for devid in inst_lst : - logger.info("Verifying '%s' with '%s'", an, devid) - try: - assoc_info = assoc.Associators(server, - an, - reg_classname, - InstanceID = devid) - if len(assoc_info) < 1: - 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: - instid = assoc_info[0]['InstanceID'] - index, other = instid.split("/") - cn = get_typed_class(virt, index) - status = verify_fields(assoc_info[0], cn, verify_ectp_list) - else: - ccn = assoc_info[0]['CreationClassName'] - status = verify_cs_hs_mig_fields(assoc_info, verify_ectp_list) - - if status != PASS: - break - - except Exception, detail: - logger.error(CIM_ERROR_ASSOCIATORS, an) - logger.error("Exception: %s" % detail) - status = FAIL - return status @do_main(sup_types) def main(): @@ -232,11 +152,53 @@ logger.error('Unable to start domain %s' % test_dom) return FAIL - prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' - status = verify_ectp_assoc(server, virt) + reg_classname = get_typed_class(virt, "RegisteredProfile") + an = get_typed_class(virt,"ElementConformsToProfile") + + status, prof_inst_lst = get_proflist(server, reg_classname, virt) + if status != PASS: + return status + + status, verify_ectp_list = init_vs_pool_values(server, virt) + if status != PASS: + Globals.CIM_NS = prev_namespace + cxml.destroy(server) + cxml.undefine(server) + + for prof_id in prof_inst_lst: + logger.info("Verifying '%s' with '%s'", an, prof_id) + try: + assoc_info = assoc.Associators(server, + an, + reg_classname, + InstanceID = prof_id) + if len(assoc_info) < 1: + 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 + + for inst in assoc_info: + status, verify_ectp_list = verify_fields(inst, verify_ectp_list) + if status != PASS: + raise Exception("Failed to verify instance") + + except Exception, detail: + logger.error("Exception: %s" % detail) + status = FAIL + + if status == PASS: + for k, l in verify_ectp_list.iteritems(): + if len(l) != 0: + logger.error("%s items weren't returned: %s", k, l) + status = FAIL Globals.CIM_NS = prev_namespace cxml.destroy(server) From kaitlin at linux.vnet.ibm.com Sun Nov 9 01:12:11 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 08 Nov 2008 17:12:11 -0800 Subject: [Libvirt-cim] [PATCH 5 of 5] Updated associations to support input device RASD In-Reply-To: Message-ID: <5adbca62b45236815e2e.1226193131@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1226191578 28800 # Node ID 5adbca62b45236815e2e0654859032277d5896c8 # Parent d515ef760ebf138762284a29f149db2895eec94b Updated associations to support input device RASD. Signed-off-by: Kaitlin Rupert diff -r d515ef760ebf -r 5adbca62b452 src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Tue Nov 04 14:50:14 2008 -0800 +++ b/src/Virt_ElementSettingData.c Sat Nov 08 16:46:18 2008 -0800 @@ -128,16 +128,19 @@ "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", "Xen_GraphicsResourceAllocationSettingData", + "Xen_InputResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", "KVM_GraphicsResourceAllocationSettingData", + "KVM_InputResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", "LXC_GraphicsResourceAllocationSettingData", + "LXC_InputResourceAllocationSettingData", NULL }; diff -r d515ef760ebf -r 5adbca62b452 src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Tue Nov 04 14:50:14 2008 -0800 +++ b/src/Virt_SettingsDefineState.c Sat Nov 08 16:46:18 2008 -0800 @@ -327,16 +327,19 @@ "Xen_NetworkPort", "Xen_LogicalDisk", "Xen_DisplayController", + "Xen_PointingDevice", "KVM_Processor", "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", "KVM_DisplayController", + "KVM_PointingDevice", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", "LXC_LogicalDisk", "LXC_DisplayController", + "LXC_PointingDevice", NULL }; @@ -346,16 +349,19 @@ "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", "Xen_GraphicsResourceAllocationSettingData", + "Xen_InputResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", "KVM_GraphicsResourceAllocationSettingData", + "KVM_InputResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", "LXC_GraphicsResourceAllocationSettingData", + "LXC_InputResourceAllocationSettingData", NULL }; diff -r d515ef760ebf -r 5adbca62b452 src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Tue Nov 04 14:50:14 2008 -0800 +++ b/src/Virt_VSSDComponent.c Sat Nov 08 16:46:18 2008 -0800 @@ -132,16 +132,19 @@ "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", "Xen_GraphicsResourceAllocationSettingData", + "Xen_InputResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", "KVM_GraphicsResourceAllocationSettingData", + "KVM_InputResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", "LXC_GraphicsResourceAllocationSettingData", + "LXC_InputResourceAllocationSettingData", NULL }; From kaitlin at linux.vnet.ibm.com Sun Nov 9 01:12:10 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 08 Nov 2008 17:12:10 -0800 Subject: [Libvirt-cim] [PATCH 4 of 5] Add support for input devices to Virt_RASD.c In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1225839014 28800 # Node ID d515ef760ebf138762284a29f149db2895eec94b # Parent 25e6376dbc3ef5df451bd754a9e3a7386c5df59d Add support for input devices to Virt_RASD.c There isn't much to the input device, so the only attributes that get set are the ResourceType and the InstanceID. Signed-off-by: Kaitlin Rupert diff -r 25e6376dbc3e -r d515ef760ebf schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Sat Nov 08 16:44:35 2008 -0800 +++ b/schema/ResourceAllocationSettingData.mof Tue Nov 04 14:50:14 2008 -0800 @@ -145,3 +145,24 @@ { }; +[Description ("Xen virtual input device"), + Provider("cmpi::Virt_RASD") +] +class Xen_InputResourceAllocationSettingData : Xen_ResourceAllocationSettingData +{ +}; + +[Description ("KVM virtual input device"), + Provider("cmpi::Virt_RASD") +] +class KVM_InputResourceAllocationSettingData : KVM_ResourceAllocationSettingData +{ +}; + +[Description ("LXC virtual input device"), + Provider("cmpi::Virt_RASD") +] +class LXC_InputResourceAllocationSettingData : LXC_ResourceAllocationSettingData +{ +}; + diff -r 25e6376dbc3e -r d515ef760ebf schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Sat Nov 08 16:44:35 2008 -0800 +++ b/schema/ResourceAllocationSettingData.registration Tue Nov 04 14:50:14 2008 -0800 @@ -5,12 +5,15 @@ 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 +Xen_InputResourceAllocationSettingData 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 +KVM_InputResourceAllocationSettingData 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 +LXC_InputResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance diff -r 25e6376dbc3e -r d515ef760ebf src/Virt_RASD.c --- a/src/Virt_RASD.c Sat Nov 08 16:44:35 2008 -0800 +++ b/src/Virt_RASD.c Tue Nov 04 14:50:14 2008 -0800 @@ -313,6 +313,9 @@ } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { type = CIM_RES_TYPE_GRAPHICS; base = "GraphicsResourceAllocationSettingData"; + } else if (dev->type == CIM_RES_TYPE_INPUT) { + type = CIM_RES_TYPE_INPUT; + base = "InputResourceAllocationSettingData"; } else { return NULL; } @@ -486,6 +489,8 @@ *type = CIM_RES_TYPE_MEM; else if (STREQ(base, "GraphicsResourceAllocationSettingData")) *type = CIM_RES_TYPE_GRAPHICS; + else if (STREQ(base, "InputResourceAllocationSettingData")) + *type = CIM_RES_TYPE_INPUT; else goto out; @@ -516,6 +521,9 @@ break; case CIM_RES_TYPE_GRAPHICS: *classname = "GraphicsResourceAllocationSettingData"; + break; + case CIM_RES_TYPE_INPUT: + *classname = "InputResourceAllocationSettingData"; break; default: rc = CMPI_RC_ERR_FAILED; From kaitlin at linux.vnet.ibm.com Sun Nov 9 01:12:09 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 08 Nov 2008 17:12:09 -0800 Subject: [Libvirt-cim] [PATCH 3 of 5] Update SystemDevice to support input devices In-Reply-To: Message-ID: <25e6376dbc3ef5df451b.1226193129@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1226191475 28800 # Node ID 25e6376dbc3ef5df451bd754a9e3a7386c5df59d # Parent ec261be2c3eee8a81ea4c4a1e88d8282fb8bce87 Update SystemDevice to support input devices. Signed-off-by: Kaitlin Rupert diff -r ec261be2c3ee -r 25e6376dbc3e src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Wed Oct 22 09:24:16 2008 -0700 +++ b/src/Virt_SystemDevice.c Sat Nov 08 16:44:35 2008 -0800 @@ -135,16 +135,19 @@ "Xen_NetworkPort", "Xen_LogicalDisk", "Xen_DisplayController", + "Xen_PointingDevice", "KVM_Processor", "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", "KVM_DisplayController", + "KVM_PointingDevice", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", "LXC_LogicalDisk", "LXC_DisplayController", + "LXC_PointingDevice", NULL }; From kaitlin at linux.vnet.ibm.com Sun Nov 9 01:12:06 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 08 Nov 2008 17:12:06 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] #3 Add input device and corresponding RASD. Message-ID: Also update related associations. From kaitlin at linux.vnet.ibm.com Sun Nov 9 01:12:07 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 08 Nov 2008 17:12:07 -0800 Subject: [Libvirt-cim] [PATCH 1 of 5] Add PointingDevice schema and input device type In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1224692656 25200 # Node ID d474e34c81bcc1f730db3ac0f04262cc9f7e538a # Parent c403069bb8b9d31a3890156984ea82f6c42518be 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 c403069bb8b9 -r d474e34c81bc Makefile.am --- a/Makefile.am Wed Nov 05 15:13:38 2008 -0800 +++ 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 c403069bb8b9 -r d474e34c81bc 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 c403069bb8b9 -r d474e34c81bc 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 c403069bb8b9 -r d474e34c81bc src/svpc_types.h --- a/src/svpc_types.h Wed Nov 05 15:13:38 2008 -0800 +++ 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 Sun Nov 9 01:12:08 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sat, 08 Nov 2008 17:12:08 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] (#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 ec261be2c3eee8a81ea4c4a1e88d8282fb8bce87 # Parent d474e34c81bcc1f730db3ac0f04262cc9f7e538a (#2) Add input device support to device_parsing and Virt_Device. Updates: -Add a count value for input devcies -Change ID value from "input" to "device type:bus type" Signed-off-by: Kaitlin Rupert diff -r d474e34c81bc -r ec261be2c3ee 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 @@ -44,6 +44,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" @@ -80,6 +81,12 @@ free(dev->keymap); } +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) @@ -93,6 +100,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); @@ -467,6 +476,47 @@ return 0; } +static int parse_input_device(xmlNode *node, struct virt_device **vdevs) +{ + struct virt_device *vdev = NULL; + struct input_device *idev = NULL; + char *id; + int ret; + + 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; + + ret = asprintf(&id, "%s:%s", idev->type, idev->bus); + if (ret == -1) { + CU_DEBUG("Failed to create input id string"); + free(id); + goto err; + } + + vdev->id = strdup(id); + free(id); + + *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; @@ -502,6 +552,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; @@ -570,6 +622,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; @@ -638,6 +692,9 @@ DUP_FIELD(dev, _dev, dev.graphics.port); DUP_FIELD(dev, _dev, dev.graphics.host); DUP_FIELD(dev, _dev, dev.graphics.keymap); + } else if (dev->type == CIM_RES_TYPE_INPUT) { + DUP_FIELD(dev, _dev, dev.input.type); + DUP_FIELD(dev, _dev, dev.input.bus); } return dev; @@ -893,6 +950,9 @@ parse_devices(xml, &(*dominfo)->dev_emu, CIM_RES_TYPE_EMU); parse_devices(xml, &(*dominfo)->dev_graphics, CIM_RES_TYPE_GRAPHICS); + (*dominfo)->dev_input_ct = 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, &(*dominfo)->dev_net, @@ -962,6 +1022,7 @@ cleanup_virt_devices(&dom->dev_net, dom->dev_net_ct); cleanup_virt_devices(&dom->dev_disk, dom->dev_disk_ct); cleanup_virt_devices(&dom->dev_vcpu, dom->dev_vcpu_ct); + cleanup_virt_devices(&dom->dev_input, dom->dev_input_ct); free(dom); diff -r d474e34c81bc -r ec261be2c3ee 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 @@ -69,6 +69,11 @@ char *keymap; }; +struct input_device { + char *type; + char *bus; +}; + struct virt_device { uint16_t type; union { @@ -78,6 +83,7 @@ struct vcpu_device vcpu; struct emu_device emu; struct graphics_device graphics; + struct input_device input; } dev; char *id; }; @@ -120,6 +126,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 d474e34c81bc -r ec261be2c3ee 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 Mon Nov 10 02:21:47 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 10 Nov 2008 10:21:47 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Nov 10 2008 Message-ID: ================================================= KVM on sfcb Test Run Summary for Nov 10 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: 738 Libvirt-cim changeset: 303adefbaf4a Cimtest revision: 483 Cimtest changeset: 6591949e8afd ================================================= FAIL : 5 XFAIL : 2 SKIP : 4 PASS : 128 ----------------- Total : 139 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.py: FAIL ElementCapabilities - 01_forward.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL VSSD - 04_vssd_to_rasd.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: FAIL ERROR - 'KVM_ElementCapabilities' association classname error Class not found -------------------------------------------------------------------- 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 - Failed to get associators information for KVM_SettingsDefineState ERROR - Exception: u'KVM_DisplayController' 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: 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 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: FAIL ERROR - Mistmatching KVM_GraphicsResourceAllocationSettingData values -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.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 Mon Nov 10 02:28:45 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 10 Nov 2008 10:28:45 +0800 Subject: [Libvirt-cim] LXC on sfcb Test Run Summary for Nov 10 2008 Message-ID: ================================================= LXC on sfcb Test Run Summary for Nov 10 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: 738 Libvirt-cim changeset: 303adefbaf4a Cimtest revision: 483 Cimtest changeset: 6591949e8afd ================================================= FAIL : 6 XFAIL : 1 SKIP : 38 PASS : 94 ----------------- Total : 139 ================================================= FAIL Test Summary: ElementCapabilities - 01_forward.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL HostSystem - 04_hs_to_EAPF.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 12_referenced_config.py: FAIL ================================================= XFAIL Test Summary: VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 06_paused_active_suspend.py: SKIP ComputerSystem - 23_suspend_suspend.py: SKIP ComputerSystem - 32_start_reboot.py: SKIP ComputerSystem - 33_suspend_reboot.py: SKIP ComputerSystem - 35_start_reset.py: SKIP ComputerSystem - 40_RSC_start.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystemIndication - 01_created_indication.py: SKIP ElementAllocatedFromPool - 03_reverse_errs.py: SKIP ElementAllocatedFromPool - 04_forward_errs.py: SKIP HostedDependency - 03_enabledstate.py: SKIP LogicalDisk - 01_disk.py: SKIP LogicalDisk - 02_nodevs.py: SKIP LogicalDisk - 03_ld_gi_errs.py: SKIP NetworkPort - 01_netport.py: SKIP NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: SKIP Processor - 02_definesys_get_procs.py: SKIP Processor - 03_proc_gi_errs.py: SKIP Profile - 02_profile_to_elec.py: SKIP RASD - 04_disk_rasd_size.py: SKIP ResourceAllocationFromPool - 05_RAPF_err.py: SKIP ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP 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: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: SKIP -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: SKIP -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: SKIP -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: SKIP -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: SKIP -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: SKIP -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: SKIP -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: FAIL ERROR - 'LXC_ElementCapabilities' association classname error Class not found -------------------------------------------------------------------- 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 - Failed to get associators information for LXC_SettingsDefineState ERROR - Exception: u'LXC_DisplayController' Class not found -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: FAIL ERROR - DEBUG host_name is elm3b197.beaverton.ibm.com ERROR - KeyError : u'LXC_ProcessorPool' Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 116, in do_try File "04_hs_to_EAPF.py", line 246, in main in_pllist = pool_init_list(virt, pool, net_name, default_pool_name) File "04_hs_to_EAPF.py", line 98, in pool_init_list if exp_pllist[CName] == InstID: KeyError: u'LXC_ProcessorPool' ERROR - None Class not found -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: SKIP -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: SKIP -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: SKIP -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: SKIP -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: SKIP -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: SKIP -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: SKIP -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: SKIP -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: SKIP -------------------------------------------------------------------- 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: 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: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: FAIL ERROR - InstanceID Mismatch ERROR - Returned VSSDC_dom//tmp instead of VSSDC_dom/hda ERROR - Address Mismatch ERROR - Returned /tmp/lxc_files instead of None ERROR - Mistmatching LXC_DiskResourceAllocationSettingData values -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00008> -------------------------------------------------------------------- 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 Mon Nov 10 02:54:40 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 10 Nov 2008 10:54:40 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update EC 01_forward.py to work with ConsoleRedirectionServiceCapabilites In-Reply-To: Message-ID: +1 from me. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 Kaitlin Rupert Sent by: libvirt-cim-bounces at redhat.com 2008-11-08 05:04 Please respond to List for discussion and development of libvirt CIM To libvirt-cim at redhat.com cc Subject [Libvirt-cim] [PATCH] [TEST] Update EC 01_forward.py to work with ConsoleRedirectionServiceCapabilites # HG changeset patch # User Kaitlin Rupert # Date 1226091880 28800 # Node ID ceff8a7a75e001a24da909528ea8f333d6a7021c # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 [TEST] Update EC 01_forward.py to work with ConsoleRedirectionServiceCapabilites Signed-off-by: Kaitlin Rupert diff -r 6591949e8afd -r ceff8a7a75e0 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Nov 05 22:03:48 2008 -0800 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Nov 07 13:04:40 2008 -0800 @@ -32,10 +32,12 @@ from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC from XenKvmLib.enumclass import EnumInstances from XenKvmLib.common_util import get_host_info +from XenKvmLib.const import get_provider_version sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "dom_elecap" bug_sblim = "00007" +libvirtcim_crsc_changes = 723 def append_to_list(server, virt, poolname, valid_elc_id): poolname = get_typed_class(virt, poolname) @@ -79,12 +81,17 @@ logger.error(CIM_ERROR_ASSOCIATORNAMES, an) return FAIL - valid_elc_name = [get_typed_class(virt, "VirtualSystemManagementCapabilities"), get_typed_class(virt, "VirtualSystemMigrationCapabilities")] valid_elc_id = ["ManagementCapabilities", "MigrationCapabilities"] + + cim_rev, changeset = get_provider_version(virt, server) + if cim_rev >= libvirtcim_crsc_changes: + crsc = get_typed_class(virt, "ConsoleRedirectionServiceCapabilities") + valid_elc_name.append(crsc) + valid_elc_id.append("ConsoleRedirectionCapabilities") valid_elc_name.append(get_typed_class(virt, "AllocationCapabilities")) status, valid_elc_id = set_pool_info(server, virt, valid_elc_id) _______________________________________________ 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 Nov 10 05:21:55 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 10 Nov 2008 13:21:55 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: <37e34f4f2e7187358449.1226191352@localhost.localdomain> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-09 08:42:32: > # HG changeset patch > # User Kaitlin Rupert > # Date 1226191230 28800 > # Node ID 37e34f4f2e718735844919a9f064ab91a6e640e7 > # Parent ceff8a7a75e001a24da909528ea8f333d6a7021c > [TEST] Fix ECTP 01_forward.py to support system with multiple networks defined > > This test was doing a lot of unnecessary checking (and unessary > building of lists). Instead, this test calls EnumInstances on each > of the classes expected to be returned by the association. > > These instances are then compared against the list of instances > returned by the ECTP association query. > > The FIXME will be fixed when bug 0007 is fixed. > > Signed-off-by: Kaitlin Rupert > > diff -r ceff8a7a75e0 -r 37e34f4f2e71 suites/libvirt- > cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri > Nov 07 13:04:40 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Sat > Nov 08 16:40:30 2008 -0800 > @@ -23,10 +23,8 @@ > # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > # > > -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and > -# the Classname are set appropriately for the results returned by the > -# ElementConformsToProfile association for the RegisteredProfile class > -# and ManagedElement Class > +# This tc is used to verify the results of the ElementConformsToProfile > +# association. This test focuses on RegisteredProfile -> ManagedElement > # > # "CIM:DSP1042-SystemVirtualization-1.0.0" , > # "CIM:DSP1057-VirtualSystem-1.0.0a" > @@ -39,104 +37,71 @@ > # Date : 04-12-2007 > > import sys > +from sets import Set > from VirtLib import utils, live > from XenKvmLib import assoc > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib.classes import get_typed_class > from XenKvmLib import vxml > from CimTest import Globals > -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 XenKvmLib.common_util import print_field_error, check_sblim, > get_host_info > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.enumclass import EnumInstances > -from XenKvmLib.const import default_network_name, default_pool_name > -from XenKvmLib.const import get_provider_version > - > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > test_dom = "domU" > bug_sblim = '00007' > libvirt_cim_ectp_changes = 680 > > -def pool_init(verify_list, pool_cn, pool_name, virt): > - ccn = get_typed_class(virt, pool_cn) > - instid = '%s/%s' %(pool_cn, pool_name) > - verify_list[ccn]= {'InstanceID' : instid } > - return verify_list > - > def init_vs_pool_values(server, virt): > - verify_ectp_list = { } > - hs_ccn = get_typed_class(virt, 'HostSystem') > - host = live.hostname(server) > - cs_fields = { > - 'CreationClassName' : hs_ccn, > - 'Name' : host > - } > + verify_ectp_list = {} > > - verify_ectp_list[hs_ccn] = cs_fields > + cn_names = ["VirtualSystemMigrationService", "ComputerSystem", > "DiskPool", > + "NetworkPool", "ProcessorPool", "MemoryPool"] > > - cs_ccn = get_typed_class(virt, 'ComputerSystem') > - verify_ectp_list[cs_ccn] = cs_fields.copy() > - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn > - verify_ectp_list[cs_ccn]['Name'] = test_dom > + status, host_name, host_ccn = get_host_info(server, virt) > + if status != PASS: > + logger.error("Unable to get host system instance objects") > + return FAIL, verify_ectp_list > > - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') > - verify_ectp_list[vs_ccn] = cs_fields.copy() > - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn > - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn > - verify_ectp_list[vs_ccn]['SystemName'] = host > - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' > + #FIXME - get_host_info() should be updated to return the host instance > + insts = EnumInstances(server, host_ccn, True) > + if len(insts) < 1: > + logger.error("Expected 1 %s instance", host_ccn) > + return FAIL, verify_ectp_list > > - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', > - default_pool_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', > - default_network_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) > + verify_ectp_list[host_ccn] = insts > > - > - return verify_ectp_list > + for cn_base in cn_names: > + cn = get_typed_class(virt, cn_base) > + insts = EnumInstances(server, cn, True) > + > + if len(insts) < 1: > + logger.error("Expected at least 1 %s instance", cn) > + return FAIL, verify_ectp_list > > -def verify_fields(assoc_val, pllst_index, vs_pool_values): > + verify_ectp_list[cn] = insts > + > + return PASS, verify_ectp_list > + > +def verify_fields(assoc_val, managed_ele_values): > try: > - field_names = vs_pool_values[pllst_index].keys() > - values = vs_pool_values[pllst_index] > - for field in field_names: > - if values[field] != assoc_val[field]: > - print_field_error(field, assoc_val[field], values[field]) > - return FAIL > + cn = assoc_val.classname > + elements = managed_ele_values[cn] > + > + for ele in elements: > + if assoc_val.items() == ele.items(): > + managed_ele_values[cn].remove(ele) > + return PASS, managed_ele_values > + > except Exception, details: > - logger.error("Exception: In fn verify_fields() %s", details) > - return FAIL > + logger.error("verify_fields() exception: %s", details) > + return FAIL, managed_ele_values > > - return PASS > - > -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): > - try: > - pllst_index = assoc_info[0]['CreationClassName'] > - assoc_val = None > - if 'HostSystem' in pllst_index or \ > - 'VirtualSystemMigrationService' in pllst_index: > - if len(assoc_info) != 1: > - logger.error("'%s' returned '%d' records, expected 1", > - pllst_index, len(assoc_info)) > - return FAIL > - assoc_val = assoc_info[0] > - else: > - # For ComputerSystem info > - for inst in assoc_info: > - if inst['Name'] == test_dom: > - assoc_val = inst > - break > - except Exception, details: > - logger.error("Exception: In fn verify_cs_hs_mig_fields() % > s", details) > - return FAIL > - > - if assoc_val == None: > - return FAIL > - > - return verify_fields(assoc_val, pllst_index, vs_pool_values) > + logger.error("%s not in expected list %s", assoc_val, elements) > + return FAIL, managed_ele_values > > def get_proflist(server, reg_classname, virt): > profiles_instid_list = [] > @@ -150,7 +115,7 @@ > len_prof_list = 7 > if len(proflist) < len_prof_list: > logger.error("'%s' returned '%d' '%s' objects, expected > atleast %d", > - reg_classname, len(proflist), 'Profile', > len_prof_list) > + reg_classname, len(proflist), 'Profile', > len_prof_list) > status = FAIL > > except Exception, detail: > @@ -164,51 +129,6 @@ > profiles_instid_list = [ profile.InstanceID for profile in proflist ] > > return status, profiles_instid_list > - > - > -def verify_ectp_assoc(server, virt): > - 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: > - return status > - > - verify_ectp_list = init_vs_pool_values(server, virt) > - for devid in inst_lst : > - logger.info("Verifying '%s' with '%s'", an, devid) > - try: > - assoc_info = assoc.Associators(server, > - an, > - reg_classname, > - InstanceID = devid) > - if len(assoc_info) < 1: > - 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: > - instid = assoc_info[0]['InstanceID'] > - index, other = instid.split("/") > - cn = get_typed_class(virt, index) > - status = verify_fields(assoc_info[0], cn, verify_ectp_list) > - else: > - ccn = assoc_info[0]['CreationClassName'] > - status = verify_cs_hs_mig_fields(assoc_info, > verify_ectp_list) > - > - if status != PASS: > - break > - > - except Exception, detail: > - logger.error(CIM_ERROR_ASSOCIATORS, an) > - logger.error("Exception: %s" % detail) > - status = FAIL > - return status > > @do_main(sup_types) > def main(): > @@ -232,11 +152,53 @@ > logger.error('Unable to start domain %s' % test_dom) > return FAIL > > - > prev_namespace = Globals.CIM_NS > Globals.CIM_NS = 'root/interop' > > - status = verify_ectp_assoc(server, virt) > + reg_classname = get_typed_class(virt, "RegisteredProfile") > + an = get_typed_class(virt,"ElementConformsToProfile") > + > + status, prof_inst_lst = get_proflist(server, reg_classname, virt) > + if status != PASS: > + return status > + > + status, verify_ectp_list = init_vs_pool_values(server, virt) > + if status != PASS: > + Globals.CIM_NS = prev_namespace > + cxml.destroy(server) > + cxml.undefine(server) > + Do you think it's better to return status here? Thanks! > + for prof_id in prof_inst_lst: > + logger.info("Verifying '%s' with '%s'", an, prof_id) > + try: > + assoc_info = assoc.Associators(server, > + an, > + reg_classname, > + InstanceID = prof_id) > + if len(assoc_info) < 1: > + 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 > + > + for inst in assoc_info: > + status, verify_ectp_list = verify_fields(inst, > verify_ectp_list) > + if status != PASS: > + raise Exception("Failed to verify instance") > + > + except Exception, detail: > + logger.error("Exception: %s" % detail) > + status = FAIL > + > + if status == PASS: > + for k, l in verify_ectp_list.iteritems(): > + if len(l) != 0: > + logger.error("%s items weren't returned: %s", k, l) > + status = FAIL > > Globals.CIM_NS = prev_namespace > cxml.destroy(server) > > _______________________________________________ > 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 Nov 10 06:05:04 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 09 Nov 2008 22:05:04 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py Message-ID: # HG changeset patch # User Guolian Yun # Date 1226297098 28800 # Node ID c85ded9735f60db2fc49475906e3611616a4a315 # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py Signed-off-by: Guolian Yun diff -r 6591949e8afd -r c85ded9735f6 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed Nov 05 22:03:48 2008 -0800 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Sun Nov 09 22:04:58 2008 -0800 @@ -40,9 +40,8 @@ expr_values = { "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, 'desc' : 'Missing InstanceID'}, - "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, - 'desc' : 'Unable to determine\ - resource type' }, + "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : 'No such instance'}, } def err_invalid_instid_keyname(virt, conn, field): From deeptik at linux.vnet.ibm.com Mon Nov 10 06:35:33 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 10 Nov 2008 12:05:33 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: References: Message-ID: <4917D635.4030405@linux.vnet.ibm.com> This will fail for F9 rpm. Regards, Deepti. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1226297098 28800 > # Node ID c85ded9735f60db2fc49475906e3611616a4a315 > # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 > [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py > > Signed-off-by: Guolian Yun > > diff -r 6591949e8afd -r c85ded9735f6 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed Nov 05 22:03:48 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Sun Nov 09 22:04:58 2008 -0800 > @@ -40,9 +40,8 @@ > expr_values = { > "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, > 'desc' : 'Missing InstanceID'}, > - "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, > - 'desc' : 'Unable to determine\ > - resource type' }, > + "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > + 'desc' : 'No such instance'}, > } > > def err_invalid_instid_keyname(virt, conn, field): > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From yunguol at cn.ibm.com Mon Nov 10 06:58:28 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 09 Nov 2008 22:58:28 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostSystem/02_hostsystem_to_rasd.py Message-ID: # HG changeset patch # User Guolian Yun # Date 1226300302 28800 # Node ID d0b174efd49c759768adc21db27f0ff7ddddab79 # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 [TEST] Fix HostSystem/02_hostsystem_to_rasd.py Signed-off-by: Guolian Yun diff -r 6591949e8afd -r d0b174efd49c suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Wed Nov 05 22:03:48 2008 -0800 +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Sun Nov 09 22:58:22 2008 -0800 @@ -57,7 +57,8 @@ CIM_ERROR_ASSOCIATORS 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 +verify_diskrasd_values, verify_memrasd_values, verify_displayrasd_values, \ +rasd_init_list sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] bug_sblim = '00007' @@ -179,6 +180,8 @@ status = verify_diskrasd_values(assoc_info[index], rasd) elif 'MemResourceAllocationSettingData' in CCName: status = verify_memrasd_values(assoc_info[index], rasd) + elif 'GraphicsResourceAllocationSettingData' in CCName: + status = verify_displayrasd_values(assoc_info[index], rasd) else: status = FAIL if status != PASS: diff -r 6591949e8afd -r d0b174efd49c suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Nov 05 22:03:48 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Sun Nov 09 22:58:22 2008 -0800 @@ -34,10 +34,12 @@ nasd_cn = 'NetResourceAllocationSettingData' dasd_cn = 'DiskResourceAllocationSettingData' masd_cn = 'MemResourceAllocationSettingData' +dcrasd_cn = 'GraphicsResourceAllocationSettingData' proccn = 'Processor' memcn = 'Memory' netcn = 'NetworkPort' diskcn = 'LogicalDisk' +dccn = 'DisplayController' def rasd_init_list(vsxml, virt, t_disk, t_dom, t_mac, t_mem): """ @@ -48,11 +50,13 @@ mem_cn = get_typed_class(virt, memcn) net_cn = get_typed_class(virt, netcn) disk_cn = get_typed_class(virt, diskcn) + dc_cn = get_typed_class(virt, dccn) - in_list = { 'proc' : proc_cn, - 'mem' : mem_cn, - 'net' : net_cn, - 'disk' : disk_cn + in_list = { 'proc' : proc_cn, + 'mem' : mem_cn, + 'net' : net_cn, + 'disk' : disk_cn, + 'display' : dc_cn } try: @@ -79,6 +83,9 @@ "ResourceType" : 4, "AllocationUnits" : "KiloBytes", "VirtualQuantity" : (t_mem * 1024), + }, + dc_cn : { + "InstanceID" : "%s/%s" %(t_dom, "graphics") } } except Exception, details: @@ -106,6 +113,13 @@ logger.error("%s Mismatch", 'InstanceID') logger.error("Returned %s instead of %s", assoc_info['InstanceID'], list['InstanceID']) + +def verify_displayrasd_values(assoc_info, displayrasd_list): + status = PASS + if assoc_info['InstanceID'] != displayrasd_list['InstanceID']: + InstId_err(assoc_info, displayrasd_list) + status = FAIL + return status def verify_procrasd_values(assoc_info, procrasd_list): status = PASS From yunguol at cn.ibm.com Mon Nov 10 07:10:11 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 09 Nov 2008 23:10:11 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VSSD/04_vssd_to_rasd.py Message-ID: <2280d7f2f7639ca6f7e1.1226301011@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1226301001 28800 # Node ID 2280d7f2f7639ca6f7e12a110f086d45b53a89cb # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 [TEST] Fix VSSD/04_vssd_to_rasd.py Signed-off-by: Guolian Yun diff -r 6591949e8afd -r 2280d7f2f763 suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py --- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Wed Nov 05 22:03:48 2008 -0800 +++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Sun Nov 09 23:10:01 2008 -0800 @@ -53,7 +53,8 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib import rasd from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ -verify_diskrasd_values, verify_memrasd_values, rasd_init_list +verify_diskrasd_values, verify_memrasd_values, verify_displayrasd_values, \ +rasd_init_list from XenKvmLib.const import default_network_name sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -174,6 +175,7 @@ netrasd = rasd_values_list['%s' %in_list['net']] diskrasd = rasd_values_list['%s' %in_list['disk']] memrasd = rasd_values_list['%s' %in_list['mem']] + displayrasd = rasd_values_list['%s' %in_list['display']] try: for rasd_instance in rasd_values_info: @@ -186,6 +188,8 @@ status = verify_diskrasd_values(rasd_instance, diskrasd) elif 'MemResourceAllocationSettingData' in CCName : status = verify_memrasd_values(rasd_instance, memrasd) + elif 'GraphicsResourceAllocationSettingData' in CCName : + status = verify_displayrasd_values(rasd_instance, displayrasd) else: status = FAIL if status != PASS: From yunguol at cn.ibm.com Mon Nov 10 06:59:25 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 10 Nov 2008 14:59:25 +0800 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Nov 10 2008 Message-ID: ================================================= KVM on Pegasus Test Run Summary for Nov 10 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 Cimtest revision: 483 Cimtest changeset: 6591949e8afd ================================================= FAIL : 1 XFAIL : 2 SKIP : 6 PASS : 130 ----------------- Total : 139 ================================================= FAIL Test Summary: VirtualSystemManagementService - 15_mod_system_settings.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: 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: 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: FAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 -------------------------------------------------------------------- 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 Nov 10 03:21:54 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 09 Nov 2008 19:21:54 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 15_mod_system_settings.py tc of VSMS to work with libvirt-cim version < 694 Message-ID: <8cb2952f699638eeb78d.1226287314@beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1226287299 28800 # Node ID 8cb2952f699638eeb78dd49a54bd238153bc6a93 # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 [TEST] Fixing 15_mod_system_settings.py tc of VSMS to work with libvirt-cim version < 694. For libvirt_cim version < 694 , the ret[0] is returning None on successful ModifySystemSettings() call. For libvirt_cim version > 694, the ret[0] returns 0 on successful ModifySystemSettings() call. Signed-off-by: Deepti B. Kalakeri diff -r 6591949e8afd -r 8cb2952f6996 suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py Wed Nov 05 22:03:48 2008 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py Sun Nov 09 19:21:39 2008 -0800 @@ -30,6 +30,7 @@ from XenKvmLib.classes import get_typed_ from XenKvmLib.classes import get_typed_class, inst_to_mof from XenKvmLib.enumclass import GetInstance from XenKvmLib.common_util import poll_for_state_change +from XenKvmLib.const import get_provider_version sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] default_dom = 'rstest_domain' @@ -37,6 +38,7 @@ RECOVERY_VAL = 3 RECOVERY_VAL = 3 DEFINED_STATE = 3 bug = "00008" +libvirt_modify_setting_changes = 694 def cleanup_env(ip, cxml): cxml.cim_destroy(ip) @@ -97,10 +99,12 @@ def main(): 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 + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev >= libvirt_modify_setting_changes: + 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 From deeptik at linux.vnet.ibm.com Mon Nov 10 04:41:01 2008 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Sun, 09 Nov 2008 20:41:01 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fixed vsmigrations.py lib for tc's 01_migratable_host.py and 02_host_migrate_type.py Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1226292042 28800 # Node ID a949d69182419b086330dcac830da76d4b75a5a8 # Parent 8cb2952f699638eeb78dd49a54bd238153bc6a93 [TEST] Fixed vsmigrations.py lib for tc's 01_migratable_host.py and 02_host_migrate_type.py . Fixed vsmigrations.py lib for tc's 01_migratable_host.py and 02_host_migrate_type.py to work with libvirt_cim revision < 668 as well. Signed-off-by: Deepti B. Kalakeri diff -r 8cb2952f6996 -r a949d6918241 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Sun Nov 09 19:21:39 2008 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/01_migratable_host.py Sun Nov 09 20:40:42 2008 -0800 @@ -30,7 +30,9 @@ from XenKvmLib import vxml from XenKvmLib import vxml from XenKvmLib.common_util import poll_for_state_change from XenKvmLib import vsmigrations -from XenKvmLib.vsmigrations import check_possible_host_migration, migrate_guest_to_host, check_migration_job +from XenKvmLib.vsmigrations import check_possible_host_migration, \ + migrate_guest_to_host, \ + check_migration_job from XenKvmLib import enumclass from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib.const import do_main diff -r 8cb2952f6996 -r a949d6918241 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Nov 09 19:21:39 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Sun Nov 09 20:40:42 2008 -0800 @@ -28,6 +28,9 @@ from XenKvmLib import enumclass from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from XenKvmLib.xm_virt_util import domain_list +from XenKvmLib.const import get_provider_version + +libvirt_mig_changes = 668 class CIM_VirtualSystemMigrationService(CIMMethodClass): conn = None @@ -106,7 +109,12 @@ def get_migration_job_instance(ip, virt, def get_migration_job_instance(ip, virt, id): job = [] key_list = ["instanceid"] - mig_job_cn = get_typed_class(virt, 'MigrationJob') + curr_cim_rev, changeset = get_provider_version(virt, ip) + if curr_cim_rev < libvirt_mig_changes: + mig_job_cn = 'Virt_MigrationJob' + else: + mig_job_cn = get_typed_class(virt, 'MigrationJob') + try: job = enumclass.EnumInstances(ip, mig_job_cn) except Exception, details: From kaitlin at linux.vnet.ibm.com Mon Nov 10 18:34:30 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 10 Nov 2008 10:34:30 -0800 Subject: [Libvirt-cim] PoolID RASD property In-Reply-To: <87fxm4lqla.fsf@caffeine.danplanet.com> References: <4912310D.3010903@novell.com> <87od0slwf6.fsf@caffeine.danplanet.com> <491321F7.9060406@novell.com> <87fxm4lqla.fsf@caffeine.danplanet.com> Message-ID: <49187EB6.7020506@linux.vnet.ibm.com> Dan Smith wrote: > JF> I guess my question should really be directed at SVPC. Client > JF> developers assume they can get resource pool from PoolID. > JF> Generally I think the CIM model advocates associations to describe > JF> such relationships. But RAP is not clear on this. > > Right, PoolID seems like quite a hack to me, and definitely out of > place compared to the rest of SVPC. It helps us a little with the > template RASDs but we could get by without it. > > I don't have a strong feeling about it one way or the other, so I'll > let someone who does make the call. > Sorry for the delayed response here.. The use case examples in the SVP show the PoolID set on the RASD instances. However, setting the PoolID attribute appropriately, like you've both mentioned, is basically a re-implementation of the ResourceAllocationFromPool association. It seems like a waste of processing to add it. Jim, you says that client developers assume that this attribute is set. Have you run into any situations where its been needed? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Nov 10 20:40:21 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 10 Nov 2008 12:40:21 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: References: Message-ID: <49189C35.7080607@linux.vnet.ibm.com> > > > > - status = verify_ectp_assoc(server, virt) > > + reg_classname = get_typed_class(virt, "RegisteredProfile") > > + an = get_typed_class(virt,"ElementConformsToProfile") > > + > > + status, prof_inst_lst = get_proflist(server, reg_classname, virt) > > + if status != PASS: > > + return status > > + > > + status, verify_ectp_list = init_vs_pool_values(server, virt) > > + if status != PASS: > > + Globals.CIM_NS = prev_namespace > > + cxml.destroy(server) > > + cxml.undefine(server) > > > + Do you think it's better to return status here? > Thanks! > Yes, I definitely missed adding the return status here. Thanks for catching this! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Nov 10 20:42:59 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 10 Nov 2008 12:42:59 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ECTP 01_forward.py to support system with multiple networks defined Message-ID: <8d04c525d233623ba00f.1226349779@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1226349773 28800 # Node ID 8d04c525d233623ba00fd256a20a626b4eebfe53 # Parent ceff8a7a75e001a24da909528ea8f333d6a7021c [TEST] #2 Fix ECTP 01_forward.py to support system with multiple networks defined This test was doing a lot of unnecessary checking (and unessary building of lists). Instead, this test calls EnumInstances on each of the classes expected to be returned by the association. These instances are then compared against the list of instances returned by the ECTP association query. The FIXME will be fixed when bug 0007 is fixed. Updates: -Return from test case if init_vs_pool_values() returns a failure Signed-off-by: Kaitlin Rupert diff -r ceff8a7a75e0 -r 8d04c525d233 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Nov 07 13:04:40 2008 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Mon Nov 10 12:42:53 2008 -0800 @@ -23,10 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and -# the Classname are set appropriately for the results returned by the -# ElementConformsToProfile association for the RegisteredProfile class -# and ManagedElement Class +# This tc is used to verify the results of the ElementConformsToProfile +# association. This test focuses on RegisteredProfile -> ManagedElement # # "CIM:DSP1042-SystemVirtualization-1.0.0" , # "CIM:DSP1057-VirtualSystem-1.0.0a" @@ -39,104 +37,71 @@ # Date : 04-12-2007 import sys +from sets import Set from VirtLib import utils, live from XenKvmLib import assoc from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml from CimTest import Globals -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 XenKvmLib.common_util import print_field_error, check_sblim, get_host_info +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.enumclass import EnumInstances -from XenKvmLib.const import default_network_name, default_pool_name -from XenKvmLib.const import get_provider_version - sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "domU" bug_sblim = '00007' libvirt_cim_ectp_changes = 680 -def pool_init(verify_list, pool_cn, pool_name, virt): - ccn = get_typed_class(virt, pool_cn) - instid = '%s/%s' %(pool_cn, pool_name) - verify_list[ccn]= {'InstanceID' : instid } - return verify_list - def init_vs_pool_values(server, virt): - verify_ectp_list = { } - hs_ccn = get_typed_class(virt, 'HostSystem') - host = live.hostname(server) - cs_fields = { - 'CreationClassName' : hs_ccn, - 'Name' : host - } + verify_ectp_list = {} - verify_ectp_list[hs_ccn] = cs_fields + cn_names = ["VirtualSystemMigrationService", "ComputerSystem", "DiskPool", + "NetworkPool", "ProcessorPool", "MemoryPool"] - cs_ccn = get_typed_class(virt, 'ComputerSystem') - verify_ectp_list[cs_ccn] = cs_fields.copy() - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn - verify_ectp_list[cs_ccn]['Name'] = test_dom + status, host_name, host_ccn = get_host_info(server, virt) + if status != PASS: + logger.error("Unable to get host system instance objects") + return FAIL, verify_ectp_list - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') - verify_ectp_list[vs_ccn] = cs_fields.copy() - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn - verify_ectp_list[vs_ccn]['SystemName'] = host - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' + #FIXME - get_host_info() should be updated to return the host instance + insts = EnumInstances(server, host_ccn, True) + if len(insts) < 1: + logger.error("Expected 1 %s instance", host_ccn) + return FAIL, verify_ectp_list - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', - default_pool_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', - default_network_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) + verify_ectp_list[host_ccn] = insts - - return verify_ectp_list + for cn_base in cn_names: + cn = get_typed_class(virt, cn_base) + insts = EnumInstances(server, cn, True) + + if len(insts) < 1: + logger.error("Expected at least 1 %s instance", cn) + return FAIL, verify_ectp_list -def verify_fields(assoc_val, pllst_index, vs_pool_values): + verify_ectp_list[cn] = insts + + return PASS, verify_ectp_list + +def verify_fields(assoc_val, managed_ele_values): try: - field_names = vs_pool_values[pllst_index].keys() - values = vs_pool_values[pllst_index] - for field in field_names: - if values[field] != assoc_val[field]: - print_field_error(field, assoc_val[field], values[field]) - return FAIL + cn = assoc_val.classname + elements = managed_ele_values[cn] + + for ele in elements: + if assoc_val.items() == ele.items(): + managed_ele_values[cn].remove(ele) + return PASS, managed_ele_values + except Exception, details: - logger.error("Exception: In fn verify_fields() %s", details) - return FAIL + logger.error("verify_fields() exception: %s", details) + return FAIL, managed_ele_values - return PASS - -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): - try: - pllst_index = assoc_info[0]['CreationClassName'] - assoc_val = None - if 'HostSystem' in pllst_index or \ - 'VirtualSystemMigrationService' in pllst_index: - if len(assoc_info) != 1: - logger.error("'%s' returned '%d' records, expected 1", - pllst_index, len(assoc_info)) - return FAIL - assoc_val = assoc_info[0] - else: - # For ComputerSystem info - for inst in assoc_info: - if inst['Name'] == test_dom: - assoc_val = inst - break - except Exception, details: - logger.error("Exception: In fn verify_cs_hs_mig_fields() %s", details) - return FAIL - - if assoc_val == None: - return FAIL - - return verify_fields(assoc_val, pllst_index, vs_pool_values) + logger.error("%s not in expected list %s", assoc_val, elements) + return FAIL, managed_ele_values def get_proflist(server, reg_classname, virt): profiles_instid_list = [] @@ -150,7 +115,7 @@ len_prof_list = 7 if len(proflist) < len_prof_list: logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", - reg_classname, len(proflist), 'Profile', len_prof_list) + reg_classname, len(proflist), 'Profile', len_prof_list) status = FAIL except Exception, detail: @@ -164,51 +129,6 @@ profiles_instid_list = [ profile.InstanceID for profile in proflist ] return status, profiles_instid_list - - -def verify_ectp_assoc(server, virt): - 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: - return status - - verify_ectp_list = init_vs_pool_values(server, virt) - for devid in inst_lst : - logger.info("Verifying '%s' with '%s'", an, devid) - try: - assoc_info = assoc.Associators(server, - an, - reg_classname, - InstanceID = devid) - if len(assoc_info) < 1: - 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: - instid = assoc_info[0]['InstanceID'] - index, other = instid.split("/") - cn = get_typed_class(virt, index) - status = verify_fields(assoc_info[0], cn, verify_ectp_list) - else: - ccn = assoc_info[0]['CreationClassName'] - status = verify_cs_hs_mig_fields(assoc_info, verify_ectp_list) - - if status != PASS: - break - - except Exception, detail: - logger.error(CIM_ERROR_ASSOCIATORS, an) - logger.error("Exception: %s" % detail) - status = FAIL - return status @do_main(sup_types) def main(): @@ -232,11 +152,54 @@ logger.error('Unable to start domain %s' % test_dom) return FAIL - prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' - status = verify_ectp_assoc(server, virt) + reg_classname = get_typed_class(virt, "RegisteredProfile") + an = get_typed_class(virt,"ElementConformsToProfile") + + status, prof_inst_lst = get_proflist(server, reg_classname, virt) + if status != PASS: + return status + + status, verify_ectp_list = init_vs_pool_values(server, virt) + if status != PASS: + Globals.CIM_NS = prev_namespace + cxml.destroy(server) + cxml.undefine(server) + return status + + for prof_id in prof_inst_lst: + logger.info("Verifying '%s' with '%s'", an, prof_id) + try: + assoc_info = assoc.Associators(server, + an, + reg_classname, + InstanceID = prof_id) + if len(assoc_info) < 1: + 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 + + for inst in assoc_info: + status, verify_ectp_list = verify_fields(inst, verify_ectp_list) + if status != PASS: + raise Exception("Failed to verify instance") + + except Exception, detail: + logger.error("Exception: %s" % detail) + status = FAIL + + if status == PASS: + for k, l in verify_ectp_list.iteritems(): + if len(l) != 0: + logger.error("%s items weren't returned: %s", k, l) + status = FAIL Globals.CIM_NS = prev_namespace cxml.destroy(server) From yunguol at cn.ibm.com Tue Nov 11 02:43:53 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 11 Nov 2008 10:43:53 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: <4917D635.4030405@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-10 14:35:33: > This will fail for F9 rpm. It fails because of different error code and desc for F9 rpm and F10. With invalid_instid_keyvalue, it expected to return {'rc' : pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine resource type'} for F9, but we expected to return {'rc' : pywbem.CIM_ERR_NOT_FOUND, 'desc' : 'No such instance'} for F10. I have to add a revision branch here. Would you tell me how to get the revision number? Thanks! > > Regards, > Deepti. > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1226297098 28800 > > # Node ID c85ded9735f60db2fc49475906e3611616a4a315 > > # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 > > [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py > > > > Signed-off-by: Guolian Yun > > > > diff -r 6591949e8afd -r c85ded9735f6 suites/libvirt- > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py > > --- a/suites/libvirt- > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed Nov > 05 22:03:48 2008 -0800 > > +++ b/suites/libvirt- > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Sun Nov > 09 22:04:58 2008 -0800 > > @@ -40,9 +40,8 @@ > > expr_values = { > > "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, > > 'desc' : 'Missing InstanceID'}, > > - "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, > > - 'desc' : 'Unable to determine\ > > - resource type' }, > > + "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > > + 'desc' : 'No such instance'}, > > } > > > > def err_invalid_instid_keyname(virt, conn, field): > > > > _______________________________________________ > > 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 Nov 11 03:04:23 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 11 Nov 2008 11:04:23 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: <8d04c525d233623ba00f.1226349779@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-11-11 04:42:59: > # HG changeset patch > # User Kaitlin Rupert > # Date 1226349773 28800 > # Node ID 8d04c525d233623ba00fd256a20a626b4eebfe53 > # Parent ceff8a7a75e001a24da909528ea8f333d6a7021c > [TEST] #2 Fix ECTP 01_forward.py to support system with multiple > networks defined > > This test was doing a lot of unnecessary checking (and unessary > building of lists). Instead, this test calls EnumInstances on each > of the classes expected to be returned by the association. > > These instances are then compared against the list of instances > returned by the ECTP association query. > > The FIXME will be fixed when bug 0007 is fixed. > > Updates: > -Return from test case if init_vs_pool_values() returns a failure > > Signed-off-by: Kaitlin Rupert > > diff -r ceff8a7a75e0 -r 8d04c525d233 suites/libvirt- > cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri > Nov 07 13:04:40 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Mon > Nov 10 12:42:53 2008 -0800 > @@ -23,10 +23,8 @@ > # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > # > > -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and > -# the Classname are set appropriately for the results returned by the > -# ElementConformsToProfile association for the RegisteredProfile class > -# and ManagedElement Class > +# This tc is used to verify the results of the ElementConformsToProfile > +# association. This test focuses on RegisteredProfile -> ManagedElement > # > # "CIM:DSP1042-SystemVirtualization-1.0.0" , > # "CIM:DSP1057-VirtualSystem-1.0.0a" > @@ -39,104 +37,71 @@ > # Date : 04-12-2007 > > import sys > +from sets import Set > from VirtLib import utils, live > from XenKvmLib import assoc > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib.classes import get_typed_class > from XenKvmLib import vxml > from CimTest import Globals > -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 XenKvmLib.common_util import print_field_error, check_sblim, > get_host_info > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.enumclass import EnumInstances > -from XenKvmLib.const import default_network_name, default_pool_name > -from XenKvmLib.const import get_provider_version > - > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > test_dom = "domU" > bug_sblim = '00007' > libvirt_cim_ectp_changes = 680 > > -def pool_init(verify_list, pool_cn, pool_name, virt): > - ccn = get_typed_class(virt, pool_cn) > - instid = '%s/%s' %(pool_cn, pool_name) > - verify_list[ccn]= {'InstanceID' : instid } > - return verify_list > - > def init_vs_pool_values(server, virt): > - verify_ectp_list = { } > - hs_ccn = get_typed_class(virt, 'HostSystem') > - host = live.hostname(server) > - cs_fields = { > - 'CreationClassName' : hs_ccn, > - 'Name' : host > - } > + verify_ectp_list = {} > > - verify_ectp_list[hs_ccn] = cs_fields > + cn_names = ["VirtualSystemMigrationService", "ComputerSystem", > "DiskPool", > + "NetworkPool", "ProcessorPool", "MemoryPool"] > > - cs_ccn = get_typed_class(virt, 'ComputerSystem') > - verify_ectp_list[cs_ccn] = cs_fields.copy() > - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn > - verify_ectp_list[cs_ccn]['Name'] = test_dom > + status, host_name, host_ccn = get_host_info(server, virt) > + if status != PASS: > + logger.error("Unable to get host system instance objects") > + return FAIL, verify_ectp_list > > - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') > - verify_ectp_list[vs_ccn] = cs_fields.copy() > - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn > - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn > - verify_ectp_list[vs_ccn]['SystemName'] = host > - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' > + #FIXME - get_host_info() should be updated to return the host instance > + insts = EnumInstances(server, host_ccn, True) > + if len(insts) < 1: > + logger.error("Expected 1 %s instance", host_ccn) > + return FAIL, verify_ectp_list > > - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', > - default_pool_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', > - default_network_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) > + verify_ectp_list[host_ccn] = insts > > - > - return verify_ectp_list > + for cn_base in cn_names: > + cn = get_typed_class(virt, cn_base) > + insts = EnumInstances(server, cn, True) > + > + if len(insts) < 1: > + logger.error("Expected at least 1 %s instance", cn) > + return FAIL, verify_ectp_list > > -def verify_fields(assoc_val, pllst_index, vs_pool_values): > + verify_ectp_list[cn] = insts > + > + return PASS, verify_ectp_list > + > +def verify_fields(assoc_val, managed_ele_values): > try: > - field_names = vs_pool_values[pllst_index].keys() > - values = vs_pool_values[pllst_index] > - for field in field_names: > - if values[field] != assoc_val[field]: > - print_field_error(field, assoc_val[field], values[field]) > - return FAIL > + cn = assoc_val.classname > + elements = managed_ele_values[cn] > + > + for ele in elements: > + if assoc_val.items() == ele.items(): > + managed_ele_values[cn].remove(ele) > + return PASS, managed_ele_values > + > except Exception, details: > - logger.error("Exception: In fn verify_fields() %s", details) > - return FAIL > + logger.error("verify_fields() exception: %s", details) > + return FAIL, managed_ele_values > > - return PASS > - > -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): > - try: > - pllst_index = assoc_info[0]['CreationClassName'] > - assoc_val = None > - if 'HostSystem' in pllst_index or \ > - 'VirtualSystemMigrationService' in pllst_index: > - if len(assoc_info) != 1: > - logger.error("'%s' returned '%d' records, expected 1", > - pllst_index, len(assoc_info)) > - return FAIL > - assoc_val = assoc_info[0] > - else: > - # For ComputerSystem info > - for inst in assoc_info: > - if inst['Name'] == test_dom: > - assoc_val = inst > - break > - except Exception, details: > - logger.error("Exception: In fn verify_cs_hs_mig_fields() % > s", details) > - return FAIL > - > - if assoc_val == None: > - return FAIL > - > - return verify_fields(assoc_val, pllst_index, vs_pool_values) > + logger.error("%s not in expected list %s", assoc_val, elements) > + return FAIL, managed_ele_values > > def get_proflist(server, reg_classname, virt): > profiles_instid_list = [] > @@ -150,7 +115,7 @@ > len_prof_list = 7 > if len(proflist) < len_prof_list: > logger.error("'%s' returned '%d' '%s' objects, expected > atleast %d", > - reg_classname, len(proflist), 'Profile', > len_prof_list) > + reg_classname, len(proflist), 'Profile', > len_prof_list) > status = FAIL > > except Exception, detail: > @@ -164,51 +129,6 @@ > profiles_instid_list = [ profile.InstanceID for profile in proflist ] > > return status, profiles_instid_list > - > - > -def verify_ectp_assoc(server, virt): > - 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: > - return status > - > - verify_ectp_list = init_vs_pool_values(server, virt) > - for devid in inst_lst : > - logger.info("Verifying '%s' with '%s'", an, devid) > - try: > - assoc_info = assoc.Associators(server, > - an, > - reg_classname, > - InstanceID = devid) > - if len(assoc_info) < 1: > - 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: > - instid = assoc_info[0]['InstanceID'] > - index, other = instid.split("/") > - cn = get_typed_class(virt, index) > - status = verify_fields(assoc_info[0], cn, verify_ectp_list) > - else: > - ccn = assoc_info[0]['CreationClassName'] > - status = verify_cs_hs_mig_fields(assoc_info, > verify_ectp_list) > - > - if status != PASS: > - break > - > - except Exception, detail: > - logger.error(CIM_ERROR_ASSOCIATORS, an) > - logger.error("Exception: %s" % detail) > - status = FAIL > - return status > > @do_main(sup_types) > def main(): > @@ -232,11 +152,54 @@ > logger.error('Unable to start domain %s' % test_dom) > return FAIL > > - > prev_namespace = Globals.CIM_NS > Globals.CIM_NS = 'root/interop' > > - status = verify_ectp_assoc(server, virt) > + reg_classname = get_typed_class(virt, "RegisteredProfile") > + an = get_typed_class(virt,"ElementConformsToProfile") > + > + status, prof_inst_lst = get_proflist(server, reg_classname, virt) > + if status != PASS: > + return status > + > + status, verify_ectp_list = init_vs_pool_values(server, virt) > + if status != PASS: > + Globals.CIM_NS = prev_namespace > + cxml.destroy(server) > + cxml.undefine(server) > + return status > + > + for prof_id in prof_inst_lst: > + logger.info("Verifying '%s' with '%s'", an, prof_id) > + try: > + assoc_info = assoc.Associators(server, > + an, > + reg_classname, > + InstanceID = prof_id) > + if len(assoc_info) < 1: > + 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 > + > + for inst in assoc_info: > + status, verify_ectp_list = verify_fields(inst, > verify_ectp_list) > + if status != PASS: > + raise Exception("Failed to verify instance") > + > + except Exception, detail: > + logger.error("Exception: %s" % detail) > + status = FAIL > + > + if status == PASS: > + for k, l in verify_ectp_list.iteritems(): > + if len(l) != 0: > + logger.error("%s items weren't returned: %s", k, l) > + status = FAIL > > Globals.CIM_NS = prev_namespace > cxml.destroy(server) > > _______________________________________________ > 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 Nov 11 05:18:32 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Mon, 10 Nov 2008 22:18:32 -0700 Subject: [Libvirt-cim] PoolID RASD property In-Reply-To: <49187EB6.7020506@linux.vnet.ibm.com> References: <4912310D.3010903@novell.com> <87od0slwf6.fsf@caffeine.danplanet.com> <491321F7.9060406@novell.com> <87fxm4lqla.fsf@caffeine.danplanet.com> <49187EB6.7020506@linux.vnet.ibm.com> Message-ID: <491915A8.4070903@novell.com> Kaitlin Rupert wrote: > The use case examples in the SVP show the PoolID set on the RASD > instances. However, setting the PoolID attribute appropriately, like > you've both mentioned, is basically a re-implementation of the > ResourceAllocationFromPool association. It seems like a waste of > processing to add it. > > Jim, you says that client developers assume that this attribute is > set. Have you run into any situations where its been needed? No, I simply had client developers ask why the property is not set in RASDs. Understandably, they want to use it instead of invoking more CIM operations. IIRC this property was introduced for the "create" use cases, e.g. AddResourceSettings, where there is no way to describe the relationship via associations. However, once the object exists its relationship to other CIM objects is determined via associations. I don't think RAP is very clear in this regard, hence the questions/confusion. Jim From deeptik at linux.vnet.ibm.com Tue Nov 11 07:47:25 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 11 Nov 2008 13:17:25 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: <8d04c525d233623ba00f.1226349779@localhost.localdomain> References: <8d04c525d233623ba00f.1226349779@localhost.localdomain> Message-ID: <4919388D.9090407@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1226349773 28800 > # Node ID 8d04c525d233623ba00fd256a20a626b4eebfe53 > # Parent ceff8a7a75e001a24da909528ea8f333d6a7021c > [TEST] #2 Fix ECTP 01_forward.py to support system with multiple networks defined > > This test was doing a lot of unnecessary checking (and unessary building of lists). Instead, this test calls EnumInstances on each of the classes expected to be returned by the association. > > These instances are then compared against the list of instances returned by the ECTP association query. > > The FIXME will be fixed when bug 0007 is fixed. > > Updates: > -Return from test case if init_vs_pool_values() returns a failure > > Signed-off-by: Kaitlin Rupert > > diff -r ceff8a7a75e0 -r 8d04c525d233 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Nov 07 13:04:40 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Mon Nov 10 12:42:53 2008 -0800 > @@ -23,10 +23,8 @@ > # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > # > > -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and > -# the Classname are set appropriately for the results returned by the > -# ElementConformsToProfile association for the RegisteredProfile class > -# and ManagedElement Class > +# This tc is used to verify the results of the ElementConformsToProfile > +# association. This test focuses on RegisteredProfile -> ManagedElement > # > # "CIM:DSP1042-SystemVirtualization-1.0.0" , > # "CIM:DSP1057-VirtualSystem-1.0.0a" > @@ -39,104 +37,71 @@ > # Date : 04-12-2007 > > import sys > +from sets import Set > We dont require to import Set here. > from VirtLib import utils, live > from XenKvmLib import assoc > from XenKvmLib.test_doms import destroy_and_undefine_all > from XenKvmLib.classes import get_typed_class > from XenKvmLib import vxml > from CimTest import Globals > -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 XenKvmLib.common_util import print_field_error, check_sblim, get_host_info > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.enumclass import EnumInstances > -from XenKvmLib.const import default_network_name, default_pool_name > -from XenKvmLib.const import get_provider_version > - > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > test_dom = "domU" > bug_sblim = '00007' > libvirt_cim_ectp_changes = 680 > > -def pool_init(verify_list, pool_cn, pool_name, virt): > - ccn = get_typed_class(virt, pool_cn) > - instid = '%s/%s' %(pool_cn, pool_name) > - verify_list[ccn]= {'InstanceID' : instid } > - return verify_list > - > def init_vs_pool_values(server, virt): > - verify_ectp_list = { } > - hs_ccn = get_typed_class(virt, 'HostSystem') > - host = live.hostname(server) > - cs_fields = { > - 'CreationClassName' : hs_ccn, > - 'Name' : host > - } > + verify_ectp_list = {} > > - verify_ectp_list[hs_ccn] = cs_fields > + cn_names = ["VirtualSystemMigrationService", "ComputerSystem", "DiskPool", > + "NetworkPool", "ProcessorPool", "MemoryPool"] > > - cs_ccn = get_typed_class(virt, 'ComputerSystem') > - verify_ectp_list[cs_ccn] = cs_fields.copy() > - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn > - verify_ectp_list[cs_ccn]['Name'] = test_dom > + status, host_name, host_ccn = get_host_info(server, virt) > + if status != PASS: > + logger.error("Unable to get host system instance objects") > + return FAIL, verify_ectp_list > > - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') > - verify_ectp_list[vs_ccn] = cs_fields.copy() > - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn > - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn > - verify_ectp_list[vs_ccn]['SystemName'] = host > - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' > + #FIXME - get_host_info() should be updated to return the host instance > + insts = EnumInstances(server, host_ccn, True) > + if len(insts) < 1: > + logger.error("Expected 1 %s instance", host_ccn) > + return FAIL, verify_ectp_list > > - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', > - default_pool_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', > - default_network_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) > + verify_ectp_list[host_ccn] = insts > > - > - return verify_ectp_list > + for cn_base in cn_names: > + cn = get_typed_class(virt, cn_base) > + insts = EnumInstances(server, cn, True) > + > + if len(insts) < 1: > + logger.error("Expected at least 1 %s instance", cn) > + return FAIL, verify_ectp_list > > -def verify_fields(assoc_val, pllst_index, vs_pool_values): > + verify_ectp_list[cn] = insts > + > + return PASS, verify_ectp_list > + > +def verify_fields(assoc_val, managed_ele_values): > try: > - field_names = vs_pool_values[pllst_index].keys() > - values = vs_pool_values[pllst_index] > - for field in field_names: > - if values[field] != assoc_val[field]: > - print_field_error(field, assoc_val[field], values[field]) > - return FAIL > + cn = assoc_val.classname > + elements = managed_ele_values[cn] > + > + for ele in elements: > + if assoc_val.items() == ele.items(): > + managed_ele_values[cn].remove(ele) > + return PASS, managed_ele_values > + > except Exception, details: > - logger.error("Exception: In fn verify_fields() %s", details) > - return FAIL > + logger.error("verify_fields() exception: %s", details) > + return FAIL, managed_ele_values > > - return PASS > - > -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): > - try: > - pllst_index = assoc_info[0]['CreationClassName'] > - assoc_val = None > - if 'HostSystem' in pllst_index or \ > - 'VirtualSystemMigrationService' in pllst_index: > - if len(assoc_info) != 1: > - logger.error("'%s' returned '%d' records, expected 1", > - pllst_index, len(assoc_info)) > - return FAIL > - assoc_val = assoc_info[0] > - else: > - # For ComputerSystem info > - for inst in assoc_info: > - if inst['Name'] == test_dom: > - assoc_val = inst > - break > - except Exception, details: > - logger.error("Exception: In fn verify_cs_hs_mig_fields() %s", details) > - return FAIL > - > - if assoc_val == None: > - return FAIL > - > - return verify_fields(assoc_val, pllst_index, vs_pool_values) > + logger.error("%s not in expected list %s", assoc_val, elements) > + return FAIL, managed_ele_values > > def get_proflist(server, reg_classname, virt): > profiles_instid_list = [] > @@ -150,7 +115,7 @@ > len_prof_list = 7 > if len(proflist) < len_prof_list: > logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", > - reg_classname, len(proflist), 'Profile', len_prof_list) > + reg_classname, len(proflist), 'Profile', len_prof_list) > status = FAIL > > except Exception, detail: > @@ -164,51 +129,6 @@ > profiles_instid_list = [ profile.InstanceID for profile in proflist ] > > return status, profiles_instid_list > - > - > -def verify_ectp_assoc(server, virt): > - 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: > - return status > - > - verify_ectp_list = init_vs_pool_values(server, virt) > - for devid in inst_lst : > - logger.info("Verifying '%s' with '%s'", an, devid) > - try: > - assoc_info = assoc.Associators(server, > - an, > - reg_classname, > - InstanceID = devid) > - if len(assoc_info) < 1: > - 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: > - instid = assoc_info[0]['InstanceID'] > - index, other = instid.split("/") > - cn = get_typed_class(virt, index) > - status = verify_fields(assoc_info[0], cn, verify_ectp_list) > - else: > - ccn = assoc_info[0]['CreationClassName'] > - status = verify_cs_hs_mig_fields(assoc_info, verify_ectp_list) > - > - if status != PASS: > - break > - > - except Exception, detail: > - logger.error(CIM_ERROR_ASSOCIATORS, an) > - logger.error("Exception: %s" % detail) > - status = FAIL > - return status > > @do_main(sup_types) > def main(): > @@ -232,11 +152,54 @@ > logger.error('Unable to start domain %s' % test_dom) > return FAIL > > - > prev_namespace = Globals.CIM_NS > Globals.CIM_NS = 'root/interop' > > - status = verify_ectp_assoc(server, virt) > + reg_classname = get_typed_class(virt, "RegisteredProfile") > + an = get_typed_class(virt,"ElementConformsToProfile") > + > + status, prof_inst_lst = get_proflist(server, reg_classname, virt) > + if status != PASS: > + return status > We need to undefine and destroy the domain on FAIL and also the namespace should be set to prev_namespace. otherwise the test looks great. > + > + status, verify_ectp_list = init_vs_pool_values(server, virt) > + if status != PASS: > + Globals.CIM_NS = prev_namespace > + cxml.destroy(server) > + cxml.undefine(server) > + return status > + > + for prof_id in prof_inst_lst: > + logger.info("Verifying '%s' with '%s'", an, prof_id) > + try: > + assoc_info = assoc.Associators(server, > + an, > + reg_classname, > + InstanceID = prof_id) > + if len(assoc_info) < 1: > + 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 > + > + for inst in assoc_info: > + status, verify_ectp_list = verify_fields(inst, verify_ectp_list) > + if status != PASS: > + raise Exception("Failed to verify instance") > + > + except Exception, detail: > + logger.error("Exception: %s" % detail) > + status = FAIL > + > + if status == PASS: > + for k, l in verify_ectp_list.iteritems(): > + if len(l) != 0: > + logger.error("%s items weren't returned: %s", k, l) > + status = FAIL > > Globals.CIM_NS = prev_namespace > cxml.destroy(server) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From yunguol at cn.ibm.com Tue Nov 11 08:19:26 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 11 Nov 2008 00:19:26 -0800 Subject: [Libvirt-cim] [PATCH] [Test] Fix HostSystem/04_hs_to_EAPF.py for LXC Message-ID: <7a96dcf0331613028fc8.1226391566@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1226391560 28800 # Node ID 7a96dcf0331613028fc8e57db0ad50578683e742 # Parent 9d24629f17819c31889e22f22492e998760d1394 [Test] Fix HostSystem/04_hs_to_EAPF.py for LXC This tc only verify MemoryPool for LXC now, follow up patch is to verify each type of device pool for LXC Signed-off-by: Guolian Yun diff -r 9d24629f1781 -r 7a96dcf03316 suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Sun Nov 09 20:40:42 2008 -0800 +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py Tue Nov 11 00:19:20 2008 -0800 @@ -95,8 +95,13 @@ for p_inst in pool_assoc: CName = p_inst.classname InstID = p_inst['InstanceID'] - if exp_pllist[CName] == InstID: - in_pllist[CName] = InstID + if virt == 'LXC': + if CName == 'LXC_MemoryPool': + if exp_pllist[CName] == InstID: + in_pllist[CName] = InstID + else: + if exp_pllist[CName] == InstID: + in_pllist[CName] = InstID return in_pllist @@ -245,7 +250,10 @@ in_pllist = pool_init_list(virt, pool, net_name, default_pool_name) # One pool for each Device type, hence len should be 4 - exp_len = 4 + if virt == 'LXC': + exp_len = 1 + else: + exp_len = 4 status = check_len(an, in_pllist, qcn, exp_len) if status != PASS: vsxml.undefine(server) From yunguol at cn.ibm.com Tue Nov 11 08:32:12 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 11 Nov 2008 00:32:12 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]Fix VSSD/04_vssd_to_rasd.py for LXC Message-ID: # HG changeset patch # User Guolian Yun # Date 1226392309 28800 # Node ID a2c81c6533f2ba0b0409e42f82e697c2b0844ed0 # Parent 9d24629f17819c31889e22f22492e998760d1394 [TEST]Fix VSSD/04_vssd_to_rasd.py for LXC Signed-off-by: Guolian Yun diff -r 9d24629f1781 -r a2c81c6533f2 suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py --- a/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Sun Nov 09 20:40:42 2008 -0800 +++ b/suites/libvirt-cim/cimtest/VSSD/04_vssd_to_rasd.py Tue Nov 11 00:31:49 2008 -0800 @@ -210,6 +210,8 @@ virt = options.virt if virt == "Xen": test_disk = "xvda" + if virt == "LXC": + test_disk = "/tmp" else: test_disk = "hda" diff -r 9d24629f1781 -r a2c81c6533f2 suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Sun Nov 09 20:40:42 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Tue Nov 11 00:31:49 2008 -0800 @@ -61,6 +61,8 @@ try: disk_path = vsxml.xml_get_disk_source() + if virt == 'LXC': + disk_path = '/tmp/lxc_files' rasd_values = { proc_cn : { From deeptik at linux.vnet.ibm.com Tue Nov 11 08:38:35 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 11 Nov 2008 14:08:35 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: References: Message-ID: <4919448B.80606@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-11-10 14:35:33: > > > This will fail for F9 rpm. > > It fails because of different error code and desc for F9 rpm and F10. > With invalid_instid_keyvalue, it expected to return {'rc' : > pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine resource type'} > for F9, > but we expected to return {'rc' : pywbem.CIM_ERR_NOT_FOUND, 'desc' : > 'No such instance'} for F10. > > I have to add a revision branch here. Would you tell me how to get > the revision number? Yes this test need to be branched. You can use get_provider_version() to get he revision number. You can refer to 15_mod_system_settings.py tc for reference. Thanks and Regards, Deepti. > Thanks! > > > > > Regards, > > Deepti. > > > > yunguol at cn.ibm.com wrote: > > > # HG changeset patch > > > # User Guolian Yun > > > # Date 1226297098 28800 > > > # Node ID c85ded9735f60db2fc49475906e3611616a4a315 > > > # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 > > > [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py > > > > > > Signed-off-by: Guolian Yun > > > > > > diff -r 6591949e8afd -r c85ded9735f6 suites/libvirt- > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py > > > --- a/suites/libvirt- > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed Nov > > 05 22:03:48 2008 -0800 > > > +++ b/suites/libvirt- > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Sun Nov > > 09 22:04:58 2008 -0800 > > > @@ -40,9 +40,8 @@ > > > expr_values = { > > > "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, > > > 'desc' : 'Missing InstanceID'}, > > > - "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, > > > - 'desc' : 'Unable to determine\ > > > - resource type' }, > > > + "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > > > + 'desc' : 'No such instance'}, > > > } > > > > > > def err_invalid_instid_keyname(virt, conn, field): > > > > > > _______________________________________________ > > > 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 yunguol at cn.ibm.com Tue Nov 11 08:34:58 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 11 Nov 2008 16:34:58 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Nov 11 2008 Message-ID: ================================================= KVM on sfcb Test Run Summary for Nov 11 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: 738 Libvirt-cim changeset: 303adefbaf4a Cimtest revision: 488 Cimtest changeset: 9d24629f1781 ================================================= FAIL : 2 XFAIL : 2 SKIP : 4 PASS : 131 ----------------- Total : 139 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.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: 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 -------------------------------------------------------------------- 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 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.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 Nov 11 09:33:26 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 11 Nov 2008 17:33:26 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: <4919448B.80606@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-11 16:38:35: > > > Guo Lian Yun wrote: > > > > libvirt-cim-bounces at redhat.com wrote on 2008-11-10 14:35:33: > > > > > This will fail for F9 rpm. > > > > It fails because of different error code and desc for F9 rpm and F10. > > With invalid_instid_keyvalue, it expected to return {'rc' : > > pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine resource type'} > > for F9, > > but we expected to return {'rc' : pywbem.CIM_ERR_NOT_FOUND, 'desc' : > > 'No such instance'} for F10. > > > > I have to add a revision branch here. Would you tell me how to get > > the revision number? > Yes this test need to be branched. > You can use get_provider_version() to get he revision number. > You can refer to 15_mod_system_settings.py tc for reference. Deepti - Thanks for your relpy. When I try to get the changeset number for this patch, It seems that the expect error code number and desc are not changed yet, below is the part code for this case in Virt_SettingsDefineCapabilities.c with current src: ... if (type == CIM_RES_TYPE_UNKNOWN) { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Unable to determine resource type"); goto out; } ... > Thanks and Regards, > Deepti. > > Thanks! > > > > > > > > Regards, > > > Deepti. > > > > > > yunguol at cn.ibm.com wrote: > > > > # HG changeset patch > > > > # User Guolian Yun > > > > # Date 1226297098 28800 > > > > # Node ID c85ded9735f60db2fc49475906e3611616a4a315 > > > > # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 > > > > [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py > > > > > > > > Signed-off-by: Guolian Yun > > > > > > > > diff -r 6591949e8afd -r c85ded9735f6 suites/libvirt- > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py > > > > --- a/suites/libvirt- > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed Nov > > > 05 22:03:48 2008 -0800 > > > > +++ b/suites/libvirt- > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Sun Nov > > > 09 22:04:58 2008 -0800 > > > > @@ -40,9 +40,8 @@ > > > > expr_values = { > > > > "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, > > > > 'desc' : 'Missing InstanceID'}, > > > > - "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, > > > > - 'desc' : 'Unable to determine\ > > > > - resource type' }, > > > > + "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > > > > + 'desc' : 'No such instance'}, > > > > } > > > > > > > > def err_invalid_instid_keyname(virt, conn, field): > > > > > > > > _______________________________________________ > > > > 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 > > _______________________________________________ > 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 Nov 11 09:49:22 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 11 Nov 2008 15:19:22 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: References: Message-ID: <49195522.9020402@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-11-11 16:38:35: > > > > > > > Guo Lian Yun wrote: > > > > > > libvirt-cim-bounces at redhat.com wrote on 2008-11-10 14:35:33: > > > > > > > This will fail for F9 rpm. > > > > > > It fails because of different error code and desc for F9 rpm and > F10. > > > With invalid_instid_keyvalue, it expected to return {'rc' : > > > pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine resource type'} > > > for F9, > > > but we expected to return {'rc' : pywbem.CIM_ERR_NOT_FOUND, > 'desc' : > > > 'No such instance'} for F10. > > > > > > I have to add a revision branch here. Would you tell me how to get > > > the revision number? > > Yes this test need to be branched. > > You can use get_provider_version() to get he revision number. > > You can refer to 15_mod_system_settings.py tc for reference. > > Deepti - Thanks for your relpy. > When I try to get the changeset number for this patch, It seems that > the expect > error code number and desc are not changed yet, below is the part > code for > this case in Virt_SettingsDefineCapabilities.c with current src: > > ... > if (type == CIM_RES_TYPE_UNKNOWN) { > cu_statusf(_BROKER, &s, > CMPI_RC_ERR_FAILED, > "Unable to determine resource type"); > goto out; > } > ... Sorry I did not ask initially itself. Which CIMOM did use when comparing the return values. Do you use the same CIMOM on both F9 and F10 ? > > > Thanks and Regards, > > Deepti. > > > Thanks! > > > > > > > > > > > Regards, > > > > Deepti. > > > > > > > > yunguol at cn.ibm.com wrote: > > > > > # HG changeset patch > > > > > # User Guolian Yun > > > > > # Date 1226297098 28800 > > > > > # Node ID c85ded9735f60db2fc49475906e3611616a4a315 > > > > > # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 > > > > > [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py > > > > > > > > > > Signed-off-by: Guolian Yun > > > > > > > > > > diff -r 6591949e8afd -r c85ded9735f6 suites/libvirt- > > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py > > > > > --- a/suites/libvirt- > > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed Nov > > > > 05 22:03:48 2008 -0800 > > > > > +++ b/suites/libvirt- > > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Sun Nov > > > > 09 22:04:58 2008 -0800 > > > > > @@ -40,9 +40,8 @@ > > > > > expr_values = { > > > > > "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, > > > > > 'desc' : 'Missing InstanceID'}, > > > > > - "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, > > > > > - 'desc' : 'Unable to determine\ > > > > > - resource type' }, > > > > > + "invalid_instid_keyvalue" : { 'rc' : > pywbem.CIM_ERR_NOT_FOUND, > > > > > + 'desc' : 'No such instance'}, > > > > > } > > > > > > > > > > def err_invalid_instid_keyname(virt, conn, field): > > > > > > > > > > _______________________________________________ > > > > > 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 > > > > _______________________________________________ > > 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 Nov 11 09:53:21 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 11 Nov 2008 15:23:21 +0530 Subject: [Libvirt-cim] Xen on Pegasus Test Run Summary for Nov 11 2008 Message-ID: <49195611.2010902@linux.vnet.ibm.com> ================================================= Xen on Pegasus Test Run Summary for Nov 11 2008 ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) Kernel: 2.6.18-88.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 738 Libvirt-cim changeset: 303adefbaf4a Cimtest revision: 488 Cimtest changeset: 9d24629f1781 ================================================= FAIL : 5 XFAIL : 0 SKIP : 3 PASS : 131 ----------------- Total : 139 ================================================= FAIL Test Summary: SettingsDefineCapabilities - 03_forward_errs.py: FAIL VSSD - 02_bootldr.py: FAIL VirtualSystemManagementService - 15_mod_system_settings.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.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 -------------------------------------------------------------------- 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: FAIL ERROR - Exception : 'NoneType' object has no attribute 'ElementName' CIM_ERR_NOT_FOUND: No such instance (dom) -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: FAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error invoke method 'MigrateVirtualSystemToHost'. ERROR - (1, u'CIM_ERR_FAILED: Malformed HTTP response message.') ERROR - MigrateVirtualSystemToHost: unexpected list length 0 Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" InvokeMethod(MigrateVirtualSystemToHost): CIM_ERR_FAILED: Malformed HTTP response message. -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Error invoke method 'MigrateVirtualSystemToHost'. ERROR - (1, u'CIM_ERR_FAILED: Malformed HTTP response message.') ERROR - MigrateVirtualSystemToHost: unexpected list length 0 InvokeMethod(MigrateVirtualSystemToHost): CIM_ERR_FAILED: Malformed HTTP response message. -------------------------------------------------------------------- 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 Tue Nov 11 10:09:52 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 11 Nov 2008 15:39:52 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: <49195522.9020402@linux.vnet.ibm.com> References: <49195522.9020402@linux.vnet.ibm.com> Message-ID: <491959F0.9080802@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Guo Lian Yun wrote: >> >> libvirt-cim-bounces at redhat.com wrote on 2008-11-11 16:38:35: >> >> > >> > >> > Guo Lian Yun wrote: >> > > >> > > libvirt-cim-bounces at redhat.com wrote on 2008-11-10 14:35:33: >> > > >> > > > This will fail for F9 rpm. >> > > >> > > It fails because of different error code and desc for F9 rpm >> and F10. >> > > With invalid_instid_keyvalue, it expected to return {'rc' : >> > > pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine resource type'} >> > > for F9, >> > > but we expected to return {'rc' : pywbem.CIM_ERR_NOT_FOUND, >> 'desc' : >> > > 'No such instance'} for F10. >> > > >> > > I have to add a revision branch here. Would you tell me how to get >> > > the revision number? >> > Yes this test need to be branched. >> > You can use get_provider_version() to get he revision number. >> > You can refer to 15_mod_system_settings.py tc for reference. >> >> Deepti - Thanks for your relpy. >> When I try to get the changeset number for this patch, It seems >> that the expect >> error code number and desc are not changed yet, below is the part >> code for >> this case in Virt_SettingsDefineCapabilities.c with current src: >> >> ... >> if (type == CIM_RES_TYPE_UNKNOWN) { >> cu_statusf(_BROKER, &s, >> CMPI_RC_ERR_FAILED, >> "Unable to determine resource type"); >> goto out; >> } >> ... > Sorry I did not ask initially itself. > Which CIMOM did use when comparing the return values. > Do you use the same CIMOM on both F9 and F10 ? If the problem is with different CIMOM's returning different error information then we dont need to use get_provider_version(). It would be good idea to verify what CIMOM is there on the machine and check the error information accordingly instead of modifying and verifying the common information in the error description for pegasus and sfcb.This will be good in case where two error messages occurring because of different reasons are partly same, and hence avoid false positives. Any thoughts?? Thanks and Regards, Deepti. >> >> > Thanks and Regards, >> > Deepti. >> > > Thanks! >> > > >> > > > >> > > > Regards, >> > > > Deepti. >> > > > >> > > > yunguol at cn.ibm.com wrote: >> > > > > # HG changeset patch >> > > > > # User Guolian Yun >> > > > > # Date 1226297098 28800 >> > > > > # Node ID c85ded9735f60db2fc49475906e3611616a4a315 >> > > > > # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 >> > > > > [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py >> > > > > >> > > > > Signed-off-by: Guolian Yun >> > > > > >> > > > > diff -r 6591949e8afd -r c85ded9735f6 suites/libvirt- >> > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py >> > > > > --- a/suites/libvirt- >> > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed >> Nov >> > > > 05 22:03:48 2008 -0800 >> > > > > +++ b/suites/libvirt- >> > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Sun >> Nov >> > > > 09 22:04:58 2008 -0800 >> > > > > @@ -40,9 +40,8 @@ >> > > > > expr_values = { >> > > > > "invalid_instid_keyname" : { 'rc' : >> pywbem.CIM_ERR_FAILED, >> > > > > 'desc' : 'Missing >> InstanceID'}, >> > > > > - "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, >> > > > > - 'desc' : 'Unable to determine\ >> > > > > - resource type' }, >> > > > > + "invalid_instid_keyvalue" : { 'rc' : >> pywbem.CIM_ERR_NOT_FOUND, >> > > > > + 'desc' : 'No such instance'}, >> > > > > } >> > > > > >> > > > > def err_invalid_instid_keyname(virt, conn, field): >> > > > > >> > > > > _______________________________________________ >> > > > > 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 >> > >> > _______________________________________________ >> > 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 Nov 11 11:34:28 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 11 Nov 2008 17:04:28 +0530 Subject: [Libvirt-cim] Re: Xen on Pegasus Test Run Summary for Nov 11 2008 In-Reply-To: <49195611.2010902@linux.vnet.ibm.com> References: <49195611.2010902@linux.vnet.ibm.com> Message-ID: <49196DC4.50509@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > Xen on Pegasus Test Run Summary for Nov 11 2008 > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) > Kernel: 2.6.18-88.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.0 > Libvirt-cim revision: 738 > Libvirt-cim changeset: 303adefbaf4a > Cimtest revision: 488 > Cimtest changeset: 9d24629f1781 > ================================================= > FAIL : 5 > XFAIL : 0 > SKIP : 3 > PASS : 131 > ----------------- > Total : 139 > ================================================= > FAIL Test Summary: > SettingsDefineCapabilities - 03_forward_errs.py: FAIL > VSSD - 02_bootldr.py: FAIL > VirtualSystemManagementService - 15_mod_system_settings.py: FAIL > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL The above VirtualSystemMigrationService passed when the cimconfig -s forceProviderProcesses=false -p option was set, previously this was set to true. Thanks and Regards, Deepti. From danms at us.ibm.com Tue Nov 11 20:35:41 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 11 Nov 2008 12:35:41 -0800 Subject: [Libvirt-cim] [PATCH] Fix RASD provider unregistration In-Reply-To: <6f62d6165aa6f5b60156.1225928224@localhost.localdomain> (Kaitlin Rupert's message of "Wed, 05 Nov 2008 15:37:04 -0800") References: <6f62d6165aa6f5b60156.1225928224@localhost.localdomain> Message-ID: <87k5ba0zmq.fsf@caffeine.danplanet.com> KR> Since <>_ResourceAllocationSettingData is listed first in the mof, KR> it doesn't get properly unregistered because KR> <>_ProcResourceAllocationSettingData (etc) hasn't been KR> unregistered yet. Is this sfcb or Pegasus-related? KR> +# This definition is needed during provider unregistration KR> +RASD_MOF = schema/ResourceAllocationSettingData.mof KR> +RASD_REG = schema/ResourceAllocationSettingData.registration Perhaps we should call this "REREG_MOF" and "REREG_REG" or some such? We could potentially have this hit us in schema other than the RASDs. In fact, I think we probably should have had an intermediate class in most of our schema, where we have a Virt_Foo and inherit the LXC_, Xen_, KVM_, etc classes from that. If we move to that in the future, we'll have this problem everywhere. Maybe moving the intermediate abstract classes to their own MOF would be better than re-running the deregistration step? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Tue Nov 11 21:30:16 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 11 Nov 2008 13:30:16 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] (#2) Add input device support to device_parsing and Virt_Device In-Reply-To: (Kaitlin Rupert's message of "Sat, 08 Nov 2008 17:12:08 -0800") References: Message-ID: <87fxly0x3r.fsf@caffeine.danplanet.com> KR> +static int parse_input_device(xmlNode *node, struct virt_device **vdevs) KR> +{ KR> + struct virt_device *vdev = NULL; KR> + struct input_device *idev = NULL; KR> + char *id; KR> + int ret; KR> + KR> + vdev = calloc(1, sizeof(*vdev)); KR> + if (vdev == NULL) KR> + goto err; KR> + KR> + idev = &(vdev->dev.input); KR> + KR> + idev->type = get_attr_value(node, "type"); KR> + idev->bus = get_attr_value(node, "bus"); KR> + KR> + if ((idev->type == NULL) || (idev->bus == NULL)) KR> + goto err; KR> + KR> + vdev->type = CIM_RES_TYPE_INPUT; KR> + KR> + ret = asprintf(&id, "%s:%s", idev->type, idev->bus); KR> + if (ret == -1) { KR> + CU_DEBUG("Failed to create input id string"); KR> + free(id); KR> + goto err; KR> + } KR> + KR> + vdev->id = strdup(id); KR> + free(id); Just asprintf() into vdev->id instead of using the intermediate variable and two allocations. KR> +static int input_set_attr(CMPIInstance *instance, KR> + struct input_device *dev) KR> +{ KR> + uint16_t cim_type; KR> + KR> + if (STREQC(dev->type, "mouse")) KR> + cim_type = CIM_INPUT_MOUSE; KR> + else KR> + cim_type = CIM_INPUT_UNKNOWN; Does CIM not have a tablet device? If not, I think we can expose the tablet devices as mice as well. IIRC, virt-manager gives most domains a PS2 and USB tablet pointer device. The PS2 device is for compatibility and boot, and the tablet provides an absolute-movement pointer for more seamless host-to-guest cursor movement. I think it's worth exposing both. What do you think? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Tue Nov 11 21:31:31 2008 From: danms at us.ibm.com (Dan Smith) Date: Tue, 11 Nov 2008 13:31:31 -0800 Subject: [Libvirt-cim] [PATCH 4 of 5] Add support for input devices to Virt_RASD.c In-Reply-To: (Kaitlin Rupert's message of "Sat, 08 Nov 2008 17:12:10 -0800") References: Message-ID: <87bpwm0x1o.fsf@caffeine.danplanet.com> KR> There isn't much to the input device, so the only attributes that KR> get set are the ResourceType and the InstanceID. Since we're using a less-than-explicit ResourceType, perhaps we should set the ResourceSubType field to "mouse", "tablet", etc? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Nov 11 21:44:58 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Nov 2008 13:44:58 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: <4919388D.9090407@linux.vnet.ibm.com> References: <8d04c525d233623ba00f.1226349779@localhost.localdomain> <4919388D.9090407@linux.vnet.ibm.com> Message-ID: <4919FCDA.3030102@linux.vnet.ibm.com> >> >> import sys >> +from sets import Set >> > We dont require to import Set here. Oops! Yes, I was considering using the Set module, but then realized it wasn't needed. >> prev_namespace = Globals.CIM_NS >> Globals.CIM_NS = 'root/interop' >> >> - status = verify_ectp_assoc(server, virt) >> + reg_classname = get_typed_class(virt, "RegisteredProfile") >> + an = get_typed_class(virt,"ElementConformsToProfile") >> + >> + status, prof_inst_lst = get_proflist(server, reg_classname, virt) >> + if status != PASS: >> + return status >> > We need to undefine and destroy the domain on FAIL and also the > namespace should be set to prev_namespace. > otherwise the test looks great. Yes, definitely. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Nov 11 22:15:36 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Nov 2008 14:15:36 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ECTP 01_forward.py to support system with multiple networks defined Message-ID: <89135530d992a488e324.1226441736@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1226441701 28800 # Node ID 89135530d992a488e3240e5ae6418464cc3fd187 # Parent 9d24629f17819c31889e22f22492e998760d1394 [TEST] #3 Fix ECTP 01_forward.py to support system with multiple networks defined This test was doing a lot of unnecessary checking (and unessary building of lists). Instead, this test calls EnumInstances on each of the classes expected to be returned by the association. These instances are then compared against the list of instances returned by the ECTP association query. The FIXME will be fixed when bug 0007 is fixed. Updates from 2 to 3: -Place most of main block in a try/except. When a failure is encountered, an exception is raised, and the test is cleaned up properly. -If the provider is < 680, don't check the ECTP values for CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0 - ECTP doesn't support this provider version. Updates from 1 to 2: -Return from test case if init_vs_pool_values() returns a failure Signed-off-by: Kaitlin Rupert diff -r 9d24629f1781 -r 89135530d992 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Sun Nov 09 20:40:42 2008 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Nov 11 14:15:01 2008 -0800 @@ -23,10 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and -# the Classname are set appropriately for the results returned by the -# ElementConformsToProfile association for the RegisteredProfile class -# and ManagedElement Class +# This tc is used to verify the results of the ElementConformsToProfile +# association. This test focuses on RegisteredProfile -> ManagedElement # # "CIM:DSP1042-SystemVirtualization-1.0.0" , # "CIM:DSP1057-VirtualSystem-1.0.0a" @@ -45,98 +43,64 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml from CimTest import Globals -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 XenKvmLib.common_util import print_field_error, check_sblim, get_host_info +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.enumclass import EnumInstances -from XenKvmLib.const import default_network_name, default_pool_name -from XenKvmLib.const import get_provider_version - sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "domU" bug_sblim = '00007' libvirt_cim_ectp_changes = 680 -def pool_init(verify_list, pool_cn, pool_name, virt): - ccn = get_typed_class(virt, pool_cn) - instid = '%s/%s' %(pool_cn, pool_name) - verify_list[ccn]= {'InstanceID' : instid } - return verify_list - def init_vs_pool_values(server, virt): - verify_ectp_list = { } - hs_ccn = get_typed_class(virt, 'HostSystem') - host = live.hostname(server) - cs_fields = { - 'CreationClassName' : hs_ccn, - 'Name' : host - } + verify_ectp_list = {} - verify_ectp_list[hs_ccn] = cs_fields + cn_names = ["VirtualSystemMigrationService", "ComputerSystem", "DiskPool", + "NetworkPool", "ProcessorPool", "MemoryPool"] - cs_ccn = get_typed_class(virt, 'ComputerSystem') - verify_ectp_list[cs_ccn] = cs_fields.copy() - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn - verify_ectp_list[cs_ccn]['Name'] = test_dom + status, host_name, host_ccn = get_host_info(server, virt) + if status != PASS: + logger.error("Unable to get host system instance objects") + return FAIL, verify_ectp_list - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') - verify_ectp_list[vs_ccn] = cs_fields.copy() - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn - verify_ectp_list[vs_ccn]['SystemName'] = host - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' + #FIXME - get_host_info() should be updated to return the host instance + insts = EnumInstances(server, host_ccn, True) + if len(insts) < 1: + logger.error("Expected 1 %s instance", host_ccn) + return FAIL, verify_ectp_list - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', - default_pool_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', - default_network_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) + verify_ectp_list[host_ccn] = insts - - return verify_ectp_list + for cn_base in cn_names: + cn = get_typed_class(virt, cn_base) + insts = EnumInstances(server, cn, True) + + if len(insts) < 1: + logger.error("Expected at least 1 %s instance", cn) + return FAIL, verify_ectp_list -def verify_fields(assoc_val, pllst_index, vs_pool_values): + verify_ectp_list[cn] = insts + + return PASS, verify_ectp_list + +def verify_fields(assoc_val, managed_ele_values): try: - field_names = vs_pool_values[pllst_index].keys() - values = vs_pool_values[pllst_index] - for field in field_names: - if values[field] != assoc_val[field]: - print_field_error(field, assoc_val[field], values[field]) - return FAIL + cn = assoc_val.classname + elements = managed_ele_values[cn] + + for ele in elements: + if assoc_val.items() == ele.items(): + managed_ele_values[cn].remove(ele) + return PASS, managed_ele_values + except Exception, details: - logger.error("Exception: In fn verify_fields() %s", details) - return FAIL + logger.error("verify_fields() exception: %s", details) + return FAIL, managed_ele_values - return PASS - -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): - try: - pllst_index = assoc_info[0]['CreationClassName'] - assoc_val = None - if 'HostSystem' in pllst_index or \ - 'VirtualSystemMigrationService' in pllst_index: - if len(assoc_info) != 1: - logger.error("'%s' returned '%d' records, expected 1", - pllst_index, len(assoc_info)) - return FAIL - assoc_val = assoc_info[0] - else: - # For ComputerSystem info - for inst in assoc_info: - if inst['Name'] == test_dom: - assoc_val = inst - break - except Exception, details: - logger.error("Exception: In fn verify_cs_hs_mig_fields() %s", details) - return FAIL - - if assoc_val == None: - return FAIL - - return verify_fields(assoc_val, pllst_index, vs_pool_values) + logger.error("%s not in expected list %s", assoc_val, elements) + return FAIL, managed_ele_values def get_proflist(server, reg_classname, virt): profiles_instid_list = [] @@ -150,7 +114,7 @@ len_prof_list = 7 if len(proflist) < len_prof_list: logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", - reg_classname, len(proflist), 'Profile', len_prof_list) + reg_classname, len(proflist), 'Profile', len_prof_list) status = FAIL except Exception, detail: @@ -165,58 +129,13 @@ return status, profiles_instid_list - -def verify_ectp_assoc(server, virt): - 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: - return status - - verify_ectp_list = init_vs_pool_values(server, virt) - for devid in inst_lst : - logger.info("Verifying '%s' with '%s'", an, devid) - try: - assoc_info = assoc.Associators(server, - an, - reg_classname, - InstanceID = devid) - if len(assoc_info) < 1: - 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: - instid = assoc_info[0]['InstanceID'] - index, other = instid.split("/") - cn = get_typed_class(virt, index) - status = verify_fields(assoc_info[0], cn, verify_ectp_list) - else: - ccn = assoc_info[0]['CreationClassName'] - status = verify_cs_hs_mig_fields(assoc_info, verify_ectp_list) - - if status != PASS: - break - - except Exception, detail: - logger.error(CIM_ERROR_ASSOCIATORS, an) - logger.error("Exception: %s" % detail) - status = FAIL - return status - @do_main(sup_types) def main(): options = main.options server = options.ip virt = options.virt - status = PASS + status = None destroy_and_undefine_all(options.ip, options.virt) virt_xml = vxml.get_class(options.virt) @@ -232,11 +151,59 @@ logger.error('Unable to start domain %s' % test_dom) return FAIL - prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' - status = verify_ectp_assoc(server, virt) + try: + reg_classname = get_typed_class(virt, "RegisteredProfile") + an = get_typed_class(virt,"ElementConformsToProfile") + + status, prof_inst_lst = get_proflist(server, reg_classname, virt) + if status != PASS: + raise Exception("Failed to get profile list") + + status, verify_ectp_list = init_vs_pool_values(server, virt) + if status != PASS: + raise Exception("Failed to get instances needed for verification") + + curr_cim_rev, changeset = get_provider_version(virt, server) + + for prof_id in prof_inst_lst: + logger.info("Verifying '%s' with '%s'", an, prof_id) + assoc_info = assoc.Associators(server, + an, + reg_classname, + InstanceID = prof_id) + + if curr_cim_rev < libvirt_cim_ectp_changes and \ + prof_id.find("GenericDeviceResourceVirtualization"): + continue + + if len(assoc_info) < 1: + 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 + + for inst in assoc_info: + status, verify_ectp_list = verify_fields(inst, verify_ectp_list) + if status != PASS: + raise Exception("Failed to verify instance") + + if status == PASS: + for k, l in verify_ectp_list.iteritems(): + if len(l) != 0: + raise Exception("%s items weren't returned: %s", k, l) + status = FAIL + + except Exception, detail: + logger.error("Exception: %s" % detail) + if status == None: + status = FAIL Globals.CIM_NS = prev_namespace cxml.destroy(server) From kaitlin at linux.vnet.ibm.com Tue Nov 11 23:02:04 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Nov 2008 15:02:04 -0800 Subject: [Libvirt-cim] [PATCH] Fix RASD provider unregistration In-Reply-To: <87k5ba0zmq.fsf@caffeine.danplanet.com> References: <6f62d6165aa6f5b60156.1225928224@localhost.localdomain> <87k5ba0zmq.fsf@caffeine.danplanet.com> Message-ID: <491A0EEC.10303@linux.vnet.ibm.com> Dan Smith wrote: > KR> Since <>_ResourceAllocationSettingData is listed first in the mof, > KR> it doesn't get properly unregistered because > KR> <>_ProcResourceAllocationSettingData (etc) hasn't been > KR> unregistered yet. > > Is this sfcb or Pegasus-related? Pegasus. > > KR> +# This definition is needed during provider unregistration > KR> +RASD_MOF = schema/ResourceAllocationSettingData.mof > KR> +RASD_REG = schema/ResourceAllocationSettingData.registration > > Perhaps we should call this "REREG_MOF" and "REREG_REG" or some such? > We could potentially have this hit us in schema other than the RASDs. True.. although, REREG sounds misleading here.. we're no reregistering the MOF. The intention here is to unregister the classes that couldn't be unregistered until their children are unregistered. > > In fact, I think we probably should have had an intermediate class in > most of our schema, where we have a Virt_Foo and inherit the LXC_, > Xen_, KVM_, etc classes from that. If we move to that in the future, > we'll have this problem everywhere. > > Maybe moving the intermediate abstract classes to their own MOF would > be better than re-running the deregistration step? > That's a good idea, although you still have the problem of order. The intermediate abstract class needs to be first in the list (so that is is registered before its subclasses). When you unregister, the subclass MOF need to be in list before the intermediate abstract class MOF. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Nov 11 23:22:25 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Nov 2008 15:22:25 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] (#2) Add input device support to device_parsing and Virt_Device In-Reply-To: <87fxly0x3r.fsf@caffeine.danplanet.com> References: <87fxly0x3r.fsf@caffeine.danplanet.com> Message-ID: <491A13B1.9000408@linux.vnet.ibm.com> > KR> + > KR> + vdev->id = strdup(id); > KR> + free(id); > > Just asprintf() into vdev->id instead of using the intermediate > variable and two allocations. Good call. > > KR> +static int input_set_attr(CMPIInstance *instance, > KR> + struct input_device *dev) > KR> +{ > KR> + uint16_t cim_type; > KR> + > KR> + if (STREQC(dev->type, "mouse")) > KR> + cim_type = CIM_INPUT_MOUSE; > KR> + else > KR> + cim_type = CIM_INPUT_UNKNOWN; > > Does CIM not have a tablet device? If not, I think we can expose the > tablet devices as mice as well. IIRC, virt-manager gives most domains > a PS2 and USB tablet pointer device. The PS2 device is for > compatibility and boot, and the tablet provides an absolute-movement > pointer for more seamless host-to-guest cursor movement. I think it's > worth exposing both. What do you think? > I don't see anything more specific than "PointingDevice." I think this is supposed to cover all mice, etc. These patches do return instances for tablet devices, but the type isn't set to mouse. I went back and added tablet support after first getting the mouse support to work, and I never changed this to also set tablet devices properly. The devices are returned as: localhost:5988/root/virt:KVM_PointingDevice.CreationClassName="KVM_PointingDevice",DeviceID="demo2/mouse:usb",SystemCreationClassName="KVM_ComputerSystem",SystemName="demo2" localhost:5988/root/virt:KVM_PointingDevice.CreationClassName="KVM_PointingDevice",DeviceID="demo2/tablet:usb",SystemCreationClassName="KVM_ComputerSystem",SystemName="demo2" localhost:5988/root/virt:KVM_PointingDevice.CreationClassName="KVM_PointingDevice",DeviceID="demo2/mouse:ps2",SystemCreationClassName="KVM_ComputerSystem",SystemName="demo2" -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Nov 11 23:25:25 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 11 Nov 2008 15:25:25 -0800 Subject: [Libvirt-cim] [PATCH 4 of 5] Add support for input devices to Virt_RASD.c In-Reply-To: <87bpwm0x1o.fsf@caffeine.danplanet.com> References: <87bpwm0x1o.fsf@caffeine.danplanet.com> Message-ID: <491A1465.4000409@linux.vnet.ibm.com> Dan Smith wrote: > KR> There isn't much to the input device, so the only attributes that > KR> get set are the ResourceType and the InstanceID. > > Since we're using a less-than-explicit ResourceType, perhaps we should > set the ResourceSubType field to "mouse", "tablet", etc? > Yeah, that's a good idea. I was also trying to figure out where to fit the bus type. For the template RASDs, we might want to expose 3 possibilities: PS2 mice, USB mice, and USB tablet. Or else, the provider can just set mice as PS2 and tablets as USB. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Wed Nov 12 01:55:40 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 12 Nov 2008 09:55:40 +0800 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Nov 12 2008 Message-ID: ================================================= KVM on Pegasus Test Run Summary for Nov 12 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: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 490 Cimtest changeset: 8d6f2db22eda ================================================= FAIL : 3 XFAIL : 2 SKIP : 8 PASS : 126 ----------------- Total : 139 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemManagementService - 15_mod_system_settings.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 RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.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: FAIL ERROR - 'KVM_ElementConformsToProfile' returned (0) 'KVM_RegisteredProfile' objects CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: 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 `VirtualDevice' property ERROR - Unable to define rstest_disk_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualDevice' property -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: FAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 -------------------------------------------------------------------- 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 Nov 12 02:27:22 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 12 Nov 2008 10:27:22 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: <491959F0.9080802@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-11 18:09:52: > > > Deepti B Kalakeri wrote: > > > > > > Guo Lian Yun wrote: > >> > >> libvirt-cim-bounces at redhat.com wrote on 2008-11-11 16:38:35: > >> > >> > > >> > > >> > Guo Lian Yun wrote: > >> > > > >> > > libvirt-cim-bounces at redhat.com wrote on 2008-11-10 14:35:33: > >> > > > >> > > > This will fail for F9 rpm. > >> > > > >> > > It fails because of different error code and desc for F9 rpm > >> and F10. > >> > > With invalid_instid_keyvalue, it expected to return {'rc' : > >> > > pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine resource type'} > >> > > for F9, > >> > > but we expected to return {'rc' : pywbem.CIM_ERR_NOT_FOUND, > >> 'desc' : > >> > > 'No such instance'} for F10. > >> > > > >> > > I have to add a revision branch here. Would you tell me how to get > >> > > the revision number? > >> > Yes this test need to be branched. > >> > You can use get_provider_version() to get he revision number. > >> > You can refer to 15_mod_system_settings.py tc for reference. > >> > >> Deepti - Thanks for your relpy. > >> When I try to get the changeset number for this patch, It seems > >> that the expect > >> error code number and desc are not changed yet, below is the part > >> code for > >> this case in Virt_SettingsDefineCapabilities.c with current src: > >> > >> ... > >> if (type == CIM_RES_TYPE_UNKNOWN) { > >> cu_statusf(_BROKER, &s, > >> CMPI_RC_ERR_FAILED, > >> "Unable to determine resource type"); > >> goto out; > >> } > >> ... > > Sorry I did not ask initially itself. > > Which CIMOM did use when comparing the return values. > > Do you use the same CIMOM on both F9 and F10 ? > If the problem is with different CIMOM's returning different error > information then we dont need to use get_provider_version(). > It would be good idea to verify what CIMOM is there on the machine and > check the error information accordingly instead of modifying and > verifying the common information in the error description for pegasus > and sfcb.This will be good in case where two error messages occurring > because of different reasons are partly same, and hence avoid false > positives. This tc return both different error code and descriptions for sfcb and pegasus. It seems that somebody says it isn't a good idea to check the cimom type in tc. I'm not sure if we can deal with this by other ways. Thanks! > Any thoughts?? > > Thanks and Regards, > Deepti. > >> > >> > Thanks and Regards, > >> > Deepti. > >> > > Thanks! > >> > > > >> > > > > >> > > > Regards, > >> > > > Deepti. > >> > > > > >> > > > yunguol at cn.ibm.com wrote: > >> > > > > # HG changeset patch > >> > > > > # User Guolian Yun > >> > > > > # Date 1226297098 28800 > >> > > > > # Node ID c85ded9735f60db2fc49475906e3611616a4a315 > >> > > > > # Parent 6591949e8afdddce6aa72022e33f0ce063ec60a1 > >> > > > > [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py > >> > > > > > >> > > > > Signed-off-by: Guolian Yun > >> > > > > > >> > > > > diff -r 6591949e8afd -r c85ded9735f6 suites/libvirt- > >> > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py > >> > > > > --- a/suites/libvirt- > >> > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Wed > >> Nov > >> > > > 05 22:03:48 2008 -0800 > >> > > > > +++ b/suites/libvirt- > >> > > > cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Sun > >> Nov > >> > > > 09 22:04:58 2008 -0800 > >> > > > > @@ -40,9 +40,8 @@ > >> > > > > expr_values = { > >> > > > > "invalid_instid_keyname" : { 'rc' : > >> pywbem.CIM_ERR_FAILED, > >> > > > > 'desc' : 'Missing > >> InstanceID'}, > >> > > > > - "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, > >> > > > > - 'desc' : 'Unable to determine\ > >> > > > > - resource type' }, > >> > > > > + "invalid_instid_keyvalue" : { 'rc' : > >> pywbem.CIM_ERR_NOT_FOUND, > >> > > > > + 'desc' : 'No such instance'}, > >> > > > > } > >> > > > > > >> > > > > def err_invalid_instid_keyname(virt, conn, field): > >> > > > > > >> > > > > _______________________________________________ > >> > > > > 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 > >> > > >> > _______________________________________________ > >> > 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 Nov 12 03:01:35 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 11 Nov 2008 19:01:35 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC Message-ID: # HG changeset patch # User Guolian Yun # Date 1226458889 28800 # Node ID d97222cfb717a382136108c319dee64cc2466716 # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC Signed-off-by: Guolian Yun diff -r 8d6f2db22eda -r d97222cfb717 suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue Nov 11 00:19:20 2008 -0800 +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue Nov 11 19:01:29 2008 -0800 @@ -75,6 +75,8 @@ global test_disk if virt == "Xen": test_disk = "xvda" + if virt == "LXC": + test_disk = "/tmp" else: test_disk = "hda" virt_xml = get_class(virt) From fujimura.toshifumi at np.css.fujitsu.com Wed Nov 12 09:38:18 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Wed, 12 Nov 2008 18:38:18 +0900 Subject: [Libvirt-cim] Questions about Libvirt-CIM classes and Cimtest items Message-ID: <491AA40A.8000707@np.css.fujitsu.com> Hi, I make a simple comparison CIM classes list between Libvirt-CIM, Cimtest and DSP10xx specifications. (See Summary_number_of_classes.ods) According to this summary, I come up with two questions. I would appreciate if you answer the questions. (1)If Libvirt-CIM fills CIM Schema specifications, it needs to add more 11 classes(*1). (2)If Cimtest fills both Libvirt-CIM classes and CIM Schema specifications, it needs to add more about 100 test items(*2). What do you think? *1:See red cells in ods file. *2:See red and yellow cells in ods files. There are 5 test items a Cimtest class on average. 5(items/class) * (14+11)(classes) = 100(items) -- Toshifumi Fujimura. -------------- next part -------------- A non-text attachment was scrubbed... Name: Summary_number_of_classes.ods Type: application/vnd.oasis.opendocument.spreadsheet Size: 13279 bytes Desc: not available URL: From fujimura.toshifumi at np.css.fujitsu.com Wed Nov 12 09:57:48 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Wed, 12 Nov 2008 18:57:48 +0900 Subject: [Libvirt-cim] Questions about Libvirt-CIM classes and Cimtest items In-Reply-To: <491AA40A.8000707@np.css.fujitsu.com> References: <491AA40A.8000707@np.css.fujitsu.com> Message-ID: <491AA89C.4070908@np.css.fujitsu.com> Sorry, "Summary_number_of_classes.ods" is "OpenOffice.org Calc" file. -- Toshifumi Fujimura. From deeptik at linux.vnet.ibm.com Wed Nov 12 11:14:49 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 12 Nov 2008 16:44:49 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC In-Reply-To: References: Message-ID: <491ABAA9.10407@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1226458889 28800 > # Node ID d97222cfb717a382136108c319dee64cc2466716 > # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 > [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC > > Signed-off-by: Guolian Yun > > diff -r 8d6f2db22eda -r d97222cfb717 suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py > --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue Nov 11 00:19:20 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd.py Tue Nov 11 19:01:29 2008 -0800 > @@ -75,6 +75,8 @@ > global test_disk > if virt == "Xen": > test_disk = "xvda" > + if virt == "LXC": > + test_disk = "/tmp" > else: > test_disk = "hda" > virt_xml = get_class(virt) > This tc fails with the following error for LXC: -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: FAIL ERROR - DEBUG an is LXC_HostedDependency, cn is LXC_HostSystem, qcn is LXC_ComputerSystem ERROR - Failed to get associators information for LXC_SettingsDefineState ERROR - Exception: u'LXC_DisplayController' Class not found -------------------------------------------------------------------- > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Wed Nov 12 12:31:28 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 12 Nov 2008 18:01:28 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: <89135530d992a488e324.1226441736@localhost.localdomain> References: <89135530d992a488e324.1226441736@localhost.localdomain> Message-ID: <491ACCA0.4020701@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1226441701 28800 > # Node ID 89135530d992a488e3240e5ae6418464cc3fd187 > # Parent 9d24629f17819c31889e22f22492e998760d1394 > [TEST] #3 Fix ECTP 01_forward.py to support system with multiple networks defined > > This test was doing a lot of unnecessary checking (and unessary building of > lists). Instead, this test calls EnumInstances on each of the classes expected > to be returned by the association. > > These instances are then compared against the list of instances returned by the ECTP association query. > > The FIXME will be fixed when bug 0007 is fixed. > > Updates from 2 to 3: > -Place most of main block in a try/except. When a failure is encountered, > an exception is raised, and the test is cleaned up properly. > -If the provider is < 680, don't check the ECTP values for > CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0 - ECTP doesn't support > this provider version. > > Updates from 1 to 2: > -Return from test case if init_vs_pool_values() returns a failure > > Signed-off-by: Kaitlin Rupert > > diff -r 9d24629f1781 -r 89135530d992 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Sun Nov 09 20:40:42 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Nov 11 14:15:01 2008 -0800 > @@ -23,10 +23,8 @@ > # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > # > > -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and > -# the Classname are set appropriately for the results returned by the > -# ElementConformsToProfile association for the RegisteredProfile class > -# and ManagedElement Class > +# This tc is used to verify the results of the ElementConformsToProfile > +# association. This test focuses on RegisteredProfile -> ManagedElement > # > # "CIM:DSP1042-SystemVirtualization-1.0.0" , > # "CIM:DSP1057-VirtualSystem-1.0.0a" > @@ -45,98 +43,64 @@ > from XenKvmLib.classes import get_typed_class > from XenKvmLib import vxml > from CimTest import Globals > -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 XenKvmLib.common_util import print_field_error, check_sblim, get_host_info > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.enumclass import EnumInstances > -from XenKvmLib.const import default_network_name, default_pool_name > -from XenKvmLib.const import get_provider_version > - > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > test_dom = "domU" > bug_sblim = '00007' > libvirt_cim_ectp_changes = 680 > > -def pool_init(verify_list, pool_cn, pool_name, virt): > - ccn = get_typed_class(virt, pool_cn) > - instid = '%s/%s' %(pool_cn, pool_name) > - verify_list[ccn]= {'InstanceID' : instid } > - return verify_list > - > def init_vs_pool_values(server, virt): > - verify_ectp_list = { } > - hs_ccn = get_typed_class(virt, 'HostSystem') > - host = live.hostname(server) > - cs_fields = { > - 'CreationClassName' : hs_ccn, > - 'Name' : host > - } > + verify_ectp_list = {} > > - verify_ectp_list[hs_ccn] = cs_fields > + cn_names = ["VirtualSystemMigrationService", "ComputerSystem", "DiskPool", > + "NetworkPool", "ProcessorPool", "MemoryPool"] > We Can omit the inclusion of "DiskPool","NetworkPool", "ProcessorPool" for libvirt-cim < 680. Otherwise the test will fail when we check for the list for the values after the checks for the values returned from the association is made. > - cs_ccn = get_typed_class(virt, 'ComputerSystem') > - verify_ectp_list[cs_ccn] = cs_fields.copy() > - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn > - verify_ectp_list[cs_ccn]['Name'] = test_dom > + status, host_name, host_ccn = get_host_info(server, virt) > + if status != PASS: > + logger.error("Unable to get host system instance objects") > + return FAIL, verify_ectp_list > > - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') > - verify_ectp_list[vs_ccn] = cs_fields.copy() > - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn > - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn > - verify_ectp_list[vs_ccn]['SystemName'] = host > - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' > + #FIXME - get_host_info() should be updated to return the host instance > + insts = EnumInstances(server, host_ccn, True) > + if len(insts) < 1: > + logger.error("Expected 1 %s instance", host_ccn) > + return FAIL, verify_ectp_list > > - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', > - default_pool_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', > - default_network_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) > + verify_ectp_list[host_ccn] = insts > > - > - return verify_ectp_list > + for cn_base in cn_names: > + cn = get_typed_class(virt, cn_base) > + insts = EnumInstances(server, cn, True) > + > + if len(insts) < 1: > + logger.error("Expected at least 1 %s instance", cn) > + return FAIL, verify_ectp_list > > -def verify_fields(assoc_val, pllst_index, vs_pool_values): > + verify_ectp_list[cn] = insts > + > + return PASS, verify_ectp_list > + > +def verify_fields(assoc_val, managed_ele_values): > try: > - field_names = vs_pool_values[pllst_index].keys() > - values = vs_pool_values[pllst_index] > - for field in field_names: > - if values[field] != assoc_val[field]: > - print_field_error(field, assoc_val[field], values[field]) > - return FAIL > + cn = assoc_val.classname > + elements = managed_ele_values[cn] > + > + for ele in elements: > + if assoc_val.items() == ele.items(): > + managed_ele_values[cn].remove(ele) > + return PASS, managed_ele_values > + > except Exception, details: > - logger.error("Exception: In fn verify_fields() %s", details) > - return FAIL > + logger.error("verify_fields() exception: %s", details) > + return FAIL, managed_ele_values > > - return PASS > - > -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): > - try: > - pllst_index = assoc_info[0]['CreationClassName'] > - assoc_val = None > - if 'HostSystem' in pllst_index or \ > - 'VirtualSystemMigrationService' in pllst_index: > - if len(assoc_info) != 1: > - logger.error("'%s' returned '%d' records, expected 1", > - pllst_index, len(assoc_info)) > - return FAIL > - assoc_val = assoc_info[0] > - else: > - # For ComputerSystem info > - for inst in assoc_info: > - if inst['Name'] == test_dom: > - assoc_val = inst > - break > - except Exception, details: > - logger.error("Exception: In fn verify_cs_hs_mig_fields() %s", details) > - return FAIL > - > - if assoc_val == None: > - return FAIL > - > - return verify_fields(assoc_val, pllst_index, vs_pool_values) > + logger.error("%s not in expected list %s", assoc_val, elements) > + return FAIL, managed_ele_values > > def get_proflist(server, reg_classname, virt): > profiles_instid_list = [] > @@ -150,7 +114,7 @@ > len_prof_list = 7 > if len(proflist) < len_prof_list: > logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", > - reg_classname, len(proflist), 'Profile', len_prof_list) > + reg_classname, len(proflist), 'Profile', len_prof_list) > status = FAIL > > except Exception, detail: > @@ -165,58 +129,13 @@ > > return status, profiles_instid_list > > - > -def verify_ectp_assoc(server, virt): > - 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: > - return status > - > - verify_ectp_list = init_vs_pool_values(server, virt) > - for devid in inst_lst : > - logger.info("Verifying '%s' with '%s'", an, devid) > - try: > - assoc_info = assoc.Associators(server, > - an, > - reg_classname, > - InstanceID = devid) > - if len(assoc_info) < 1: > - 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: > - instid = assoc_info[0]['InstanceID'] > - index, other = instid.split("/") > - cn = get_typed_class(virt, index) > - status = verify_fields(assoc_info[0], cn, verify_ectp_list) > - else: > - ccn = assoc_info[0]['CreationClassName'] > - status = verify_cs_hs_mig_fields(assoc_info, verify_ectp_list) > - > - if status != PASS: > - break > - > - except Exception, detail: > - logger.error(CIM_ERROR_ASSOCIATORS, an) > - logger.error("Exception: %s" % detail) > - status = FAIL > - return status > - > @do_main(sup_types) > def main(): > options = main.options > server = options.ip > virt = options.virt > > - status = PASS > + status = None > destroy_and_undefine_all(options.ip, options.virt) > > virt_xml = vxml.get_class(options.virt) > @@ -232,11 +151,59 @@ > logger.error('Unable to start domain %s' % test_dom) > return FAIL > > - > prev_namespace = Globals.CIM_NS > Globals.CIM_NS = 'root/interop' > > - status = verify_ectp_assoc(server, virt) > + try: > + reg_classname = get_typed_class(virt, "RegisteredProfile") > + an = get_typed_class(virt,"ElementConformsToProfile") > + > + status, prof_inst_lst = get_proflist(server, reg_classname, virt) > + if status != PASS: > + raise Exception("Failed to get profile list") > + > + status, verify_ectp_list = init_vs_pool_values(server, virt) > + if status != PASS: > + raise Exception("Failed to get instances needed for verification") > + > + curr_cim_rev, changeset = get_provider_version(virt, server) > + > + for prof_id in prof_inst_lst: > + logger.info("Verifying '%s' with '%s'", an, prof_id) > + assoc_info = assoc.Associators(server, > + an, > + reg_classname, > + InstanceID = prof_id) > + > + if curr_cim_rev < libvirt_cim_ectp_changes and \ > + prof_id.find("GenericDeviceResourceVirtualization"): > + continue > + > + if len(assoc_info) < 1: > + 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 > + > + for inst in assoc_info: > + status, verify_ectp_list = verify_fields(inst, verify_ectp_list) > + if status != PASS: > + raise Exception("Failed to verify instance") > + > + if status == PASS: > + for k, l in verify_ectp_list.iteritems(): > + if len(l) != 0: > + raise Exception("%s items weren't returned: %s", k, l) > The above Exception should be : raise Exception("%s items weren't returned: %s" %( k, l)) otherwise, the exception statement is will be printed as follow: Exception: ("%s items weren't returned: %s", 'Xen_ProcessorPool', [CIMInstance(classname=u'Xen_ProcessorPool', ...)]) > + status = FAIL > This tc gives a false positive with libvirt-cim version < 680 . The status = FAIL should come before the raise exception. After moving the status= FAIL before the raise statement the tc fails with the following error: ERROR - Exception: ("%s items weren't returned: %s", 'Xen_ProcessorPool', [CIMInstance(classname=u'Xen_ProcessorPool', ...)]) Thanks and Regards, Deepti. > + > + except Exception, detail: > + logger.error("Exception: %s" % detail) > + if status == None: > + status = FAIL > > Globals.CIM_NS = prev_namespace > cxml.destroy(server) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From danms at us.ibm.com Wed Nov 12 16:42:51 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Nov 2008 08:42:51 -0800 Subject: [Libvirt-cim] [PATCH] Fix RASD provider unregistration In-Reply-To: <491A0EEC.10303@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Tue, 11 Nov 2008 15:02:04 -0800") References: <6f62d6165aa6f5b60156.1225928224@localhost.localdomain> <87k5ba0zmq.fsf@caffeine.danplanet.com> <491A0EEC.10303@linux.vnet.ibm.com> Message-ID: <873ahw28vo.fsf@caffeine.danplanet.com> KR> That's a good idea, although you still have the problem of order. The KR> intermediate abstract class needs to be first in the list (so that is KR> is registered before its subclasses). It's probably a good idea to unregister the classes in the opposite order anyway, don't you think? That way if you have dependencies that you have to maintain, you can do that in the list. If we modify provider_register.sh to reverse the list if we're doing a de-register, then it should be good, right? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Wed Nov 12 16:44:13 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Nov 2008 08:44:13 -0800 Subject: [Libvirt-cim] [PATCH 4 of 5] Add support for input devices to Virt_RASD.c In-Reply-To: <491A1465.4000409@linux.vnet.ibm.com> (Kaitlin Rupert's message of "Tue, 11 Nov 2008 15:25:25 -0800") References: <87bpwm0x1o.fsf@caffeine.danplanet.com> <491A1465.4000409@linux.vnet.ibm.com> Message-ID: <87y6zozyg2.fsf@caffeine.danplanet.com> KR> For the template RASDs, we might want to expose 3 possibilities: PS2 KR> mice, USB mice, and USB tablet. Or else, the provider can just set KR> mice as PS2 and tablets as USB. Sounds like a good idea to me. Perhaps a special 'Caption' field for those to make it explicit which is which would help. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 12 17:08:12 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 09:08:12 -0800 Subject: [Libvirt-cim] [PATCH] Fix RASD provider unregistration In-Reply-To: <873ahw28vo.fsf@caffeine.danplanet.com> References: <6f62d6165aa6f5b60156.1225928224@localhost.localdomain> <87k5ba0zmq.fsf@caffeine.danplanet.com> <491A0EEC.10303@linux.vnet.ibm.com> <873ahw28vo.fsf@caffeine.danplanet.com> Message-ID: <491B0D7C.2020904@linux.vnet.ibm.com> Dan Smith wrote: > KR> That's a good idea, although you still have the problem of order. The > KR> intermediate abstract class needs to be first in the list (so that is > KR> is registered before its subclasses). > > It's probably a good idea to unregister the classes in the opposite > order anyway, don't you think? That way if you have dependencies that > you have to maintain, you can do that in the list. If we modify > provider_register.sh to reverse the list if we're doing a de-register, > then it should be good, right? > Yeah, that'd work. Good idea =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From richardm at br.ibm.com Wed Nov 12 17:53:09 2008 From: richardm at br.ibm.com (Richard Maciel) Date: Wed, 12 Nov 2008 15:53:09 -0200 Subject: [Libvirt-cim] [PATCH] [CU] Commented some structures in the std_association.h file Message-ID: # HG changeset patch # User Richard Maciel # Date 1226511618 7200 # Node ID a0bfb9da65f0ae911dbd7d18936d0a5fdcd63345 # Parent 5fbf96fedcf7df32fccc3f989aa4520af8c9a264 [CU] Commented some structures in the std_association.h file * Commented the assoc_handler_t, make_ref_t types and the std_assoc, std_assoc_info structures to make easier for newbies to learn how to create new associations. Signed-off-by: Richard Maciel diff -r 5fbf96fedcf7 -r a0bfb9da65f0 std_association.h --- a/std_association.h Wed Oct 08 10:32:18 2008 -0700 +++ b/std_association.h Wed Nov 12 15:40:18 2008 -0200 @@ -27,15 +27,68 @@ struct std_assoc; struct std_assoc_info; +/* + * This type defines the signature of the association handler function. The + * handler function receives the reference of the source class of the + * association and must map it to a list of CMPIInstance objects (targets + * of the association). + * + * In parameters: + * CMPIObjectPath * - Path to the source class + * struct std_assoc_info * - See std_assoc_info comment + * + * Out parameters: + * struct inst_list * - Instances associated to ref + */ typedef CMPIStatus (*assoc_handler_t)(const CMPIObjectPath *ref, struct std_assoc_info *info, struct inst_list *list); +/* + * This type defines the signature of the handler which creates the + * reference. The handler function receives the source object path, + * and the target instance, so it can create the reference which is returned + * by the function. + * + * In parameters: + * CMPIObjectPath * - Path to the source class + * CMPIInstance * - Target instance + * std_assoc_info - Information from the query that called this function. + * See std_assoc_info comment for more information. + * std_assoc - This structure keeps the following necessary info to + * the creation of the association class instance: + * association class name and the names of the attributes + * which will be set into the association class. + * See the std_assoc comment for more info + */ typedef CMPIInstance *(*make_ref_t)(const CMPIObjectPath *, const CMPIInstance *, struct std_assoc_info *info, struct std_assoc *); +/* + * std_assoc is the definition that the developer puts in their source file. + * It must be registered using the macro STDA_AssocMIStub. + * + * source_class - Defines the list of possible classes that can be passed to + * the association for this case + * source_prop - Defines the property of the association class that refers + * to the input (source class) of this case. This must match + * that of the schema, and is used for automatic generation of + * the reference object in the References() or ReferenceNames() + * operation + * target_class - Same as source_class, applied for target + * target_prop - Same as source_prop, applied for target + * assoc_class - Defines the list of association classes which implement this + * association + * handler - Function handler responsible for doing the association and + * returning the list of target instances of the association. + * See assoc_handler_t comment for more info + * make_ref - Function handler responsible for creating an instance of the + * association class as requested by the References() or + * ReferenceNames() operation. See make_ref_t comment for more + * info + */ struct std_assoc { char **source_class; char *source_prop; @@ -49,6 +102,17 @@ make_ref_t make_ref; }; +/* + * The std_assoc_info is used to keep information related to the query done + * + * assoc_class - Name of the association class + * result_class - Name of the class of the target + * role - Name of the property of the source class + * result_role - Name of the property of the target class + * properties - + * context - + * provider_name - Calling provider name + */ struct std_assoc_info { const char *assoc_class; const char *result_class; From danms at us.ibm.com Wed Nov 12 19:16:35 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Nov 2008 11:16:35 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Commented some structures in the std_association.h file In-Reply-To: (Richard Maciel's message of "Wed, 12 Nov 2008 15:53:09 -0200") References: Message-ID: <87tzaczre4.fsf@caffeine.danplanet.com> Hi Richard, None of the comment blocks added in this patch match the style of our other interface documentation. Please see libcmpiutil.h and make sure your comments are doxygen compliant. RM> +/* RM> + * This type defines the signature of the association handler function. The RM> + * handler function receives the reference of the source class of the RM> + * association and must map it to a list of CMPIInstance objects (targets RM> + * of the association). RM> + * RM> + * In parameters: RM> + * CMPIObjectPath * - Path to the source class RM> + * struct std_assoc_info * - See std_assoc_info comment RM> + * RM> + * Out parameters: RM> + * struct inst_list * - Instances associated to ref RM> + */ RM> typedef CMPIStatus (*assoc_handler_t)(const CMPIObjectPath *ref, RM> struct std_assoc_info *info, RM> struct inst_list *list); Personally, I think it's a little bizarre to document the behavior of a function at the definition of the type. This type could be re-used for functions that perform different tasks. I think the explanation should be at the place where a specific instance is used, which would be in std_assoc. Further, I don't think that the documentation of the parameters adds any clarity over the code itself. All the other CMPI functions take a reference, so the meaning of that is well-known. Further, the meaning of the assoc and assoc_info structures should be easily implied by the documentation of the structures themselves. RM> +/* RM> + * This type defines the signature of the handler which creates the RM> + * reference. The handler function receives the source object path, RM> + * and the target instance, so it can create the reference which is returned RM> + * by the function. RM> + * RM> + * In parameters: RM> + * CMPIObjectPath * - Path to the source class RM> + * CMPIInstance * - Target instance RM> + * std_assoc_info - Information from the query that called this function. RM> + * See std_assoc_info comment for more information. RM> + * std_assoc - This structure keeps the following necessary info to RM> + * the creation of the association class instance: RM> + * association class name and the names of the attributes RM> + * which will be set into the association class. RM> + * See the std_assoc comment for more info RM> + */ RM> typedef CMPIInstance *(*make_ref_t)(const CMPIObjectPath *, RM> const CMPIInstance *, RM> struct std_assoc_info *info, RM> struct std_assoc *); I think the same arguments apply to this as well. I'd rather add parameter names to the typedef to both remain consistent with the above, and to convey meaning. RM> +/* RM> + * std_assoc is the definition that the developer puts in their source file. RM> + * It must be registered using the macro STDA_AssocMIStub. RM> + * RM> + * source_class - Defines the list of possible classes that can be passed to RM> + * the association for this case RM> + * source_prop - Defines the property of the association class that refers RM> + * to the input (source class) of this case. This must match RM> + * that of the schema, and is used for automatic generation of RM> + * the reference object in the References() or ReferenceNames() RM> + * operation RM> + * target_class - Same as source_class, applied for target RM> + * target_prop - Same as source_prop, applied for target RM> + * assoc_class - Defines the list of association classes which implement this RM> + * association I think the wording here is a bit off. Association classes don't implement an association. Perhaps this should be something like "A list of association class names that this handler is able to perform". In general, I think that you could drop a lot of the text out of the explanation of the individual members of this structure and add a few sentences about the semantic meaning of this structure at the top. Specifically, this structure defines an association relationship, between a set of source and target classes, through a named (set of) association classes, and the function handler to do the work. RM> +/* RM> + * The std_assoc_info is used to keep information related to the query done RM> + * RM> + * assoc_class - Name of the association class RM> + * result_class - Name of the class of the target RM> + * role - Name of the property of the source class RM> + * result_role - Name of the property of the target class RM> + * properties - RM> + * context - RM> + * provider_name - Calling provider name RM> + */ These structure members are named after the formal CIM association query components, so I don't think the comments are adding any value here. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 12 19:46:29 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 11:46:29 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Commented some structures in the std_association.h file In-Reply-To: References: Message-ID: <491B3295.2050902@linux.vnet.ibm.com> > +/* > + * This type defines the signature of the association handler function. The > + * handler function receives the reference of the source class of the > + * association and must map it to a list of CMPIInstance objects (targets > + * of the association). > + * > + * In parameters: > + * CMPIObjectPath * - Path to the source class When someone says "class" in CIM, they usually mean the generic class (or MOF) representation. The CMPIObjectPath is a short (or encapsulated) representation of a specific instance. So "Path to source class" here makes me think that you're passing in the generic class info, but really what's being passed in is info about a specific instance. CMPIObjectPath, CMPIInstance (etc) are part of the CMPI API, so I'm not sure it's meaningful documenting here. But I wanted to point out the distinction between ObjectPath and class just to make sure the meaning is clear. > > +/* > + * std_assoc is the definition that the developer puts in their source file. > + * It must be registered using the macro STDA_AssocMIStub. STDA_AssocMIStub() registers the provider itself. All providers need to register themselves to expose to the CIMOM what type of provider they are. STDA_AssocMIStub() is used for association providers, but there's all STD_InstanceMIStub() and STDIM_MethodMIStub() macros used for registering providers as instance or method providers respectively. std_assoc is used in the registration process, but I don't think it needs to be mentioned here - mentioning it in the comment for STDA_AssocMIStub() would be more appropriate. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 12 22:17:33 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 14:17:33 -0800 Subject: [Libvirt-cim] Questions about Libvirt-CIM classes and Cimtest items In-Reply-To: <491AA40A.8000707@np.css.fujitsu.com> References: <491AA40A.8000707@np.css.fujitsu.com> Message-ID: <491B55FD.7060102@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > Hi, > > I make a simple comparison CIM classes list between > Libvirt-CIM, Cimtest and DSP10xx specifications. > (See Summary_number_of_classes.ods) > According to this summary, I come up with two questions. > I would appreciate if you answer the questions. > > (1)If Libvirt-CIM fills CIM Schema specifications, > it needs to add more 11 classes(*1). > (2)If Cimtest fills both Libvirt-CIM classes and CIM Schema specifications, > it needs to add more about 100 test items(*2). > > What do you think? Yes, I think this is a reasonable estimate to get basic coverage. You can take a look at our to-do list: http://wiki.libvirt.org/page/Cimtest_todo There's a number of test case ideas mentioned there. Of course, there are numerous others that aren't mentioned there. > > > *1:See red cells in ods file. > *2:See red and yellow cells in ods files. > There are 5 test items a Cimtest class on average. > 5(items/class) * (14+11)(classes) = 100(items) I've created a wiki page that lists the classes we support and what tests cover those classes: http://wiki.libvirt.org/page/Cimtest_test_info Here's the list of classes currently implemented that don't have test cases: -ComputerSystemMigrationIndication -ConcreteComponent -DisplayController -KVMRedirectionSAP -PointingDevice (patch under review) -GraphicsResourceAllocationSettingData -InputResourceAllocationSettingData (patch under review) -ServiceAffectsElement My list is slightly shorter than your's - let me know if you think I've missed something. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 12 22:29:14 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 14:29:14 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] #4 Add input device and corresponding RASD. Message-ID: Patches "Add input device support to device_parsing and Virt_Device" and "Add support for input devices to Virt_RASD.c" updated. From kaitlin at linux.vnet.ibm.com Wed Nov 12 22:29:15 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 14:29:15 -0800 Subject: [Libvirt-cim] [PATCH 1 of 5] Add PointingDevice schema and input device type In-Reply-To: Message-ID: <010da4fc9cdcb1452cfb.1226528955@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224692656 25200 # Node ID 010da4fc9cdcb1452cfb21de6d7c9e18037a10d9 # Parent e862bf5afda43b86e2f7548ef299fb65179060fd 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 e862bf5afda4 -r 010da4fc9cdc Makefile.am --- a/Makefile.am Wed Nov 05 15:13:38 2008 -0800 +++ 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 e862bf5afda4 -r 010da4fc9cdc 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 e862bf5afda4 -r 010da4fc9cdc 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 e862bf5afda4 -r 010da4fc9cdc src/svpc_types.h --- a/src/svpc_types.h Wed Nov 05 15:13:38 2008 -0800 +++ 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 Nov 12 22:29:16 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 14:29:16 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] (#3) Add input device support to device_parsing and Virt_Device In-Reply-To: Message-ID: <060658b608bf91bb8495.1226528956@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1224692656 25200 # Node ID 060658b608bf91bb8495690c693e05d34ac8a028 # Parent 010da4fc9cdcb1452cfb21de6d7c9e18037a10d9 (#3) Add input device support to device_parsing and Virt_Device. Updates from 2 to 3: -Set tablet devices to have mouse device type -Set vdev->id directly using asprintf() Updates from 1 to 2: -Add a count value for input devcies -Change ID value from "input" to "device type:bus type" Signed-off-by: Kaitlin Rupert diff -r 010da4fc9cdc -r 060658b608bf 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 @@ -44,6 +44,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" @@ -80,6 +81,12 @@ free(dev->keymap); } +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) @@ -93,6 +100,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); @@ -467,6 +476,42 @@ return 0; } +static int parse_input_device(xmlNode *node, struct virt_device **vdevs) +{ + struct virt_device *vdev = NULL; + struct input_device *idev = NULL; + int ret; + + 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; + + ret = asprintf(&vdev->id, "%s:%s", idev->type, idev->bus); + if (ret == -1) { + CU_DEBUG("Failed to create input id string"); + goto err; + } + + *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; @@ -502,6 +547,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; @@ -570,6 +617,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; @@ -638,6 +687,9 @@ DUP_FIELD(dev, _dev, dev.graphics.port); DUP_FIELD(dev, _dev, dev.graphics.host); DUP_FIELD(dev, _dev, dev.graphics.keymap); + } else if (dev->type == CIM_RES_TYPE_INPUT) { + DUP_FIELD(dev, _dev, dev.input.type); + DUP_FIELD(dev, _dev, dev.input.bus); } return dev; @@ -893,6 +945,9 @@ parse_devices(xml, &(*dominfo)->dev_emu, CIM_RES_TYPE_EMU); parse_devices(xml, &(*dominfo)->dev_graphics, CIM_RES_TYPE_GRAPHICS); + (*dominfo)->dev_input_ct = 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, &(*dominfo)->dev_net, @@ -962,6 +1017,7 @@ cleanup_virt_devices(&dom->dev_net, dom->dev_net_ct); cleanup_virt_devices(&dom->dev_disk, dom->dev_disk_ct); cleanup_virt_devices(&dom->dev_vcpu, dom->dev_vcpu_ct); + cleanup_virt_devices(&dom->dev_input, dom->dev_input_ct); free(dom); diff -r 010da4fc9cdc -r 060658b608bf 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 @@ -69,6 +69,11 @@ char *keymap; }; +struct input_device { + char *type; + char *bus; +}; + struct virt_device { uint16_t type; union { @@ -78,6 +83,7 @@ struct vcpu_device vcpu; struct emu_device emu; struct graphics_device graphics; + struct input_device input; } dev; char *id; }; @@ -120,6 +126,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 010da4fc9cdc -r 060658b608bf 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,85 @@ return inst; } +int get_input_dev_caption(const char *type, + const char *bus, + char **cap) +{ + int ret; + const char *type_str; + const char *bus_str; + + if (STREQC(type, "mouse")) + type_str = "Mouse"; + else if (STREQC(type, "tablet")) + type_str = "Tablet"; + else + type_str = "Unknown device type"; + + if (STREQC(bus, "usb")) + bus_str = "USB"; + else if (STREQC(bus, "ps2")) + bus_str = "PS2"; + else + bus_str = "Unknown bus"; + + ret = asprintf(cap, "%s %s", bus_str, type_str); + if (ret == -1) { + CU_DEBUG("Failed to create input id string"); + return 0; + } + + return 1; +} + +static int input_set_attr(CMPIInstance *instance, + struct input_device *dev) +{ + uint16_t cim_type; + char *cap; + int rc; + + if ((STREQC(dev->type, "mouse")) || (STREQC(dev->type, "tablet"))) + cim_type = CIM_INPUT_MOUSE; + else + cim_type = CIM_INPUT_UNKNOWN; + + rc = get_input_dev_caption(dev->type, dev->bus, &cap); + if (rc != 1) { + free(cap); + return 0; + } + + CMSetProperty(instance, "PointingType", + (CMPIValue *)&cim_type, CMPI_uint16); + + CMSetProperty(instance, "Caption", (CMPIValue *)cap, CMPI_chars); + + free(cap); + + 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 +440,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 +479,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; } diff -r 010da4fc9cdc -r 060658b608bf src/Virt_Device.h --- a/src/Virt_Device.h Wed Oct 22 09:24:16 2008 -0700 +++ b/src/Virt_Device.h Wed Oct 22 09:24:16 2008 -0700 @@ -71,6 +71,10 @@ uint16_t res_type_from_device_classname(const char *classname); +int get_input_dev_caption(const char *type, + const char *bus, + char **cap); + #endif /* From kaitlin at linux.vnet.ibm.com Wed Nov 12 22:29:19 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 14:29:19 -0800 Subject: [Libvirt-cim] [PATCH 5 of 5] Updated associations to support input device RASD In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1226528570 28800 # Node ID d93d3f13c62f5cfd83a312549365ce209fc8d926 # Parent a3eb89f3e9af9f236fcba51edce1682bc0831056 Updated associations to support input device RASD. Signed-off-by: Kaitlin Rupert diff -r a3eb89f3e9af -r d93d3f13c62f src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Tue Nov 04 14:50:14 2008 -0800 +++ b/src/Virt_ElementSettingData.c Wed Nov 12 14:22:50 2008 -0800 @@ -128,16 +128,19 @@ "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", "Xen_GraphicsResourceAllocationSettingData", + "Xen_InputResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", "KVM_GraphicsResourceAllocationSettingData", + "KVM_InputResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", "LXC_GraphicsResourceAllocationSettingData", + "LXC_InputResourceAllocationSettingData", NULL }; diff -r a3eb89f3e9af -r d93d3f13c62f src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Tue Nov 04 14:50:14 2008 -0800 +++ b/src/Virt_SettingsDefineState.c Wed Nov 12 14:22:50 2008 -0800 @@ -327,16 +327,19 @@ "Xen_NetworkPort", "Xen_LogicalDisk", "Xen_DisplayController", + "Xen_PointingDevice", "KVM_Processor", "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", "KVM_DisplayController", + "KVM_PointingDevice", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", "LXC_LogicalDisk", "LXC_DisplayController", + "LXC_PointingDevice", NULL }; @@ -346,16 +349,19 @@ "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", "Xen_GraphicsResourceAllocationSettingData", + "Xen_InputResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", "KVM_GraphicsResourceAllocationSettingData", + "KVM_InputResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", "LXC_GraphicsResourceAllocationSettingData", + "LXC_InputResourceAllocationSettingData", NULL }; diff -r a3eb89f3e9af -r d93d3f13c62f src/Virt_VSSDComponent.c --- a/src/Virt_VSSDComponent.c Tue Nov 04 14:50:14 2008 -0800 +++ b/src/Virt_VSSDComponent.c Wed Nov 12 14:22:50 2008 -0800 @@ -132,16 +132,19 @@ "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", "Xen_GraphicsResourceAllocationSettingData", + "Xen_InputResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", "KVM_GraphicsResourceAllocationSettingData", + "KVM_InputResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", "LXC_GraphicsResourceAllocationSettingData", + "LXC_InputResourceAllocationSettingData", NULL }; From kaitlin at linux.vnet.ibm.com Wed Nov 12 22:29:18 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 14:29:18 -0800 Subject: [Libvirt-cim] [PATCH 4 of 5] (#2) Add support for input devices to Virt_RASD.c In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1225839014 28800 # Node ID a3eb89f3e9af9f236fcba51edce1682bc0831056 # Parent f08e0fd04dc6689eff62b64f903178e05d440521 (#2) Add support for input devices to Virt_RASD.c Updates: -Set ResourceSubType with input type -Set Caption with bus type Signed-off-by: Kaitlin Rupert diff -r f08e0fd04dc6 -r a3eb89f3e9af schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Wed Nov 12 14:22:48 2008 -0800 +++ b/schema/ResourceAllocationSettingData.mof Tue Nov 04 14:50:14 2008 -0800 @@ -145,3 +145,24 @@ { }; +[Description ("Xen virtual input device"), + Provider("cmpi::Virt_RASD") +] +class Xen_InputResourceAllocationSettingData : Xen_ResourceAllocationSettingData +{ +}; + +[Description ("KVM virtual input device"), + Provider("cmpi::Virt_RASD") +] +class KVM_InputResourceAllocationSettingData : KVM_ResourceAllocationSettingData +{ +}; + +[Description ("LXC virtual input device"), + Provider("cmpi::Virt_RASD") +] +class LXC_InputResourceAllocationSettingData : LXC_ResourceAllocationSettingData +{ +}; + diff -r f08e0fd04dc6 -r a3eb89f3e9af schema/ResourceAllocationSettingData.registration --- a/schema/ResourceAllocationSettingData.registration Wed Nov 12 14:22:48 2008 -0800 +++ b/schema/ResourceAllocationSettingData.registration Tue Nov 04 14:50:14 2008 -0800 @@ -5,12 +5,15 @@ 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 +Xen_InputResourceAllocationSettingData 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 +KVM_InputResourceAllocationSettingData 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 +LXC_InputResourceAllocationSettingData root/virt Virt_RASD Virt_RASD instance diff -r f08e0fd04dc6 -r a3eb89f3e9af src/Makefile.am --- a/src/Makefile.am Wed Nov 12 14:22:48 2008 -0800 +++ b/src/Makefile.am Tue Nov 04 14:50:14 2008 -0800 @@ -150,7 +150,9 @@ libVirt_HostedResourcePool_la_SOURCES = Virt_HostedResourcePool.c libVirt_HostedResourcePool_la_LIBADD = -lVirt_DevicePool -lVirt_HostSystem +libVirt_RASD_la_DEPENDENCIES = libVirt_Device.la libVirt_RASD_la_SOURCES = Virt_RASD.c +libVirt_RASD_la_LIBADD = -lVirt_Device libVirt_ResourcePoolConfigurationService_la_DEPENDENCIES = libVirt_HostSystem.la libVirt_ResourcePoolConfigurationService_la_SOURCES = Virt_ResourcePoolConfigurationService.c diff -r f08e0fd04dc6 -r a3eb89f3e9af src/Virt_RASD.c --- a/src/Virt_RASD.c Wed Nov 12 14:22:48 2008 -0800 +++ b/src/Virt_RASD.c Tue Nov 04 14:50:14 2008 -0800 @@ -37,6 +37,7 @@ #include "Virt_RASD.h" #include "svpc_types.h" +#include "Virt_Device.h" const static CMPIBroker *_BROKER; @@ -285,6 +286,34 @@ return s; } +static CMPIStatus set_input_rasd_params(const struct virt_device *dev, + CMPIInstance *inst) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + char *cap; + int ret; + + ret = get_input_dev_caption(dev->dev.input.type, + dev->dev.input.bus, + &cap); + if (ret != 1) { + free(cap); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to build input caption"); + return s; + } + + CMSetProperty(inst, "ResourceSubType", + (CMPIValue *)dev->dev.input.type, CMPI_chars); + + CMSetProperty(inst, "Caption", (CMPIValue *)cap, CMPI_chars); + + free(cap); + + return s; +} + static CMPIInstance *rasd_from_vdev(const CMPIBroker *broker, struct virt_device *dev, const char *host, @@ -313,6 +342,9 @@ } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { type = CIM_RES_TYPE_GRAPHICS; base = "GraphicsResourceAllocationSettingData"; + } else if (dev->type == CIM_RES_TYPE_INPUT) { + type = CIM_RES_TYPE_INPUT; + base = "InputResourceAllocationSettingData"; } else { return NULL; } @@ -363,6 +395,8 @@ set_proc_rasd_params(broker, ref, dev, host, inst); } else if (dev->type == CIM_RES_TYPE_GRAPHICS) { s = set_graphics_rasd_params(dev, inst); + } else if (dev->type == CIM_RES_TYPE_INPUT) { + s = set_input_rasd_params(dev, inst); } /* FIXME: Put the HostResource in place */ @@ -486,6 +520,8 @@ *type = CIM_RES_TYPE_MEM; else if (STREQ(base, "GraphicsResourceAllocationSettingData")) *type = CIM_RES_TYPE_GRAPHICS; + else if (STREQ(base, "InputResourceAllocationSettingData")) + *type = CIM_RES_TYPE_INPUT; else goto out; @@ -516,6 +552,9 @@ break; case CIM_RES_TYPE_GRAPHICS: *classname = "GraphicsResourceAllocationSettingData"; + break; + case CIM_RES_TYPE_INPUT: + *classname = "InputResourceAllocationSettingData"; break; default: rc = CMPI_RC_ERR_FAILED; From kaitlin at linux.vnet.ibm.com Wed Nov 12 22:29:17 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 14:29:17 -0800 Subject: [Libvirt-cim] [PATCH 3 of 5] Update SystemDevice to support input devices In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1226528568 28800 # Node ID f08e0fd04dc6689eff62b64f903178e05d440521 # Parent 060658b608bf91bb8495690c693e05d34ac8a028 Update SystemDevice to support input devices. Signed-off-by: Kaitlin Rupert diff -r 060658b608bf -r f08e0fd04dc6 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Wed Oct 22 09:24:16 2008 -0700 +++ b/src/Virt_SystemDevice.c Wed Nov 12 14:22:48 2008 -0800 @@ -135,16 +135,19 @@ "Xen_NetworkPort", "Xen_LogicalDisk", "Xen_DisplayController", + "Xen_PointingDevice", "KVM_Processor", "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", "KVM_DisplayController", + "KVM_PointingDevice", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", "LXC_LogicalDisk", "LXC_DisplayController", + "LXC_PointingDevice", NULL }; From danms at us.ibm.com Wed Nov 12 22:38:04 2008 From: danms at us.ibm.com (Dan Smith) Date: Wed, 12 Nov 2008 14:38:04 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] #4 Add input device and corresponding RASD. In-Reply-To: (Kaitlin Rupert's message of "Wed, 12 Nov 2008 14:29:14 -0800") References: Message-ID: <87prl0zi2b.fsf@caffeine.danplanet.com> KR> Patches "Add input device support to device_parsing and KR> Virt_Device" and "Add support for input devices to Virt_RASD.c" KR> updated. I think these look pretty good now. Just to be clear, there is still work to be done to be able to specify this information during a DefineSystem() call, right? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 12 22:58:32 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 14:58:32 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] #4 Add input device and corresponding RASD. In-Reply-To: <87prl0zi2b.fsf@caffeine.danplanet.com> References: <87prl0zi2b.fsf@caffeine.danplanet.com> Message-ID: <491B5F98.40109@linux.vnet.ibm.com> Dan Smith wrote: > KR> Patches "Add input device support to device_parsing and > KR> Virt_Device" and "Add support for input devices to Virt_RASD.c" > KR> updated. > > I think these look pretty good now. Just to be clear, there is still > work to be done to be able to specify this information during a > DefineSystem() call, right? > Yes. I've got some patches I'm working on that all the user to define a graphics device. I have a little bit more work there, but they should be ready soon. I might also add input devices in the same patchset, depending on how big the changes are. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 12 23:02:07 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 15:02:07 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: <491ACCA0.4020701@linux.vnet.ibm.com> References: <89135530d992a488e324.1226441736@localhost.localdomain> <491ACCA0.4020701@linux.vnet.ibm.com> Message-ID: <491B606F.8010208@linux.vnet.ibm.com> >> - verify_ectp_list[hs_ccn] = cs_fields >> + cn_names = ["VirtualSystemMigrationService", "ComputerSystem", >> "DiskPool", >> + "NetworkPool", "ProcessorPool", "MemoryPool"] > We Can omit the inclusion of "DiskPool","NetworkPool", "ProcessorPool" > for libvirt-cim < 680. > Otherwise the test will fail when we check for the list for the values > after the checks for the values returned from the association is made. >> + if status == PASS: >> + for k, l in verify_ectp_list.iteritems(): >> + if len(l) != 0: >> + raise Exception("%s items weren't returned: %s", >> k, l) > The above Exception should be : > > raise Exception("%s items weren't returned: %s" %( k, l)) > > otherwise, the exception statement is will be printed as follow: > Exception: ("%s items weren't returned: %s", 'Xen_ProcessorPool', > [CIMInstance(classname=u'Xen_ProcessorPool', ...)]) >> + status = FAIL >> > > This tc gives a false positive with libvirt-cim version < 680 . > The status = FAIL should come before the raise exception. > After moving the status= FAIL before the raise statement the tc fails > with the following error: > ERROR - Exception: ("%s items weren't returned: %s", > 'Xen_ProcessorPool', [CIMInstance(classname=u'Xen_ProcessorPool', ...)]) Oops, yes - thanks for catching this! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Nov 12 23:44:07 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 15:44:07 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix ECTP 01_forward.py to support system with multiple networks defined Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1226533400 28800 # Node ID db20e254823bc7999a28b0db63b2301bf03996b7 # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 [TEST] #4 Fix ECTP 01_forward.py to support system with multiple networks defined This test was doing a lot of unnecessary checking (and unessary building of lists). Instead, this test calls EnumInstances on each of the classes expected to be returned by the association. These instances are then compared against the list of instances returned by the ECTP association query. The FIXME will be fixed when bug 0007 is fixed. Updates from 3 to 4: -Fix false positive - if an exception is encountered, be sure to set the return status as FAILED. -Build the appropriate profile list needed for testing with older providers -Change provider version from 680 to 686 (which has additional ECTP changes needed to have ECTP work properly). Updates from 2 to 3: -Place most of main block in a try/except. When a failure is encountered, an exception is raised, and the test is cleaned up properly. -If the provider is < 680, don't check the ECTP values for CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0 - ECTP doesn't support this provider version. Updates from 1 to 2: -Return from test case if init_vs_pool_values() returns a failure Signed-off-by: Kaitlin Rupert diff -r 8d6f2db22eda -r db20e254823b suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Nov 11 00:19:20 2008 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Wed Nov 12 15:43:20 2008 -0800 @@ -23,10 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and -# the Classname are set appropriately for the results returned by the -# ElementConformsToProfile association for the RegisteredProfile class -# and ManagedElement Class +# This tc is used to verify the results of the ElementConformsToProfile +# association. This test focuses on RegisteredProfile -> ManagedElement # # "CIM:DSP1042-SystemVirtualization-1.0.0" , # "CIM:DSP1057-VirtualSystem-1.0.0a" @@ -45,98 +43,69 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml from CimTest import Globals -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 XenKvmLib.common_util import print_field_error, check_sblim, get_host_info +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.enumclass import EnumInstances -from XenKvmLib.const import default_network_name, default_pool_name -from XenKvmLib.const import get_provider_version - sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "domU" bug_sblim = '00007' -libvirt_cim_ectp_changes = 680 +libvirt_cim_ectp_changes = 686 -def pool_init(verify_list, pool_cn, pool_name, virt): - ccn = get_typed_class(virt, pool_cn) - instid = '%s/%s' %(pool_cn, pool_name) - verify_list[ccn]= {'InstanceID' : instid } - return verify_list - def init_vs_pool_values(server, virt): - verify_ectp_list = { } - hs_ccn = get_typed_class(virt, 'HostSystem') - host = live.hostname(server) - cs_fields = { - 'CreationClassName' : hs_ccn, - 'Name' : host - } + verify_ectp_list = {} - verify_ectp_list[hs_ccn] = cs_fields + cn_names = ["ComputerSystem"] - cs_ccn = get_typed_class(virt, 'ComputerSystem') - verify_ectp_list[cs_ccn] = cs_fields.copy() - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn - verify_ectp_list[cs_ccn]['Name'] = test_dom + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev >= libvirt_cim_ectp_changes: + cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", + "ProcessorPool", "MemoryPool"] + cn_names.extend(cn_names2) - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') - verify_ectp_list[vs_ccn] = cs_fields.copy() - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn - verify_ectp_list[vs_ccn]['SystemName'] = host - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' + status, host_name, host_ccn = get_host_info(server, virt) + if status != PASS: + logger.error("Unable to get host system instance objects") + return FAIL, verify_ectp_list - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', - default_pool_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', - default_network_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) + #FIXME - get_host_info() should be updated to return the host instance + insts = EnumInstances(server, host_ccn, True) + if len(insts) < 1: + logger.error("Expected 1 %s instance", host_ccn) + return FAIL, verify_ectp_list - - return verify_ectp_list + verify_ectp_list[host_ccn] = insts -def verify_fields(assoc_val, pllst_index, vs_pool_values): + for cn_base in cn_names: + cn = get_typed_class(virt, cn_base) + insts = EnumInstances(server, cn, True) + + if len(insts) < 1: + logger.error("Expected at least 1 %s instance", cn) + return FAIL, verify_ectp_list + + verify_ectp_list[cn] = insts + + return PASS, verify_ectp_list + +def verify_fields(assoc_val, managed_ele_values): try: - field_names = vs_pool_values[pllst_index].keys() - values = vs_pool_values[pllst_index] - for field in field_names: - if values[field] != assoc_val[field]: - print_field_error(field, assoc_val[field], values[field]) - return FAIL + cn = assoc_val.classname + elements = managed_ele_values[cn] + + for ele in elements: + if assoc_val.items() == ele.items(): + managed_ele_values[cn].remove(ele) + return PASS, managed_ele_values + except Exception, details: - logger.error("Exception: In fn verify_fields() %s", details) - return FAIL + logger.error("verify_fields() exception: %s", details) + return FAIL, managed_ele_values - return PASS - -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): - try: - pllst_index = assoc_info[0]['CreationClassName'] - assoc_val = None - if 'HostSystem' in pllst_index or \ - 'VirtualSystemMigrationService' in pllst_index: - if len(assoc_info) != 1: - logger.error("'%s' returned '%d' records, expected 1", - pllst_index, len(assoc_info)) - return FAIL - assoc_val = assoc_info[0] - else: - # For ComputerSystem info - for inst in assoc_info: - if inst['Name'] == test_dom: - assoc_val = inst - break - except Exception, details: - logger.error("Exception: In fn verify_cs_hs_mig_fields() %s", details) - return FAIL - - if assoc_val == None: - return FAIL - - return verify_fields(assoc_val, pllst_index, vs_pool_values) + logger.error("%s not in expected list %s", assoc_val, elements) + return FAIL, managed_ele_values def get_proflist(server, reg_classname, virt): profiles_instid_list = [] @@ -150,8 +119,8 @@ len_prof_list = 7 if len(proflist) < len_prof_list: logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", - reg_classname, len(proflist), 'Profile', len_prof_list) - status = FAIL + reg_classname, len(proflist), 'Profile', len_prof_list) + return FAIL, profiles_instid_list except Exception, detail: logger.error(CIM_ERROR_ENUMERATE, reg_classname) @@ -161,54 +130,17 @@ if status != PASS: return status, profiles_instid_list - profiles_instid_list = [ profile.InstanceID for profile in proflist ] + unsupp_prof = [] + if curr_cim_rev < libvirt_cim_ectp_changes: + unsupp_prof = ["CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0", + "CIM:DSP1045-MemoryResourceVirtualization-1.0.0", + "CIM:DSP1081-VirtualSystemMigration-0.8.1"] + + for profile in proflist: + if profile.InstanceID not in unsupp_prof: + profiles_instid_list.append(profile.InstanceID) return status, profiles_instid_list - - -def verify_ectp_assoc(server, virt): - 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: - return status - - verify_ectp_list = init_vs_pool_values(server, virt) - for devid in inst_lst : - logger.info("Verifying '%s' with '%s'", an, devid) - try: - assoc_info = assoc.Associators(server, - an, - reg_classname, - InstanceID = devid) - if len(assoc_info) < 1: - 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: - instid = assoc_info[0]['InstanceID'] - index, other = instid.split("/") - cn = get_typed_class(virt, index) - status = verify_fields(assoc_info[0], cn, verify_ectp_list) - else: - ccn = assoc_info[0]['CreationClassName'] - status = verify_cs_hs_mig_fields(assoc_info, verify_ectp_list) - - if status != PASS: - break - - except Exception, detail: - logger.error(CIM_ERROR_ASSOCIATORS, an) - logger.error("Exception: %s" % detail) - status = FAIL - return status @do_main(sup_types) def main(): @@ -216,7 +148,7 @@ server = options.ip virt = options.virt - status = PASS + status = None destroy_and_undefine_all(options.ip, options.virt) virt_xml = vxml.get_class(options.virt) @@ -232,11 +164,53 @@ logger.error('Unable to start domain %s' % test_dom) return FAIL - prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' - status = verify_ectp_assoc(server, virt) + try: + reg_classname = get_typed_class(virt, "RegisteredProfile") + an = get_typed_class(virt,"ElementConformsToProfile") + + status, prof_inst_lst = get_proflist(server, reg_classname, virt) + if status != PASS: + raise Exception("Failed to get profile list") + + status, verify_ectp_list = init_vs_pool_values(server, virt) + if status != PASS: + raise Exception("Failed to get instances needed for verification") + + for prof_id in prof_inst_lst: + logger.info("Verifying '%s' with '%s'", an, prof_id) + assoc_info = assoc.Associators(server, + an, + reg_classname, + InstanceID = prof_id) + + if len(assoc_info) < 1: + ret_val, linux_cs = check_sblim(server, virt) + if ret_val != PASS: + status = FAIL + raise Exception(" '%s' returned (%d) '%s' objects" % \ + (len(assoc_info), reg_classname)) + else: + status = XFAIL_RC(bug_sblim) + raise Exception("Known failure") + + for inst in assoc_info: + status, verify_ectp_list = verify_fields(inst, verify_ectp_list) + if status != PASS: + raise Exception("Failed to verify instance") + + if status == PASS: + for k, l in verify_ectp_list.iteritems(): + if len(l) != 0: + status = FAIL + raise Exception("%s items weren't returned: %s" % (k, l)) + + except Exception, detail: + logger.error("Exception: %s" % detail) + if status == PASS: + status = FAIL Globals.CIM_NS = prev_namespace cxml.destroy(server) From kaitlin at linux.vnet.ibm.com Wed Nov 12 23:44:12 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 12 Nov 2008 15:44:12 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: References: Message-ID: <491B6A4C.5030906@linux.vnet.ibm.com> > > >> > > It fails because of different error code and desc for F9 rpm > > >> and F10. > > >> > > With invalid_instid_keyvalue, it expected to return {'rc' : > > >> > > pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine resource > type'} > > >> > > for F9, > > >> > > but we expected to return {'rc' : pywbem.CIM_ERR_NOT_FOUND, > > >> 'desc' : > > >> > > 'No such instance'} for F10. > > >> > > > > >> > > I have to add a revision branch here. Would you tell me how > to get > > >> > > the revision number? > > >> > Yes this test need to be branched. > > >> > You can use get_provider_version() to get he revision number. > > >> > You can refer to 15_mod_system_settings.py tc for reference. > > >> > > >> Deepti - Thanks for your relpy. > > >> When I try to get the changeset number for this patch, It seems > > >> that the expect > > >> error code number and desc are not changed yet, below is the part > > >> code for > > >> this case in Virt_SettingsDefineCapabilities.c with current src: > > >> > > >> ... > > >> if (type == CIM_RES_TYPE_UNKNOWN) { > > >> cu_statusf(_BROKER, &s, > > >> CMPI_RC_ERR_FAILED, > > >> "Unable to determine resource type"); > > >> goto out; > > >> } > > >> ... > > > Sorry I did not ask initially itself. > > > Which CIMOM did use when comparing the return values. > > > Do you use the same CIMOM on both F9 and F10 ? > > If the problem is with different CIMOM's returning different error > > information then we dont need to use get_provider_version(). > > It would be good idea to verify what CIMOM is there on the machine and > > check the error information accordingly instead of modifying and > > verifying the common information in the error description for pegasus > > and sfcb.This will be good in case where two error messages occurring > > because of different reasons are partly same, and hence avoid false > > positives. > > This tc return both different error code and descriptions for sfcb and > pegasus. > It seems that somebody says it isn't a good idea to check the cimom > type in tc. > I'm not sure if we can deal with this by other ways. > Thanks! Daisy - did you resolve your problem? I tested with an F9 rpm using Pegasus, and this test passed for me. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Thu Nov 13 01:49:52 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 13 Nov 2008 09:49:52 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: <491B6A4C.5030906@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-13 07:44:12: > > > >> > > It fails because of different error code and desc for F9 rpm > > > >> and F10. > > > >> > > With invalid_instid_keyvalue, it expected to return {'rc' : > > > >> > > pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine resource > > type'} > > > >> > > for F9, > > > >> > > but we expected to return {'rc' : pywbem.CIM_ERR_NOT_FOUND, > > > >> 'desc' : > > > >> > > 'No such instance'} for F10. > > > >> > > > > > >> > > I have to add a revision branch here. Would you tell me how > > to get > > > >> > > the revision number? > > > >> > Yes this test need to be branched. > > > >> > You can use get_provider_version() to get he revision number. > > > >> > You can refer to 15_mod_system_settings.py tc for reference. > > > >> > > > >> Deepti - Thanks for your relpy. > > > >> When I try to get the changeset number for this patch, It seems > > > >> that the expect > > > >> error code number and desc are not changed yet, below is the part > > > >> code for > > > >> this case in Virt_SettingsDefineCapabilities.c with current src: > > > >> > > > >> ... > > > >> if (type == CIM_RES_TYPE_UNKNOWN) { > > > >> cu_statusf(_BROKER, &s, > > > >> CMPI_RC_ERR_FAILED, > > > >> "Unable to determine resource type"); > > > >> goto out; > > > >> } > > > >> ... > > > > Sorry I did not ask initially itself. > > > > Which CIMOM did use when comparing the return values. > > > > Do you use the same CIMOM on both F9 and F10 ? > > > If the problem is with different CIMOM's returning different error > > > information then we dont need to use get_provider_version(). > > > It would be good idea to verify what CIMOM is there on the machine and > > > check the error information accordingly instead of modifying and > > > verifying the common information in the error description for pegasus > > > and sfcb.This will be good in case where two error messages occurring > > > because of different reasons are partly same, and hence avoid false > > > positives. > > > > This tc return both different error code and descriptions for sfcb and > > pegasus. > > It seems that somebody says it isn't a good idea to check the cimom > > type in tc. > > I'm not sure if we can deal with this by other ways. > > Thanks! > > Daisy - did you resolve your problem? I tested with an F9 rpm using > Pegasus, and this test passed for me. > > This tc passes for Pegasus, but it fails for sfcb. It expects different error code and description for sfcb and Pegasus. If I change the expr_valuese from 1) to 2), it passes for sfcb. 1) expr_values = { "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to determine\ resource type' }, } 2) expr_values = { "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_NOT_FOUNG, 'desc' : 'No such instance' }, } Maybe we can verify what CIMOM is there on the machine and check the error information accordingly to fix this issue, but I remember that somebody says it isn't a good idea to check the cimom type in tc, any better idea? 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 Nov 13 01:55:36 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 13 Nov 2008 09:55:36 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC In-Reply-To: <491ABAA9.10407@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-12 19:14:49: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1226458889 28800 > > # Node ID d97222cfb717a382136108c319dee64cc2466716 > > # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 > > [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC > > > > Signed-off-by: Guolian Yun > > > > diff -r 8d6f2db22eda -r d97222cfb717 suites/libvirt- > cim/cimtest/HostSystem/02_hostsystem_to_rasd.py > > --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd. > py Tue Nov 11 00:19:20 2008 -0800 > > +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd. > py Tue Nov 11 19:01:29 2008 -0800 > > @@ -75,6 +75,8 @@ > > global test_disk > > if virt == "Xen": > > test_disk = "xvda" > > + if virt == "LXC": > > + test_disk = "/tmp" > > else: > > test_disk = "hda" > > virt_xml = get_class(virt) > > > This tc fails with the following error for LXC: > > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: FAIL > ERROR - DEBUG an is LXC_HostedDependency, cn is LXC_HostSystem, qcn is > LXC_ComputerSystem > ERROR - Failed to get associators information for LXC_SettingsDefineState > ERROR - Exception: u'LXC_DisplayController' > Class not found What's your cimon's type and src info? I tested this with sfcb with latest src for F10, and it passes for me. > -------------------------------------------------------------------- > > > > _______________________________________________ > > 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 fujimura.toshifumi at np.css.fujitsu.com Thu Nov 13 05:08:27 2008 From: fujimura.toshifumi at np.css.fujitsu.com (Toshifumi Fujimura) Date: Thu, 13 Nov 2008 14:08:27 +0900 Subject: [Libvirt-cim] Questions about Libvirt-CIM classes and Cimtest items In-Reply-To: <491B55FD.7060102@linux.vnet.ibm.com> References: <491AA40A.8000707@np.css.fujitsu.com> <491B55FD.7060102@linux.vnet.ibm.com> Message-ID: <491BB64B.5080809@np.css.fujitsu.com> Hi, Thanks for a creating wiki page. I have three questions about this wiki page. I would appreciate if you answer the questions. (1)The class "AllocationCapabilities" exists on Libvirt-CIM(revision: 738). But it doesn't in this wiki page. Is this forgotten? (2)The test directory "VirtualSystemSettingDataComponent" exists on Cimtest(revision: 488). But from this wiki, it is not used as the test of class "VirtualSystemSettingDataComponent". Is this forgotten? (3) From "DSP1059" spec,it seems that some classes don't define on DSP1059. For example,"ConcreteComponent", "DiskPool", "DisplayController", "ElementAllocatedFromPool"... But these classes define in this wiki page. And in the same, from "DSP1042" spec, it seems that some classes don't define on DSP1042. For exmaple, "ComputerSystemIndication", "EnabledLogicalElementCapabilities", "HostSystem" and "SettingsDefineCapabilities". But these classes define in this wiki page. Why? -- Toshifumi Fujimura. From deeptik at linux.vnet.ibm.com Thu Nov 13 05:18:52 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 13 Nov 2008 10:48:52 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC In-Reply-To: References: Message-ID: <491BB8BC.7090800@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-11-12 19:14:49: > > > > > > > yunguol at cn.ibm.com wrote: > > > # HG changeset patch > > > # User Guolian Yun > > > # Date 1226458889 28800 > > > # Node ID d97222cfb717a382136108c319dee64cc2466716 > > > # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 > > > [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC > > > > > > Signed-off-by: Guolian Yun > > > > > > diff -r 8d6f2db22eda -r d97222cfb717 suites/libvirt- > > cim/cimtest/HostSystem/02_hostsystem_to_rasd.py > > > --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd. > > py Tue Nov 11 00:19:20 2008 -0800 > > > +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd. > > py Tue Nov 11 19:01:29 2008 -0800 > > > @@ -75,6 +75,8 @@ > > > global test_disk > > > if virt == "Xen": > > > test_disk = "xvda" > > > + if virt == "LXC": > > > + test_disk = "/tmp" > > > else: > > > test_disk = "hda" > > > virt_xml = get_class(virt) > > > > > This tc fails with the following error for LXC: > > > > -------------------------------------------------------------------- > > HostSystem - 02_hostsystem_to_rasd.py: FAIL > > ERROR - DEBUG an is LXC_HostedDependency, cn is LXC_HostSystem, qcn is > > LXC_ComputerSystem > > ERROR - Failed to get associators information for > LXC_SettingsDefineState > > ERROR - Exception: u'LXC_DisplayController' > > Class not found > > What's your cimon's type and src info? > I tested this with sfcb with latest src for F10, and it passes for me. I tested the above changes with libvirt-cim revision 738 on F10 machine with sfcb cimom. 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 From deeptik at linux.vnet.ibm.com Thu Nov 13 06:13:08 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 13 Nov 2008 11:43:08 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: References: Message-ID: <491BC574.8010304@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1226533400 28800 > # Node ID db20e254823bc7999a28b0db63b2301bf03996b7 > # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 > [TEST] #4 Fix ECTP 01_forward.py to support system with multiple networks defined > > This test was doing a lot of unnecessary checking (and unessary building of > lists). Instead, this test calls EnumInstances on each of the classes expected > to be returned by the association. > > These instances are then compared against the list of instances returned by the ECTP association query. > > The FIXME will be fixed when bug 0007 is fixed. > > Updates from 3 to 4: > -Fix false positive - if an exception is encountered, be sure to set the > return status as FAILED. > -Build the appropriate profile list needed for testing with older providers > -Change provider version from 680 to 686 (which has additional ECTP changes > needed to have ECTP work properly). > > Updates from 2 to 3: > -Place most of main block in a try/except. When a failure is encountered, > an exception is raised, and the test is cleaned up properly. > -If the provider is < 680, don't check the ECTP values for > CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0 - ECTP doesn't support > this provider version. > > Updates from 1 to 2: > -Return from test case if init_vs_pool_values() returns a failure > > Signed-off-by: Kaitlin Rupert > > diff -r 8d6f2db22eda -r db20e254823b suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Nov 11 00:19:20 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Wed Nov 12 15:43:20 2008 -0800 > @@ -23,10 +23,8 @@ > # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > # > > -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and > -# the Classname are set appropriately for the results returned by the > -# ElementConformsToProfile association for the RegisteredProfile class > -# and ManagedElement Class > +# This tc is used to verify the results of the ElementConformsToProfile > +# association. This test focuses on RegisteredProfile -> ManagedElement > # > # "CIM:DSP1042-SystemVirtualization-1.0.0" , > # "CIM:DSP1057-VirtualSystem-1.0.0a" > @@ -45,98 +43,69 @@ > from XenKvmLib.classes import get_typed_class > from XenKvmLib import vxml > from CimTest import Globals > -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 XenKvmLib.common_util import print_field_error, check_sblim, get_host_info > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.enumclass import EnumInstances > -from XenKvmLib.const import default_network_name, default_pool_name > -from XenKvmLib.const import get_provider_version > - > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > test_dom = "domU" > bug_sblim = '00007' > -libvirt_cim_ectp_changes = 680 > +libvirt_cim_ectp_changes = 686 > > -def pool_init(verify_list, pool_cn, pool_name, virt): > - ccn = get_typed_class(virt, pool_cn) > - instid = '%s/%s' %(pool_cn, pool_name) > - verify_list[ccn]= {'InstanceID' : instid } > - return verify_list > - > def init_vs_pool_values(server, virt): > - verify_ectp_list = { } > - hs_ccn = get_typed_class(virt, 'HostSystem') > - host = live.hostname(server) > - cs_fields = { > - 'CreationClassName' : hs_ccn, > - 'Name' : host > - } > + verify_ectp_list = {} > > - verify_ectp_list[hs_ccn] = cs_fields > + cn_names = ["ComputerSystem"] > > - cs_ccn = get_typed_class(virt, 'ComputerSystem') > - verify_ectp_list[cs_ccn] = cs_fields.copy() > - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn > - verify_ectp_list[cs_ccn]['Name'] = test_dom > + curr_cim_rev, changeset = get_provider_version(virt, server) > + if curr_cim_rev >= libvirt_cim_ectp_changes: > + cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", > + "ProcessorPool", "MemoryPool"] > + cn_names.extend(cn_names2) > > - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') > - verify_ectp_list[vs_ccn] = cs_fields.copy() > - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn > - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn > - verify_ectp_list[vs_ccn]['SystemName'] = host > - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' > + status, host_name, host_ccn = get_host_info(server, virt) > + if status != PASS: > + logger.error("Unable to get host system instance objects") > + return FAIL, verify_ectp_list > > - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', > - default_pool_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', > - default_network_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) > + #FIXME - get_host_info() should be updated to return the host instance > + insts = EnumInstances(server, host_ccn, True) > + if len(insts) < 1: > + logger.error("Expected 1 %s instance", host_ccn) > + return FAIL, verify_ectp_list > > - > - return verify_ectp_list > + verify_ectp_list[host_ccn] = insts > > -def verify_fields(assoc_val, pllst_index, vs_pool_values): > + for cn_base in cn_names: > + cn = get_typed_class(virt, cn_base) > + insts = EnumInstances(server, cn, True) > + > + if len(insts) < 1: > + logger.error("Expected at least 1 %s instance", cn) > + return FAIL, verify_ectp_list > + > + verify_ectp_list[cn] = insts > + > + return PASS, verify_ectp_list > + > +def verify_fields(assoc_val, managed_ele_values): > try: > - field_names = vs_pool_values[pllst_index].keys() > - values = vs_pool_values[pllst_index] > - for field in field_names: > - if values[field] != assoc_val[field]: > - print_field_error(field, assoc_val[field], values[field]) > - return FAIL > + cn = assoc_val.classname > + elements = managed_ele_values[cn] > + > + for ele in elements: > + if assoc_val.items() == ele.items(): > + managed_ele_values[cn].remove(ele) > + return PASS, managed_ele_values > + > except Exception, details: > - logger.error("Exception: In fn verify_fields() %s", details) > - return FAIL > + logger.error("verify_fields() exception: %s", details) > + return FAIL, managed_ele_values > > - return PASS > - > -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): > - try: > - pllst_index = assoc_info[0]['CreationClassName'] > - assoc_val = None > - if 'HostSystem' in pllst_index or \ > - 'VirtualSystemMigrationService' in pllst_index: > - if len(assoc_info) != 1: > - logger.error("'%s' returned '%d' records, expected 1", > - pllst_index, len(assoc_info)) > - return FAIL > - assoc_val = assoc_info[0] > - else: > - # For ComputerSystem info > - for inst in assoc_info: > - if inst['Name'] == test_dom: > - assoc_val = inst > - break > - except Exception, details: > - logger.error("Exception: In fn verify_cs_hs_mig_fields() %s", details) > - return FAIL > - > - if assoc_val == None: > - return FAIL > - > - return verify_fields(assoc_val, pllst_index, vs_pool_values) > + logger.error("%s not in expected list %s", assoc_val, elements) > + return FAIL, managed_ele_values > > def get_proflist(server, reg_classname, virt): > profiles_instid_list = [] > @@ -150,8 +119,8 @@ > len_prof_list = 7 > if len(proflist) < len_prof_list: > logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", > - reg_classname, len(proflist), 'Profile', len_prof_list) > - status = FAIL > + reg_classname, len(proflist), 'Profile', len_prof_list) > + return FAIL, profiles_instid_list > > except Exception, detail: > logger.error(CIM_ERROR_ENUMERATE, reg_classname) > @@ -161,54 +130,17 @@ > if status != PASS: > return status, profiles_instid_list > > - profiles_instid_list = [ profile.InstanceID for profile in proflist ] > + unsupp_prof = [] > + if curr_cim_rev < libvirt_cim_ectp_changes: > + unsupp_prof = ["CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0", > + "CIM:DSP1045-MemoryResourceVirtualization-1.0.0", > + "CIM:DSP1081-VirtualSystemMigration-0.8.1"] > + > + for profile in proflist: > + if profile.InstanceID not in unsupp_prof: > + profiles_instid_list.append(profile.InstanceID) > > return status, profiles_instid_list > - > - > -def verify_ectp_assoc(server, virt): > - 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: > - return status > - > - verify_ectp_list = init_vs_pool_values(server, virt) > - for devid in inst_lst : > - logger.info("Verifying '%s' with '%s'", an, devid) > - try: > - assoc_info = assoc.Associators(server, > - an, > - reg_classname, > - InstanceID = devid) > - if len(assoc_info) < 1: > - 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: > - instid = assoc_info[0]['InstanceID'] > - index, other = instid.split("/") > - cn = get_typed_class(virt, index) > - status = verify_fields(assoc_info[0], cn, verify_ectp_list) > - else: > - ccn = assoc_info[0]['CreationClassName'] > - status = verify_cs_hs_mig_fields(assoc_info, verify_ectp_list) > - > - if status != PASS: > - break > - > - except Exception, detail: > - logger.error(CIM_ERROR_ASSOCIATORS, an) > - logger.error("Exception: %s" % detail) > - status = FAIL > - return status > > @do_main(sup_types) > def main(): > @@ -216,7 +148,7 @@ > server = options.ip > virt = options.virt > > - status = PASS > + status = None > destroy_and_undefine_all(options.ip, options.virt) > > virt_xml = vxml.get_class(options.virt) > @@ -232,11 +164,53 @@ > logger.error('Unable to start domain %s' % test_dom) > return FAIL > > - > prev_namespace = Globals.CIM_NS > Globals.CIM_NS = 'root/interop' > > - status = verify_ectp_assoc(server, virt) > + try: > + reg_classname = get_typed_class(virt, "RegisteredProfile") > + an = get_typed_class(virt,"ElementConformsToProfile") > + > + status, prof_inst_lst = get_proflist(server, reg_classname, virt) > + if status != PASS: > + raise Exception("Failed to get profile list") > + > + status, verify_ectp_list = init_vs_pool_values(server, virt) > + if status != PASS: > + raise Exception("Failed to get instances needed for verification") > + > + for prof_id in prof_inst_lst: > + logger.info("Verifying '%s' with '%s'", an, prof_id) > + assoc_info = assoc.Associators(server, > + an, > + reg_classname, > + InstanceID = prof_id) > + > + if len(assoc_info) < 1: > + ret_val, linux_cs = check_sblim(server, virt) > + if ret_val != PASS: > + status = FAIL > + raise Exception(" '%s' returned (%d) '%s' objects" % \ > + (len(assoc_info), reg_classname)) > + else: > + status = XFAIL_RC(bug_sblim) > + raise Exception("Known failure") > + > + for inst in assoc_info: > + status, verify_ectp_list = verify_fields(inst, verify_ectp_list) > + if status != PASS: > + raise Exception("Failed to verify instance") > + > + if status == PASS: > + for k, l in verify_ectp_list.iteritems(): > + if len(l) != 0: > + status = FAIL > + raise Exception("%s items weren't returned: %s" % (k, l)) > + > + except Exception, detail: > + logger.error("Exception: %s" % detail) > + if status == PASS: > + status = FAIL > No need to check status == PASS here, can directly assign status = FAIL. otherwise looks good , +1 for me. > Globals.CIM_NS = prev_namespace > cxml.destroy(server) > > _______________________________________________ > 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 Nov 13 07:13:59 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 13 Nov 2008 12:43:59 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC In-Reply-To: References: Message-ID: <491BD3B7.5080801@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2008-11-12 19:14:49: > > > > > > > yunguol at cn.ibm.com wrote: > > > # HG changeset patch > > > # User Guolian Yun > > > # Date 1226458889 28800 > > > # Node ID d97222cfb717a382136108c319dee64cc2466716 > > > # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 > > > [TEST] Fix HostSystem/02_hostsystem_to_rasd.py for LXC > > > > > > Signed-off-by: Guolian Yun > > > > > > diff -r 8d6f2db22eda -r d97222cfb717 suites/libvirt- > > cim/cimtest/HostSystem/02_hostsystem_to_rasd.py > > > --- a/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd. > > py Tue Nov 11 00:19:20 2008 -0800 > > > +++ b/suites/libvirt-cim/cimtest/HostSystem/02_hostsystem_to_rasd. > > py Tue Nov 11 19:01:29 2008 -0800 > > > @@ -75,6 +75,8 @@ > > > global test_disk > > > if virt == "Xen": > > > test_disk = "xvda" > > > + if virt == "LXC": > > > + test_disk = "/tmp" > > > else: > > > test_disk = "hda" > > > virt_xml = get_class(virt) > > > > > This tc fails with the following error for LXC: > > > > -------------------------------------------------------------------- > > HostSystem - 02_hostsystem_to_rasd.py: FAIL > > ERROR - DEBUG an is LXC_HostedDependency, cn is LXC_HostSystem, qcn is > > LXC_ComputerSystem > > ERROR - Failed to get associators information for > LXC_SettingsDefineState > > ERROR - Exception: u'LXC_DisplayController' > > Class not found > > What's your cimon's type and src info? > I tested this with sfcb with latest src for F10, and it passes for me. Sorry for the inconvenience, I had applied this changes to an old cimtest repo and hence I think it was failing. The tc passes now and is ready to go. +1 for me. 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 From yunguol at cn.ibm.com Thu Nov 13 07:52:09 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 13 Nov 2008 15:52:09 +0800 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Nov 13 2008 Message-ID: ================================================= KVM on Pegasus Test Run Summary for Nov 13 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: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 490 Cimtest changeset: 8d6f2db22eda ================================================= FAIL : 3 XFAIL : 2 SKIP : 8 PASS : 126 ----------------- Total : 139 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemManagementService - 15_mod_system_settings.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 RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.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: FAIL ERROR - 'KVM_ElementConformsToProfile' returned (0) 'KVM_RegisteredProfile' objects CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: 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 `VirtualDevice' property ERROR - Unable to define rstest_disk_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualDevice' property -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: FAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 -------------------------------------------------------------------- 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 kaitlin at linux.vnet.ibm.com Thu Nov 13 16:20:24 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Nov 2008 08:20:24 -0800 Subject: [Libvirt-cim] Questions about Libvirt-CIM classes and Cimtest items In-Reply-To: <491BB64B.5080809@np.css.fujitsu.com> References: <491AA40A.8000707@np.css.fujitsu.com> <491B55FD.7060102@linux.vnet.ibm.com> <491BB64B.5080809@np.css.fujitsu.com> Message-ID: <491C53C8.1000909@linux.vnet.ibm.com> Toshifumi Fujimura wrote: > Hi, > > Thanks for a creating wiki page. > I have three questions about this wiki page. > I would appreciate if you answer the questions. Thanks for catching these items! I created the wiki page rather quickly yesterday - I have a few errors on it. > > (1)The class "AllocationCapabilities" exists on Libvirt-CIM(revision: 738). > But it doesn't in this wiki page. > Is this forgotten? Yes, I missed this one. It's on the wiki page now. > > (2)The test directory "VirtualSystemSettingDataComponent" exists on > Cimtest(revision: 488). > But from this wiki, it is not used as the test of class > "VirtualSystemSettingDataComponent". > Is this forgotten? This directory is used for the VirtualSystemSettingDataComponent class. The VirtualSystemSettingDataComponent class originally said VirtualSystemSnapshotServiceCapabilities, which is a typo. The wiki is updated with the proper class. > > (3) > From "DSP1059" spec,it seems that some classes don't define on DSP1059. > For example,"ConcreteComponent", "DiskPool", "DisplayController", > "ElementAllocatedFromPool"... > But these classes define in this wiki page. ConcreteComponent - this is shown in the diagram on page 10 in DSP1059 (GDRVP). It's also mentioned in DSP1042 (SVP) and DSP1041 (ResourceAllocationProfile). We don't advertise DSP1041, although we probably should. The class is discussed in detail in DSP1041. DiskPool - this is a subclass of ResourcePool. ResourcePool is mentioned in DSP1059, DSP1042, and DSP1041. DisplayController - this is a subclass of LogicalDevice. LogicalDevice is in the diagram on page 10 in DSP1059. It's also mentioned in DSP1042 and DSP1041. The class is discussed in detail in DSP1041. ElementAllocatedFromPool - is in the diagram on page 10 in DSP1059. It's also mentioned in DSP1042 and DSP1041. The class is discussed in detail in DSP1041. Two things should probably be done: 1) Update the RegisteredProfile provider to include DSP1041. 2) Update the wiki to include which profiles the class is mentioned in and which profile describes the class in detail > > And in the same, from "DSP1042" spec, it seems that some classes don't > define on DSP1042. > For exmaple, "ComputerSystemIndication", > "EnabledLogicalElementCapabilities", > "HostSystem" and "SettingsDefineCapabilities". > But these classes define in this wiki page. > > Why? For these, this is a similar issue - these classes are referenced in multiple profiles. I'll see if I can fix this up today so that the table is a little more clear. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Nov 13 16:38:57 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Nov 2008 08:38:57 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] (#3) Fix up associations to SBLIM host system Message-ID: This is a revised version of my previous set. I tested against a fresh pegasus install and there were no schema install complaints. From danms at us.ibm.com Thu Nov 13 16:38:58 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Nov 2008 08:38:58 -0800 Subject: [Libvirt-cim] [PATCH 1 of 5] Add a function that converts a SBLIM host system instance to something with In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1226593541 28800 # Node ID be6fcb7b57d4cc727c5ee904e0c2e55444eafe81 # Parent 75896120cb575bd760de39f316a640582c09dd55 Add a function that converts a SBLIM host system instance to something with a platform prefix. This is just used to satisfy lower layers that key off the platform prefix (i.e. KVM_) of a class name to determine how to connect to libvirt. Signed-off-by: Dan Smith diff -r 75896120cb57 -r be6fcb7b57d4 libxkutil/misc_util.c --- a/libxkutil/misc_util.c Wed Nov 05 15:09:49 2008 -0800 +++ b/libxkutil/misc_util.c Thu Nov 13 08:25:41 2008 -0800 @@ -37,6 +37,8 @@ #include "misc_util.h" #include "cs_util.h" + +#include #define URI_ENV "HYPURI" @@ -580,6 +582,31 @@ return actual; } +CMPIObjectPath *convert_sblim_hostsystem(const CMPIBroker *broker, + const CMPIObjectPath *ref, + struct std_assoc_info *info) +{ + CMPIObjectPath *vref = NULL; + CMPIStatus s; + char *base = NULL; + char *cn = NULL; + + base = class_base_name(CLASSNAME(ref)); + if (base == NULL) + goto out; + + cn = get_typed_class(info->assoc_class, base); + if (cn == NULL) + goto out; + + vref = CMNewObjectPath(broker, CIM_VIRT_NS, cn, &s); + out: + free(base); + free(cn); + + return vref; +} + /* * Local Variables: * mode: C diff -r 75896120cb57 -r be6fcb7b57d4 libxkutil/misc_util.h --- a/libxkutil/misc_util.h Wed Nov 05 15:09:49 2008 -0800 +++ b/libxkutil/misc_util.h Thu Nov 13 08:25:41 2008 -0800 @@ -126,6 +126,10 @@ int domain_vcpu_count(virDomainPtr dom); +CMPIObjectPath *convert_sblim_hostsystem(const CMPIBroker *broker, + const CMPIObjectPath *ref, + struct std_assoc_info *info); + #define LIBVIRT_CIM_DEFAULT_MAKEREF() \ static CMPIInstance* make_ref(const CMPIObjectPath *source_ref, \ const CMPIInstance *target_inst, \ From danms at us.ibm.com Thu Nov 13 16:38:59 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Nov 2008 08:38:59 -0800 Subject: [Libvirt-cim] [PATCH 2 of 5] Make HostedResourcePool work from root/cimv2 and register it there In-Reply-To: Message-ID: <0ef4058624c9383119f9.1226594339@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1226593726 28800 # Node ID 0ef4058624c9383119f9550eb410efaf7b057c88 # Parent be6fcb7b57d4cc727c5ee904e0c2e55444eafe81 Make HostedResourcePool work from root/cimv2 and register it there ...so we can get back from HostSystem to our pools. Signed-off-by: Dan Smith diff -r be6fcb7b57d4 -r 0ef4058624c9 Makefile.am --- a/Makefile.am Thu Nov 13 08:25:41 2008 -0800 +++ b/Makefile.am Thu Nov 13 08:28:46 2008 -0800 @@ -61,6 +61,8 @@ schema/ElementConformsToProfile.mof \ schema/ReferencedProfile.mof +CIMV2_MOFS = \ + schema/HostedResourcePool.mof REGS = \ schema/ComputerSystem.registration \ @@ -112,6 +114,9 @@ schema/ElementConformsToProfile.registration \ schema/ReferencedProfile.registration +CIMV2_REGS = \ + schema/HostedResourcePool.registration + pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh @@ -129,12 +134,14 @@ postinstall: sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) + sh provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(CIMV2_REGS) -m $(CIMV2_MOFS) virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true mkdir -p $(INFO_STORE) preuninstall: sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS) sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS) + sh provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(CIMV2_REGS) -m $(CIMV2_MOFS) rpm: clean @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) diff -r be6fcb7b57d4 -r 0ef4058624c9 base_schema/cimv216-cimv2_mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/base_schema/cimv216-cimv2_mof Thu Nov 13 08:28:46 2008 -0800 @@ -0,0 +1,11 @@ +Qualifier IsPUnit : boolean = false, + Scope(property, method, parameter); + +Qualifier Experimental : boolean = false, + Scope(any), + Flavor(EnableOverride, Restricted); + +#pragma include ("Core/CIM_ResourcePool.mof") +#pragma include ("Core/CIM_HostedResourcePool.mof") +#pragma include ("Core/CIM_ElementCapabilities.mof") +#pragma include ("Core/CIM_HostedService.mof") diff -r be6fcb7b57d4 -r 0ef4058624c9 base_schema/install_base_schema.sh.in --- a/base_schema/install_base_schema.sh.in Thu Nov 13 08:25:41 2008 -0800 +++ b/base_schema/install_base_schema.sh.in Thu Nov 13 08:28:46 2008 -0800 @@ -22,6 +22,8 @@ fix_schema() { (cd ${TMPDIR} && patch -p0 < ${DATA}/fix_schema.patch) cp -a ${DATA}/cimv216-interop_mof ${TMPDIR}/cimv216-interop.mof + cp -a ${DATA}/cimv216-cimv2_mof ${TMPDIR}/cimv216-cimv2.mof + } detect_peg_repo() { @@ -72,6 +74,7 @@ cimmofl -uc -aEV -R$repo -n $NS qualifiers.mof cimmofl -uc -aEV -R$repo -n $NS qualifiers_optional.mof cimmofl -uc -aEV -R$repo -n /root/interop cimv???-interop.mof + cimmofl -uc -aEV -R$repo -n /root/cimv2 cimv???-cimv2.mof } install_schema_sfcb() { diff -r be6fcb7b57d4 -r 0ef4058624c9 schema/HostedResourcePool.registration --- a/schema/HostedResourcePool.registration Thu Nov 13 08:25:41 2008 -0800 +++ b/schema/HostedResourcePool.registration Thu Nov 13 08:28:46 2008 -0800 @@ -3,3 +3,6 @@ Xen_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association KVM_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association LXC_HostedResourcePool root/virt Virt_HostedResourcePool Virt_HostedResourcePool association +Xen_HostedResourcePool root/cimv2 Virt_HostedResourcePool Virt_HostedResourcePool association +KVM_HostedResourcePool root/cimv2 Virt_HostedResourcePool Virt_HostedResourcePool association +LXC_HostedResourcePool root/cimv2 Virt_HostedResourcePool Virt_HostedResourcePool association diff -r be6fcb7b57d4 -r 0ef4058624c9 src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Thu Nov 13 08:25:41 2008 -0800 +++ b/src/Virt_HostedResourcePool.c Thu Nov 13 08:28:46 2008 -0800 @@ -31,6 +31,8 @@ #include #include "misc_util.h" #include + +#include #include "Virt_HostSystem.h" #include "Virt_DevicePool.h" @@ -68,15 +70,21 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; + CMPIObjectPath *virtref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) + goto out; + + virtref = convert_sblim_hostsystem(_BROKER, ref, info); + if (virtref == NULL) goto out; s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) goto out; - s = enum_pools(_BROKER, ref, CIM_RES_TYPE_ALL, list); + s = enum_pools(_BROKER, virtref, CIM_RES_TYPE_ALL, list); out: return s; @@ -88,6 +96,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; From danms at us.ibm.com Thu Nov 13 16:39:01 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Nov 2008 08:39:01 -0800 Subject: [Libvirt-cim] [PATCH 4 of 5] Make HostedService work from root/cimv2 and register it there In-Reply-To: Message-ID: <542c7b726a870a1ca20b.1226594341@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1226594012 28800 # Node ID 542c7b726a870a1ca20b4ebae790d9287fd0cc9d # Parent 73d746ef73a16ac4212e9c7459dfd0bfc50fb2e2 Make HostedService work from root/cimv2 and register it there ...so we can get back from HostSystem to our Services. Signed-off-by: Dan Smith diff -r 73d746ef73a1 -r 542c7b726a87 Makefile.am --- a/Makefile.am Thu Nov 13 08:33:32 2008 -0800 +++ b/Makefile.am Thu Nov 13 08:33:32 2008 -0800 @@ -63,7 +63,8 @@ CIMV2_MOFS = \ schema/HostedResourcePool.mof \ - schema/ElementCapabilities.mof + schema/ElementCapabilities.mof \ + schema/HostedService.mof REGS = \ schema/ComputerSystem.registration \ @@ -117,7 +118,8 @@ CIMV2_REGS = \ schema/HostedResourcePool.registration \ - schema/ElementCapabilities.registration + schema/ElementCapabilities.registration \ + schema/HostedService.registration pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh diff -r 73d746ef73a1 -r 542c7b726a87 schema/HostedService.registration --- a/schema/HostedService.registration Thu Nov 13 08:33:32 2008 -0800 +++ b/schema/HostedService.registration Thu Nov 13 08:33:32 2008 -0800 @@ -3,3 +3,6 @@ Xen_HostedService root/virt Virt_HostedService Virt_HostedService association KVM_HostedService root/virt Virt_HostedService Virt_HostedService association LXC_HostedService root/virt Virt_HostedService Virt_HostedService association +Xen_HostedService root/cimv2 Virt_HostedService Virt_HostedService association +KVM_HostedService root/cimv2 Virt_HostedService Virt_HostedService association +LXC_HostedService root/cimv2 Virt_HostedService Virt_HostedService association diff -r 73d746ef73a1 -r 542c7b726a87 src/Virt_HostedService.c --- a/src/Virt_HostedService.c Thu Nov 13 08:33:32 2008 -0800 +++ b/src/Virt_HostedService.c Thu Nov 13 08:33:32 2008 -0800 @@ -89,38 +89,44 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; + CMPIObjectPath *vref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) return s; s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) return s; - s = get_rpcs(ref, &inst, _BROKER, info->context, false); + vref = convert_sblim_hostsystem(_BROKER, ref, info); + if (vref == NULL) + goto out; + + s = get_rpcs(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_vsms(ref, &inst, _BROKER, info->context, false); + s = get_vsms(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_migration_service(ref, &inst, _BROKER, info->context, false); + s = get_migration_service(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - s = get_console_rs(ref, &inst, _BROKER, info->context, false); + s = get_console_rs(vref, &inst, _BROKER, info->context, false); if (s.rc != CMPI_RC_OK) return s; if (!CMIsNullObject(inst)) inst_list_add(list, inst); - + out: return s; } @@ -130,6 +136,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; From danms at us.ibm.com Thu Nov 13 16:39:02 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Nov 2008 08:39:02 -0800 Subject: [Libvirt-cim] [PATCH 5 of 5] Make HostedDependency work from root/cimv2 and register it there In-Reply-To: Message-ID: # HG changeset patch # User Dan Smith # Date 1226594012 28800 # Node ID cb9db13d3b202434c16ae3e17bc407e1c84faf75 # Parent 542c7b726a870a1ca20b4ebae790d9287fd0cc9d Make HostedDependency work from root/cimv2 and register it there ...so we can get back from HostSystem to our ComputerSystems Signed-off-by: Dan Smith diff -r 542c7b726a87 -r cb9db13d3b20 Makefile.am --- a/Makefile.am Thu Nov 13 08:33:32 2008 -0800 +++ b/Makefile.am Thu Nov 13 08:33:32 2008 -0800 @@ -64,7 +64,8 @@ CIMV2_MOFS = \ schema/HostedResourcePool.mof \ schema/ElementCapabilities.mof \ - schema/HostedService.mof + schema/HostedService.mof \ + schema/HostedDependency.mof REGS = \ schema/ComputerSystem.registration \ @@ -119,7 +120,8 @@ CIMV2_REGS = \ schema/HostedResourcePool.registration \ schema/ElementCapabilities.registration \ - schema/HostedService.registration + schema/HostedService.registration \ + schema/HostedDependency.registration pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh diff -r 542c7b726a87 -r cb9db13d3b20 schema/HostedDependency.registration --- a/schema/HostedDependency.registration Thu Nov 13 08:33:32 2008 -0800 +++ b/schema/HostedDependency.registration Thu Nov 13 08:33:32 2008 -0800 @@ -3,3 +3,6 @@ Xen_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association KVM_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association LXC_HostedDependency root/virt Virt_HostedDependency Virt_HostedDependency association +Xen_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association +KVM_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association +LXC_HostedDependency root/cimv2 Virt_HostedDependency Virt_HostedDependency association diff -r 542c7b726a87 -r cb9db13d3b20 src/Virt_HostedDependency.c --- a/src/Virt_HostedDependency.c Thu Nov 13 08:33:32 2008 -0800 +++ b/src/Virt_HostedDependency.c Thu Nov 13 08:33:32 2008 -0800 @@ -64,15 +64,21 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *instance = NULL; + CMPIObjectPath *vref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) goto out; s = get_host(_BROKER, info->context, ref, &instance, true); if (s.rc != CMPI_RC_OK) goto out; - s = enum_domains(_BROKER, ref, list); + vref = convert_sblim_hostsystem(_BROKER, ref, info); + if (vref == NULL) + goto out; + + s = enum_domains(_BROKER, vref, list); out: return s; @@ -91,6 +97,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; From danms at us.ibm.com Thu Nov 13 16:39:00 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Nov 2008 08:39:00 -0800 Subject: [Libvirt-cim] [PATCH 3 of 5] Make ElementCapabilities work from root/cimv2 and register it there In-Reply-To: Message-ID: <73d746ef73a16ac4212e.1226594340@guaranine.danplanet.com> # HG changeset patch # User Dan Smith # Date 1226594012 28800 # Node ID 73d746ef73a16ac4212e9c7459dfd0bfc50fb2e2 # Parent 0ef4058624c9383119f9550eb410efaf7b057c88 Make ElementCapabilities work from root/cimv2 and register it there ...so we can get back from HostSystem to our Capabilities Signed-off-by: Dan Smith diff -r 0ef4058624c9 -r 73d746ef73a1 Makefile.am --- a/Makefile.am Thu Nov 13 08:28:46 2008 -0800 +++ b/Makefile.am Thu Nov 13 08:33:32 2008 -0800 @@ -62,7 +62,8 @@ schema/ReferencedProfile.mof CIMV2_MOFS = \ - schema/HostedResourcePool.mof + schema/HostedResourcePool.mof \ + schema/ElementCapabilities.mof REGS = \ schema/ComputerSystem.registration \ @@ -115,7 +116,8 @@ schema/ReferencedProfile.registration CIMV2_REGS = \ - schema/HostedResourcePool.registration + schema/HostedResourcePool.registration \ + schema/ElementCapabilities.registration pkgdata_DATA = $(MOFS) $(REGS) $(INTEROP_MOFS) $(INTEROP_REGS) pkgdata_SCRIPTS = provider-register.sh diff -r 0ef4058624c9 -r 73d746ef73a1 schema/ElementCapabilities.registration --- a/schema/ElementCapabilities.registration Thu Nov 13 08:28:46 2008 -0800 +++ b/schema/ElementCapabilities.registration Thu Nov 13 08:33:32 2008 -0800 @@ -3,3 +3,6 @@ Xen_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association KVM_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association LXC_ElementCapabilities root/virt Virt_ElementCapabilities Virt_ElementCapabilities association +Xen_ElementCapabilities root/cimv2 Virt_ElementCapabilities Virt_ElementCapabilities association +KVM_ElementCapabilities root/cimv2 Virt_ElementCapabilities Virt_ElementCapabilities association +LXC_ElementCapabilities root/cimv2 Virt_ElementCapabilities Virt_ElementCapabilities association diff -r 0ef4058624c9 -r 73d746ef73a1 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Thu Nov 13 08:28:46 2008 -0800 +++ b/src/Virt_ElementCapabilities.c Thu Nov 13 08:33:32 2008 -0800 @@ -146,27 +146,33 @@ { CMPIInstance *inst = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIObjectPath *vref = NULL; - if (!match_hypervisor_prefix(ref, info)) + if (!STARTS_WITH(CLASSNAME(ref), "Linux_") && + !match_hypervisor_prefix(ref, info)) goto out; s = get_host(_BROKER, info->context, ref, &inst, true); if (s.rc != CMPI_RC_OK) goto out; - s = get_vsm_cap(_BROKER, ref, &inst, false); + vref = convert_sblim_hostsystem(_BROKER, ref, info); + if (vref == NULL) + goto out; + + s = get_vsm_cap(_BROKER, vref, &inst, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); - s = get_migration_caps(ref, &inst, _BROKER, false); + s = get_migration_caps(vref, &inst, _BROKER, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); - s = get_console_rs_caps(_BROKER, ref, &inst, false); + s = get_console_rs_caps(_BROKER, vref, &inst, false); if (s.rc == CMPI_RC_OK) inst_list_add(list, inst); - s = enum_alloc_cap_instances(_BROKER, ref, NULL, NULL, list); + s = enum_alloc_cap_instances(_BROKER, vref, NULL, NULL, list); if (s.rc != CMPI_RC_OK) { CU_DEBUG("Failed to enum AC: %s", CMGetCharPtr(s.msg)); @@ -393,6 +399,7 @@ "Xen_HostSystem", "KVM_HostSystem", "LXC_HostSystem", + "Linux_ComputerSystem", NULL }; @@ -409,6 +416,7 @@ "LXC_VirtualSystemManagementService", "LXC_VirtualSystemMigrationService", "LXC_ConsoleRedirectionService", + "Linux_ComputerSystem", NULL }; From kaitlin at linux.vnet.ibm.com Thu Nov 13 17:42:25 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Nov 2008 09:42:25 -0800 Subject: [Libvirt-cim] Questions about Libvirt-CIM classes and Cimtest items In-Reply-To: <491C53C8.1000909@linux.vnet.ibm.com> References: <491AA40A.8000707@np.css.fujitsu.com> <491B55FD.7060102@linux.vnet.ibm.com> <491BB64B.5080809@np.css.fujitsu.com> <491C53C8.1000909@linux.vnet.ibm.com> Message-ID: <491C6701.8020502@linux.vnet.ibm.com> > Two things should probably be done: > 1) Update the RegisteredProfile provider to include DSP1041. > 2) Update the wiki to include which profiles the class is mentioned in > and which profile describes the class in detail Updated the wiki with a little more profile info. > >> >> And in the same, from "DSP1042" spec, it seems that some classes don't >> define on DSP1042. >> For exmaple, "ComputerSystemIndication", >> "EnabledLogicalElementCapabilities", >> "HostSystem" and "SettingsDefineCapabilities". >> But these classes define in this wiki page. >> >> Why? > > For these, this is a similar issue - these classes are referenced in > multiple profiles. I'll see if I can fix this up today so that the table > is a little more clear. > I forgot to mention - HostSystem is a subclass of ComputerSystem (which is a subclass of System). In most DMTF schema diagrams, you'll see System used to represent the host machine and ComputerSystem used to represent the virtual system. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 13 18:30:49 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Nov 2008 10:30:49 -0800 Subject: [Libvirt-cim] [PATCH 0 of 5] (#3) Fix up associations to SBLIM host system In-Reply-To: References: Message-ID: <491C7259.8050505@linux.vnet.ibm.com> Dan Smith wrote: > This is a revised version of my previous set. I tested against a fresh > pegasus install and there were no schema install complaints. +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From richardm at br.ibm.com Thu Nov 13 19:27:42 2008 From: richardm at br.ibm.com (Richard Maciel) Date: Thu, 13 Nov 2008 17:27:42 -0200 Subject: [Libvirt-cim] [PATCH] [CU] Commented some structures in the std_association.h file Message-ID: # HG changeset patch # User Richard Maciel # Date 1226604430 7200 # Node ID b26dabfc31b3c528fe632c011ce76fd5426e0fd3 # Parent 5fbf96fedcf7df32fccc3f989aa4520af8c9a264 [CU] Commented some structures in the std_association.h file * Commented the std_assoc and std_assoc_info structures to make easier for newbies to learn how to create new associations. Signed-off-by: Richard Maciel diff -r 5fbf96fedcf7 -r b26dabfc31b3 std_association.h --- a/std_association.h Wed Oct 08 10:32:18 2008 -0700 +++ b/std_association.h Thu Nov 13 17:27:10 2008 -0200 @@ -31,24 +31,61 @@ struct std_assoc_info *info, struct inst_list *list); -typedef CMPIInstance *(*make_ref_t)(const CMPIObjectPath *, - const CMPIInstance *, +typedef CMPIInstance *(*make_ref_t)(const CMPIObjectPath *ref, + const CMPIInstance *inst, struct std_assoc_info *info, - struct std_assoc *); + struct std_assoc *assoc); +/* + * std_assoc is the definition that the developer puts in their source file. It + * defines an association relationship between a set of source and target + * classes, through a named (set of) association classes and the function + * handler which does the work. + * It must be registered using the macro STDA_AssocMIStub. + */ struct std_assoc { char **source_class; + /* Defines the list of possible classes that can be passed to the + association for this case */ + char *source_prop; + /* Defines the property of the association class that refers + to the input (source class) of this case. This must match + that of the schema, and is used for automatic generation of + the reference object in the References() or ReferenceNames() + operation */ char **target_class; + /* Same as source_class, applied for target */ + char *target_prop; + /* Same as source_prop, applied for target */ char **assoc_class; + /* Defines the list of association classes which implement this + association */ assoc_handler_t handler; + /* Function handler responsible for doing the association and + returning the list of target instances of the association. + The handler function receives the reference of the source + class of the association and must map it to a list of + CMPIInstance objects (targets of the association). */ + make_ref_t make_ref; + /* Function handler responsible for creating an instance of the + association class as requested by the References() or + ReferenceNames() operation. + The handler function receives the source object path, + and the target instance, so it can create the reference which is returned + by the function. */ }; +/* + * The std_assoc_info is used to keep information related to the query done + * All members of this structure are named after the formal CIM association + * query components. + */ struct std_assoc_info { const char *assoc_class; const char *result_class; From kaitlin at linux.vnet.ibm.com Thu Nov 13 21:10:05 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Nov 2008 13:10:05 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Commented some structures in the std_association.h file In-Reply-To: References: Message-ID: <491C97AD.8070101@linux.vnet.ibm.com> Richard Maciel wrote: > # HG changeset patch > # User Richard Maciel > # Date 1226604430 7200 > # Node ID b26dabfc31b3c528fe632c011ce76fd5426e0fd3 > # Parent 5fbf96fedcf7df32fccc3f989aa4520af8c9a264 > [CU] Commented some structures in the std_association.h file You'll want to include the revision number of the patch in the subject each time you send an updated patch. It's also good to include a comment block that states what changed between the patch versions. > diff -r 5fbf96fedcf7 -r b26dabfc31b3 std_association.h > struct std_assoc { > char **source_class; > + /* Defines the list of possible classes that can be passed to the > + association for this case */ > + > char *source_prop; > + /* Defines the property of the association class that refers > + to the input (source class) of this case. This must match > + that of the schema, and is used for automatic generation of > + the reference object in the References() or ReferenceNames() > + operation */ > > char **target_class; > + /* Same as source_class, applied for target */ I would be a little more clear here - if the source class is "list of possible classes that can be passed to the association", then target_class is "list of possible classes that can be returned by the association for a given source_class list" Or something like that. > + > char *target_prop; > + /* Same as source_prop, applied for target */ > > char **assoc_class; > + /* Defines the list of association classes which implement this > + association */ The association classes don't implement the association, the provider does that. So I would say something like: "Defines the list of association classes which are implemented in this provider" or "implemented by this handler" > > assoc_handler_t handler; > + /* Function handler responsible for doing the association and > + returning the list of target instances of the association. > + The handler function receives the reference of the source > + class of the association and must map it to a list of > + CMPIInstance objects (targets of the association). */ > + > make_ref_t make_ref; > + /* Function handler responsible for creating an instance of the > + association class as requested by the References() or > + ReferenceNames() operation. For the handler field above, you don't mention the Associators() or AssociatorNames() calls. I'd remove the mention of References()/ReferenceNames() because it clear from the rest of the comment. > + The handler function receives the source object path, > + and the target instance, so it can create the reference which is returned > + by the function. */ > }; > > +/* > + * The std_assoc_info is used to keep information related to the query done > + * All members of this structure are named after the formal CIM association > + * query components. > + */ Instead of "of this structure are named after", I would say "of this structure contain the corresponding formal". Not only are the elements named after them, but they are used to hold the query components themselves. > struct std_assoc_info { > const char *assoc_class; > const char *result_class; -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From danms at us.ibm.com Thu Nov 13 21:23:31 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Nov 2008 13:23:31 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Commented some structures in the std_association.h file In-Reply-To: (Richard Maciel's message of "Thu, 13 Nov 2008 17:27:42 -0200") References: Message-ID: <871vxfwca4.fsf@caffeine.danplanet.com> RM> struct std_assoc { RM> char **source_class; RM> + /* Defines the list of possible classes that can be passed to the RM> + association for this case */ Can you put the comment above the actual definition? I think that's more conventional and intuitive. RM> + RM> char *source_prop; RM> + /* Defines the property of the association class that refers RM> + to the input (source class) of this case. This must match RM> + that of the schema, and is used for automatic generation of RM> + the reference object in the References() or ReferenceNames() RM> + operation */ RM> char **target_class; RM> + /* Same as source_class, applied for target */ RM> + RM> char *target_prop; RM> + /* Same as source_prop, applied for target */ RM> char **assoc_class; RM> + /* Defines the list of association classes which implement this RM> + association */ RM> assoc_handler_t handler; RM> + /* Function handler responsible for doing the association and RM> + returning the list of target instances of the association. RM> + The handler function receives the reference of the source RM> + class of the association and must map it to a list of RM> + CMPIInstance objects (targets of the association). */ RM> + RM> make_ref_t make_ref; RM> + /* Function handler responsible for creating an instance of the RM> + association class as requested by the References() or RM> + ReferenceNames() operation. RM> + The handler function receives the source object path, RM> + and the target instance, so it can create the reference which is returned This line looks to be longer than 80 characters. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Thu Nov 13 21:50:09 2008 From: danms at us.ibm.com (Dan Smith) Date: Thu, 13 Nov 2008 13:50:09 -0800 Subject: [Libvirt-cim] [PATCH] Handle failure to instantiate Foo_PointingDevice Message-ID: # HG changeset patch # User Dan Smith # Date 1226613004 28800 # Node ID ce7c7e1b1779e43176254108c271ab1e9501390f # Parent 9ff301e463a4de21ffae06ce58442da24e40c6cb Handle failure to instantiate Foo_PointingDevice Without this, we segfault the provider if the schema hasn't been installed for PointingDevice. Signed-off-by: Dan Smith diff -r 9ff301e463a4 -r ce7c7e1b1779 src/Virt_Device.c --- a/src/Virt_Device.c Wed Nov 12 14:22:50 2008 -0800 +++ b/src/Virt_Device.c Thu Nov 13 13:50:04 2008 -0800 @@ -289,6 +289,11 @@ pfx_from_conn(conn), "PointingDevice", ns); + if (inst == NULL) { + CU_DEBUG("Failed to get instance of %s_PointingDevice", + pfx_from_conn(conn)); + return NULL; + } if (!input_set_attr(inst, dev)) return NULL; From kaitlin at linux.vnet.ibm.com Thu Nov 13 23:06:24 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Nov 2008 15:06:24 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: <491BC574.8010304@linux.vnet.ibm.com> References: <491BC574.8010304@linux.vnet.ibm.com> Message-ID: <491CB2F0.8060805@linux.vnet.ibm.com> >> + >> + if len(assoc_info) < 1: >> + ret_val, linux_cs = check_sblim(server, virt) >> + if ret_val != PASS: >> + status = FAIL >> + raise Exception(" '%s' returned (%d) '%s' >> objects" % \ >> + (len(assoc_info), reg_classname)) >> + else: >> + status = XFAIL_RC(bug_sblim) >> + raise Exception("Known failure") >> + >> + for inst in assoc_info: >> + status, verify_ectp_list = verify_fields(inst, >> verify_ectp_list) >> + if status != PASS: >> + raise Exception("Failed to verify instance") + >> + if status == PASS: >> + for k, l in verify_ectp_list.iteritems(): >> + if len(l) != 0: >> + status = FAIL >> + raise Exception("%s items weren't returned: %s" % >> (k, l)) >> + >> + except Exception, detail: >> + logger.error("Exception: %s" % detail) >> + if status == PASS: >> + status = FAIL >> > No need to check status == PASS here, can directly assign status = FAIL. > otherwise looks good , +1 for me. I did this because if an XFAIL is thrown, we overwrite the failure type as FAIL. But I agree - it's an ugly way of preserving the XFAIL status. I'll resend with a fix for this. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 13 23:07:53 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Nov 2008 15:07:53 -0800 Subject: [Libvirt-cim] [PATCH] Handle failure to instantiate Foo_PointingDevice In-Reply-To: References: Message-ID: <491CB349.6070409@linux.vnet.ibm.com> Dan Smith wrote: > # HG changeset patch > # User Dan Smith > # Date 1226613004 28800 > # Node ID ce7c7e1b1779e43176254108c271ab1e9501390f > # Parent 9ff301e463a4de21ffae06ce58442da24e40c6cb > Handle failure to instantiate Foo_PointingDevice > > Without this, we segfault the provider if the schema hasn't been installed > for PointingDevice. > > Signed-off-by: Dan Smith > > diff -r 9ff301e463a4 -r ce7c7e1b1779 src/Virt_Device.c +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Nov 13 23:24:57 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Nov 2008 15:24:57 -0800 Subject: [Libvirt-cim] [PATCH] (#2) Fix RASD provider unregistration Message-ID: <33df023c86f12df116d5.1226618697@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225926818 28800 # Node ID 33df023c86f12df116d577c8896e34809bbd3544 # Parent 9ff301e463a4de21ffae06ce58442da24e40c6cb (#2) Fix RASD provider unregistration. Since <>_ResourceAllocationSettingData is listed first in the mof, it doesn't get properly unregistered because <>_ProcResourceAllocationSettingData haven't been unregistered yet. Updates from 1 to 2: -Fix provider_register.sh to reverse the list when uninstalling -Move superclass definition for RASD to its own mof Signed-off-by: Kaitlin Rupert diff -r 9ff301e463a4 -r 33df023c86f1 Makefile.am --- a/Makefile.am Wed Nov 12 14:22:50 2008 -0800 +++ b/Makefile.am Wed Nov 05 15:13:38 2008 -0800 @@ -27,6 +27,7 @@ schema/ElementConformsToProfile.mof \ schema/ComputerSystemIndication.mof \ schema/ComputerSystemMigrationIndication.mof \ + schema/Virt_ResourceAllocationSettingData.mof \ schema/ResourceAllocationSettingData.mof \ schema/ResourcePoolConfigurationService.mof \ schema/ResourcePoolConfigurationCapabilities.mof \ diff -r 9ff301e463a4 -r 33df023c86f1 provider-register.sh --- a/provider-register.sh Wed Nov 12 14:22:50 2008 -0800 +++ b/provider-register.sh Wed Nov 05 15:13:38 2008 -0800 @@ -233,13 +233,25 @@ fi if test $mofmode = 1 then - mymofs="$mymofs $1" + tmp_mofs="$tmp_mofs $1" else - myregs="$myregs $1" + tmp_regs="$tmp_regs $1" fi shift done - + + mymofs=`(for d in $tmp_mofs; do echo $d; done) | tac` + if test $? != 0 + then + mymofs=$tmp_mofs + fi + + myregs=`(for d in $tmp_regs; do echo $d; done) | tac` + if test $? != 0 + then + myregs=$tmp_regs + fi + if ps -C cimserver > /dev/null 2>&1 then PROVIDERMODULES=`cat $myregs 2> /dev/null | grep -v '^[[:space:]]*#.*' | cut -d ' ' -f 4 | sort | uniq` diff -r 9ff301e463a4 -r 33df023c86f1 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Wed Nov 12 14:22:50 2008 -0800 +++ b/schema/ResourceAllocationSettingData.mof Wed Nov 05 15:13:38 2008 -0800 @@ -1,16 +1,4 @@ // Copyright IBM Corp. 2007 - -class Xen_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData -{ -}; - -class KVM_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData -{ -}; - -class LXC_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData -{ -}; [Description ("Xen virtual disk configuration"), Provider("cmpi::Virt_RASD") diff -r 9ff301e463a4 -r 33df023c86f1 schema/Virt_ResourceAllocationSettingData.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/Virt_ResourceAllocationSettingData.mof Wed Nov 05 15:13:38 2008 -0800 @@ -0,0 +1,14 @@ +// Copyright IBM Corp. 2007 + +class Xen_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData +{ +}; + +class KVM_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData +{ +}; + +class LXC_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData +{ +}; + From kaitlin at linux.vnet.ibm.com Thu Nov 13 23:35:49 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Nov 2008 15:35:49 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Fix ECTP 01_forward.py to support system with multiple networks defined Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1226619337 28800 # Node ID a969c3700069c085eef3e258a58a21119f29388d # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 [TEST] #5 Fix ECTP 01_forward.py to support system with multiple networks defined This test was doing a lot of unnecessary checking (and unessary building of lists). Instead, this test calls EnumInstances on each of the classes expected to be returned by the association. These instances are then compared against the list of instances returned by the ECTP association query. The FIXME will be fixed when bug 0007 is fixed. Updates from 4 to 5: -Incase of exception, return FAIL. This doesn't currently handle to XFAIL case - this will be fixed in a follow-up patch. Updates from 3 to 4: -Fix false positive - if an exception is encountered, be sure to set the return status as FAILED. -Build the appropriate profile list needed for testing with older providers -Change provider version from 680 to 686 (which has additional ECTP changes needed to have ECTP work properly). Updates from 2 to 3: -Place most of main block in a try/except. When a failure is encountered, an exception is raised, and the test is cleaned up properly. -If the provider is < 680, don't check the ECTP values for CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0 - ECTP doesn't support this provider version. Updates from 1 to 2: -Return from test case if init_vs_pool_values() returns a failure Signed-off-by: Kaitlin Rupert diff -r 8d6f2db22eda -r a969c3700069 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Nov 11 00:19:20 2008 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Nov 13 15:35:37 2008 -0800 @@ -23,10 +23,8 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and -# the Classname are set appropriately for the results returned by the -# ElementConformsToProfile association for the RegisteredProfile class -# and ManagedElement Class +# This tc is used to verify the results of the ElementConformsToProfile +# association. This test focuses on RegisteredProfile -> ManagedElement # # "CIM:DSP1042-SystemVirtualization-1.0.0" , # "CIM:DSP1057-VirtualSystem-1.0.0a" @@ -45,98 +43,69 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml from CimTest import Globals -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, XFAIL_RC +from XenKvmLib.common_util import print_field_error, check_sblim, get_host_info +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from XenKvmLib.const import do_main, get_provider_version +from CimTest.ReturnCodes import PASS, FAIL, XFAIL, XFAIL_RC from XenKvmLib.enumclass import EnumInstances -from XenKvmLib.const import default_network_name, default_pool_name -from XenKvmLib.const import get_provider_version - sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = "domU" bug_sblim = '00007' -libvirt_cim_ectp_changes = 680 +libvirt_cim_ectp_changes = 686 -def pool_init(verify_list, pool_cn, pool_name, virt): - ccn = get_typed_class(virt, pool_cn) - instid = '%s/%s' %(pool_cn, pool_name) - verify_list[ccn]= {'InstanceID' : instid } - return verify_list - def init_vs_pool_values(server, virt): - verify_ectp_list = { } - hs_ccn = get_typed_class(virt, 'HostSystem') - host = live.hostname(server) - cs_fields = { - 'CreationClassName' : hs_ccn, - 'Name' : host - } + verify_ectp_list = {} - verify_ectp_list[hs_ccn] = cs_fields + cn_names = ["ComputerSystem"] - cs_ccn = get_typed_class(virt, 'ComputerSystem') - verify_ectp_list[cs_ccn] = cs_fields.copy() - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn - verify_ectp_list[cs_ccn]['Name'] = test_dom + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev >= libvirt_cim_ectp_changes: + cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", + "ProcessorPool", "MemoryPool"] + cn_names.extend(cn_names2) - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') - verify_ectp_list[vs_ccn] = cs_fields.copy() - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn - verify_ectp_list[vs_ccn]['SystemName'] = host - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' + status, host_name, host_ccn = get_host_info(server, virt) + if status != PASS: + logger.error("Unable to get host system instance objects") + return FAIL, verify_ectp_list - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', - default_pool_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', - default_network_name, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) + #FIXME - get_host_info() should be updated to return the host instance + insts = EnumInstances(server, host_ccn, True) + if len(insts) < 1: + logger.error("Expected 1 %s instance", host_ccn) + return FAIL, verify_ectp_list - - return verify_ectp_list + verify_ectp_list[host_ccn] = insts -def verify_fields(assoc_val, pllst_index, vs_pool_values): + for cn_base in cn_names: + cn = get_typed_class(virt, cn_base) + insts = EnumInstances(server, cn, True) + + if len(insts) < 1: + logger.error("Expected at least 1 %s instance", cn) + return FAIL, verify_ectp_list + + verify_ectp_list[cn] = insts + + return PASS, verify_ectp_list + +def verify_fields(assoc_val, managed_ele_values): try: - field_names = vs_pool_values[pllst_index].keys() - values = vs_pool_values[pllst_index] - for field in field_names: - if values[field] != assoc_val[field]: - print_field_error(field, assoc_val[field], values[field]) - return FAIL + cn = assoc_val.classname + elements = managed_ele_values[cn] + + for ele in elements: + if assoc_val.items() == ele.items(): + managed_ele_values[cn].remove(ele) + return PASS, managed_ele_values + except Exception, details: - logger.error("Exception: In fn verify_fields() %s", details) - return FAIL + logger.error("verify_fields() exception: %s", details) + return FAIL, managed_ele_values - return PASS - -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): - try: - pllst_index = assoc_info[0]['CreationClassName'] - assoc_val = None - if 'HostSystem' in pllst_index or \ - 'VirtualSystemMigrationService' in pllst_index: - if len(assoc_info) != 1: - logger.error("'%s' returned '%d' records, expected 1", - pllst_index, len(assoc_info)) - return FAIL - assoc_val = assoc_info[0] - else: - # For ComputerSystem info - for inst in assoc_info: - if inst['Name'] == test_dom: - assoc_val = inst - break - except Exception, details: - logger.error("Exception: In fn verify_cs_hs_mig_fields() %s", details) - return FAIL - - if assoc_val == None: - return FAIL - - return verify_fields(assoc_val, pllst_index, vs_pool_values) + logger.error("%s not in expected list %s", assoc_val, elements) + return FAIL, managed_ele_values def get_proflist(server, reg_classname, virt): profiles_instid_list = [] @@ -150,8 +119,8 @@ len_prof_list = 7 if len(proflist) < len_prof_list: logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", - reg_classname, len(proflist), 'Profile', len_prof_list) - status = FAIL + reg_classname, len(proflist), 'Profile', len_prof_list) + return FAIL, profiles_instid_list except Exception, detail: logger.error(CIM_ERROR_ENUMERATE, reg_classname) @@ -161,54 +130,17 @@ if status != PASS: return status, profiles_instid_list - profiles_instid_list = [ profile.InstanceID for profile in proflist ] + unsupp_prof = [] + if curr_cim_rev < libvirt_cim_ectp_changes: + unsupp_prof = ["CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0", + "CIM:DSP1045-MemoryResourceVirtualization-1.0.0", + "CIM:DSP1081-VirtualSystemMigration-0.8.1"] + + for profile in proflist: + if profile.InstanceID not in unsupp_prof: + profiles_instid_list.append(profile.InstanceID) return status, profiles_instid_list - - -def verify_ectp_assoc(server, virt): - 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: - return status - - verify_ectp_list = init_vs_pool_values(server, virt) - for devid in inst_lst : - logger.info("Verifying '%s' with '%s'", an, devid) - try: - assoc_info = assoc.Associators(server, - an, - reg_classname, - InstanceID = devid) - if len(assoc_info) < 1: - 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: - instid = assoc_info[0]['InstanceID'] - index, other = instid.split("/") - cn = get_typed_class(virt, index) - status = verify_fields(assoc_info[0], cn, verify_ectp_list) - else: - ccn = assoc_info[0]['CreationClassName'] - status = verify_cs_hs_mig_fields(assoc_info, verify_ectp_list) - - if status != PASS: - break - - except Exception, detail: - logger.error(CIM_ERROR_ASSOCIATORS, an) - logger.error("Exception: %s" % detail) - status = FAIL - return status @do_main(sup_types) def main(): @@ -216,7 +148,7 @@ server = options.ip virt = options.virt - status = PASS + status = None destroy_and_undefine_all(options.ip, options.virt) virt_xml = vxml.get_class(options.virt) @@ -232,11 +164,52 @@ logger.error('Unable to start domain %s' % test_dom) return FAIL - prev_namespace = Globals.CIM_NS Globals.CIM_NS = 'root/interop' - status = verify_ectp_assoc(server, virt) + try: + reg_classname = get_typed_class(virt, "RegisteredProfile") + an = get_typed_class(virt,"ElementConformsToProfile") + + status, prof_inst_lst = get_proflist(server, reg_classname, virt) + if status != PASS: + raise Exception("Failed to get profile list") + + status, verify_ectp_list = init_vs_pool_values(server, virt) + if status != PASS: + raise Exception("Failed to get instances needed for verification") + + for prof_id in prof_inst_lst: + logger.info("Verifying '%s' with '%s'", an, prof_id) + assoc_info = assoc.Associators(server, + an, + reg_classname, + InstanceID = prof_id) + + if len(assoc_info) < 1: + ret_val, linux_cs = check_sblim(server, virt) + if ret_val != PASS: + status = FAIL + raise Exception(" '%s' returned (%d) '%s' objects" % \ + (len(assoc_info), reg_classname)) + else: + status = XFAIL_RC(bug_sblim) + raise Exception("Known failure") + + for inst in assoc_info: + status, verify_ectp_list = verify_fields(inst, verify_ectp_list) + if status != PASS: + raise Exception("Failed to verify instance") + + if status == PASS: + for k, l in verify_ectp_list.iteritems(): + if len(l) != 0: + status = FAIL + raise Exception("%s items weren't returned: %s" % (k, l)) + + except Exception, detail: + logger.error("Exception: %s" % detail) + status = FAIL Globals.CIM_NS = prev_namespace cxml.destroy(server) From kaitlin at linux.vnet.ibm.com Thu Nov 13 23:57:14 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 13 Nov 2008 15:57:14 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: References: Message-ID: <491CBEDA.107@linux.vnet.ibm.com> > > Daisy - did you resolve your problem? I tested with an F9 rpm using > > Pegasus, and this test passed for me. > > > > > This tc passes for Pegasus, but it fails for sfcb. > It expects different error code and description for sfcb and Pegasus. > > If I change the expr_valuese from 1) to 2), it passes for sfcb. > > 1) > expr_values = { > "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, > 'desc' : 'Unable to determine\ > resource type' }, > } > > 2) > expr_values = { > "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_NOT_FOUNG, > 'desc' : 'No such instance' }, > } > > Maybe we can verify what CIMOM is there on the machine and check the > error information accordingly to fix this issue, > but I remember that somebody says it isn't a good idea to check the > cimom type in tc, any better idea? > > Thanks! This isn't a difference in CIMOMs. If you run with recent providers with both sfcb and pegasus, the test will fail on systems. This failure is due to a change in the providers - it's due to changeset 721. So you'll need to branch this test case so that the error messages are appropriate for the given provider revision. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Fri Nov 14 05:42:33 2008 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 13 Nov 2008 21:42:33 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add branch to SettingsDefineCapabilities/03_forward_errs.py Message-ID: # HG changeset patch # User Guolian Yun # Date 1226641347 28800 # Node ID feb7ac23474781048f7065da317087b7064d21f7 # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 [TEST] Add branch to SettingsDefineCapabilities/03_forward_errs.py Signed-off-by: Guolian Yun diff -r 8d6f2db22eda -r feb7ac234747 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Tue Nov 11 00:19:20 2008 -0800 +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Thu Nov 13 21:42:27 2008 -0800 @@ -32,11 +32,11 @@ from XenKvmLib.common_util import try_assoc from XenKvmLib import assoc 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 from XenKvmLib.classes import get_typed_class platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] - +libvirt_modify_setting_changes = 721 expr_values = { "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, 'desc' : 'Missing InstanceID'}, @@ -64,7 +64,7 @@ expr_values=expr_values['invalid_instid_keyname'], bug_no="") -def err_invalid_instid_keyvalue(virt, conn, field): +def err_invalid_instid_keyvalue(server, virt, conn, field): # Input: # ------ # wbemcli ai -ac Xen_SettingsDefineCapabilities \ @@ -79,6 +79,12 @@ assoc_classname = get_typed_class(virt, "SettingsDefineCapabilities") classname = get_typed_class(virt, "AllocationCapabilities") keys = { 'InstanceID' : field } + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev >= libvirt_modify_setting_changes: + expr_values['invalid_instid_keyvalue'] = { + 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : 'No such instance' + } return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ expr_values=expr_values['invalid_instid_keyvalue'], bug_no="") @@ -95,7 +101,7 @@ if ret_value != PASS: logger.error("------ FAILED: Invalid InstanceID Key Name.------") return ret_value - ret_value = err_invalid_instid_keyvalue(virt, conn, + ret_value = err_invalid_instid_keyvalue(options.ip, virt, conn, field='INVALID_InstID_KeyValue') if ret_value != PASS: logger.error("------ FAILED: Invalid InstanceID Key Value.------") From yunguol at cn.ibm.com Fri Nov 14 05:31:45 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 14 Nov 2008 13:31:45 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: <491CBEDA.107@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2008-11-14 07:57:14: > > > Daisy - did you resolve your problem? I tested with an F9 rpm using > > > Pegasus, and this test passed for me. > > > > > > > > This tc passes for Pegasus, but it fails for sfcb. > > It expects different error code and description for sfcb and Pegasus. > > > > If I change the expr_valuese from 1) to 2), it passes for sfcb. > > > > 1) > > expr_values = { > > "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_FAILED, > > 'desc' : 'Unable to determine\ > > resource type' }, > > } > > > > 2) > > expr_values = { > > "invalid_instid_keyvalue" : { 'rc' : pywbem.CIM_ERR_NOT_FOUNG, > > 'desc' : 'No such instance' }, > > } > > > > Maybe we can verify what CIMOM is there on the machine and check the > > error information accordingly to fix this issue, > > but I remember that somebody says it isn't a good idea to check the > > cimom type in tc, any better idea? > > > > Thanks! > > This isn't a difference in CIMOMs. If you run with recent providers > with both sfcb and pegasus, the test will fail on systems. > > This failure is due to a change in the providers - it's due to changeset > 721. So you'll need to branch this test case so that the error messages > are appropriate for the given provider revision. Thanks - Kaitlin. I'll cook up a patch for this. > > -- > 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 Nov 14 05:34:57 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 14 Nov 2008 13:34:57 +0800 Subject: [Libvirt-cim] KVM on sfcb Test Run Summary for Nov 14 2008 Message-ID: ================================================= KVM on sfcb Test Run Summary for Nov 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: 749 Libvirt-cim changeset: 9ff301e463a4 Cimtest revision: 490 Cimtest changeset: 8d6f2db22eda ================================================= FAIL : 4 XFAIL : 2 SKIP : 5 PASS : 128 ----------------- Total : 139 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL VSSD - 04_vssd_to_rasd.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 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: FAIL ERROR - Failed to get associators information for KVM_SettingsDefineState ERROR - Exception: u'KVM_PointingDevice' 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: 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 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: FAIL ERROR - Mistmatching KVM_InputResourceAllocationSettingData values -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.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 Fri Nov 14 05:49:32 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 14 Nov 2008 13:49:32 +0800 Subject: [Libvirt-cim] LXC on sfcb Test Run Summary for Nov 14 2008 Message-ID: ================================================= LXC on sfcb Test Run Summary for Nov 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: 749 Libvirt-cim changeset: 9ff301e463a4 Cimtest revision: 490 Cimtest changeset: 8d6f2db22eda ================================================= FAIL : 4 XFAIL : 1 SKIP : 38 PASS : 96 ----------------- Total : 139 ================================================= FAIL Test Summary: HostSystem - 02_hostsystem_to_rasd.py: FAIL SettingsDefineCapabilities - 03_forward_errs.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL VirtualSystemManagementService - 12_referenced_config.py: FAIL ================================================= XFAIL Test Summary: VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 06_paused_active_suspend.py: SKIP ComputerSystem - 23_suspend_suspend.py: SKIP ComputerSystem - 32_start_reboot.py: SKIP ComputerSystem - 33_suspend_reboot.py: SKIP ComputerSystem - 35_start_reset.py: SKIP ComputerSystem - 40_RSC_start.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystemIndication - 01_created_indication.py: SKIP ElementAllocatedFromPool - 03_reverse_errs.py: SKIP ElementAllocatedFromPool - 04_forward_errs.py: SKIP HostedDependency - 03_enabledstate.py: SKIP LogicalDisk - 01_disk.py: SKIP LogicalDisk - 02_nodevs.py: SKIP LogicalDisk - 03_ld_gi_errs.py: SKIP NetworkPort - 01_netport.py: SKIP NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: SKIP Processor - 02_definesys_get_procs.py: SKIP Processor - 03_proc_gi_errs.py: SKIP Profile - 02_profile_to_elec.py: SKIP RASD - 04_disk_rasd_size.py: SKIP ResourceAllocationFromPool - 05_RAPF_err.py: SKIP ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP 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: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: SKIP -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: SKIP -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: SKIP -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: SKIP -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: SKIP -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: SKIP -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: SKIP -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: FAIL ERROR - InstanceID Mismatch ERROR - Returned CrossClass_GuestDom//tmp instead of CrossClass_GuestDom/hda ERROR - Mistmatching association values 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: SKIP -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: SKIP -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: SKIP -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: SKIP -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: SKIP -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: SKIP -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: SKIP -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: SKIP -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: SKIP -------------------------------------------------------------------- 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: 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: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: FAIL ERROR - Mistmatching LXC_InputResourceAllocationSettingData values -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00008> -------------------------------------------------------------------- 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 Fri Nov 14 06:05:18 2008 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 14 Nov 2008 14:05:18 +0800 Subject: [Libvirt-cim] KVM on Pegasus Test Run Summary for Nov 14 2008 Message-ID: ================================================= KVM on Pegasus Test Run Summary for Nov 14 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: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 490 Cimtest changeset: 8d6f2db22eda ================================================= FAIL : 3 XFAIL : 2 SKIP : 8 PASS : 126 ----------------- Total : 139 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemManagementService - 15_mod_system_settings.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 RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.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: FAIL ERROR - 'KVM_ElementConformsToProfile' returned (0) 'KVM_RegisteredProfile' objects CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: 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 `VirtualDevice' property ERROR - Unable to define rstest_disk_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Missing `VirtualDevice' property -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: FAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 -------------------------------------------------------------------- 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 Fri Nov 14 08:30:09 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 14 Nov 2008 14:00:09 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: References: Message-ID: <491D3711.8010807@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1226619337 28800 > # Node ID a969c3700069c085eef3e258a58a21119f29388d > # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 > [TEST] #5 Fix ECTP 01_forward.py to support system with multiple networks defined > > This test was doing a lot of unnecessary checking (and unessary building of > lists). Instead, this test calls EnumInstances on each of the classes expected > to be returned by the association. > > These instances are then compared against the list of instances returned by the ECTP association query. > > The FIXME will be fixed when bug 0007 is fixed. > > Updates from 4 to 5: > -Incase of exception, return FAIL. This doesn't currently handle to XFAIL > case - this will be fixed in a follow-up patch. > > Updates from 3 to 4: > -Fix false positive - if an exception is encountered, be sure to set the > return status as FAILED. > -Build the appropriate profile list needed for testing with older providers > -Change provider version from 680 to 686 (which has additional ECTP changes > needed to have ECTP work properly). > > Updates from 2 to 3: > -Place most of main block in a try/except. When a failure is encountered, > an exception is raised, and the test is cleaned up properly. > -If the provider is < 680, don't check the ECTP values for > CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0 - ECTP doesn't support > this provider version. > > Updates from 1 to 2: > -Return from test case if init_vs_pool_values() returns a failure > > Signed-off-by: Kaitlin Rupert > > diff -r 8d6f2db22eda -r a969c3700069 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Nov 11 00:19:20 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Nov 13 15:35:37 2008 -0800 > @@ -23,10 +23,8 @@ > # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > # > > -# This tc is used to verify the EnabledState, HealthState, EnabledDefault and > -# the Classname are set appropriately for the results returned by the > -# ElementConformsToProfile association for the RegisteredProfile class > -# and ManagedElement Class > +# This tc is used to verify the results of the ElementConformsToProfile > +# association. This test focuses on RegisteredProfile -> ManagedElement > # > # "CIM:DSP1042-SystemVirtualization-1.0.0" , > # "CIM:DSP1057-VirtualSystem-1.0.0a" > @@ -45,98 +43,69 @@ > from XenKvmLib.classes import get_typed_class > from XenKvmLib import vxml > from CimTest import Globals > -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, XFAIL_RC > +from XenKvmLib.common_util import print_field_error, check_sblim, get_host_info > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > +from XenKvmLib.const import do_main, get_provider_version > +from CimTest.ReturnCodes import PASS, FAIL, XFAIL, XFAIL_RC > from XenKvmLib.enumclass import EnumInstances > -from XenKvmLib.const import default_network_name, default_pool_name > -from XenKvmLib.const import get_provider_version > - > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > test_dom = "domU" > bug_sblim = '00007' > -libvirt_cim_ectp_changes = 680 > +libvirt_cim_ectp_changes = 686 > > -def pool_init(verify_list, pool_cn, pool_name, virt): > - ccn = get_typed_class(virt, pool_cn) > - instid = '%s/%s' %(pool_cn, pool_name) > - verify_list[ccn]= {'InstanceID' : instid } > - return verify_list > - > def init_vs_pool_values(server, virt): > - verify_ectp_list = { } > - hs_ccn = get_typed_class(virt, 'HostSystem') > - host = live.hostname(server) > - cs_fields = { > - 'CreationClassName' : hs_ccn, > - 'Name' : host > - } > + verify_ectp_list = {} > > - verify_ectp_list[hs_ccn] = cs_fields > + cn_names = ["ComputerSystem"] > > - cs_ccn = get_typed_class(virt, 'ComputerSystem') > - verify_ectp_list[cs_ccn] = cs_fields.copy() > - verify_ectp_list[cs_ccn]['CreationClassName'] = cs_ccn > - verify_ectp_list[cs_ccn]['Name'] = test_dom > + curr_cim_rev, changeset = get_provider_version(virt, server) > + if curr_cim_rev >= libvirt_cim_ectp_changes: > + cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", > + "ProcessorPool", "MemoryPool"] > + cn_names.extend(cn_names2) > > - vs_ccn = get_typed_class(virt, 'VirtualSystemMigrationService') > - verify_ectp_list[vs_ccn] = cs_fields.copy() > - verify_ectp_list[vs_ccn]['CreationClassName'] = vs_ccn > - verify_ectp_list[vs_ccn]['SystemCreationClassName'] = hs_ccn > - verify_ectp_list[vs_ccn]['SystemName'] = host > - verify_ectp_list[vs_ccn]['Name'] = 'MigrationService' > + status, host_name, host_ccn = get_host_info(server, virt) > + if status != PASS: > + logger.error("Unable to get host system instance objects") > + return FAIL, verify_ectp_list > > - verify_ectp_list = pool_init(verify_ectp_list, 'DiskPool', > - default_pool_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'NetworkPool', > - default_network_name, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'ProcessorPool', 0, virt) > - verify_ectp_list = pool_init(verify_ectp_list, 'MemoryPool', 0, virt) > + #FIXME - get_host_info() should be updated to return the host instance > + insts = EnumInstances(server, host_ccn, True) > + if len(insts) < 1: > + logger.error("Expected 1 %s instance", host_ccn) > + return FAIL, verify_ectp_list > > The test case will fail for the case where we have sblim-base-provider installed with the following error. -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - Expected 1 Linux_ComputerSystem instance ERROR - Exception: Failed to get instances needed for verification CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- This is because we are querying for the Linux_CoumputerSystem with 'root/virt' namespace. We need to store the previous namespace and change the namespace to "Globals.CIM_NS = 'root/cimv2'" depending on if the machine has sblim-base-provider installed before enumerating for Linux_ComputerSystem and then restore back to the previous namespace. > - > - return verify_ectp_list > + verify_ectp_list[host_ccn] = insts > > -def verify_fields(assoc_val, pllst_index, vs_pool_values): > + for cn_base in cn_names: > + cn = get_typed_class(virt, cn_base) > + insts = EnumInstances(server, cn, True) > + > + if len(insts) < 1: > + logger.error("Expected at least 1 %s instance", cn) > + return FAIL, verify_ectp_list > + > + verify_ectp_list[cn] = insts > + > + return PASS, verify_ectp_list > + > +def verify_fields(assoc_val, managed_ele_values): > try: > - field_names = vs_pool_values[pllst_index].keys() > - values = vs_pool_values[pllst_index] > - for field in field_names: > - if values[field] != assoc_val[field]: > - print_field_error(field, assoc_val[field], values[field]) > - return FAIL > + cn = assoc_val.classname > + elements = managed_ele_values[cn] > + > + for ele in elements: > + if assoc_val.items() == ele.items(): > + managed_ele_values[cn].remove(ele) > + return PASS, managed_ele_values > + > except Exception, details: > - logger.error("Exception: In fn verify_fields() %s", details) > - return FAIL > + logger.error("verify_fields() exception: %s", details) > + return FAIL, managed_ele_values > > - return PASS > - > -def verify_cs_hs_mig_fields(assoc_info, vs_pool_values): > - try: > - pllst_index = assoc_info[0]['CreationClassName'] > - assoc_val = None > - if 'HostSystem' in pllst_index or \ > - 'VirtualSystemMigrationService' in pllst_index: > - if len(assoc_info) != 1: > - logger.error("'%s' returned '%d' records, expected 1", > - pllst_index, len(assoc_info)) > - return FAIL > - assoc_val = assoc_info[0] > - else: > - # For ComputerSystem info > - for inst in assoc_info: > - if inst['Name'] == test_dom: > - assoc_val = inst > - break > - except Exception, details: > - logger.error("Exception: In fn verify_cs_hs_mig_fields() %s", details) > - return FAIL > - > - if assoc_val == None: > - return FAIL > - > - return verify_fields(assoc_val, pllst_index, vs_pool_values) > + logger.error("%s not in expected list %s", assoc_val, elements) > + return FAIL, managed_ele_values > > def get_proflist(server, reg_classname, virt): > profiles_instid_list = [] > @@ -150,8 +119,8 @@ > len_prof_list = 7 > if len(proflist) < len_prof_list: > logger.error("'%s' returned '%d' '%s' objects, expected atleast %d", > - reg_classname, len(proflist), 'Profile', len_prof_list) > - status = FAIL > + reg_classname, len(proflist), 'Profile', len_prof_list) > + return FAIL, profiles_instid_list > > except Exception, detail: > logger.error(CIM_ERROR_ENUMERATE, reg_classname) > @@ -161,54 +130,17 @@ > if status != PASS: > return status, profiles_instid_list > > - profiles_instid_list = [ profile.InstanceID for profile in proflist ] > + unsupp_prof = [] > + if curr_cim_rev < libvirt_cim_ectp_changes: > + unsupp_prof = ["CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0", > + "CIM:DSP1045-MemoryResourceVirtualization-1.0.0", > + "CIM:DSP1081-VirtualSystemMigration-0.8.1"] > + > + for profile in proflist: > + if profile.InstanceID not in unsupp_prof: > + profiles_instid_list.append(profile.InstanceID) > > return status, profiles_instid_list > - > - > -def verify_ectp_assoc(server, virt): > - 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: > - return status > - > - verify_ectp_list = init_vs_pool_values(server, virt) > - for devid in inst_lst : > - logger.info("Verifying '%s' with '%s'", an, devid) > - try: > - assoc_info = assoc.Associators(server, > - an, > - reg_classname, > - InstanceID = devid) > - if len(assoc_info) < 1: > - 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: > - instid = assoc_info[0]['InstanceID'] > - index, other = instid.split("/") > - cn = get_typed_class(virt, index) > - status = verify_fields(assoc_info[0], cn, verify_ectp_list) > - else: > - ccn = assoc_info[0]['CreationClassName'] > - status = verify_cs_hs_mig_fields(assoc_info, verify_ectp_list) > - > - if status != PASS: > - break > - > - except Exception, detail: > - logger.error(CIM_ERROR_ASSOCIATORS, an) > - logger.error("Exception: %s" % detail) > - status = FAIL > - return status > > @do_main(sup_types) > def main(): > @@ -216,7 +148,7 @@ > server = options.ip > virt = options.virt > > - status = PASS > + status = None > destroy_and_undefine_all(options.ip, options.virt) > > virt_xml = vxml.get_class(options.virt) > @@ -232,11 +164,52 @@ > logger.error('Unable to start domain %s' % test_dom) > return FAIL > > - > prev_namespace = Globals.CIM_NS > Globals.CIM_NS = 'root/interop' > > - status = verify_ectp_assoc(server, virt) > + try: > + reg_classname = get_typed_class(virt, "RegisteredProfile") > + an = get_typed_class(virt,"ElementConformsToProfile") > + > + status, prof_inst_lst = get_proflist(server, reg_classname, virt) > + if status != PASS: > + raise Exception("Failed to get profile list") > + > + status, verify_ectp_list = init_vs_pool_values(server, virt) > + if status != PASS: > + raise Exception("Failed to get instances needed for verification") > + > + for prof_id in prof_inst_lst: > + logger.info("Verifying '%s' with '%s'", an, prof_id) > + assoc_info = assoc.Associators(server, > + an, > + reg_classname, > + InstanceID = prof_id) > + > + if len(assoc_info) < 1: > + ret_val, linux_cs = check_sblim(server, virt) > + if ret_val != PASS: > + status = FAIL > + raise Exception(" '%s' returned (%d) '%s' objects" % \ > + (len(assoc_info), reg_classname)) > + else: > + status = XFAIL_RC(bug_sblim) > + raise Exception("Known failure") > + > + for inst in assoc_info: > + status, verify_ectp_list = verify_fields(inst, verify_ectp_list) > + if status != PASS: > + raise Exception("Failed to verify instance") > + > + if status == PASS: > + for k, l in verify_ectp_list.iteritems(): > + if len(l) != 0: > + status = FAIL > + raise Exception("%s items weren't returned: %s" % (k, l)) > + > + except Exception, detail: > + logger.error("Exception: %s" % detail) > + status = FAIL > Since we are setting the status appropriately in all the cases within the try block, I dont think we need to set this explicitly. > Globals.CIM_NS = prev_namespace > cxml.destroy(server) > > _______________________________________________ > 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 Nov 14 09:41:51 2008 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 14 Nov 2008 15:11:51 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Add branch to SettingsDefineCapabilities/03_forward_errs.py In-Reply-To: References: Message-ID: <491D47DF.5060106@linux.vnet.ibm.com> +1 for me. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1226641347 28800 > # Node ID feb7ac23474781048f7065da317087b7064d21f7 > # Parent 8d6f2db22eda9bda08ff26caa8982f137a3d4486 > [TEST] Add branch to SettingsDefineCapabilities/03_forward_errs.py > > Signed-off-by: Guolian Yun > > diff -r 8d6f2db22eda -r feb7ac234747 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Tue Nov 11 00:19:20 2008 -0800 > +++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/03_forward_errs.py Thu Nov 13 21:42:27 2008 -0800 > @@ -32,11 +32,11 @@ > from XenKvmLib.common_util import try_assoc > from XenKvmLib import assoc > 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 > from XenKvmLib.classes import get_typed_class > > platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC'] > - > +libvirt_modify_setting_changes = 721 > expr_values = { > "invalid_instid_keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, > 'desc' : 'Missing InstanceID'}, > @@ -64,7 +64,7 @@ > expr_values=expr_values['invalid_instid_keyname'], > bug_no="") > > -def err_invalid_instid_keyvalue(virt, conn, field): > +def err_invalid_instid_keyvalue(server, virt, conn, field): > # Input: > # ------ > # wbemcli ai -ac Xen_SettingsDefineCapabilities \ > @@ -79,6 +79,12 @@ > assoc_classname = get_typed_class(virt, "SettingsDefineCapabilities") > classname = get_typed_class(virt, "AllocationCapabilities") > keys = { 'InstanceID' : field } > + curr_cim_rev, changeset = get_provider_version(virt, server) > + if curr_cim_rev >= libvirt_modify_setting_changes: > + expr_values['invalid_instid_keyvalue'] = { > + 'rc' : pywbem.CIM_ERR_NOT_FOUND, > + 'desc' : 'No such instance' > + } > return try_assoc(conn, classname, assoc_classname, keys, field_name=field, \ > expr_values=expr_values['invalid_instid_keyvalue'], > bug_no="") > @@ -95,7 +101,7 @@ > if ret_value != PASS: > logger.error("------ FAILED: Invalid InstanceID Key Name.------") > return ret_value > - ret_value = err_invalid_instid_keyvalue(virt, conn, > + ret_value = err_invalid_instid_keyvalue(options.ip, virt, conn, > field='INVALID_InstID_KeyValue') > if ret_value != PASS: > logger.error("------ FAILED: Invalid InstanceID Key Value.------") > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From danms at us.ibm.com Fri Nov 14 15:37:53 2008 From: danms at us.ibm.com (Dan Smith) Date: Fri, 14 Nov 2008 07:37:53 -0800 Subject: [Libvirt-cim] [PATCH] (#2) Fix RASD provider unregistration In-Reply-To: <33df023c86f12df116d5.1226618697@localhost.localdomain> (Kaitlin Rupert's message of "Thu, 13 Nov 2008 15:24:57 -0800") References: <33df023c86f12df116d5.1226618697@localhost.localdomain> Message-ID: <8763mq2u9a.fsf@caffeine.danplanet.com> KR> diff -r 9ff301e463a4 -r 33df023c86f1 provider-register.sh KR> --- a/provider-register.sh Wed Nov 12 14:22:50 2008 -0800 KR> +++ b/provider-register.sh Wed Nov 05 15:13:38 2008 -0800 KR> @@ -233,13 +233,25 @@ KR> fi KR> if test $mofmode = 1 KR> then KR> - mymofs="$mymofs $1" KR> + tmp_mofs="$tmp_mofs $1" KR> else KR> - myregs="$myregs $1" KR> + tmp_regs="$tmp_regs $1" KR> fi KR> shift KR> done KR> - KR> + KR> + mymofs=`(for d in $tmp_mofs; do echo $d; done) | tac` KR> + if test $? != 0 KR> + then KR> + mymofs=$tmp_mofs KR> + fi KR> + KR> + myregs=`(for d in $tmp_regs; do echo $d; done) | tac` KR> + if test $? != 0 KR> + then KR> + myregs=$tmp_regs KR> + fi KR> + Instead of building the temporary list forwards and then reversing it, why not just build it in reverse? If you change this line: myregs="$myregs $1" to myregs="$1 $myregs" Won't that accomplish the goal without the dual lists, extra error path, etc? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Fri Nov 14 20:17:18 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Nov 2008 12:17:18 -0800 Subject: [Libvirt-cim] [PATCH] (#2) Fix RASD provider unregistration In-Reply-To: <8763mq2u9a.fsf@caffeine.danplanet.com> References: <33df023c86f12df116d5.1226618697@localhost.localdomain> <8763mq2u9a.fsf@caffeine.danplanet.com> Message-ID: <491DDCCE.3040604@linux.vnet.ibm.com> > Instead of building the temporary list forwards and then reversing it, > why not just build it in reverse? > > If you change this line: > > myregs="$myregs $1" > > to > > myregs="$1 $myregs" > > Won't that accomplish the goal without the dual lists, extra error > path, etc? > Yeah, that would be a lot simpler. Not sure what I was thinking here. New version on the way. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Nov 14 20:29:40 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Nov 2008 12:29:40 -0800 Subject: [Libvirt-cim] [PATCH] (#3) Fix RASD provider unregistration Message-ID: <5680eb18d7ea2971acf4.1226694580@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1225926818 28800 # Node ID 5680eb18d7ea2971acf4fbdb50e3e69f5c014ef0 # Parent ce7c7e1b1779e43176254108c271ab1e9501390f (#3) Fix RASD provider unregistration. Since <>_ResourceAllocationSettingData is listed first in the mof, it doesn't get properly unregistered because <>_ProcResourceAllocationSettingData haven't been unregistered yet. Updates from 2 to 3: -Build mof and reg list in reverse instead of building them forward and then reversing the list Updates from 1 to 2: -Fix provider_register.sh to reverse the list when uninstalling -Move superclass definition for RASD to its own mof Signed-off-by: Kaitlin Rupert diff -r ce7c7e1b1779 -r 5680eb18d7ea Makefile.am --- a/Makefile.am Thu Nov 13 13:50:04 2008 -0800 +++ b/Makefile.am Wed Nov 05 15:13:38 2008 -0800 @@ -27,6 +27,7 @@ schema/ElementConformsToProfile.mof \ schema/ComputerSystemIndication.mof \ schema/ComputerSystemMigrationIndication.mof \ + schema/Virt_ResourceAllocationSettingData.mof \ schema/ResourceAllocationSettingData.mof \ schema/ResourcePoolConfigurationService.mof \ schema/ResourcePoolConfigurationCapabilities.mof \ diff -r ce7c7e1b1779 -r 5680eb18d7ea provider-register.sh --- a/provider-register.sh Thu Nov 13 13:50:04 2008 -0800 +++ b/provider-register.sh Wed Nov 05 15:13:38 2008 -0800 @@ -233,9 +233,9 @@ fi if test $mofmode = 1 then - mymofs="$mymofs $1" + mymofs="$1 $mymofs" else - myregs="$myregs $1" + myregs="$1 $myregs" fi shift done diff -r ce7c7e1b1779 -r 5680eb18d7ea schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Thu Nov 13 13:50:04 2008 -0800 +++ b/schema/ResourceAllocationSettingData.mof Wed Nov 05 15:13:38 2008 -0800 @@ -1,16 +1,4 @@ // Copyright IBM Corp. 2007 - -class Xen_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData -{ -}; - -class KVM_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData -{ -}; - -class LXC_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData -{ -}; [Description ("Xen virtual disk configuration"), Provider("cmpi::Virt_RASD") diff -r ce7c7e1b1779 -r 5680eb18d7ea schema/Virt_ResourceAllocationSettingData.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/Virt_ResourceAllocationSettingData.mof Wed Nov 05 15:13:38 2008 -0800 @@ -0,0 +1,14 @@ +// Copyright IBM Corp. 2007 + +class Xen_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData +{ +}; + +class KVM_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData +{ +}; + +class LXC_ResourceAllocationSettingData : CIM_ResourceAllocationSettingData +{ +}; + From kaitlin at linux.vnet.ibm.com Fri Nov 14 20:35:34 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Nov 2008 12:35:34 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Fix ECTP 01_forward.py to support system with multiple networks defined In-Reply-To: <491D3711.8010807@linux.vnet.ibm.com> References: <491D3711.8010807@linux.vnet.ibm.com> Message-ID: <491DE116.1080502@linux.vnet.ibm.com> >> + #FIXME - get_host_info() should be updated to return the host >> instance >> + insts = EnumInstances(server, host_ccn, True) >> + if len(insts) < 1: + logger.error("Expected 1 %s >> instance", host_ccn) >> + return FAIL, verify_ectp_list >> >> > The test case will fail for the case where we have sblim-base-provider > installed with the following error. > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: FAIL > ERROR - Expected 1 Linux_ComputerSystem instance > ERROR - Exception: Failed to get instances needed for verification > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > -------------------------------------------------------------------- > > This is because we are querying for the Linux_CoumputerSystem with > 'root/virt' namespace. > We need to store the previous namespace and change the namespace to > "Globals.CIM_NS = 'root/cimv2'" depending on if the machine has > sblim-base-provider installed before enumerating for > Linux_ComputerSystem and then restore back to the previous namespace. > Yes, agreed. Dan recently submitted a fix so that most of the associations now work with the Linux_ComputerSystem instances. I'll fix this when I fix the other test cases. >> + >> + except Exception, detail: >> + logger.error("Exception: %s" % detail) >> + status = FAIL >> > Since we are setting the status appropriately in all the cases within > the try block, I dont think we need to set this explicitly. If init_vs_pool_values() passes, but then the Associators() call throws an exception, status is still set to PASS. The test will return PASS in that case, which wouldn't be valid. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Nov 14 20:42:32 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Nov 2008 12:42:32 -0800 Subject: [Libvirt-cim] [PATCH 0 of 4] Add ResoucePool support for input and graphics devices Message-ID: Having a resource pool for both input and graphics devices doesn't really make sense (as we won't be allocating these devices from a pool). But a pool instances is need to get the AC instances, which is then used to get the template RASDs of a device. So, for consistency with other devices, pools for graphics and input devices is added here. From kaitlin at linux.vnet.ibm.com Fri Nov 14 20:42:35 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Nov 2008 12:42:35 -0800 Subject: [Libvirt-cim] [PATCH 3 of 4] Fix EC bugs and support graphics / input resource pools In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1226427777 28800 # Node ID f2431416f37653b1aa1b7f728824ac884e986779 # Parent fade4a5c8030670699dc72d6f971d163612935be Fix EC bugs and support graphics / input resource pools. Fix bugs with AC -> HS and AC -> RP. Signed-off-by: Kaitlin Rupert diff -r fade4a5c8030 -r f2431416f376 src/Virt_ElementCapabilities.c --- a/src/Virt_ElementCapabilities.c Fri Oct 31 13:06:10 2008 -0700 +++ b/src/Virt_ElementCapabilities.c Tue Nov 11 10:22:57 2008 -0800 @@ -55,14 +55,36 @@ const static CMPIBroker *_BROKER; -static CMPIStatus validate_caps_get_service(const CMPIContext *context, - const CMPIObjectPath *ref, - CMPIInstance **inst) +static CMPIStatus validate_ac_get_rp(const CMPIObjectPath *ref, + CMPIInstance **inst) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *poolid; + + if (cu_get_str_path(ref, "InstanceID", &poolid) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing InstanceID"); + goto out; + } + + s = get_alloc_cap_by_id(_BROKER, ref, poolid, inst); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; + + s = get_pool_by_name(_BROKER, ref, poolid, inst); + + out: + return s; +} + +static CMPIStatus validate_caps_get_service_or_rp(const CMPIContext *context, + const CMPIObjectPath *ref, + CMPIInstance **inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *_inst; char* classname; - classname = class_base_name(CLASSNAME(ref)); if (STREQC(classname, "VirtualSystemManagementCapabilities")) { @@ -83,6 +105,8 @@ goto out; s = get_console_rs(ref, &_inst, _BROKER, context, false); + } else if (STREQC(classname, "AllocationCapabilities")) { + s = validate_ac_get_rp(ref, &_inst); } else cu_statusf(_BROKER, &s, CMPI_RC_ERR_NOT_FOUND, @@ -181,9 +205,9 @@ return s; } -static CMPIStatus cap_to_sys_or_service(const CMPIObjectPath *ref, - struct std_assoc_info *info, - struct inst_list *list) +static CMPIStatus cap_to_sys_or_service_or_rp(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) { CMPIInstance *inst = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -191,7 +215,7 @@ if (!match_hypervisor_prefix(ref, info)) goto out; - s = validate_caps_get_service(info->context, ref, &inst); + s = validate_caps_get_service_or_rp(info->context, ref, &inst); if (s.rc != CMPI_RC_OK) goto out; @@ -290,44 +314,6 @@ return s; } -static CMPIStatus alloc_to_pool_and_sys(const CMPIObjectPath *ref, - struct std_assoc_info *info, - struct inst_list *list) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *host; - CMPIInstance *ac; - CMPIInstance *pool; - const char *poolid; - - if (!match_hypervisor_prefix(ref, info)) - goto out; - - if (cu_get_str_path(ref, "InstanceID", &poolid) != CMPI_RC_OK) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Missing InstanceID"); - goto out; - } - - s = get_pool_by_name(_BROKER, ref, poolid, &pool); - if ((pool == NULL) || (s.rc != CMPI_RC_OK)) - goto out; - - s = get_alloc_cap_by_id(_BROKER, ref, poolid, &ac); - if ((ac == NULL) || (s.rc != CMPI_RC_OK)) - goto out; - - s = get_host(_BROKER, info->context, ref, &host, false); - if (s.rc != CMPI_RC_OK) - goto out; - - inst_list_add(list, host); - inst_list_add(list, pool); - out: - return s; -} - static CMPIStatus pool_to_alloc(const CMPIObjectPath *ref, struct std_assoc_info *info, struct inst_list *list) @@ -403,7 +389,7 @@ NULL }; -static char* host_sys_and_service[] = { +static char* host_sys_and_service_and_rp[] = { "Xen_HostSystem", "Xen_VirtualSystemManagementService", "Xen_VirtualSystemMigrationService", @@ -417,6 +403,24 @@ "LXC_VirtualSystemMigrationService", "LXC_ConsoleRedirectionService", "Linux_ComputerSystem", + "Xen_ProcessorPool", + "Xen_MemoryPool", + "Xen_NetworkPool", + "Xen_DiskPool", + "Xen_GraphicsPool", + "Xen_InputPool", + "KVM_ProcessorPool", + "KVM_MemoryPool", + "KVM_NetworkPool", + "KVM_DiskPool", + "KVM_GraphicsPool", + "KVM_InputPool", + "LXC_ProcessorPool", + "LXC_MemoryPool", + "LXC_NetworkPool", + "LXC_DiskPool", + "LXC_GraphicsPool", + "LXC_InputPool", NULL }; @@ -449,16 +453,16 @@ .make_ref = make_ref_default }; -static struct std_assoc vsm_cap_to_sys_or_service = { +static struct std_assoc vsm_cap_to_sys_or_service_or_rp = { .source_class = (char**)&host_caps, .source_prop = "Capabilities", - .target_class = (char**)&host_sys_and_service, + .target_class = (char**)&host_sys_and_service_and_rp, .target_prop = "ManagedElement", .assoc_class = (char**)&assoc_classname, - .handler = cap_to_sys_or_service, + .handler = cap_to_sys_or_service_or_rp, .make_ref = make_ref }; @@ -540,48 +544,21 @@ "Xen_MemoryPool", "Xen_NetworkPool", "Xen_DiskPool", + "Xen_GraphicsPool", + "Xen_InputPool", "KVM_ProcessorPool", "KVM_MemoryPool", "KVM_NetworkPool", "KVM_DiskPool", + "KVM_GraphicsPool", + "KVM_InputPool", "LXC_ProcessorPool", "LXC_MemoryPool", "LXC_NetworkPool", "LXC_DiskPool", + "LXC_GraphicsPool", + "LXC_InputPool", NULL -}; - -static char* resource_pool_and_host[] = { - "Xen_ProcessorPool", - "Xen_MemoryPool", - "Xen_NetworkPool", - "Xen_DiskPool", - "Xen_HostSystem", - "KVM_ProcessorPool", - "KVM_MemoryPool", - "KVM_NetworkPool", - "KVM_DiskPool", - "KVM_HostSystem", - "LXC_ProcessorPool", - "LXC_MemoryPool", - "LXC_NetworkPool", - "LXC_DiskPool", - "LXC_HostSystem", - NULL -}; - - -static struct std_assoc alloc_cap_to_resource_pool = { - .source_class = (char**)&allocation_capabilities, - .source_prop = "Capabilities", - - .target_class = (char**)&resource_pool_and_host, - .target_prop = "ManagedElement", - - .assoc_class = (char**)&assoc_classname, - - .handler = alloc_to_pool_and_sys, - .make_ref = make_ref }; static struct std_assoc resource_pool_to_alloc_cap = { @@ -599,11 +576,10 @@ static struct std_assoc *assoc_handlers[] = { &system_to_vsm_cap, - &vsm_cap_to_sys_or_service, + &vsm_cap_to_sys_or_service_or_rp, &_service_to_cap, &ele_cap_to_cs, &cs_to_ele_cap, - &alloc_cap_to_resource_pool, &resource_pool_to_alloc_cap, NULL }; From kaitlin at linux.vnet.ibm.com Fri Nov 14 20:42:36 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Nov 2008 12:42:36 -0800 Subject: [Libvirt-cim] [PATCH 4 of 4] Updated ResourcePool related associations to support Graphics/Input pools In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1226427777 28800 # Node ID aad0a4f3a99cc53a9e61e4c0e6e8e31194cc27fe # Parent f2431416f37653b1aa1b7f728824ac884e986779 Updated ResourcePool related associations to support Graphics/Input pools. Signed-off-by: Kaitlin Rupert diff -r f2431416f376 -r aad0a4f3a99c src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Tue Nov 11 10:22:57 2008 -0800 +++ b/src/Virt_ElementAllocatedFromPool.c Tue Nov 11 10:22:57 2008 -0800 @@ -171,14 +171,20 @@ "Xen_MemoryPool", "Xen_NetworkPool", "Xen_DiskPool", + "Xen_GraphicsPool", + "Xen_InputPool", "KVM_ProcessorPool", "KVM_MemoryPool", "KVM_NetworkPool", "KVM_DiskPool", + "KVM_GraphicsPool", + "KVM_InputPool", "LXC_ProcessorPool", "LXC_MemoryPool", "LXC_NetworkPool", "LXC_DiskPool", + "LXC_GraphicsPool", + "LXC_InputPool", NULL }; @@ -187,14 +193,20 @@ "Xen_Memory", "Xen_NetworkPort", "Xen_LogicalDisk", + "Xen_DisplayController", + "Xen_PointingDevice", "KVM_Processor", "KVM_Memory", "KVM_NetworkPort", "KVM_LogicalDisk", + "KVM_DisplayController", + "KVM_PointingDevice", "LXC_Processor", "LXC_Memory", "LXC_NetworkPort", "LXC_LogicalDisk", + "LXC_DisplayController", + "LXC_PointingDevice", NULL }; diff -r f2431416f376 -r aad0a4f3a99c src/Virt_HostedResourcePool.c --- a/src/Virt_HostedResourcePool.c Tue Nov 11 10:22:57 2008 -0800 +++ b/src/Virt_HostedResourcePool.c Tue Nov 11 10:22:57 2008 -0800 @@ -105,14 +105,20 @@ "Xen_MemoryPool", "Xen_NetworkPool", "Xen_DiskPool", + "Xen_GraphicsPool", + "Xen_InputPool", "KVM_ProcessorPool", "KVM_MemoryPool", "KVM_NetworkPool", "KVM_DiskPool", + "KVM_GraphicsPool", + "KVM_InputPool", "LXC_ProcessorPool", "LXC_MemoryPool", "LXC_NetworkPool", "LXC_DiskPool", + "LXC_GraphicsPool", + "LXC_InputPool", NULL }; diff -r f2431416f376 -r aad0a4f3a99c src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Tue Nov 11 10:22:57 2008 -0800 +++ b/src/Virt_ResourceAllocationFromPool.c Tue Nov 11 10:22:57 2008 -0800 @@ -179,14 +179,20 @@ "Xen_MemoryPool", "Xen_NetworkPool", "Xen_DiskPool", + "Xen_GraphicsPool", + "Xen_InputPool", "KVM_ProcessorPool", "KVM_MemoryPool", "KVM_NetworkPool", "KVM_DiskPool", + "KVM_GraphicsPool", + "KVM_InputPool", "LXC_ProcessorPool", "LXC_MemoryPool", "LXC_NetworkPool", "LXC_DiskPool", + "LXC_GraphicsPool", + "LXC_InputPool", NULL }; @@ -195,14 +201,20 @@ "Xen_MemResourceAllocationSettingData", "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", + "Xen_GraphicsResourceAllocationSettingData", + "Xen_InputResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", + "KVM_GraphicsResourceAllocationSettingData", + "KVM_InputResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", + "LXC_GraphicsResourceAllocationSettingData", + "LXC_InputResourceAllocationSettingData", NULL }; From kaitlin at linux.vnet.ibm.com Fri Nov 14 20:42:34 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Nov 2008 12:42:34 -0800 Subject: [Libvirt-cim] [PATCH 2 of 4] Update SDC to support GraphicsRASD and InputRASD In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1225483570 25200 # Node ID fade4a5c8030670699dc72d6f971d163612935be # Parent d80817bf94080daa8acc341794565868f4c58ac5 Update SDC to support GraphicsRASD and InputRASD. There is no updates that need to be done to AllocationCapabilities (the appropriate instances are generated once the proper pool support is in place). The template RASD for input devices doesn't have any additional properties set because there's else meaningful to set. Signed-off-by: Kaitlin Rupert diff -r d80817bf9408 -r fade4a5c8030 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Fri Nov 14 12:29:58 2008 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Fri Oct 31 13:06:10 2008 -0700 @@ -48,6 +48,7 @@ #include "Virt_VSMigrationSettingData.h" #include "Virt_VirtualSystemManagementService.h" #include "Virt_AllocationCapabilities.h" +#include "Virt_Device.h" const static CMPIBroker *_BROKER; @@ -711,6 +712,127 @@ return s; } +static CMPIStatus graphics_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + const char *id; + const char *addr; + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + switch(template_type) { + case SDC_RASD_MIN: + id = "Minimum"; + break; + case SDC_RASD_MAX: + id = "Maximum"; + break; + case SDC_RASD_INC: + id = "Increment"; + break; + case SDC_RASD_DEF: + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_GRAPHICS); + + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + + addr = "127.0.0.1:-1"; + CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars); + + inst_list_add(list, inst); + + out: + return s; +} + +static CMPIStatus set_input_props(const CMPIObjectPath *ref, + const char *id, + const char *type, + const char *bus, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst; + char *cap; + + if (get_input_dev_caption(type, bus, &cap) != 1) { + free(cap); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to build input caption"); + return s; + } + + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_INPUT); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; + + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + + CMSetProperty(inst, "ResourceSubType", (CMPIValue *)type, CMPI_chars); + + CMSetProperty(inst, "Caption", (CMPIValue *)cap, CMPI_chars); + + inst_list_add(list, inst); + + out: + free(cap); + + return s; +} + +static CMPIStatus input_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + const char *id; + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *inputs[4][2] = { {"mouse", "ps2"}, + {"mouse", "usb"}, + {"tablet", "usb"}, + {NULL, NULL} + }; + int i; + + switch(template_type) { + case SDC_RASD_MIN: + id = "Minimum"; + break; + case SDC_RASD_MAX: + id = "Maximum"; + break; + case SDC_RASD_INC: + id = "Increment"; + break; + case SDC_RASD_DEF: + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + for(i = 0; inputs[i][0] != NULL; i++) { + s = set_input_props(ref, id, inputs[i][0], inputs[i][1], list); + if (s.rc != CMPI_RC_OK) + goto out; + } + + out: + return s; +} + static CMPIStatus sdc_rasds_for_type(const CMPIObjectPath *ref, struct inst_list *list, uint16_t type) @@ -727,6 +849,10 @@ s = net_template(ref, i, list); else if (type == CIM_RES_TYPE_DISK) s = disk_template(ref, i, list); + else if (type == CIM_RES_TYPE_GRAPHICS) + s = graphics_template(ref, i, list); + else if (type == CIM_RES_TYPE_INPUT) + s = input_template(ref, i, list); else { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -897,14 +1023,20 @@ "Xen_MemResourceAllocationSettingData", "Xen_NetResourceAllocationSettingData", "Xen_ProcResourceAllocationSettingData", + "Xen_GraphicsResourceAllocationSettingData", + "Xen_InputResourceAllocationSettingData", "KVM_DiskResourceAllocationSettingData", "KVM_MemResourceAllocationSettingData", "KVM_NetResourceAllocationSettingData", "KVM_ProcResourceAllocationSettingData", + "KVM_GraphicsResourceAllocationSettingData", + "KVM_InputResourceAllocationSettingData", "LXC_DiskResourceAllocationSettingData", "LXC_MemResourceAllocationSettingData", "LXC_NetResourceAllocationSettingData", "LXC_ProcResourceAllocationSettingData", + "LXC_GraphicsResourceAllocationSettingData", + "LXC_InputResourceAllocationSettingData", NULL }; From kaitlin at linux.vnet.ibm.com Fri Nov 14 20:42:33 2008 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 14 Nov 2008 12:42:33 -0800 Subject: [Libvirt-cim] [PATCH 1 of 4] Signed-off-by: Kaitlin Rupert In-Reply-To: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1226694598 28800 # Node ID d80817bf94080daa8acc341794565868f4c58ac5 # Parent 5680eb18d7ea2971acf4fbdb50e3e69f5c014ef0 Signed-off-by: Kaitlin Rupert diff -r 5680eb18d7ea -r d80817bf9408 Makefile.am --- a/Makefile.am Wed Nov 05 15:13:38 2008 -0800 +++ b/Makefile.am Fri Nov 14 12:29:58 2008 -0800 @@ -49,7 +49,9 @@ schema/ServiceAffectsElement.mof \ schema/KVMRedirectionSAP.mof \ schema/DisplayController.mof \ - schema/PointingDevice.mof + schema/PointingDevice.mof \ + schema/GraphicsPool.mof \ + schema/InputPool.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -113,7 +115,9 @@ schema/ServiceAffectsElement.registration \ schema/KVMRedirectionSAP.registration \ schema/DisplayController.registration \ - schema/PointingDevice.registration + schema/PointingDevice.registration \ + schema/GraphicsPool.registration \ + schema/InputPool.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 5680eb18d7ea -r d80817bf9408 schema/GraphicsPool.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/GraphicsPool.mof Fri Nov 14 12:29:58 2008 -0800 @@ -0,0 +1,16 @@ +// Copyright IBM Corp. 2007 + +[Provider("cmpi::Virt_DevicePool")] +class Xen_GraphicsPool : CIM_ResourcePool +{ +}; + +[Provider("cmpi::Virt_DevicePool")] +class KVM_GraphicsPool : CIM_ResourcePool +{ +}; + +[Provider("cmpi::Virt_DevicePool")] +class LXC_GraphicsPool : CIM_ResourcePool +{ +}; diff -r 5680eb18d7ea -r d80817bf9408 schema/GraphicsPool.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/GraphicsPool.registration Fri Nov 14 12:29:58 2008 -0800 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_GraphicsPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_GraphicsPool root/virt Virt_DevicePool Virt_DevicePool instance +LXC_GraphicsPool root/virt Virt_DevicePool Virt_DevicePool instance diff -r 5680eb18d7ea -r d80817bf9408 schema/InputPool.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/InputPool.mof Fri Nov 14 12:29:58 2008 -0800 @@ -0,0 +1,16 @@ +// Copyright IBM Corp. 2007 + +[Provider("cmpi::Virt_DevicePool")] +class Xen_InputPool : CIM_ResourcePool +{ +}; + +[Provider("cmpi::Virt_DevicePool")] +class KVM_InputPool : CIM_ResourcePool +{ +}; + +[Provider("cmpi::Virt_DevicePool")] +class LXC_InputPool : CIM_ResourcePool +{ +}; diff -r 5680eb18d7ea -r d80817bf9408 schema/InputPool.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/InputPool.registration Fri Nov 14 12:29:58 2008 -0800 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_InputPool root/virt Virt_DevicePool Virt_DevicePool instance +KVM_InputPool root/virt Virt_DevicePool Virt_DevicePool instance +LXC_InputPool root/virt Virt_DevicePool Virt_DevicePool instance diff -r 5680eb18d7ea -r d80817bf9408 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Wed Nov 05 15:13:38 2008 -0800 +++ b/src/Virt_DevicePool.c Fri Nov 14 12:29:58 2008 -0800 @@ -478,6 +478,10 @@ poolid = netpool_member_of(broker, id, refcn); else if (type == CIM_RES_TYPE_DISK) poolid = diskpool_member_of(broker, id, refcn); + else if (type == CIM_RES_TYPE_GRAPHICS) + poolid = strdup("GraphicsPool/0"); + else if (type == CIM_RES_TYPE_INPUT) + poolid = strdup("InputPool/0"); else return NULL; @@ -494,6 +498,10 @@ return CIM_RES_TYPE_MEM; else if (strstr(classname, "ProcessorPool")) return CIM_RES_TYPE_PROC; + else if (strstr(classname, "GraphicsPool")) + return CIM_RES_TYPE_GRAPHICS; + else if (strstr(classname, "InputPool")) + return CIM_RES_TYPE_INPUT; else return CIM_RES_TYPE_UNKNOWN; } @@ -508,6 +516,10 @@ return CIM_RES_TYPE_MEM; else if (STARTS_WITH(id, "ProcessorPool")) return CIM_RES_TYPE_PROC; + else if (strstr(id, "GraphicsPool")) + return CIM_RES_TYPE_GRAPHICS; + else if (strstr(id, "InputPool")) + return CIM_RES_TYPE_INPUT; else return CIM_RES_TYPE_UNKNOWN; } @@ -841,6 +853,78 @@ return s; } +static CMPIStatus graphicspool_instance(virConnectPtr conn, + struct inst_list *list, + const char *ns, + const char *_id, + const CMPIBroker *broker) +{ + const char *id = "GraphicsPool/0"; + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if ((_id != NULL) && (!STREQC(_id, "0"))) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "No such graphics pool `%s'", id); + return s; + } + + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "GraphicsPool", + ns); + if (inst == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Failed to get instance of %s_GraphicsPool", + pfx_from_conn(conn)); + return s; + } + + set_params(inst, CIM_RES_TYPE_GRAPHICS, id, NULL, NULL); + + inst_list_add(list, inst); + + return s; +} + +static CMPIStatus inputpool_instance(virConnectPtr conn, + struct inst_list *list, + const char *ns, + const char *_id, + const CMPIBroker *broker) +{ + const char *id = "InputPool/0"; + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if ((_id != NULL) && (!STREQC(_id, "0"))) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "No such input pool `%s'", id); + return s; + } + + inst = get_typed_instance(broker, + pfx_from_conn(conn), + "InputPool", + ns); + if (inst == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Failed to get instance of %s_InputPool", + pfx_from_conn(conn)); + return s; + } + + set_params(inst, CIM_RES_TYPE_INPUT, id, NULL, NULL); + + inst_list_add(list, inst); + + return s; +} + static CMPIStatus _get_pools(const CMPIBroker *broker, const CMPIObjectPath *reference, const uint16_t type, @@ -885,6 +969,22 @@ NAMESPACE(reference), id, broker); + + if ((type == CIM_RES_TYPE_GRAPHICS) || + (type == CIM_RES_TYPE_ALL)) + s = graphicspool_instance(conn, + list, + NAMESPACE(reference), + id, + broker); + + if ((type == CIM_RES_TYPE_INPUT) || + (type == CIM_RES_TYPE_ALL)) + s = inputpool_instance(conn, + list, + NAMESPACE(reference), + id, + broker); if (type == CIM_RES_TYPE_UNKNOWN) cu_statusf(broker, &s, @@ -1029,6 +1129,16 @@ *s = enum_pools(broker, reference, type, &list); if ((s->rc == CMPI_RC_OK) && (list.cur > 0)) inst = list.list[0]; + } else if (type == CIM_RES_TYPE_GRAPHICS) { + *s = get_pool_by_name(broker, + reference, + "GraphicsPool/0", + &inst); + } else if (type == CIM_RES_TYPE_INPUT) { + *s = get_pool_by_name(broker, + reference, + "InputPool/0", + &inst); } else { cu_statusf(broker, s, CMPI_RC_ERR_INVALID_PARAMETER, From jfehlig at novell.com Fri Nov 14 21:09:27 2008 From: jfehlig at novell.com (Jim Fehlig) Date: Fri, 14 Nov 2008 15:09:27 -0600 Subject: [Libvirt-cim] [PATCH] Do not default network source if none is provided in dev xml Message-ID: <7d43dee14fefe065b325.1226700567@jfehlig3.provo.novell.com> # HG changeset patch # User Jim Fehlig # Date 1226700347 25200 # Node ID 7d43dee14fefe065b3258116bc5f09d3daa3576b # Parent 917158bf07b442f0178db870b1f8aceafd2d5401 Do not default network source if none is provided in dev xml When adding resources to a running domain, the network source is set to default values on redefine even if no source was defined in the device xml. The domain will fail to restart if the default source does not exist. Signed-off-by: Jim Fehlig diff -r 917158bf07b4 -r 7d43dee14fef libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c Wed Nov 05 15:13:38 2008 -0800 +++ b/libxkutil/device_parsing.c Fri Nov 14 15:05:47 2008 -0700 @@ -317,25 +317,8 @@ static int parse_net_device(xmlNode *ino if (ndev->mac == NULL) goto err; - if (ndev->source == NULL) { - if (STREQC(ndev->type, "bridge")) { - ndev->source = strdup(DEFAULT_BRIDGE); - CU_DEBUG("No bridge, taking default of `%s'\n", - ndev->source); - } else if (STREQC(ndev->type, "network")) { - ndev->source = strdup(DEFAULT_NETWORK); - CU_DEBUG("No network, taking default of `%s'\n", - ndev->source); - } else if (STREQC(ndev->type, "user")){ - CU_DEBUG("Leaving source blank for user net type"); - } else { - /* This likely indicates an unsupported - * network configuration - */ - CU_DEBUG("No network source, and no known default"); - goto err; - } - } + if (ndev->source == NULL) + CU_DEBUG("No network source defined, leaving blank\n"); vdev->type = CIM_RES_TYPE_NET; vdev->id = strdup(ndev->mac); diff -r 917158bf07b4 -r 7d43dee14fef libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Wed Nov 05 15:13:38 2008 -0800 +++ b/libxkutil/xmlgen.c Fri Nov 14 15:05:47 2008 -0700 @@ -206,16 +206,26 @@ static bool bridge_net_to_xml(char **xml char *script = "vif-bridge"; struct net_device *net = &dev->dev.net; - ret = asprintf(&_xml, - "\n" - " \n" - " \n" - "