Test Run Summary (Jan 19 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb
by Guo Lian Yun
=================================================
Test Run Summary (Jan 19 2009): 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: 800
Libvirt-cim changeset: 611757263edd
Cimtest revision: 598
Cimtest changeset: 32645e444b32
=================================================
FAIL : 1
XFAIL : 8
SKIP : 32
PASS : 100
-----------------
Total : 141
=================================================
FAIL Test Summary:
ElementConforms - 01_forward.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 06_paused_active_suspend.py: XFAIL
ComputerSystem - 23_pause_pause.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
RASD - 05_disk_rasd_emu_type.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 - In fn cim_state_change()
ERROR - Failed to change state of the domain 'DomST1'
ERROR - Exception: (1, u'Unable to pause domain: this function
is not supported by the hypervisor: virDomainSuspend')
ERROR - Exception variable: Unable pause dom 'DomST1'
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_pause_pause.py: XFAIL
ERROR - In fn cim_state_change()
ERROR - Failed to change state of the domain 'cs_test_domain'
ERROR - Exception: (1, u'Unable to pause domain: this function
is not supported by the hypervisor: virDomainSuspend')
ERROR - Exception: 'Unable pause dom 'cs_test_domain''
InvokeMethod(RequestStateChange): Unable to pause domain: this function is
not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - In fn cim_state_change()
ERROR - Failed to change state of the domain 'cs_test_domain'
ERROR - Exception: (1, u'Unable to reboot domain: this function
is not supported by the hypervisor: virDomainReboot')
ERROR - Exception: Unable reboot dom 'cs_test_domain'
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: FAIL
ERROR - verify_fields() exception:
u'LXC_AllocationCapabilities'
ERROR - Exception: Failed to verify instance
Class not found
--------------------------------------------------------------------
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
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.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
--------------------------------------------------------------------
15 years, 11 months
[PATCH] [TEST] Adding new tc to verify KVMRedirectionSAP
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1232018404 28800
# Node ID cc74023eeaf78970482e0a7a0c4c37a7ff997530
# Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4
[TEST] Adding new tc to verify KVMRedirectionSAP.
Tested with KVM/Xen on current sources and KVM with F9 rpm.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 43bf01b82ce9 -r cc74023eeaf7 suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Thu Jan 15 03:20:04 2009 -0800
@@ -0,0 +1,166 @@
+#!/usr/bin/python
+#
+# Copyright 2008 IBM Corp.
+#
+# Authors:
+# Deepti B. Kalakeri <dkalaker(a)in.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
+#
+# This test case is used to verify the KVMRedirectionSAP properties in detail.
+# This test case verifies the following:
+#
+# When the domain is defined:
+# KVMRedirectionSAP.Enabled = 3 and
+# KVMRedirectionSAP.[ElementName, Name] = -1:-1
+#
+# When the defined domain is started:
+# KVMRedirectionSAP.Enabled = 6 and
+# KVMRedirectionSAP.[ElementName, Name] = port used in the xml:0
+#
+# Date : 15-01-2009
+#
+
+import sys
+from XenKvmLib.vxml import get_class
+from XenKvmLib.classes import get_typed_class
+from XenKvmLib.const import do_main, get_provider_version
+from XenKvmLib.enumclass import EnumInstances
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
+from CimTest.ReturnCodes import PASS, FAIL, SKIP
+from XenKvmLib.const import KVMRedSAP_proto, CIM_SAP_AVAILABLE_STATE, \
+ CIM_SAP_INACTIVE_STATE
+
+sup_types = ['Xen', 'KVM']
+libvirtcim_redSAP_changes = 716
+test_dom = 'test_redsap_dom'
+
+def enum_redsap(server, virt, classname):
+ redsap_insts = { }
+ status = FAIL
+
+ try:
+ redsap_list = EnumInstances(server, classname)
+ for redsap in redsap_list:
+ guest = redsap.SystemName
+ if guest == test_dom:
+ if redsap.Classname not in redsap_insts.keys():
+ redsap_insts[redsap.Classname] = redsap
+ status = PASS
+ else:
+ raise Exception("Got more than one record for: %s" \
+ % test_dom)
+ except Exception, details:
+ logger.error(CIM_ERROR_ENUMERATE, classname)
+ logger.error("Exception details: %s", details)
+ return status, redsap_insts
+
+
+def verify_redsap_values(val_list, redsap_inst, classname):
+ try:
+ for key in val_list.keys():
+ redsap = redsap_inst[classname]
+ ret_val = eval('redsap.' + key)
+ if ret_val != val_list[key]:
+ raise Exception("'%s' Value Mismatch, Expected %s, Got %s" \
+ % (key, val_list[key], ret_val))
+ except Exception, details:
+ logger.error("Exception details: %s", details)
+ return FAIL
+
+ return PASS
+
+@do_main(sup_types)
+def main():
+ virt = main.options.virt
+ server = main.options.ip
+
+ cname = 'KVMRedirectionSAP'
+ classname = get_typed_class(virt, cname)
+
+ # This check is required for libivirt-cim providers which do not have
+ # REDSAP changes in it and the REDSAP provider is available with
+ # revision >= 716.
+ curr_cim_rev, changeset = get_provider_version(virt, server)
+ if curr_cim_rev < libvirtcim_redSAP_changes:
+ logger.info("'%s' provider not supported, hence skipping the tc ....",
+ classname)
+ return SKIP
+
+ vsxml = None
+ action_start = False
+
+ try:
+ virt_xml = get_class(virt)
+ vsxml = virt_xml(test_dom)
+ ret = vsxml.cim_define(server)
+ if not ret:
+ raise Exception("Failed to define the dom: %s" % test_dom)
+
+ status, redsap_inst = enum_redsap(server, virt, classname)
+ if status != PASS:
+ raise Exception("Failed to get information on the defined dom:%s" \
+ % test_dom)
+
+ # val_list that will be used for comparing with enum of
+ # KVMRedirectionSAP values
+ sccn = get_typed_class(virt, 'ComputerSystem')
+ g_type = vsxml.xml_get_graphics_type()
+ val_list = {
+ 'SystemCreationClassName' : sccn,
+ 'SystemName' : test_dom,
+ 'CreationClassName' : classname,
+ 'KVMProtocol' : KVMRedSAP_proto[g_type],
+ 'EnabledState' : CIM_SAP_INACTIVE_STATE
+ }
+ val_list['ElementName'] = val_list['Name'] = "%s:%s" % ('-1', '-1')
+
+ status = verify_redsap_values(val_list, redsap_inst, classname)
+ if status != PASS:
+ raise Exception("Failed to verify information on the defined "\
+ "dom:%s" % test_dom)
+
+ status = vsxml.cim_start(server)
+ if not ret:
+ raise Exception("Failed to start the dom: %s" % test_dom)
+
+ status, redsap_inst = enum_redsap(server, virt, classname)
+ if status != PASS:
+ action_start = True
+ raise Exception("Failed to get information for running dom:%s" \
+ % test_dom)
+
+ lport = vsxml.xml_get_graphics_port()
+ val_list['ElementName'] = val_list['Name'] = "%s:%s" % (lport, '0')
+ val_list['EnabledState'] = CIM_SAP_AVAILABLE_STATE
+
+ status = verify_redsap_values(val_list, redsap_inst, classname)
+ if status != PASS:
+ action_start = True
+ raise Exception("Failed to verify information for running dom:%s" \
+ % test_dom)
+
+ except Exception, detail:
+ logger.error("Exception: %s", detail)
+ status = FAIL
+
+ if action_start == True:
+ vsxml.cim_destroy(server)
+
+ vsxml.undefine(server)
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
diff -r 43bf01b82ce9 -r cc74023eeaf7 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Mon Jan 12 08:22:47 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Jan 15 03:20:04 2009 -0800
@@ -46,6 +46,15 @@
# Default TimeoutPeriod param for CS.RequestedStateChange()
TIME = "00000000000000.000000:000"
+
+#KVMRedirectionSAP protocol values
+KVMRedSAP_proto = { 'raw' : 2, 'rdp' : 3, 'vnc' : 4 }
+
+# CIM values for KVMRedirectionSAP.EnabledState
+CIM_SAP_ACTIVE_STATE = 2
+CIM_SAP_INACTIVE_STATE = 3
+CIM_SAP_AVAILABLE_STATE = 6
+
# vxml.NetXML
default_bridge_name = 'testbridge'
diff -r 43bf01b82ce9 -r cc74023eeaf7 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 12 08:22:47 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 15 03:20:04 2009 -0800
@@ -413,6 +413,15 @@
'/domain/devices/interface/source/@network')
return networkStr
+ def xml_get_graphics_type(self):
+ graphicstypeStr = self.get_value_xpath(
+ '/domain/devices/graphics/@type')
+ return graphicstypeStr
+
+ def xml_get_graphics_port(self):
+ graphicsportStr = self.get_value_xpath(
+ '/domain/devices/graphics/@port')
+ return graphicsportStr
def dumpxml(self, ip):
cmd = 'virsh -c %s dumpxml %s' % (self.vuri, self.dname)
15 years, 11 months
[PATCH] [TEST] Add support for EmulatedType 1 to SDC
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1232061344 28800
# Node ID a0d97b02af71c0cd5b13a88ab0ba089ea3c35d2a
# Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8
[TEST] Add support for EmulatedType 1 to SDC.
Also fix a bug with the if statement in set_disk_props() and a spacing bug.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 8c56ab06aeb9 -r a0d97b02af71 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Wed Jan 14 08:41:52 2009 -0800
+++ b/src/Virt_SettingsDefineCapabilities.c Thu Jan 15 15:15:44 2009 -0800
@@ -611,13 +611,13 @@
const CMPIObjectPath *ref,
const char *id,
uint64_t disk_size,
+ uint16_t emu_type,
struct inst_list *list)
{
const char *addr;
const char *dev;
CMPIInstance *inst;
CMPIStatus s = {CMPI_RC_OK, NULL};
- uint16_t emu_type = 0;
if (type == DOMAIN_LXC) {
addr = "/tmp";
@@ -646,7 +646,7 @@
dev = "xvda";
CMSetProperty(inst, "Caption",
(CMPIValue *)"PV disk", CMPI_chars);
- } else if (type, DOMAIN_XENFV) {
+ } else if (type == DOMAIN_XENFV) {
CMSetProperty(inst, "Caption",
(CMPIValue *)"FV disk", CMPI_chars);
}
@@ -671,6 +671,7 @@
char *pfx;
const char *id;
uint64_t disk_size;
+ uint16_t emu_type = 0;
CMPIStatus s = {CMPI_RC_OK, NULL};
switch(template_type) {
@@ -702,16 +703,54 @@
pfx = class_prefix_name(CLASSNAME(ref));
if (STREQ(pfx, "Xen")) {
- s = set_disk_props(DOMAIN_XENPV, ref, id, disk_size, list);
-
+ int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV};
+ int i = 0;
+
+ for (; i < 2; i++) {
+ emu_type = 0;
+ s = set_disk_props(xen_type[i],
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ emu_type = 1;
+ s = set_disk_props(xen_type[i],
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+ }
+ } else if (STREQ(pfx, "KVM")) {
+ s = set_disk_props(DOMAIN_KVM,
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
if (s.rc != CMPI_RC_OK)
- goto out;
+ goto out;
- s = set_disk_props(DOMAIN_XENFV, ref, id, disk_size, list);
- } else if (STREQ(pfx, "KVM")) {
- s = set_disk_props(DOMAIN_KVM, ref, id, disk_size, list);
+ emu_type = 1;
+ s = set_disk_props(DOMAIN_KVM,
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
} else if (STREQ(pfx, "LXC")) {
- s = set_disk_props(DOMAIN_LXC, ref, id, disk_size, list);
+ s = set_disk_props(DOMAIN_LXC,
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
} else {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
15 years, 11 months
[PATCH] [TEST] #2 Update VSMS 04_definesystem_ers.py to use cim_define()
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1231458233 28800
# Node ID 4fe54bc4c934de944f1aa4c47d4ed2ee27d2caa6
# Parent 860a4f93be18ad6d84b5ea8724be123b2980b479
[TEST] #2 Update VSMS 04_definesystem_ers.py to use cim_define()
Add a err_rc and err_desc elements to the VirtCIM class. This will allow
us to check the error code and error description in case of failed CIM
method calls.
Add two functions: set_sys_settings() and set_res_settings(). These allow the
caller to set the VSSD and RASDs after the initial init() of the VirtCIM class.
Some of the logic in cim_define() was changed to allow the passing of just
a single RASD to DefineSystem() (instead of passing all the RASDs).
Updates:
-Create function to verify return code and error description if define fails
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 860a4f93be18 -r 4fe54bc4c934 suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Thu Jan 08 15:30:13 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Thu Jan 08 15:43:53 2009 -0800
@@ -23,17 +23,14 @@
#
import sys
-import pywbem
-from VirtLib import utils
-from XenKvmLib import vsms
-from XenKvmLib.test_doms import undefine_test_domain
-from XenKvmLib.common_util import create_using_definesystem
+from pywbem import CIM_ERR_FAILED
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
+from XenKvmLib.vxml import get_class
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
-exp_rc = 1 #CMPI_RC_ERR_FAILED
+exp_rc = CIM_ERR_FAILED
exp_desc = 'Unable to parse embedded object'
@do_main(sup_types)
@@ -41,26 +38,28 @@
options = main.options
dname = 'test_domain'
- vssd, rasd = vsms.default_vssd_rasd_str(dom_name=dname, virt=options.virt)
- params = {'vssd' : vssd,
- 'rasd' : ['wrong']
- }
+ cxml = get_class(options.virt)(dname)
- exp_err = {'exp_rc' : exp_rc,
- 'exp_desc' : exp_desc
- }
+ rasd_list = { "MemResourceAllocationSettingData" : "wrong" }
+ cxml.set_res_settings(rasd_list)
+ try:
+ ret = cxml.cim_define(options.ip)
+ if ret:
+ raise Exception('DefineSystem returned OK with invalid params')
- rc = create_using_definesystem(dname, options.ip, params, ref_config=' ',
- exp_err=exp_err, virt=options.virt)
+ status = cxml.verify_error_msg(exp_rc, exp_desc)
+ if status != PASS:
+ raise Exception('DefineSystem failed for an unexpected reason')
- if rc != PASS:
- logger.error('DefineSystem should NOT return OK with a wrong ss input')
+ except Exception, details:
+ logger.error(details)
+ status = FAIL
- undefine_test_domain(dname, options.ip, virt=options.virt)
+ cxml.undefine(options.ip)
- return rc
+ return status
if __name__ == "__main__":
sys.exit(main())
diff -r 860a4f93be18 -r 4fe54bc4c934 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 08 15:30:13 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 08 15:43:53 2009 -0800
@@ -469,6 +469,8 @@
net_type, net_name, net_mac, vcpus, mem, mem_allocunits):
self.virt = virt
self.domain_name = dom_name
+ self.err_rc = None
+ self.err_desc = None
self.vssd = vsms.get_vssd_mof(virt, dom_name)
self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name)
self.nasd = vsms.get_nasd_class(virt)(type=net_type,
@@ -487,11 +489,17 @@
def cim_define(self, ip, ref_conf=None):
service = vsms.get_vsms_class(self.virt)(ip)
sys_settings = str(self.vssd)
- if self.virt == 'LXC' and const.LXC_netns_support is False:
- res_settings = [str(self.dasd), str(self.pasd), str(self.masd)]
- else:
- res_settings = [str(self.dasd), str(self.nasd),
- str(self.pasd), str(self.masd)]
+
+ res_settings = []
+ if self.dasd is not None:
+ res_settings.append(str(self.dasd))
+ if self.pasd is not None:
+ res_settings.append(str(self.pasd))
+ if self.masd is not None:
+ res_settings.append(str(self.masd))
+ if self.nasd is not None or \
+ (self.virt == 'LXC' and const.LXC_netns_support is False):
+ res_settings.append(str(self.nasd))
if ref_conf is None:
ref_conf = ' '
@@ -502,6 +510,8 @@
ReferenceConfiguration=ref_conf)
except pywbem.CIMError, (rc, desc):
logger.error('Got CIM error %s with return code %s' % (desc, rc))
+ self.err_rc = rc
+ self.err_desc = desc
return False
except Exception, details:
@@ -519,6 +529,12 @@
target = pywbem.cim_obj.CIMInstanceName(cs_cn, keybindings = keys)
try:
ret = service.DestroySystem(AffectedSystem=target)
+ except pywbem.CIMError, (rc, desc):
+ logger.error('Got CIM error %s with return code %s' % (desc, rc))
+ self.err_rc = rc
+ self.err_desc = desc
+ return False
+
except Exception, details:
logger.error('Error invoking DestroySystem')
logger.error('Got error %s with exception %s' \
@@ -570,6 +586,12 @@
cs.RequestStateChange(RequestedState=req_state_change,
TimeoutPeriod=time_period)
+ except pywbem.CIMError, (rc, desc):
+ logger.error('Got CIM error %s with return code %s' % (desc, rc))
+ self.err_rc = rc
+ self.err_desc = desc
+ return FAIL
+
except Exception, detail:
logger.error("In fn cim_state_change()")
logger.error("Failed to change state of the domain '%s'", cs.Name)
@@ -615,6 +637,36 @@
return self.cim_state_change(server, const.CIM_RESET,
req_time, poll_time, const.CIM_ENABLE)
+ def set_sys_settings(self, vssd):
+ self.vssd = vssd
+
+ def set_res_settings(self, rasd_list):
+ for cn, rasd in rasd_list.iteritems():
+ if cn.find("MemResourceAllocationSettingData") >= 0:
+ self.masd = rasd
+ elif cn.find("ProcResourceAllocationSettingData") >= 0:
+ self.pasd = rasd
+ elif cn.find("DiskResourceAllocationSettingData") >= 0:
+ self.dasd = rasd
+ elif cn.find("NetResourceAllocationSettingData") >= 0:
+ self.nasd = rasd
+
+ def verify_error_msg(self, exp_rc, exp_desc):
+ try:
+ rc = int(self.err_rc)
+
+ if rc != exp_rc:
+ raise Exception("Got rc: %d, exp %d." % (rc, exp_rc))
+
+ if self.err_desc.find(exp_desc) < 0:
+ raise Exception("Got desc: '%s', exp '%s'" % (self.err_desc,
+ exp_desc))
+
+ except Exception, details:
+ logger.error(details)
+ return FAIL
+
+ return PASS
class XenXML(VirtXML, VirtCIM):
15 years, 11 months
Problem with KVMRedirectionSAP records for KVM.
by Deepti B Kalakeri
Hi,
I have the following domains on my machine, each of them have the
graphics tags in them:
virsh list --all
Id Name State
----------------------------------
- graphics_domain2 shut off
- testdom1 shut off
Here is the xml files that I used to create the guests. The only common
thing in them is the uuid.
SAP1.xml :
<domain type='kvm'>
<name>testdom1</name>
<uuid>6fa1cd59-0c71-483d-bd63-7a6a3f53d180</uuid>
<memory>131072</memory>
<currentMemory>131072</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='file' device='disk'>
<source file='/tmp/myimage'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='network'>
<mac address='11:22:33:aa:bb:cc'/>
<source network='test_default'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5901' keymap='en-us'/>
</devices>
</domain>
SAP2.xml :
<domain type='kvm'>
<name>graphics_domain2</name>
<uuid>6fa1cd59-0c71-483d-bd63-7a6a3f53d180</uuid>
<memory>131072</memory>
<currentMemory>131072</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu</emulator>
<disk type='file' device='disk'>
<source file='/tmp/default-kvm-dimage'/>
<target dev='hda' bus='ide'/>
</disk>
<interface type='network'>
<mac address='11:22:33:aa:bb:aa'/>
<source network='default'/>
</interface>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='5999' keymap='en-us'/>
</devices>
</domain>
wbemcli ein
'http://root:passwd@localhost/root/virt:KVM_KVMRedirectionSAP' -nl
localhost:5988/root/virt:KVM_KVMRedirectionSAP.CreationClassName="KVM_KVMRedirectionSAP",Name="5901:-1",SystemCreationClassName="KVM_ComputerSystem",SystemName="testdom1"
localhost:5988/root/virt:KVM_KVMRedirectionSAP.CreationClassName="KVM_KVMRedirectionSAP",Name="5901:-1",SystemCreationClassName="KVM_ComputerSystem",SystemName="testdom1"
But the EnumerateInstance of the ComputerSystem will give the correct
results:
wbemcli ein 'http://root:passwd@localhost/root/virt:KVM_ComputerSystem' -nl
localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="testdom1"
localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="graphics_domain2"
This symptoms is not seen with Xen, where the xml contains the same UUID.
I want to know why is this kind of difference in the behaviour and
whether this is expected.
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com
15 years, 11 months
[PATCH] [TEST] #3 Fix none value for disk assigned for Xen and align parameters in function call
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1231997388 28800
# Node ID 32645e444b323b137d0c0a2a323be574b370d75a
# Parent 74392c40130a7aa3f6b8c4dfffa0d357b232479b
[TEST] #3 Fix none value for disk assigned for Xen and align parameters in function call
Updates from 2 to 3:
Change comments place
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r 74392c40130a -r 32645e444b32 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jan 13 13:09:25 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Jan 14 21:29:48 2009 -0800
@@ -249,21 +249,28 @@
if virt == 'KVM':
disk_dev = 'hda'
disk_source = const.KVM_disk_path
- d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
elif virt == 'XenFV':
disk_dev = 'hda'
disk_source = const.XenFV_disk_path
- d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
elif virt == 'LXC':
disk_dev = const.LXC_default_mp
disk_source = const.LXC_default_source
- d = class_dasd(disk_dev, disk_source, dom_name)
-
+
+ #LXC guests do not need to set the EmulationType
+ if virt == 'LXC':
+ d = class_dasd(disk_dev,
+ disk_source,
+ dom_name)
+ else:
+ d = class_dasd(disk_dev,
+ disk_source,
+ dom_name,
+ emu_type)
+
class_masd = get_masd_class(virt)
- m = class_masd(
- megabytes=mem_mb,
- mallocunits=malloc_units,
- name=dom_name)
+ m = class_masd(megabytes=mem_mb,
+ mallocunits=malloc_units,
+ name=dom_name)
# LXC only takes disk and memory device for now.
if virt == 'LXC':
@@ -278,15 +285,13 @@
net_mac = const.XenFV_default_mac
elif virt == 'LXC':
net_mac = const.LXC_default_mac
- n = class_nasd(
- type=net_type,
- mac=net_mac,
- name=dom_name,
- virt_net=net_name)
+ n = class_nasd(type=net_type,
+ mac=net_mac,
+ name=dom_name,
+ virt_net=net_name)
class_pasd = get_pasd_class(virt)
- p = class_pasd(
- vcpu=proc_vcpu,
- name=dom_name)
+ p = class_pasd(vcpu=proc_vcpu,
+ name=dom_name)
return vssd, [d.mof(), n.mof(), p.mof(), m.mof()]
15 years, 11 months
[PATCH] Improve error messages for resource manipulation and migration
by Jim Fehlig
# HG changeset patch
# User Jim Fehlig <jfehlig(a)novell.com>
# Date 1231965788 25200
# Node ID 611757263eddd2bb97383d250ee636300a91a9e6
# Parent b4f1d84b87c20350fdfe0651a684a24b7e03ba28
Improve error messages for resource manipulation and migration
This patch extends on c/s 768, adding use of virt_set_status() in
resource manipulation extrinsics in Virt_VirtualSystemManagementService
and migration extrinsic in Virt_VSMigrationService.
Signed-off-by: Jim Fehlig <jfehlig(a)novell.com>
diff -r b4f1d84b87c2 -r 611757263edd src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Wed Jan 14 13:33:20 2009 -0700
+++ b/src/Virt_VSMigrationService.c Wed Jan 14 13:43:08 2009 -0700
@@ -939,9 +939,10 @@ static CMPIStatus handle_migrate(virConn
ddom = virDomainMigrate(dom, dconn, type, NULL, NULL, 0);
if (ddom == NULL) {
CU_DEBUG("Migration failed");
- cu_statusf(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Migration Failed");
+ virt_set_status(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ virDomainGetConnect(dom),
+ "Migration Failed");
}
out:
virDomainFree(ddom);
diff -r b4f1d84b87c2 -r 611757263edd src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Wed Jan 14 13:33:20 2009 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Wed Jan 14 13:43:08 2009 -0700
@@ -1479,9 +1479,10 @@ static CMPIStatus _resource_dynamic(stru
CU_DEBUG("Doing dynamic device update for `%s'", dominfo->name);
if (func(dom, dev) == 0) {
- cu_statusf(_BROKER, &s,
- CMPI_RC_ERR_FAILED,
- "Unable to change (%i) device", action);
+ virt_set_status(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ conn,
+ "Unable to change (%i) device", action);
} else {
cu_statusf(_BROKER, &s,
CMPI_RC_OK,
15 years, 11 months
[PATCH] Use previously obtained libvirt connection object
by Jim Fehlig
# HG changeset patch
# User Jim Fehlig <jfehlig(a)novell.com>
# Date 1231965200 25200
# Node ID b4f1d84b87c20350fdfe0651a684a24b7e03ba28
# Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8
Use previously obtained libvirt connection object
Libvirt connection object already obtained from virDomainPtr, use it.
Signed-off-by: Jim Fehlig <jfehlig(a)novell.com>
diff -r 8c56ab06aeb9 -r b4f1d84b87c2 src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Wed Jan 14 08:41:52 2009 -0800
+++ b/src/Virt_ComputerSystem.c Wed Jan 14 13:33:20 2009 -0700
@@ -800,13 +800,13 @@ static CMPIStatus domain_reset(virDomain
if (ret != 0) {
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- virDomainGetConnect(dom),
+ conn,
"Unable to destroy domain");
goto out;
}
- dom = virDomainLookupByName(virDomainGetConnect(dom),
- virDomainGetName(dom));
+ dom = virDomainLookupByName(conn,
+ virDomainGetName(dom));
if (dom == NULL) {
dom = virDomainDefineXML(conn, xml);
@@ -814,7 +814,7 @@ static CMPIStatus domain_reset(virDomain
CU_DEBUG("Failed to define domain from XML");
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- virDomainGetConnect(dom),
+ conn,
"Unable to define domain");
goto out;
}
@@ -827,7 +827,7 @@ static CMPIStatus domain_reset(virDomain
if (ret != 0)
virt_set_status(_BROKER, &s,
CMPI_RC_ERR_FAILED,
- virDomainGetConnect(dom),
+ conn,
"Failed to start domain");
out:
15 years, 11 months
[PATCH] [TEST] #2 Fix none value for disk assigned for Xen and align parameters in function call
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1231902765 28800
# Node ID ff2f8adc42d8c41f1af67b0b23e05f9396132a72
# Parent 74392c40130a7aa3f6b8c4dfffa0d357b232479b
[TEST] #2 Fix none value for disk assigned for Xen and align parameters in function call
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r 74392c40130a -r ff2f8adc42d8 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jan 13 13:09:25 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jan 13 19:12:45 2009 -0800
@@ -245,25 +245,31 @@
virt='Xen'):
vssd = get_vssd_mof(virt, dom_name)
+ # Xen uses the default dev and source values for disk
class_dasd = get_dasd_class(virt)
if virt == 'KVM':
disk_dev = 'hda'
disk_source = const.KVM_disk_path
- d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
elif virt == 'XenFV':
disk_dev = 'hda'
disk_source = const.XenFV_disk_path
- d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
elif virt == 'LXC':
disk_dev = const.LXC_default_mp
disk_source = const.LXC_default_source
- d = class_dasd(disk_dev, disk_source, dom_name)
-
+ if virt == 'LXC':
+ d = class_dasd(disk_dev,
+ disk_source,
+ dom_name)
+ else:
+ d = class_dasd(disk_dev,
+ disk_source,
+ dom_name,
+ emu_type)
+
class_masd = get_masd_class(virt)
- m = class_masd(
- megabytes=mem_mb,
- mallocunits=malloc_units,
- name=dom_name)
+ m = class_masd(megabytes=mem_mb,
+ mallocunits=malloc_units,
+ name=dom_name)
# LXC only takes disk and memory device for now.
if virt == 'LXC':
@@ -278,15 +284,13 @@
net_mac = const.XenFV_default_mac
elif virt == 'LXC':
net_mac = const.LXC_default_mac
- n = class_nasd(
- type=net_type,
- mac=net_mac,
- name=dom_name,
- virt_net=net_name)
+ n = class_nasd(type=net_type,
+ mac=net_mac,
+ name=dom_name,
+ virt_net=net_name)
class_pasd = get_pasd_class(virt)
- p = class_pasd(
- vcpu=proc_vcpu,
- name=dom_name)
+ p = class_pasd(vcpu=proc_vcpu,
+ name=dom_name)
return vssd, [d.mof(), n.mof(), p.mof(), m.mof()]
15 years, 11 months
[PATCH] [TEST] Fix none value for disk assigned for Xen
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1231816020 28800
# Node ID 1ac5b107e0f047c30d6a0044735b09e3fe144100
# Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4
[TEST] Fix none value for disk assigned for Xen
Signed-off-by: Guolian Yun<yunguol(a)cn.ibm.com>
diff -r 43bf01b82ce9 -r 1ac5b107e0f0 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jan 12 08:22:47 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jan 12 19:07:00 2009 -0800
@@ -249,16 +249,18 @@
if virt == 'KVM':
disk_dev = 'hda'
disk_source = const.KVM_disk_path
- d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
elif virt == 'XenFV':
disk_dev = 'hda'
disk_source = const.XenFV_disk_path
- d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
elif virt == 'LXC':
disk_dev = const.LXC_default_mp
disk_source = const.LXC_default_source
+
+ if virt == 'LXC':
d = class_dasd(disk_dev, disk_source, dom_name)
-
+ else:
+ # Xen's case falls in here using the default values
+ d = class_dasd(disk_dev, disk_source, dom_name, emu_type)
class_masd = get_masd_class(virt)
m = class_masd(
megabytes=mem_mb,
15 years, 11 months