[PATCH] [TEST]#2 Fixing the 01_verify_rasd_fields.py tc of RASD
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1230627486 28800
# Node ID d4f96110de07286ecdb6bd61ff78cfb405b5e337
# Parent 5849e413cc6e3d3330d11fbda9e9b954af774ac0
[TEST]#2 Fixing the 01_verify_rasd_fields.py tc of RASD.
Changes:
>From Patch 1 to 2:
------------------
1) Used compare_all_prop() fn.
2) Updated the tc to use cim_define() and cim_start() instead of create() fn.
Tested for KVM, Xen, LXC with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 5849e413cc6e -r d4f96110de07 suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py
--- a/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Tue Dec 23 13:51:22 2008 -0800
+++ b/suites/libvirt-cim/cimtest/RASD/01_verify_rasd_fields.py Tue Dec 30 00:58:06 2008 -0800
@@ -47,18 +47,14 @@
import sys
-from CimTest import Globals
from XenKvmLib.const import do_main
-from XenKvmLib.test_doms import destroy_and_undefine_all
-from XenKvmLib import assoc
-from XenKvmLib import vxml
+from XenKvmLib.assoc import compare_all_prop, Associators
+from XenKvmLib.vxml import get_class
from XenKvmLib.classes import get_typed_class
-from XenKvmLib import rasd
-from CimTest.Globals import logger
+from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS
from CimTest.ReturnCodes import PASS, FAIL
-from XenKvmLib import rasd
-from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \
-verify_diskrasd_values, verify_memrasd_values, rasd_init_list
+from XenKvmLib.rasd import enum_rasds
+from XenKvmLib.common_util import parse_instance_id
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -67,74 +63,79 @@
test_mem = 128
test_mac = "00:11:22:33:44:aa"
-def assoc_values(assoc_info, xml, disk, virt="Xen"):
- status, rasd_values, in_list = rasd_init_list(xml, virt, disk, test_dom,
- test_mac, test_mem)
+def init_rasd_list(virt, ip):
+ rasd_insts = {}
+ rasds, status = enum_rasds(virt, ip)
+ if status != PASS:
+ logger.error("Enum RASDs failed")
+ return rasd_insts, status
+
+ for rasd_cn, rasd_list in rasds.iteritems():
+ for rasd in rasd_list:
+ guest, dev, status = parse_instance_id(rasd.InstanceID)
+ if status != PASS:
+ logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID)
+ return rasd_insts, FAIL
+
+ if guest == test_dom:
+ rasd_insts[rasd.Classname] = rasd
+
+ return rasd_insts, PASS
+
+def verify_rasd(virt, ip, assoc_info):
+ rasds, status = init_rasd_list(virt, ip)
if status != PASS:
return status
-
- procrasd = rasd_values['%s' %in_list['proc']]
- netrasd = rasd_values['%s' %in_list['net']]
- diskrasd = rasd_values['%s' %in_list['disk']]
- memrasd = rasd_values['%s' %in_list['mem']]
- if virt == 'LXC':
- proc_status = 0
- disk_status = 0
- else:
- proc_status = 1
- disk_status = 1
+ if len(assoc_info) != len(rasds):
+ logger.error("%d assoc_info != %d RASD insts",
+ len(assoc_info), len(rasds))
+ return FAIL
- net_status = 0
- mem_status = 1
- status = 0
- try:
- for res in assoc_info:
- if res['InstanceID'] == procrasd['InstanceID']:
- proc_status = rasd.verify_procrasd_values(res, procrasd)
- elif res['InstanceID'] == netrasd['InstanceID']:
- net_status = rasd.verify_netrasd_values(res, netrasd)
- elif res['InstanceID'] == diskrasd['InstanceID']:
- disk_status = rasd.verify_diskrasd_values(res, diskrasd)
- elif res['InstanceID'] == memrasd['InstanceID']:
- mem_status = rasd.verify_memrasd_values(res, memrasd)
- else:
- status = 1
- if status != 0 or proc_status != 0 or net_status != 0 or \
- disk_status != 0 or mem_status != 0 :
- logger.error("Mistmatching association values" )
- status = 1
- except Exception, detail :
- logger.error("Exception in assoc_values function: %s" % detail)
- status = 1
-
- return status
-
+ for rasd in assoc_info:
+ guest, dev, status = parse_instance_id(rasd['InstanceID'])
+ if status != PASS:
+ logger.error("Unable to parse InstanceID: %s", rasd['InstanceID'])
+ return status
+
+ if guest != test_dom:
+ logger.error("VSSDC should not have returned info for dom %s",
+ guest)
+ return FAIL
+
+ logger.info("Verifying: %s", rasd.classname)
+ exp_rasd = rasds[rasd.classname]
+ status = compare_all_prop(rasd, exp_rasd)
+ if status != PASS:
+ return status
+
+ return PASS
+
@do_main(sup_types)
def main():
options = main.options
virt = options.virt
- status = PASS
+ server = options.ip
+ status = FAIL
- destroy_and_undefine_all(options.ip)
- if virt == 'Xen':
- test_disk = 'xvda'
- else:
- test_disk = 'hda'
-
- virt_xml = vxml.get_class(virt)
+ virt_xml = get_class(virt)
if virt == 'LXC':
cxml = virt_xml(test_dom)
else:
cxml = virt_xml(test_dom, mem=test_mem, vcpus = test_vcpus,
- mac = test_mac, disk = test_disk)
- ret = cxml.create(options.ip)
+ mac = test_mac)
+
+ ret = cxml.cim_define(server)
if not ret:
- logger.error('Unable to create domain %s' % test_dom)
+ logger.error('Unable to define the domain %s', test_dom)
return FAIL
- if status == 1:
- destroy_and_undefine_all(options.ip)
- return FAIL
+
+ status = cxml.cim_start(server)
+ if status != PASS:
+ logger.error('Unable to start the domain %s', test_dom)
+ cxml.undefine(server)
+ return FAIL
+
if virt == "XenFV":
instIdval = "Xen:%s" % test_dom
else:
@@ -143,21 +144,16 @@
vssdc_cn = get_typed_class(virt, 'VirtualSystemSettingDataComponent')
vssd_cn = get_typed_class(virt, 'VirtualSystemSettingData')
try:
- assoc_info = assoc.Associators(options.ip, vssdc_cn, vssd_cn,
- InstanceID = instIdval)
- status = assoc_values(assoc_info, cxml, test_disk, virt)
+ assoc_info = Associators(server, vssdc_cn, vssd_cn,
+ InstanceID = instIdval)
+ status = verify_rasd(virt, server, assoc_info)
except Exception, details:
- logger.error(Globals.CIM_ERROR_ASSOCIATORS,
- get_typed_class(virt, vssdc_cn))
+ logger.error(CIM_ERROR_ASSOCIATORS, vssdc_cn)
logger.error("Exception : %s" % details)
status = FAIL
-
- try:
- cxml.destroy(options.ip)
- cxml.undefine(options.ip)
- except Exception:
- logger.error("Destroy or undefine domain failed")
+
+ cxml.destroy(server)
+ cxml.undefine(server)
return status
-
if __name__ == "__main__":
sys.exit(main())
15 years, 8 months
Tyrel Datwyler is out of the office.
by Tyrel Datwyler
I will be out of the office starting 12/15/2008 and will not return until
01/12/2009.
I will respond to your message when I return.
15 years, 8 months
Test Run Summary (Dec 29 2008): KVM on Fedora release 10 (Cambridge) with Pegasus
by Deepti B Kalakeri
=================================================
Test Run Summary (Dec 29 2008): KVM on Fedora release 10 (Cambridge)
with Pegasus
=================================================
Distro: Fedora release 10 (Cambridge)
Kernel: 2.6.27.7-134.fc10.x86_64
libvirt: Unknown
Hypervisor: Unknown
CIMOM: Pegasus 2.7.1
Libvirt-cim revision: 791
Libvirt-cim changeset: 3557859610b4
Cimtest revision: 575
Cimtest changeset: 5849e413cc6e
=================================================
FAIL : 3
XFAIL : 2
SKIP : 7
PASS : 128
-----------------
Total : 140
=================================================
FAIL Test Summary:
ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL
RASD - 01_verify_rasd_fields.py: FAIL
VirtualSystemManagementService - 10_hv_version.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
HostSystem - 05_hs_gi_errs.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: Unable to reboot domain:
this function is not supported by the hypervisor: virDomainReboot')
ERROR - Unable to 'Reboot' dom 'cs_test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to reboot
domain: this function is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - In fn cim_state_change()
ERROR - Failed to change state of the domain 'test_domain'
ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported')
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL
ERROR - KVM_SystemDevice returned 6 Logical Devices objects
--------------------------------------------------------------------
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: SKIP
--------------------------------------------------------------------
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: FAIL
ERROR - Mistmatching association values
--------------------------------------------------------------------
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
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.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: FAIL
ERROR - CIM says version is `QEMU 0.9.1', but libvirt says `libvir:
error : this function is not supported by the hypervisor: QEMU
error: failed to get the library version'
--------------------------------------------------------------------
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
--------------------------------------------------------------------
Thanks and Regards,
Deepti.
15 years, 8 months
[PATCH] [TEST] #5 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1230101639 28800
# Node ID 7b57ee2aab2ca8da6961bb94480a10627a0ab512
# Parent b7d80fdeb2a3318749f0faa4b2ad9725da97cc56
[TEST] #5 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b7d80fdeb2a3 -r 7b57ee2aab2c 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 Tue Dec 23 22:53:59 2008 -0800
@@ -0,0 +1,91 @@
+#!/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 parse_instance_id
+from XenKvmLib.const import do_main
+from XenKvmLib import vxml
+from CimTest.ReturnCodes import PASS, FAIL
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
+from XenKvmLib.const import get_provider_version
+
+SUPPORTED_TYPES = ['KVM']
+default_dom = 'test_domain'
+libvirt_em_type_changeset = 737
+
+@do_main(SUPPORTED_TYPES)
+def main():
+ status = FAIL
+ options = main.options
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev < libvirt_em_type_changeset:
+ return SKIP
+
+ emu_types = [0, 1]
+ for exp_emu_type in emu_types:
+ cxml = vxml.get_class(options.virt)(default_dom, emu_type=exp_emu_type)
+ ret = cxml.cim_define(options.ip)
+ if not ret:
+ 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:
+ raise Exception("%s returned %i instances, excepted at least 1.",
+ drasd, len(drasd_list))
+
+ found_rasd = None
+ for rasd in drasd_list:
+ guest, dev, status = parse_instance_id(rasd['InstanceID'])
+ if status != PASS:
+ raise Exception("Unable to parse InstanceID: %s" \
+ % rasd['InstanceID'])
+ if guest == default_dom:
+ if rasd['EmulatedType'] == exp_emu_type:
+ found_rasd = rasd
+ status = PASS
+ break
+ else:
+ raise Exception("EmulatedType Mismatch: got %d, \
+ expected %d", rasd['EmulatedType'], exp_emu_type)
+
+ if found_rasd == None:
+ raise Exception("The defined dom is not found")
+ except Exception, detail:
+ logger.error("Exception: %s", detail)
+ cxml.undefine(options.ip)
+ return FAIL
+
+ cxml.undefine(options.ip)
+
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
diff -r b7d80fdeb2a3 -r 7b57ee2aab2c suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Dec 22 23:03:01 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Dec 23 22:53:59 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,12 @@
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)
+ if emu_type != None:
+ self.EmulatedType = emu_type
@eval_cls('DiskResourceAllocationSettingData')
def get_dasd_class(virt):
@@ -239,6 +243,7 @@
proc_vcpu=1,
mem_mb=512,
malloc_units="MegaBytes",
+ emu_type=None,
virt='Xen'):
vssd = get_vssd_mof(virt, dom_name)
@@ -252,7 +257,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(
diff -r b7d80fdeb2a3 -r 7b57ee2aab2c suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Dec 22 23:03:01 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Dec 23 22:53:59 2008 -0800
@@ -466,11 +466,13 @@
class VirtCIM:
def __init__(self, virt, dom_name, disk_dev, disk_source,
- net_type, net_name, net_mac, vcpus, mem, mem_allocunits):
+ net_type, net_name, net_mac, vcpus, mem,
+ mem_allocunits, emu_type=None):
self.virt = virt
self.domain_name = dom_name
self.vssd = vsms.get_vssd_mof(virt, dom_name)
- self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name)
+ self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source,
+ dom_name, emu_type)
self.nasd = vsms.get_nasd_class(virt)(type=net_type,
mac=net_mac,
name=dom_name,
@@ -695,13 +697,15 @@
disk_file_path=const.KVM_disk_path,
disk=const.KVM_default_disk_dev,
ntype=const.default_net_type,
- net_name=const.default_network_name):
+ net_name=const.default_network_name,
+ emu_type=None):
if not os.path.exists(disk_file_path):
logger.error('Error: Disk image does not exist')
sys.exit(1)
VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus)
VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path,
- ntype, net_name, mac, vcpus, mem, mem_allocunits)
+ ntype, net_name, mac, vcpus, mem, mem_allocunits,
+ emu_type)
self._os()
self._devices(const.KVM_default_emulator, ntype,
disk_file_path, disk, mac, net_name)
15 years, 8 months
[PATCH] [TEST]Fixing get_hv_version() of xm_virt_util.py lib
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1230554983 28800
# Node ID 7ff2982fa8c146251ba93d030da5024dae5ffa6d
# Parent 5849e413cc6e3d3330d11fbda9e9b954af774ac0
[TEST]Fixing get_hv_version() of xm_virt_util.py lib.
The command virsh -c qemu:///system version does not work on F10.
Hence this workaround for F10.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 5849e413cc6e -r 7ff2982fa8c1 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Dec 23 13:51:22 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Mon Dec 29 04:49:43 2008 -0800
@@ -231,7 +231,18 @@
return None
def get_hv_ver(server, virt="Xen"):
- cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" %virt2uri(virt)
+ cmd = "virsh -c %s version" %virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+ if ret == 0:
+ cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" \
+ %virt2uri(virt)
+
+ # This is a workaround work for F10.
+ # The version option does not seem to work on F10.
+ if ret != 0 and virt == 'KVM':
+ cmd = "qemu-kvm --help | grep -i version | tr -s [:space:] |" \
+ " cut -d ' ' -f 1,5"
+
ret, out = utils.run_remote(server, cmd)
if ret == 0:
return out
15 years, 8 months
Test Run Summary (Dec 29 2008): KVM on Fedora release 9 (Sulphur) with Pegasus
by Deepti B Kalakeri
=================================================
Test Run Summary (Dec 29 2008): KVM on Fedora release 9 (Sulphur) with Pegasus
=================================================
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: 575
Cimtest changeset: 5849e413cc6e
=================================================
FAIL : 0
XFAIL : 3
SKIP : 7
PASS : 130
-----------------
Total : 140
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
=================================================
SKIP Test Summary:
RedirectionService - 01_enum_crs.py: SKIP
RedirectionService - 02_enum_crscap.py: SKIP
RedirectionService - 03_RedirectionSAP_errs.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 - In fn cim_state_change()
ERROR - Failed to change state of the domain 'test_domain'
ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported')
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported
Bug:<00012>
--------------------------------------------------------------------
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
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.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: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
ERROR - rstest_domain not updated properly.
ERROR - Exp AutomaticRecoveryAction=3, got 2
Bug:<00010>
--------------------------------------------------------------------
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.
15 years, 8 months
Test Run Summary (Dec 29 2008): LXC on Fedora release 9.90.1 (Rawhide) with sfcb
by Deepti B Kalakeri
=================================================
Test Run Summary (Dec 29 2008): LXC on Fedora release 9.90.1 (Rawhide) with sfcb
=================================================
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: 791
Libvirt-cim changeset: 3557859610b4
Cimtest revision: 575
Cimtest changeset: 5849e413cc6e
=================================================
FAIL : 0
XFAIL : 8
SKIP : 31
PASS : 101
-----------------
Total : 140
=================================================
XFAIL Test Summary:
ComputerSystem - 06_paused_active_suspend.py: XFAIL
ComputerSystem - 23_suspend_suspend.py: XFAIL
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
HostSystem - 02_hostsystem_to_rasd.py: XFAIL
HostedDependency - 03_enabledstate.py: XFAIL
VSSD - 04_vssd_to_rasd.py: XFAIL
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.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
LogicalDisk - 01_disk.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
LogicalDisk - 03_ld_gi_errs.py: SKIP
NetworkPort - 01_netport.py: SKIP
NetworkPort - 02_np_gi_errors.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
RASD - 04_disk_rasd_size.py: SKIP
ResourceAllocationFromPool - 05_RAPF_err.py: SKIP
ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemManagementService - 06_addresource.py: SKIP
VirtualSystemManagementService - 08_modifyresource.py: SKIP
VirtualSystemManagementService - 09_procrasd_persist.py: SKIP
VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP
VirtualSystemManagementService - 12_referenced_config.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: XFAIL
ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend')
ERROR - Unable to suspend dom 'DomST1' using RequestedStateChange()
InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_suspend_suspend.py: XFAIL
ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend')
ERROR - Unable to 'Suspend' dom 'cs_test_domain' using RequestedStateChange()
InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
ComputerSystem - 27_define_suspend_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Exception: (1, u'Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot')
ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange()
InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - In fn cim_state_change()
ERROR - Failed to change state of the domain 'test_domain'
ERROR - Exception: (7, u'State not supported')
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: 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: XFAIL
ERROR - InstanceID Mismatch
ERROR - Returned CrossClass_GuestDom/mouse:xen instead of CrossClass_GuestDom/mouse:usb
Class not found
Bug:<00009>
--------------------------------------------------------------------
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: XFAIL
ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend')
ERROR - Failed to suspend the dom: hd_domain1
InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
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: 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 - 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: SKIP
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.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: 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: XFAIL
ERROR - InstanceID Mismatch
ERROR - Returned VSSDC_dom/mouse:xen instead of VSSDC_dom/mouse:usb
Bug:<00009>
--------------------------------------------------------------------
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: SKIP
--------------------------------------------------------------------
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
--------------------------------------------------------------------
Thanks and Regards,
Deepti.
15 years, 8 months
[PATCH] [TEST] #4 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1230088019 28800
# Node ID 4337528f363855cc8945a9a60417ab0b83634ff8
# Parent b7d80fdeb2a3318749f0faa4b2ad9725da97cc56
[TEST] #4 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM
This tc only works with KVM now, follow patch to support the other types
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b7d80fdeb2a3 -r 4337528f3638 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 Tue Dec 23 19:06:59 2008 -0800
@@ -0,0 +1,98 @@
+#!/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 parse_instance_id
+from XenKvmLib.const import do_main
+from XenKvmLib import vxml
+from CimTest.ReturnCodes import PASS, FAIL
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
+from XenKvmLib.const import get_provider_version
+
+SUPPORTED_TYPES = ['KVM']
+default_dom = 'test_domain'
+libvirt_em_type_changeset = 737
+
+@do_main(SUPPORTED_TYPES)
+def main():
+ status = FAIL
+ options = main.options
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev < libvirt_em_type_changeset:
+ return SKIP
+
+ emu_types = [0, 1]
+ for exp_emu_type in emu_types:
+ cxml = vxml.get_class(options.virt)(default_dom, emu_type=exp_emu_type)
+ ret = cxml.cim_define(options.ip)
+ if not ret:
+ 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))
+ cxml.undefine(options.ip)
+ return FAIL
+ except Exception, detail:
+ logger.error(CIM_ERROR_ENUMERATE, drasd)
+ logger.error("Exception: %s", detail)
+ cxml.undefine(options.ip)
+ return FAIL
+
+ found_rasd = None
+ for rasd in drasd_list:
+ guest, dev, status = parse_instance_id(rasd['InstanceID'])
+ if status != PASS:
+ logger.error("Unable to parse InstanceID: %s" % rasd['InstanceID'])
+ cxml.undefine(options.ip)
+ return FAIL
+ if guest == default_dom:
+ if rasd['EmulatedType'] == exp_emu_type:
+ found_rasd = rasd
+ status = PASS
+ break
+ else:
+ logger.error("EmulatedType Mismatch: got %d, expected %d",\
+ rasd['EmulatedType'], exp_emu_type)
+ cxml.undefine(options.ip)
+ return FAIL
+
+ if found_rasd == None:
+ logger.error("The defined dom is not found")
+ cxml.undefine(options.ip)
+ return FAIL
+
+ cxml.undefine(options.ip)
+
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
diff -r b7d80fdeb2a3 -r 4337528f3638 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Dec 22 23:03:01 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Dec 23 19:06:59 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,12 @@
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)
+ if emu_type != None:
+ self.EmulatedType = emu_type
@eval_cls('DiskResourceAllocationSettingData')
def get_dasd_class(virt):
@@ -239,6 +243,7 @@
proc_vcpu=1,
mem_mb=512,
malloc_units="MegaBytes",
+ emu_type=None,
virt='Xen'):
vssd = get_vssd_mof(virt, dom_name)
@@ -252,7 +257,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(
diff -r b7d80fdeb2a3 -r 4337528f3638 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Dec 22 23:03:01 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Dec 23 19:06:59 2008 -0800
@@ -466,11 +466,13 @@
class VirtCIM:
def __init__(self, virt, dom_name, disk_dev, disk_source,
- net_type, net_name, net_mac, vcpus, mem, mem_allocunits):
+ net_type, net_name, net_mac, vcpus, mem,
+ mem_allocunits, emu_type=None):
self.virt = virt
self.domain_name = dom_name
self.vssd = vsms.get_vssd_mof(virt, dom_name)
- self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name)
+ self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source,
+ dom_name, emu_type)
self.nasd = vsms.get_nasd_class(virt)(type=net_type,
mac=net_mac,
name=dom_name,
@@ -695,13 +697,15 @@
disk_file_path=const.KVM_disk_path,
disk=const.KVM_default_disk_dev,
ntype=const.default_net_type,
- net_name=const.default_network_name):
+ net_name=const.default_network_name,
+ emu_type=None):
if not os.path.exists(disk_file_path):
logger.error('Error: Disk image does not exist')
sys.exit(1)
VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus)
VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path,
- ntype, net_name, mac, vcpus, mem, mem_allocunits)
+ ntype, net_name, mac, vcpus, mem, mem_allocunits,
+ emu_type)
self._os()
self._devices(const.KVM_default_emulator, ntype,
disk_file_path, disk, mac, net_name)
15 years, 8 months
[PATCH] [TEST] Update CS 22_define_suspend.py to use cim_suspend()
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1230067384 28800
# Node ID 10588b983902335403bb3c40d60b9064d77020ce
# Parent 0e44ebb837b569aa33acce5724e1094ccc4486fe
[TEST] Update CS 22_define_suspend.py to use cim_suspend()
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 0e44ebb837b5 -r 10588b983902 suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Tue Dec 23 13:13:18 2008 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/22_define_suspend.py Tue Dec 23 13:23:04 2008 -0800
@@ -29,67 +29,42 @@
# Date: 14-12-2007
import sys
-from VirtLib import utils
-from XenKvmLib import vxml
-from XenKvmLib.test_doms import destroy_and_undefine_domain
+from XenKvmLib.vxml import get_class
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
-from XenKvmLib.common_util import create_using_definesystem, \
- call_request_state_change, get_cs_instance
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
test_dom = "domgst"
-DEFINE_STATE = 3
-SUSPND_STATE = 9
-TIME = "00000000000000.000000:000"
-
-def chk_state(domain_name, ip, en_state, virt):
- rc, cs = get_cs_instance(domain_name, ip, virt)
- if rc != 0:
- return rc
-
- if cs.EnabledState != en_state:
- logger.error("EnabledState should be %d not %d",
- en_state, cs.EnabledState)
- return FAIL
-
- return PASS
-
@do_main(sup_types)
def main():
options = main.options
+ cxml = get_class(options.virt)(test_dom)
+
+ status = FAIL
try:
# define the vs
- status = create_using_definesystem(test_dom, options.ip,
- virt=options.virt)
- if status != PASS:
- logger.error("Unable to define %s using DefineSystem()" % test_dom)
- return status
+ ret = cxml.cim_define(options.ip)
+ if not ret:
+ raise Exception("Unable to define %s" % test_dom)
# suspend the vs
- status = call_request_state_change(test_dom, options.ip, SUSPND_STATE,
- TIME, virt=options.virt)
+ status = cxml.cim_suspend(options.ip)
if status != PASS:
logger.info("Suspending defined %s failed, as expected" % test_dom)
status = PASS
-
- status = chk_state(test_dom, options.ip, DEFINE_STATE, options.virt)
- if status != PASS:
- logger.error("%s should have been in defined state" % test_dom)
- status = FAIL
-
- else :
- logger.error("Suspending defined %s should have failed" % test_dom)
- status = FAIL
+ else:
+ raise Exception("Suspending defined %s should have failed" % \
+ test_dom)
except Exception, detail:
logger.error("Error: %s" % detail)
status = FAIL
- destroy_and_undefine_domain(test_dom, options.ip, options.virt)
+ cxml.undefine(options.ip)
+
return status
if __name__ == "__main__":
15 years, 8 months
[PATCH] [TEST] Update CS 33_suspend_reboot.py to use cim_() functions
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1230066798 28800
# Node ID 0e44ebb837b569aa33acce5724e1094ccc4486fe
# Parent 0efe95dfa11a48f887900b41d5a83ecb1f07321f
[TEST] Update CS 33_suspend_reboot.py to use cim_() functions.
Note: Even though this test is called suspend, it was using the CIM
RequestedState value for pause. The mof files call value 6 offline, but the
libvirt-cim code calls it suspend.
Pause is supported by the provider, suspend is not. So there is a change in
bug number.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 0efe95dfa11a -r 0e44ebb837b5 suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Tue Dec 23 13:10:38 2008 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/33_suspend_reboot.py Tue Dec 23 13:13:18 2008 -0800
@@ -35,32 +35,22 @@
# ---------------------------------
# Defined | 3
# Active | 2
-# Suspended | 9
+# Suspended | 6
# Rebooted | 10
#
# Date: 06-03-2008
import sys
-import pywbem
-from VirtLib import utils
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
-from XenKvmLib.test_doms import destroy_and_undefine_domain
-from XenKvmLib.common_util import create_using_definesystem, \
- call_request_state_change, \
- poll_for_state_change, \
- try_request_state_change
+from XenKvmLib.vxml import get_class
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
-bug_libvirt = "00005"
-ACTIVE_STATE = 2
-SUSPND_STATE = 9
-REBOOT_STATE = 10
+bug_libvirt = "00012"
default_dom = 'test_domain'
-TIME = "00000000000000.000000:000"
@do_main(sup_types)
def main():
@@ -69,45 +59,41 @@
server = options.ip
virt = options.virt
- tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]),
- ('Suspend', [SUSPND_STATE, SUSPND_STATE]),
- ('Reboot', [SUSPND_STATE, REBOOT_STATE])]
+ tc_scen = ['Start', 'Suspend', 'Reboot']
+ action_passed = PASS
try:
# define the vs
- status = create_using_definesystem(default_dom, server,
- virt=virt)
- if status != PASS:
- logger.error("Unable to define domain '%s' using DefineSystem()",
- default_dom)
- return status
+ cxml = get_class(options.virt)(default_dom)
+ ret = cxml.cim_define(server)
+ if not ret:
+ raise Exception("Failed to define the guest: %s" % default_dom)
# start, suspend and reboot
- for action, state in tc_scen:
- en_state = state[0]
- rq_state = state[1]
- status = call_request_state_change(default_dom, server,
- rq_state, TIME,
- virt=virt)
+ for action in tc_scen:
+ if action == "Start":
+ status = cxml.cim_start(server)
+ elif action == "Suspend":
+ status = cxml.cim_suspend(server)
+ elif action == "Reboot":
+ status = cxml.cim_reboot(server)
+ else:
+ raise Exception("Unexpected state change: %s" % action)
+
if status != PASS:
- logger.error("Unable to '%s' dom '%s' using RequestedStateChange()",
- action, default_dom)
- status = XFAIL_RC(bug_libvirt)
- break
-
- status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state,
- timeout=10)
- if status != PASS or dom_cs.RequestedState != rq_state:
- status = FAIL
- logger.error("Attributes for dom '%s' is not set as expected.",
- default_dom)
- break
+ action_passed = FAIL
+ raise Exception("Unable %s dom '%s'" % (action, default_dom))
except Exception, detail:
logger.error("Exception: %s", detail)
status = FAIL
- destroy_and_undefine_domain(default_dom, server, virt)
+ cxml.cim_destroy(server)
+ cxml.undefine(server)
+
+ if action_passed == FAIL:
+ return XFAIL_RC(bug_libvirt)
+
return status
if __name__ == "__main__":
15 years, 8 months