KVM on sfcb Test Run Summary for Nov 20 2008
by Guo Lian Yun
=================================================
KVM on sfcb Test Run Summary for Nov 20 2008
=================================================
Distro: Fedora release 9.90.1 (Rawhide)
Kernel: 2.6.27-0.323.rc6.fc10.x86_64
libvirt: 0.4.5
Hypervisor: QEMU 0.9.1
CIMOM: sfcb sfcbd 1.3.3preview
Libvirt-cim revision: 758
Libvirt-cim changeset: 087bd497d4ed
Cimtest revision: 493
Cimtest changeset: 78b18dc8cbfc
=================================================
FAIL : 6
XFAIL : 2
SKIP : 4
PASS : 127
-----------------
Total : 139
=================================================
FAIL Test Summary:
AllocationCapabilities - 01_enum.py: FAIL
ComputerSystemIndication - 01_created_indication.py: FAIL
ElementCapabilities - 01_forward.py: FAIL
HostSystem - 02_hostsystem_to_rasd.py: FAIL
HostSystem - 04_hs_to_EAPF.py: FAIL
VSSD - 04_vssd_to_rasd.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
=================================================
SKIP Test Summary:
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: FAIL
ERROR - KVM_AllocationCapabilities returned 7 instances,
expected 5
ERROR - KVM_AllocationCapabilities returned instance with
unexpected InstanceID u'GraphicsPool/0'
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: PASS
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_suspend_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_suspend_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Exception: (1, u'Domain Operation Failed')
ERROR - Unable to 'Reboot' dom 'cs_test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Exception: (1, u'Domain Operation Failed')
ERROR - Unable to 'Reboot' dom 'test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: FAIL
ERROR - Exception: not enough arguments for format string
Got indication: KVM_ComputerSystemCreatedIndication
ERROR - Received indication error: 256
ERROR - Exception: not enough arguments for format string
Got indication: KVM_ComputerSystemCreatedIndication
ERROR - Received indication error: 256
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: FAIL
ERROR - 'KVM_ElementCapabilities' association InstanceID error
Class not found
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: PASS
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: FAIL
ERROR - Failed to get associators information for
KVM_SettingsDefineState
ERROR - Exception: u'KVM_PointingDevice'
Class not found
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: FAIL
ERROR - DEBUG host_name is elm3b197.beaverton.ibm.com
ERROR - KeyError : u'KVM_GraphicsPool'
Traceback (most recent call last):
File "./lib/XenKvmLib/const.py", line 116, in do_try
File "04_hs_to_EAPF.py", line 251, in main
in_pllist = pool_init_list(virt, pool, net_name, default_pool_name)
File "04_hs_to_EAPF.py", line 103, in pool_init_list
if exp_pllist[CName] == InstID:
KeyError: u'KVM_GraphicsPool'
ERROR - None
Class not found
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: PASS
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py:
PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: FAIL
ERROR - Mistmatching KVM_InputResourceAllocationSettingData
values
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py:
PASS
--------------------------------------------------------------------
16 years, 1 month
[PATCH] [TEST] Adding cim_disable() to vxml.py
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com
# Date 1227163333 28800
# Node ID 07c47f60d2f24034714c5aef79ae63f904cf1ffe
# Parent 340a8219c05fd707857536f04b0c0c4ab7fe1337
[TEST] Adding cim_disable() to vxml.py.
Changed the const CIM_START to CIM_ENABLE in const.py.
Adding cim_disable() to vxml.py.
This patch has to be applied on top of "#3 Adding cim_state_change() to VirtCIM class of vxml".
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 340a8219c05f -r 07c47f60d2f2 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Nov 19 22:29:31 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Nov 19 22:42:13 2008 -0800
@@ -32,14 +32,14 @@ VIRSH_ERROR_DEFINE = "Failed to define a
VIRSH_ERROR_DEFINE = "Failed to define a domain with the name %s from virsh"
#CIM values for VS State transitions
-CIM_START = 2
-CIM_DEFINE = 3
-CIM_SHUTDOWN = 4
-CIM_NOCHANGE = 5
-CIM_SUSPEND = 6
-CIM_PAUSE = 9
-CIM_REBOOT = 10
-CIM_RESET = 11
+CIM_ENABLE = 2
+CIM_DISABLE = 3
+CIM_SHUTDOWN = 4
+CIM_NOCHANGE = 5
+CIM_SUSPEND = 6
+CIM_PAUSE = 9
+CIM_REBOOT = 10
+CIM_RESET = 11
# Default TimeoutPeriod param for CS.RequestedStateChange()
TIME = "00000000000000.000000:000"
diff -r 340a8219c05f -r 07c47f60d2f2 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 19 22:29:31 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 19 22:42:13 2008 -0800
@@ -585,7 +585,12 @@ class VirtCIM:
def cim_start(self, server, virt, domain_name,
req_time=const.TIME, poll_time=30):
return self.cim_state_change(server, virt, domain_name,
- const.CIM_START, req_time, poll_time)
+ const.CIM_ENABLE, req_time, poll_time)
+
+ def cim_disable(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_DISABLE, req_time, poll_time)
def cim_shutdown(self, server, virt, domain_name,
req_time=const.TIME, poll_time=30):
16 years, 1 month
[PATCH] [TEST] #3 Adding cim_state_change() to VirtCIM class of vxml
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com
# Date 1227162571 28800
# Node ID 340a8219c05fd707857536f04b0c0c4ab7fe1337
# Parent 78b18dc8cbfccff5b50c8c7228ca3a7396facc61
[TEST] #3 Adding cim_state_change() to VirtCIM class of vxml.
Changes:
--------
Updates from 2 to 3:
--------------------
Updated the missing cim VS state transition values to const.py.
Added cim_no_stat_change(), cim_shutdown(), cim_reset() to vxml.py.
Changed the comment in 05_activate_defined_start.py to make it more meaningful.
Updates from Patch 1 to 2:
--------------------------
Removed the get_cs_instance() fn.
Declared VS states and TIME values in const.py.
Added cim_start(), cim_reboot(), cim_pause(), cim_suspend() fn's.
Patch 1:
--------
cim_state_change() fn can be used to start/reboot/suspend the domain.
The function verifies that the state of the domain is changed by calling poll_for_state_change().
Included poll_for_state_change(), .get_cs_instance() fn in the vxml since including it from common_util
was causing a circular chain and was failing.
Right now the cim_state_change() just returns the the status, Can modify to return the domain if req.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 78b18dc8cbfc -r 340a8219c05f suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Thu Nov 13 21:42:27 2008 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Wed Nov 19 22:29:31 2008 -0800
@@ -48,7 +48,6 @@ from CimTest.Globals import logger
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from XenKvmLib.classes import get_typed_class
-from XenKvmLib.common_util import call_request_state_change
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -57,8 +56,6 @@ bug_no = "00002"
bug_no = "00002"
START_STATE = 3
FINAL_STATE = 2
-REQUESTED_STATE = FINAL_STATE
-TIME = "00000000000000.000000:000"
@do_main(sup_types)
def main():
@@ -66,66 +63,64 @@ def main():
status = FAIL
cxml = vxml.get_class(options.virt)(test_dom, mem)
+ ret = cxml.cim_define(options.ip)
+ #Define a VS
+ if not ret :
+ logger.error("ERROR: VS '%s' was not defined", test_dom)
+ return status
-#Define a VS
+ cs_class = get_typed_class(options.virt, 'ComputerSystem')
+ keys = { 'Name' : test_dom, 'CreationClassName' : cs_class }
+
try:
- ret = cxml.cim_define(options.ip)
- if not ret :
- logger.error("ERROR: VS %s was not defined" % test_dom)
- return status
- cs_class = get_typed_class(options.virt, 'ComputerSystem')
- keys = {
- 'Name' : test_dom,
- 'CreationClassName' : cs_class
- }
cs = enumclass.GetInstance(options.ip, cs_class, keys)
-
if cs.Name == test_dom:
from_State = cs.EnabledState
else:
- logger.error("ERROR: VS %s is not available" % test_dom)
+ logger.error("VS '%s' is not available", test_dom)
return status
except Exception, detail:
logger.error("Exception: %s" % detail)
cxml.undefine(options.ip)
return status
-
-#Change the state of the VS to Start
- rc = call_request_state_change(test_dom, options.ip, REQUESTED_STATE,
- TIME, options.virt)
- if rc != 0:
- logger.error("Unable start dom %s using RequestedStateChange()", test_dom)
- cxml.undefine(options.ip)
- return status
-#Get the value of the EnabledState property and RequestedState property.
try:
+ #Change the state of the VS to Start
+ status = cxml.cim_start(options.ip, options.virt, test_dom)
+ if status != PASS:
+ logger.error("Unable start dom '%s' using "
+ "RequestedStateChange()", test_dom)
+ cxml.undefine(options.ip)
+ return status
+
+ #Get the value of the EnabledState property and RequestedState property.
cs= enumclass.GetInstance(options.ip, cs_class, keys)
if cs.Name == test_dom:
to_RequestedState = cs.RequestedState
enabledState = cs.EnabledState
else:
- logger.error("VS %s is not found" % test_dom)
+ logger.error("VS '%s' is not found", test_dom)
return status
-# Success:
-# if
-# From state == 3
-# To state == 2
-# Enabled_state == RequestedState
+
+ # Success:
+ # if
+ # From state == defined
+ # To state == running
+ # Enabled_state == RequestedState
if from_State == START_STATE and \
to_RequestedState == FINAL_STATE and \
enabledState == to_RequestedState:
status = PASS
else:
- logger.error("ERROR: VS %s transition from Defined State to Activate state\
- was not Successful" % test_dom)
+ logger.error("VS '%s' transition from Defined State to "
+ "Activate state was not Successful", test_dom)
status = XFAIL_RC(bug_no)
except Exception, detail:
logger.error("Exception: %s" % detail)
- cxml.destroy(options.ip)
+ cxml.cim_destroy(options.ip)
cxml.undefine(options.ip)
return status
if __name__ == "__main__":
diff -r 78b18dc8cbfc -r 340a8219c05f suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Nov 13 21:42:27 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Nov 19 22:29:31 2008 -0800
@@ -30,6 +30,19 @@ platform_sup = ["Xen", "KVM", "XenFV"]
platform_sup = ["Xen", "KVM", "XenFV"]
VIRSH_ERROR_DEFINE = "Failed to define a domain with the name %s from virsh"
+
+#CIM values for VS State transitions
+CIM_START = 2
+CIM_DEFINE = 3
+CIM_SHUTDOWN = 4
+CIM_NOCHANGE = 5
+CIM_SUSPEND = 6
+CIM_PAUSE = 9
+CIM_REBOOT = 10
+CIM_RESET = 11
+
+# Default TimeoutPeriod param for CS.RequestedStateChange()
+TIME = "00000000000000.000000:000"
# vxml.NetXML
default_bridge_name = 'testbridge'
diff -r 78b18dc8cbfc -r 340a8219c05f suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Nov 13 21:42:27 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 19 22:29:31 2008 -0800
@@ -34,6 +34,7 @@ import sys
import sys
import platform
import tempfile
+from time import sleep
import pywbem
from xml.dom import minidom, Node
from xml import xpath
@@ -43,8 +44,9 @@ from XenKvmLib import vsms
from XenKvmLib import vsms
from XenKvmLib import const
from CimTest.Globals import logger, CIM_IP, CIM_PORT, CIM_NS, CIM_USER, CIM_PASS
-from CimTest.ReturnCodes import SKIP
+from CimTest.ReturnCodes import SKIP, PASS, FAIL
from XenKvmLib.classes import virt_types, get_typed_class
+from XenKvmLib.enumclass import GetInstance
class XMLClass:
xml_string = ""
@@ -524,6 +526,98 @@ class VirtCIM:
return False
return ret[0] == 0
+ def poll_for_state_change(self, server, domain_name, cs_class, keys,
+ req_state, timeout):
+ dom_cs = None
+ try:
+
+ for i in range(1, (timeout + 1)):
+ dom_cs = GetInstance(server, cs_class, keys)
+ if dom_cs is None or dom_cs.Name != domain_name:
+ continue
+
+ sleep(1)
+ if dom_cs.EnabledState == req_state:
+ break
+
+ except Exception, detail:
+ logger.error("In fn poll_for_state_change()")
+ logger.error("Exception: %s" % detail)
+ return FAIL
+
+ if dom_cs is None or dom_cs.Name != domain_name:
+ logger.error("CS instance not returned for %s." % domain_name)
+ return FAIL
+
+ if dom_cs.EnabledState != req_state:
+ logger.error("EnabledState is %i instead of %i.",
+ dom_cs.EnabledState, req_state)
+ logger.error("Try to increase the timeout and run the test again")
+ return FAIL
+
+ return PASS
+
+ def cim_state_change(self, server, virt, domain_name,
+ req_state, req_timeout, poll_time):
+ cs = None
+ cs_class = get_typed_class(virt, 'ComputerSystem')
+ keys = { 'Name' : domain_name, 'CreationClassName' : cs_class }
+ cs = GetInstance(server, cs_class, keys)
+ if cs is None or cs.Name != domain_name:
+ return status
+
+ try:
+ req_state_change = pywbem.cim_types.Uint16(req_state)
+ time_period = pywbem.cim_types.CIMDateTime(req_timeout)
+ cs.RequestStateChange(RequestedState=req_state_change,
+ TimeoutPeriod=time_period)
+
+ except Exception, detail:
+ logger.error("In fn cim_state_change()")
+ logger.error("Failed to change state of the domain '%s'", cs.Name)
+ logger.error("Exception: %s", detail)
+ return FAIL
+
+ status = self.poll_for_state_change(server, domain_name, cs_class, keys,
+ req_state, poll_time)
+ return status
+
+ def cim_start(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_START, req_time, poll_time)
+
+ def cim_shutdown(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_SHUTDOWN, req_time, poll_time)
+
+ def cim_no_state_change(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_NOCHANGE, req_time, poll_time)
+
+ def cim_suspend(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_SUSPEND, req_time, poll_time)
+
+ def cim_pause(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_PAUSE, req_time, poll_time)
+
+ def cim_reboot(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_REBOOT, req_time, poll_time)
+
+ def cim_reset(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_RESET, req_time, poll_time)
+
+
class XenXML(VirtXML, VirtCIM):
secondary_disk_path = const.Xen_secondary_disk_path
16 years, 1 month
KVM on Pegasus Test Run Summary for Nov 20 2008
by Guo Lian Yun
=================================================
KVM on Pegasus Test Run Summary for Nov 20 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: 493
Cimtest changeset: 78b18dc8cbfc
=================================================
FAIL : 2
XFAIL : 2
SKIP : 8
PASS : 127
-----------------
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:
ComputerSystem - 02_nosystems.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
RedirectionService - 01_enum_crs.py: SKIP
RedirectionService - 02_enum_crscap.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_suspend_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_suspend_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation
Failed')
ERROR - Unable to 'Reboot' dom 'cs_test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation
Failed')
ERROR - Unable to 'Reboot' dom 'test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: PASS
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: PASS
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: 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, 1 month
LXC on sfcb Test Run Summary for Nov 20 2008
by Guo Lian Yun
=================================================
LXC on sfcb Test Run Summary for Nov 20 2008
=================================================
Distro: Fedora release 9.90.1 (Rawhide)
Kernel: 2.6.27-0.323.rc6.fc10.x86_64
libvirt: 0.4.5
Hypervisor: QEMU 0.9.1
CIMOM: sfcb sfcbd 1.3.3preview
Libvirt-cim revision: 758
Libvirt-cim changeset: 087bd497d4ed
Cimtest revision: 493
Cimtest changeset: 78b18dc8cbfc
=================================================
FAIL : 5
XFAIL : 1
SKIP : 38
PASS : 95
-----------------
Total : 139
=================================================
FAIL Test Summary:
AllocationCapabilities - 01_enum.py: FAIL
ElementCapabilities - 01_forward.py: FAIL
HostSystem - 02_hostsystem_to_rasd.py: FAIL
VSSD - 04_vssd_to_rasd.py: FAIL
VirtualSystemManagementService - 12_referenced_config.py: FAIL
=================================================
XFAIL Test Summary:
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
ComputerSystem - 06_paused_active_suspend.py: SKIP
ComputerSystem - 23_suspend_suspend.py: SKIP
ComputerSystem - 32_start_reboot.py: SKIP
ComputerSystem - 33_suspend_reboot.py: SKIP
ComputerSystem - 35_start_reset.py: SKIP
ComputerSystem - 40_RSC_start.py: SKIP
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystemIndication - 01_created_indication.py: SKIP
ElementAllocatedFromPool - 03_reverse_errs.py: SKIP
ElementAllocatedFromPool - 04_forward_errs.py: SKIP
HostedDependency - 03_enabledstate.py: SKIP
LogicalDisk - 01_disk.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
LogicalDisk - 03_ld_gi_errs.py: SKIP
NetworkPort - 01_netport.py: SKIP
NetworkPort - 03_user_netport.py: SKIP
Processor - 01_processor.py: SKIP
Processor - 02_definesys_get_procs.py: SKIP
Processor - 03_proc_gi_errs.py: SKIP
Profile - 02_profile_to_elec.py: SKIP
RASD - 04_disk_rasd_size.py: SKIP
ResourceAllocationFromPool - 05_RAPF_err.py: SKIP
ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py:
SKIP
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP
SettingsDefineCapabilities - 05_reverse_vsmcap.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemManagementService - 06_addresource.py: SKIP
VirtualSystemManagementService - 08_modifyresource.py: SKIP
VirtualSystemManagementService - 09_procrasd_persist.py: SKIP
VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP
VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: FAIL
ERROR - LXC_AllocationCapabilities returned 7 instances,
expected 5
ERROR - LXC_AllocationCapabilities returned instance with
unexpected InstanceID u'GraphicsPool/0'
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_suspend_suspend.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 27_define_suspend_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: SKIP
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: SKIP
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: SKIP
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: FAIL
ERROR - 'LXC_ElementCapabilities' association InstanceID error
Class not found
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: PASS
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: FAIL
ERROR - Failed to get associators information for
LXC_SettingsDefineState
ERROR - Exception: u'LXC_PointingDevice'
Class not found
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: SKIP
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: SKIP
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: SKIP
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: SKIP
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: SKIP
--------------------------------------------------------------------
Processor - 01_processor.py: SKIP
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: SKIP
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: SKIP
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: SKIP
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: SKIP
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: SKIP
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py:
SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: SKIP
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: FAIL
ERROR - Mistmatching LXC_InputResourceAllocationSettingData
values
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: FAIL
ERROR - Unable to build VSSD and RASD instances for
rstest_domain2
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
ERROR - rstest_domain not updated properly.
ERROR - Exp AutomaticRecoveryAction=3, got 2
Bug:<00008>
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py:
PASS
--------------------------------------------------------------------
16 years, 1 month
[PATCH] [TEST] #2 Adding cim_state_change() to VirtCIM class of vxml
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com
# Date 1227103041 28800
# Node ID 6b81367e87d574d3352f2752a4d303ff155367fd
# Parent 78b18dc8cbfccff5b50c8c7228ca3a7396facc61
[TEST] #2 Adding cim_state_change() to VirtCIM class of vxml.
Changes:
--------
Updates from Patch 1 to 2:
--------------------------
Removed the get_cs_instance() fn.
Declared VS states and TIME values in const.py.
Added cim_start(), cim_reboot(), cim_pause(), cim_suspend() fn's.
Patch 1:
--------
cim_state_change() fn can be used to start/reboot/suspend the domain.
The function verifies that the state of the domain is changed by calling poll_for_state_change().
Included poll_for_state_change(), .get_cs_instance() fn in the vxml since including it from common_util
was causing a circular chain and was failing.
Right now the cim_state_change() just returns the the status, Can modify to return the domain if req.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 78b18dc8cbfc -r 6b81367e87d5 suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Thu Nov 13 21:42:27 2008 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Wed Nov 19 05:57:21 2008 -0800
@@ -48,7 +48,6 @@ from CimTest.Globals import logger
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from XenKvmLib.classes import get_typed_class
-from XenKvmLib.common_util import call_request_state_change
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -57,8 +56,6 @@ bug_no = "00002"
bug_no = "00002"
START_STATE = 3
FINAL_STATE = 2
-REQUESTED_STATE = FINAL_STATE
-TIME = "00000000000000.000000:000"
@do_main(sup_types)
def main():
@@ -66,41 +63,38 @@ def main():
status = FAIL
cxml = vxml.get_class(options.virt)(test_dom, mem)
+ ret = cxml.cim_define(options.ip)
+ #Define a VS
+ if not ret :
+ logger.error("ERROR: VS '%s' was not defined", test_dom)
+ return status
-#Define a VS
+ cs_class = get_typed_class(options.virt, 'ComputerSystem')
+ keys = { 'Name' : test_dom, 'CreationClassName' : cs_class }
+
try:
- ret = cxml.cim_define(options.ip)
- if not ret :
- logger.error("ERROR: VS %s was not defined" % test_dom)
- return status
- cs_class = get_typed_class(options.virt, 'ComputerSystem')
- keys = {
- 'Name' : test_dom,
- 'CreationClassName' : cs_class
- }
cs = enumclass.GetInstance(options.ip, cs_class, keys)
-
if cs.Name == test_dom:
from_State = cs.EnabledState
else:
- logger.error("ERROR: VS %s is not available" % test_dom)
+ logger.error("VS '%s' is not available", test_dom)
return status
except Exception, detail:
logger.error("Exception: %s" % detail)
cxml.undefine(options.ip)
return status
-
-#Change the state of the VS to Start
- rc = call_request_state_change(test_dom, options.ip, REQUESTED_STATE,
- TIME, options.virt)
- if rc != 0:
- logger.error("Unable start dom %s using RequestedStateChange()", test_dom)
- cxml.undefine(options.ip)
- return status
-#Get the value of the EnabledState property and RequestedState property.
try:
+ #Change the state of the VS to Start
+ status = cxml.cim_start(options.ip, options.virt, test_dom)
+ if status != PASS:
+ logger.error("Unable start dom '%s' using "
+ "RequestedStateChange()", test_dom)
+ cxml.undefine(options.ip)
+ return status
+
+ #Get the value of the EnabledState property and RequestedState property.
cs= enumclass.GetInstance(options.ip, cs_class, keys)
if cs.Name == test_dom:
to_RequestedState = cs.RequestedState
@@ -108,24 +102,24 @@ def main():
else:
logger.error("VS %s is not found" % test_dom)
return status
-# Success:
-# if
-# From state == 3
-# To state == 2
-# Enabled_state == RequestedState
+ # Success:
+ # if
+ # From state == 3
+ # To state == 2
+ # Enabled_state == RequestedState
if from_State == START_STATE and \
to_RequestedState == FINAL_STATE and \
enabledState == to_RequestedState:
status = PASS
else:
- logger.error("ERROR: VS %s transition from Defined State to Activate state\
- was not Successful" % test_dom)
+ logger.error("VS '%s' transition from Defined State to "
+ "Activate state was not Successful", test_dom)
status = XFAIL_RC(bug_no)
except Exception, detail:
logger.error("Exception: %s" % detail)
- cxml.destroy(options.ip)
+ cxml.cim_destroy(options.ip)
cxml.undefine(options.ip)
return status
if __name__ == "__main__":
diff -r 78b18dc8cbfc -r 6b81367e87d5 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Nov 13 21:42:27 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Nov 19 05:57:21 2008 -0800
@@ -30,6 +30,16 @@ platform_sup = ["Xen", "KVM", "XenFV"]
platform_sup = ["Xen", "KVM", "XenFV"]
VIRSH_ERROR_DEFINE = "Failed to define a domain with the name %s from virsh"
+
+#CIM values for VS State transitions
+CIM_START = 2
+CIM_DEFINE = 3
+CIM_SUSPEND = 6
+CIM_PAUSE = 9
+CIM_REBOOT = 10
+
+# Default TimeoutPeriod param for CS.RequestedStateChange()
+TIME = "00000000000000.000000:000"
# vxml.NetXML
default_bridge_name = 'testbridge'
diff -r 78b18dc8cbfc -r 6b81367e87d5 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Nov 13 21:42:27 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 19 05:57:21 2008 -0800
@@ -34,6 +34,7 @@ import sys
import sys
import platform
import tempfile
+from time import sleep
import pywbem
from xml.dom import minidom, Node
from xml import xpath
@@ -43,8 +44,9 @@ from XenKvmLib import vsms
from XenKvmLib import vsms
from XenKvmLib import const
from CimTest.Globals import logger, CIM_IP, CIM_PORT, CIM_NS, CIM_USER, CIM_PASS
-from CimTest.ReturnCodes import SKIP
+from CimTest.ReturnCodes import SKIP, PASS, FAIL
from XenKvmLib.classes import virt_types, get_typed_class
+from XenKvmLib.enumclass import GetInstance
class XMLClass:
xml_string = ""
@@ -524,6 +526,83 @@ class VirtCIM:
return False
return ret[0] == 0
+ def poll_for_state_change(self, server, domain_name, cs_class, keys,
+ req_state, timeout):
+ dom_cs = None
+ try:
+
+ for i in range(1, (timeout + 1)):
+ dom_cs = GetInstance(server, cs_class, keys)
+ if dom_cs is None or dom_cs.Name != domain_name:
+ continue
+
+ sleep(1)
+ if dom_cs.EnabledState == req_state:
+ break
+
+ except Exception, detail:
+ logger.error("In fn poll_for_state_change()")
+ logger.error("Exception: %s" % detail)
+ return FAIL
+
+ if dom_cs is None or dom_cs.Name != domain_name:
+ logger.error("CS instance not returned for %s." % domain_name)
+ return FAIL
+
+ if dom_cs.EnabledState != req_state:
+ logger.error("EnabledState is %i instead of %i.",
+ dom_cs.EnabledState, req_state)
+ logger.error("Try to increase the timeout and run the test again")
+ return FAIL
+
+ return PASS
+
+ def cim_state_change(self, server, virt, domain_name,
+ req_state, req_timeout, poll_time):
+ cs = None
+ cs_class = get_typed_class(virt, 'ComputerSystem')
+ keys = { 'Name' : domain_name, 'CreationClassName' : cs_class }
+ cs = GetInstance(server, cs_class, keys)
+ if cs is None or cs.Name != domain_name:
+ return status
+
+ try:
+ req_state_change = pywbem.cim_types.Uint16(req_state)
+ time_period = pywbem.cim_types.CIMDateTime(req_timeout)
+ cs.RequestStateChange(RequestedState=req_state_change,
+ TimeoutPeriod=time_period)
+
+ except Exception, detail:
+ logger.error("In fn cim_state_change()")
+ logger.error("Failed to change state of the domain '%s'", cs.Name)
+ logger.error("Exception: %s", detail)
+ return FAIL
+
+ status = self.poll_for_state_change(server, domain_name, cs_class, keys,
+ req_state, poll_time)
+ return status
+
+ def cim_start(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_START, req_time, poll_time)
+
+ def cim_pause(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_PAUSE, req_time, poll_time)
+
+ def cim_reboot(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_REBOOT, req_time, poll_time)
+
+ def cim_suspend(self, server, virt, domain_name,
+ req_time=const.TIME, poll_time=30):
+ return self.cim_state_change(server, virt, domain_name,
+ const.CIM_SUSPEND, req_time, poll_time)
+
+
class XenXML(VirtXML, VirtCIM):
secondary_disk_path = const.Xen_secondary_disk_path
16 years, 1 month
[PATCH] Fix seg fault in KVMRedirectionSAP; fix typos in error messages
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1227114709 28800
# Node ID 7ab817cec936597c1f0b06e4448439711f311e87
# Parent 087bd497d4ed6fbf1b2a00dac26a7c6f8baf91e2
Fix seg fault in KVMRedirectionSAP; fix typos in error messages.
The name field in the vnc_port struct only needs to be freed if the struct has
been initialized.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 087bd497d4ed -r 7ab817cec936 src/Virt_KVMRedirectionSAP.c
--- a/src/Virt_KVMRedirectionSAP.c Tue Nov 18 09:37:05 2008 -0800
+++ b/src/Virt_KVMRedirectionSAP.c Wed Nov 19 09:11:49 2008 -0800
@@ -390,14 +390,15 @@
if (cu_get_str_path(ref, "Name", &name) != CMPI_RC_OK) {
cu_statusf(broker, &s,
CMPI_RC_ERR_NOT_FOUND,
- "No such instance (System)");
+ "No such instance (Name)");
goto out;
}
if (sscanf(name, "%d:%d", &lport, &rport) != 2) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- "Unable to guest's console port");
+ "Unable to determine console port for guest '%s'",
+ sys);
goto out;
}
@@ -431,7 +432,8 @@
out:
virConnectClose(conn);
- free(port->name);
+ if (port != NULL)
+ free(port->name);
free(port);
return s;
16 years, 1 month
[PATCH] Fix segfault in DevicePool when network device source is not defined
by Jim Fehlig
# HG changeset patch
# User Jim Fehlig <jfehlig(a)novell.com>
# Date 1227050707 25200
# Node ID 5cfd2bb6424ba4f6edd06425466e26c71b5d8a22
# Parent 087bd497d4ed6fbf1b2a00dac26a7c6f8baf91e2
Fix segfault in DevicePool when network device source is not defined
c/s 752 missed one case of using NULL source field of net_device
structure. The associated network pool cannot be determined if
source is undefined, so return a NULL pool ID.
Signed-off-by: Jim Fehlig <jfehlig(a)novell.com>
diff -r 087bd497d4ed -r 5cfd2bb6424b src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c Tue Nov 18 09:37:05 2008 -0800
+++ b/src/Virt_DevicePool.c Tue Nov 18 16:25:07 2008 -0700
@@ -388,6 +388,12 @@ static char *_netpool_member_of(virConne
virNetworkPtr net = NULL;
const char *netname;
char *pool = NULL;
+
+ if (ndev->source == NULL) {
+ CU_DEBUG("Unable to determine pool since no network "
+ "source defined");
+ goto out;
+ }
if (STREQ(ndev->type, "bridge"))
net = bridge_to_network(conn, ndev->source);
16 years, 1 month
[PATCH] [TEST] Adding cim_state_change() to VirtCIM class of vxml
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri<deeptik(a)linux.vnet.ibm.com
# Date 1227012098 28800
# Node ID 588efe005eaaf7f56218e844b84bd63e347d0dc0
# Parent ac693577d27b1b5f24fdc6c50272b11d02c91c7f
[TEST] Adding cim_state_change() to VirtCIM class of vxml.
cim_state_change() fn can be used to start/reboot/suspend the domain.
The function verifies that the state of the domain is changed by calling poll_for_state_change().
Included poll_for_state_change(), .get_cs_instance() fn in the vxml since including it from common_util
was causing a circular chain and was failing.
Right now the cim_state_change() just returns the the status, Can modify to return the domain if req.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r ac693577d27b -r 588efe005eaa suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Fri Nov 14 12:48:36 2008 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Tue Nov 18 04:41:38 2008 -0800
@@ -65,25 +65,25 @@ def main():
options = main.options
status = FAIL
- cxml = vxml.get_class(options.virt)(test_dom, mem)
-#Define a VS
+ cs_class = get_typed_class(options.virt, 'ComputerSystem')
+ keys = { 'Name' : test_dom, 'CreationClassName' : cs_class }
+
try:
+ #Define a VS
+ cxml = vxml.get_class(options.virt)(test_dom, mem)
ret = cxml.cim_define(options.ip)
if not ret :
logger.error("ERROR: VS %s was not defined" % test_dom)
return status
- cs_class = get_typed_class(options.virt, 'ComputerSystem')
- keys = {
- 'Name' : test_dom,
- 'CreationClassName' : cs_class
- }
+
cs = enumclass.GetInstance(options.ip, cs_class, keys)
if cs.Name == test_dom:
from_State = cs.EnabledState
else:
logger.error("ERROR: VS %s is not available" % test_dom)
+ cxml.undefine(options.ip)
return status
except Exception, detail:
@@ -91,16 +91,17 @@ def main():
cxml.undefine(options.ip)
return status
-#Change the state of the VS to Start
- rc = call_request_state_change(test_dom, options.ip, REQUESTED_STATE,
- TIME, options.virt)
- if rc != 0:
- logger.error("Unable start dom %s using RequestedStateChange()", test_dom)
- cxml.undefine(options.ip)
- return status
-#Get the value of the EnabledState property and RequestedState property.
try:
+ #Change the state of the VS to Start
+ status = cxml.cim_state_change(options.ip, options.virt, test_dom,
+ REQUESTED_STATE, TIME)
+ if status != PASS:
+ logger.error("Unable start dom %s using RequestedStateChange()", test_dom)
+ cxml.undefine(options.ip)
+ return status
+
+ #Get the value of the EnabledState property and RequestedState property.
cs= enumclass.GetInstance(options.ip, cs_class, keys)
if cs.Name == test_dom:
to_RequestedState = cs.RequestedState
@@ -108,11 +109,11 @@ def main():
else:
logger.error("VS %s is not found" % test_dom)
return status
-# Success:
-# if
-# From state == 3
-# To state == 2
-# Enabled_state == RequestedState
+ # Success:
+ # if
+ # From state == 3
+ # To state == 2
+ # Enabled_state == RequestedState
if from_State == START_STATE and \
to_RequestedState == FINAL_STATE and \
@@ -125,7 +126,7 @@ def main():
except Exception, detail:
logger.error("Exception: %s" % detail)
- cxml.destroy(options.ip)
+ cxml.cim_destroy(options.ip)
cxml.undefine(options.ip)
return status
if __name__ == "__main__":
diff -r ac693577d27b -r 588efe005eaa suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Nov 14 12:48:36 2008 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Nov 18 04:41:38 2008 -0800
@@ -34,6 +34,7 @@ import sys
import sys
import platform
import tempfile
+from time import sleep
import pywbem
from xml.dom import minidom, Node
from xml import xpath
@@ -43,8 +44,10 @@ from XenKvmLib import vsms
from XenKvmLib import vsms
from XenKvmLib import const
from CimTest.Globals import logger, CIM_IP, CIM_PORT, CIM_NS, CIM_USER, CIM_PASS
-from CimTest.ReturnCodes import SKIP
+from CimTest.ReturnCodes import SKIP, PASS, FAIL
from XenKvmLib.classes import virt_types, get_typed_class
+from XenKvmLib.enumclass import GetInstance
+
class XMLClass:
xml_string = ""
@@ -524,6 +527,81 @@ class VirtCIM:
return False
return ret[0] == 0
+ def get_cs_instance(self, server, virt, domain_name, cs_class, keys):
+ cs = None
+ try:
+ cs = GetInstance(server, cs_class, keys)
+
+ if cs.Name != domain_name:
+ logger.error("VS %s is not found", domain_name)
+ return FAIL, cs
+
+ except Exception, detail:
+ logger.error("In fn get_cs_instance()")
+ logger.error("Exception: %s", detail)
+ return FAIL, cs
+
+ return PASS, cs
+
+ def poll_for_state_change(self, server, domain_name, cs_class, keys,
+ req_state, timeout):
+ dom_cs = None
+ try:
+
+ for i in range(1, (timeout + 1)):
+ dom_cs = GetInstance(server, cs_class, keys)
+ if dom_cs is None or dom_cs.Name != domain_name:
+ continue
+
+ sleep(1)
+ if dom_cs.EnabledState == req_state:
+ break
+
+ except Exception, detail:
+ logger.error("In fn poll_for_state_change()")
+ logger.error("Exception: %s" % detail)
+ return FAIL
+
+ if dom_cs is None or dom_cs.Name != domain_name:
+ logger.error("CS instance not returned for %s." % domain_name)
+ return FAIL
+
+ if dom_cs.EnabledState != req_state:
+ logger.error("EnabledState is %i instead of %i.",
+ dom_cs.EnabledState, req_state)
+ logger.error("Try to increase the timeout and run the test again")
+ return FAIL
+
+ return PASS
+
+ def cim_state_change(self, server, virt, domain_name, rs, time,
+ poll_timeout=30):
+
+ cs_class = get_typed_class(virt, 'ComputerSystem')
+ keys = { 'Name' : domain_name, 'CreationClassName' : cs_class }
+
+ status, cs = self.get_cs_instance(server, virt, domain_name,
+ cs_class, keys)
+ if status != PASS:
+ return status
+
+ try:
+ req_state = pywbem.cim_types.Uint16(rs)
+ time_period = pywbem.cim_types.CIMDateTime(time)
+ cs.RequestStateChange(RequestedState=req_state,
+ TimeoutPeriod=time_period)
+
+ except Exception, detail:
+ logger.error("In fn cim_state_change()")
+ logger.error("Failed to change the state of the domain '%s'",
+ domain_name)
+ logger.error("Exception: %s", detail)
+ return FAIL
+ status = self.poll_for_state_change(server, domain_name, cs_class, keys,
+ req_state, poll_timeout)
+ return status
+
+
class XenXML(VirtXML, VirtCIM):
secondary_disk_path = const.Xen_secondary_disk_path
16 years, 1 month