Test Run Summary (Dec 14 2009): KVM on Fedora release 11 (Leonidas) with Pegasus
by Kaitlin Rupert
=================================================
Test Run Summary (Dec 14 2009): KVM on Fedora release 11 (Leonidas) with
Pegasus
=================================================
Distro: Fedora release 11 (Leonidas)
Kernel: 2.6.30.9-96.fc11.x86_64
libvirt: 0.6.2
Hypervisor: QEMU 0.10.6
CIMOM: Pegasus 2.7.2
Libvirt-cim revision: 986
Libvirt-cim changeset: fac371b2f43e
Cimtest revision: 823
Cimtest changeset: bbb978cccd1b
Total test execution: Unknown
=================================================
FAIL : 5
XFAIL : 3
SKIP : 11
PASS : 32
-----------------
Total : 35
=================================================
FAIL Test Summary:
RASDIndications - 02_guest_add_mod_rem_rasd_ind.py: FAIL
VirtualSystemManagementService - 06_addresource.py: FAIL
VirtualSystemManagementService - 08_modifyresource.py: FAIL
VirtualSystemManagementService - 24_define_sys_features.py: FAIL
VirtualSystemManagementService - 24_verify_modifyres_output.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL
VirtualSystemManagementService - 16_removeresource.py: XFAIL
VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP
KVMRedirectionSAP - 02_ipv6_support.py: SKIP
Profile - 04_verify_libvirt_cim_slp_profiles.py: SKIP
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP
VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: SKIP
VSSD - 02_bootldr.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: PASS
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_FAILED: Unable to reboot domain: this
function is not supported by the hypervisor: virDomainReboot with return
code 1
ERROR - Exception: Unable reboot dom 'cs_test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to reboot
domain: this function is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with
return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 34_start_disable.py: PASS
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: PASS
--------------------------------------------------------------------
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP
--------------------------------------------------------------------
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
--------------------------------------------------------------------
HostedAccessPoint - 01_forward.py: PASS
--------------------------------------------------------------------
HostedAccessPoint - 02_reverse.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
--------------------------------------------------------------------
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
--------------------------------------------------------------------
KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS
--------------------------------------------------------------------
KVMRedirectionSAP - 02_ipv6_support.py: SKIP
--------------------------------------------------------------------
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
--------------------------------------------------------------------
Profile - 04_verify_libvirt_cim_slp_profiles.py: SKIP
04_verify_libvirt_cim_slp_profiles.py:30: DeprecationWarning: the sets
module is deprecated
from sets import Set
ERROR - SLP tool does not exist on the machine
--------------------------------------------------------------------
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
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: PASS
--------------------------------------------------------------------
RASD - 06_parent_net_pool.py: PASS
--------------------------------------------------------------------
RASD - 07_parent_disk_pool.py: PASS
--------------------------------------------------------------------
RASDIndications - 01_guest_states_rasd_ind.py: PASS
--------------------------------------------------------------------
RASDIndications - 02_guest_add_mod_rem_rasd_ind.py: FAIL
ERROR - 'ResultingResourceSettings'
ERROR - Error invoking AddRS: add_disk_res
ERROR - AddResourceSettings call failed
ERROR - Exception: Unable to generate indication
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
ERROR - Need to give different bridge name since it already exists
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService -
06_RemoveResourcesFromResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 08_CreateDiskResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 09_DeleteDiskPool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 10_create_storagevolume.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 11_create_dir_storagevolume_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService -
12_create_netfs_storagevolume_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 13_delete_storagevolume.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 14_delete_storagevolume_errs.py: PASS
--------------------------------------------------------------------
ServiceAccessBySAP - 01_forward.py: PASS
--------------------------------------------------------------------
ServiceAccessBySAP - 02_reverse.py: PASS
--------------------------------------------------------------------
ServiceAffectsElement - 01_forward.py: PASS
--------------------------------------------------------------------
ServiceAffectsElement - 02_reverse.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
--------------------------------------------------------------------
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: FAIL
ERROR - Failed to create Virtual Network 'cimtest-networkpool80'
ERROR - Unable to create network pool
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: FAIL
ERROR - 'ResultingResourceSettings'
ERROR - Error invoking ModifyRS: mod_vcpu_res
ERROR - ModifyResourceSettings call failed
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL
--------------------------------------------------------------------
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
--------------------------------------------------------------------
VirtualSystemManagementService - 16_removeresource.py: XFAIL
ERROR - 0 RASD insts for domain/mouse:ps2
CIM_ERR_NOT_FOUND: No such instance (no device domain/mouse:ps2)
Bug:<00014>
--------------------------------------------------------------------
VirtualSystemManagementService - 17_removeresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 18_define_sys_bridge.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 19_definenetwork_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 20_verify_vnc_password.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 21_createVS_verifyMAC.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL
ERROR - (1, u"CIM_ERR_FAILED: Unable to change (0) device: this
function is not supported by the hypervisor: device type 'interface'
cannot be attached")
ERROR - Error invoking AddRS: add_net_res
ERROR - AddResourceSettings call failed
ERROR - Failed to destroy Virtual Network 'my_network1'
InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unable to change (0)
device: this function is not supported by the hypervisor: device type
'interface' cannot be attached
Bug:<00015>
--------------------------------------------------------------------
VirtualSystemManagementService - 23_verify_duplicate_mac_err.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 24_define_sys_features.py: FAIL
ERROR - Failed to set pae for dom: features_domain
--------------------------------------------------------------------
VirtualSystemManagementService - 24_verify_modifyres_output.py: FAIL
ERROR - 'ResultingResourceSettings'
ERROR - Failed to modify rstest_domain's disk
--------------------------------------------------------------------
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
--------------------------------------------------------------------
VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 08_remote_restart_resume_migration.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
--------------------------------------------------------------------
VirtualSystemSnapshotService - 03_create_snapshot.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.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
--------------------------------------------------------------------
VSSD - 05_set_uuid.py: PASS
--------------------------------------------------------------------
VSSD - 06_duplicate_uuid.py: PASS
--------------------------------------------------------------------
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com
14 years, 8 months
[PATCH] [TEST] Fix CSI to call handle_sub, sub_ind, and poll_for_ind from ind module
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1260576721 28800
# Node ID f6a811d7118444d411baa03847cb96d8cb483ab4
# Parent bbb978cccd1bd3d08bbb9d5e5ff796771d0bfd77
[TEST] Fix CSI to call handle_sub, sub_ind, and poll_for_ind from ind module
No need to have duplicate code in this test case, as these functions
already exist in the indications.py module.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r bbb978cccd1b -r f6a811d71184 suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py
--- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Fri Nov 27 19:24:42 2009 -0200
+++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Fri Dec 11 16:12:01 2009 -0800
@@ -31,39 +31,12 @@
from XenKvmLib.indication_tester import CIMIndicationSubscription
from XenKvmLib.vxml import set_default
from XenKvmLib.vxml import get_class
+from XenKvmLib.indications import sub_ind, handle_request, poll_for_ind
SUPPORTED_TYPES = ['Xen', 'XenFV', 'KVM']
test_dom = "domU"
-def sub_ind(ip, virt):
- dict = set_default(ip)
- ind_names = {"define" : 'ComputerSystemCreatedIndication',
- "start" : 'ComputerSystemModifiedIndication',
- "destroy" : 'ComputerSystemDeletedIndication'
- }
-
- sub_list = {}
- port = 5
-
- for ind, iname in ind_names.iteritems():
- ind_name = get_typed_class(virt, iname)
-
- sub_name = "Test%s" % ind_name
- port += 1
-
- sub = CIMIndicationSubscription(sub_name, ind_name,
- dict['default_ns'],
- dict['default_print_ind'],
- dict['default_sysname'],
- port)
- sub.subscribe(dict['default_url'], dict['default_auth'])
- logger.info("Watching for %s", iname)
- ind_names[ind] = ind_name
- sub_list[ind] = sub
-
- return sub_list, ind_names, dict
-
def gen_ind(test_dom, ip, vtype, ind, cxml):
if ind == "define":
ret = cxml.cim_define(ip)
@@ -85,57 +58,6 @@
return FAIL
-def handle_request(sub, ind_name, dict, exp_ind_ct):
- #sfcb delivers indications to all registrations, even if the indication
- #isn't what the registration was subscribed to. So, for modified and
- #deleted indications, we must loop through until the indication we are
- #looking for is triggered.
- for i in range(0, exp_ind_ct):
- sub.server.handle_request()
- if len(sub.server.indications) < 1:
- logger.error("No valid indications received")
- return FAIL
-
- if str(sub.server.indications[0]) == ind_name:
- sub.unsubscribe(dict['default_auth'])
- logger.info("Cancelling subscription for %s", ind_name)
- return PASS
- else:
- sub.server.indications.remove(sub.server.indications[0])
-
- logger.error("Did not recieve indication %s", ind_name)
- return FAIL
-
-def poll_for_ind(pid, ind_name):
- status = FAIL
- for i in range(0, 20):
- pw = waitpid(pid, WNOHANG)
-
- # If pid exits, waitpid returns [pid, return_code]
- # If pid is still running, waitpid returns [0, 0]
- # Only return a success if waitpid returns the expected pid
- # and the return code is 0.
- if pw[0] == pid and pw[1] == 0:
- logger.info("Great, got %s indication successfuly", ind_name)
- status = PASS
- break
- elif pw[1] == 0 and i < 19:
- if i % 10 == 0:
- logger.info("In child, waiting for %s indication", ind_name)
- sleep(1)
- else:
- # Time is up and waitpid never returned the expected pid
- if pw[0] != pid:
- logger.error("Waited too long for %s indication", ind_name)
- kill(pid, SIGKILL)
- else:
- logger.error("Received indication error: %d", pw[1])
-
- status = FAIL
- break
-
- return status
-
@do_main(SUPPORTED_TYPES)
def main():
options = main.options
@@ -143,20 +65,24 @@
virt = options.virt
status = FAIL
- sub_list, ind_names, dict = sub_ind(ip, virt)
-
- ind_list = ["define", "start", "destroy"]
+ ind_names = {"define" : 'ComputerSystemCreatedIndication',
+ "start" : 'ComputerSystemModifiedIndication',
+ "destroy" : 'ComputerSystemDeletedIndication'
+ }
cxml = get_class(virt)(test_dom)
- for ind in ind_list:
+ sub_list, ind_names, dict = sub_ind(ip, virt, ind_names)
+ for ind in ind_names.keys():
+
sub = sub_list[ind]
ind_name = ind_names[ind]
try:
pid = fork()
if pid == 0:
- status = handle_request(sub, ind_name, dict, len(ind_list))
+ status = handle_request(sub, ind_name, dict,
+ len(ind_names.keys()))
if status != PASS:
_exit(1)
@@ -180,6 +106,9 @@
logger.error("Exception: %s", details)
status = FAIL
+ #Give threads time to execute before unsubscribing
+ sleep(30)
+
#Make sure all subscriptions are really unsubscribed
for ind, sub in sub_list.iteritems():
sub.unsubscribe(dict['default_auth'])
14 years, 9 months
[PATCH] [TEST] Remove hardcoded classname
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1260576721 28800
# Node ID ceb3cf5bc4d887de99e59f8c1ca7833ed0550b22
# Parent a3ab7e83b4cf90d4bdf338196621c36f50a4719d
[TEST] Remove hardcoded classname
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r a3ab7e83b4cf -r ceb3cf5bc4d8 suites/libvirt-cim/cimtest/VirtualSystemManagementService/24_verify_modifyres_output.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/24_verify_modifyres_output.py Fri Dec 11 16:12:01 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/24_verify_modifyres_output.py Fri Dec 11 16:12:01 2009 -0800
@@ -32,6 +32,7 @@
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
from XenKvmLib.vsms_util import call_modify_res
+from XenKvmLib.classes import get_typed_class
sup_types = ['Xen', 'KVM', 'XenFV']
default_dom = 'rstest_domain'
@@ -40,7 +41,7 @@
def main():
options = main.options
- cn = "KVM_DiskResourceAllocationSettingData"
+ cn = get_typed_class(options.virt, "DiskResourceAllocationSettingData")
service = get_vsms_class(options.virt)(options.ip)
cxml = vxml.get_class(options.virt)(default_dom)
14 years, 9 months
[PATCH] [TEST] Have VSMS 24 test SKIP for para virt Xen guests
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1260576721 28800
# Node ID a3ab7e83b4cf90d4bdf338196621c36f50a4719d
# Parent 2a52495fd1c2c47440b65f723366ccc3826f1548
[TEST] Have VSMS 24 test SKIP for para virt Xen guests
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 2a52495fd1c2 -r a3ab7e83b4cf suites/libvirt-cim/cimtest/VirtualSystemManagementService/24_define_sys_features.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/24_define_sys_features.py Fri Dec 11 16:12:01 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/24_define_sys_features.py Fri Dec 11 16:12:01 2009 -0800
@@ -28,7 +28,8 @@
from CimTest.ReturnCodes import FAIL, PASS
from XenKvmLib.const import do_main
-sup_types = ['Xen', 'KVM', 'XenFV']
+#Xen paravirt doesn't support ACPI, PAE, or APIC
+sup_types = ['KVM', 'XenFV']
default_dom = 'features_domain'
@do_main(sup_types)
14 years, 9 months
[PATCH] [TEST] (#3) LXC currently doesn't support VNC, so skip appropriated tests
by Richard Maciel
# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1259357082 7200
# Node ID 7ce11553d0f236f8bd961852720e33a6f7c63ac3
# Parent cdb453f85c01098c4e1bce2ff23dc075f2148390
[TEST] (#3) LXC currently doesn't support VNC, so skip appropriated tests
#2:
- Added missing testcase fix
#3:
- Fixed codestyle
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r cdb453f85c01 -r 7ce11553d0f2 suites/libvirt-cim/cimtest/HostedAccessPoint/01_forward.py
--- a/suites/libvirt-cim/cimtest/HostedAccessPoint/01_forward.py Sat Dec 05 02:22:09 2009 -0200
+++ b/suites/libvirt-cim/cimtest/HostedAccessPoint/01_forward.py Fri Nov 27 19:24:42 2009 -0200
@@ -110,6 +110,9 @@
"skipping the tc ....")
return SKIP
+ if options.virt == 'LXC':
+ logger.info("VNC is not supported by LXC, hence skipping the tc ....")
+ return SKIP
status, cxml = setup_env(options.ip, options.virt)
if status != PASS:
diff -r cdb453f85c01 -r 7ce11553d0f2 suites/libvirt-cim/cimtest/HostedAccessPoint/02_reverse.py
--- a/suites/libvirt-cim/cimtest/HostedAccessPoint/02_reverse.py Sat Dec 05 02:22:09 2009 -0200
+++ b/suites/libvirt-cim/cimtest/HostedAccessPoint/02_reverse.py Fri Nov 27 19:24:42 2009 -0200
@@ -116,6 +116,10 @@
logger.info("'HostedAccessPoint' provider not supported, hence " +
"skipping the tc ....")
return SKIP
+
+ if options.virt == 'LXC':
+ logger.info("VNC is not supported by LXC, hence skipping the tc ....")
+ return SKIP
status, cxml = setup_env(options.ip, options.virt)
if status != PASS:
diff -r cdb453f85c01 -r 7ce11553d0f2 suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py
--- a/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Sat Dec 05 02:22:09 2009 -0200
+++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Fri Nov 27 19:24:42 2009 -0200
@@ -100,6 +100,10 @@
classname)
return SKIP
+ if virt == 'LXC':
+ logger.info("VNC is not supported by LXC, hence skipping the tc ....")
+ return SKIP
+
vsxml = None
action_start = False
diff -r cdb453f85c01 -r 7ce11553d0f2 suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py
--- a/suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py Sat Dec 05 02:22:09 2009 -0200
+++ b/suites/libvirt-cim/cimtest/RedirectionService/03_RedirectionSAP_errs.py Fri Nov 27 19:24:42 2009 -0200
@@ -76,6 +76,10 @@
"hence skipping the test ....")
return SKIP
+ if options.virt == 'LXC':
+ logger.info("VNC is not supported by LXC, hence skipping the tc ....")
+ return SKIP
+
# Getting the VS list and deleting the test_dom if it already exists.
cxml = vxml.get_class(options.virt)(test_dom, vcpus=test_vcpus)
ret = cxml.cim_define(options.ip)
diff -r cdb453f85c01 -r 7ce11553d0f2 suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py Sat Dec 05 02:22:09 2009 -0200
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py Fri Nov 27 19:24:42 2009 -0200
@@ -76,6 +76,10 @@
logger.info("VNC Password support not available, feature available in"\
" '%s' revision..", libvirtcim_vnc_passwd_changes)
return SKIP
+
+ if virt == 'LXC':
+ logger.info("VNC is not supported by LXC, hence skipping the tc ....")
+ return SKIP
cxml = vxml.get_class(virt)(default_dom, vnc_passwd=passwd)
14 years, 9 months
[PATCH] [TEST](#2) VirtCIM init for the LXC virt must also receive pae, acpi and apic param
by Richard Maciel
# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1259986929 7200
# Node ID 8698f85c7b5fdd68ff4a732852fcb21e5f044497
# Parent 9445f602d8a8705743254f85ef426d284ab382d4
[TEST](#2) VirtCIM init for the LXC virt must also receive pae, acpi and apic param
#2:
- Fixed code style
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 9445f602d8a8 -r 8698f85c7b5f suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 18 13:50:16 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Sat Dec 05 02:22:09 2009 -0200
@@ -996,10 +996,13 @@
address="127.0.0.1", port_num='-1', keymap="en-us",
irstype="mouse", btype="usb", vnc_passwd=None):
VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus)
- VirtCIM.__init__(self, 'LXC', test_dom, uuid, const.LXC_default_mp,
- const.LXC_default_source, ntype, net_name, mac, vcpus,
- mem, const.default_mallocunits, None, grstype,
- address, port_num, keymap, irstype, btype, vnc_passwd)
+ # pae, acpi and apic parameters doesn't make sense here, so we
+ # statically set them to False (a.k.a. ignore them)
+ VirtCIM.__init__(self, 'LXC', test_dom, uuid, False, False, False,
+ const.LXC_default_mp, const.LXC_default_source, ntype,
+ net_name, mac, vcpus, mem, const.default_mallocunits,
+ None, grstype, address, port_num, keymap, irstype, btype,
+ vnc_passwd)
self._os(const.LXC_init_path)
self._devices(const.LXC_default_emulator, mac, ntype, net_name, const.LXC_default_tty)
self.create_lxc_file(CIM_IP, const.LXC_init_path)
14 years, 9 months
[PATCH] Revert net->name to net->source
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1260387726 28800
# Node ID c3eef4ba0afdf544c36a38759754075fcda68739
# Parent 04bed5a4c113db575b34761ccc2ce06e48839e7e
Revert net->name to net->source
For Xen guests, a network device is turned into a bridge device. However,
the network resource still belongs to the virtual network pool. This change
makes sure the bridge name is written to the source field of the net struct so
that look ups in Virt_DevicePool.c work properly.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 04bed5a4c113 -r c3eef4ba0afd libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Tue Dec 08 15:19:04 2009 -0800
+++ b/libxkutil/device_parsing.c Wed Dec 09 11:42:06 2009 -0800
@@ -304,8 +304,8 @@
if (ndev->mac == NULL)
goto err;
} else if (XSTREQ(child->name, "source")) {
- ndev->name = get_attr_value(child, "bridge");
- if (ndev->name != NULL)
+ ndev->source = get_attr_value(child, "bridge");
+ if (ndev->source != NULL)
continue;
ndev->source = get_attr_value(child, "network");
if (ndev->source != NULL)
@@ -659,7 +659,6 @@
DUP_FIELD(dev, _dev, dev.net.mac);
DUP_FIELD(dev, _dev, dev.net.type);
DUP_FIELD(dev, _dev, dev.net.source);
- DUP_FIELD(dev, _dev, dev.net.name);
DUP_FIELD(dev, _dev, dev.net.model);
} else if (dev->type == CIM_RES_TYPE_DISK) {
DUP_FIELD(dev, _dev, dev.disk.type);
diff -r 04bed5a4c113 -r c3eef4ba0afd libxkutil/device_parsing.h
--- a/libxkutil/device_parsing.h Tue Dec 08 15:19:04 2009 -0800
+++ b/libxkutil/device_parsing.h Wed Dec 09 11:42:06 2009 -0800
@@ -50,7 +50,6 @@
char *mac;
char *source;
char *model;
- char *name;
};
struct mem_device {
diff -r 04bed5a4c113 -r c3eef4ba0afd libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Tue Dec 08 15:19:04 2009 -0800
+++ b/libxkutil/xmlgen.c Wed Dec 09 11:42:06 2009 -0800
@@ -165,12 +165,7 @@
{
xmlNodePtr tmp;
- if ((STREQC(src_type, "bridge")) && (dev->name != NULL)) {
- tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL);
- if (tmp == NULL)
- return XML_ERROR;
- xmlNewProp(tmp, BAD_CAST src_type, BAD_CAST dev->name);
- } else if ((STREQC(src_type, "network")) && (dev->source != NULL)) {
+ if (dev->source != NULL) {
tmp = xmlNewChild(nic, NULL, BAD_CAST "source", NULL);
if (tmp == NULL)
return XML_ERROR;
diff -r 04bed5a4c113 -r c3eef4ba0afd src/Virt_RASD.c
--- a/src/Virt_RASD.c Tue Dec 08 15:19:04 2009 -0800
+++ b/src/Virt_RASD.c Wed Dec 09 11:42:06 2009 -0800
@@ -435,11 +435,11 @@
(CMPIValue *)dev->dev.net.mac,
CMPI_chars);
- if ((dev->dev.net.name != NULL) &&
- (STREQ(dev->dev.net.type, "bridge")))
+ if ((dev->dev.net.source != NULL)
+ && (STREQ(dev->dev.net.type, "bridge")))
CMSetProperty(inst,
"NetworkName",
- (CMPIValue *)dev->dev.net.name,
+ (CMPIValue *)dev->dev.net.source,
CMPI_chars);
if (dev->dev.net.model != NULL)
diff -r 04bed5a4c113 -r c3eef4ba0afd src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Tue Dec 08 15:19:04 2009 -0800
+++ b/src/Virt_VirtualSystemManagementService.c Wed Dec 09 11:42:06 2009 -0800
@@ -720,15 +720,15 @@
dev->id = strdup(dev->dev.net.mac);
free(dev->dev.net.type);
- free(dev->dev.net.name);
if (cu_get_str_prop(inst, "NetworkType", &val) != CMPI_RC_OK)
return "No Network Type specified";
+ free(dev->dev.net.source);
if (STREQC(val, BRIDGE_TYPE)) {
dev->dev.net.type = strdup(BRIDGE_TYPE);
if (cu_get_str_prop(inst, "NetworkName", &val) == CMPI_RC_OK)
if (strlen(val) > 0)
- dev->dev.net.name = strdup(val);
+ dev->dev.net.source = strdup(val);
else
return "Bridge name is empty";
else
@@ -741,7 +741,6 @@
if (val == NULL)
return "No NetworkPool specified no default available";
- free(dev->dev.net.source);
network = name_from_pool_id(val);
if (network == NULL) {
msg = "PoolID specified is not formatted properly";
14 years, 9 months
[PATCH] [TEST] In addition to setting the current memory, set the max memory as well
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1259951709 28800
# Node ID ab6ca2e33255553d0bddd8e5ab2e6524113dcb3b
# Parent 320b40f37a368cbc801b7e2761e84cf65136e118
[TEST] In addition to setting the current memory, set the max memory as well
Otherwise, you can end up defining a guest with a current memory value that
is much higher than the max memory value. That type of guest definition
isn't valid with newer versions of Xen.
diff -r a2d8acd05db2 -r 943b21b79a04 suites/libvirt-cim/cimtest/VirtualSystemMan
agementService/11_define_memrasdunits.py
diff -r 320b40f37a36 -r ab6ca2e33255 suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Fri Dec 04 10:03:39 2009 -0800
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Fri Dec 04 10:35:09 2009 -0800
@@ -52,6 +52,7 @@
for rasd in rasds:
if rasd.classname == mrasd_cn:
rasd['VirtualQuantity'] = Uint64(value)
+ rasd['Limit'] = Uint64(value)
rasd['AllocationUnits'] = units
rasd_list[mrasd_cn] = inst_to_mof(rasd)
else:
14 years, 9 months
[PATCH] [TEST] Remove hardcoded image path in RPCS 09
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1259949819 28800
# Node ID 320b40f37a368cbc801b7e2761e84cf65136e118
# Parent c19371e7fb585e64291dafc2b7f84dc1f1d8255e
[TEST] Remove hardcoded image path in RPCS 09
Also fix a line that is over 80 characters long.
diff -r 2ba5bf416501 -r a2d8acd05db2 suites/libvirt-cim/cimtest/ResourcePoolConf
igurationService/09_DeleteDiskPool.py
diff -r c19371e7fb58 -r 320b40f37a36 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/09_DeleteDiskPool.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/09_DeleteDiskPool.py Thu Dec 03 14:12:00 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/09_DeleteDiskPool.py Fri Dec 04 10:03:39 2009 -0800
@@ -48,7 +48,8 @@
from XenKvmLib import rpcs_service
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.const import do_main, platform_sup, get_provider_version
+from XenKvmLib.const import do_main, platform_sup, get_provider_version, \
+ _image_dir
from XenKvmLib.enumclass import EnumInstances, EnumNames
from XenKvmLib.classes import get_typed_class
from XenKvmLib.pool import create_pool, verify_pool, undefine_diskpool
@@ -75,7 +76,8 @@
rpcs_conn.DeleteResourcePool()
except pywbem.CIMError, (err_no, desc):
if err_no == cim_errno :
- logger.info("Got expected exception for '%s' service", cim_mname)
+ logger.info("Got expected exception for '%s' service",
+ cim_mname)
logger.info("Errno is '%s' ", err_no)
logger.info("Error string is '%s'", desc)
return PASS
@@ -87,7 +89,7 @@
elif curr_cim_rev >= libvirt_cim_child_pool_rev:
try:
- pool_attr = { "Path" : "/tmp" }
+ pool_attr = { "Path" : _image_dir }
status = create_pool(server, virt, test_pool, pool_attr,
pool_type="DiskPool", mode_type=TYPE)
if status != PASS:
14 years, 9 months
[PATCH] [TEST] Fix calls to virsh to handle potiential extra debug messages from virsh
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1259878320 28800
# Node ID c19371e7fb585e64291dafc2b7f84dc1f1d8255e
# Parent e9de3634a25633777e40bd80cc400a07ed42c6e1
[TEST] Fix calls to virsh to handle potiential extra debug messages from virsh
Occasionally, virsh will return additional debug or error messages. This
change makes it so our virsh command only returns stdout. We don't care about
the output of stderr, so might as well drop it. That way, it doesn't
interfere when we parse the output.
diff -r e9de3634a256 -r c19371e7fb58 suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Dec 03 14:12:00 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Dec 03 14:12:00 2009 -0800
@@ -246,12 +246,12 @@
return rc, out
def pre_check(ip, virt):
- cmd = "virsh -c %s list --all" % virt2uri(virt)
+ cmd = "virsh -c %s list --all 2>/dev/null" % virt2uri(virt)
ret, out = utils.run_remote(ip, cmd)
if ret != 0:
return "This libvirt install does not support %s" % virt
- cmd = "virsh -c %s version" % virt2uri(virt)
+ cmd = "virsh -c %s version 2>/dev/null" % virt2uri(virt)
ret, out = utils.run_remote(ip, cmd)
if ret != 0:
# The above version cmd does not work for F10.
@@ -341,7 +341,8 @@
dpoolname=dpool_list[0]
if dpoolname == None:
- cmd = "virsh -c %s pool-info %s" % (virt2uri(virt), dpool)
+ cmd = "virsh -c %s pool-info %s 2>/dev/null" % \
+ (virt2uri(virt), dpool)
ret, out = utils.run_remote(server, cmd)
if ret == 0:
logger.error("Disk pool with name '%s' already exists", dpool)
@@ -403,7 +404,7 @@
test_network = vir_network[0]
if test_network == None:
- cmd = "virsh -c %s net-list --all | grep -w %s" % \
+ cmd = "virsh -c %s net-list --all 2>/dev/null | grep -w %s" % \
(virt2uri(virt), net_name)
ret, out = utils.run_remote(server, cmd)
# If success, network pool with name net_name already exists
diff -r e9de3634a256 -r c19371e7fb58 suites/libvirt-cim/lib/XenKvmLib/pool.py
--- a/suites/libvirt-cim/lib/XenKvmLib/pool.py Thu Dec 03 14:12:00 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/pool.py Thu Dec 03 14:12:00 2009 -0800
@@ -107,7 +107,7 @@
def enum_volumes(virt, server, pooln=default_pool_name):
volume = 0
- cmd = "virsh -c %s vol-list %s | sed -e '1,2 d' -e '$ d'" % \
+ cmd = "virsh -c %s vol-list %s 2>/dev/null | sed -e '1,2 d' -e '$ d'" % \
(virt2uri(virt), pooln)
ret, out = run_remote(server ,cmd)
if ret != 0:
@@ -115,7 +115,8 @@
lines = out.split("\n")
for line in lines:
vol = line.split()[0]
- cmd = "virsh -c %s vol-info --pool %s %s" % (virt2uri(virt), pooln, vol)
+ cmd = "virsh -c %s vol-info --pool %s %s 2>/dev/null" % \
+ (virt2uri(virt), pooln, vol)
ret, out = run_remote(server ,cmd)
if ret == 0:
volume = volume + 1
@@ -164,7 +165,7 @@
def net_undefine(network, server, virt="Xen"):
"""Function undefine a given virtual network"""
- cmd = "virsh -c %s net-undefine %s" % (virt2uri(virt), network)
+ cmd = "virsh -c %s net-undefine %s 2>/dev/null" % (virt2uri(virt), network)
ret, out = run_remote(server, cmd)
return ret
@@ -186,7 +187,8 @@
if dp_name == None:
return FAIL
- cmd = "virsh -c %s pool-undefine %s" % (virt2uri(virt), dp_name)
+ cmd = "virsh -c %s pool-undefine %s 2>/dev/null" % \
+ (virt2uri(virt), dp_name)
ret, out = run_remote(server, cmd)
if ret != 0:
logger.error("Failed to undefine pool '%s'", dp_name)
diff -r e9de3634a256 -r c19371e7fb58 suites/libvirt-cim/lib/XenKvmLib/reporting.py
--- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Thu Dec 03 14:12:00 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Thu Dec 03 14:12:00 2009 -0800
@@ -42,7 +42,7 @@
def get_libvirt_ver(ip):
libvirt_ver = "Unknown"
hyp_ver = "Unknown"
- cmd = "virsh version"
+ cmd = "virsh version 2>/dev/null"
virsh_ver = get_cmd_val(cmd, ip)
if virsh_ver != "Unknown":
libvirt, tok1, tok2, hypervisor = virsh_ver.splitlines()
diff -r e9de3634a256 -r c19371e7fb58 suites/libvirt-cim/lib/XenKvmLib/test_doms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Thu Dec 03 14:12:00 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Thu Dec 03 14:12:00 2009 -0800
@@ -47,19 +47,19 @@
f.write(xml)
f.close()
- cmd = "virsh -c %s define %s" % (virt2uri(virt), name)
+ cmd = "virsh -c %s define %s 2>/dev/null" % (virt2uri(virt), name)
s, o = utils.run_remote(server, cmd)
return s == 0
def undefine_test_domain(name, server, virt="Xen"):
- cmd = "virsh -c %s undefine %s" % (virt2uri(virt), name)
+ cmd = "virsh -c %s undefine %s 2>/dev/null" % (virt2uri(virt), name)
s, o = utils.run_remote(server, cmd)
return s == 0
def start_test_domain(name, server, virt="Xen"):
- cmd = "virsh -c %s start %s" % (virt2uri(virt), name)
+ cmd = "virsh -c %s start %s 2>/dev/null" % (virt2uri(virt), name)
s, o = utils.run_remote(server, cmd)
return s == 0
@@ -119,7 +119,7 @@
def destroy_and_undefine_domain(name, server, virt="Xen"):
"""Destroy and undefine a domain.
name could be domid or domname"""
- cmd = "virsh -c %s 'destroy %s ; undefine %s'" % \
+ cmd = "virsh -c %s 'destroy %s ; undefine %s' 2>/dev/null" % \
(virt2uri(virt), name, name)
utils.run_remote(server, cmd)
@@ -154,7 +154,7 @@
else:
name = xmlfile_domname
- vcmd = "virsh -c %s %s %s" % (virt2uri(virt), cmd, name)
+ vcmd = "virsh -c %s %s %s 2>/dev/null" % (virt2uri(virt), cmd, name)
s, o = utils.run_remote(server, vcmd)
if cmd == "define" or cmd == "create":
f.close()
@@ -164,7 +164,7 @@
"""
Get the vcpu lists. The input is either the domid or domname.
"""
- cmd = "virsh -c %s vcpuinfo %s | grep '^$' | wc -l" % \
+ cmd = "virsh -c %s vcpuinfo %s 2>/dev/null | grep '^$' | wc -l" % \
(virt2uri(virt), name_id)
ret, out = utils.run_remote(server, cmd)
@@ -180,7 +180,7 @@
nf.write(net_xml)
nf.flush()
fname = nf.name
- cmd = "virsh -c %s net-create %s" % (virt2uri(virt), fname)
+ cmd = "virsh -c %s net-create %s 2>/dev/null" % (virt2uri(virt), fname)
ret, out = utils.run_remote(server, cmd)
nf.close()
if ret != 0:
diff -r e9de3634a256 -r c19371e7fb58 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Dec 03 14:12:00 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Dec 03 14:12:00 2009 -0800
@@ -176,7 +176,7 @@
" cmd on '%s'", vcmd, ip)
return 0
- cmd = 'virsh -c %s %s %s' % (self.vuri, vcmd, name)
+ cmd = 'virsh -c %s %s %s 2>/dev/null' % (self.vuri, vcmd, name)
s, o = utils.run_remote(ip, cmd)
if vcmd == 'define' or vcmd == 'create' or vcmd == 'net-create' \
or vcmd == 'pool-create':
@@ -223,7 +223,7 @@
self.server = server
if is_new_net is False:
- cmd = "virsh net-dumpxml %s" % self.net_name
+ cmd = "virsh net-dumpxml %s 2>/dev/null" % self.net_name
s, net_xml = utils.run_remote(server, cmd)
if s != 0:
logger.error("Encounter error dump netxml")
@@ -245,7 +245,8 @@
n_list = net_list(server, virt)
for _net_name in n_list:
- cmd = "virsh net-dumpxml %s | awk '/ip address/ {print}' | \
+ cmd = "virsh net-dumpxml %s 2>/dev/null | \
+ awk '/ip address/ {print}' | \
cut -d ' ' -f 4 | sed 's/address=//'" % _net_name
s, in_use_addr = utils.run_remote(server, cmd)
in_use_addr = in_use_addr.strip("'")
@@ -302,7 +303,7 @@
self.server = server
if is_new_pool is False:
- cmd = "virsh pool-dumpxml %s" % self.pool_name
+ cmd = "virsh pool-dumpxml %s 2>/dev/null" % self.pool_name
s, disk_xml = utils.run_remote(server, cmd)
if s != 0:
logger.error("Encounter error dump netxml")
@@ -516,7 +517,7 @@
return networkStr
def dumpxml(self, ip):
- cmd = 'virsh -c %s dumpxml %s' % (self.vuri, self.dname)
+ cmd = 'virsh -c %s dumpxml %s 2>/dev/null' % (self.vuri, self.dname)
s, o = utils.run_remote(ip, cmd)
if s == 0:
self.xml_string = o
diff -r e9de3634a256 -r c19371e7fb58 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Thu Dec 03 14:12:00 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Thu Dec 03 14:12:00 2009 -0800
@@ -97,7 +97,7 @@
if virt == "XenFV":
virt = "Xen"
- cmd = "virsh -c %s destroy %s" % (virt2uri(virt), dom)
+ cmd = "virsh -c %s destroy %s 2>/dev/null" % (virt2uri(virt), dom)
ret, out = utils.run_remote(server, cmd)
print cmd, ret, out
@@ -108,7 +108,7 @@
if virt == "XenFV":
virt = "Xen"
- cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \
+ cmd = "virsh -c %s list --all 2>/dev/null | sed -e '1,2 d' -e '$ d'" % \
virt2uri(virt)
ret, out = utils.run_remote(server, cmd)
@@ -128,7 +128,7 @@
if virt == "XenFV":
virt = "Xen"
- cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \
+ cmd = "virsh -c %s list 2>/dev/null | sed -e '1,2 d' -e '$ d'" % \
virt2uri(virt)
ret, out = utils.run_remote(server, cmd)
@@ -175,7 +175,7 @@
def net_list(server, virt="Xen"):
"""Function to list active network"""
names = []
- cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \
+ cmd = "virsh -c %s net-list 2>/dev/null | sed -e '1,2 d' -e '$ d'" % \
virt2uri(virt)
ret, out = utils.run_remote(server, cmd)
@@ -192,8 +192,8 @@
def get_bridge_from_network_xml(network, server, virt="Xen"):
"""Function returns bridge name for a given virtual network"""
- cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \
- (virt2uri(virt), network)
+ cmd = "virsh -c %s net-dumpxml %s 2>/dev/null | \
+ awk '/bridge name/ { print $2 }'" % (virt2uri(virt), network)
ret, out = utils.run_remote(server, cmd)
if ret != 0:
@@ -205,7 +205,7 @@
def net_destroy(network, server, virt="Xen"):
"""Function destroys a given virtual network"""
- cmd = "virsh -c %s net-destroy %s" % (virt2uri(virt), network)
+ cmd = "virsh -c %s net-destroy %s 2>/dev/null" % (virt2uri(virt), network)
ret, out = utils.run_remote(server, cmd)
return ret
@@ -224,7 +224,7 @@
return None
def virsh_version(server, virt="KVM"):
- cmd = "virsh -c %s -v " % virt2uri(virt)
+ cmd = "virsh -c %s -v 2>/dev/null" % virt2uri(virt)
ret, out = utils.run_remote(server, cmd)
if ret != 0:
return None
@@ -233,7 +233,7 @@
def diskpool_list(server, virt="KVM"):
"""Function to list active DiskPool list"""
names = []
- cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \
+ cmd = "virsh -c %s pool-list 2>/dev/null | sed -e '1,2 d' -e '$ d'" % \
virt2uri(virt)
ret, out = utils.run_remote(server, cmd)
@@ -251,7 +251,7 @@
def vol_list(server, virt="KVM", pool_name=None):
""" Function to list the volumes of a pool"""
- cmd = "virsh -c %s vol-list %s | sed -e '1,2 d' -e '$ d'" \
+ cmd = "virsh -c %s vol-list %s 2>/dev/null | sed -e '1,2 d' -e '$ d'" \
% (virt2uri(virt), pool_name)
ret, out = utils.run_remote(server, cmd)
if ret != 0:
@@ -262,7 +262,7 @@
def vol_delete(server, virt="KVM", vol_name=None, pool_name=None):
""" Function to delete the volume of a pool"""
- cmd = "virsh -c %s vol-delete %s --pool %s"\
+ cmd = "virsh -c %s vol-delete %s --pool %s 2>/dev/null" \
% (virt2uri(virt), vol_name, pool_name)
ret, out = utils.run_remote(server, cmd)
if ret != 0:
@@ -272,19 +272,19 @@
def virsh_vcpuinfo(server, dom, virt="Xen"):
- cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (virt2uri(virt),
- dom)
+ cmd = "virsh -c %s vcpuinfo %s 2>/dev/null | grep VCPU | wc -l" \
+ % (virt2uri(virt), dom)
ret, out = utils.run_remote(server, cmd)
if out.isdigit():
return out
return None
def get_hv_ver(server, virt="Xen"):
- cmd = "virsh -c %s version" %virt2uri(virt)
+ cmd = "virsh -c %s version 2>/dev/null" %virt2uri(virt)
ret, out = utils.run_remote(server, cmd)
if ret == 0:
- cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" \
- %virt2uri(virt)
+ cmd = "virsh -c %s version 2>/dev/null | grep ^Running | \
+ cut -d ' ' -f 3,4" % virt2uri(virt)
# This is a workaround work for F10.
# The version option does not seem to work on F10.
14 years, 9 months