[PATCH] [TEST] Fixing 14_define_sys_disk.py tc of VSMS to work with F9 rpm for KVM
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1229590303 28800
# Node ID bac8c62509fa9e94ba8983826ed300b4f946b65f
# Parent adfa38df8c3b9600ff08796631c0eae7d3249ffe
[TEST] Fixing 14_define_sys_disk.py tc of VSMS to work with F9 rpm for KVM.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r adfa38df8c3b -r bac8c62509fa suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Tue Dec 16 23:18:31 2008 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Thu Dec 18 00:51:43 2008 -0800
@@ -25,12 +25,14 @@
from VirtLib.utils import run_remote
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.const import do_main, _image_dir
from XenKvmLib.common_util import create_using_definesystem
from XenKvmLib.test_doms import destroy_and_undefine_domain
from XenKvmLib.classes import get_typed_class, inst_to_mof
from XenKvmLib.rasd import get_default_rasds
from XenKvmLib.vsms import get_vssd_mof
+from XenKvmLib.const import get_provider_version
+from XenKvmLib.const import do_main, _image_dir, f9_changeset, \
+ KVM_default_disk_dev
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = 'rstest_disk_domain'
@@ -60,6 +62,9 @@
if disk_type != "" and rasd['Caption'] != disk_type:
continue
rasd['Address'] = addr
+ curr_cim_rev, changeset = get_provider_version(virt, ip)
+ if changeset == f9_changeset and virt == 'KVM':
+ rasd['VirtualDevice'] = KVM_default_disk_dev
rasd_list.append(inst_to_mof(rasd))
params = { 'vssd' : vssd,
diff -r adfa38df8c3b -r bac8c62509fa suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Dec 16 23:18:31 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Dec 18 00:51:43 2008 -0800
@@ -28,6 +28,9 @@
from XenKvmLib.classes import get_typed_class
platform_sup = ["Xen", "KVM", "XenFV"]
+
+#RPM changeset values
+f9_changeset="1fcf330fadf8+"
VIRSH_ERROR_DEFINE = "Failed to define a domain with the name %s from virsh"
16 years
libvirt error
by Deepti B Kalakeri
Hi,
I am seeing the following error on running the test suite on F10 machines.
CIM_NS=root/virt CIM_USER=root CIM_PASS=password ./runtests libvirt-cim
-i localhost -c -v KVM -g ComputerSystem -t 41_cs_to_settingdefinestate.py
*Starting test suite: libvirt-cim
Encountered an error querying libvirt with: virsh -c qemu:///system
version. Please check your environment.
*This is because the following query does not work with the libvirt on F10:
virsh -c qemu:///system version
Compiled against library: libvir 0.5.0
libvir: error : this function is not supported by the hypervisor: QEMU
error: failed to get the library version
The alternate option for this would be to use
virsh -c qemu:///system -v
0.5.0
which works for RHEL, F9 and F10.
I have modified the main.py for the changes and submitted the patch.
But I have one concern, since the version option is listed with the help
, it should work even on F10.
Should we bring up this to the notice of libvirt folks ?
Thanks and Regards,
Deepti.
16 years
[PATCH] [TEST] Fixing main.py to work with F10 libvirt
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1229507881 28800
# Node ID 9b8544cbb28b3c690d1973e90f5c048fd9eb7214
# Parent 3bef4df8290571505d2c9028b6c82e0abc8b2e74
[TEST] Fixing main.py to work with F10 libvirt.
The query virsh -c qemu:///system version does not work with latest libvirt on F10.
Hence modified the main.py to use -v option instead.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 3bef4df82905 -r 9b8544cbb28b suites/libvirt-cim/main.py
--- a/suites/libvirt-cim/main.py Mon Dec 15 09:45:28 2008 -0800
+++ b/suites/libvirt-cim/main.py Wed Dec 17 01:58:01 2008 -0800
@@ -96,7 +96,7 @@
if ret != 0:
return "This libvirt install does not support %s" % virt
- cmd = "virsh -c %s version" % virt2uri(virt)
+ cmd = "virsh -c %s -v" % virt2uri(virt)
ret, out = utils.run_remote(ip, cmd)
if ret != 0:
return "Encountered an error querying libvirt with: %s" % cmd
16 years
[PATCH] [TEST] Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1229504556 28800
# Node ID 8e1a1e349f21351c38f42d315adabc441cad366f
# Parent 3bef4df8290571505d2c9028b6c82e0abc8b2e74
[TEST] Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 3bef4df82905 -r 8e1a1e349f21 suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Wed Dec 17 01:02:36 2008 -0800
@@ -0,0 +1,76 @@
+#!/usr/bin/python
+#
+# Copyright 2008 IBM Corp.
+#
+# Authors:
+# Guolian Yun <yunguol(a)cn.ibm.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+import sys
+import pywbem
+from VirtLib import utils
+from XenKvmLib import enumclass
+from XenKvmLib.classes import get_typed_class
+from XenKvmLib.test_doms import undefine_test_domain
+from XenKvmLib.common_util import create_using_definesystem
+from XenKvmLib.const import do_main
+from CimTest.ReturnCodes import PASS, FAIL
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
+from XenKvmLib.const import get_provider_version
+
+SUPPORTED_TYPES = ['Xen', 'KVM', 'LXC']
+default_dom = 'test_domain'
+libvirt_em_type_changeset = 737
+
+@do_main(SUPPORTED_TYPES)
+def main():
+ options = main.options
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev >= libvirt_em_type_changeset:
+ status = create_using_definesystem(default_dom, options.ip, emu_type=0,
+ virt=options.virt)
+
+ if status != PASS:
+ logger.error("Failed to call DefineSystem()")
+ return FAIL
+
+ drasd= get_typed_class(options.virt, 'DiskResourceAllocationSettingData')
+
+ try:
+ drasd_list = enumclass.EnumInstances(options.ip, drasd, ret_cim_inst=True)
+ if len(drasd_list) < 1:
+ logger.error("%s returned %i instances, excepted at least 1.",
+ drasd, len(drasd_list))
+ return FAIL
+ except Exception, detail:
+ logger.error(CIM_ERROR_ENUMERATE, drasd)
+ logger.error("Exception: %s", detail)
+ return FAIL
+
+ if drasd_list[0]['EmulatedType'] != 0:
+ logger.error("%s Mismatch", 'EmulatedType')
+ return FAIL
+
+
+ undefine_test_domain(default_dom, options.ip,
+ virt=options.virt)
+
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
+
diff -r 3bef4df82905 -r 8e1a1e349f21 suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Mon Dec 15 09:45:28 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Wed Dec 17 01:02:36 2008 -0800
@@ -72,7 +72,7 @@
return (0, cs)
def create_using_definesystem(domain_name, ip, params=None, ref_config=' ',
- exp_err=None, virt='Xen'):
+ exp_err=None, emu_type=None, virt='Xen'):
bug = "85673"
try:
class_vsms = eval('vsms.' + \
diff -r 3bef4df82905 -r 8e1a1e349f21 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Dec 15 09:45:28 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Dec 17 01:02:36 2008 -0800
@@ -126,8 +126,10 @@
# classes to define RASD parameters
class CIM_DiskResourceAllocationSettingData(CIMClassMOF):
- def __init__(self, dev, source, name):
+ def __init__(self, dev, source, name, emu_type=None):
self.ResourceType = RASD_TYPE_DISK
+ if emu_type != None:
+ self.EmulatedType = emu_type
if dev != None:
self.VirtualDevice = dev
self.InstanceID = '%s/%s' % (name, dev)
@@ -141,10 +143,11 @@
pass
class LXC_DiskResourceAllocationSettingData(CIMClassMOF):
- def __init__(self, mountpoint, source, name):
+ def __init__(self, mountpoint, source, name, emu_type=None):
self.MountPoint = mountpoint
self.Address = source
self.InstanceID = '%s/%s' % (name, mountpoint)
+ self.EmulatedType = emu_type
@eval_cls('DiskResourceAllocationSettingData')
def get_dasd_class(virt):
@@ -239,6 +242,7 @@
proc_vcpu=1,
mem_mb=512,
malloc_units="MegaBytes",
+ emu_type = None,
virt='Xen'):
vssd = get_vssd_mof(virt, dom_name)
@@ -252,7 +256,7 @@
elif virt == 'LXC':
disk_dev = const.LXC_default_mp
disk_source = const.LXC_default_source
- d = class_dasd(disk_dev, disk_source, dom_name)
+ d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
class_masd = get_masd_class(virt)
m = class_masd(
16 years
[PATCH] [TEST] Updating VSMS 15_mod_system_settings.py tc to XFAIL for KVM with F9 rpm
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1229498311 28800
# Node ID 2ddc81f7e2df5074ac0eff1ec0ded4a9b9d037fb
# Parent 3bef4df8290571505d2c9028b6c82e0abc8b2e74
[TEST] Updating VSMS 15_mod_system_settings.py tc to XFAIL for KVM with F9 rpm.
The value of AutomaticRecoveryAction is set to 2 for libvirt-cim F9 rpm instead of 3.
The value of AutomaticRecoveryAction is set to 3 for KVM, Xen with current sources.
The tc will XFAIL for now with the current F9 rpm for KVM.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 3bef4df82905 -r 2ddc81f7e2df suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py Mon Dec 15 09:45:28 2008 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/15_mod_system_settings.py Tue Dec 16 23:18:31 2008 -0800
@@ -38,6 +38,8 @@
RECOVERY_VAL = 3
DEFINED_STATE = 3
bug = "00008"
+f9_bug = "00010"
+libvirt_f9_revision=613
libvirt_modify_setting_changes = 694
def cleanup_env(ip, cxml):
@@ -127,6 +129,10 @@
logger.error("Exp AutomaticRecoveryAction=%d, got %d", RECOVERY_VAL,
inst.AutomaticRecoveryAction)
cleanup_env(options.ip, cxml)
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev <= libvirt_f9_revision and options.virt == "KVM":
+ return XFAIL_RC(f9_bug)
+
if options.virt == "LXC":
return XFAIL_RC(bug)
return FAIL
16 years
KVM on Pegasus Test Run Summary for Dec 15 2008
by Guo Lian Yun
=================================================
KVM on Pegasus Test Run Summary for Dec 15 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: 539
Cimtest changeset: d63674216d3f
=================================================
FAIL : 2
XFAIL : 2
SKIP : 6
PASS : 129
-----------------
Total : 139
=================================================
FAIL Test Summary:
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:
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: PASS
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_suspend_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_suspend_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation
Failed')
ERROR - Unable to 'Reboot' dom 'cs_test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation
Failed')
ERROR - Unable to 'Reboot' dom 'test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: PASS
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: PASS
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
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
--------------------------------------------------------------------
16 years
[PATCH] [RFC]Added 2 end points for the ServiceAffectsElement association, both related to the LogicalDevice class
by Richard Maciel
# HG changeset patch
# User Richard Maciel <richardm(a)br.ibm.com>
# Date 1229540211 7200
# Node ID 71c3b10e7f36b00694fba35319fd7b356efbd0c8
# Parent d0a4eae208b634a9814ec68384b2cea267604718
[RFC]Added 2 end points for the ServiceAffectsElement association, both related to the LogicalDevice class.
- ConsoleRedirectionService <-> DisplayController
- ConsoleRedirectionService <-> PointingDevice
Signed-off-by: Richard Maciel <richardm(a)br.ibm.com>
diff -r d0a4eae208b6 -r 71c3b10e7f36 src/Makefile.am
--- a/src/Makefile.am Fri Dec 12 19:58:01 2008 -0200
+++ b/src/Makefile.am Wed Dec 17 16:56:51 2008 -0200
@@ -213,9 +213,9 @@
libVirt_ConsoleRedirectionServiceCapabilities_la_SOURCES = Virt_ConsoleRedirectionServiceCapabilities.c
-libVirt_ServiceAffectsElement_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_ConsoleRedirectionService.la
+libVirt_ServiceAffectsElement_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_Device.la libVirt_ConsoleRedirectionService.la
libVirt_ServiceAffectsElement_la_SOURCES = Virt_ServiceAffectsElement.c
-libVirt_ServiceAffectsElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_ConsoleRedirectionService
+libVirt_ServiceAffectsElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_Device -lVirt_ConsoleRedirectionService
libVirt_KVMRedirectionSAP_la_SOURCES = Virt_KVMRedirectionSAP.c
diff -r d0a4eae208b6 -r 71c3b10e7f36 src/Virt_ServiceAffectsElement.c
--- a/src/Virt_ServiceAffectsElement.c Fri Dec 12 19:58:01 2008 -0200
+++ b/src/Virt_ServiceAffectsElement.c Wed Dec 17 16:56:51 2008 -0200
@@ -29,11 +29,45 @@
#include <libcmpiutil/libcmpiutil.h>
#include <libcmpiutil/std_association.h>
#include "misc_util.h"
+#include "svpc_types.h"
#include "Virt_ComputerSystem.h"
#include "Virt_ConsoleRedirectionService.h"
+#include "Virt_Device.h"
const static CMPIBroker *_BROKER;
+
+static CMPIStatus add_devices_to_list(const CMPIObjectPath *ref,
+ const char *host,
+ int type,
+ struct inst_list *list)
+{
+ CMPIStatus s = {CMPI_RC_OK, NULL};
+ struct inst_list temp_list;
+ int i, iret;
+
+ inst_list_init(&temp_list);
+
+ s = enum_devices(_BROKER, ref, host, type, &temp_list);
+
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ for (i = 0; i < temp_list.cur; i++) {
+ iret = inst_list_add(list, temp_list.list[i]);
+ if (!iret) {
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Not enough space to add device to list");
+ goto out;
+ }
+ }
+
+ out:
+ inst_list_free(&temp_list);
+
+ return s;
+}
static CMPIStatus service_to_cs(const CMPIObjectPath *ref,
struct std_assoc_info *info,
@@ -41,15 +75,60 @@
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *instance = NULL;
+ const char *host = NULL;
+ int i, num_of_domains;
+
if (!match_hypervisor_prefix(ref, info))
- return s;
+ goto out;
s = get_console_rs(ref, &instance, _BROKER, info->context, true);
if (s.rc != CMPI_RC_OK)
- return s;
+ goto out;
s = enum_domains(_BROKER, ref, list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ num_of_domains = list->cur;
+
+ // For each domain, insert its video and pointer devices into
+ // the list
+ for (i = 0; i < num_of_domains; i++) {
+ s.rc = cu_get_str_prop(list->list[i], "Name", &host);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ s = add_devices_to_list(ref, host, CIM_RES_TYPE_INPUT, list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ s = add_devices_to_list(ref, host, CIM_RES_TYPE_GRAPHICS, list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+ }
+
+ out:
+ return s;
+}
+
+static CMPIStatus validate_cs_or_dev_ref(const CMPIContext *context,
+ const CMPIObjectPath *ref)
+{
+ CMPIStatus s = {CMPI_RC_OK, NULL};
+ CMPIInstance *inst = NULL;
+ char* classname;
+
+ classname = class_base_name(CLASSNAME(ref));
+
+ if (STREQC(classname, "ComputerSystem")) {
+ s = get_domain_by_ref(_BROKER, ref, &inst);
+ } else if ( (STREQC(classname, "PointingDevice")) ||
+ (STREQC(classname, "DisplayController")) ) {
+ s = get_device_by_ref(_BROKER, ref, &inst);
+ }
+
+ free(classname);
return s;
}
@@ -63,8 +142,8 @@
if (!match_hypervisor_prefix(ref, info))
return s;
-
- s = get_domain_by_ref(_BROKER, ref, &inst);
+
+ s = validate_cs_or_dev_ref(info->context, ref);
if (s.rc != CMPI_RC_OK)
return s;
@@ -83,6 +162,12 @@
"Xen_ComputerSystem",
"KVM_ComputerSystem",
"LXC_ComputerSystem",
+ "Xen_PointingDevice",
+ "KVM_PointingDevice",
+ "LXC_PointingDevice",
+ "Xen_DisplayController",
+ "KVM_DisplayController",
+ "LXC_DisplayController",
NULL
};
16 years
[PATCH 0 of 5] [TEST] Rework negative tc to not use try_getinstance()
by Kaitlin Rupert
try_getinstance() really isn't needed anymore as the same functionality can
be achieved using the functions in enumclass.py.
Removing try_getinstance() requires essentially a re-write of these tests -
they're old, so updates are needed anyway.
More test re-writes will follow in the next set.
As these are re-writest, it's easier to review the test case with the patch
applied.
16 years
[PATCH 0 of 8] [TEST] #2 Rework negative tc to not use try_getinstance()
by Kaitlin Rupert
try_getinstance() really isn't needed anymore as the same functionality can
be achieved using the functions in enumclass.py.
Removing try_getinstance() requires essentially a re-write of these tests -
they're old, so updates are needed anyway.
More test re-writes will follow in the next set.
Updates;
-Only patch 5 of 8 changes - see individual patch for more info
16 years
[PATCH 0 of 8] [TEST] Rework negative tc to not use try_getinstance()
by Kaitlin Rupert
try_getinstance() really isn't needed anymore as the same functionality can
be achieved using the functions in enumclass.py.
Removing try_getinstance() requires essentially a re-write of these tests -
they're old, so updates are needed anyway.
More test re-writes will follow in the next set.
16 years