From yunguol at cn.ibm.com Mon Mar 2 08:24:10 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 02 Mar 2009 00:24:10 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add "AllocationCapabilities" to associate with ECTP Message-ID: # HG changeset patch # User Yun Guo Lian # Date 1235982224 28800 # Node ID d5a5a5558a89acac972e1620fc4d737bab8c0334 # Parent a26791e2890e59a1f02e5d7050da3d75f8f4e0e2 [TEST] Add "AllocationCapabilities" to associate with ECTP Tested for KVM/LXC with current sources on Pegsus Signed-off-by: Guolian Yun diff -r a26791e2890e -r d5a5a5558a89 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Feb 27 03:17:05 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Mon Mar 02 00:23:44 2009 -0800 @@ -63,7 +63,7 @@ curr_cim_rev, changeset = get_provider_version(virt, server) if curr_cim_rev >= libvirt_cim_ectp_changes: cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", - "ProcessorPool", "MemoryPool"] + "ProcessorPool", "MemoryPool", "AllocationCapabilities"] cn_names.extend(cn_names2) if curr_cim_rev >= libvirt_cim_input_graphics_ectp: cn_names.append("ConsoleRedirectionService") From kaitlin at linux.vnet.ibm.com Mon Mar 2 17:09:57 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 02 Mar 2009 09:09:57 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add "AllocationCapabilities" to associate with ECTP In-Reply-To: References: Message-ID: <49AC12E5.5060904@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Yun Guo Lian > # Date 1235982224 28800 > # Node ID d5a5a5558a89acac972e1620fc4d737bab8c0334 > # Parent a26791e2890e59a1f02e5d7050da3d75f8f4e0e2 > [TEST] Add "AllocationCapabilities" to associate with ECTP > > > Tested for KVM/LXC with current sources on Pegsus > > Signed-off-by: Guolian Yun > > diff -r a26791e2890e -r d5a5a5558a89 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Feb 27 03:17:05 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Mon Mar 02 00:23:44 2009 -0800 > @@ -63,7 +63,7 @@ This test will need to be branched, because it'll fail on the most recent version of the F10 rpm: ElementConforms - 01_forward.py: FAIL ERROR - Exception: 'KVM_ElementConformsToProfile' returned (0) 'KVM_RegisteredProfile' objects CIM_ERR_INVALID_CLASS: Linux_ComputerSystem CIM_ERR_FAILED: Upcall enumInstances to target class failed -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Tue Mar 3 03:22:50 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 3 Mar 2009 11:22:50 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add "AllocationCapabilities" to associate with ECTP In-Reply-To: <49AC12E5.5060904@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-03 01:09:57: > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Yun Guo Lian > > # Date 1235982224 28800 > > # Node ID d5a5a5558a89acac972e1620fc4d737bab8c0334 > > # Parent a26791e2890e59a1f02e5d7050da3d75f8f4e0e2 > > [TEST] Add "AllocationCapabilities" to associate with ECTP > > > > > > Tested for KVM/LXC with current sources on Pegsus > > > > Signed-off-by: Guolian Yun > > > > diff -r a26791e2890e -r d5a5a5558a89 suites/libvirt- > cim/cimtest/ElementConforms/01_forward.py > > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > Fri Feb 27 03:17:05 2009 -0800 > > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > Mon Mar 02 00:23:44 2009 -0800 > > @@ -63,7 +63,7 @@ > > This test will need to be branched, because it'll fail on the most > recent version of the F10 rpm: > > ElementConforms - 01_forward.py: FAIL > ERROR - Exception: 'KVM_ElementConformsToProfile' returned (0) > 'KVM_RegisteredProfile' objects > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > CIM_ERR_FAILED: Upcall enumInstances to target class failed This failure because of the unsupported association of CIM:DSP1041-ResourceAllocation-1.1.0c" to ECTP. Below is the error output on F10 rpm: [root@ cimtest]# wbemcli ain -ac KVM_ElementConformsToProfile 'http://root:password at localhost/root/virt:KVM_RegisteredProfile.InstanceID="CIM:DSP1041-ResourceAllocation-1.1.0c"' * * wbemcli: Cim: (1) CIM_ERR_FAILED: Upcall enumInstances to target class failed * We can't get expected result by ECTP from KVM__RegisteredProfile.InstanceID="CIM:DSP1041-ResourceAllocation-1.1.0c". With the latest src, I can get expected output on F10 current src. [root@ ~]# wbemcli ain -ac KVM_ElementConformsToProfile http://root:password at localhost/root/virt:KVM_RegisteredProfile.InstanceID='"CIM:DSP1041-ResourceAllocation-1.1.0c_d"' localhost/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="domguest" To fix this, I have to skip this association query on F10 rpm. Thoughts? > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyreld at us.ibm.com Tue Mar 3 05:39:08 2009 From: tyreld at us.ibm.com (Tyrel Datwyler) Date: Mon, 2 Mar 2009 21:39:08 -0800 Subject: [Libvirt-cim] Test Run Summary (Jan 19 2009): KVM on Fedora release 9.90.1 (Rawhide) with sfcb In-Reply-To: References: <4974540C.6060702@linux.vnet.ibm.com> <4988B53B.1050907@linux.vnet.ibm.com> <499A442E.70605@linux.vnet.ibm.com> <499A4660.8020005@linux.vnet.ibm.com> Message-ID: Christopher Buccella/Poughkeepsie/IBM wrote on 02/17/2009 12:52:40 PM: > > This is probably caused by different versions of CMPI headers. > > In sfcb's source code, enableIndications is defined in cmpift.h as: > > CMPIStatus (*enableIndications) (CMPIIndicationMI * mi, > > const CMPIContext *); > > The provider took what is defined in the system headers > > (/usr/include/cmpi/cmpift.h from sblim-cmpi-devel-1.0.4) as: > > void (*enableIndications) > > (CMPIIndicationMI* mi, const CMPIContext *); > > > > Libvirt-cim doesn't require a code change here, the return type used in > > the provider depends on what the system level CMPI headers provide. > > Let's blame me as a guinea pig using the non-stable SUSE beta/rc build. > > > > sfcb's CMPI headers were updated to CMPI 2.0 independently of the > cmpi-devel headers. We don't really like maintaining our own set of > headers though, and plan to use the cmpi-devel ones once the > differences between the two sets are ironed out. > This is fixed at the CMPI 1.0 level in sblim-cmpi-devel 1.0.6 which was released today. CMPI 2.0 headers were also released today, and are available in the sblim-cmpi-devel 2.0.0 package. As far as when the distros will pick up either of these releases I'm unsure, aside from RHEL 6.0 which should be picking up the new 2.0 headers. Regards, Tyrel Datwyler Linux Software Engineer eServer Systems Management IBM Systems and Technology Group Email: tyreld at us.ibm.com External: (503) 578-3489, T/L: 775-3489 -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Tue Mar 3 08:18:17 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 03 Mar 2009 13:48:17 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 03 2009): KVM on Fedora release 10 (Cambridge) with Pegasus Message-ID: <49ACE7C9.8020703@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 03 2009): KVM on Fedora release 10 (Cambridge) with Pegasus ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.5.1 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 812 Libvirt-cim changeset: bad1a43ac1b0 Cimtest revision: 633 Cimtest changeset: a26791e2890e ================================================= FAIL : 2 XFAIL : 2 SKIP : 4 PASS : 138 ----------------- Total : 146 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'KVM_AllocationCapabilities' ERROR - Exception: Failed to verify instance CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ERROR - VirtualQuantity is 0, expected 3 ERROR - Exception: details CPU scheduling not set properly for the dom: procrasd_persist_dom -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 3 13:15:25 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 03 Mar 2009 18:45:25 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 03 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49AD2D6D.90909@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 03 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 633 Cimtest changeset: a26791e2890e ================================================= FAIL : 9 XFAIL : 1 SKIP : 13 PASS : 123 ----------------- Total : 146 ================================================= FAIL Test Summary: NetworkPort - 02_np_gi_errors.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.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: SKIP -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedAccessPoint - 01_forward.py: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)') -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ERROR - VirtualQuantity is 1, expected 3 ERROR - Exception: details CPU scheduling not set properly for the dom: procrasd_persist_dom -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (rstest_domain/hda)') ERROR - Failed to verify disk path for rstest_disk_domain -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - dom_migrate migrate failed Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - MigrateVirtualSystemToHost took too long -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Error start domain dom_migration InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Failed to start the dom: VSSDC_dom InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 3 14:04:51 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 03 Mar 2009 19:34:51 +0530 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 03 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49AD2D6D.90909@linux.vnet.ibm.com> References: <49AD2D6D.90909@linux.vnet.ibm.com> Message-ID: <49AD3903.2020704@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > Test Run Summary (Mar 03 2009): XenFV on Red Hat Enterprise Linux > Server release 5.3 (Tikanga) with Pegasus > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) > Kernel: 2.6.18-128.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.1 > Libvirt-cim revision: 613 > Libvirt-cim changeset: 1fcf330fadf8+ > Cimtest revision: 633 > Cimtest changeset: a26791e2890e > ================================================= > FAIL : 9 > XFAIL : 1 > SKIP : 13 > PASS : 123 > ----------------- > Total : 146 > ================================================= > FAIL Test Summary: > NetworkPort - 02_np_gi_errors.py: FAIL Passed on manual run. > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL The tc fails because the VirtualQuantity for the running guest is not the same as VirtualQuantity used when defining the guest. This tc Pass for Xen . > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL The DiskRASD['Caption'] field is not set properly. This has been used in the test while customizing the values for DiskRASD to be passed before defining the domain. Need to verify this further since the F9 rpm with revision 613 worked fine. > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL The test case are taking too long to start the domain to be migrated. The guest used to migrate which is in the define state seems in the mid of the transition from defined to start state. The State of the dom_migrate is set to "no state". > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL Passed on manual run. > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL Passed on manual run. > > ================================================= > XFAIL Test Summary: > ComputerSystem - 33_suspend_reboot.py: XFAIL > > ================================================= > SKIP Test Summary: > ComputerSystem - 02_nosystems.py: SKIP > HostedAccessPoint - 01_forward.py: SKIP > HostedAccessPoint - 02_reverse.py: SKIP > KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP > LogicalDisk - 02_nodevs.py: SKIP > NetworkPort - 03_user_netport.py: SKIP > RASD - 05_disk_rasd_emu_type.py: SKIP > RedirectionService - 01_enum_crs.py: SKIP > RedirectionService - 02_enum_crscap.py: SKIP > RedirectionService - 03_RedirectionSAP_errs.py: SKIP > ServiceAccessBySAP - 01_forward.py: SKIP > ServiceAccessBySAP - 02_reverse.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: SKIP > -------------------------------------------------------------------- > 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: PASS > -------------------------------------------------------------------- > 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 - 35_start_reset.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 40_RSC_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 41_cs_to_settingdefinestate.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 04_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementConforms - 03_ectp_fwd_errs.py: PASS > -------------------------------------------------------------------- > ElementConforms - 04_ectp_rev_errs.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: PASS > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: PASS > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: PASS > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > HostedAccessPoint - 01_forward.py: SKIP > -------------------------------------------------------------------- > HostedAccessPoint - 02_reverse.py: SKIP > -------------------------------------------------------------------- > 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 > -------------------------------------------------------------------- > KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP > -------------------------------------------------------------------- > LogicalDisk - 01_disk.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 02_nodevs.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > LogicalDisk - 03_ld_gi_errs.py: PASS > -------------------------------------------------------------------- > Memory - 01_memory.py: PASS > -------------------------------------------------------------------- > Memory - 02_defgetmem.py: PASS > -------------------------------------------------------------------- > Memory - 03_mem_gi_errs.py: PASS > -------------------------------------------------------------------- > NetworkPort - 01_netport.py: PASS > -------------------------------------------------------------------- > NetworkPort - 02_np_gi_errors.py: FAIL > ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance > (test_domain/00:11:22:33:44:55)') > -------------------------------------------------------------------- > NetworkPort - 03_user_netport.py: SKIP > -------------------------------------------------------------------- > Processor - 01_processor.py: PASS > -------------------------------------------------------------------- > Processor - 02_definesys_get_procs.py: PASS > -------------------------------------------------------------------- > Processor - 03_proc_gi_errs.py: PASS > -------------------------------------------------------------------- > Profile - 01_enum.py: PASS > -------------------------------------------------------------------- > Profile - 02_profile_to_elec.py: PASS > -------------------------------------------------------------------- > Profile - 03_rprofile_gi_errs.py: PASS > -------------------------------------------------------------------- > RASD - 01_verify_rasd_fields.py: PASS > -------------------------------------------------------------------- > RASD - 02_enum.py: PASS > -------------------------------------------------------------------- > RASD - 03_rasd_errs.py: PASS > -------------------------------------------------------------------- > RASD - 04_disk_rasd_size.py: PASS > -------------------------------------------------------------------- > RASD - 05_disk_rasd_emu_type.py: SKIP > -------------------------------------------------------------------- > RedirectionService - 01_enum_crs.py: SKIP > -------------------------------------------------------------------- > RedirectionService - 02_enum_crscap.py: SKIP > -------------------------------------------------------------------- > RedirectionService - 03_RedirectionSAP_errs.py: SKIP > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > -------------------------------------------------------------------- > ResourcePool - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePool - 02_rp_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - > 06_RemoveResourcesFromResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > -------------------------------------------------------------------- > ServiceAccessBySAP - 01_forward.py: SKIP > -------------------------------------------------------------------- > ServiceAccessBySAP - 02_reverse.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: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 07_addresource_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL > ERROR - VirtualQuantity is 1, expected 3 > ERROR - Exception: details CPU scheduling not set properly for the > dom: procrasd_persist_dom > -------------------------------------------------------------------- > VirtualSystemManagementService - 10_hv_version.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 11_define_memrasdunits.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 12_referenced_config.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL > ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance > (rstest_domain/hda)') > ERROR - Failed to verify disk path for rstest_disk_domain > -------------------------------------------------------------------- > VirtualSystemManagementService - 15_mod_system_settings.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > ERROR - dom_migrate migrate failed > Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" > > -------------------------------------------------------------------- > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > ERROR - MigrateVirtualSystemToHost took too long > -------------------------------------------------------------------- > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > return code 1 > ERROR - Error start domain dom_migration > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 01_forward.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > return code 1 > ERROR - Failed to start the dom: VSSDC_dom > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > return code 1 > ERROR - Unable to start domain domu1 > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > return code 1 > ERROR - Unable to start domain domu1 > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - > 02_vs_sservicecap_gi_errs.py: PASS > -------------------------------------------------------------------- > > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 3 14:12:01 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 03 Mar 2009 19:42:01 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 03 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49AD3AB1.2000305@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 03 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 633 Cimtest changeset: a26791e2890e ================================================= FAIL : 11 XFAIL : 1 SKIP : 12 PASS : 122 ----------------- Total : 146 ================================================= FAIL Test Summary: ElementAllocatedFromPool - 02_reverse.py: FAIL ElementSettingData - 03_esd_assoc_with_rasd_errs.py: FAIL HostedDependency - 04_reverse_errs.py: FAIL RASD - 01_verify_rasd_fields.py: FAIL SettingsDefine - 03_sds_fwd_errs.py: FAIL SettingsDefine - 04_sds_rev_errs.py: FAIL SystemDevice - 01_forward.py: FAIL SystemDevice - 03_fwderrs.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.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 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: FAIL ERROR - Failed to Create the dom: 'eafp_domain' -------------------------------------------------------------------- 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: FAIL ERROR - Failed to Create the dom: hd_domain1 -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedAccessPoint - 01_forward.py: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: FAIL ERROR - Failed to Create the dom: hd_domain1 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/mem)') ERROR - Enum RASDs failed -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.py: SKIP -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: FAIL ERROR - Failed to Create the dom: domu1 -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: FAIL ERROR - Failed to Create the dom: domu1 -------------------------------------------------------------------- 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: FAIL ERROR - Unable to create domain test_domain -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: FAIL -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: PASS -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Xen_DiskResourceAllocationSettingData instance for rstest_disk_domain not found ERROR - Failed to verify disk path for rstest_disk_domain -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - dom_migrate migrate failed ERROR - dom_migrate migrate failed -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 3 15:24:21 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 03 Mar 2009 20:54:21 +0530 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 03 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49AD3AB1.2000305@linux.vnet.ibm.com> References: <49AD3AB1.2000305@linux.vnet.ibm.com> Message-ID: <49AD4BA5.6060103@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > Test Run Summary (Mar 03 2009): Xen on Red Hat Enterprise Linux Server > release 5.3 (Tikanga) with Pegasus > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) > Kernel: 2.6.18-128.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.1 > Libvirt-cim revision: 613 > Libvirt-cim changeset: 1fcf330fadf8+ > Cimtest revision: 633 > Cimtest changeset: a26791e2890e > ================================================= > FAIL : 11 > XFAIL : 1 > SKIP : 12 > PASS : 122 > ----------------- > Total : 146 > ================================================= > FAIL Test Summary: > ElementAllocatedFromPool - 02_reverse.py: FAIL > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: FAIL > HostedDependency - 04_reverse_errs.py: FAIL Passed when the create() was replaced by cim_define() and cim_start(). > RASD - 01_verify_rasd_fields.py: FAIL Passed when run manually. > SettingsDefine - 03_sds_fwd_errs.py: FAIL > SettingsDefine - 04_sds_rev_errs.py: FAIL > SystemDevice - 01_forward.py: FAIL > SystemDevice - 03_fwderrs.py: FAIL Passed when the create() was replaced by cim_define() and cim_start(). > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL The DiskRASD['Caption'] field is not set properly. This has been used in the test while customizing the values for DiskRASD to be passed before defining the domain. Need to verify this further since the F9 rpm with revision 613 worked fine. > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL The test case are taking too long to start the domain to be migrated. The guest used to migrate which is in the define state seems in the mid of the transition from defined to start state. The State of the dom_migrate is set to "no state". -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 3 15:58:24 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 03 Mar 2009 07:58:24 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying EAFP/02_reverse.py tc to use cim_define() and cim_start(), cim_destroy() Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1236095890 28800 # Node ID a60140e3cf8d5a09a8be8f71462cea17f47e9a3f # Parent a26791e2890e59a1f02e5d7050da3d75f8f4e0e2 [TEST] Modifying EAFP/02_reverse.py tc to use cim_define() and cim_start(), cim_destroy(). Also, removed un necessary import statements. Tested with Xen/XenFV for RHEL 5.3 rpm. Signed-off-by: Deepti B. Kalakeri diff -r a26791e2890e -r a60140e3cf8d suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py --- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Fri Feb 27 03:17:05 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Tue Mar 03 07:58:10 2009 -0800 @@ -45,14 +45,11 @@ # Date : 29-11-2007 import sys -import os -import pywbem from XenKvmLib.assoc import Associators from XenKvmLib.vxml import get_class from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.classes import get_typed_class from XenKvmLib.logicaldevices import verify_device_values from XenKvmLib.const import default_pool_name @@ -182,7 +179,6 @@ def main(): test_disk = 'hda' # Getting the VS list and deleting the test_dom if it already exists. - destroy_and_undefine_all(server) virt_type = get_class(virt) if virt == 'LXC': vsxml = virt_type(test_dom, vcpus = test_vcpus) @@ -190,17 +186,24 @@ def main(): vsxml = virt_type(test_dom, mem = test_mem, vcpus = test_vcpus, mac = test_mac, disk = test_disk) - ret = vsxml.create(server) + ret = vsxml.cim_define(server) if not ret: - logger.error("Failed to Create the dom: '%s'", test_dom) + logger.error("Failed to define the dom: '%s'", test_dom) return FAIL + status = vsxml.cim_start(server) + if status != PASS: + vsxml.undefine(server) + logger.error("Failed to start the dom: '%s'", test_dom) + return status + # Get pool list against which the EAFP should be queried pllist = init_pllist(virt, vsxml, default_pool_name) status = verify_eafp_values(server, virt, pllist, test_disk) - vsxml.destroy(server) + vsxml.cim_destroy(server) + vsxml.undefine(server) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Tue Mar 3 16:14:05 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 03 Mar 2009 08:14:05 -0800 Subject: [Libvirt-cim] [PATCH] Modifying ESD/03_esd_assoc_with_rasd_errs.py tc to use cim_define() and cim_start(), cim_destroy() Message-ID: <50c6cbda732fcb07a725.1236096845@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1236096831 28800 # Node ID 50c6cbda732fcb07a7254eacc7f38dab2f075e8f # Parent a60140e3cf8d5a09a8be8f71462cea17f47e9a3f Modifying ESD/03_esd_assoc_with_rasd_errs.py tc to use cim_define() and cim_start(), cim_destroy(). Also, removed unnecessary import statements. Tested with Xen/XenFV for RHEL 5.3 rpm. Signed-off-by: Deepti B. Kalakeri diff -r a60140e3cf8d -r 50c6cbda732f suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py --- a/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Tue Mar 03 07:58:10 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementSettingData/03_esd_assoc_with_rasd_errs.py Tue Mar 03 08:13:51 2009 -0800 @@ -50,7 +50,6 @@ import sys import pywbem -from VirtLib import utils from XenKvmLib import vxml from XenKvmLib import assoc from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ @@ -86,11 +85,18 @@ def main(): cxml = virtxml(test_dom) else: cxml = virtxml(test_dom, mac = test_mac) - ret = cxml.create(options.ip) + + ret = cxml.cim_define(options.ip) if not ret: - logger.error("Failed to Create the dom: %s", test_dom) - status = FAIL - return status + logger.error("Failed to define the dom: %s", test_dom) + return FAIL + + status = cxml.cim_start(options.ip) + if status != PASS: + cxml.undefine(options.ip) + logger.error("Failed to start the dom: %s", test_dom) + return status + if options.virt == "XenFV": options.virt = "Xen" try: @@ -100,14 +106,16 @@ def main(): rasd_list = assoc.Associators(options.ip, an, cn, InstanceID=instid) except Exception: logger.error(CIM_ERROR_ASSOCIATORS, an) - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return FAIL + if len(rasd_list) < 1: logger.error("returned %i objects, expected at least 1", len(rasd_list)) - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return FAIL + conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) assoc_classname = get_typed_class(options.virt, esd_cn) @@ -133,7 +141,7 @@ def main(): status = ret_value if status != PASS: break - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return status if __name__ == "__main__": From jfehlig at novell.com Tue Mar 3 16:05:54 2009 From: jfehlig at novell.com (Jim Fehlig) Date: Tue, 03 Mar 2009 10:05:54 -0600 Subject: [Libvirt-cim] [PATCH] Do not pass NULL to strchr() Message-ID: # HG changeset patch # User Jim Fehlig # Date 1236099840 25200 # Node ID e3dd4cec1b61373e738fe3ba58557ae543b41789 # Parent 8e4577bb3b3a6e1af8dbcf1887641571b0cfdedb Do not pass NULL to strchr() get_typed_class() in libxkutil can segfault a provider if refcn parameter is NULL. Ensure refcn is non-NULL before subsequent use. Signed-off-by: Jim Fehlig diff -r 8e4577bb3b3a -r e3dd4cec1b61 libxkutil/misc_util.c --- a/libxkutil/misc_util.c Fri Feb 27 18:08:06 2009 -0300 +++ b/libxkutil/misc_util.c Tue Mar 03 10:04:00 2009 -0700 @@ -218,6 +218,9 @@ char *get_typed_class(const char *refcn, char *class = NULL; char *pfx; + if (refcn == NULL) + return NULL; + if (strchr(refcn, '_')) pfx = class_prefix_name(refcn); else From deeptik at linux.vnet.ibm.com Tue Mar 3 16:21:27 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 03 Mar 2009 08:21:27 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying SystemDevice/01_forward.py tc to use cim_define() and cim_start(), cim_destroy() Message-ID: <5a1c5290725e95f34e4d.1236097287@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1236097278 28800 # Node ID 5a1c5290725e95f34e4da05d8f3402e458c36a60 # Parent 50c6cbda732fcb07a7254eacc7f38dab2f075e8f [TEST] Modifying SystemDevice/01_forward.py tc to use cim_define() and cim_start(), cim_destroy(). Also, removed un necessary import statements. Tested with Xen/XenFV for RHEL 5.3 rpm. Signed-off-by: Deepti B. Kalakeri diff -r 50c6cbda732f -r 5a1c5290725e suites/libvirt-cim/cimtest/SystemDevice/01_forward.py --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Tue Mar 03 08:13:51 2009 -0800 +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py Tue Mar 03 08:21:18 2009 -0800 @@ -27,7 +27,6 @@ import sys from sets import Set -from VirtLib import utils from XenKvmLib import assoc from XenKvmLib import vxml from XenKvmLib.classes import get_typed_class @@ -61,10 +60,16 @@ def main(): cxml = virt_xml(test_dom, vcpus = test_cpu, mac = test_mac, disk = test_disk) - ret = cxml.create(server) + ret = cxml.cim_define(server) if not ret: - logger.error('Unable to create domain %s', test_dom) + logger.error('Unable to define domain %s', test_dom) return FAIL + + status = cxml.cim_start(server) + if status != PASS: + cxml.undefine(server) + logger.error('Unable to start domain %s', test_dom) + return status sd_classname = get_typed_class(virt, 'SystemDevice') cs_classname = get_typed_class(virt, 'ComputerSystem') @@ -73,12 +78,14 @@ def main(): Name=test_dom, CreationClassName=cs_classname) if devs == None: logger.error("'%s' association failed", sd_classname) - cxml.destroy(server) + cxml.cim_destroy(server) + cxml.undefine(server) return FAIL if len(devs) == 0: logger.error("No devices returned") cxml.destroy(server) + cxml.undefine(server) return FAIL mem_cn = get_typed_class(virt, "Memory") @@ -137,6 +144,7 @@ def main(): status = FAIL cxml.destroy(server) + cxml.undefine(server) return status if __name__ == "__main__": From rmaciel at linux.vnet.ibm.com Tue Mar 3 17:27:41 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 03 Mar 2009 14:27:41 -0300 Subject: [Libvirt-cim] [PATCH] Do not pass NULL to strchr() In-Reply-To: References: Message-ID: <49AD688D.6010009@linux.vnet.ibm.com> +1 Jim Fehlig wrote: > # HG changeset patch > # User Jim Fehlig > # Date 1236099840 25200 > # Node ID e3dd4cec1b61373e738fe3ba58557ae543b41789 > # Parent 8e4577bb3b3a6e1af8dbcf1887641571b0cfdedb > Do not pass NULL to strchr() > > get_typed_class() in libxkutil can segfault a provider if refcn > parameter is NULL. Ensure refcn is non-NULL before subsequent use. > > Signed-off-by: Jim Fehlig > > diff -r 8e4577bb3b3a -r e3dd4cec1b61 libxkutil/misc_util.c > --- a/libxkutil/misc_util.c Fri Feb 27 18:08:06 2009 -0300 > +++ b/libxkutil/misc_util.c Tue Mar 03 10:04:00 2009 -0700 > @@ -218,6 +218,9 @@ char *get_typed_class(const char *refcn, > char *class = NULL; > char *pfx; > > + if (refcn == NULL) > + return NULL; > + > if (strchr(refcn, '_')) > pfx = class_prefix_name(refcn); > else > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 3 16:36:08 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 03 Mar 2009 08:36:08 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying SystemDevice/03_fwderrs.py tc to use cim_define() and cim_start(), cim_destroy() Message-ID: <7a6fc176e1ea497b2bdb.1236098168@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1236098158 28800 # Node ID 7a6fc176e1ea497b2bdb361b44da6cc5d32f923f # Parent 5a1c5290725e95f34e4da05d8f3402e458c36a60 [TEST] Modifying SystemDevice/03_fwderrs.py tc to use cim_define() and cim_start(), cim_destroy(). Also, removed un necessary import statements. Tested with Xen/XenFV for RHEL 5.3 rpm. Signed-off-by: Deepti B. Kalakeri diff -r 5a1c5290725e -r 7a6fc176e1ea suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py --- a/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Tue Mar 03 08:21:18 2009 -0800 +++ b/suites/libvirt-cim/cimtest/SystemDevice/03_fwderrs.py Tue Mar 03 08:35:58 2009 -0800 @@ -31,7 +31,6 @@ import sys import sys import pywbem from pywbem.cim_obj import CIMInstanceName -from VirtLib import utils from XenKvmLib import vxml from XenKvmLib import assoc from XenKvmLib import enumclass @@ -73,11 +72,16 @@ def main(): disk = test_disk) devlist = [ "NetworkPort", "Memory", "LogicalDisk", "Processor" ] - ret = cxml.create(options.ip) + ret = cxml.cim_define(options.ip) if not ret : - logger.info("error while 'create' of VS") + logger.error("Failed to define the domain '%s'", test_dom) return FAIL + status = cxml.cim_start(options.ip) + if status != PASS : + cxml.undefine(options.ip) + logger.error("Failed to start the domain '%s'", test_dom) + return status # Building the dict for avoiding the correct key:val pairs # while verifying with the Invalid values for the association @@ -102,15 +106,19 @@ def main(): except Exception, details: logger.info("Exception %s for class %s", details , item) + cxml.cim_destroy(options.ip) + cxml.cim_undefine(options.ip) return FAIL if len(name) <=0 or len(names) <= 0: + cxml.cim_destroy(options.ip) + cxml.cim_undefine(options.ip) logger.info("Error: Could not find the device ID's") return FAIL conn = assoc.myWBEMConnection('http://%s' % options.ip, \ (Globals.CIM_USER, Globals.CIM_PASS), - Globals.CIM_NS) + Globals.CIM_NS) # Testing with different combinations of keys and values # for assocn of SysDevice class @@ -164,13 +172,15 @@ def main(): logger.info("Success returned for wrong key and ID") logger.info("Class = %s , key = %s , keyval = %s ", item, i , keyval) + cxml.cim_destroy(options.ip) + cxml.cim_undefine(options.ip) return XFAIL_RC(bug) except Exception, details: logger.info("exception" , details) status = FAIL - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return status From deeptik at linux.vnet.ibm.com Tue Mar 3 16:47:49 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 03 Mar 2009 08:47:49 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying HostedDependency/04_reverse_errs.py tc to use cim_define() and cim_start(), cim_destroy() Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1236098860 28800 # Node ID c3a6bfa4f41b69ed75f511e199b57fa2b9afd129 # Parent 7a6fc176e1ea497b2bdb361b44da6cc5d32f923f [TEST] Modifying HostedDependency/04_reverse_errs.py tc to use cim_define() and cim_start(), cim_destroy(). Also, removed un necessary import statements. Tested with Xen/XenFV for RHEL 5.3 rpm. Signed-off-by: Deepti B. Kalakeri diff -r 7a6fc176e1ea -r c3a6bfa4f41b suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py --- a/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Tue Mar 03 08:35:58 2009 -0800 +++ b/suites/libvirt-cim/cimtest/HostedDependency/04_reverse_errs.py Tue Mar 03 08:47:40 2009 -0800 @@ -71,9 +71,12 @@ def verify_err_fields(cxml, server, conn bug_no="") if ret != PASS: logger.error("--- FAILED: %s---", msg) - cxml.destroy(server) + cxml.cim_destroy(server) + cxml.cim_undefine(server) except Exception, details: logger.error("Exception: %s", details) + cxml.cim_destroy(server) + cxml.cim_undefine(server) return FAIL return ret @@ -89,9 +92,15 @@ def main(): else: cxml = virtxml(test_dom, mac = test_mac) - ret = cxml.create(server) + ret = cxml.cim_define(server) if not ret: - logger.error("Failed to Create the dom: %s", test_dom) + logger.error("Failed to define the dom: %s", test_dom) + return FAIL + + status = cxml.cim_start(server) + if status != PASS: + cxml.undefine(server) + logger.error("Failed to start the dom: %s", test_dom) return FAIL conn = assoc.myWBEMConnection('http://%s' % server, @@ -101,7 +110,8 @@ def main(): status, host_inst = get_host_info(server, virt) if status: logger.error("Unable to get host info") - cxml.destroy(server) + cxml.cim_destroy(server) + cxml.undefine(server) return status classname = host_inst.CreationClassName @@ -138,7 +148,9 @@ def main(): keys = { 'CreationClassName' : field, 'Name' : host_name } ret_value = verify_err_fields(cxml, server, conn, keys, classname, acn, msg, field, expr_values) - cxml.destroy(server) + if ret_value == PASS: + cxml.cim_destroy(server) + cxml.undefine(server) return ret_value if __name__ == "__main__": sys.exit(main()) From deeptik at linux.vnet.ibm.com Tue Mar 3 16:56:36 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 03 Mar 2009 08:56:36 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying SettingsDefine/04_sds_rev_errs.py tc to use cim_define() and cim_start(), cim_destroy() Message-ID: <04affa1172676d8872be.1236099396@elm3b217.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1236099384 28800 # Node ID 04affa1172676d8872be3e58b55697bd7513febf # Parent c3a6bfa4f41b69ed75f511e199b57fa2b9afd129 [TEST] Modifying SettingsDefine/04_sds_rev_errs.py tc to use cim_define() and cim_start(), cim_destroy(). Also, removed un necessary import statements. Tested with Xen/XenFV for RHEL 5.3 rpm. Signed-off-by: Deepti B. Kalakeri diff -r c3a6bfa4f41b -r 04affa117267 suites/libvirt-cim/cimtest/SettingsDefine/04_sds_rev_errs.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/04_sds_rev_errs.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/04_sds_rev_errs.py Tue Mar 03 08:56:24 2009 -0800 @@ -54,7 +54,6 @@ import sys import pywbem -from VirtLib import utils from XenKvmLib import assoc from XenKvmLib import vxml from XenKvmLib.common_util import try_assoc @@ -111,10 +110,16 @@ def main(): cxml = virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk) - ret = cxml.create(options.ip) + ret = cxml.cim_define(options.ip) if not ret: - logger.error("Failed to Create the dom: %s", test_dom) + logger.error("Failed to define the dom: %s", test_dom) return FAIL + + status = cxml.cim_start(options.ip) + if status != PASS: + cxml.undefine(options.ip) + logger.error("Failed to start the dom: %s", test_dom) + return status global conn conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, \ @@ -145,7 +150,7 @@ def main(): if retval != PASS: status = retval - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) cxml.undefine(options.ip) return status From deeptik at linux.vnet.ibm.com Tue Mar 3 17:05:53 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 03 Mar 2009 09:05:53 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying SettingsDefine/03_sds_fwd_errs.py tc to use cim_define() and cim_start(), cim_destroy() Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1236099940 28800 # Node ID ff8506dbb92773611c3c120a0be9bd400b3a7e44 # Parent 04affa1172676d8872be3e58b55697bd7513febf [TEST] Modifying SettingsDefine/03_sds_fwd_errs.py tc to use cim_define() and cim_start(), cim_destroy(). Also, removed un necessary import statements. Tested with Xen/XenFV for RHEL 5.3 rpm. Signed-off-by: Deepti B. Kalakeri diff -r 04affa117267 -r ff8506dbb927 suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Tue Mar 03 08:56:24 2009 -0800 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Tue Mar 03 09:05:40 2009 -0800 @@ -145,7 +145,6 @@ import sys import pywbem -from VirtLib import utils from XenKvmLib import assoc from XenKvmLib import vxml from XenKvmLib.common_util import try_assoc @@ -221,9 +220,15 @@ def main(): cxml= virt_xml(test_dom, vcpus = test_vcpus, mac = test_mac, disk = test_disk) - ret = cxml.create(options.ip) + ret = cxml.cim_define(options.ip) if not ret: - logger.error("Failed to Create the dom: %s", test_dom) + logger.error("Failed to define the dom: %s", test_dom) + return FAIL + + status = cxml.cim_start(options.ip) + if status != PASS: + cxml.undefine(options.ip) + logger.error("Failed to start the dom: %s", test_dom) return FAIL global conn @@ -262,8 +267,8 @@ def main(): if retval != PASS: status = retval - cxml.destroy(options.ip) - cxml.destroy(options.ip) + cxml.cim_destroy(options.ip) + cxml.undefine(options.ip) return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Tue Mar 3 18:06:24 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 03 Mar 2009 23:36:24 +0530 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 03 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49AD4BA5.6060103@linux.vnet.ibm.com> References: <49AD3AB1.2000305@linux.vnet.ibm.com> <49AD4BA5.6060103@linux.vnet.ibm.com> Message-ID: <49AD71A0.4090104@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Deepti B Kalakeri wrote: >> ================================================= >> Test Run Summary (Mar 03 2009): Xen on Red Hat Enterprise Linux >> Server release 5.3 (Tikanga) with Pegasus >> ================================================= >> Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) >> Kernel: 2.6.18-128.el5xen >> libvirt: 0.3.3 >> Hypervisor: Xen 3.1.0 >> CIMOM: Pegasus 2.7.1 >> Libvirt-cim revision: 613 >> Libvirt-cim changeset: 1fcf330fadf8+ >> Cimtest revision: 633 >> Cimtest changeset: a26791e2890e >> ================================================= >> FAIL : 11 >> XFAIL : 1 >> SKIP : 12 >> PASS : 122 >> ----------------- >> Total : 146 >> ================================================= >> FAIL Test Summary: >> ElementAllocatedFromPool - 02_reverse.py: FAIL >> ElementSettingData - 03_esd_assoc_with_rasd_errs.py: FAIL >> HostedDependency - 04_reverse_errs.py: FAIL > Passed when the create() was replaced by cim_define() and cim_start(). >> RASD - 01_verify_rasd_fields.py: FAIL > Passed when run manually. >> SettingsDefine - 03_sds_fwd_errs.py: FAIL >> SettingsDefine - 04_sds_rev_errs.py: FAIL >> SystemDevice - 01_forward.py: FAIL >> SystemDevice - 03_fwderrs.py: FAIL > Passed when the create() was replaced by cim_define() and cim_start(). >> VirtualSystemManagementService - 14_define_sys_disk.py: FAIL > The DiskRASD['Caption'] field is not set properly. > This has been used in the test while customizing the values for > DiskRASD to be passed before defining the domain. > Need to verify this further since the F9 rpm with revision 613 worked > fine. >> VirtualSystemMigrationService - 01_migratable_host.py: FAIL >> VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > The test case are taking too long to start the domain to be migrated. > The guest used to migrate which is in the define state seems in the > mid of the transition from defined to start state. > The State of the dom_migrate is set to "no state". > Patches for are sent for review: ElementAllocatedFromPool - 02_reverse.py: FAIL ElementSettingData - 03_esd_assoc_with_rasd_errs.py: FAIL HostedDependency - 04_reverse_errs.py: FAIL SettingsDefine - 03_sds_fwd_errs.py: FAIL SettingsDefine - 04_sds_rev_errs.py: FAIL SystemDevice - 01_forward.py: FAIL SystemDevice - 03_fwderrs.py: FAIL -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 3 21:23:33 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 03 Mar 2009 13:23:33 -0800 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 03 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49AD3903.2020704@linux.vnet.ibm.com> References: <49AD2D6D.90909@linux.vnet.ibm.com> <49AD3903.2020704@linux.vnet.ibm.com> Message-ID: <49AD9FD5.8050007@linux.vnet.ibm.com> >> ================================================= >> FAIL Test Summary: >> NetworkPort - 02_np_gi_errors.py: FAIL > Passed on manual run. >> VirtualSystemManagementService - 09_procrasd_persist.py: FAIL > The tc fails because the VirtualQuantity for the running guest is not > the same as VirtualQuantity used when defining the guest. > This tc Pass for Xen . > >> VirtualSystemManagementService - 14_define_sys_disk.py: FAIL > The DiskRASD['Caption'] field is not set properly. > This has been used in the test while customizing the values for DiskRASD > to be passed before defining the domain. > Need to verify this further since the F9 rpm with revision 613 worked fine. >> VirtualSystemMigrationService - 01_migratable_host.py: FAIL >> VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > The test case are taking too long to start the domain to be migrated. > The guest used to migrate which is in the define state seems in the mid > of the transition from defined to start state. > The State of the dom_migrate is set to "no state". >> VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > Passed on manual run. > >> VirtualSystemSettingDataComponent - 02_reverse.py: FAIL >> VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL >> VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL > Passed on manual run. For the items that pass on a manual run, any idea why they fail in bulk run? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 3 23:02:55 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 03 Mar 2009 15:02:55 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add "AllocationCapabilities" to associate with ECTP In-Reply-To: References: Message-ID: <49ADB71F.8040908@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-03 01:09:57: > > > yunguol at cn.ibm.com wrote: > > > # HG changeset patch > > > # User Yun Guo Lian > > > # Date 1235982224 28800 > > > # Node ID d5a5a5558a89acac972e1620fc4d737bab8c0334 > > > # Parent a26791e2890e59a1f02e5d7050da3d75f8f4e0e2 > > > [TEST] Add "AllocationCapabilities" to associate with ECTP > > > > > > > > > Tested for KVM/LXC with current sources on Pegsus > > > > > > Signed-off-by: Guolian Yun > > > > > > diff -r a26791e2890e -r d5a5a5558a89 suites/libvirt- > > cim/cimtest/ElementConforms/01_forward.py > > > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > > Fri Feb 27 03:17:05 2009 -0800 > > > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > > Mon Mar 02 00:23:44 2009 -0800 > > > @@ -63,7 +63,7 @@ > > > > This test will need to be branched, because it'll fail on the most > > recent version of the F10 rpm: > > > > ElementConforms - 01_forward.py: FAIL > > ERROR - Exception: 'KVM_ElementConformsToProfile' returned (0) > > 'KVM_RegisteredProfile' objects > > CIM_ERR_INVALID_CLASS: Linux_ComputerSystem > > CIM_ERR_FAILED: Upcall enumInstances to target class failed > > This failure because of the unsupported association of > CIM:DSP1041-ResourceAllocation-1.1.0c" to ECTP. > Below is the error output on F10 rpm: > > [root@ cimtest]# wbemcli ain -ac KVM_ElementConformsToProfile > 'http://root:password at localhost/root/virt:KVM_RegisteredProfile.InstanceID="CIM:DSP1041-ResourceAllocation-1.1.0c"' > > * > * wbemcli: Cim: (1) CIM_ERR_FAILED: Upcall enumInstances to target class > failed > * > > We can't get expected result by ECTP from > KVM__RegisteredProfile.InstanceID="CIM:DSP1041-ResourceAllocation-1.1.0c". > > With the latest src, I can get expected output on F10 current src. > > [root@ ~]# wbemcli ain -ac KVM_ElementConformsToProfile > http://root:password at localhost/root/virt:KVM_RegisteredProfile.InstanceID='"CIM:DSP1041-ResourceAllocation-1.1.0c_d"' > > localhost/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="domguest" > > > To fix this, I have to skip this association query on F10 rpm. Thoughts? > Right, you don't want to skip the whole test. Instead, you want to skip over passing the localhost/root/virt:KVM_RegisteredProfile.InstanceID="CIM:DSP1041-ResourceAllocation-1.1.0c" reference to the ECTP association. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 3 23:19:29 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 03 Mar 2009 15:19:29 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying HostedDependency/04_reverse_errs.py tc to use cim_define() and cim_start(), cim_destroy() In-Reply-To: References: Message-ID: <49ADBB01.50207@linux.vnet.ibm.com> > @@ -138,7 +148,9 @@ def main(): > keys = { 'CreationClassName' : field, 'Name' : host_name } > ret_value = verify_err_fields(cxml, server, conn, keys, classname, > acn, msg, field, expr_values) > - cxml.destroy(server) > + if ret_value == PASS: You want to destroy and undefine the guest, even if ret_value != PASS. > + cxml.cim_destroy(server) > + cxml.undefine(server) Also, there's a few places in this test where the test is returned but the guest isn't destroyed / undefined. Can you fix those spots? Look at lines 128, 136, and 144. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Mar 4 05:17:44 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 04 Mar 2009 10:47:44 +0530 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 03 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49AD9FD5.8050007@linux.vnet.ibm.com> References: <49AD2D6D.90909@linux.vnet.ibm.com> <49AD3903.2020704@linux.vnet.ibm.com> <49AD9FD5.8050007@linux.vnet.ibm.com> Message-ID: <49AE0EF8.30203@linux.vnet.ibm.com> Kaitlin Rupert wrote: >>> ================================================= >>> FAIL Test Summary: >>> NetworkPort - 02_np_gi_errors.py: FAIL >> Passed on manual run. >>> VirtualSystemManagementService - 09_procrasd_persist.py: FAIL >> The tc fails because the VirtualQuantity for the running guest is not >> the same as VirtualQuantity used when defining the guest. >> This tc Pass for Xen . >> >>> VirtualSystemManagementService - 14_define_sys_disk.py: FAIL >> The DiskRASD['Caption'] field is not set properly. >> This has been used in the test while customizing the values for >> DiskRASD to be passed before defining the domain. >> Need to verify this further since the F9 rpm with revision 613 worked >> fine. >>> VirtualSystemMigrationService - 01_migratable_host.py: FAIL >>> VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL >> The test case are taking too long to start the domain to be migrated. >> The guest used to migrate which is in the define state seems in the >> mid of the transition from defined to start state. >> The State of the dom_migrate is set to "no state". >>> VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL >> Passed on manual run. >> >>> VirtualSystemSettingDataComponent - 02_reverse.py: FAIL >>> VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL >>> VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL >> Passed on manual run. > > For the items that pass on a manual run, any idea why they fail in > bulk run? I would need to see if NetworkPort - 02_np_gi_errors.py fails on bulk run again. This is the first time it has failed. But for the following tests I suspect the migration tests the reason. VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL Most of the times the dom_migrate domain that is created on the host does not get cleaned. Since all the tc uses the same images, the consecutive tests fails when they try to create a new guest. The problem is seen only with Xen/XenFV and that too with the Rhel, if you remember we used to face the same problem with Rhel5.2 as well. It takes lot of virsh destroy commands to actually destroy the guest created by the migration tc. Sometimes I need to restart the xend to see the refreshed list of domains on the host. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Mar 4 06:00:03 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 04 Mar 2009 11:30:03 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying HostedDependency/04_reverse_errs.py tc to use cim_define() and cim_start(), cim_destroy() In-Reply-To: <49ADBB01.50207@linux.vnet.ibm.com> References: <49ADBB01.50207@linux.vnet.ibm.com> Message-ID: <49AE18E3.9060306@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> @@ -138,7 +148,9 @@ def main(): >> keys = { 'CreationClassName' : field, 'Name' : host_name } >> ret_value = verify_err_fields(cxml, server, conn, keys, classname, >> acn, msg, field, expr_values) >> - cxml.destroy(server) >> + if ret_value == PASS: > > You want to destroy and undefine the guest, even if ret_value != PASS. > >> + cxml.cim_destroy(server) >> + cxml.undefine(server) > > Also, there's a few places in this test where the test is returned but > the guest isn't destroyed / undefined. Can you fix those spots? Look > at lines 128, 136, and 144. > > Thanks! > The verify_err_fields() takes care of destroy/undefine of the guest in case of failure, hence I need to only destroy and undefine for the last verify_err_fields() call and only when ret_value from the verify_err_fields() is PASS. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Wed Mar 4 08:09:11 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 4 Mar 2009 16:09:11 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) with sfcb Message-ID: ================================================= Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) with sfcb ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 827 Libvirt-cim changeset: e3dd4cec1b61 Cimtest revision: 639 Cimtest changeset: b84b3ec0c3d7 ================================================= FAIL : 7 XFAIL : 2 SKIP : 4 PASS : 133 ----------------- Total : 146 ================================================= FAIL Test Summary: ComputerSystem - 42_cs_gi_errs.py: FAIL ComputerSystemIndication - 01_created_indication.py: FAIL ElementCapabilities - 03_forward_errs.py: FAIL ElementConforms - 01_forward.py: FAIL ElementConforms - 04_ectp_rev_errs.py: FAIL VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: 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 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): 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 State not supported with return code 7 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: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: FAIL ERROR - Unexpected errno 6, desc Referenced domain `invalid_name' does not exist: Domain not found ERROR - Expected No such instance (invalid_name) 6 ERROR - ------ FAILED: invalid_name ------ -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: FAIL ERROR - Waited too long for define indication ERROR - Waited too long for start indication ERROR - Waited too long for destroy indication -------------------------------------------------------------------- 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: FAIL ERROR - Unexpected rc code 6 and description Referenced domain `wrong' does not exist: Domain not found -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'KVM_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: FAIL ERROR - Unexpected rc code 6 and description Referenced domain `INVALID_Name_Keyvalue' does not exist: Domain not found ERROR - ------ FAILED: INVALID_Name_Keyvalue------ -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL ERROR - destroy_fail>> noname: Error executing DestroySystem ERROR - (6, u'Unable to retrieve domain name: Error 0') ERROR - destroy_fail>> nonexistent: Error executing DestroySystem ERROR - (6, u"Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found") InvokeMethod(DestroySystem): Unable to retrieve domain name: Error 0 InvokeMethod(DestroySystem): Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ERROR - VirtualQuantity is 0, expected 3 ERROR - Exception: details CPU scheduling not set properly for the dom: procrasd_persist_dom -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Wed Mar 4 09:36:04 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 04 Mar 2009 15:06:04 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: References: Message-ID: <49AE4B84.2050608@linux.vnet.ibm.com> Guo Lian Yun wrote: > > ================================================= > Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) > with sfcb > ================================================= > Distro: Fedora release 10 (Cambridge) > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 827 > Libvirt-cim changeset: e3dd4cec1b61 > Cimtest revision: 639 > Cimtest changeset: b84b3ec0c3d7 > ================================================= > FAIL : 7 > XFAIL : 2 > SKIP : 4 > PASS : 133 > ----------------- > Total : 146 > ================================================= > FAIL Test Summary: > ComputerSystem - 42_cs_gi_errs.py: FAIL > ComputerSystemIndication - 01_created_indication.py: FAIL > ElementCapabilities - 03_forward_errs.py: FAIL > ElementConforms - 01_forward.py: FAIL > ElementConforms - 04_ectp_rev_errs.py: FAIL > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL Did you investigate into these ? -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Wed Mar 4 09:59:27 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 4 Mar 2009 17:59:27 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: <49AE4B84.2050608@linux.vnet.ibm.com> Message-ID: Libvirt-cim-bounces at redhat.com wrote on 2009-03-04 17:36:04: > > > Guo Lian Yun wrote: > > > > ================================================= > > Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) > > with sfcb > > ================================================= > > Distro: Fedora release 10 (Cambridge) > > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > > libvirt: 0.4.5 > > Hypervisor: QEMU 0.9.1 > > CIMOM: sfcb sfcbd 1.3.3preview > > Libvirt-cim revision: 827 > > Libvirt-cim changeset: e3dd4cec1b61 > > Cimtest revision: 639 > > Cimtest changeset: b84b3ec0c3d7 > > ================================================= > > FAIL : 7 > > XFAIL : 2 > > SKIP : 4 > > PASS : 133 > > ----------------- > > Total : 146 > > ================================================= > > FAIL Test Summary: > > ComputerSystem - 42_cs_gi_errs.py: FAIL > > ComputerSystemIndication - 01_created_indication.py: FAIL > > ElementCapabilities - 03_forward_errs.py: FAIL > > ElementConforms - 01_forward.py: FAIL I'm working on this patch. > > ElementConforms - 04_ectp_rev_errs.py: FAIL > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL This failure because of libvirt bug, I will add a bug number to it. I think Some of the failure due to the update of libvirt-cim provider error message, I have no time to look into these today. Hopefully, I can fix most of them by the end of week. > Did you investigate into these ? > > -- > Thanks and Regards, > Deepti B. Kalakeri > IBM Linux Technology Center > deeptik at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 4 10:42:27 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 04 Mar 2009 02:42:27 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association Message-ID: <74094ff0c8c8ec5a20da.1236163347@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236163338 28800 # Node ID 74094ff0c8c8ec5a20da465be65408bee4251838 # Parent b84b3ec0c3d74c2e3c858a0fd82ff615a94bf18b [TEST] #2 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association Tested for KVM/LXC with current sources and rpm on Pegasus Signed-off-by: Guolian Yun diff -r b84b3ec0c3d7 -r 74094ff0c8c8 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Mar 03 09:05:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Wed Mar 04 02:42:18 2009 -0800 @@ -63,7 +63,7 @@ curr_cim_rev, changeset = get_provider_version(virt, server) if curr_cim_rev >= libvirt_cim_ectp_changes: cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", - "ProcessorPool", "MemoryPool"] + "ProcessorPool", "MemoryPool", "AllocationCapabilities"] cn_names.extend(cn_names2) if curr_cim_rev >= libvirt_cim_input_graphics_ectp: cn_names.append("ConsoleRedirectionService") @@ -136,6 +136,10 @@ if profile.InstanceID not in unsupp_prof: profiles_instid_list.append(profile.InstanceID) + for prof_id in profiles_instid_list: + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c": + profiles_instid_list.remove(prof_id) + return status, profiles_instid_list @do_main(sup_types) From yunguol at cn.ibm.com Wed Mar 4 11:07:31 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 04 Mar 2009 03:07:31 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] XFAIL for the 'VirtualQuantity' verification when the guest is runing Message-ID: <73b694026265b570d119.1236164851@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236164846 28800 # Node ID 73b694026265b570d119395f9337148d9fcccd17 # Parent b84b3ec0c3d74c2e3c858a0fd82ff615a94bf18b [TEST] XFAIL for the 'VirtualQuantity' verification when the guest is runing Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r b84b3ec0c3d7 -r 73b694026265 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Mar 03 09:05:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Wed Mar 04 03:07:26 2009 -0800 @@ -42,11 +42,12 @@ from XenKvmLib.classes import get_typed_class, inst_to_mof from CimTest.Globals import logger from XenKvmLib.const import do_main -from CimTest.ReturnCodes import FAIL, PASS +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC from XenKvmLib.rasd import get_default_rasds sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = 'procrasd_persist_dom' +libvirt_bug = '00013' nvcpu = 3 weight = 124 @@ -92,7 +93,7 @@ if proc_rasd["VirtualQuantity"] != nvcpu: logger.error("VirtualQuantity is %i, expected %i", proc_rasd["VirtualQuantity"], nvcpu) - return FAIL + return XFAIL_RC(libvirt_bug) if proc_rasd["Limit"] != limit: logger.error("Limit is %i, expected %i", @@ -137,7 +138,7 @@ dom_start = True status = check_proc_sched(server, prasd_cn) - if status != PASS: + if status != PASS and status != XFAIL_RC(libvirt_bug): raise Exception("CPU scheduling not set properly for the dom: " "%s" % test_dom) From deeptik at linux.vnet.ibm.com Wed Mar 4 10:59:02 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 04 Mar 2009 16:29:02 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] XFAIL for the 'VirtualQuantity' verification when the guest is runing In-Reply-To: <73b694026265b570d119.1236164851@elm3b197.beaverton.ibm.com> References: <73b694026265b570d119.1236164851@elm3b197.beaverton.ibm.com> Message-ID: <49AE5EF6.6010908@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236164846 28800 > # Node ID 73b694026265b570d119395f9337148d9fcccd17 > # Parent b84b3ec0c3d74c2e3c858a0fd82ff615a94bf18b > [TEST] XFAIL for the 'VirtualQuantity' verification when the guest is runing > > > Tested for KVM/LXC with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r b84b3ec0c3d7 -r 73b694026265 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Mar 03 09:05:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Wed Mar 04 03:07:26 2009 -0800 > @@ -42,11 +42,12 @@ > from XenKvmLib.classes import get_typed_class, inst_to_mof > from CimTest.Globals import logger > from XenKvmLib.const import do_main > -from CimTest.ReturnCodes import FAIL, PASS > +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC > from XenKvmLib.rasd import get_default_rasds > > sup_types = ['Xen', 'XenFV', 'KVM'] > test_dom = 'procrasd_persist_dom' > +libvirt_bug = '00013' > > nvcpu = 3 > weight = 124 > @@ -92,7 +93,7 @@ > if proc_rasd["VirtualQuantity"] != nvcpu: > logger.error("VirtualQuantity is %i, expected %i", > proc_rasd["VirtualQuantity"], nvcpu) > - return FAIL > + return XFAIL_RC(libvirt_bug) > The problem is for KVM only hence you would need to check for the virt type before determining what return you need to return. > if proc_rasd["Limit"] != limit: > logger.error("Limit is %i, expected %i", > @@ -137,7 +138,7 @@ > > dom_start = True > status = check_proc_sched(server, prasd_cn) > - if status != PASS: > + if status != PASS and status != XFAIL_RC(libvirt_bug): > raise Exception("CPU scheduling not set properly for the dom: " > "%s" % test_dom) > > same here. > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Wed Mar 4 10:54:59 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 4 Mar 2009 18:54:59 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: <74094ff0c8c8ec5a20da.1236163347@elm3b197.beaverton.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-04 18:42:27: > # HG changeset patch > # User Guolian Yun > # Date 1236163338 28800 > # Node ID 74094ff0c8c8ec5a20da465be65408bee4251838 > # Parent b84b3ec0c3d74c2e3c858a0fd82ff615a94bf18b > [TEST] #2 Add "AllocationCapabilities" to associate with ECTP and > skip KVM_RegisteredProfile association > > > Tested for KVM/LXC with current sources and rpm on Pegasus > > Signed-off-by: Guolian Yun > > diff -r b84b3ec0c3d7 -r 74094ff0c8c8 suites/libvirt- > cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue > Mar 03 09:05:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Wed > Mar 04 02:42:18 2009 -0800 > @@ -63,7 +63,7 @@ > curr_cim_rev, changeset = get_provider_version(virt, server) > if curr_cim_rev >= libvirt_cim_ectp_changes: > cn_names2 = ["VirtualSystemMigrationService", "DiskPool", > "NetworkPool", > - "ProcessorPool", "MemoryPool"] > + "ProcessorPool", "MemoryPool", "AllocationCapabilities"] > cn_names.extend(cn_names2) > if curr_cim_rev >= libvirt_cim_input_graphics_ectp: > cn_names.append("ConsoleRedirectionService") > @@ -136,6 +136,10 @@ > if profile.InstanceID not in unsupp_prof: > profiles_instid_list.append(profile.InstanceID) > > + for prof_id in profiles_instid_list: > + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c": > + profiles_instid_list.remove(prof_id) > + > return status, profiles_instid_list > > @do_main(sup_types) > It's better to skip the association of "CIM:DSP1041-ResourceAllocation-1.1.0c" to ECTP on F10 rpm instead of all the versions of src. But I don't find out the changeset number of this association setting up. > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 4 11:28:13 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 04 Mar 2009 03:28:13 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]#2 XFAIL for the 'VirtualQuantity' verification when the guest is runing Message-ID: # HG changeset patch # User Guolian Yun # Date 1236166087 28800 # Node ID a7392e6585d9ab3a02bab006727d9c49c8479653 # Parent b84b3ec0c3d74c2e3c858a0fd82ff615a94bf18b [TEST]#2 XFAIL for the 'VirtualQuantity' verification when the guest is runing Updates from 1 to 2: This issue only hit for KVM, check for the virt type before determining what return. Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r b84b3ec0c3d7 -r a7392e6585d9 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Mar 03 09:05:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Wed Mar 04 03:28:07 2009 -0800 @@ -42,11 +42,12 @@ from XenKvmLib.classes import get_typed_class, inst_to_mof from CimTest.Globals import logger from XenKvmLib.const import do_main -from CimTest.ReturnCodes import FAIL, PASS +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC from XenKvmLib.rasd import get_default_rasds sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = 'procrasd_persist_dom' +libvirt_bug = '00013' nvcpu = 3 weight = 124 @@ -76,7 +77,7 @@ return PASS -def check_proc_sched(server, cn_name): +def check_proc_sched(server, virt, cn_name): try: proc_rasd = None rasds = EnumInstances(server, cn_name, ret_cim_inst=True) @@ -89,10 +90,10 @@ logger.error("Did not find test RASD on server") return FAIL - if proc_rasd["VirtualQuantity"] != nvcpu: + if proc_rasd["VirtualQuantity"] != nvcpu and virt == 'KVM': logger.error("VirtualQuantity is %i, expected %i", proc_rasd["VirtualQuantity"], nvcpu) - return FAIL + return XFAIL_RC(libvirt_bug) if proc_rasd["Limit"] != limit: logger.error("Limit is %i, expected %i", @@ -126,7 +127,7 @@ return status dom_define = True - status = check_proc_sched(server, prasd_cn) + status = check_proc_sched(server, virt, prasd_cn) if status != PASS: raise Exception("CPU scheduling not set properly for " " defined dom: %s" % test_dom) @@ -136,8 +137,8 @@ raise Exception("Unable to start %s " % test_dom) dom_start = True - status = check_proc_sched(server, prasd_cn) - if status != PASS: + status = check_proc_sched(server, virt, prasd_cn) + if virt != 'KVM' and status == FAIL: raise Exception("CPU scheduling not set properly for the dom: " "%s" % test_dom) From deeptik at linux.vnet.ibm.com Wed Mar 4 12:11:54 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 04 Mar 2009 17:41:54 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#2 XFAIL for the 'VirtualQuantity' verification when the guest is runing In-Reply-To: References: Message-ID: <49AE700A.40803@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236166087 28800 > # Node ID a7392e6585d9ab3a02bab006727d9c49c8479653 > # Parent b84b3ec0c3d74c2e3c858a0fd82ff615a94bf18b > [TEST]#2 XFAIL for the 'VirtualQuantity' verification when the guest is runing > > > Updates from 1 to 2: > This issue only hit for KVM, check for the virt type before determining what return. > > > Tested for KVM with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r b84b3ec0c3d7 -r a7392e6585d9 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Mar 03 09:05:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Wed Mar 04 03:28:07 2009 -0800 > @@ -42,11 +42,12 @@ > from XenKvmLib.classes import get_typed_class, inst_to_mof > from CimTest.Globals import logger > from XenKvmLib.const import do_main > -from CimTest.ReturnCodes import FAIL, PASS > +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC > from XenKvmLib.rasd import get_default_rasds > > sup_types = ['Xen', 'XenFV', 'KVM'] > test_dom = 'procrasd_persist_dom' > +libvirt_bug = '00013' > The bug is due to the side effects of the libvirt API virDomainGetVcpus() problem. Hence, I have changed the bug detail "The property of 'VirtualQuantity' of CPU is NULL when the guest is running." to same on cimtest wiki. > nvcpu = 3 > weight = 124 > @@ -76,7 +77,7 @@ > > return PASS > > -def check_proc_sched(server, cn_name): > +def check_proc_sched(server, virt, cn_name): > try: > proc_rasd = None > rasds = EnumInstances(server, cn_name, ret_cim_inst=True) > @@ -89,10 +90,10 @@ > logger.error("Did not find test RASD on server") > return FAIL > > - if proc_rasd["VirtualQuantity"] != nvcpu: > + if proc_rasd["VirtualQuantity"] != nvcpu and virt == 'KVM': > logger.error("VirtualQuantity is %i, expected %i", > proc_rasd["VirtualQuantity"], nvcpu) > - return FAIL > + return XFAIL_RC(libvirt_bug) > > if proc_rasd["Limit"] != limit: > logger.error("Limit is %i, expected %i", > @@ -126,7 +127,7 @@ > return status > > dom_define = True > - status = check_proc_sched(server, prasd_cn) > + status = check_proc_sched(server, virt, prasd_cn) > if status != PASS: > raise Exception("CPU scheduling not set properly for " > " defined dom: %s" % test_dom) > @@ -136,8 +137,8 @@ > raise Exception("Unable to start %s " % test_dom) > > dom_start = True > - status = check_proc_sched(server, prasd_cn) > - if status != PASS: > + status = check_proc_sched(server, virt, prasd_cn) > + if virt != 'KVM' and status == FAIL: > raise Exception("CPU scheduling not set properly for the dom: " > "%s" % test_dom) > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Mar 4 13:38:31 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 04 Mar 2009 19:08:31 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#2 XFAIL for the 'VirtualQuantity' verification when the guest is runing In-Reply-To: References: Message-ID: <49AE8457.3060208@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236166087 28800 > # Node ID a7392e6585d9ab3a02bab006727d9c49c8479653 > # Parent b84b3ec0c3d74c2e3c858a0fd82ff615a94bf18b > [TEST]#2 XFAIL for the 'VirtualQuantity' verification when the guest is runing > > > Updates from 1 to 2: > This issue only hit for KVM, check for the virt type before determining what return. > > > Tested for KVM with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r b84b3ec0c3d7 -r a7392e6585d9 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Mar 03 09:05:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Wed Mar 04 03:28:07 2009 -0800 > @@ -42,11 +42,12 @@ > from XenKvmLib.classes import get_typed_class, inst_to_mof > from CimTest.Globals import logger > from XenKvmLib.const import do_main > -from CimTest.ReturnCodes import FAIL, PASS > +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC > from XenKvmLib.rasd import get_default_rasds > > sup_types = ['Xen', 'XenFV', 'KVM'] > test_dom = 'procrasd_persist_dom' > +libvirt_bug = '00013' > > nvcpu = 3 > weight = 124 > @@ -76,7 +77,7 @@ > > return PASS > > -def check_proc_sched(server, cn_name): > +def check_proc_sched(server, virt, cn_name): > try: > proc_rasd = None > rasds = EnumInstances(server, cn_name, ret_cim_inst=True) > @@ -89,10 +90,10 @@ > logger.error("Did not find test RASD on server") > return FAIL > > - if proc_rasd["VirtualQuantity"] != nvcpu: > + if proc_rasd["VirtualQuantity"] != nvcpu and virt == 'KVM': > logger.error("VirtualQuantity is %i, expected %i", > proc_rasd["VirtualQuantity"], nvcpu) > - return FAIL > + return XFAIL_RC(libvirt_bug) > > if proc_rasd["Limit"] != limit: > logger.error("Limit is %i, expected %i", > @@ -126,7 +127,7 @@ > return status > > dom_define = True > - status = check_proc_sched(server, prasd_cn) > + status = check_proc_sched(server, virt, prasd_cn) > if status != PASS: > raise Exception("CPU scheduling not set properly for " > " defined dom: %s" % test_dom) > @@ -136,8 +137,8 @@ > raise Exception("Unable to start %s " % test_dom) > > dom_start = True > - status = check_proc_sched(server, prasd_cn) > - if status != PASS: > + status = check_proc_sched(server, virt, prasd_cn) > + if virt != 'KVM' and status == FAIL: > raise Exception("CPU scheduling not set properly for the dom: " > "%s" % test_dom) > The test will execute for the no of iterations given in the for. You may want to raise an exception and break out of the loop when we detect the XFAIL for the first time itself. You can do something like: if virt != 'KVM' and status == FAIL: raise Exception("CPU scheduling not set properly for the dom: " "%s" % test_dom) elif virt == 'KVM' and status == XFAIL: destroy() undefine() return(status) OR if virt != 'KVM' and status == FAIL: raise Exception("CPU scheduling not set properly for the dom: " "%s" % test_dom) elif virt == 'KVM' and status == XFAIL: break or something similar. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Mar 4 21:04:27 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 04 Mar 2009 13:04:27 -0800 Subject: [Libvirt-cim] [PATCH] If the resource type of a devices is set to UNKNOWN, do not generate XML for it Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1236200658 28800 # Node ID ad367dfd38f4a78eeaf5369bb00d22bbf6aec911 # Parent e3dd4cec1b61373e738fe3ba58557ae543b41789 If the resource type of a devices is set to UNKNOWN, do not generate XML for it xmlgen was recently refactored, so this adds back in behavior that was missed during the refactor. If the resource type of a device is CIM_RES_TYPE_UNKNOWN, then the xml generation for that device should be skipped. The RemoveResources() call sets a device's type to UNKNOWN to indicate that the device should be marked for removal. Signed-off-by: Kaitlin Rupert diff -r e3dd4cec1b61 -r ad367dfd38f4 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Tue Mar 03 10:04:00 2009 -0700 +++ b/libxkutil/xmlgen.c Wed Mar 04 13:04:18 2009 -0800 @@ -128,6 +128,10 @@ const char *msg = NULL;; for (i = 0; (i < dominfo->dev_disk_ct) && (msg == NULL); i++) { + struct virt_device *dev = &dominfo->dev_disk[i]; + if (dev->type == CIM_RES_TYPE_UNKNOWN) + continue; + struct disk_device *disk = &dominfo->dev_disk[i].dev.disk; CU_DEBUG("Disk: %i %s %s", disk->disk_type, @@ -229,6 +233,9 @@ for (i = 0; (i < dominfo->dev_net_ct) && (msg == NULL); i++) { struct virt_device *dev = &dominfo->dev_net[i]; + if (dev->type == CIM_RES_TYPE_UNKNOWN) + continue; + struct net_device *net = &dev->dev.net; if (STREQ(dev->dev.net.type, "network")) @@ -331,6 +338,9 @@ for (i = 0; i < dominfo->dev_graphics_ct; i++) { xmlNodePtr tmp; struct virt_device *_dev = &dominfo->dev_graphics[i]; + if (_dev->type == CIM_RES_TYPE_UNKNOWN) + continue; + struct graphics_device *dev = &_dev->dev.graphics; tmp = xmlNewChild(root, NULL, BAD_CAST "graphics", NULL); @@ -353,6 +363,9 @@ for (i = 0; i < dominfo->dev_input_ct; i++) { xmlNodePtr tmp; struct virt_device *_dev = &dominfo->dev_input[i]; + if (_dev->type == CIM_RES_TYPE_UNKNOWN) + continue; + struct input_device *dev = &_dev->dev.input; tmp = xmlNewChild(root, NULL, BAD_CAST "input", NULL); From kaitlin at linux.vnet.ibm.com Wed Mar 4 23:15:00 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 04 Mar 2009 15:15:00 -0800 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 03 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49AE0EF8.30203@linux.vnet.ibm.com> References: <49AD2D6D.90909@linux.vnet.ibm.com> <49AD3903.2020704@linux.vnet.ibm.com> <49AD9FD5.8050007@linux.vnet.ibm.com> <49AE0EF8.30203@linux.vnet.ibm.com> Message-ID: <49AF0B74.5040402@linux.vnet.ibm.com> >>>> VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL >>> Passed on manual run. >>> >>>> VirtualSystemSettingDataComponent - 02_reverse.py: FAIL >>>> VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL >>>> VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL >>> Passed on manual run. >> >> For the items that pass on a manual run, any idea why they fail in >> bulk run? > I would need to see if NetworkPort - 02_np_gi_errors.py fails on bulk > run again. This is the first time it has failed. > But for the following tests I suspect the migration tests the reason. > > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL > > Most of the times the dom_migrate domain that is created on the host > does not get cleaned. > Since all the tc uses the same images, the consecutive tests fails when > they try to create a new guest. > The problem is seen only with Xen/XenFV and that too with the Rhel, if > you remember we used to face the same problem with Rhel5.2 as well. > It takes lot of virsh destroy commands to actually destroy the guest > created by the migration tc. > Sometimes I need to restart the xend to see the refreshed list of > domains on the host. > What about something like the following: 1) Have the migration tests make a copy of the image and use that copy to define the guest. 2) Before the test completes, the copied image could be duplicated. This way, the guests created for the migration test wouldn't be utilizing the image that the other tests need. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 5 00:29:48 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 04 Mar 2009 16:29:48 -0800 Subject: [Libvirt-cim] [PATCH] Set device type to UNKNOWN after dynamic resource delete is called Message-ID: <1aff0d0e9bf49e738827.1236212988@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1236209133 28800 # Node ID 1aff0d0e9bf49e738827b7157c0df407b814ae7d # Parent ad367dfd38f4a78eeaf5369bb00d22bbf6aec911 Set device type to UNKNOWN after dynamic resource delete is called. If this is done before, then the call to detach_device() always fails. The proper device type is needed by the device_to_xml() call to generate the XML needed for the virDomainDetachDevice() call. Signed-off-by: Kaitlin Rupert diff -r ad367dfd38f4 -r 1aff0d0e9bf4 src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Mar 04 13:04:18 2009 -0800 +++ b/src/Virt_VirtualSystemManagementService.c Wed Mar 04 15:25:33 2009 -0800 @@ -1551,8 +1551,6 @@ struct virt_device *dev = &list[i]; if (STREQ(dev->id, devid)) { - dev->type = CIM_RES_TYPE_UNKNOWN; - if ((type == CIM_RES_TYPE_GRAPHICS) || (type == CIM_RES_TYPE_INPUT)) cu_statusf(_BROKER, &s, CMPI_RC_OK, ""); @@ -1562,6 +1560,9 @@ RESOURCE_DEL, CLASSNAME(op)); } + + dev->type = CIM_RES_TYPE_UNKNOWN; + break; } } From kaitlin at linux.vnet.ibm.com Thu Mar 5 00:32:51 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 04 Mar 2009 16:32:51 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Modifying HostedDependency/04_reverse_errs.py tc to use cim_define() and cim_start(), cim_destroy() In-Reply-To: <49AE18E3.9060306@linux.vnet.ibm.com> References: <49ADBB01.50207@linux.vnet.ibm.com> <49AE18E3.9060306@linux.vnet.ibm.com> Message-ID: <49AF1DB3.5070707@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Kaitlin Rupert wrote: >>> @@ -138,7 +148,9 @@ def main(): >>> keys = { 'CreationClassName' : field, 'Name' : host_name } >>> ret_value = verify_err_fields(cxml, server, conn, keys, classname, >>> acn, msg, field, expr_values) >>> - cxml.destroy(server) >>> + if ret_value == PASS: >> >> You want to destroy and undefine the guest, even if ret_value != PASS. >> >>> + cxml.cim_destroy(server) >>> + cxml.undefine(server) >> >> Also, there's a few places in this test where the test is returned but >> the guest isn't destroyed / undefined. Can you fix those spots? Look >> at lines 128, 136, and 144. >> >> Thanks! >> > The verify_err_fields() takes care of destroy/undefine of the guest in > case of failure, hence I need to only destroy and undefine for the last > verify_err_fields() call and only when ret_value from the > verify_err_fields() is PASS. > Ah! Good point. I missed this. Thanks for pointing it out. No complaints with this patch then. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 5 00:34:45 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 04 Mar 2009 16:34:45 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: References: Message-ID: <49AF1E25.8050301@linux.vnet.ibm.com> > > + for prof_id in profiles_instid_list: > > + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c": > > + profiles_instid_list.remove(prof_id) > > + > > return status, profiles_instid_list > > > > @do_main(sup_types) > > > It's better to skip the association of > "CIM:DSP1041-ResourceAllocation-1.1.0c" to ECTP on F10 rpm instead of > all the versions of src. But I don't find out the changeset number of > this association setting up. > It's changeset 796 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 5 00:36:14 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 04 Mar 2009 16:36:14 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: <74094ff0c8c8ec5a20da.1236163347@elm3b197.beaverton.ibm.com> References: <74094ff0c8c8ec5a20da.1236163347@elm3b197.beaverton.ibm.com> Message-ID: <49AF1E7E.50604@linux.vnet.ibm.com> > @@ -136,6 +136,10 @@ > if profile.InstanceID not in unsupp_prof: > profiles_instid_list.append(profile.InstanceID) > > + for prof_id in profiles_instid_list: > + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c": > + profiles_instid_list.remove(prof_id) > + You'll need to skip this for the following: 818 > changeset >= 796 Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Thu Mar 5 02:40:49 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 04 Mar 2009 18:40:49 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association Message-ID: <8d5f30111ac7e1be2eda.1236220849@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236220843 28800 # Node ID 8d5f30111ac7e1be2eda35a6bf5b43e34ce6ceb5 # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST] #3Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association Updates from 2 to 3: Add changeset instead of skip the verification of KVM_ResourceAllocation to ECTP for all the src versions Tested for KVM/LXC with current sources and rpm on Pegasus Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r 8d5f30111ac7 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Wed Mar 04 18:40:43 2009 -0800 @@ -63,7 +63,7 @@ curr_cim_rev, changeset = get_provider_version(virt, server) if curr_cim_rev >= libvirt_cim_ectp_changes: cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", - "ProcessorPool", "MemoryPool"] + "ProcessorPool", "MemoryPool", "AllocationCapabilities"] cn_names.extend(cn_names2) if curr_cim_rev >= libvirt_cim_input_graphics_ectp: cn_names.append("ConsoleRedirectionService") @@ -136,6 +136,11 @@ if profile.InstanceID not in unsupp_prof: profiles_instid_list.append(profile.InstanceID) + for prof_id in profiles_instid_list: + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c" and\ + 796 <= curr_cim_rev < 818: + profiles_instid_list.remove(prof_id) + return status, profiles_instid_list @do_main(sup_types) From yunguol at cn.ibm.com Thu Mar 5 02:23:42 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 5 Mar 2009 10:23:42 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: <49AF1E7E.50604@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-05 08:36:14: > > @@ -136,6 +136,10 @@ > > if profile.InstanceID not in unsupp_prof: > > profiles_instid_list.append(profile.InstanceID) > > > > + for prof_id in profiles_instid_list: > > + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c": > > + profiles_instid_list.remove(prof_id) > > + > > You'll need to skip this for the following: > > 818 > changeset >= 796 Thanks for this investigation. This updates checked into #3 patch. Thanks! > > Thanks! > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Mar 5 02:33:54 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 5 Mar 2009 10:33:54 +0800 Subject: [Libvirt-cim] [PATCH] [TEST]#2 XFAIL for the 'VirtualQuantity' verification when the guest is runing In-Reply-To: <49AE700A.40803@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-04 20:11:54: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1236166087 28800 > > # Node ID a7392e6585d9ab3a02bab006727d9c49c8479653 > > # Parent b84b3ec0c3d74c2e3c858a0fd82ff615a94bf18b > > [TEST]#2 XFAIL for the 'VirtualQuantity' verification when the > guest is runing > > > > > > Updates from 1 to 2: > > This issue only hit for KVM, check for the virt type before > determining what return. > > > > > > Tested for KVM with current sources and rpm > > > > Signed-off-by: Guolian Yun > > > > diff -r b84b3ec0c3d7 -r a7392e6585d9 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py > > --- a/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py > Tue Mar 03 09:05:40 2009 -0800 > > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py > Wed Mar 04 03:28:07 2009 -0800 > > @@ -42,11 +42,12 @@ > > from XenKvmLib.classes import get_typed_class, inst_to_mof > > from CimTest.Globals import logger > > from XenKvmLib.const import do_main > > -from CimTest.ReturnCodes import FAIL, PASS > > +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC > > from XenKvmLib.rasd import get_default_rasds > > > > sup_types = ['Xen', 'XenFV', 'KVM'] > > test_dom = 'procrasd_persist_dom' > > +libvirt_bug = '00013' > > > > The bug is due to the side effects of the libvirt API > virDomainGetVcpus() problem. > Hence, I have changed the bug detail "The property of 'VirtualQuantity' > of CPU is NULL when the guest is running." > to same on cimtest wiki. Thanks! This description sees more clearly. > > nvcpu = 3 > > weight = 124 > > @@ -76,7 +77,7 @@ > > > > return PASS > > > > -def check_proc_sched(server, cn_name): > > +def check_proc_sched(server, virt, cn_name): > > try: > > proc_rasd = None > > rasds = EnumInstances(server, cn_name, ret_cim_inst=True) > > @@ -89,10 +90,10 @@ > > logger.error("Did not find test RASD on server") > > return FAIL > > > > - if proc_rasd["VirtualQuantity"] != nvcpu: > > + if proc_rasd["VirtualQuantity"] != nvcpu and virt == 'KVM': > > logger.error("VirtualQuantity is %i, expected %i", > > proc_rasd["VirtualQuantity"], nvcpu) > > - return FAIL > > + return XFAIL_RC(libvirt_bug) > > > > if proc_rasd["Limit"] != limit: > > logger.error("Limit is %i, expected %i", > > @@ -126,7 +127,7 @@ > > return status > > > > dom_define = True > > - status = check_proc_sched(server, prasd_cn) > > + status = check_proc_sched(server, virt, prasd_cn) > > if status != PASS: > > raise Exception("CPU scheduling not set properly for " > > " defined dom: %s" % test_dom) > > @@ -136,8 +137,8 @@ > > raise Exception("Unable to start %s " % test_dom) > > > > dom_start = True > > - status = check_proc_sched(server, prasd_cn) > > - if status != PASS: > > + status = check_proc_sched(server, virt, prasd_cn) > > + if virt != 'KVM' and status == FAIL: > > raise Exception("CPU scheduling not set properly > for the dom: " > > "%s" % test_dom) > > > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > -- > Thanks and Regards, > Deepti B. Kalakeri > IBM Linux Technology Center > deeptik at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Mar 5 05:26:03 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 04 Mar 2009 21:26:03 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 XFAIL for the 'VirtualQuantity' verification when the guest is runing Message-ID: # HG changeset patch # User Guolian Yun # Date 1236230756 28800 # Node ID d0186caa78d2a8614d6c82b6e4413125b50e4953 # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST] #3 XFAIL for the 'VirtualQuantity' verification when the guest is runing Updates from 2 to 3: Break out of the loop when I detect the XFAIL for the first time itself Updates from 1 to 2: This issue only hit for KVM, check for the virt type before determining what return. Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r d0186caa78d2 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Wed Mar 04 21:25:56 2009 -0800 @@ -42,9 +42,10 @@ from XenKvmLib.classes import get_typed_class, inst_to_mof from CimTest.Globals import logger from XenKvmLib.const import do_main -from CimTest.ReturnCodes import FAIL, PASS +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC from XenKvmLib.rasd import get_default_rasds +libvirt_bug = '00013' sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = 'procrasd_persist_dom' @@ -76,7 +77,7 @@ return PASS -def check_proc_sched(server, cn_name): +def check_proc_sched(server, virt, cn_name): try: proc_rasd = None rasds = EnumInstances(server, cn_name, ret_cim_inst=True) @@ -89,10 +90,12 @@ logger.error("Did not find test RASD on server") return FAIL - if proc_rasd["VirtualQuantity"] != nvcpu: + if proc_rasd["VirtualQuantity"] != nvcpu and virt != "KVM": logger.error("VirtualQuantity is %i, expected %i", proc_rasd["VirtualQuantity"], nvcpu) return FAIL + elif proc_rasd["VirtualQuantity"] != nvcpu and virt == "KVM": + return XFAIL_RC(libvirt_bug) if proc_rasd["Limit"] != limit: logger.error("Limit is %i, expected %i", @@ -126,7 +129,7 @@ return status dom_define = True - status = check_proc_sched(server, prasd_cn) + status = check_proc_sched(server, virt, prasd_cn) if status != PASS: raise Exception("CPU scheduling not set properly for " " defined dom: %s" % test_dom) @@ -136,10 +139,12 @@ raise Exception("Unable to start %s " % test_dom) dom_start = True - status = check_proc_sched(server, prasd_cn) - if status != PASS: + status = check_proc_sched(server, virt, prasd_cn) + if status == FAIL and virt != 'KVM': raise Exception("CPU scheduling not set properly for the dom: " "%s" % test_dom) + elif status == XFAIL_RC(libvirt_bug) and virt == 'KVM': + break cxml.cim_destroy(server) dom_start = False From deeptik at linux.vnet.ibm.com Thu Mar 5 05:37:08 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 05 Mar 2009 11:07:08 +0530 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 03 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49AF0B74.5040402@linux.vnet.ibm.com> References: <49AD2D6D.90909@linux.vnet.ibm.com> <49AD3903.2020704@linux.vnet.ibm.com> <49AD9FD5.8050007@linux.vnet.ibm.com> <49AE0EF8.30203@linux.vnet.ibm.com> <49AF0B74.5040402@linux.vnet.ibm.com> Message-ID: <49AF6504.4040202@linux.vnet.ibm.com> Kaitlin Rupert wrote: >>>>> VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL >>>> Passed on manual run. >>>> >>>>> VirtualSystemSettingDataComponent - 02_reverse.py: FAIL >>>>> VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL >>>>> VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL >>>> Passed on manual run. >>> >>> For the items that pass on a manual run, any idea why they fail in >>> bulk run? >> I would need to see if NetworkPort - 02_np_gi_errors.py fails on bulk >> run again. This is the first time it has failed. >> But for the following tests I suspect the migration tests the reason. >> >> VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL >> VirtualSystemSettingDataComponent - 02_reverse.py: FAIL >> VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL >> VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL >> >> Most of the times the dom_migrate domain that is created on the host >> does not get cleaned. >> Since all the tc uses the same images, the consecutive tests fails >> when they try to create a new guest. >> The problem is seen only with Xen/XenFV and that too with the Rhel, >> if you remember we used to face the same problem with Rhel5.2 as well. >> It takes lot of virsh destroy commands to actually destroy the guest >> created by the migration tc. >> Sometimes I need to restart the xend to see the refreshed list of >> domains on the host. >> > > What about something like the following: > > 1) Have the migration tests make a copy of the image and use that copy > to define the guest. > > 2) Before the test completes, the copied image could be duplicated. > > This way, the guests created for the migration test wouldn't be > utilizing the image that the other tests need. I will take a look at this. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Thu Mar 5 06:26:02 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 5 Mar 2009 14:26:02 +0800 Subject: [Libvirt-cim] [PATCH] If the resource type of a devices is set to UNKNOWN, do not generate XML for it In-Reply-To: Message-ID: +1 Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2009-03-05 05:04:27: > # HG changeset patch > # User Kaitlin Rupert > # Date 1236200658 28800 > # Node ID ad367dfd38f4a78eeaf5369bb00d22bbf6aec911 > # Parent e3dd4cec1b61373e738fe3ba58557ae543b41789 > If the resource type of a devices is set to UNKNOWN, do not generateXML for it > > xmlgen was recently refactored, so this adds back in behavior that was missed > during the refactor. If the resource type of a device is > CIM_RES_TYPE_UNKNOWN, > then the xml generation for that device should be skipped. > > The RemoveResources() call sets a device's type to UNKNOWN to indicate that > the device should be marked for removal. > > Signed-off-by: Kaitlin Rupert > > diff -r e3dd4cec1b61 -r ad367dfd38f4 libxkutil/xmlgen.c > --- a/libxkutil/xmlgen.c Tue Mar 03 10:04:00 2009 -0700 > +++ b/libxkutil/xmlgen.c Wed Mar 04 13:04:18 2009 -0800 > @@ -128,6 +128,10 @@ > const char *msg = NULL;; > > for (i = 0; (i < dominfo->dev_disk_ct) && (msg == NULL); i++) { > + struct virt_device *dev = &dominfo->dev_disk[i]; > + if (dev->type == CIM_RES_TYPE_UNKNOWN) > + continue; > + > struct disk_device *disk = &dominfo->dev_disk[i].dev.disk; > CU_DEBUG("Disk: %i %s %s", > disk->disk_type, > @@ -229,6 +233,9 @@ > > for (i = 0; (i < dominfo->dev_net_ct) && (msg == NULL); i++) { > struct virt_device *dev = &dominfo->dev_net[i]; > + if (dev->type == CIM_RES_TYPE_UNKNOWN) > + continue; > + > struct net_device *net = &dev->dev.net; > > if (STREQ(dev->dev.net.type, "network")) > @@ -331,6 +338,9 @@ > for (i = 0; i < dominfo->dev_graphics_ct; i++) { > xmlNodePtr tmp; > struct virt_device *_dev = &dominfo->dev_graphics[i]; > + if (_dev->type == CIM_RES_TYPE_UNKNOWN) > + continue; > + > struct graphics_device *dev = &_dev->dev.graphics; > > tmp = xmlNewChild(root, NULL, BAD_CAST "graphics", NULL); > @@ -353,6 +363,9 @@ > for (i = 0; i < dominfo->dev_input_ct; i++) { > xmlNodePtr tmp; > struct virt_device *_dev = &dominfo->dev_input[i]; > + if (_dev->type == CIM_RES_TYPE_UNKNOWN) > + continue; > + > struct input_device *dev = &_dev->dev.input; > > tmp = xmlNewChild(root, NULL, BAD_CAST "input", NULL); > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Thu Mar 5 08:23:58 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 05 Mar 2009 13:53:58 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 05 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49AF8C1E.8010501@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 05 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 828 Libvirt-cim changeset: b4f09a4a8f10 Cimtest revision: Cimtest changeset: ================================================= FAIL : 9 XFAIL : 1 SKIP : 3 PASS : 133 ----------------- Total : 146 ================================================= FAIL Test Summary: ComputerSystem - 32_start_reboot.py: FAIL ComputerSystem - 42_cs_gi_errs.py: FAIL ElementCapabilities - 03_forward_errs.py: FAIL ElementConforms - 01_forward.py: FAIL ElementConforms - 04_ectp_rev_errs.py: FAIL RASD - 01_verify_rasd_fields.py: FAIL VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.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 -------------------------------------------------------------------- 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: FAIL ERROR - Unable to check guest state ERROR - Exception: Wrong guest instance ERROR - Unable to check guest state ERROR - Exception: Wrong guest instance ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Exception: Unable reboot dom 'cs_test_domain' CIM_ERR_FAILED: Unable to get domain information: failed Xen syscall xenDaemonDomainDumpXMLByID failed to find this domain 1 CIM_ERR_NOT_FOUND: Referenced domain `cs_test_domain' does not exist: internal error failed to parse Xend domain information -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: FAIL ERROR - Unexpected errno 6, desc CIM_ERR_NOT_FOUND: Referenced domain `invalid_name' does not exist: Domain not found: xenUnifiedDomainLookupByName ERROR - Expected No such instance (invalid_name) 6 ERROR - ------ FAILED: invalid_name ------ -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: FAIL ERROR - Unexpected rc code 6 and description CIM_ERR_NOT_FOUND: Referenced domain `wrong' does not exist: Domain not found: xenUnifiedDomainLookupByName -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'Xen_AllocationCapabilities' ERROR - Exception: Failed to verify instance CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: FAIL ERROR - Unexpected rc code 6 and description CIM_ERR_NOT_FOUND: Referenced domain `INVALID_Name_Keyvalue' does not exist: Domain not found: xenUnifiedDomainLookupByName ERROR - ------ FAILED: INVALID_Name_Keyvalue------ -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/11:22:33:aa:bb:cc): Domain not found: xenUnifiedDomainLookupByName') ERROR - Enum RASDs failed -------------------------------------------------------------------- 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 -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: PASS -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL ERROR - destroy_fail>> noname: Error executing DestroySystem ERROR - (6, u'CIM_ERR_NOT_FOUND: Unable to retrieve domain name: Error 0') ERROR - destroy_fail>> nonexistent: Error executing DestroySystem ERROR - (6, u"CIM_ERR_NOT_FOUND: Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found: xenUnifiedDomainLookupByName") InvokeMethod(DestroySystem): CIM_ERR_NOT_FOUND: Unable to retrieve domain name: Error 0 InvokeMethod(DestroySystem): CIM_ERR_NOT_FOUND: Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found: xenUnifiedDomainLookupByName -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - dom_migrate migrate failed -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Thu Mar 5 09:01:51 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 05 Mar 2009 01:01:51 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ComputerSystem/42_cs_gi_errs.py err desc for invalid name Message-ID: <73de8db2379fc26d7a06.1236243711@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236243704 28800 # Node ID 73de8db2379fc26d7a0605464a1a77f961a75f4f # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST] Fix ComputerSystem/42_cs_gi_errs.py err desc for invalid name Updates tc to meet the provder updates Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r 73de8db2379f suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py Thu Mar 05 01:01:44 2009 -0800 @@ -50,10 +50,11 @@ from CimTest.Globals import logger from XenKvmLib import vxml from XenKvmLib.classes import get_typed_class -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from XenKvmLib.enumclass import GetInstance, CIM_CimtestClass, EnumInstances sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] +libvirt_err_changes = 821 expected_values = { "invalid_name" : {'rc' : CIM_ERR_NOT_FOUND, @@ -115,6 +116,11 @@ ref = CIMInstanceName(cn, keybindings=keys) + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if tc == 'invalid_name' and curr_cim_rev >= libvirt_err_changes: + expr_values['desc'] = "Referenced domain `invalid_name' \ +does not exist: Domain not found" + try: inst = CIM_CimtestClass(options.ip, ref) From yunguol at cn.ibm.com Thu Mar 5 09:30:42 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 05 Mar 2009 01:30:42 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]Fix ElementConforms/04_ectp_rev_errs.py err message Message-ID: <9b27878b650523b6353d.1236245442@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236245435 28800 # Node ID 9b27878b650523b6353ddb2ffca93ad8158b7bbc # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST]Fix ElementConforms/04_ectp_rev_errs.py err message Updates tc err message to meet the provder updates Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r 9b27878b6505 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Mar 05 01:30:35 2009 -0800 @@ -89,7 +89,7 @@ from XenKvmLib.test_doms import destroy_and_undefine_all from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -169,8 +169,12 @@ retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], options.virt) if retval != PASS: status = retval + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + for i in range(len(tc_scen)): + if i == 3 and curr_cim_rev >= 817: + cs_values[tc_scen[i]]['desc'] = "Referenced domain `INVALID_Name_Keyvalue' \ +does not exist: Domain not found" - for i in range(len(tc_scen)): retval = try_invalid_assoc(cs, comp_name_val, i, tc_scen[i], options.virt) if retval != PASS: status = retval From yunguol at cn.ibm.com Thu Mar 5 09:28:15 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 5 Mar 2009 17:28:15 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-04 17:59:27: > > Libvirt-cim-bounces at redhat.com wrote on 2009-03-04 17:36:04: > > > > > > > Guo Lian Yun wrote: > > > > > > ================================================= > > > Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) > > > with sfcb > > > ================================================= > > > Distro: Fedora release 10 (Cambridge) > > > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > > > libvirt: 0.4.5 > > > Hypervisor: QEMU 0.9.1 > > > CIMOM: sfcb sfcbd 1.3.3preview > > > Libvirt-cim revision: 827 > > > Libvirt-cim changeset: e3dd4cec1b61 > > > Cimtest revision: 639 > > > Cimtest changeset: b84b3ec0c3d7 > > > ================================================= > > > FAIL : 7 > > > XFAIL : 2 > > > SKIP : 4 > > > PASS : 133 > > > ----------------- > > > Total : 146 > > > ================================================= > > > FAIL Test Summary: > > > ComputerSystem - 42_cs_gi_errs.py: FAIL I've submit a patch with fix. This failure because of the err message updates of libvirt-cim provider. > > > ComputerSystemIndication - 01_created_indication.py: FAIL > > > ElementCapabilities - 03_forward_errs.py: FAIL > > > ElementConforms - 01_forward.py: FAIL > I'm working on this patch. > > > ElementConforms - 04_ectp_rev_errs.py: FAIL Same as above. > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL > This failure because of libvirt bug, I will add a bug number to it. > > I think Some of the failure due to the update of libvirt-cim > provider error message, > I have no time to look into these today. Hopefully, I can fix > most of them by the > end of week. > > > > Did you investigate into these ? > > > > -- > > Thanks and Regards, > > Deepti B. Kalakeri > > IBM Linux Technology Center > > deeptik at linux.vnet.ibm.com > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Mar 5 10:10:33 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 05 Mar 2009 02:10:33 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ElementCapabilities/03_forward_errs.py with provider's updated err message Message-ID: # HG changeset patch # User Guolian Yun # Date 1236247828 28800 # Node ID c28d56459462006dfb3d0be33891ca6bc6015d85 # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST] Fix ElementCapabilities/03_forward_errs.py with provider's updated err message Also fix the line to meet 80 length Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r c28d56459462 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Mar 05 02:10:28 2009 -0800 @@ -27,7 +27,7 @@ from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -42,23 +42,25 @@ status = FAIL rc = -1 names = [] - + ec = get_typed_class(options.virt, "ElementCapabilities") try: - names = conn.AssociatorNames(ref, AssocClass = get_typed_class(options.virt, "ElementCapabilities")) + names = conn.AssociatorNames(ref, AssocClass = ec) rc = 0 except pywbem.CIMError, (rc, desc): if rc == exp_rc and desc.find(exp_desc) >= 0: logger.info("Got expected rc code and error string") status = PASS else: - logger.error("Unexpected rc code %s and description %s\n", rc, desc) + logger.error("Unexpected rc code %s and description %s\n", rc, + desc) except Exception, details: logger.error("Unknown exception happened") logger.error(details) if rc == 0: - logger.error("ElementCapabilities associator should NOT return excepted \ - result with a wrong key name and value of %s input", ref_class) + logger.error("ElementCapabilities associator should NOT return \ + exceptet result with a wrong key name and value \ + of %s input", ref_class) status = FAIL return status @@ -73,7 +75,8 @@ cs = get_typed_class(options.virt, "ComputerSystem") instanceref = CIMInstanceName(hs, - keybindings = {"Name" : "wrong", "CreationClassName" : "wrong"}) + keybindings = {"Name" : "wrong", + "CreationClassName" : "wrong"}) rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) if rc != PASS: @@ -81,8 +84,16 @@ return status instance_cs = CIMInstanceName(cs, - keybindings = {"Name" : "wrong", "CreationClassName" : "Xen_ComputerSystem"}) - rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) + keybindings = {"Name" : "wrong", + "CreationClassName" : "Xen_ComputerSystem"}) + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev >= 815: + cs_exp_desc = "Referenced domain `wrong' does not exist: \ +Domain not found" + try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) + else: + rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) if rc != PASS: status = FAIL return status From deeptik at linux.vnet.ibm.com Thu Mar 5 09:59:59 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 05 Mar 2009 15:29:59 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 XFAIL for the 'VirtualQuantity' verification when the guest is runing In-Reply-To: References: Message-ID: <49AFA29F.3010100@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236230756 28800 > # Node ID d0186caa78d2a8614d6c82b6e4413125b50e4953 > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > [TEST] #3 XFAIL for the 'VirtualQuantity' verification when the guest is runing > > > Updates from 2 to 3: > Break out of the loop when I detect the XFAIL for the first time itself > > Updates from 1 to 2: > This issue only hit for KVM, check for the virt type before determining what return. > > > Tested for KVM with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r c6f7256013b9 -r d0186caa78d2 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Mar 03 08:47:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Wed Mar 04 21:25:56 2009 -0800 > @@ -42,9 +42,10 @@ > from XenKvmLib.classes import get_typed_class, inst_to_mof > from CimTest.Globals import logger > from XenKvmLib.const import do_main > -from CimTest.ReturnCodes import FAIL, PASS > +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC > from XenKvmLib.rasd import get_default_rasds > > +libvirt_bug = '00013' > sup_types = ['Xen', 'XenFV', 'KVM'] > test_dom = 'procrasd_persist_dom' > > @@ -76,7 +77,7 @@ > > return PASS > > -def check_proc_sched(server, cn_name): > +def check_proc_sched(server, virt, cn_name): > try: > proc_rasd = None > rasds = EnumInstances(server, cn_name, ret_cim_inst=True) > @@ -89,10 +90,12 @@ > logger.error("Did not find test RASD on server") > return FAIL > > - if proc_rasd["VirtualQuantity"] != nvcpu: > + if proc_rasd["VirtualQuantity"] != nvcpu and virt != "KVM": > logger.error("VirtualQuantity is %i, expected %i", > proc_rasd["VirtualQuantity"], nvcpu) > return FAIL > + elif proc_rasd["VirtualQuantity"] != nvcpu and virt == "KVM": > + return XFAIL_RC(libvirt_bug) > > if proc_rasd["Limit"] != limit: > logger.error("Limit is %i, expected %i", > @@ -126,7 +129,7 @@ > return status > > dom_define = True > - status = check_proc_sched(server, prasd_cn) > + status = check_proc_sched(server, virt, prasd_cn) > if status != PASS: > raise Exception("CPU scheduling not set properly for " > " defined dom: %s" % test_dom) > @@ -136,10 +139,12 @@ > raise Exception("Unable to start %s " % test_dom) > > dom_start = True > - status = check_proc_sched(server, prasd_cn) > - if status != PASS: > + status = check_proc_sched(server, virt, prasd_cn) > + if status == FAIL and virt != 'KVM': > raise Exception("CPU scheduling not set properly for the dom: " > "%s" % test_dom) > + elif status == XFAIL_RC(libvirt_bug) and virt == 'KVM': > You dont have to call the XFAIL_RC() once again. This will print the bug no twice which is not incorrect but this is not useful and required. You can instead verify the status != PASS here. > + break > > cxml.cim_destroy(server) > dom_start = False > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Mar 5 10:05:48 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 05 Mar 2009 15:35:48 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ComputerSystem/42_cs_gi_errs.py err desc for invalid name In-Reply-To: <73de8db2379fc26d7a06.1236243711@elm3b197.beaverton.ibm.com> References: <73de8db2379fc26d7a06.1236243711@elm3b197.beaverton.ibm.com> Message-ID: <49AFA3FC.1080008@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Mar 5 10:21:01 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 05 Mar 2009 15:51:01 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]Fix ElementConforms/04_ectp_rev_errs.py err message In-Reply-To: <9b27878b650523b6353d.1236245442@elm3b197.beaverton.ibm.com> References: <9b27878b650523b6353d.1236245442@elm3b197.beaverton.ibm.com> Message-ID: <49AFA78D.7020005@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236245435 28800 > # Node ID 9b27878b650523b6353ddb2ffca93ad8158b7bbc > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > [TEST]Fix ElementConforms/04_ectp_rev_errs.py err message > > > Updates tc err message to meet the provder updates > > Tested for KVM/LXC with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r c6f7256013b9 -r 9b27878b6505 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Tue Mar 03 08:47:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Mar 05 01:30:35 2009 -0800 > @@ -89,7 +89,7 @@ > from XenKvmLib.test_doms import destroy_and_undefine_all > from CimTest.ReturnCodes import PASS, FAIL > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > @@ -169,8 +169,12 @@ > retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], options.virt) > if retval != PASS: > status = retval > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + for i in range(len(tc_scen)): > + if i == 3 and curr_cim_rev >= 817: > I think the revision in which the changes went in was 815 and not 817. Also, can you please assign the revision value to a variable instead of directly using it for the comparison. > + cs_values[tc_scen[i]]['desc'] = "Referenced domain `INVALID_Name_Keyvalue' \ > +does not exist: Domain not found" > > - for i in range(len(tc_scen)): > retval = try_invalid_assoc(cs, comp_name_val, i, tc_scen[i], options.virt) > if retval != PASS: > status = retval > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Mar 5 10:32:37 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 05 Mar 2009 16:02:37 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: References: Message-ID: <49AFAA45.6050706@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236247828 28800 > # Node ID c28d56459462006dfb3d0be33891ca6bc6015d85 > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > [TEST] Fix ElementCapabilities/03_forward_errs.py with provider's updated err message > > > Also fix the line to meet 80 length > > Tested for KVM/LXC with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r c6f7256013b9 -r c28d56459462 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Tue Mar 03 08:47:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Mar 05 02:10:28 2009 -0800 > @@ -27,7 +27,7 @@ > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > @@ -42,23 +42,25 @@ > status = FAIL > rc = -1 > names = [] > - > + ec = get_typed_class(options.virt, "ElementCapabilities") > try: > - names = conn.AssociatorNames(ref, AssocClass = get_typed_class(options.virt, "ElementCapabilities")) > + names = conn.AssociatorNames(ref, AssocClass = ec) > rc = 0 > except pywbem.CIMError, (rc, desc): > if rc == exp_rc and desc.find(exp_desc) >= 0: > logger.info("Got expected rc code and error string") > status = PASS > else: > - logger.error("Unexpected rc code %s and description %s\n", rc, desc) > + logger.error("Unexpected rc code %s and description %s\n", rc, > + desc) > except Exception, details: > logger.error("Unknown exception happened") > logger.error(details) > > if rc == 0: > - logger.error("ElementCapabilities associator should NOT return excepted \ > - result with a wrong key name and value of %s input", ref_class) > + logger.error("ElementCapabilities associator should NOT return \ > + exceptet result with a wrong key name and value \ > "exceptet" should be "excepted". Instead you can make the above message as "ElementCapabilities associator should NOT return records with a wrong key name and value" > + of %s input", ref_class) > status = FAIL > > return status > @@ -73,7 +75,8 @@ > cs = get_typed_class(options.virt, "ComputerSystem") > > instanceref = CIMInstanceName(hs, > - keybindings = {"Name" : "wrong", "CreationClassName" : "wrong"}) > + keybindings = {"Name" : "wrong", > + "CreationClassName" : "wrong"}) > rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) > > if rc != PASS: > @@ -81,8 +84,16 @@ > return status > > instance_cs = CIMInstanceName(cs, > - keybindings = {"Name" : "wrong", "CreationClassName" : "Xen_ComputerSystem"}) > - rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > + keybindings = {"Name" : "wrong", > + "CreationClassName" : "Xen_ComputerSystem"}) > + > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if curr_cim_rev >= 815: > + cs_exp_desc = "Referenced domain `wrong' does not exist: \ > +Domain not found" > Please use a variable to assign revision value to be calculated for comparison. It helps in code maintenance. > + try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) > + else: > + rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > if rc != PASS: > status = FAIL > return status > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Thu Mar 5 17:35:35 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Thu, 05 Mar 2009 14:35:35 -0300 Subject: [Libvirt-cim] [PATCH] If the resource type of a devices is set to UNKNOWN, do not generate XML for it In-Reply-To: References: Message-ID: <49B00D67.6070005@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1236200658 28800 > # Node ID ad367dfd38f4a78eeaf5369bb00d22bbf6aec911 > # Parent e3dd4cec1b61373e738fe3ba58557ae543b41789 > If the resource type of a devices is set to UNKNOWN, do not generate XML for it > > xmlgen was recently refactored, so this adds back in behavior that was missed > during the refactor. If the resource type of a device is CIM_RES_TYPE_UNKNOWN, > then the xml generation for that device should be skipped. > > The RemoveResources() call sets a device's type to UNKNOWN to indicate that > the device should be marked for removal. > > Signed-off-by: Kaitlin Rupert > > diff -r e3dd4cec1b61 -r ad367dfd38f4 libxkutil/xmlgen.c > --- a/libxkutil/xmlgen.c Tue Mar 03 10:04:00 2009 -0700 > +++ b/libxkutil/xmlgen.c Wed Mar 04 13:04:18 2009 -0800 > @@ -128,6 +128,10 @@ > const char *msg = NULL;; > > for (i = 0; (i < dominfo->dev_disk_ct) && (msg == NULL); i++) { > + struct virt_device *dev = &dominfo->dev_disk[i]; > + if (dev->type == CIM_RES_TYPE_UNKNOWN) > + continue; > + > struct disk_device *disk = &dominfo->dev_disk[i].dev.disk; > CU_DEBUG("Disk: %i %s %s", > disk->disk_type, > @@ -229,6 +233,9 @@ > > for (i = 0; (i < dominfo->dev_net_ct) && (msg == NULL); i++) { > struct virt_device *dev = &dominfo->dev_net[i]; > + if (dev->type == CIM_RES_TYPE_UNKNOWN) > + continue; > + > struct net_device *net = &dev->dev.net; > > if (STREQ(dev->dev.net.type, "network")) > @@ -331,6 +338,9 @@ > for (i = 0; i < dominfo->dev_graphics_ct; i++) { > xmlNodePtr tmp; > struct virt_device *_dev = &dominfo->dev_graphics[i]; > + if (_dev->type == CIM_RES_TYPE_UNKNOWN) > + continue; > + > struct graphics_device *dev = &_dev->dev.graphics; > > tmp = xmlNewChild(root, NULL, BAD_CAST "graphics", NULL); > @@ -353,6 +363,9 @@ > for (i = 0; i < dominfo->dev_input_ct; i++) { > xmlNodePtr tmp; > struct virt_device *_dev = &dominfo->dev_input[i]; > + if (_dev->type == CIM_RES_TYPE_UNKNOWN) > + continue; > + > struct input_device *dev = &_dev->dev.input; > > tmp = xmlNewChild(root, NULL, BAD_CAST "input", NULL); > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Thu Mar 5 17:35:49 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Thu, 05 Mar 2009 14:35:49 -0300 Subject: [Libvirt-cim] [PATCH] Set device type to UNKNOWN after dynamic resource delete is called In-Reply-To: <1aff0d0e9bf49e738827.1236212988@localhost.localdomain> References: <1aff0d0e9bf49e738827.1236212988@localhost.localdomain> Message-ID: <49B00D75.5070404@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1236209133 28800 > # Node ID 1aff0d0e9bf49e738827b7157c0df407b814ae7d > # Parent ad367dfd38f4a78eeaf5369bb00d22bbf6aec911 > Set device type to UNKNOWN after dynamic resource delete is called. > > If this is done before, then the call to detach_device() always fails. The > proper device type is needed by the device_to_xml() call to generate the > XML needed for the virDomainDetachDevice() call. > > Signed-off-by: Kaitlin Rupert > > diff -r ad367dfd38f4 -r 1aff0d0e9bf4 src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Wed Mar 04 13:04:18 2009 -0800 > +++ b/src/Virt_VirtualSystemManagementService.c Wed Mar 04 15:25:33 2009 -0800 > @@ -1551,8 +1551,6 @@ > struct virt_device *dev = &list[i]; > > if (STREQ(dev->id, devid)) { > - dev->type = CIM_RES_TYPE_UNKNOWN; > - > if ((type == CIM_RES_TYPE_GRAPHICS) || > (type == CIM_RES_TYPE_INPUT)) > cu_statusf(_BROKER, &s, CMPI_RC_OK, ""); > @@ -1562,6 +1560,9 @@ > RESOURCE_DEL, > CLASSNAME(op)); > } > + > + dev->type = CIM_RES_TYPE_UNKNOWN; > + > break; > } > } > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 5 19:04:37 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 05 Mar 2009 11:04:37 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: <8d5f30111ac7e1be2eda.1236220849@elm3b197.beaverton.ibm.com> References: <8d5f30111ac7e1be2eda.1236220849@elm3b197.beaverton.ibm.com> Message-ID: <49B02245.1050201@linux.vnet.ibm.com> > @@ -136,6 +136,11 @@ > if profile.InstanceID not in unsupp_prof: > profiles_instid_list.append(profile.InstanceID) > > + for prof_id in profiles_instid_list: > + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c" and\ > + 796 <= curr_cim_rev < 818: Can you define variables for the changeset values and place them at the top of the test case? That helps make it clear that the test case has been branched. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 5 19:15:16 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 05 Mar 2009 11:15:16 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix ComputerSystem/42_cs_gi_errs.py err desc for invalid name In-Reply-To: <73de8db2379fc26d7a06.1236243711@elm3b197.beaverton.ibm.com> References: <73de8db2379fc26d7a06.1236243711@elm3b197.beaverton.ibm.com> Message-ID: <49B024C4.8040300@linux.vnet.ibm.com> > @@ -115,6 +116,11 @@ > > ref = CIMInstanceName(cn, keybindings=keys) > > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if tc == 'invalid_name' and curr_cim_rev >= libvirt_err_changes: > + expr_values['desc'] = "Referenced domain `invalid_name' \ > +does not exist: Domain not found" > + Can you use something like the following instead: expr_values['desc'] = "Referenced domain `invalid_name'" + \ " does not exist: Domain not found" This is much cleaner since it doesn't span 80 characters. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 5 19:18:42 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 05 Mar 2009 11:18:42 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]Fix ElementConforms/04_ectp_rev_errs.py err message In-Reply-To: <9b27878b650523b6353d.1236245442@elm3b197.beaverton.ibm.com> References: <9b27878b650523b6353d.1236245442@elm3b197.beaverton.ibm.com> Message-ID: <49B02592.9030908@linux.vnet.ibm.com> > @@ -169,8 +169,12 @@ > retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], options.virt) > if retval != PASS: > status = retval > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + for i in range(len(tc_scen)): > + if i == 3 and curr_cim_rev >= 817: Also, can you use a variable for the changeset revision number? > + cs_values[tc_scen[i]]['desc'] = "Referenced domain `INVALID_Name_Keyvalue' \ > +does not exist: Domain not found" cs_values[tc_scen[i]]['desc'] = "Referenced domain" + \ " `INVALID_Name_Keyvalue' does" + \ " not exist: Domain not found" -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Fri Mar 6 03:02:20 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 05 Mar 2009 19:02:20 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ComputerSystem/42_cs_gi_errs.py err desc for invalid name Message-ID: <16a306969b173259c9df.1236308540@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236308534 28800 # Node ID 16a306969b173259c9dfd1ae099dc1aabd3d3f96 # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST] #2 Fix ComputerSystem/42_cs_gi_errs.py err desc for invalid name Updates from 1 to 2: Make err desc more clearly and limit to 80 characters Updates tc to meet the provder updates Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r 16a306969b17 suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/42_cs_gi_errs.py Thu Mar 05 19:02:14 2009 -0800 @@ -50,10 +50,11 @@ from CimTest.Globals import logger from XenKvmLib import vxml from XenKvmLib.classes import get_typed_class -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from XenKvmLib.enumclass import GetInstance, CIM_CimtestClass, EnumInstances sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] +libvirt_err_changes = 821 expected_values = { "invalid_name" : {'rc' : CIM_ERR_NOT_FOUND, @@ -115,6 +116,11 @@ ref = CIMInstanceName(cn, keybindings=keys) + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if tc == 'invalid_name' and curr_cim_rev >= libvirt_err_changes: + expr_values['desc'] = "Referenced domain `invalid_name'" + \ + " does not exist: Domain not found" + try: inst = CIM_CimtestClass(options.ip, ref) From yunguol at cn.ibm.com Fri Mar 6 03:17:36 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 05 Mar 2009 19:17:36 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message Message-ID: <7e6e1318706b1b4e6b39.1236309456@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236309447 28800 # Node ID 7e6e1318706b1b4e6b39d703b663c70a0972b778 # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST]#2 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message Updates form 1 to 2: Use a variable to assign revision value to be calculated for comparison Also fix the line to meet 80 length Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r 7e6e1318706b suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Mar 05 19:17:27 2009 -0800 @@ -27,10 +27,11 @@ from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +libvirt_ec_changes = 815 exp_rc = 6 #CIM_ERR_NOT_FOUND exp_desc = "No such instance" @@ -42,23 +43,24 @@ status = FAIL rc = -1 names = [] - + ec = get_typed_class(options.virt, "ElementCapabilities") try: - names = conn.AssociatorNames(ref, AssocClass = get_typed_class(options.virt, "ElementCapabilities")) + names = conn.AssociatorNames(ref, AssocClass = ec) rc = 0 except pywbem.CIMError, (rc, desc): if rc == exp_rc and desc.find(exp_desc) >= 0: logger.info("Got expected rc code and error string") status = PASS else: - logger.error("Unexpected rc code %s and description %s\n", rc, desc) + logger.error("Unexpected rc code %s and description %s\n", rc, + desc) except Exception, details: logger.error("Unknown exception happened") logger.error(details) if rc == 0: - logger.error("ElementCapabilities associator should NOT return excepted \ - result with a wrong key name and value of %s input", ref_class) + logger.error("ElementCapabilities associator should NOT" + \ + " return records with a wrong key name and value") status = FAIL return status @@ -73,7 +75,8 @@ cs = get_typed_class(options.virt, "ComputerSystem") instanceref = CIMInstanceName(hs, - keybindings = {"Name" : "wrong", "CreationClassName" : "wrong"}) + keybindings = {"Name" : "wrong", + "CreationClassName" : "wrong"}) rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) if rc != PASS: @@ -81,8 +84,16 @@ return status instance_cs = CIMInstanceName(cs, - keybindings = {"Name" : "wrong", "CreationClassName" : "Xen_ComputerSystem"}) - rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) + keybindings = {"Name" : "wrong", + "CreationClassName" : "Xen_ComputerSystem"}) + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev >= libvirt_ec_changes: + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ + " Domain not found" + try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) + else: + rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) if rc != PASS: status = FAIL return status From yunguol at cn.ibm.com Fri Mar 6 05:40:55 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 05 Mar 2009 21:40:55 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ElementConforms/04_ectp_rev_errs.py err message Message-ID: <21a55f9af9b93335a594.1236318055@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236318048 28800 # Node ID 21a55f9af9b93335a5943de71bc3e0643e1f66be # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST] #2 Fix ElementConforms/04_ectp_rev_errs.py err message Updates form 1 to 2: 1) Change the revision changeset number to 815 instead of 817 2) Assign the revision value to a variable instead of directly using it for the comparison Updates tc err message to meet the provder updates Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r 21a55f9af9b9 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Mar 05 21:40:48 2009 -0800 @@ -89,10 +89,10 @@ from XenKvmLib.test_doms import destroy_and_undefine_all from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] - +libvrit_eleconform_changes = 815 test_dom = "domU" cs_values = { @@ -165,7 +165,12 @@ 'INVALID_Name_Keyvalue' ] + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) for i in range(len(tc_scen)): + if i == 3 and curr_cim_rev >= libvrit_eleconform_changes: + desc = "Referenced domain `INVALID_Name_Keyvalue'" + \ + " does not exist: Domain not found" + cs_values[tc_scen[i]]['desc'] = desc retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], options.virt) if retval != PASS: status = retval From deeptik at linux.vnet.ibm.com Fri Mar 6 05:28:40 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 06 Mar 2009 10:58:40 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ComputerSystem/42_cs_gi_errs.py err desc for invalid name In-Reply-To: <16a306969b173259c9df.1236308540@elm3b197.beaverton.ibm.com> References: <16a306969b173259c9df.1236308540@elm3b197.beaverton.ibm.com> Message-ID: <49B0B488.2060201@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Fri Mar 6 06:04:46 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 05 Mar 2009 22:04:46 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #4 XFAIL for the 'VirtualQuantity' verification when the guest is runing Message-ID: # HG changeset patch # User Guolian Yun # Date 1236319479 28800 # Node ID ccc6d44875c2e2a961074b92a5165188179481db # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST] #4 XFAIL for the 'VirtualQuantity' verification when the guest is runing Updates from 3 to 4: Change if statement for KVM Updates from 2 to 3: Break out of the loop when I detect the XFAIL for the first time itself Updates from 1 to 2: This issue only hit for KVM, check for the virt type before determining what return. Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r ccc6d44875c2 suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/09_procrasd_persist.py Thu Mar 05 22:04:39 2009 -0800 @@ -42,9 +42,10 @@ from XenKvmLib.classes import get_typed_class, inst_to_mof from CimTest.Globals import logger from XenKvmLib.const import do_main -from CimTest.ReturnCodes import FAIL, PASS +from CimTest.ReturnCodes import FAIL, PASS, XFAIL_RC from XenKvmLib.rasd import get_default_rasds +libvirt_bug = '00013' sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = 'procrasd_persist_dom' @@ -76,7 +77,7 @@ return PASS -def check_proc_sched(server, cn_name): +def check_proc_sched(server, virt, cn_name): try: proc_rasd = None rasds = EnumInstances(server, cn_name, ret_cim_inst=True) @@ -89,10 +90,12 @@ logger.error("Did not find test RASD on server") return FAIL - if proc_rasd["VirtualQuantity"] != nvcpu: + if proc_rasd["VirtualQuantity"] != nvcpu and virt != 'KVM': logger.error("VirtualQuantity is %i, expected %i", proc_rasd["VirtualQuantity"], nvcpu) return FAIL + elif proc_rasd["VirtualQuantity"] != nvcpu and virt == "KVM": + return XFAIL_RC(libvirt_bug) if proc_rasd["Limit"] != limit: logger.error("Limit is %i, expected %i", @@ -126,7 +129,7 @@ return status dom_define = True - status = check_proc_sched(server, prasd_cn) + status = check_proc_sched(server, virt, prasd_cn) if status != PASS: raise Exception("CPU scheduling not set properly for " " defined dom: %s" % test_dom) @@ -136,10 +139,12 @@ raise Exception("Unable to start %s " % test_dom) dom_start = True - status = check_proc_sched(server, prasd_cn) - if status != PASS: + status = check_proc_sched(server, virt, prasd_cn) + if status != PASS and virt != 'KVM': raise Exception("CPU scheduling not set properly for the dom: " "%s" % test_dom) + elif status != PASS and virt == 'KVM': + break cxml.cim_destroy(server) dom_start = False @@ -156,7 +161,7 @@ if dom_define == True: cxml.undefine(server) - + return status if __name__ == "__main__": From yunguol at cn.ibm.com Fri Mar 6 06:17:35 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 05 Mar 2009 22:17:35 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association Message-ID: # HG changeset patch # User Guolian Yun # Date 1236320248 28800 # Node ID b213dddc93404028075f10d7355c468ec8230274 # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association Updates from 3 to 4: Use a variable to assign revision value to be calculated for comparison Updates from 2 to 3: Add changeset instead of skip the verification of KVM_ResourceAllocation to ECTP for all the src versions Tested for KVM/LXC with current sources and rpm on Pegasus Signed-off-by: Guolian Yun diff -r c6f7256013b9 -r b213dddc9340 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Mar 03 08:47:40 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Mar 05 22:17:28 2009 -0800 @@ -53,7 +53,9 @@ test_dom = "domU" bug_sblim = '00007' libvirt_cim_ectp_changes = 686 -libvirt_cim_input_graphics_ectp = 773 +libvirt_cim_input_graphics_ectp = 773 +libvirt_cim_ac_lower = 796 +libvirt_cim_ac_upper = 818 def init_managed_ele_values(server, virt): verify_ectp_list = {} @@ -63,7 +65,7 @@ curr_cim_rev, changeset = get_provider_version(virt, server) if curr_cim_rev >= libvirt_cim_ectp_changes: cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", - "ProcessorPool", "MemoryPool"] + "ProcessorPool", "MemoryPool", "AllocationCapabilities"] cn_names.extend(cn_names2) if curr_cim_rev >= libvirt_cim_input_graphics_ectp: cn_names.append("ConsoleRedirectionService") @@ -136,6 +138,11 @@ if profile.InstanceID not in unsupp_prof: profiles_instid_list.append(profile.InstanceID) + for prof_id in profiles_instid_list: + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c" and\ + libvirt_cim_ac_lower <= curr_cim_rev < libvirt_cim_ac_upper: + profiles_instid_list.remove(prof_id) + return status, profiles_instid_list @do_main(sup_types) From yunguol at cn.ibm.com Fri Mar 6 06:19:45 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 6 Mar 2009 14:19:45 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-05 17:28:15: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-04 17:59:27: > > > > > Libvirt-cim-bounces at redhat.com wrote on 2009-03-04 17:36:04: > > > > > > > > > > > Guo Lian Yun wrote: > > > > > > > > ================================================= > > > > Test Run Summary (Mar 04 2009): KVM on Fedora release 10 (Cambridge) > > > > with sfcb > > > > ================================================= > > > > Distro: Fedora release 10 (Cambridge) > > > > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > > > > libvirt: 0.4.5 > > > > Hypervisor: QEMU 0.9.1 > > > > CIMOM: sfcb sfcbd 1.3.3preview > > > > Libvirt-cim revision: 827 > > > > Libvirt-cim changeset: e3dd4cec1b61 > > > > Cimtest revision: 639 > > > > Cimtest changeset: b84b3ec0c3d7 > > > > ================================================= > > > > FAIL : 7 > > > > XFAIL : 2 > > > > SKIP : 4 > > > > PASS : 133 > > > > ----------------- > > > > Total : 146 > > > > ================================================= > > > > FAIL Test Summary: > > > > ComputerSystem - 42_cs_gi_errs.py: FAIL > I've submit a patch with fix. This failure because of the err > message updates of libvirt-cim provider. > > > > > ComputerSystemIndication - 01_created_indication.py: FAIL > > > > ElementCapabilities - 03_forward_errs.py:FAIL > > > > ElementConforms - 01_forward.py: FAIL > > I'm working on this patch. > > > > ElementConforms - 04_ectp_rev_errs.py: FAIL > Same as above. > > > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL It seems that it's a failure of invoking method VSMS.DestroySystem() with a null vs name or nonexistent guest. I'm looking into the provider changeset of 821 revision and investigating into it. > > > > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL > > This failure because of libvirt bug, I will add a bug number to it. > > > > I think Some of the failure due to the update of libvirt-cim > > provider error message, > > I have no time to look into these today. Hopefully, I can fix > > most of them by the > > end of week. > > > > > > > Did you investigate into these ? > > > > > > -- > > > Thanks and Regards, > > > Deepti B. Kalakeri > > > IBM Linux Technology Center > > > deeptik at linux.vnet.ibm.com > > > > > > _______________________________________________ > > > Libvirt-cim mailing list > > > Libvirt-cim at redhat.com > > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Fri Mar 6 06:49:18 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 06 Mar 2009 12:19:18 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ElementConforms/04_ectp_rev_errs.py err message In-Reply-To: <21a55f9af9b93335a594.1236318055@elm3b197.beaverton.ibm.com> References: <21a55f9af9b93335a594.1236318055@elm3b197.beaverton.ibm.com> Message-ID: <49B0C76E.3040001@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236318048 28800 > # Node ID 21a55f9af9b93335a5943de71bc3e0643e1f66be > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > [TEST] #2 Fix ElementConforms/04_ectp_rev_errs.py err message > > > Updates form 1 to 2: > 1) Change the revision changeset number to 815 instead of 817 > 2) Assign the revision value to a variable instead of directly using it for the comparison > > Updates tc err message to meet the provder updates > > Tested for KVM/LXC with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r c6f7256013b9 -r 21a55f9af9b9 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Tue Mar 03 08:47:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Mar 05 21:40:48 2009 -0800 > @@ -89,10 +89,10 @@ > from XenKvmLib.test_doms import destroy_and_undefine_all > from CimTest.ReturnCodes import PASS, FAIL > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > - > +libvrit_eleconform_changes = 815 > test_dom = "domU" > > cs_values = { > @@ -165,7 +165,12 @@ > 'INVALID_Name_Keyvalue' > ] > > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > for i in range(len(tc_scen)): > + if i == 3 and curr_cim_rev >= libvrit_eleconform_changes: > Instead of checking the index can you check the tc_scen being executed to make a decision. Like that if in future the tc_scen[] changes we dont have to make these changes. There are lot of places which do not adhere to the 80 column can you please modify them as well. Also, kindly remove the \ which are not needed in the tc. import statements for utils, destroy_and_undefine_all not used please remove them as well. Do we really require to use full_hostname() function anymore ? > + desc = "Referenced domain `INVALID_Name_Keyvalue'" + \ > + " does not exist: Domain not found" > + cs_values[tc_scen[i]]['desc'] = desc > retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], options.virt) > if retval != PASS: > status = retval > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Mar 6 07:21:46 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 06 Mar 2009 12:51:46 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: <7e6e1318706b1b4e6b39.1236309456@elm3b197.beaverton.ibm.com> References: <7e6e1318706b1b4e6b39.1236309456@elm3b197.beaverton.ibm.com> Message-ID: <49B0CF0A.3040500@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236309447 28800 > # Node ID 7e6e1318706b1b4e6b39d703b663c70a0972b778 > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > [TEST]#2 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message > > > Updates form 1 to 2: > Use a variable to assign revision value to be calculated for comparison > > Also fix the line to meet 80 length > > Tested for KVM/LXC with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r c6f7256013b9 -r 7e6e1318706b suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Tue Mar 03 08:47:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Mar 05 19:17:27 2009 -0800 > @@ -27,10 +27,11 @@ > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > +libvirt_ec_changes = 815 > > exp_rc = 6 #CIM_ERR_NOT_FOUND > exp_desc = "No such instance" > @@ -42,23 +43,24 @@ > status = FAIL > rc = -1 > names = [] > - > + ec = get_typed_class(options.virt, "ElementCapabilities") > try: > - names = conn.AssociatorNames(ref, AssocClass = get_typed_class(options.virt, "ElementCapabilities")) > + names = conn.AssociatorNames(ref, AssocClass = ec) > rc = 0 > except pywbem.CIMError, (rc, desc): > if rc == exp_rc and desc.find(exp_desc) >= 0: > logger.info("Got expected rc code and error string") > status = PASS > else: > - logger.error("Unexpected rc code %s and description %s\n", rc, desc) > + logger.error("Unexpected rc code %s and description %s\n", rc, > + desc) > except Exception, details: > logger.error("Unknown exception happened") > logger.error(details) > > if rc == 0: > - logger.error("ElementCapabilities associator should NOT return excepted \ > - result with a wrong key name and value of %s input", ref_class) > + logger.error("ElementCapabilities associator should NOT" + \ > + " return records with a wrong key name and value") > You don't need a + sign here. \ will do. > status = FAIL > > return status > @@ -73,7 +75,8 @@ > cs = get_typed_class(options.virt, "ComputerSystem") > > instanceref = CIMInstanceName(hs, > - keybindings = {"Name" : "wrong", "CreationClassName" : "wrong"}) > + keybindings = {"Name" : "wrong", > + "CreationClassName" : "wrong"}) > rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) > > if rc != PASS: > @@ -81,8 +84,16 @@ > return status > > instance_cs = CIMInstanceName(cs, > - keybindings = {"Name" : "wrong", "CreationClassName" : "Xen_ComputerSystem"}) > - rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > + keybindings = {"Name" : "wrong", > + "CreationClassName" : "Xen_ComputerSystem"}) > We should not hardcode CreationClassName to Xen_ComputerSystem. > + > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if curr_cim_rev >= libvirt_ec_changes: > + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ > + " Domain not found" > you dont need a + sign here. \ will work. > + try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) > Can you check if you can use common_util.try_assoc() instead of writing the try_assoc() function freshly here in the tc ? > + else: > + rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > if rc != PASS: > status = FAIL > return status > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Mar 6 09:21:14 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 06 Mar 2009 14:51:14 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #4 XFAIL for the 'VirtualQuantity' verification when the guest is runing In-Reply-To: References: Message-ID: <49B0EB0A.6040807@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Fri Mar 6 09:28:40 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 6 Mar 2009 17:28:40 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix ElementConforms/04_ectp_rev_errs.py err message In-Reply-To: <49B0C76E.3040001@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-06 14:49:18: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1236318048 28800 > > # Node ID 21a55f9af9b93335a5943de71bc3e0643e1f66be > > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > > [TEST] #2 Fix ElementConforms/04_ectp_rev_errs.py err message > > > > > > Updates form 1 to 2: > > 1) Change the revision changeset number to 815 instead of 817 > > 2) Assign the revision value to a variable instead of directly > using it for the comparison > > > > Updates tc err message to meet the provder updates > > > > Tested for KVM/LXC with current sources and rpm > > > > Signed-off-by: Guolian Yun > > > > diff -r c6f7256013b9 -r 21a55f9af9b9 suites/libvirt- > cim/cimtest/ElementConforms/04_ectp_rev_errs.py > > --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs. > py Tue Mar 03 08:47:40 2009 -0800 > > +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs. > py Thu Mar 05 21:40:48 2009 -0800 > > @@ -89,10 +89,10 @@ > > from XenKvmLib.test_doms import destroy_and_undefine_all > > from CimTest.ReturnCodes import PASS, FAIL > > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > > -from XenKvmLib.const import do_main > > +from XenKvmLib.const import do_main, get_provider_version > > > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > - > > +libvrit_eleconform_changes = 815 > > test_dom = "domU" > > > > cs_values = { > > @@ -165,7 +165,12 @@ > > 'INVALID_Name_Keyvalue' > > ] > > > > + curr_cim_rev, changeset = get_provider_version(options.virt, > options.ip) > > for i in range(len(tc_scen)): > > + if i == 3 and curr_cim_rev >= libvrit_eleconform_changes: > > > Instead of checking the index can you check the tc_scen being executed > to make a decision. > Like that if in future the tc_scen[] changes we dont have to make these > changes. > There are lot of places which do not adhere to the 80 column can you > please modify them as well. > Also, kindly remove the \ which are not needed in the tc. > import statements for utils, destroy_and_undefine_all not used please > remove them as well. > Do we really require to use full_hostname() function anymore ? The association query doesn't work for me with part of hostname. Otherwise look fine to me. I will send a new patch. Thanks! > > + desc = "Referenced domain `INVALID_Name_Keyvalue'" + \ > > + " does not exist: Domain not found" > > + cs_values[tc_scen[i]]['desc'] = desc > > retval = try_invalid_assoc(hs, host_name_val, i, > tc_scen[i], options.virt) > > if retval != PASS: > > status = retval > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > -- > Thanks and Regards, > Deepti B. Kalakeri > IBM Linux Technology Center > deeptik at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Fri Mar 6 21:42:43 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 06 Mar 2009 13:42:43 -0800 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: <49B0CF0A.3040500@linux.vnet.ibm.com> References: <7e6e1318706b1b4e6b39.1236309456@elm3b197.beaverton.ibm.com> <49B0CF0A.3040500@linux.vnet.ibm.com> Message-ID: <49B198D3.9030404@linux.vnet.ibm.com> > We should not hardcode CreationClassName to Xen_ComputerSystem. >> + >> + curr_cim_rev, changeset = get_provider_version(options.virt, >> options.ip) >> + if curr_cim_rev >= libvirt_ec_changes: >> + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ >> + " Domain not found" >> > you dont need a + sign here. \ will work. This is not true in this case. You'll get the following error: ElementCapabilities/ - 03_forward_errs.py: FAIL File "03_forward_errs.py", line 92 cs_exp_desc = "Referenced domain `wrong' does not exist:" + ^ SyntaxError: invalid syntax The slash is needed here. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Mon Mar 9 01:45:08 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 9 Mar 2009 09:45:08 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with sfcb Message-ID: ================================================= Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with sfcb ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 829 Libvirt-cim changeset: 1aff0d0e9bf4 Cimtest revision: 642 Cimtest changeset: 087aaba26589 ================================================= FAIL : 4 XFAIL : 3 SKIP : 5 PASS : 134 ----------------- Total : 146 ================================================= FAIL Test Summary: ElementCapabilities - 03_forward_errs.py: FAIL ElementConforms - 01_forward.py: FAIL ElementConforms - 04_ectp_rev_errs.py: FAIL VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: PASS -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_pause_pause.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_pause_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - Got CIM error 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): 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 State not supported with return code 7 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: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: FAIL ERROR - Unexpected rc code 6 and description Referenced domain `wrong' does not exist: Domain not found -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'KVM_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: FAIL ERROR - Unexpected rc code 6 and description Referenced domain `INVALID_Name_Keyvalue' does not exist: Domain not found ERROR - ------ FAILED: INVALID_Name_Keyvalue------ -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL ERROR - destroy_fail>> noname: Error executing DestroySystem ERROR - (6, u'Unable to retrieve domain name: Error 0') ERROR - destroy_fail>> nonexistent: Error executing DestroySystem ERROR - (6, u"Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found") InvokeMethod(DestroySystem): Unable to retrieve domain name: Error 0 InvokeMethod(DestroySystem): Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: SKIP ERROR - Need to give different bridge name since it already exists -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Mar 9 02:32:34 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 08 Mar 2009 19:32:34 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#3 Fix ElementConforms/04_ectp_rev_errs.py err message Message-ID: <1a18e5b4486835b3ace8.1236565954@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236565948 25200 # Node ID 1a18e5b4486835b3ace888ea68718a7b7832faa8 # Parent 087aaba2658940bbc8718aa55cbcd6150f7cac23 [TEST]#3 Fix ElementConforms/04_ectp_rev_errs.py err message Updates from 2 to 3: 1) Adhere to the 80 column 2) Remove the \ which are not needed in the tc 3) Remove unused import statement Updates from 1 to 2: 1) Change the revision changeset number to 815 instead of 817 2) Assign the revision value to a variable instead of directly using it for the comparison Updates tc err message to meet the provder updates Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r 087aaba26589 -r 1a18e5b44868 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Mar 05 22:04:39 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Sun Mar 08 19:32:28 2009 -0700 @@ -80,33 +80,39 @@ import sys import pywbem -from VirtLib import utils from VirtLib.live import full_hostname from XenKvmLib import assoc from XenKvmLib import vxml from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import try_assoc -from XenKvmLib.test_doms import destroy_and_undefine_all from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] - +libvrit_eleconform_changes = 815 test_dom = "domU" - +invalid_desc = 'No domain name specified' cs_values = { - "INVALID_CCName_Keyname" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ - "INVALID_CCName_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ - "INVALID_Name_Keyname" : { 'rc' : 1 , 'desc' : 'No domain name specified'}, \ - "INVALID_Name_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' } + "INVALID_CCName_Keyname" : { 'rc' : 6 , + 'desc' : 'No such instance' }, + "INVALID_CCName_Keyvalue" : { 'rc' : 6 , + 'desc' : 'No such instance' }, + "INVALID_Name_Keyname" : { 'rc' : 1 , + 'desc' : invalid_desc}, + "INVALID_Name_Keyvalue" : { 'rc' : 6 , + 'desc' : 'No such instance' } } hs_values = { - "INVALID_CCName_Keyname" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ - "INVALID_CCName_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ - "INVALID_Name_Keyname" : { 'rc' : 6 , 'desc' : 'No such instance'}, \ - "INVALID_Name_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' } + "INVALID_CCName_Keyname" : { 'rc' : 6 , + 'desc' : 'No such instance' }, + "INVALID_CCName_Keyvalue" : { 'rc' : 6 , + 'desc' : 'No such instance' }, + "INVALID_Name_Keyname" : { 'rc' : 6 , + 'desc' : 'No such instance'}, + "INVALID_Name_Keyvalue" : { 'rc' : 6 , + 'desc' : 'No such instance' } } def try_invalid_assoc(classname, name_val, i, field, virt="Xen"): @@ -122,8 +128,8 @@ expr_values = hs_values else: expr_values = cs_values - ret_val = try_assoc(conn, classname, ac_classname, keys, field_name=field, \ - expr_values=expr_values[field], bug_no="") + ret_val = try_assoc(conn, classname, ac_classname, keys, field_name=field, + expr_values=expr_values[field], bug_no="") if ret_val != PASS: logger.error("------ FAILED: %s------", field) name_val[i] = temp @@ -137,7 +143,8 @@ status = PASS global conn - conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) + conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, + CIM_PASS), CIM_NS) virt_xml = vxml.get_class(options.virt) cxml = virt_xml(test_dom) ret = cxml.cim_define(options.ip) @@ -149,29 +156,37 @@ cs = get_typed_class(options.virt, "ComputerSystem") host_name = full_hostname(options.ip) host_name_val = [ - 'CreationClassName', hs, \ + 'CreationClassName', hs, 'Name', host_name ] comp_name_val = [ - 'CreationClassName', cs, \ + 'CreationClassName', cs, 'Name', test_dom ] tc_scen = [ - 'INVALID_CCName_Keyname', \ - 'INVALID_CCName_Keyvalue', \ - 'INVALID_Name_Keyname', \ + 'INVALID_CCName_Keyname', + 'INVALID_CCName_Keyvalue', + 'INVALID_Name_Keyname', 'INVALID_Name_Keyvalue' ] + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) for i in range(len(tc_scen)): - retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], options.virt) + if tc_scen[i] == 'INVALID_Name_Keyvalue' and \ + curr_cim_rev >= libvrit_eleconform_changes: + desc = "Referenced domain `INVALID_Name_Keyvalue'" + \ + " does not exist: Domain not found" + cs_values[tc_scen[i]]['desc'] = desc + retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], + options.virt) if retval != PASS: status = retval for i in range(len(tc_scen)): - retval = try_invalid_assoc(cs, comp_name_val, i, tc_scen[i], options.virt) + retval = try_invalid_assoc(cs, comp_name_val, i, tc_scen[i], + options.virt) if retval != PASS: status = retval From yunguol at cn.ibm.com Mon Mar 9 02:18:01 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 9 Mar 2009 10:18:01 +0800 Subject: [Libvirt-cim] [PATCH] [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: Message-ID: Any one review this patch? Thanks! libvirt-cim-bounces at redhat.com wrote on 2009-03-06 14:17:35: > # HG changeset patch > # User Guolian Yun > # Date 1236320248 28800 > # Node ID b213dddc93404028075f10d7355c468ec8230274 > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and > skip KVM_RegisteredProfile association > > > Updates from 3 to 4: > Use a variable to assign revision value to be calculated for comparison > > Updates from 2 to 3: > Add changeset instead of skip the verification of > KVM_ResourceAllocation to ECTP for all the src versions > > Tested for KVM/LXC with current sources and rpm on Pegasus > > Signed-off-by: Guolian Yun > > diff -r c6f7256013b9 -r b213dddc9340 suites/libvirt- > cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue > Mar 03 08:47:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu > Mar 05 22:17:28 2009 -0800 > @@ -53,7 +53,9 @@ > test_dom = "domU" > bug_sblim = '00007' > libvirt_cim_ectp_changes = 686 > -libvirt_cim_input_graphics_ectp = 773 > +libvirt_cim_input_graphics_ectp = 773 > +libvirt_cim_ac_lower = 796 > +libvirt_cim_ac_upper = 818 > > def init_managed_ele_values(server, virt): > verify_ectp_list = {} > @@ -63,7 +65,7 @@ > curr_cim_rev, changeset = get_provider_version(virt, server) > if curr_cim_rev >= libvirt_cim_ectp_changes: > cn_names2 = ["VirtualSystemMigrationService", "DiskPool", > "NetworkPool", > - "ProcessorPool", "MemoryPool"] > + "ProcessorPool", "MemoryPool", "AllocationCapabilities"] > cn_names.extend(cn_names2) > if curr_cim_rev >= libvirt_cim_input_graphics_ectp: > cn_names.append("ConsoleRedirectionService") > @@ -136,6 +138,11 @@ > if profile.InstanceID not in unsupp_prof: > profiles_instid_list.append(profile.InstanceID) > > + for prof_id in profiles_instid_list: > + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c" and\ > + libvirt_cim_ac_lower <= curr_cim_rev < libvirt_cim_ac_upper: > + profiles_instid_list.remove(prof_id) > + > return status, profiles_instid_list > > @do_main(sup_types) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Mar 9 02:58:41 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 08 Mar 2009 19:58:41 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message Message-ID: # HG changeset patch # User Guolian Yun # Date 1236567513 25200 # Node ID e601bc0ba234dae371ec38b8289b5827d12f2910 # Parent 087aaba2658940bbc8718aa55cbcd6150f7cac23 [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message Updates from 2 to 3: Get correct CS Name instead of hard code of "Xen_ComputerSystem" Updates from 1 to 2: Use a variable to assign revision value to be calculated for comparison Also fix the line to meet 80 length Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r 087aaba26589 -r e601bc0ba234 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Mar 05 22:04:39 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Sun Mar 08 19:58:33 2009 -0700 @@ -27,10 +27,11 @@ from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] +libvirt_ec_changes = 815 exp_rc = 6 #CIM_ERR_NOT_FOUND exp_desc = "No such instance" @@ -42,23 +43,24 @@ status = FAIL rc = -1 names = [] - + ec = get_typed_class(options.virt, "ElementCapabilities") try: - names = conn.AssociatorNames(ref, AssocClass = get_typed_class(options.virt, "ElementCapabilities")) + names = conn.AssociatorNames(ref, AssocClass = ec) rc = 0 except pywbem.CIMError, (rc, desc): if rc == exp_rc and desc.find(exp_desc) >= 0: logger.info("Got expected rc code and error string") status = PASS else: - logger.error("Unexpected rc code %s and description %s\n", rc, desc) + logger.error("Unexpected rc code %s and description %s\n", rc, + desc) except Exception, details: logger.error("Unknown exception happened") logger.error(details) if rc == 0: - logger.error("ElementCapabilities associator should NOT return excepted \ - result with a wrong key name and value of %s input", ref_class) + logger.error("ElementCapabilities associator should NOT" + \ + " return records with a wrong key name and value") status = FAIL return status @@ -73,7 +75,8 @@ cs = get_typed_class(options.virt, "ComputerSystem") instanceref = CIMInstanceName(hs, - keybindings = {"Name" : "wrong", "CreationClassName" : "wrong"}) + keybindings = {"Name" : "wrong", + "CreationClassName" : "wrong"}) rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) if rc != PASS: @@ -81,8 +84,16 @@ return status instance_cs = CIMInstanceName(cs, - keybindings = {"Name" : "wrong", "CreationClassName" : "Xen_ComputerSystem"}) - rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) + keybindings = {"Name" : "wrong", + "CreationClassName" : cs}) + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev >= libvirt_ec_changes: + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ + " Domain not found" + try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) + else: + rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) if rc != PASS: status = FAIL return status From yunguol at cn.ibm.com Mon Mar 9 02:43:15 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 9 Mar 2009 10:43:15 +0800 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: <49B0CF0A.3040500@linux.vnet.ibm.com> Message-ID: Libvirt-cim-bounces at redhat.com wrote on 2009-03-06 15:21:46: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1236309447 28800 > > # Node ID 7e6e1318706b1b4e6b39d703b663c70a0972b778 > > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > > [TEST]#2 Fix ElementCapabilities/03_forward_errs.py with > provider's updated err message > > > > > > Updates form 1 to 2: > > Use a variable to assign revision value to be calculated for comparison > > > > Also fix the line to meet 80 length > > > > Tested for KVM/LXC with current sources and rpm > > > > Signed-off-by: Guolian Yun > > > > diff -r c6f7256013b9 -r 7e6e1318706b suites/libvirt- > cim/cimtest/ElementCapabilities/03_forward_errs.py > > --- a/suites/libvirt- > cim/cimtest/ElementCapabilities/03_forward_errs.py Tue Mar 03 08: > 47:40 2009 -0800 > > +++ b/suites/libvirt- > cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Mar 05 19: > 17:27 2009 -0800 > > @@ -27,10 +27,11 @@ > > from XenKvmLib import enumclass > > from XenKvmLib.classes import get_typed_class > > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > > -from XenKvmLib.const import do_main > > +from XenKvmLib.const import do_main, get_provider_version > > from CimTest.ReturnCodes import PASS, FAIL > > > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > +libvirt_ec_changes = 815 > > > > exp_rc = 6 #CIM_ERR_NOT_FOUND > > exp_desc = "No such instance" > > @@ -42,23 +43,24 @@ > > status = FAIL > > rc = -1 > > names = [] > > - > > + ec = get_typed_class(options.virt, "ElementCapabilities") > > try: > > - names = conn.AssociatorNames(ref, AssocClass = > get_typed_class(options.virt, "ElementCapabilities")) > > + names = conn.AssociatorNames(ref, AssocClass = ec) > > rc = 0 > > except pywbem.CIMError, (rc, desc): > > if rc == exp_rc and desc.find(exp_desc) >= 0: > > logger.info("Got expected rc code and error string") > > status = PASS > > else: > > - logger.error("Unexpected rc code %s and description % > s\n", rc, desc) > > + logger.error("Unexpected rc code %s and description %s\n", rc, > > + desc) > > except Exception, details: > > logger.error("Unknown exception happened") > > logger.error(details) > > > > if rc == 0: > > - logger.error("ElementCapabilities associator should NOT > return excepted \ > > - result with a wrong key name and value of % > s input", ref_class) > > + logger.error("ElementCapabilities associator should NOT" + \ > > + " return records with a wrong key name and value") > > > You don't need a + sign here. \ will do. > > status = FAIL > > > > return status > > @@ -73,7 +75,8 @@ > > cs = get_typed_class(options.virt, "ComputerSystem") > > > > instanceref = CIMInstanceName(hs, > > - keybindings = {"Name" : > "wrong", "CreationClassName" : "wrong"}) > > + keybindings = {"Name" : "wrong", > > + "CreationClassName" : "wrong"}) > > rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) > > > > if rc != PASS: > > @@ -81,8 +84,16 @@ > > return status > > > > instance_cs = CIMInstanceName(cs, > > - keybindings = {"Name" : > "wrong", "CreationClassName" : "Xen_ComputerSystem"}) > > - rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > > + keybindings = {"Name" : "wrong", > > + "CreationClassName" : > "Xen_ComputerSystem"}) > > > We should not hardcode CreationClassName to Xen_ComputerSystem. > > + > > + curr_cim_rev, changeset = get_provider_version(options.virt, > options.ip) > > + if curr_cim_rev >= libvirt_ec_changes: > > + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ > > + " Domain not found" > > > you dont need a + sign here. \ will work. > > + try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) > > > Can you check if you can use common_util.try_assoc() instead of writing > the try_assoc() function freshly here in the tc ? I will try to use common_util.try_assoc() here, but I think it should be sent in a new patch. I will cook up a new patch to fix this. Thanks! > > + else: > > + rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > > if rc != PASS: > > status = FAIL > > return status > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > -- > Thanks and Regards, > Deepti B. Kalakeri > IBM Linux Technology Center > deeptik at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Mar 9 02:45:59 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 9 Mar 2009 10:45:59 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-09 09:45:08: > > > ================================================= > Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge)with sfcb > ================================================= > Distro: Fedora release 10 (Cambridge) > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 829 > Libvirt-cim changeset: 1aff0d0e9bf4 > Cimtest revision: 642 > Cimtest changeset: 087aaba26589 > ================================================= > FAIL : 4 > XFAIL : 3 > SKIP : 5 > PASS : 134 > ----------------- > Total : 146 > ================================================= > FAIL Test Summary: > ElementCapabilities - 03_forward_errs.py: FAIL I've sent a patch with fix. > ElementConforms - 01_forward.py: FAIL Same as above. > ElementConforms - 04_ectp_rev_errs.py: FAIL Same as above. > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > ================================================= > XFAIL Test Summary: > ComputerSystem - 32_start_reboot.py: XFAIL > ComputerSystem - 33_suspend_reboot.py: XFAIL > VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL > > ================================================= > SKIP Test Summary: > VSSD - 02_bootldr.py: SKIP > VirtualSystemManagementService - 06_addresource.py: SKIP > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > > ================================================= > Full report: > -------------------------------------------------------------------- > AllocationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 02_nosystems.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 03_defineVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 04_defineStartVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 05_activate_defined_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 06_paused_active_suspend.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 22_define_suspend.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 23_pause_pause.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 27_define_pause_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 32_start_reboot.py: XFAIL > ERROR - Got CIM error 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): 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 State not supported with return code 7 > 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: PASS > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 04_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: FAIL > ERROR - Unexpected rc code 6 and description > Referenced domain `wrong' does not exist: Domain not found > > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: FAIL > ERROR - verify_fields() exception: > u'KVM_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: FAIL > ERROR - Unexpected rc code 6 and description > Referenced domain `INVALID_Name_Keyvalue' does not exist: Domain not found > > ERROR - ------ FAILED: INVALID_Name_Keyvalue------ > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: PASS > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: PASS > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: PASS > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > 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 > -------------------------------------------------------------------- > KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 01_disk.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 02_nodevs.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 03_ld_gi_errs.py: PASS > -------------------------------------------------------------------- > Memory - 01_memory.py: PASS > -------------------------------------------------------------------- > Memory - 02_defgetmem.py: PASS > -------------------------------------------------------------------- > Memory - 03_mem_gi_errs.py: PASS > -------------------------------------------------------------------- > NetworkPort - 01_netport.py: PASS > -------------------------------------------------------------------- > NetworkPort - 02_np_gi_errors.py: PASS > -------------------------------------------------------------------- > NetworkPort - 03_user_netport.py: PASS > -------------------------------------------------------------------- > Processor - 01_processor.py: PASS > -------------------------------------------------------------------- > Processor - 02_definesys_get_procs.py: PASS > -------------------------------------------------------------------- > Processor - 03_proc_gi_errs.py: PASS > -------------------------------------------------------------------- > Profile - 01_enum.py: PASS > -------------------------------------------------------------------- > Profile - 02_profile_to_elec.py: PASS > -------------------------------------------------------------------- > Profile - 03_rprofile_gi_errs.py: PASS > -------------------------------------------------------------------- > RASD - 01_verify_rasd_fields.py: PASS > -------------------------------------------------------------------- > RASD - 02_enum.py: PASS > -------------------------------------------------------------------- > RASD - 03_rasd_errs.py: PASS > -------------------------------------------------------------------- > RASD - 04_disk_rasd_size.py: PASS > -------------------------------------------------------------------- > RASD - 05_disk_rasd_emu_type.py: PASS > -------------------------------------------------------------------- > RedirectionService - 01_enum_crs.py: PASS > -------------------------------------------------------------------- > RedirectionService - 02_enum_crscap.py: PASS > -------------------------------------------------------------------- > RedirectionService - 03_RedirectionSAP_errs.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > -------------------------------------------------------------------- > ResourcePool - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePool - 02_rp_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > -------------------------------------------------------------------- > ServiceAccessBySAP - 01_forward.py: PASS > -------------------------------------------------------------------- > ServiceAccessBySAP - 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 > -------------------------------------------------------------------- > VSSD - 01_enum.py: PASS > -------------------------------------------------------------------- > VSSD - 02_bootldr.py: SKIP > -------------------------------------------------------------------- > VSSD - 03_vssd_gi_errs.py: PASS > -------------------------------------------------------------------- > VSSD - 04_vssd_to_rasd.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > ERROR - destroy_fail>> noname: Error executing DestroySystem > ERROR - (6, u'Unable to retrieve domain name: Error 0') > ERROR - destroy_fail>> nonexistent: Error executing > DestroySystem > ERROR - (6, u"Referenced domain `##@@!! > cimtest_domain' does not exist: Domain not found") > InvokeMethod(DestroySystem): Unable to retrieve domain name: Error 0 > InvokeMethod(DestroySystem): Referenced domain `##@@!! > cimtest_domain' does not exist: Domain not found > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: SKIP > ERROR - Need to give different bridge name since it > already exists > -------------------------------------------------------------------- > VirtualSystemManagementService - 07_addresource_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: PASS > -------------------------------------------------------------------- > 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 > -------------------------------------------------------------------- > 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 > -------------------------------------------------------------------- > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Mar 9 05:03:08 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 10:33:08 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: <49B198D3.9030404@linux.vnet.ibm.com> References: <7e6e1318706b1b4e6b39.1236309456@elm3b197.beaverton.ibm.com> <49B0CF0A.3040500@linux.vnet.ibm.com> <49B198D3.9030404@linux.vnet.ibm.com> Message-ID: <49B4A30C.2010706@linux.vnet.ibm.com> Kaitlin Rupert wrote: > >> We should not hardcode CreationClassName to Xen_ComputerSystem. >>> + >>> + curr_cim_rev, changeset = get_provider_version(options.virt, >>> options.ip) >>> + if curr_cim_rev >= libvirt_ec_changes: >>> + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ >>> + " Domain not found" >>> >> you dont need a + sign here. \ will work. > > This is not true in this case. You'll get the following error: > > ElementCapabilities/ - 03_forward_errs.py: FAIL > File "03_forward_errs.py", line 92 > cs_exp_desc = "Referenced domain `wrong' does not exist:" + > ^ > SyntaxError: invalid syntax > > The slash is needed here. Sorry for not being clear in the above statement. I also meant the same that we dont need a + , instead just using the slash \ will work. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Mon Mar 9 05:54:28 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 9 Mar 2009 13:54:28 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-09 10:45:59: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-09 09:45:08: > > > > > > > ================================================= > > Test Run Summary (Mar 09 2009): KVM on Fedora release 10 > (Cambridge)with sfcb > > ================================================= > > Distro: Fedora release 10 (Cambridge) > > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > > libvirt: 0.4.5 > > Hypervisor: QEMU 0.9.1 > > CIMOM: sfcb sfcbd 1.3.3preview > > Libvirt-cim revision: 829 > > Libvirt-cim changeset: 1aff0d0e9bf4 > > Cimtest revision: 642 > > Cimtest changeset: 087aaba26589 > > ================================================= > > FAIL : 4 > > XFAIL : 3 > > SKIP : 5 > > PASS : 134 > > ----------------- > > Total : 146 > > ================================================= > > FAIL Test Summary: > > ElementCapabilities - 03_forward_errs.py: FAIL > I've sent a patch with fix. > > > ElementConforms - 01_forward.py: FAIL > Same as above. > > > ElementConforms - 04_ectp_rev_errs.py: FAIL > Same as above. > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL It seems this failure because that the provider has to free the nonexistent domain in invoking method DestroySystem. Here is the debugger error in sfcb: libvir: Domain error : invalid domain pointer in virDomainFree libvir: QEMU error : Domain not found libvir: Domain error : invalid domain pointer in virDomainFree Kaitlin, can you help me look into this? Thanks! > > > > ================================================= > > XFAIL Test Summary: > > ComputerSystem - 32_start_reboot.py: XFAIL > > ComputerSystem - 33_suspend_reboot.py: XFAIL > > VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL > > > > ================================================= > > SKIP Test Summary: > > VSSD - 02_bootldr.py: SKIP > > VirtualSystemManagementService - 06_addresource.py: SKIP > > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > > > > ================================================= > > Full report: > > -------------------------------------------------------------------- > > AllocationCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 02_nosystems.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 03_defineVS.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 04_defineStartVS.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 05_activate_defined_start.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 06_paused_active_suspend.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 22_define_suspend.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 23_pause_pause.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 27_define_pause_errs.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 32_start_reboot.py: XFAIL > > ERROR - Got CIM error 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): 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 State not supported with > return code 7 > > 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: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 42_cs_gi_errs.py: PASS > > -------------------------------------------------------------------- > > ComputerSystemIndication - 01_created_indication.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 04_forward_errs.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 03_forward_errs.py: FAIL > > ERROR - Unexpected rc code 6 and description > > Referenced domain `wrong' does not exist: Domain not found > > > > -------------------------------------------------------------------- > > ElementCapabilities - 04_reverse_errs.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 05_hostsystem_cap.py: PASS > > -------------------------------------------------------------------- > > ElementConforms - 01_forward.py: FAIL > > ERROR - verify_fields() exception: > > u'KVM_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: FAIL > > ERROR - Unexpected rc code 6 and description > > Referenced domain `INVALID_Name_Keyvalue' does not exist: Domain not found > > > > ERROR - ------ FAILED: INVALID_Name_Keyvalue------ > > -------------------------------------------------------------------- > > ElementSettingData - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > > -------------------------------------------------------------------- > > EnabledLogicalElementCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 01_enum.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 02_hostsystem_to_rasd.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 03_hs_to_settdefcap.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 04_hs_to_EAPF.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 05_hs_gi_errs.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 06_hs_to_vsms.py: PASS > > -------------------------------------------------------------------- > > 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 > > -------------------------------------------------------------------- > > KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS > > -------------------------------------------------------------------- > > LogicalDisk - 01_disk.py: PASS > > -------------------------------------------------------------------- > > LogicalDisk - 02_nodevs.py: PASS > > -------------------------------------------------------------------- > > LogicalDisk - 03_ld_gi_errs.py: PASS > > -------------------------------------------------------------------- > > Memory - 01_memory.py: PASS > > -------------------------------------------------------------------- > > Memory - 02_defgetmem.py: PASS > > -------------------------------------------------------------------- > > Memory - 03_mem_gi_errs.py: PASS > > -------------------------------------------------------------------- > > NetworkPort - 01_netport.py: PASS > > -------------------------------------------------------------------- > > NetworkPort - 02_np_gi_errors.py: PASS > > -------------------------------------------------------------------- > > NetworkPort - 03_user_netport.py: PASS > > -------------------------------------------------------------------- > > Processor - 01_processor.py: PASS > > -------------------------------------------------------------------- > > Processor - 02_definesys_get_procs.py: PASS > > -------------------------------------------------------------------- > > Processor - 03_proc_gi_errs.py: PASS > > -------------------------------------------------------------------- > > Profile - 01_enum.py: PASS > > -------------------------------------------------------------------- > > Profile - 02_profile_to_elec.py: PASS > > -------------------------------------------------------------------- > > Profile - 03_rprofile_gi_errs.py: PASS > > -------------------------------------------------------------------- > > RASD - 01_verify_rasd_fields.py: PASS > > -------------------------------------------------------------------- > > RASD - 02_enum.py: PASS > > -------------------------------------------------------------------- > > RASD - 03_rasd_errs.py: PASS > > -------------------------------------------------------------------- > > RASD - 04_disk_rasd_size.py: PASS > > -------------------------------------------------------------------- > > RASD - 05_disk_rasd_emu_type.py: PASS > > -------------------------------------------------------------------- > > RedirectionService - 01_enum_crs.py: PASS > > -------------------------------------------------------------------- > > RedirectionService - 02_enum_crscap.py: PASS > > -------------------------------------------------------------------- > > RedirectionService - 03_RedirectionSAP_errs.py: PASS > > -------------------------------------------------------------------- > > ReferencedProfile - 01_verify_refprof.py: PASS > > -------------------------------------------------------------------- > > ReferencedProfile - 02_refprofile_errs.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 03_forward_errs.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > > -------------------------------------------------------------------- > > ResourcePool - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ResourcePool - 02_rp_gi_errors.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - > 06_RemoveResourcesFromResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > > -------------------------------------------------------------------- > > ServiceAccessBySAP - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ServiceAccessBySAP - 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 > > -------------------------------------------------------------------- > > VSSD - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VSSD - 02_bootldr.py: SKIP > > -------------------------------------------------------------------- > > VSSD - 03_vssd_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VSSD - 04_vssd_to_rasd.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 01_definesystem_name.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 02_destroysystem.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > ERROR - destroy_fail>> noname: Error executing > DestroySystem > > ERROR - (6, u'Unable to retrieve domain name: Error 0') > > ERROR - destroy_fail>> nonexistent: Error executing > > DestroySystem > > ERROR - (6, u"Referenced domain `##@@!! > > cimtest_domain' does not exist: Domain not found") > > InvokeMethod(DestroySystem): Unable to retrieve domain name: Error 0 > > InvokeMethod(DestroySystem): Referenced domain `##@@!! > > cimtest_domain' does not exist: Domain not found > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 06_addresource.py: SKIP > > ERROR - Need to give different bridge name since it > > already exists > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 07_addresource_neg.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 08_modifyresource.py: PASS > > -------------------------------------------------------------------- > > 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 > > -------------------------------------------------------------------- > > 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 > > -------------------------------------------------------------------- > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Mar 9 06:10:52 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 11:40:52 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#3 Fix ElementConforms/04_ectp_rev_errs.py err message In-Reply-To: <1a18e5b4486835b3ace8.1236565954@elm3b197.beaverton.ibm.com> References: <1a18e5b4486835b3ace8.1236565954@elm3b197.beaverton.ibm.com> Message-ID: <49B4B2EC.3000400@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236565948 25200 > # Node ID 1a18e5b4486835b3ace888ea68718a7b7832faa8 > # Parent 087aaba2658940bbc8718aa55cbcd6150f7cac23 > [TEST]#3 Fix ElementConforms/04_ectp_rev_errs.py err message > > > Updates from 2 to 3: > 1) Adhere to the 80 column > 2) Remove the \ which are not needed in the tc > 3) Remove unused import statement > > > Updates from 1 to 2: > 1) Change the revision changeset number to 815 instead of 817 > 2) Assign the revision value to a variable instead of directly using it for the comparison > > Updates tc err message to meet the provder updates > > Tested for KVM/LXC with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r 087aaba26589 -r 1a18e5b44868 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Mar 05 22:04:39 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Sun Mar 08 19:32:28 2009 -0700 > @@ -80,33 +80,39 @@ > > import sys > import pywbem > -from VirtLib import utils > from VirtLib.live import full_hostname > from XenKvmLib import assoc > from XenKvmLib import vxml > from XenKvmLib.classes import get_typed_class > from XenKvmLib.common_util import try_assoc > -from XenKvmLib.test_doms import destroy_and_undefine_all > from CimTest.ReturnCodes import PASS, FAIL > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > - > +libvrit_eleconform_changes = 815 > test_dom = "domU" > - > +invalid_desc = 'No domain name specified' > cs_values = { > - "INVALID_CCName_Keyname" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ > - "INVALID_CCName_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ > - "INVALID_Name_Keyname" : { 'rc' : 1 , 'desc' : 'No domain name specified'}, \ > - "INVALID_Name_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' } > + "INVALID_CCName_Keyname" : { 'rc' : 6 , > + 'desc' : 'No such instance' }, > + "INVALID_CCName_Keyvalue" : { 'rc' : 6 , > + 'desc' : 'No such instance' }, > + "INVALID_Name_Keyname" : { 'rc' : 1 , > + 'desc' : invalid_desc}, > + "INVALID_Name_Keyvalue" : { 'rc' : 6 , > + 'desc' : 'No such instance' } > } > > hs_values = { > - "INVALID_CCName_Keyname" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ > - "INVALID_CCName_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ > - "INVALID_Name_Keyname" : { 'rc' : 6 , 'desc' : 'No such instance'}, \ > - "INVALID_Name_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' } > + "INVALID_CCName_Keyname" : { 'rc' : 6 , > + 'desc' : 'No such instance' }, > + "INVALID_CCName_Keyvalue" : { 'rc' : 6 , > + 'desc' : 'No such instance' }, > + "INVALID_Name_Keyname" : { 'rc' : 6 , > + 'desc' : 'No such instance'}, > + "INVALID_Name_Keyvalue" : { 'rc' : 6 , > + 'desc' : 'No such instance' } > } > > def try_invalid_assoc(classname, name_val, i, field, virt="Xen"): > @@ -122,8 +128,8 @@ > expr_values = hs_values > else: > expr_values = cs_values > - ret_val = try_assoc(conn, classname, ac_classname, keys, field_name=field, \ > - expr_values=expr_values[field], bug_no="") > + ret_val = try_assoc(conn, classname, ac_classname, keys, field_name=field, > + expr_values=expr_values[field], bug_no="") > if ret_val != PASS: > logger.error("------ FAILED: %s------", field) > name_val[i] = temp > @@ -137,7 +143,8 @@ > status = PASS > > global conn > - conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) > + conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, > + CIM_PASS), CIM_NS) > virt_xml = vxml.get_class(options.virt) > cxml = virt_xml(test_dom) > ret = cxml.cim_define(options.ip) > @@ -149,29 +156,37 @@ > cs = get_typed_class(options.virt, "ComputerSystem") > host_name = full_hostname(options.ip) > host_name_val = [ > - 'CreationClassName', hs, \ > + 'CreationClassName', hs, > 'Name', host_name > ] > > comp_name_val = [ > - 'CreationClassName', cs, \ > + 'CreationClassName', cs, > 'Name', test_dom > ] > > tc_scen = [ > - 'INVALID_CCName_Keyname', \ > - 'INVALID_CCName_Keyvalue', \ > - 'INVALID_Name_Keyname', \ > + 'INVALID_CCName_Keyname', > + 'INVALID_CCName_Keyvalue', > + 'INVALID_Name_Keyname', > 'INVALID_Name_Keyvalue' > ] > > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > for i in range(len(tc_scen)): > - retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], options.virt) > + if tc_scen[i] == 'INVALID_Name_Keyvalue' and \ > + curr_cim_rev >= libvrit_eleconform_changes: > + desc = "Referenced domain `INVALID_Name_Keyvalue'" + \ > + " does not exist: Domain not found" > We dont need the + sign here. otherwise +1 for me. > + cs_values[tc_scen[i]]['desc'] = desc > + retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], > + options.virt) > if retval != PASS: > status = retval > > for i in range(len(tc_scen)): > - retval = try_invalid_assoc(cs, comp_name_val, i, tc_scen[i], options.virt) > + retval = try_invalid_assoc(cs, comp_name_val, i, tc_scen[i], > + options.virt) > if retval != PASS: > status = retval > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 06:24:42 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 11:54:42 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: References: Message-ID: <49B4B62A.6020903@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236567513 25200 > # Node ID e601bc0ba234dae371ec38b8289b5827d12f2910 > # Parent 087aaba2658940bbc8718aa55cbcd6150f7cac23 > [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message > > > Updates from 2 to 3: > Get correct CS Name instead of hard code of "Xen_ComputerSystem" > > Updates from 1 to 2: > Use a variable to assign revision value to be calculated for comparison > > Also fix the line to meet 80 length > > Tested for KVM/LXC with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r 087aaba26589 -r e601bc0ba234 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py > --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Mar 05 22:04:39 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Sun Mar 08 19:58:33 2009 -0700 > @@ -27,10 +27,11 @@ > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import PASS, FAIL > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > +libvirt_ec_changes = 815 > > exp_rc = 6 #CIM_ERR_NOT_FOUND > exp_desc = "No such instance" > @@ -42,23 +43,24 @@ > status = FAIL > rc = -1 > names = [] > - > + ec = get_typed_class(options.virt, "ElementCapabilities") > try: > - names = conn.AssociatorNames(ref, AssocClass = get_typed_class(options.virt, "ElementCapabilities")) > + names = conn.AssociatorNames(ref, AssocClass = ec) > rc = 0 > except pywbem.CIMError, (rc, desc): > if rc == exp_rc and desc.find(exp_desc) >= 0: > logger.info("Got expected rc code and error string") > status = PASS > else: > - logger.error("Unexpected rc code %s and description %s\n", rc, desc) > + logger.error("Unexpected rc code %s and description %s\n", rc, > + desc) > except Exception, details: > logger.error("Unknown exception happened") > logger.error(details) > > if rc == 0: > - logger.error("ElementCapabilities associator should NOT return excepted \ > - result with a wrong key name and value of %s input", ref_class) > + logger.error("ElementCapabilities associator should NOT" + \ > + " return records with a wrong key name and value") > Remove the + sign here, using slash is enough to continue the string. > status = FAIL > > return status > @@ -73,7 +75,8 @@ > cs = get_typed_class(options.virt, "ComputerSystem") > > instanceref = CIMInstanceName(hs, > - keybindings = {"Name" : "wrong", "CreationClassName" : "wrong"}) > + keybindings = {"Name" : "wrong", > + "CreationClassName" : "wrong"}) > rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) > > if rc != PASS: > @@ -81,8 +84,16 @@ > return status > > instance_cs = CIMInstanceName(cs, > - keybindings = {"Name" : "wrong", "CreationClassName" : "Xen_ComputerSystem"}) > - rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > + keybindings = {"Name" : "wrong", > + "CreationClassName" : cs}) > + > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if curr_cim_rev >= libvirt_ec_changes: > + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ > + " Domain not found" > Remove the "+" sign here. Only slash is enough. Also, instead of calling try_assoc twice you can do the following: if curr_cim_rev >= libvirt_ec_changes: exp_desc = "Referenced domain `wrong' does not exist:" \ " Domain not found" try_assoc(instance_cs, cs, exp_rc, exp_desc, options) Since exp_desc will be changed only when curr_cim_rev >= libvirt_ec_changes. > + try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) > + else: > + rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > if rc != PASS: > status = FAIL > return status > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Mon Mar 9 06:46:42 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 08 Mar 2009 23:46:42 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#4 Fix ElementConforms/04_ectp_rev_errs.py err message Message-ID: # HG changeset patch # User Guolian Yun # Date 1236581194 25200 # Node ID aecbb4bc3bb2ef76091292db25113da51ba86a6e # Parent 087aaba2658940bbc8718aa55cbcd6150f7cac23 [TEST]#4 Fix ElementConforms/04_ectp_rev_errs.py err message Updates from 3 to 4: Remove '+' in err message Updates from 2 to 3: 1) Adhere to the 80 column 2) Remove the \ which are not needed in the tc 3) Remove unused import statement Updates from 1 to 2: 1) Change the revision changeset number to 815 instead of 817 2) Assign the revision value to a variable instead of directly using it for the comparison Updates tc err message to meet the provder updates Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r 087aaba26589 -r aecbb4bc3bb2 suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py --- a/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Thu Mar 05 22:04:39 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/04_ectp_rev_errs.py Sun Mar 08 23:46:34 2009 -0700 @@ -80,33 +80,40 @@ import sys import pywbem -from VirtLib import utils from VirtLib.live import full_hostname from XenKvmLib import assoc from XenKvmLib import vxml from XenKvmLib.classes import get_typed_class from XenKvmLib.common_util import try_assoc -from XenKvmLib.test_doms import destroy_and_undefine_all from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] - +libvrit_eleconform_changes = 815 test_dom = "domU" +invalid_desc = 'No domain name specified' cs_values = { - "INVALID_CCName_Keyname" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ - "INVALID_CCName_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ - "INVALID_Name_Keyname" : { 'rc' : 1 , 'desc' : 'No domain name specified'}, \ - "INVALID_Name_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' } + "INVALID_CCName_Keyname" : { 'rc' : 6 , + 'desc' : 'No such instance' }, + "INVALID_CCName_Keyvalue" : { 'rc' : 6 , + 'desc' : 'No such instance' }, + "INVALID_Name_Keyname" : { 'rc' : 1 , + 'desc' : invalid_desc}, + "INVALID_Name_Keyvalue" : { 'rc' : 6 , + 'desc' : 'No such instance' } } hs_values = { - "INVALID_CCName_Keyname" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ - "INVALID_CCName_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' }, \ - "INVALID_Name_Keyname" : { 'rc' : 6 , 'desc' : 'No such instance'}, \ - "INVALID_Name_Keyvalue" : { 'rc' : 6 , 'desc' : 'No such instance' } + "INVALID_CCName_Keyname" : { 'rc' : 6 , + 'desc' : 'No such instance' }, + "INVALID_CCName_Keyvalue" : { 'rc' : 6 , + 'desc' : 'No such instance' }, + "INVALID_Name_Keyname" : { 'rc' : 6 , + 'desc' : 'No such instance'}, + "INVALID_Name_Keyvalue" : { 'rc' : 6 , + 'desc' : 'No such instance' } } def try_invalid_assoc(classname, name_val, i, field, virt="Xen"): @@ -122,8 +129,8 @@ expr_values = hs_values else: expr_values = cs_values - ret_val = try_assoc(conn, classname, ac_classname, keys, field_name=field, \ - expr_values=expr_values[field], bug_no="") + ret_val = try_assoc(conn, classname, ac_classname, keys, field_name=field, + expr_values=expr_values[field], bug_no="") if ret_val != PASS: logger.error("------ FAILED: %s------", field) name_val[i] = temp @@ -137,7 +144,8 @@ status = PASS global conn - conn = assoc.myWBEMConnection('http://%s' % options.ip, (CIM_USER, CIM_PASS), CIM_NS) + conn = assoc.myWBEMConnection('http://%s' % options.ip, + (CIM_USER, CIM_PASS), CIM_NS) virt_xml = vxml.get_class(options.virt) cxml = virt_xml(test_dom) ret = cxml.cim_define(options.ip) @@ -149,29 +157,37 @@ cs = get_typed_class(options.virt, "ComputerSystem") host_name = full_hostname(options.ip) host_name_val = [ - 'CreationClassName', hs, \ + 'CreationClassName', hs, 'Name', host_name ] comp_name_val = [ - 'CreationClassName', cs, \ + 'CreationClassName', cs, 'Name', test_dom ] tc_scen = [ - 'INVALID_CCName_Keyname', \ - 'INVALID_CCName_Keyvalue', \ - 'INVALID_Name_Keyname', \ + 'INVALID_CCName_Keyname', + 'INVALID_CCName_Keyvalue', + 'INVALID_Name_Keyname', 'INVALID_Name_Keyvalue' ] + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) for i in range(len(tc_scen)): - retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], options.virt) + if tc_scen[i] == 'INVALID_Name_Keyvalue' and \ + curr_cim_rev >= libvrit_eleconform_changes: + desc = "Referenced domain `INVALID_Name_Keyvalue'" \ + " does not exist: Domain not found" + cs_values[tc_scen[i]]['desc'] = desc + retval = try_invalid_assoc(hs, host_name_val, i, tc_scen[i], + options.virt) if retval != PASS: status = retval for i in range(len(tc_scen)): - retval = try_invalid_assoc(cs, comp_name_val, i, tc_scen[i], options.virt) + retval = try_invalid_assoc(cs, comp_name_val, i, tc_scen[i], + options.virt) if retval != PASS: status = retval From deeptik at linux.vnet.ibm.com Mon Mar 9 06:47:41 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 12:17:41 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: References: Message-ID: <49B4BB8D.5020409@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236320248 28800 > # Node ID b213dddc93404028075f10d7355c468ec8230274 > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association > > > Updates from 3 to 4: > Use a variable to assign revision value to be calculated for comparison > > Updates from 2 to 3: > Add changeset instead of skip the verification of KVM_ResourceAllocation to ECTP for all the src versions > > Tested for KVM/LXC with current sources and rpm on Pegasus > > Signed-off-by: Guolian Yun > > diff -r c6f7256013b9 -r b213dddc9340 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Tue Mar 03 08:47:40 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Mar 05 22:17:28 2009 -0800 > @@ -53,7 +53,9 @@ > test_dom = "domU" > bug_sblim = '00007' > libvirt_cim_ectp_changes = 686 > -libvirt_cim_input_graphics_ectp = 773 > +libvirt_cim_input_graphics_ectp = 773 > +libvirt_cim_ac_lower = 796 > +libvirt_cim_ac_upper = 818 > > def init_managed_ele_values(server, virt): > verify_ectp_list = {} > @@ -63,7 +65,7 @@ > curr_cim_rev, changeset = get_provider_version(virt, server) > if curr_cim_rev >= libvirt_cim_ectp_changes: > cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", > - "ProcessorPool", "MemoryPool"] > + "ProcessorPool", "MemoryPool", "AllocationCapabilities"] > cn_names.extend(cn_names2) > if curr_cim_rev >= libvirt_cim_input_graphics_ectp: > cn_names.append("ConsoleRedirectionService") > @@ -136,6 +138,11 @@ > if profile.InstanceID not in unsupp_prof: > profiles_instid_list.append(profile.InstanceID) > > + for prof_id in profiles_instid_list: > + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c" and\ > + libvirt_cim_ac_lower <= curr_cim_rev < libvirt_cim_ac_upper: > Can you please break the libvirt_cim_ac_lower <= curr_cim_rev < libvirt_cim_ac_upper. Can you also remove the unused import statements. > + profiles_instid_list.remove(prof_id) > + > return status, profiles_instid_list > > @do_main(sup_types) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Mon Mar 9 06:45:03 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 9 Mar 2009 14:45:03 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: <49B4B62A.6020903@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-09 14:24:42: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1236567513 25200 > > # Node ID e601bc0ba234dae371ec38b8289b5827d12f2910 > > # Parent 087aaba2658940bbc8718aa55cbcd6150f7cac23 > > [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with > provider's updated err message > > > > > > Updates from 2 to 3: > > Get correct CS Name instead of hard code of "Xen_ComputerSystem" > > > > Updates from 1 to 2: > > Use a variable to assign revision value to be calculated for comparison > > > > Also fix the line to meet 80 length > > > > Tested for KVM/LXC with current sources and rpm > > > > Signed-off-by: Guolian Yun > > > > diff -r 087aaba26589 -r e601bc0ba234 suites/libvirt- > cim/cimtest/ElementCapabilities/03_forward_errs.py > > --- a/suites/libvirt- > cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Mar 05 22: > 04:39 2009 -0800 > > +++ b/suites/libvirt- > cim/cimtest/ElementCapabilities/03_forward_errs.py Sun Mar 08 19: > 58:33 2009 -0700 > > @@ -27,10 +27,11 @@ > > from XenKvmLib import enumclass > > from XenKvmLib.classes import get_typed_class > > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > > -from XenKvmLib.const import do_main > > +from XenKvmLib.const import do_main, get_provider_version > > from CimTest.ReturnCodes import PASS, FAIL > > > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > +libvirt_ec_changes = 815 > > > > exp_rc = 6 #CIM_ERR_NOT_FOUND > > exp_desc = "No such instance" > > @@ -42,23 +43,24 @@ > > status = FAIL > > rc = -1 > > names = [] > > - > > + ec = get_typed_class(options.virt, "ElementCapabilities") > > try: > > - names = conn.AssociatorNames(ref, AssocClass = > get_typed_class(options.virt, "ElementCapabilities")) > > + names = conn.AssociatorNames(ref, AssocClass = ec) > > rc = 0 > > except pywbem.CIMError, (rc, desc): > > if rc == exp_rc and desc.find(exp_desc) >= 0: > > logger.info("Got expected rc code and error string") > > status = PASS > > else: > > - logger.error("Unexpected rc code %s and description % > s\n", rc, desc) > > + logger.error("Unexpected rc code %s and description %s\n", rc, > > + desc) > > except Exception, details: > > logger.error("Unknown exception happened") > > logger.error(details) > > > > if rc == 0: > > - logger.error("ElementCapabilities associator should NOT > return excepted \ > > - result with a wrong key name and value of % > s input", ref_class) > > + logger.error("ElementCapabilities associator should NOT" + \ > > + " return records with a wrong key name and value") > > > Remove the + sign here, using slash is enough to continue the string. > > status = FAIL > > > > return status > > @@ -73,7 +75,8 @@ > > cs = get_typed_class(options.virt, "ComputerSystem") > > > > instanceref = CIMInstanceName(hs, > > - keybindings = {"Name" : > "wrong", "CreationClassName" : "wrong"}) > > + keybindings = {"Name" : "wrong", > > + "CreationClassName" : "wrong"}) > > rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) > > > > if rc != PASS: > > @@ -81,8 +84,16 @@ > > return status > > > > instance_cs = CIMInstanceName(cs, > > - keybindings = {"Name" : > "wrong", "CreationClassName" : "Xen_ComputerSystem"}) > > - rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > > + keybindings = {"Name" : "wrong", > > + "CreationClassName" : cs}) > > + > > + curr_cim_rev, changeset = get_provider_version(options.virt, > options.ip) > > + if curr_cim_rev >= libvirt_ec_changes: > > + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ > > + " Domain not found" > > > Remove the "+" sign here. Only slash is enough. > Also, instead of calling try_assoc twice you can do the following: > > if curr_cim_rev >= libvirt_ec_changes: > exp_desc = "Referenced domain `wrong' does not exist:" \ > " Domain not found" > > I tried to do this in the first patch, but it reports error as follows: ERROR - UnboundLocalError : local variable 'exp_desc' referenced before assignment Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 141, in do_try File "03_forward_errs.py", line 80, in main rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) UnboundLocalError: local variable 'exp_desc' referenced before assignment ERROR - None So I define a new variable of cs_exp_desc to cover this and call try_assco twice. > try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > Since exp_desc will be changed only when curr_cim_rev >= libvirt_ec_changes. > > > + try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) > > + else: > > + rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > > if rc != PASS: > > status = FAIL > > return status > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > -- > Thanks and Regards, > Deepti B. Kalakeri > IBM Linux Technology Center > deeptik at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Mar 9 06:48:46 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 9 Mar 2009 14:48:46 +0800 Subject: [Libvirt-cim] [PATCH] [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: <49B4BB8D.5020409@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-09 14:47:41: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1236320248 28800 > > # Node ID b213dddc93404028075f10d7355c468ec8230274 > > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > > [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and > skip KVM_RegisteredProfile association > > > > > > Updates from 3 to 4: > > Use a variable to assign revision value to be calculated for comparison > > > > Updates from 2 to 3: > > Add changeset instead of skip the verification of > KVM_ResourceAllocation to ECTP for all the src versions > > > > Tested for KVM/LXC with current sources and rpm on Pegasus > > > > Signed-off-by: Guolian Yun > > > > diff -r c6f7256013b9 -r b213dddc9340 suites/libvirt- > cim/cimtest/ElementConforms/01_forward.py > > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > Tue Mar 03 08:47:40 2009 -0800 > > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > Thu Mar 05 22:17:28 2009 -0800 > > @@ -53,7 +53,9 @@ > > test_dom = "domU" > > bug_sblim = '00007' > > libvirt_cim_ectp_changes = 686 > > -libvirt_cim_input_graphics_ectp = 773 > > +libvirt_cim_input_graphics_ectp = 773 > > +libvirt_cim_ac_lower = 796 > > +libvirt_cim_ac_upper = 818 > > > > def init_managed_ele_values(server, virt): > > verify_ectp_list = {} > > @@ -63,7 +65,7 @@ > > curr_cim_rev, changeset = get_provider_version(virt, server) > > if curr_cim_rev >= libvirt_cim_ectp_changes: > > cn_names2 = ["VirtualSystemMigrationService", "DiskPool", > "NetworkPool", > > - "ProcessorPool", "MemoryPool"] > > + "ProcessorPool", "MemoryPool", > "AllocationCapabilities"] > > cn_names.extend(cn_names2) > > if curr_cim_rev >= libvirt_cim_input_graphics_ectp: > > cn_names.append("ConsoleRedirectionService") > > @@ -136,6 +138,11 @@ > > if profile.InstanceID not in unsupp_prof: > > profiles_instid_list.append(profile.InstanceID) > > > > + for prof_id in profiles_instid_list: > > + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c" and\ > > + libvirt_cim_ac_lower <= curr_cim_rev < libvirt_cim_ac_upper: > > > Can you please break the libvirt_cim_ac_lower <= curr_cim_rev < > libvirt_cim_ac_upper. > Can you also remove the unused import statements. I will fix this with a new patch. Deepti - Would you please try to add all your comments in a patch review? Then I can fix all of them once a time =) > > > + profiles_instid_list.remove(prof_id) > > + > > return status, profiles_instid_list > > > > @do_main(sup_types) > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > -- > Thanks and Regards, > Deepti B. Kalakeri > IBM Linux Technology Center > deeptik at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Mar 9 07:27:22 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 09 Mar 2009 00:27:22 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association Message-ID: <76034664976f61b9f702.1236583642@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236583632 25200 # Node ID 76034664976f61b9f702691e40e6b506783b39e5 # Parent 087aaba2658940bbc8718aa55cbcd6150f7cac23 [TEST] #5 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association Updates from 4 to 5: 1) Break the libvirt_cim_ac_lower <= curr_cim_rev < libvirt_cim_ac_upperr 2) Remove the unused import statements Updates from 3 to 4: Use a variable to assign revision value to be calculated for comparison Updates from 2 to 3: Add changeset instead of skip the verification of KVM_ResourceAllocation to ECTP for all the src versions Tested for KVM/LXC with current sources and rpm on Pegasus Signed-off-by: Guolian Yun diff -r 087aaba26589 -r 76034664976f suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Mar 05 22:04:39 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Mon Mar 09 00:27:12 2009 -0700 @@ -37,13 +37,12 @@ # Date : 04-12-2007 import sys -from VirtLib import utils, live from XenKvmLib import assoc from XenKvmLib.test_doms import destroy_and_undefine_all from XenKvmLib.classes import get_typed_class from XenKvmLib import vxml from CimTest import Globals -from XenKvmLib.common_util import print_field_error, get_host_info +from XenKvmLib.common_util import get_host_info from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import PASS, FAIL @@ -53,7 +52,9 @@ test_dom = "domU" bug_sblim = '00007' libvirt_cim_ectp_changes = 686 -libvirt_cim_input_graphics_ectp = 773 +libvirt_cim_input_graphics_ectp = 773 +libvirt_cim_ac_lower = 796 +libvirt_cim_ac_upper = 818 def init_managed_ele_values(server, virt): verify_ectp_list = {} @@ -63,7 +64,7 @@ curr_cim_rev, changeset = get_provider_version(virt, server) if curr_cim_rev >= libvirt_cim_ectp_changes: cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", - "ProcessorPool", "MemoryPool"] + "ProcessorPool", "MemoryPool", "AllocationCapabilities"] cn_names.extend(cn_names2) if curr_cim_rev >= libvirt_cim_input_graphics_ectp: cn_names.append("ConsoleRedirectionService") @@ -136,6 +137,12 @@ if profile.InstanceID not in unsupp_prof: profiles_instid_list.append(profile.InstanceID) + for prof_id in profiles_instid_list: + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c" and \ + curr_cim_rev >= libvirt_cim_ac_lower and \ + curr_cim_rev< libvirt_cim_ac_upper: + profiles_instid_list.remove(prof_id) + return status, profiles_instid_list @do_main(sup_types) From deeptik at linux.vnet.ibm.com Mon Mar 9 07:16:53 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 12:46:53 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: References: Message-ID: <49B4C265.3080502@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-09 14:47:41: > > > > > > > yunguol at cn.ibm.com wrote: > > > # HG changeset patch > > > # User Guolian Yun > > > # Date 1236320248 28800 > > > # Node ID b213dddc93404028075f10d7355c468ec8230274 > > > # Parent c6f7256013b97dc57a31312897e45eb3cd8604a7 > > > [TEST]#4 Add "AllocationCapabilities" to associate with ECTP and > > skip KVM_RegisteredProfile association > > > > > > > > > Updates from 3 to 4: > > > Use a variable to assign revision value to be calculated for > comparison > > > > > > Updates from 2 to 3: > > > Add changeset instead of skip the verification of > > KVM_ResourceAllocation to ECTP for all the src versions > > > > > > Tested for KVM/LXC with current sources and rpm on Pegasus > > > > > > Signed-off-by: Guolian Yun > > > > > > diff -r c6f7256013b9 -r b213dddc9340 suites/libvirt- > > cim/cimtest/ElementConforms/01_forward.py > > > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > > Tue Mar 03 08:47:40 2009 -0800 > > > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > > Thu Mar 05 22:17:28 2009 -0800 > > > @@ -53,7 +53,9 @@ > > > test_dom = "domU" > > > bug_sblim = '00007' > > > libvirt_cim_ectp_changes = 686 > > > -libvirt_cim_input_graphics_ectp = 773 > > > +libvirt_cim_input_graphics_ectp = 773 > > > +libvirt_cim_ac_lower = 796 > > > +libvirt_cim_ac_upper = 818 > > > > > > def init_managed_ele_values(server, virt): > > > verify_ectp_list = {} > > > @@ -63,7 +65,7 @@ > > > curr_cim_rev, changeset = get_provider_version(virt, server) > > > if curr_cim_rev >= libvirt_cim_ectp_changes: > > > cn_names2 = ["VirtualSystemMigrationService", "DiskPool", > > "NetworkPool", > > > - "ProcessorPool", "MemoryPool"] > > > + "ProcessorPool", "MemoryPool", > > "AllocationCapabilities"] > > > cn_names.extend(cn_names2) > > > if curr_cim_rev >= libvirt_cim_input_graphics_ectp: > > > cn_names.append("ConsoleRedirectionService") > > > @@ -136,6 +138,11 @@ > > > if profile.InstanceID not in unsupp_prof: > > > profiles_instid_list.append(profile.InstanceID) > > > > > > + for prof_id in profiles_instid_list: > > > + if prof_id == "CIM:DSP1041-ResourceAllocation-1.1.0c" and\ > > > + libvirt_cim_ac_lower <= curr_cim_rev < > libvirt_cim_ac_upper: > > > > > Can you please break the libvirt_cim_ac_lower <= curr_cim_rev < > > libvirt_cim_ac_upper. > > Can you also remove the unused import statements. > > I will fix this with a new patch. > Deepti - Would you please try to add all your comments in a patch > review? Then I > can fix all of them once a time =) Sure. Thanks!! > > > > > + profiles_instid_list.remove(prof_id) > > > + > > > return status, profiles_instid_list > > > > > > @do_main(sup_types) > > > > > > _______________________________________________ > > > Libvirt-cim mailing list > > > Libvirt-cim at redhat.com > > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > > > > -- > > Thanks and Regards, > > Deepti B. Kalakeri > > IBM Linux Technology Center > > deeptik at linux.vnet.ibm.com > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 07:37:34 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 13:07:34 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: References: Message-ID: <49B4C73E.60800@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-09 14:24:42: > > > > > > > yunguol at cn.ibm.com wrote: > > > # HG changeset patch > > > # User Guolian Yun > > > # Date 1236567513 25200 > > > # Node ID e601bc0ba234dae371ec38b8289b5827d12f2910 > > > # Parent 087aaba2658940bbc8718aa55cbcd6150f7cac23 > > > [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with > > provider's updated err message > > > > > > > > > Updates from 2 to 3: > > > Get correct CS Name instead of hard code of "Xen_ComputerSystem" > > > > > > Updates from 1 to 2: > > > Use a variable to assign revision value to be calculated for > comparison > > > > > > Also fix the line to meet 80 length > > > > > > Tested for KVM/LXC with current sources and rpm > > > > > > Signed-off-by: Guolian Yun > > > > > > diff -r 087aaba26589 -r e601bc0ba234 suites/libvirt- > > cim/cimtest/ElementCapabilities/03_forward_errs.py > > > --- a/suites/libvirt- > > cim/cimtest/ElementCapabilities/03_forward_errs.py Thu Mar 05 22: > > 04:39 2009 -0800 > > > +++ b/suites/libvirt- > > cim/cimtest/ElementCapabilities/03_forward_errs.py Sun Mar 08 19: > > 58:33 2009 -0700 > > > @@ -27,10 +27,11 @@ > > > from XenKvmLib import enumclass > > > from XenKvmLib.classes import get_typed_class > > > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > > > -from XenKvmLib.const import do_main > > > +from XenKvmLib.const import do_main, get_provider_version > > > from CimTest.ReturnCodes import PASS, FAIL > > > > > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > > > +libvirt_ec_changes = 815 > > > > > > exp_rc = 6 #CIM_ERR_NOT_FOUND > > > exp_desc = "No such instance" > > > @@ -42,23 +43,24 @@ > > > status = FAIL > > > rc = -1 > > > names = [] > > > - > > > + ec = get_typed_class(options.virt, "ElementCapabilities") > > > try: > > > - names = conn.AssociatorNames(ref, AssocClass = > > get_typed_class(options.virt, "ElementCapabilities")) > > > + names = conn.AssociatorNames(ref, AssocClass = ec) > > > rc = 0 > > > except pywbem.CIMError, (rc, desc): > > > if rc == exp_rc and desc.find(exp_desc) >= 0: > > > logger.info("Got expected rc code and error string") > > > status = PASS > > > else: > > > - logger.error("Unexpected rc code %s and description % > > s\n", rc, desc) > > > + logger.error("Unexpected rc code %s and description > %s\n", rc, > > > + desc) > > > except Exception, details: > > > logger.error("Unknown exception happened") > > > logger.error(details) > > > > > > if rc == 0: > > > - logger.error("ElementCapabilities associator should NOT > > return excepted \ > > > - result with a wrong key name and value of % > > s input", ref_class) > > > + logger.error("ElementCapabilities associator should NOT" + \ > > > + " return records with a wrong key name and > value") > > > > > Remove the + sign here, using slash is enough to continue the string. > > > status = FAIL > > > > > > return status > > > @@ -73,7 +75,8 @@ > > > cs = get_typed_class(options.virt, "ComputerSystem") > > > > > > instanceref = CIMInstanceName(hs, > > > - keybindings = {"Name" : > > "wrong", "CreationClassName" : "wrong"}) > > > + keybindings = {"Name" : "wrong", > > > + "CreationClassName" : "wrong"}) > > > rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) > > > > > > if rc != PASS: > > > @@ -81,8 +84,16 @@ > > > return status > > > > > > instance_cs = CIMInstanceName(cs, > > > - keybindings = {"Name" : > > "wrong", "CreationClassName" : "Xen_ComputerSystem"}) > > > - rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > > > + keybindings = {"Name" : "wrong", > > > + "CreationClassName" : cs}) > > > + > > > + curr_cim_rev, changeset = get_provider_version(options.virt, > > options.ip) > > > + if curr_cim_rev >= libvirt_ec_changes: > > > + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ > > > + " Domain not found" > > > > > Remove the "+" sign here. Only slash is enough. > > Also, instead of calling try_assoc twice you can do the following: > > > > if curr_cim_rev >= libvirt_ec_changes: > > exp_desc = "Referenced domain `wrong' does not exist:" \ > > " Domain not found" > > > > I tried to do this in the first patch, but it reports error as follows: > > ERROR - UnboundLocalError : local variable 'exp_desc' referenced > before assignment > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 141, in do_try > File "03_forward_errs.py", line 80, in main > rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) > UnboundLocalError: local variable 'exp_desc' referenced before assignment > ERROR - None The error is coming from line no 80 and not from the control stmt added. Let me check this. > > So I define a new variable of cs_exp_desc to cover this and call > try_assco twice. > > > try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > > Since exp_desc will be changed only when curr_cim_rev >= > libvirt_ec_changes. > > > > > + try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) > > > + else: > > > + rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) > > > if rc != PASS: > > > status = FAIL > > > return status > > > > > > _______________________________________________ > > > Libvirt-cim mailing list > > > Libvirt-cim at redhat.com > > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > > > > -- > > Thanks and Regards, > > Deepti B. Kalakeri > > IBM Linux Technology Center > > deeptik at linux.vnet.ibm.com > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 08:22:39 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 13:52:39 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #5 Add "AllocationCapabilities" to associate with ECTP and skip KVM_RegisteredProfile association In-Reply-To: <76034664976f61b9f702.1236583642@elm3b197.beaverton.ibm.com> References: <76034664976f61b9f702.1236583642@elm3b197.beaverton.ibm.com> Message-ID: <49B4D1CF.5010600@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 08:24:56 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 13:54:56 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#4 Fix ElementConforms/04_ectp_rev_errs.py err message In-Reply-To: References: Message-ID: <49B4D258.5070606@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 08:45:11 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 14:15:11 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with Pegasus Message-ID: <49B4D717.80200@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with Pegasus ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.5.1 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 812 Libvirt-cim changeset: bad1a43ac1b0 Cimtest revision: 642 Cimtest changeset: 087aaba26589 ================================================= FAIL : 1 XFAIL : 3 SKIP : 4 PASS : 138 ----------------- Total : 146 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'KVM_AllocationCapabilities' ERROR - Exception: Failed to verify instance CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: 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 -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 09:34:04 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 15:04:04 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 09 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49B4E28C.1070304@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 09 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 829 Libvirt-cim changeset: 1aff0d0e9bf4 Cimtest revision: Cimtest changeset: ================================================= FAIL : 8 XFAIL : 1 SKIP : 3 PASS : 134 ----------------- Total : 146 ================================================= FAIL Test Summary: ElementCapabilities - 03_forward_errs.py: FAIL ElementConforms - 01_forward.py: FAIL ElementConforms - 04_ectp_rev_errs.py: FAIL RASD - 01_verify_rasd_fields.py: FAIL RedirectionService - 03_RedirectionSAP_errs.py: FAIL VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.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 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: FAIL ERROR - Unexpected rc code 6 and description CIM_ERR_NOT_FOUND: Referenced domain `wrong' does not exist: Domain not found: xenUnifiedDomainLookupByName -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'Xen_AllocationCapabilities' ERROR - Exception: Failed to verify instance CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: FAIL ERROR - Unexpected rc code 6 and description CIM_ERR_NOT_FOUND: Referenced domain `INVALID_Name_Keyvalue' does not exist: Domain not found: xenUnifiedDomainLookupByName ERROR - ------ FAILED: INVALID_Name_Keyvalue------ -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/11:22:33:aa:bb:cc): Domain not found: xenUnifiedDomainLookupByName') ERROR - Enum RASDs failed -------------------------------------------------------------------- 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 -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain): Domain not found: xenUnifiedDomainLookupByName') -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: PASS -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL ERROR - destroy_fail>> noname: Error executing DestroySystem ERROR - (6, u'CIM_ERR_NOT_FOUND: Unable to retrieve domain name: Error 0') ERROR - destroy_fail>> nonexistent: Error executing DestroySystem ERROR - (6, u"CIM_ERR_NOT_FOUND: Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found: xenUnifiedDomainLookupByName") InvokeMethod(DestroySystem): CIM_ERR_NOT_FOUND: Unable to retrieve domain name: Error 0 InvokeMethod(DestroySystem): CIM_ERR_NOT_FOUND: Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found: xenUnifiedDomainLookupByName -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - dom_migrate migrate failed -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 09:44:22 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 15:14:22 +0530 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with Pegasus In-Reply-To: <49B4D717.80200@linux.vnet.ibm.com> References: <49B4D717.80200@linux.vnet.ibm.com> Message-ID: <49B4E4F6.1000509@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) > with Pegasus > ================================================= > Distro: Fedora release 10 (Cambridge) > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > libvirt: 0.5.1 > Hypervisor: QEMU 0.9.1 > CIMOM: Pegasus 2.7.1 > Libvirt-cim revision: 812 > Libvirt-cim changeset: bad1a43ac1b0 > Cimtest revision: 642 > Cimtest changeset: 087aaba26589 > ================================================= > FAIL : 1 > XFAIL : 3 > SKIP : 4 > PASS : 138 > ----------------- > Total : 146 > ================================================= > FAIL Test Summary: > ElementConforms - 01_forward.py: FAIL The patch for this is under review > > ================================================= > XFAIL Test Summary: > ComputerSystem - 32_start_reboot.py: XFAIL > ComputerSystem - 33_suspend_reboot.py: XFAIL > VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL > > ================================================= > SKIP Test Summary: > VSSD - 02_bootldr.py: SKIP > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > > ================================================= > Full report: > -------------------------------------------------------------------- > AllocationCapabilities - 01_enum.py: 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_rebo -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 09:57:45 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 15:27:45 +0530 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 09 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49B4E28C.1070304@linux.vnet.ibm.com> References: <49B4E28C.1070304@linux.vnet.ibm.com> Message-ID: <49B4E819.1030701@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > Test Run Summary (Mar 09 2009): Xen on Red Hat Enterprise Linux Server > release 5.3 (Tikanga) with Pegasus > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) > Kernel: 2.6.18-128.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.1 > Libvirt-cim revision: 829 > Libvirt-cim changeset: 1aff0d0e9bf4 > Cimtest revision: Cimtest changeset: > ================================================= > FAIL : 8 > XFAIL : 1 > SKIP : 3 > PASS : 134 > ----------------- > Total : 146 > ================================================= > FAIL Test Summary: > ElementCapabilities - 03_forward_errs.py: FAIL > ElementConforms - 01_forward.py: FAIL > ElementConforms - 04_ectp_rev_errs.py: FAIL Patches for these are under review. > RASD - 01_verify_rasd_fields.py: FAIL > RedirectionService - 03_RedirectionSAP_errs.py: FAIL Passed when run manually. > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL Need to look into this. > VirtualSystemMigrationService - 01_migratable_host.py: FAIL Fails to create the domain using virsh create. changing to cim_define() and cim_start should help. > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > This take too long time to execute and hence do not succeed. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 12:52:41 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 18:22:41 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 09 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49B51119.2040109@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 09 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 642 Cimtest changeset: 087aaba26589 ================================================= FAIL : 7 XFAIL : 1 SKIP : 12 PASS : 126 ----------------- Total : 146 ================================================= FAIL Test Summary: VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.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 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedAccessPoint - 01_forward.py: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: PASS -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Xen_DiskResourceAllocationSettingData instance for rstest_disk_domain not found ERROR - Failed to verify disk path for rstest_disk_domain -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - MigrateVirtualSystemToHost took too long -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Error start domain dom_migration InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Failed to start the dom: VSSDC_dom InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 9 14:21:17 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 09 Mar 2009 19:51:17 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: References: Message-ID: <49B525DD.7070300@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-09 10:45:59: > > > > > libvirt-cim-bounces at redhat.com wrote on 2009-03-09 09:45:08: > > > > > > > > > > > ================================================= > > > Test Run Summary (Mar 09 2009): KVM on Fedora release 10 > > (Cambridge)with sfcb > > > ================================================= > > > Distro: Fedora release 10 (Cambridge) > > > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > > > libvirt: 0.4.5 > > > Hypervisor: QEMU 0.9.1 > > > CIMOM: sfcb sfcbd 1.3.3preview > > > Libvirt-cim revision: 829 > > > Libvirt-cim changeset: 1aff0d0e9bf4 > > > Cimtest revision: 642 > > > Cimtest changeset: 087aaba26589 > > > ================================================= > > > FAIL : 4 > > > XFAIL : 3 > > > SKIP : 5 > > > PASS : 134 > > > ----------------- > > > Total : 146 > > > ================================================= > > > FAIL Test Summary: > > > ElementCapabilities - 03_forward_errs.py: FAIL > > I've sent a patch with fix. > > > > > ElementConforms - 01_forward.py: FAIL > > Same as above. > > > > > ElementConforms - 04_ectp_rev_errs.py: FAIL > > Same as above. > > > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > It seems this failure because that the provider has to free the > nonexistent domain in > invoking method DestroySystem. > > Here is the debugger error in sfcb: > libvir: Domain error : invalid domain pointer in virDomainFree > libvir: QEMU error : Domain not found > libvir: Domain error : invalid domain pointer in virDomainFree Daisy, The test case is written to verify the DestroySystem() returns an error when trying to remove non-existing domain and also when an invalid domain name is passed. The error statements returned seems to have changed. For ex: The err desc for DestroySystem() when non-existing domain is passed was previously CIM_ERR_FAILED:Unable to retrieve domain name is now changed to CIM_ERR_NOT_FOUND: Unable to retrieve domain name: Error 0 We need to change the way the error comparison is made. The comparison stmt like if err_desc.find(exp_value['desc']) >= 0: does not work, but if exp_value['desc'] in err_desc: works -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 10 03:03:12 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 10 Mar 2009 08:33:12 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 10 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49B5D870.1040504@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 10 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 642 Cimtest changeset: 087aaba26589 ================================================= FAIL : 8 XFAIL : 1 SKIP : 13 PASS : 124 ----------------- Total : 146 ================================================= FAIL Test Summary: VirtualSystemManagementService - 09_procrasd_persist.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.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: SKIP -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedAccessPoint - 01_forward.py: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ERROR - VirtualQuantity is 1, expected 3 ERROR - Exception: details CPU scheduling not set properly for the dom: procrasd_persist_dom -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Xen_DiskResourceAllocationSettingData instance for rstest_disk_domain not found ERROR - Failed to verify disk path for rstest_disk_domain -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - dom_migrate migrate failed Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - MigrateVirtualSystemToHost took too long -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Error start domain dom_migration InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Failed to start the dom: VSSDC_dom InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 10 04:49:43 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 10 Mar 2009 10:19:43 +0530 Subject: [Libvirt-cim] Re: Test Run Summary (Mar 10 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49B5D870.1040504@linux.vnet.ibm.com> References: <49B5D870.1040504@linux.vnet.ibm.com> Message-ID: <49B5F167.6030604@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > Test Run Summary (Mar 10 2009): XenFV on Red Hat Enterprise Linux > Server release 5.3 (Tikanga) with Pegasus > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) > Kernel: 2.6.18-128.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.1 > Libvirt-cim revision: 613 > Libvirt-cim changeset: 1fcf330fadf8+ > Cimtest revision: 642 > Cimtest changeset: 087aaba26589 > ================================================= > FAIL : 8 > XFAIL : 1 > SKIP : 13 > PASS : 124 > ----------------- > Total : 146 > ================================================= > FAIL Test Summary: > VirtualSystemManagementService - 09_procrasd_persist.py: FAIL The tc fails because the VirtualQuantity for the running guest is not the same as VirtualQuantity used when defining the guest. This tc Pass for Xen . > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL The DiskRASD['Caption'] field is not set properly. This has been used in the test while customizing the values for DiskRASD to be passed before defining the domain. > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL The test case are taking too long to start the domain to be migrated. The guest used to migrate which is in the define state seems in the mid of the transition from defined to start state. The State of the dom_migrate is set to "no state". > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL > Most of the times the dom_migrate domain that is created on the host does not get cleaned. Since all the tc uses the same images, the consecutive tests fails when they try to create a new guest. The problem is seen only with Xen/XenFV and that too with the Rhel. It takes lot of virsh destroy commands to actually destroy the guest created by the migration tc. Sometimes I need to restart the xend to see the refreshed list of domains on the host. Need to look at the workaround so that the migration tests uses other images than those used by other test cases. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Tue Mar 10 18:44:34 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 10 Mar 2009 15:44:34 -0300 Subject: [Libvirt-cim] [PATCH] Changed the output of AllocationCapability association when using DiskPool as input Message-ID: # HG changeset patch # User Richard Maciel # Date 1236119796 10800 # Node ID d2d4d7e48f871111f655398e6900bc534231a55d # Parent 1aff0d0e9bf49e738827b7157c0df407b814ae7d Changed the output of AllocationCapability association when using DiskPool as input This patch fix the results of a 'association instances' query when passing a disk pool AllocationCapabilities reference as input. Before this patch, this query returned RASD templates for the disk pools, but now it returns the RASD templates for each of the volumes which composes the disk pool passed as input. To test: - Create a domain containing a diskpool and some volumes - Execute query: wbemcli ein 'http://localhost:5988/root/virt:CIM_AllocationCapabilities' - Select the reference to a diskpool and use in an association query like the one below: wbemcli ai -nl -ac KVM_SettingsDefineCapabilities 'http://@localhost:5988/root/virt:KVM_AllocationCapabilities.InstanceID="DiskPool/default"' - There must be four templates for each volume in the diskpool (MINIMUM, MAXIMUM, DEFAULT, INCREMENT) and their address must correspond to the address of the volume Signed-off-by: Richard Maciel diff -r 1aff0d0e9bf4 -r d2d4d7e48f87 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Mar 04 15:25:33 2009 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Mar 03 19:36:36 2009 -0300 @@ -562,71 +562,23 @@ return s; } -static int get_disk_freespace(const CMPIObjectPath *ref, - CMPIStatus *s, - uint64_t *free_space) -{ - bool ret = false; - const char *inst_id; - CMPIrc prop_ret; - virConnectPtr conn; - CMPIInstance *pool_inst; - - if (cu_get_str_path(ref, "InstanceID", &inst_id) != CMPI_RC_OK) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not get InstanceID"); - goto out; - } - - conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); - if (s->rc != CMPI_RC_OK) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not get connection"); - goto out; - } - - /* Getting the relevant resource pool directly finds the free space - * for us. It is in the Capacity field. */ - *s = get_pool_by_name(_BROKER, ref, inst_id, &pool_inst); - if (s->rc != CMPI_RC_OK) - goto out; - - prop_ret = cu_get_u64_prop(pool_inst, "Capacity", free_space); - if (prop_ret != CMPI_RC_OK) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not get capacity from instance"); - goto out; - } - - CU_DEBUG("Got capacity from pool_inst: %lld", *free_space); - ret = true; - - out: - return ret; -} - static CMPIStatus set_disk_props(int type, const CMPIObjectPath *ref, const char *id, + const char *disk_path, 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}; if (type == DOMAIN_LXC) { - addr = "/tmp"; dev = "/lxc_mnt/tmp"; } else { dev = "hda"; - addr = "/dev/null"; } inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); @@ -638,7 +590,7 @@ (CMPIValue *)"MegaBytes", CMPI_chars); CMSetProperty(inst, "VirtualQuantity", (CMPIValue *)&disk_size, CMPI_uint64); - CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars); + CMSetProperty(inst, "Address", (CMPIValue *)disk_path, CMPI_chars); if (type == DOMAIN_LXC) CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); @@ -664,34 +616,28 @@ return s; } -static CMPIStatus disk_template(const CMPIObjectPath *ref, - int template_type, - struct inst_list *list) +static CMPIStatus cdrom_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) { - bool ret; char *pfx; const char *id; - uint64_t disk_size; - uint16_t emu_type = 0; + char *vol_path; + uint64_t vol_size = 0; CMPIStatus s = {CMPI_RC_OK, NULL}; + uint16_t emu_type = 1; switch(template_type) { case SDC_RASD_MIN: - disk_size = SDC_DISK_MIN; id = "Minimum"; break; case SDC_RASD_MAX: - ret = get_disk_freespace(ref, &s, &disk_size); - if (!ret) - goto out; id = "Maximum"; break; case SDC_RASD_INC: - disk_size = SDC_DISK_INC; id = "Increment"; break; case SDC_RASD_DEF: - disk_size = SDC_DISK_DEF; id = "Default"; break; default: @@ -701,6 +647,8 @@ goto out; } + vol_path = "/dev/null"; + pfx = class_prefix_name(CLASSNAME(ref)); if (STREQ(pfx, "Xen")) { @@ -708,48 +656,120 @@ int i = 0; for (; i < 2; i++) { - emu_type = 0; s = set_disk_props(xen_type[i], ref, - id, - disk_size, + id, + vol_path, + vol_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, + id, + vol_path, + vol_size, emu_type, list); - if (s.rc != CMPI_RC_OK) - goto out; - emu_type = 1; + } else if (!STREQ(pfx, "LXC")){ + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported virtualization type"); + } + + out: + return s; + +} + + +static CMPIStatus volume_template(const CMPIObjectPath *ref, + int template_type, + virStorageVolPtr volume_ptr, + struct inst_list *list) +{ + char *pfx; + const char *id; + char *vol_path; + uint64_t vol_size; + virStorageVolInfo vol_info; + CMPIStatus s = {CMPI_RC_OK, NULL}; + int retval; + uint16_t emu_type = 0; + + retval = virStorageVolGetInfo(volume_ptr, &vol_info); + if (retval == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume information"); + goto out; + } + + switch(template_type) { + case SDC_RASD_MIN: + vol_size = SDC_DISK_MIN; + id = "Minimum"; + break; + case SDC_RASD_MAX: + vol_size = (uint64_t)vol_info.capacity; + id = "Maximum"; + break; + case SDC_RASD_INC: + vol_size = SDC_DISK_INC; + id = "Increment"; + break; + case SDC_RASD_DEF: + vol_size = (uint64_t)vol_info.allocation; + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + vol_path = virStorageVolGetPath(volume_ptr); + if (vol_path == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume path"); + goto out; + } + + pfx = class_prefix_name(CLASSNAME(ref)); + + if (STREQ(pfx, "Xen")) { + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + + for (; i < 2; i++) { + s = set_disk_props(xen_type[i], + ref, + id, + vol_path, + vol_size, + emu_type, + list); + } + } else if (STREQ(pfx, "KVM")) { s = set_disk_props(DOMAIN_KVM, ref, - id, - disk_size, + id, + vol_path, + vol_size, emu_type, list); } else if (STREQ(pfx, "LXC")) { s = set_disk_props(DOMAIN_LXC, ref, id, - disk_size, + vol_path, + vol_size, emu_type, list); } else { @@ -762,6 +782,109 @@ return s; } +static CMPIStatus disk_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn = NULL; + virStoragePoolPtr poolptr = NULL; + virStorageVolPtr volptr = NULL; + const char *instid = NULL; + char *host = NULL; + const char *poolname = NULL; + char **volnames = NULL; + int numvols, numvolsret = 0; + int i; + + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + + if (cu_get_str_path(ref, "InstanceID", &instid) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get InstanceID for disk device"); + goto out; + } + + if (parse_fq_devid(instid, &host, (char **)&poolname) != 1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get pool device id"); + goto out; + } + + if ((poolptr = virStoragePoolLookupByName(conn, poolname)) == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage pool `%s' not found", + poolname); + goto out; + } + + if ((numvols = virStoragePoolNumOfVolumes(poolptr)) == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get the number of volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + + volnames = (char **)malloc(sizeof(char *) * numvols); + + numvolsret = virStoragePoolListVolumes(poolptr, + volnames, + numvols); + + if (numvolsret == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get a pointer to volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + for (i = 0; i < numvolsret; i++) { + + volptr = virStorageVolLookupByName(poolptr, volnames[i]); + if (volptr == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage Volume `%s' not found", + volnames[i]); + goto out; + } + + s = volume_template(ref, + template_type, + volptr, + list); + if (s.rc != CMPI_RC_OK) + goto out; + } + + s = cdrom_template(ref, + template_type, + list); + + out: + if(volnames != NULL) + free(volnames); + + virStorageVolFree(volptr); + virStoragePoolFree(poolptr); + virConnectClose(conn); + + return s; +} + static CMPIStatus graphics_template(const CMPIObjectPath *ref, int template_type, struct inst_list *list) From kaitlin at linux.vnet.ibm.com Tue Mar 10 19:39:22 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 10 Mar 2009 12:39:22 -0700 Subject: [Libvirt-cim] [PATCH] Changed the output of AllocationCapability association when using DiskPool as input In-Reply-To: References: Message-ID: <49B6C1EA.2070108@linux.vnet.ibm.com> > @@ -638,7 +590,7 @@ > (CMPIValue *)"MegaBytes", CMPI_chars); > CMSetProperty(inst, "VirtualQuantity", > (CMPIValue *)&disk_size, CMPI_uint64); Instead of setting the vol_size as 0, just don't set the VirtualQuantity attribute for CDROM instances. > - CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars); > + CMSetProperty(inst, "Address", (CMPIValue *)disk_path, CMPI_chars); > > if (type == DOMAIN_LXC) > CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); > @@ -664,34 +616,28 @@ > return s; > } > > -static CMPIStatus disk_template(const CMPIObjectPath *ref, > - int template_type, > - struct inst_list *list) > +static CMPIStatus cdrom_template(const CMPIObjectPath *ref, > + int template_type, > + struct inst_list *list) > { > - bool ret; > char *pfx; > const char *id; > - uint64_t disk_size; > - uint16_t emu_type = 0; > + char *vol_path; > + uint64_t vol_size = 0; > CMPIStatus s = {CMPI_RC_OK, NULL}; > + uint16_t emu_type = 1; > > switch(template_type) { > case SDC_RASD_MIN: > - disk_size = SDC_DISK_MIN; > id = "Minimum"; To distinguish these instances from other instances, can you use something like "Minimum CDROM" or something similar? > + > +static CMPIStatus volume_template(const CMPIObjectPath *ref, > + int template_type, > + virStorageVolPtr volume_ptr, > + struct inst_list *list) > +{ > + char *pfx; > + const char *id; > + char *vol_path; > + uint64_t vol_size; > + virStorageVolInfo vol_info; > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + int retval; > + uint16_t emu_type = 0; > + > + retval = virStorageVolGetInfo(volume_ptr, &vol_info); Most of the rest of the code uses "ret" for this. > + if (retval == -1) { > + virt_set_status(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + virStorageVolGetConnect(volume_ptr), > + "Unable to get volume information"); > + goto out; > + } > + > + switch(template_type) { > + case SDC_RASD_MIN: > + vol_size = SDC_DISK_MIN; If SDC_DISK_MIN is greater than vol_info.capacity, vol_info.capacity should be used instead. > + } else if (STREQ(pfx, "KVM")) { > s = set_disk_props(DOMAIN_KVM, > ref, > - id, > - disk_size, > + id, > + vol_path, > + vol_size, > emu_type, > list); > } else if (STREQ(pfx, "LXC")) { > s = set_disk_props(DOMAIN_LXC, > ref, > id, > - disk_size, > + vol_path, Containers guests don't have a disk associated with them. Instead, the Address attribute points to a directory that is used as the root directory for the guest. So you don't want to generate an LXC guest for each volume in the diskpool. And you'll want to use a dummy directory (like "/tmp") for the Address. > + vol_size, > emu_type, > list); > } else { > @@ -762,6 +782,109 @@ > return s; > } > > +static CMPIStatus disk_template(const CMPIObjectPath *ref, > + int template_type, > + struct inst_list *list) > +{ > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + virConnectPtr conn = NULL; > + virStoragePoolPtr poolptr = NULL; > + virStorageVolPtr volptr = NULL; > + const char *instid = NULL; > + char *host = NULL; > + const char *poolname = NULL; > + char **volnames = NULL; > + int numvols, numvolsret = 0; Declare these on separate lines. > + int i; > + > + > + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); > + > + if (cu_get_str_path(ref, "InstanceID", &instid) != CMPI_RC_OK) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unable to get InstanceID for disk device"); > + goto out; > + } > + > + if (parse_fq_devid(instid, &host, (char **)&poolname) != 1) { Passing a variable in this manner is pretty ugly. Instead, declare poolname as a char (and be sure to free it when you're done). The other providers do this as well, so it's good to be consistent when possible. > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unable to get pool device id"); > + goto out; > + } > + > + if ((poolptr = virStoragePoolLookupByName(conn, poolname)) == NULL) { Since virStoragePoolLookupByName(), use another variable and strdup() poolname. I know it's a few extra lines of code, but it's cleaner in my opinion. > + > + > + volnames = (char **)malloc(sizeof(char *) * numvols); Verify volnames was allocated appropriately. Return an error if it isn't. > + > + numvolsret = virStoragePoolListVolumes(poolptr, > + volnames, > + numvols); You can fit all the params on one line if you'd like. > + > + if (numvolsret == -1) { > + virt_set_status(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + conn, > + "Unable to get a pointer to volumes \ > + of storage pool `%s'", > + poolname); > + goto out; > + } > + > + for (i = 0; i < numvolsret; i++) { > + No space is needed here. > + volptr = virStorageVolLookupByName(poolptr, volnames[i]); > + if (volptr == NULL) { > + virt_set_status(_BROKER, &s, > + CMPI_RC_ERR_NOT_FOUND, > + conn, > + "Storage Volume `%s' not found", > + volnames[i]); > + goto out; > + } > + > + s = volume_template(ref, > + template_type, > + volptr, > + list); Same here, all the params can fit on one line. We usually only break up a line if it spans 80 characters. > + if (s.rc != CMPI_RC_OK) > + goto out; > + } > + > + s = cdrom_template(ref, > + template_type, > + list); > + > + out: > + if(volnames != NULL) No need for the if here. free() will check to see if the variable is NULL. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 10 20:08:36 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 10 Mar 2009 13:08:36 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: <49B4C73E.60800@linux.vnet.ibm.com> References: <49B4C73E.60800@linux.vnet.ibm.com> Message-ID: <49B6C8C4.3030505@linux.vnet.ibm.com> >> > > > Remove the "+" sign here. Only slash is enough. >> > Also, instead of calling try_assoc twice you can do the following: >> > >> > if curr_cim_rev >= libvirt_ec_changes: >> > exp_desc = "Referenced domain `wrong' does not exist:" \ >> > " Domain not found" >> > >> > I tried to do this in the first patch, but it reports error as follows: >> >> ERROR - UnboundLocalError : local variable 'exp_desc' referenced >> before assignment >> Traceback (most recent call last): >> File "./lib/XenKvmLib/const.py", line 141, in do_try >> File "03_forward_errs.py", line 80, in main >> rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) >> UnboundLocalError: local variable 'exp_desc' referenced before assignment >> ERROR - None > The error is coming from line no 80 and not from the control stmt added. > Let me check this. >> >> So I define a new variable of cs_exp_desc to cover this and call >> try_assco twice. >> This is because exp_desc is defined outside of main(). main() doesn't own the exp_desc variable, so it's unable to modify it. Instead of defining exp_desc and exp_rc at the top of the file, define both in main(). Or, you can do something like the following: cs_exp_desc = exp_desc curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) if curr_cim_rev >= libvirt_ec_changes: cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ " Domain not found" try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) Whichever is fine. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 10 20:10:14 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 10 Mar 2009 13:10:14 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: <49B4A30C.2010706@linux.vnet.ibm.com> References: <7e6e1318706b1b4e6b39.1236309456@elm3b197.beaverton.ibm.com> <49B0CF0A.3040500@linux.vnet.ibm.com> <49B198D3.9030404@linux.vnet.ibm.com> <49B4A30C.2010706@linux.vnet.ibm.com> Message-ID: <49B6C926.2040404@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Kaitlin Rupert wrote: >> >>> We should not hardcode CreationClassName to Xen_ComputerSystem. >>>> + >>>> + curr_cim_rev, changeset = get_provider_version(options.virt, >>>> options.ip) >>>> + if curr_cim_rev >= libvirt_ec_changes: >>>> + cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ >>>> + " Domain not found" >>>> >>> you dont need a + sign here. \ will work. >> >> This is not true in this case. You'll get the following error: >> >> ElementCapabilities/ - 03_forward_errs.py: FAIL >> File "03_forward_errs.py", line 92 >> cs_exp_desc = "Referenced domain `wrong' does not exist:" + >> ^ >> SyntaxError: invalid syntax >> >> The slash is needed here. > Sorry for not being clear in the above statement. > I also meant the same that we dont need a + , instead just using the > slash \ will work. > Oh,, no - you were clear. I misread what you wrote originally. That's my mistake. Thanks for the clarification! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Tue Mar 10 23:26:01 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 10 Mar 2009 20:26:01 -0300 Subject: [Libvirt-cim] [PATCH] Message-ID: <98c21125d5e24022750f.1236727561@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1236119796 10800 # Node ID 98c21125d5e24022750fa1adf12289bbbbb5a9df # Parent 1aff0d0e9bf49e738827b7157c0df407b814ae7d #2 Changed the output of AllocationCapability association when using DiskPool as input This patch fix the results of a 'association instances' query when passing a disk pool AllocationCapabilities reference as input. Before this patch, this query returned RASD templates for the disk pools, but now it returns the RASD templates for each of the volumes which composes the disk pool passed as input. 2: - Changed code style based on feedback - When emulation_type = 1 (cdrom device), the VirtualQuantity property of the template is not set - Changed ID of cdrom device - LXC is handled in a special way, because it doesn't have volumes To test: - Create a domain containing a diskpool and some volumes - Execute query: wbemcli ein 'http://localhost:5988/root/virt:CIM_AllocationCapabilities' - Select the reference to a diskpool and use in an association query like the one below: wbemcli ai -nl -ac KVM_SettingsDefineCapabilities 'http://@localhost:5988/root/virt:KVM_AllocationCapabilities.InstanceID="DiskPool/default"' - There must be four templates for each volume in the diskpool (MINIMUM, MAXIMUM, DEFAULT, INCREMENT) and their address must correspond to the address of the volume Signed-off-by: Richard Maciel diff -r 1aff0d0e9bf4 -r 98c21125d5e2 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Mar 04 15:25:33 2009 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Mar 03 19:36:36 2009 -0300 @@ -562,71 +562,23 @@ return s; } -static int get_disk_freespace(const CMPIObjectPath *ref, - CMPIStatus *s, - uint64_t *free_space) -{ - bool ret = false; - const char *inst_id; - CMPIrc prop_ret; - virConnectPtr conn; - CMPIInstance *pool_inst; - - if (cu_get_str_path(ref, "InstanceID", &inst_id) != CMPI_RC_OK) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not get InstanceID"); - goto out; - } - - conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); - if (s->rc != CMPI_RC_OK) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not get connection"); - goto out; - } - - /* Getting the relevant resource pool directly finds the free space - * for us. It is in the Capacity field. */ - *s = get_pool_by_name(_BROKER, ref, inst_id, &pool_inst); - if (s->rc != CMPI_RC_OK) - goto out; - - prop_ret = cu_get_u64_prop(pool_inst, "Capacity", free_space); - if (prop_ret != CMPI_RC_OK) { - cu_statusf(_BROKER, s, - CMPI_RC_ERR_FAILED, - "Could not get capacity from instance"); - goto out; - } - - CU_DEBUG("Got capacity from pool_inst: %lld", *free_space); - ret = true; - - out: - return ret; -} - static CMPIStatus set_disk_props(int type, const CMPIObjectPath *ref, const char *id, + const char *disk_path, 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}; if (type == DOMAIN_LXC) { - addr = "/tmp"; dev = "/lxc_mnt/tmp"; } else { dev = "hda"; - addr = "/dev/null"; } inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); @@ -636,13 +588,15 @@ CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); CMSetProperty(inst, "AllocationQuantity", (CMPIValue *)"MegaBytes", CMPI_chars); - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&disk_size, CMPI_uint64); - CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars); + CMSetProperty(inst, "Address", (CMPIValue *)disk_path, CMPI_chars); if (type == DOMAIN_LXC) CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); else { + if (emu_type == 0) + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&disk_size, CMPI_uint64); + if (type == DOMAIN_XENPV) { dev = "xvda"; CMSetProperty(inst, "Caption", @@ -664,34 +618,116 @@ return s; } -static CMPIStatus disk_template(const CMPIObjectPath *ref, - int template_type, - struct inst_list *list) +static CMPIStatus cdrom_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) { - bool ret; char *pfx; const char *id; - uint64_t disk_size; - uint16_t emu_type = 0; + char *vol_path; + uint64_t vol_size = 0; CMPIStatus s = {CMPI_RC_OK, NULL}; + uint16_t emu_type = 1; switch(template_type) { case SDC_RASD_MIN: - disk_size = SDC_DISK_MIN; + id = "Minimum CDROM"; + break; + case SDC_RASD_MAX: + id = "Maximum CDROM"; + break; + case SDC_RASD_INC: + id = "Increment CDROM"; + break; + case SDC_RASD_DEF: + id = "Default CDROM"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + vol_path = "/dev/null"; + + pfx = class_prefix_name(CLASSNAME(ref)); + + if (STREQ(pfx, "Xen")) { + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + + for (; i < 2; i++) { + s = set_disk_props(xen_type[i], + ref, + id, + vol_path, + vol_size, + emu_type, + list); + } + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, + ref, + id, + vol_path, + vol_size, + emu_type, + list); + + } else if (!STREQ(pfx, "LXC")){ + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported virtualization type"); + } + + out: + return s; + +} + + +static CMPIStatus volume_template(const CMPIObjectPath *ref, + int template_type, + virStorageVolPtr volume_ptr, + struct inst_list *list) +{ + char *pfx; + const char *id; + char *vol_path; + uint64_t vol_size; + virStorageVolInfo vol_info; + CMPIStatus s = {CMPI_RC_OK, NULL}; + int ret; + uint16_t emu_type = 0; + + ret = virStorageVolGetInfo(volume_ptr, &vol_info); + if (ret == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume information"); + goto out; + } + + switch(template_type) { + case SDC_RASD_MIN: + if (SDC_DISK_MIN > (uint64_t)vol_info.capacity) + vol_size = (uint64_t)vol_info.capacity; + else + vol_size = SDC_DISK_MIN; id = "Minimum"; break; case SDC_RASD_MAX: - ret = get_disk_freespace(ref, &s, &disk_size); - if (!ret) - goto out; + vol_size = (uint64_t)vol_info.capacity; id = "Maximum"; break; case SDC_RASD_INC: - disk_size = SDC_DISK_INC; + vol_size = SDC_DISK_INC; id = "Increment"; break; case SDC_RASD_DEF: - disk_size = SDC_DISK_DEF; + vol_size = (uint64_t)vol_info.allocation; id = "Default"; break; default: @@ -701,6 +737,15 @@ goto out; } + vol_path = virStorageVolGetPath(volume_ptr); + if (vol_path == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume path"); + goto out; + } + pfx = class_prefix_name(CLASSNAME(ref)); if (STREQ(pfx, "Xen")) { @@ -708,48 +753,20 @@ int i = 0; for (; i < 2; i++) { - emu_type = 0; s = set_disk_props(xen_type[i], ref, - id, - disk_size, + id, + vol_path, + vol_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; - - 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, + id, + vol_path, + vol_size, emu_type, list); } else { @@ -762,6 +779,157 @@ return s; } +static CMPIStatus lxc_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + uint64_t vol_size = 0; + int emu_type = 0; + char *vol_path = "/tmp"; + const char *id; + + CMPIStatus s = {CMPI_RC_OK, NULL}; + + switch(template_type) { + case SDC_RASD_MIN: + id = "Minimum"; + break; + case SDC_RASD_MAX: + id = "Maximum"; + break; + case SDC_RASD_INC: + id = "Increment"; + break; + case SDC_RASD_DEF: + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + s = set_disk_props(DOMAIN_LXC, + ref, + id, + vol_path, + vol_size, + emu_type, + list); + + out: + return s; + +} + +static CMPIStatus disk_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn = NULL; + virStoragePoolPtr poolptr = NULL; + virStorageVolPtr volptr = NULL; + const char *instid = NULL; + char *host = NULL; + const char *poolname = NULL; + char **volnames = NULL; + int numvols = 0; + int numvolsret = 0; + int i; + char *pfx = NULL; + + pfx = class_prefix_name(CLASSNAME(ref)); + if (STREQ(pfx, "LXC")) { + s = lxc_template(ref, template_type, list); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + + if (cu_get_str_path(ref, "InstanceID", &instid) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get InstanceID for disk device"); + goto out; + } + + if (parse_fq_devid(instid, &host, (char **)&poolname) != 1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get pool device id"); + goto out; + } + + if ((poolptr = virStoragePoolLookupByName(conn, poolname)) == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage pool `%s' not found", + poolname); + goto out; + } + + if ((numvols = virStoragePoolNumOfVolumes(poolptr)) == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get the number of volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + volnames = (char **)malloc(sizeof(char *) * numvols); + if (volnames == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Could not allocate space for list of volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + numvolsret = virStoragePoolListVolumes(poolptr, volnames, numvols); + + if (numvolsret == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get a pointer to volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + for (i = 0; i < numvolsret; i++) { + volptr = virStorageVolLookupByName(poolptr, volnames[i]); + if (volptr == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage Volume `%s' not found", + volnames[i]); + goto out; + } + + s = volume_template(ref, template_type, volptr, list); + if (s.rc != CMPI_RC_OK) + goto out; + } + + s = cdrom_template(ref, template_type, list); + + out: + free(volnames); + virStorageVolFree(volptr); + virStoragePoolFree(poolptr); + virConnectClose(conn); + + return s; +} + static CMPIStatus graphics_template(const CMPIObjectPath *ref, int template_type, struct inst_list *list) From yunguol at cn.ibm.com Wed Mar 11 03:01:36 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 11 Mar 2009 11:01:36 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: <49B6C8C4.3030505@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-11 04:08:36: > >> > > > Remove the "+" sign here. Only slash is enough. > >> > Also, instead of calling try_assoc twice you can do the following: > >> > > >> > if curr_cim_rev >= libvirt_ec_changes: > >> > exp_desc = "Referenced domain `wrong' does not exist:" \ > >> > " Domain not found" > >> > > >> > I tried to do this in the first patch, but it reports error as follows: > >> > >> ERROR - UnboundLocalError : local variable 'exp_desc' referenced > >> before assignment > >> Traceback (most recent call last): > >> File "./lib/XenKvmLib/const.py", line 141, in do_try > >> File "03_forward_errs.py", line 80, in main > >> rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) > >> UnboundLocalError: local variable 'exp_desc' referenced before assignment > >> ERROR - None > > The error is coming from line no 80 and not from the control stmt added. > > Let me check this. > >> > >> So I define a new variable of cs_exp_desc to cover this and call > >> try_assco twice. > >> > > This is because exp_desc is defined outside of main(). main() doesn't > own the exp_desc variable, so it's unable to modify it. > > Instead of defining exp_desc and exp_rc at the top of the file, define > both in main(). > > Or, you can do something like the following: > > cs_exp_desc = exp_desc > > curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > if curr_cim_rev >= libvirt_ec_changes: > cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ > " Domain not found" > > try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) > > Whichever is fine. I submit a patch like the second option before, and deepti suggested that it's not a good idea to call the try_assoc() twice. I will submit a new patch with define the exp_rc and exp_desc inside of main(). Thanks! > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 11 05:28:07 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 10 Mar 2009 22:28:07 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#4 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message Message-ID: <676a8b05baa09b69052d.1236749287@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236749279 25200 # Node ID 676a8b05baa09b69052d519c7b438b301bea849c # Parent a78b6f23ebaa8a38fa591e420d742aa03cd9e515 [TEST]#4 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message Updates from 3 to 4: Define exp_desc and exp_rc inside of main() Updates from 2 to 3: Get correct CS Name instead of hard code of "Xen_ComputerSystem" Updates from 1 to 2: Use a variable to assign revision value to be calculated for comparison Also fix the line to meet 80 length Tested for KVM/LXC with current sources and rpm Signed-off-by: Guolian Yun diff -r a78b6f23ebaa -r 676a8b05baa0 suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py --- a/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Mon Mar 09 00:27:12 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ElementCapabilities/03_forward_errs.py Tue Mar 10 22:27:59 2009 -0700 @@ -27,13 +27,11 @@ from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] - -exp_rc = 6 #CIM_ERR_NOT_FOUND -exp_desc = "No such instance" +libvirt_ec_changes = 815 def try_assoc(ref, ref_class, exp_rc, exp_desc, options): conn = assoc.myWBEMConnection('http://%s' % options.ip, @@ -42,23 +40,24 @@ status = FAIL rc = -1 names = [] - + ec = get_typed_class(options.virt, "ElementCapabilities") try: - names = conn.AssociatorNames(ref, AssocClass = get_typed_class(options.virt, "ElementCapabilities")) + names = conn.AssociatorNames(ref, AssocClass = ec) rc = 0 except pywbem.CIMError, (rc, desc): if rc == exp_rc and desc.find(exp_desc) >= 0: logger.info("Got expected rc code and error string") status = PASS else: - logger.error("Unexpected rc code %s and description %s\n", rc, desc) + logger.error("Unexpected rc code %s and description %s\n", rc, + desc) except Exception, details: logger.error("Unknown exception happened") logger.error(details) if rc == 0: - logger.error("ElementCapabilities associator should NOT return excepted \ - result with a wrong key name and value of %s input", ref_class) + logger.error("ElementCapabilities associator should NOT" \ + " return records with a wrong key name and value") status = FAIL return status @@ -66,6 +65,9 @@ @do_main(sup_types) def main(): + exp_rc = 6 #CIM_ERR_NOT_FOUND + exp_desc = "No such instance" + options = main.options rc = PASS @@ -73,7 +75,8 @@ cs = get_typed_class(options.virt, "ComputerSystem") instanceref = CIMInstanceName(hs, - keybindings = {"Name" : "wrong", "CreationClassName" : "wrong"}) + keybindings = {"Name" : "wrong", + "CreationClassName" : "wrong"}) rc = try_assoc(instanceref, hs, exp_rc, exp_desc, options) if rc != PASS: @@ -81,7 +84,13 @@ return status instance_cs = CIMInstanceName(cs, - keybindings = {"Name" : "wrong", "CreationClassName" : "Xen_ComputerSystem"}) + keybindings = {"Name" : "wrong", + "CreationClassName" : cs}) + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev >= libvirt_ec_changes: + exp_desc = "Referenced domain `wrong' does not exist:" \ + " Domain not found" rc = try_assoc(instance_cs, cs, exp_rc, exp_desc, options) if rc != PASS: status = FAIL From yunguol at cn.ibm.com Wed Mar 11 05:53:09 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 11 Mar 2009 13:53:09 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-09 13:54:28: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-09 10:45:59: > > > > > libvirt-cim-bounces at redhat.com wrote on 2009-03-09 09:45:08: > > > > > > > > > > > ================================================= > > > Test Run Summary (Mar 09 2009): KVM on Fedora release 10 > > (Cambridge)with sfcb > > > ================================================= > > > Distro: Fedora release 10 (Cambridge) > > > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > > > libvirt: 0.4.5 > > > Hypervisor: QEMU 0.9.1 > > > CIMOM: sfcb sfcbd 1.3.3preview > > > Libvirt-cim revision: 829 > > > Libvirt-cim changeset: 1aff0d0e9bf4 > > > Cimtest revision: 642 > > > Cimtest changeset: 087aaba26589 > > > ================================================= > > > FAIL : 4 > > > XFAIL : 3 > > > SKIP : 5 > > > PASS : 134 > > > ----------------- > > > Total : 146 > > > ================================================= > > > FAIL Test Summary: > > > ElementCapabilities - 03_forward_errs.py: FAIL > > I've sent a patch with fix. > > > > > ElementConforms - 01_forward.py: FAIL > > Same as above. > > > > > ElementConforms - 04_ectp_rev_errs.py: FAIL > > Same as above. > > > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > It seems this failure because that the provider has to free the > nonexistent domain in > invoking method DestroySystem. > > Here is the debugger error in sfcb: > libvir: Domain error : invalid domain pointer in virDomainFree > libvir: QEMU error : Domain not found > libvir: Domain error : invalid domain pointer in virDomainFree > > Kaitlin, can you help me look into this? > Thanks! > Kaitlin - Are you free to look into it this week? > > > > > > ================================================= > > > XFAIL Test Summary: > > > ComputerSystem - 32_start_reboot.py: XFAIL > > > ComputerSystem - 33_suspend_reboot.py: XFAIL > > > VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL > > > > > > ================================================= > > > SKIP Test Summary: > > > VSSD - 02_bootldr.py: SKIP > > > VirtualSystemManagementService - 06_addresource.py: SKIP > > > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > > > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > > > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > > > > > > ================================================= > > > Full report: > > > -------------------------------------------------------------------- > > > AllocationCapabilities - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 02_nosystems.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 03_defineVS.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 04_defineStartVS.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 05_activate_defined_start.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 06_paused_active_suspend.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 22_define_suspend.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 23_pause_pause.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 27_define_pause_errs.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 32_start_reboot.py: XFAIL > > > ERROR - Got CIM error 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): 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 State not supported with > > return code 7 > > > 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: PASS > > > -------------------------------------------------------------------- > > > ComputerSystem - 42_cs_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > ComputerSystemIndication - 01_created_indication.py: PASS > > > -------------------------------------------------------------------- > > > ElementAllocatedFromPool - 01_forward.py: PASS > > > -------------------------------------------------------------------- > > > ElementAllocatedFromPool - 02_reverse.py: PASS > > > -------------------------------------------------------------------- > > > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > > > -------------------------------------------------------------------- > > > ElementAllocatedFromPool - 04_forward_errs.py: PASS > > > -------------------------------------------------------------------- > > > ElementCapabilities - 01_forward.py: PASS > > > -------------------------------------------------------------------- > > > ElementCapabilities - 02_reverse.py: PASS > > > -------------------------------------------------------------------- > > > ElementCapabilities - 03_forward_errs.py: FAIL > > > ERROR - Unexpected rc code 6 and description > > > Referenced domain `wrong' does not exist: Domain not found > > > > > > -------------------------------------------------------------------- > > > ElementCapabilities - 04_reverse_errs.py: PASS > > > -------------------------------------------------------------------- > > > ElementCapabilities - 05_hostsystem_cap.py: PASS > > > -------------------------------------------------------------------- > > > ElementConforms - 01_forward.py: FAIL > > > ERROR - verify_fields() exception: > > > u'KVM_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: FAIL > > > ERROR - Unexpected rc code 6 and description > > > Referenced domain `INVALID_Name_Keyvalue' does not exist: Domainnot found > > > > > > ERROR - ------ FAILED: INVALID_Name_Keyvalue------ > > > -------------------------------------------------------------------- > > > ElementSettingData - 01_forward.py: PASS > > > -------------------------------------------------------------------- > > > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > > > -------------------------------------------------------------------- > > > EnabledLogicalElementCapabilities - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > HostSystem - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > HostSystem - 02_hostsystem_to_rasd.py: PASS > > > -------------------------------------------------------------------- > > > HostSystem - 03_hs_to_settdefcap.py: PASS > > > -------------------------------------------------------------------- > > > HostSystem - 04_hs_to_EAPF.py: PASS > > > -------------------------------------------------------------------- > > > HostSystem - 05_hs_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > HostSystem - 06_hs_to_vsms.py: PASS > > > -------------------------------------------------------------------- > > > 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 > > > -------------------------------------------------------------------- > > > KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS > > > -------------------------------------------------------------------- > > > LogicalDisk - 01_disk.py: PASS > > > -------------------------------------------------------------------- > > > LogicalDisk - 02_nodevs.py: PASS > > > -------------------------------------------------------------------- > > > LogicalDisk - 03_ld_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > Memory - 01_memory.py: PASS > > > -------------------------------------------------------------------- > > > Memory - 02_defgetmem.py: PASS > > > -------------------------------------------------------------------- > > > Memory - 03_mem_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > NetworkPort - 01_netport.py: PASS > > > -------------------------------------------------------------------- > > > NetworkPort - 02_np_gi_errors.py: PASS > > > -------------------------------------------------------------------- > > > NetworkPort - 03_user_netport.py: PASS > > > -------------------------------------------------------------------- > > > Processor - 01_processor.py: PASS > > > -------------------------------------------------------------------- > > > Processor - 02_definesys_get_procs.py: PASS > > > -------------------------------------------------------------------- > > > Processor - 03_proc_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > Profile - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > Profile - 02_profile_to_elec.py: PASS > > > -------------------------------------------------------------------- > > > Profile - 03_rprofile_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > RASD - 01_verify_rasd_fields.py: PASS > > > -------------------------------------------------------------------- > > > RASD - 02_enum.py: PASS > > > -------------------------------------------------------------------- > > > RASD - 03_rasd_errs.py: PASS > > > -------------------------------------------------------------------- > > > RASD - 04_disk_rasd_size.py: PASS > > > -------------------------------------------------------------------- > > > RASD - 05_disk_rasd_emu_type.py: PASS > > > -------------------------------------------------------------------- > > > RedirectionService - 01_enum_crs.py: PASS > > > -------------------------------------------------------------------- > > > RedirectionService - 02_enum_crscap.py: PASS > > > -------------------------------------------------------------------- > > > RedirectionService - 03_RedirectionSAP_errs.py: PASS > > > -------------------------------------------------------------------- > > > ReferencedProfile - 01_verify_refprof.py: PASS > > > -------------------------------------------------------------------- > > > ReferencedProfile - 02_refprofile_errs.py: PASS > > > -------------------------------------------------------------------- > > > ResourceAllocationFromPool - 01_forward.py: PASS > > > -------------------------------------------------------------------- > > > ResourceAllocationFromPool - 02_reverse.py: PASS > > > -------------------------------------------------------------------- > > > ResourceAllocationFromPool - 03_forward_errs.py: PASS > > > -------------------------------------------------------------------- > > > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > > > -------------------------------------------------------------------- > > > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePool - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePool - 02_rp_gi_errors.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePoolConfigurationService - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePoolConfigurationService - > > 06_RemoveResourcesFromResourcePool.py: PASS > > > -------------------------------------------------------------------- > > > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > > > -------------------------------------------------------------------- > > > ServiceAccessBySAP - 01_forward.py: PASS > > > -------------------------------------------------------------------- > > > ServiceAccessBySAP - 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 > > > -------------------------------------------------------------------- > > > VSSD - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > VSSD - 02_bootldr.py: SKIP > > > -------------------------------------------------------------------- > > > VSSD - 03_vssd_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > VSSD - 04_vssd_to_rasd.py: PASS > > > -------------------------------------------------------------------- > > > VirtualSystemManagementCapabilities - 01_enum.py: PASS > > > -------------------------------------------------------------------- > > > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > > > -------------------------------------------------------------------- > > > VirtualSystemManagementService - 01_definesystem_name.py: PASS > > > -------------------------------------------------------------------- > > > VirtualSystemManagementService - 02_destroysystem.py: PASS > > > -------------------------------------------------------------------- > > > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > > > -------------------------------------------------------------------- > > > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > > > -------------------------------------------------------------------- > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > > ERROR - destroy_fail>> noname: Error executing > > DestroySystem > > > ERROR - (6, u'Unable to retrieve domain name: Error 0') > > > ERROR - destroy_fail>> nonexistent: Error executing > > > DestroySystem > > > ERROR - (6, u"Referenced domain `##@@!! > > > cimtest_domain' does not exist: Domain not found") > > > InvokeMethod(DestroySystem): Unable to retrieve domain name: Error 0 > > > InvokeMethod(DestroySystem): Referenced domain `##@@!! > > > cimtest_domain' does not exist: Domain not found > > > -------------------------------------------------------------------- > > > VirtualSystemManagementService - 06_addresource.py: SKIP > > > ERROR - Need to give different bridge name since it > > > already exists > > > -------------------------------------------------------------------- > > > VirtualSystemManagementService - 07_addresource_neg.py: PASS > > > -------------------------------------------------------------------- > > > VirtualSystemManagementService - 08_modifyresource.py: PASS > > > -------------------------------------------------------------------- > > > 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 > > > -------------------------------------------------------------------- > > > 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 > > > -------------------------------------------------------------------- > > > _______________________________________________ > > > Libvirt-cim mailing list > > > Libvirt-cim at redhat.com > > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 11 08:13:23 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 11 Mar 2009 01:13:23 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource Message-ID: <0e350cf7bbab15c07d94.1236759203@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236759196 25200 # Node ID 0e350cf7bbab15c07d948976435ff4fe1b4ab597 # Parent a78b6f23ebaa8a38fa591e420d742aa03cd9e515 [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource This tc verify disk and network devices now, follow up patch will verify input and graphics devices Tested for KVM/Xen/XenFV with current sources and rpm Signed-off-by: Guolian Yun diff -r a78b6f23ebaa -r 0e350cf7bbab suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py Wed Mar 11 01:13:16 2009 -0700 @@ -0,0 +1,109 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Guolian Yun +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +import sys +import pywbem +import random +from pywbem.cim_obj import CIMInstanceName +from XenKvmLib import vsms +from XenKvmLib import vxml +from XenKvmLib.classes import get_typed_class +from CimTest.Globals import logger +from XenKvmLib.const import do_main, get_provider_version, default_network_name +from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool +from XenKvmLib.xm_virt_util import get_bridge_from_network_xml + +sup_types = ['Xen', 'KVM', 'XenFV'] +default_dom = 'domain' +libvirt_cim_dev_xml = 828 +ntype = 'network' +nmac = '00:11:22:33:44:55' +npool_name = default_network_name + str(random.randint(1, 100)) + + at do_main(sup_types) +def main(): + options = main.options + + if options.virt == 'KVM': + nddev = 'hdb' + else: + nddev = 'xvdb' + + cxml = vxml.get_class(options.virt)(default_dom, disk=nddev, mac=nmac) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + return FAIL + + drasd = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') + drasd_id = '%s/%s' % (default_dom, nddev) + dkeys = {'InstanceID' : drasd_id} + + nrasd = get_typed_class(options.virt, 'NetResourceAllocationSettingData') + nrasd_id = '%s/%s' % (default_dom, nmac) + nkeys = {'InstanceID' : nrasd_id} + + status, net_name = create_netpool_conf(options.ip, options.virt, + use_existing=False, + net_name=npool_name) + if status != PASS: + logger.error('Unable to create network pool') + return FAIL + + dresource = CIMInstanceName(drasd, keybindings = dkeys) + nresource = CIMInstanceName(nrasd, keybindings = nkeys) + + service = vsms.get_vsms_class(options.virt)(options.ip) + try: + service.RemoveResourceSettings(ResourceSettings=[dresource, nresource]) + except Exception, details: + logger.error('Failed to remove % or %s', dresource, nresource) + logger.error(details) + cxml.undefine(options.ip) + destroy_netpool(options.ip, options.virt, net_name) + return FAIL + + cxml.dumpxml(options.ip) + disk = cxml.get_value_xpath('/domain/devices/disk/target/@dev[. = "%s"]' + % nddev) + if options.virt == 'KVM': + net = cxml.get_value_xpath( + '/domain/devices/interface/source/@network[. = "%s"]' % nmac) + else: + br = get_bridge_from_network_xml(net_name, options.ip, options.virt) + net = cxml.get_value_xpath( + '/domain/devices/interface/source/@bridge[. = "%s"]' % br) + + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if disk != None and net != None and curr_cim_rev >= libvirt_cim_dev_xml: + logger.error('The resource is not removerd successfully') + cxml.undefine(options.ip) + destroy_netpool(options.ip, options.virt, net_name) + return FAIL + + cxml.undefine(options.ip) + destroy_netpool(options.ip, options.virt, net_name) + return PASS + +if __name__ == "__main__": + sys.exit(main()) From kaitlin at linux.vnet.ibm.com Wed Mar 11 21:33:44 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 11 Mar 2009 14:33:44 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: References: Message-ID: <49B82E38.60904@linux.vnet.ibm.com> > > >> ERROR - None > > > The error is coming from line no 80 and not from the control stmt > added. > > > Let me check this. > > >> > > >> So I define a new variable of cs_exp_desc to cover this and call > > >> try_assco twice. > > >> > > > > This is because exp_desc is defined outside of main(). main() doesn't > > own the exp_desc variable, so it's unable to modify it. > > > > Instead of defining exp_desc and exp_rc at the top of the file, define > > both in main(). > > > > Or, you can do something like the following: > > > > cs_exp_desc = exp_desc > > > > curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > > if curr_cim_rev >= libvirt_ec_changes: > > cs_exp_desc = "Referenced domain `wrong' does not exist:" + \ > > " Domain not found" > > > > try_assoc(instance_cs, cs, exp_rc, cs_exp_desc, options) > > > > Whichever is fine. > > I submit a patch like the second option before, and deepti > suggested that it's not a good idea to call the try_assoc() twice. > I will submit a new patch with define the exp_rc and exp_desc inside > of main(). > > Thanks! With either option, you only call try_assoc() once. But the first option is fine. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Mar 11 22:07:19 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 11 Mar 2009 15:07:19 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: <0e350cf7bbab15c07d94.1236759203@elm3b197.beaverton.ibm.com> References: <0e350cf7bbab15c07d94.1236759203@elm3b197.beaverton.ibm.com> Message-ID: <49B83617.7040103@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236759196 25200 > # Node ID 0e350cf7bbab15c07d948976435ff4fe1b4ab597 > # Parent a78b6f23ebaa8a38fa591e420d742aa03cd9e515 > [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource > > > This tc verify disk and network devices now, follow up patch will verify input and graphics devices > > Tested for KVM/Xen/XenFV with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r a78b6f23ebaa -r 0e350cf7bbab suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py Wed Mar 11 01:13:16 2009 -0700 > @@ -0,0 +1,109 @@ > +#!/usr/bin/python > +# > +# Copyright 2008 IBM Corp. Change date to 2009. > + > +import sys > +import pywbem Redundant import - this can be removed. > +import random > +from pywbem.cim_obj import CIMInstanceName > +from XenKvmLib import vsms Instead of importing the whole module, just import get_vsms_class(). > +from XenKvmLib import vxml Instead of importing the whole module, just import get_class(). > +from XenKvmLib.classes import get_typed_class > +from CimTest.Globals import logger > +from XenKvmLib.const import do_main, get_provider_version, default_network_name > +from CimTest.ReturnCodes import FAIL, PASS > +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool > +from XenKvmLib.xm_virt_util import get_bridge_from_network_xml > + > +sup_types = ['Xen', 'KVM', 'XenFV'] > +default_dom = 'domain' > +libvirt_cim_dev_xml = 828 This variable is a bit oddly named. Can you use something like rem_res_err_rev? Or something that is more descriptive of the actual changeset? > +ntype = 'network' > +nmac = '00:11:22:33:44:55' > +npool_name = default_network_name + str(random.randint(1, 100)) > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + if options.virt == 'KVM': > + nddev = 'hdb' > + else: > + nddev = 'xvdb' > + > + cxml = vxml.get_class(options.virt)(default_dom, disk=nddev, mac=nmac) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to define the dom: %s", default_dom) > + return FAIL > + > + drasd = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') > + drasd_id = '%s/%s' % (default_dom, nddev) > + dkeys = {'InstanceID' : drasd_id} > + > + nrasd = get_typed_class(options.virt, 'NetResourceAllocationSettingData') > + nrasd_id = '%s/%s' % (default_dom, nmac) > + nkeys = {'InstanceID' : nrasd_id} Instead of hand building the instances for the resources, use the proper association calls to get the RASD instances. You know the guest, so you can use SystemDevice to get the resource instance, and then SettingsDefineState to get the RASD instances. > + > + status, net_name = create_netpool_conf(options.ip, options.virt, > + use_existing=False, > + net_name=npool_name) Why are you creating a network? The guest is created using the default network that already exists. > + if status != PASS: > + logger.error('Unable to create network pool') > + return FAIL > + > + dresource = CIMInstanceName(drasd, keybindings = dkeys) > + nresource = CIMInstanceName(nrasd, keybindings = nkeys) > + > + service = vsms.get_vsms_class(options.virt)(options.ip) > + try: > + service.RemoveResourceSettings(ResourceSettings=[dresource, nresource]) > + except Exception, details: > + logger.error('Failed to remove % or %s', dresource, nresource) > + logger.error(details) > + cxml.undefine(options.ip) > + destroy_netpool(options.ip, options.virt, net_name) > + return FAIL > + > + cxml.dumpxml(options.ip) > + disk = cxml.get_value_xpath('/domain/devices/disk/target/@dev[. = "%s"]' > + % nddev) > + if options.virt == 'KVM': > + net = cxml.get_value_xpath( > + '/domain/devices/interface/source/@network[. = "%s"]' % nmac) > + else: > + br = get_bridge_from_network_xml(net_name, options.ip, options.virt) > + net = cxml.get_value_xpath( > + '/domain/devices/interface/source/@bridge[. = "%s"]' % br) You are checking for the name of the pool you created - this isn't the same pool that was used to define the guest. > + > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if disk != None and net != None and curr_cim_rev >= libvirt_cim_dev_xml: This is actually a regression - the RemoveResources() call did work prior to changeset 779. So, you'll want to return an XFAIL if the revision is: 779 <= rev <= 828. Instead of checking disk and net in one if, break it up so that you can return an error message for each resource that fails: if disk != None: logger.error('The disk device was not removed successfully') if net != None: logger.error('The network device was not removed successfully') > + logger.error('The resource is not removerd successfully') > + cxml.undefine(options.ip) > + destroy_netpool(options.ip, options.virt, net_name) > + return FAIL > + > + cxml.undefine(options.ip) > + destroy_netpool(options.ip, options.virt, net_name) > + return PASS > + I would use exceptions so that you only need to call undefine() once. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 12 00:36:40 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 11 Mar 2009 17:36:40 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Make sure network pool is created with a random IP Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1236818181 25200 # Node ID abe81a5626e7959f17e51c52a29003aa31ff6e41 # Parent 5c33dc7241b63d77428d7f5e852df69d48c2cb50 [TEST] Make sure network pool is created with a random IP. This will help prevent overlap with existing networks. However, this won't completely prevent the issue. We'd need to do test to see if the IP address is already used by a different network. If the network is in use, then another IP address should be used. Signed-off-by: Kaitlin Rupert diff -r 5c33dc7241b6 -r abe81a5626e7 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Dec 18 14:10:33 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Mar 11 17:36:21 2009 -0700 @@ -32,6 +32,7 @@ # shared by XenXML & KVMXML. import os import sys +import random import platform import tempfile from time import sleep @@ -182,7 +183,6 @@ def get_valid_bridge_name(server): bridge_list = live.available_bridges(server) if bridgename in bridge_list: - import random vbr = bridgename + str(random.randint(1, 100)) if vbr in bridge_list: logger.error('Need to give different bridge name ' @@ -210,10 +210,14 @@ subnet = '192.168.122.' self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', forwardDelay='0') - ip = self.add_sub_node(network, 'ip', address=subnet+'1', + ip_base = random.randint(1, 100) + addr = address=subnet+'%d' % ip_base + + ip = self.add_sub_node(network, 'ip', address=address, netmask='255.255.255.0') dhcp = self.add_sub_node(ip, 'dhcp') - self.add_sub_node(dhcp, 'range', start=subnet+'2', + range_addr = subnet+'%d' % (ip_base + 1) + self.add_sub_node(dhcp, 'range', start=range_addr, end=subnet+'254') def create_vnet(self): From kaitlin at linux.vnet.ibm.com Thu Mar 12 03:07:05 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 11 Mar 2009 20:07:05 -0700 Subject: [Libvirt-cim] Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with sfcb In-Reply-To: References: Message-ID: <49B87C59.8060802@linux.vnet.ibm.com> > > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > > > It seems this failure because that the provider has to free the > > nonexistent domain in > > invoking method DestroySystem. > > > > Here is the debugger error in sfcb: > > libvir: Domain error : invalid domain pointer in virDomainFree > > libvir: QEMU error : Domain not found > > libvir: Domain error : invalid domain pointer in virDomainFree > > > > Kaitlin, can you help me look into this? > > Thanks! > > > Kaitlin - Are you free to look into it this week? Deepti responded to your message. Did her recommendation help? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 12 03:30:55 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 11 Mar 2009 20:30:55 -0700 Subject: [Libvirt-cim] [PATCH] In-Reply-To: <98c21125d5e24022750f.1236727561@localhost.localdomain> References: <98c21125d5e24022750f.1236727561@localhost.localdomain> Message-ID: <49B881EF.9000605@linux.vnet.ibm.com> Richard Maciel wrote: > # HG changeset patch > # User Richard Maciel > # Date 1236119796 10800 > # Node ID 98c21125d5e24022750fa1adf12289bbbbb5a9df > # Parent 1aff0d0e9bf49e738827b7157c0df407b814ae7d > #2 Changed the output of AllocationCapability association when using DiskPool as input > > This patch fix the results of a 'association instances' query when passing a disk pool AllocationCapabilities reference as input. Before this patch, this query returned RASD templates for the disk pools, but now it returns the RASD templates for each of the volumes which composes the disk pool passed as input. > > 2: > - Changed code style based on feedback > - When emulation_type = 1 (cdrom device), the VirtualQuantity property of the template is not set > - Changed ID of cdrom device > - LXC is handled in a special way, because it doesn't have volumes > > To test: > - Create a domain containing a diskpool and some volumes > - Execute query: wbemcli ein 'http://localhost:5988/root/virt:CIM_AllocationCapabilities' > - Select the reference to a diskpool and use in an association query like the one below: > > wbemcli ai -nl -ac KVM_SettingsDefineCapabilities 'http://@localhost:5988/root/virt:KVM_AllocationCapabilities.InstanceID="DiskPool/default"' > > - There must be four templates for each volume in the diskpool (MINIMUM, MAXIMUM, DEFAULT, INCREMENT) and their address must correspond to the address of the volume > > Signed-off-by: Richard Maciel > > diff -r 1aff0d0e9bf4 -r 98c21125d5e2 src/Virt_SettingsDefineCapabilities.c These changes look good. However, I failed to catch it in my previous review, but these changes won't be compatible with versions of libvirt that don't have diskpool support. You'll need to generate the DiskRASDs in that situation as it's handled in the original code. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Mar 12 07:15:31 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 12 Mar 2009 12:45:31 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Make sure network pool is created with a random IP In-Reply-To: References: Message-ID: <49B8B693.8020606@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1236818181 25200 > # Node ID abe81a5626e7959f17e51c52a29003aa31ff6e41 > # Parent 5c33dc7241b63d77428d7f5e852df69d48c2cb50 > [TEST] Make sure network pool is created with a random IP. > > This will help prevent overlap with existing networks. However, this won't > completely prevent the issue. We'd need to do test to see if the IP address > is already used by a different network. If the network is in use, then another > IP address should be used. > > Signed-off-by: Kaitlin Rupert > > diff -r 5c33dc7241b6 -r abe81a5626e7 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Dec 18 14:10:33 2008 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Mar 11 17:36:21 2009 -0700 > @@ -32,6 +32,7 @@ > # shared by XenXML & KVMXML. > import os > import sys > +import random > import platform > import tempfile > from time import sleep > @@ -182,7 +183,6 @@ > def get_valid_bridge_name(server): > bridge_list = live.available_bridges(server) > if bridgename in bridge_list: > - import random > vbr = bridgename + str(random.randint(1, 100)) > if vbr in bridge_list: > logger.error('Need to give different bridge name ' > @@ -210,10 +210,14 @@ > subnet = '192.168.122.' > self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', > forwardDelay='0') > - ip = self.add_sub_node(network, 'ip', address=subnet+'1', > + ip_base = random.randint(1, 100) > + addr = address=subnet+'%d' % ip_base > addr is not used later at all. Hence can be removed. > + > + ip = self.add_sub_node(network, 'ip', address=address, > netmask='255.255.255.0') > dhcp = self.add_sub_node(ip, 'dhcp') > - self.add_sub_node(dhcp, 'range', start=subnet+'2', > + range_addr = subnet+'%d' % (ip_base + 1) > + self.add_sub_node(dhcp, 'range', start=range_addr, > end=subnet+'254') > > > We can do something like the below to print more appropriate error message when the ip ranges are already used for some other network pool. n_list = xm_virt_util.net_list(server, virt) for net_name in n_list: cmd = "virsh net-dumpxml %s | awk '/range/ {print}' \ | tr -s [:space:] | cut -d ' ' -f 3,4" % net_name s, range = utils.run_remote(server, cmd) start_addr, end_addr=range.split('end=') if start_addr == address or range_addr == end_addr: logger.error("Range already used in use") > def create_vnet(self): > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Mar 12 07:41:23 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 12 Mar 2009 13:11:23 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#4 Fix ElementCapabilities/03_forward_errs.py with provider's updated err message In-Reply-To: <676a8b05baa09b69052d.1236749287@elm3b197.beaverton.ibm.com> References: <676a8b05baa09b69052d.1236749287@elm3b197.beaverton.ibm.com> Message-ID: <49B8BCA3.6010302@linux.vnet.ibm.com> +1. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Mar 12 10:32:16 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 12 Mar 2009 03:32:16 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] [TEST] Adding option to main.py to accept target machine info for Migration Tests In-Reply-To: References: Message-ID: <873ac33542e0a2cfc49a.1236853936@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1236853111 25200 # Node ID 873ac33542e0a2cfc49a7f1ca89c0190bafe58cd # Parent 676a8b05baa09b69052d519c7b438b301bea849c [TEST] Adding option to main.py to accept target machine info for Migration Tests. Signed-off-by: Deepti B. Kalakeri diff -r 676a8b05baa0 -r 873ac33542e0 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Tue Mar 10 22:27:59 2009 -0700 +++ b/suites/libvirt-cim/main.py Thu Mar 12 03:18:31 2009 -0700 @@ -44,6 +44,8 @@ parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", help="IP address of machine to test (default: localhost)") +parser.add_option("-m", "--target_url", dest="t_url", default="localhost:5988", + help="URL of destination host for remote migration ") parser.add_option("-p", "--port", dest="port", type="int", default=5988, help="CIMOM port (default: 5988)") parser.add_option("-g", "--group", dest="group", @@ -199,6 +201,21 @@ # with a different port if options.port: os.environ['CIMOM_PORT'] = str(options.port) + + if ":" in options.ip: + (s_sysname, port) = options.ip.split(":") + else: + s_sysname = options.ip + + if ":" in options.t_url: + (t_sysname, port) = options.t_url.split(":") + else: + t_sysname = options.t_url + + # HACK: To be able to use the src and target host + # comparison for remote migration + os.environ['SRC_IP'] = str(s_sysname) + os.environ['TARGET_IP'] = str(t_sysname) if options.report: to_addr = options.report From deeptik at linux.vnet.ibm.com Thu Mar 12 10:32:17 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 12 Mar 2009 03:32:17 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] [TEST]Modifying emulator information to be used for KVM In-Reply-To: References: Message-ID: <555e0df8d5ac2d5a42a4.1236853937@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1236853346 25200 # Node ID 555e0df8d5ac2d5a42a4f6d839e35194cf98a2d6 # Parent 873ac33542e0a2cfc49a7f1ca89c0190bafe58cd [TEST]Modifying emulator information to be used for KVM. Signed-off-by: Deepti B. Kalakeri diff -r 873ac33542e0 -r 555e0df8d5ac suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Mar 12 03:18:31 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Mar 12 03:22:26 2009 -0700 @@ -82,10 +82,12 @@ Xen_default_mac = '11:22:33:aa:bb:cc' # vxml.KVMXML -if fv_cap(CIM_IP): - KVM_default_emulator = '/usr/bin/qemu-kvm' -else: - KVM_default_emulator = '/usr/bin/qemu' +KVM_default_emulator = '/usr/local/bin/qemu-system-x86_64' +if not os.path.exists(KVM_default_emulator): + if fv_cap(CIM_IP): + KVM_default_emulator = '/usr/bin/qemu-kvm' + else: + KVM_default_emulator = '/usr/bin/qemu' KVM_disk_path = os.path.join(_image_dir, 'default-kvm-dimage') KVM_secondary_disk_path = os.path.join(_image_dir, 'default-kvm-dimage.2ND') KVM_default_disk_dev = 'hda' From deeptik at linux.vnet.ibm.com Thu Mar 12 10:32:15 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 12 Mar 2009 03:32:15 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] [TEST][RFC] Added new tc to verify remote live migration. Message-ID: Verified with KVM. The test case will not pass for KVM since the guest information needs to have emulator information without which the remote migration fails. The support to pass the emulator information via VirtualSystemMigrationSettingData is not yet available. As a workaround for verification of the tc. ------------------------------------------- 1) create a KVM VM which has the emulator information outside the tc on the comman line. 2) comment out the setup_guest() call. 3) specify the name of the guest create in test_dom before calling local_remote_migrate(). Signed-off-by: Deepti B. Kalakeri From deeptik at linux.vnet.ibm.com Thu Mar 12 10:32:18 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 12 Mar 2009 03:32:18 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] [TEST] Adding support for remote migration in the vsmigrations library In-Reply-To: References: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1236853527 25200 # Node ID caae383c83ec70e6cb6de9b6e5ccf6d2fcbecb45 # Parent 555e0df8d5ac2d5a42a4f6d839e35194cf98a2d6 [TEST] Adding support for remote migration in the vsmigrations library. Signed-off-by: Deepti B. Kalakeri diff -r 555e0df8d5ac -r caae383c83ec suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Thu Mar 12 03:22:26 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Thu Mar 12 03:25:27 2009 -0700 @@ -3,6 +3,7 @@ # # Authors: # Guolian Yun +# Deepti B. Kalakeri # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public @@ -18,34 +19,59 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -import pywbem -import time +# + +from time import sleep +from pywbem import WBEMConnection, CIMInstanceName from CimTest.CimExt import CIMMethodClass, CIMClassMOF -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.test_doms import destroy_and_undefine_domain -from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib import enumclass -from XenKvmLib.classes import get_typed_class +from XenKvmLib.classes import get_typed_class, virt_types from XenKvmLib.xm_virt_util import domain_list from XenKvmLib.const import get_provider_version +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ + CIM_ERROR_ENUMERATE +# Migration constants +CIM_MIGRATE_OFFLINE=1 +CIM_MIGRATE_LIVE=2 +CIM_MIGRATE_RESUME=3 +CIM_MIGRATE_RESTART=4 + +CIM_JOBSTATE_STARTING=3 +CIM_JOBSTATE_COMPLETE=7 +CIM_JOBSTATE_RUNNING=4 libvirt_mig_changes = 668 +def eval_cls(basename): + def func(f): + def body(virt): + if virt in virt_types: + return eval(get_typed_class(virt, basename)) + return body + return func + + class CIM_VirtualSystemMigrationService(CIMMethodClass): conn = None inst = None - def __init__(self, server, hyp): - self.conn = pywbem.WBEMConnection('http://%s' % server, - (CIM_USER, CIM_PASS), CIM_NS) + def __init__(self, server, virt='Xen'): + self.conn = WBEMConnection('http://%s' % server, + (CIM_USER, CIM_PASS), CIM_NS) - self.inst = hyp + '_VirtualSystemMigrationService' + self.inst = get_typed_class(virt, 'VirtualSystemMigrationService') + at eval_cls('VirtualSystemMigrationService') +def get_vs_mig_setting_class(virt): + pass + class Xen_VirtualSystemMigrationService(CIM_VirtualSystemMigrationService): - def __init__(self, server): - CIM_VirtualSystemMigrationService.__init__(self, server, 'Xen') + pass + +class KVM_VirtualSystemMigrationService(CIM_VirtualSystemMigrationService): + pass # classes to define VirtualSystemMigrationSettingData parameters class CIM_VirtualSystemMigrationSettingData(CIMClassMOF): @@ -56,118 +82,233 @@ self.Priority = priority class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - def __init__(self, type, priority): - CIM_VirtualSystemMigrationSettingData.__init__(self, type, - priority) + pass class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - def __init__(self, type, priority): - CIM_VirtualSystemMigrationSettingData.__init__(self, type, - priority) + pass +def get_msd(virt, mtype='live', mpriority=0): + if mtype == "live": + mtype = CIM_MIGRATE_LIVE + elif mtype == "resume": + mtype = CIM_MIGRATE_RESUME + elif mtype == "restart": + mtype = CIM_MIGRATE_RESTART + elif mtype == "offline": + mtype = CIM_MIGRATE_OFFLINE + else: + logger.error("Invalid migration type '%s' specified", mtype) + return None + try: + vsmsd_cn = get_typed_class(virt, "VirtualSystemMigrationSettingData") + msd = eval(vsmsd_cn)(type=mtype, priority=mpriority) + except Exception, details: + logger.error("In get_msd() Exception details: %s", details) + return None + + return msd.mof() + +def get_guest_ref(guest, virt): + guest_cn = get_typed_class(virt, "ComputerSystem") + keys = { 'Name' : guest, 'CreationClassName' : guest_cn } + cs_ref = None + + try: + cs_ref = CIMInstanceName(guest_cn, keybindings=keys) + + except Exception, details: + logger.error("In fn get_guest_ref() Exception details: %s", details) + return None + + return cs_ref + +#Remove this once vsms.02_host_migrate_type.py uses get_msd() def default_msd_str(mtype=3, mpriority=0): msd = Xen_VirtualSystemMigrationSettingData(type=mtype, priority=mpriority) return msd.mof() -def check_possible_host_migration(service, cs_ref, ip): - rc = None +def check_possible_host_migration(service, cs_ref, ip, msd=None): + res = None try: - rc = service.CheckVirtualSystemIsMigratableToHost(ComputerSystem=cs_ref, - DestinationHost=ip) + checkfn_name = 'service.CheckVirtualSystemIsMigratableToHost' + if msd == None: + res = eval(checkfn_name)(ComputerSystem=cs_ref, DestinationHost=ip) + else: + res = eval(checkfn_name)(ComputerSystem=cs_ref, + DestinationHost=ip, + MigrationSettingData=msd) except Exception, details: - logger.error("Error invoke 'CheckVirtualSystemIsMigratableToHost\'.") + logger.error("Error invoke 'CheckVirtualSystemIsMigratableToHost'.") logger.error("%s", details) return FAIL - if rc == None or rc[1]['IsMigratable'] != True: + if res == None or res[1]['IsMigratable'] != True: + logger.error("Migration check failed") return FAIL return PASS -def migrate_guest_to_host(service, ref, ip, msd=None): + +def migrate_guest_to_host(service, cs_ref, dest_ip, msd=None): ret = [] try: if msd == None: - ret = service.MigrateVirtualSystemToHost(ComputerSystem=ref, - DestinationHost=ip) + ret = service.MigrateVirtualSystemToHost(ComputerSystem=cs_ref, + DestinationHost=dest_ip) else: - ret = service.MigrateVirtualSystemToHost(ComputerSystem=ref, - DestinationHost=ip, + ret = service.MigrateVirtualSystemToHost(ComputerSystem=cs_ref, + DestinationHost=dest_ip, MigrationSettingData=msd) except Exception, details: - logger.error("Error invoke method 'MigrateVirtualSystemToHost\'.") - logger.error("%s", details) + logger.error("Failed to invoke method 'MigrateVirtualSystemToHost'.") + logger.error("Exception in fn migrate_guest_to_host() %s", details) return FAIL, ret if len(ret) == 0: logger.error("MigrateVirtualSystemToHost returns an empty list") return FAIL, ret + return PASS, ret -def get_migration_job_instance(ip, virt, id): +def get_migration_job_instance(src_ip, virt, id): job = [] - key_list = ["instanceid"] - curr_cim_rev, changeset = get_provider_version(virt, ip) + curr_cim_rev, changeset = get_provider_version(virt, src_ip) if curr_cim_rev < libvirt_mig_changes: mig_job_cn = 'Virt_MigrationJob' else: mig_job_cn = get_typed_class(virt, 'MigrationJob') try: - job = enumclass.EnumInstances(ip, mig_job_cn) + job = enumclass.EnumInstances(src_ip, mig_job_cn) + if len(job) < 1: + return FAIL, None + + for i in range(0, len(job)): + if job[i].InstanceID == id: + break + elif i == len(job)-1 and job[i].InstanceID != id: + logger.error("%s err: can't find expected job inst", mig_job_cn) + return FAIL, None except Exception, details: logger.error(CIM_ERROR_ENUMERATE, mig_job_cn) - logger.error(details) + logger.error("Exception in fn get_migration_job_instance() " \ + "details: %s", details) return FAIL, None - if len(job) < 1: - return FAIL, None - - for i in range(0, len(job)): - if job[i].InstanceID == id: - break - elif i == len(job)-1 and job[i].InstanceID != id: - logger.error("%s err: can't find expected job inst", mig_job_cn) - return FAIL, None - return PASS, job[i] -def verify_domain_list(list, local_migrate, test_dom): - status = PASS - if local_migrate == 0 and test_dom not in list: - status = FAIL - if local_migrate == 1 and test_dom in list: +def verify_domain_list(remote_migrate, test_dom, src_ip, target_ip): + status = FAIL + list_src = domain_list(src_ip) + if remote_migrate == 0: + if test_dom in list_src: + status = PASS + elif remote_migrate == 1 : + list_target = domain_list(target_ip) + if test_dom not in list_src and test_dom in list_target: + status = PASS + else: + logger.error("Invalid migration option") + + if status != PASS: + logger.error("Migration verification for '%s' failed", test_dom) + return status + + return status + +def check_migration_job(src_ip, id, target_ip, test_dom, + remote_migrate, virt='Xen', timeout=50): + try: + status, job_inst = get_migration_job_instance(src_ip, virt, id) + if status != PASS: + logger.error("Unable to get mig_job instance for '%s'", test_dom) + return FAIL + status = FAIL - if status != PASS: - logger.error("%s migrate failed", test_dom) + for i in range(0, timeout): + if job_inst.JobState == CIM_JOBSTATE_COMPLETE: + sleep(3) + if job_inst.Status != "Completed": + logger.error("Failed to set the status for the migrated " \ + "dom: '%s'", test_dom) + return FAIL + else: + status = verify_domain_list(remote_migrate, test_dom, + src_ip, target_ip) + if status != FAIL: + logger.info("Migration job status is : %s", + job_inst.Status) + logger.info("Migration for '%s' succeeded.", test_dom) + return status + elif job_inst.JobState == CIM_JOBSTATE_RUNNING and i < (timeout-1): + sleep(3) + status, job_inst = get_migration_job_instance(src_ip, virt, id) + if status != PASS: + logger.error("Could not get mig_job instance for '%s'", + test_dom) + return status + else: + logger.error("Migration timed out.... ") + logger.error("Increase timeout > %s and try again..", timeout) + return FAIL + + except Exception, details: + logger.error("In check_migration_job() Exception details: %s", details) + return FAIL +# +# This fn executes local/remote migration depending on the +# value of remote_migrate. +# Parameters used: +# vsmservice = VSMigrationService Instance +# s_sysname = src host on which migration is initiated +# t_sysname = Target machine for migration +# virt = Xen, KVM +# remote_migrate = 1 [for remote migration, 0 for local] +# mtype = live/resume/offline/restart +# mpriority=0 by default +# guest_name = name of the guest to be migrated +# time_out = time for which migration is tried. +# +def local_remote_migrate(vsmservice, s_sysname, t_sysname, virt='KVM', + remote_migrate=1, mtype='live', mpriority=0, + guest_name=None, time_out=40): + + if guest_name == None: + logger.error("Guest to be migrated not specified.") + return FAIL + + # Get the guest ref + guest_ref = get_guest_ref(guest_name, virt) + if guest_ref == None or guest_ref['Name'] != guest_name: + logger.error("Failed to get the guest refernce to be migrated") + return FAIL + + # Get MigrationSettingData information + msd = get_msd(virt, mtype, mpriority) + if msd == None: return FAIL - return PASS - -def check_migration_job(ip, id, target_ip, test_dom, local_migrate, virt='Xen'): - status, job_inst = get_migration_job_instance(ip, virt, id) + # Verify is destination(t_sysname) can be used for migration + status = check_possible_host_migration(vsmservice, guest_ref, + t_sysname, msd) if status != PASS: return FAIL - for i in range(0, 50): - if job_inst.JobState == 7: - if job_inst.Status != "Completed": - logger.error("%s migrate failed", test_dom) - return FAIL - list_after = domain_list(ip) - status = verify_domain_list(list_after, local_migrate, test_dom) - break - elif job_inst.JobState == 4 and i < 49: - time.sleep(3) - status, job_inst = get_migration_job_instance(ip, virt, id) - if status != PASS: - return FAIL - else: - logger.error("MigrateVirtualSystemToHost took too long") - return FAIL + logger.info("Migrating %s.. this will take some time.", guest_name) + # Migrate the guest to t_sysname + status, ret = migrate_guest_to_host(vsmservice, guest_ref, t_sysname, msd) + if status == FAIL: + logger.error("Failed to Migrate guest '%s' from '%s' to '%s'", + guest_name, s_sysname, t_sysname) + return status + elif len(ret) == 2: + id = ret[1]['Job'].keybindings['InstanceID'] - return PASS + # Verify if migration status + status = check_migration_job(s_sysname, id, t_sysname, guest_name, + remote_migrate, virt, timeout=time_out) + return status From deeptik at linux.vnet.ibm.com Thu Mar 12 10:32:19 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 12 Mar 2009 03:32:19 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST][RFC] Added new tc to verify remote live migration In-Reply-To: References: Message-ID: <89db4ac2378c90fd8984.1236853939@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1236853868 25200 # Node ID 89db4ac2378c90fd89845dd09836bfb39cc6e6ed # Parent caae383c83ec70e6cb6de9b6e5ccf6d2fcbecb45 [TEST][RFC] Added new tc to verify remote live migration. Verified with KVM. The test case will not pass for KVM since the guest information needs to have emulator information without which the remote migration fails. The support to pass the emulator information via VirtualSystemMigrationSettingData is not yet available. Signed-off-by: Deepti B. Kalakeri diff -r caae383c83ec -r 89db4ac2378c suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_migration.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_migration.py Thu Mar 12 03:31:08 2009 -0700 @@ -0,0 +1,111 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# +# 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 testcase is used to verify the live remote migration. +# +# Date : 12-03-09 +# + +import sys +import os +import time +import socket +from XenKvmLib import vxml +from XenKvmLib.common_util import poll_for_state_change +from CimTest.Globals import logger +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.classes import get_typed_class +from XenKvmLib.vsmigrations import local_remote_migrate, \ + get_vs_mig_setting_class + +sup_types = ['KVM', 'Xen'] + +REQUESTED_STATE = 2 + +def setup_guest(test_dom, ip, virt): + virt_xml = vxml.get_class(virt) + cxml = virt_xml(test_dom) + ret = cxml.cim_define(ip) + if not ret: + logger.error("Error define domain %s", test_dom) + return FAIL, cxml + + status = cxml.cim_start(ip) + if status != PASS: + logger.error("Error to start domain %s", test_dom) + return FAIL, cxml + + status, dom_cs = poll_for_state_change(ip, virt, test_dom, + REQUESTED_STATE) + if status != PASS: + raise Exception("%s didn't change state as expected" % test_dom) + return FAIL, cxml + + return PASS, cxml + + at do_main(sup_types) +def main(): + options = main.options + virt = options.virt + s_sysname = os.environ['SRC_IP'] + t_sysname = os.environ['TARGET_IP'] + if options.virt == 'KVM' and t_sysname == s_sysname: + logger.info("Libvirt does not support local migratoin for KVM") + return SKIP + + status = FAIL + test_dom = 'VM_frm_' + socket.gethostname() + + try: + status, cxml = setup_guest(test_dom, s_sysname, virt) + if status != PASS: + logger.error("Error setting up the guest") + return status + + # Migrate the test_dom to t_sysname. + # local_remote_migrate executes live migration by default + # Enable remote migration by setting remote_migrate=1 + vsms_cn = get_vs_mig_setting_class(virt) + vsmservice = vsms_cn(s_sysname, virt) + status = local_remote_migrate(vsmservice, s_sysname, t_sysname, virt, + remote_migrate=1, guest_name=test_dom) + except Exception,details: + logger.error("Exception details :%s", details) + cxml.cim_destroy(s_sysname) + cxml.undefine(s_sysname) + return FAIL + + if status == PASS: + # Remote Migration Successful, clean the domain on target machine + cxml.cim_destroy(t_sysname) + cxml.undefine(t_sysname) + else: + # Remote Migration not Successful, clean the domain on src machine + cxml.cim_destroy(s_sysname) + cxml.undefine(s_sysname) + + return status + +if __name__ == "__main__": + sys.exit(main()) From kaitlin at linux.vnet.ibm.com Thu Mar 12 19:46:27 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 12 Mar 2009 12:46:27 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Make sure network pool is created with a random IP In-Reply-To: <49B8B693.8020606@linux.vnet.ibm.com> References: <49B8B693.8020606@linux.vnet.ibm.com> Message-ID: <49B96693.8070404@linux.vnet.ibm.com> >> @@ -210,10 +210,14 @@ >> subnet = '192.168.122.' >> self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', >> forwardDelay='0') >> - ip = self.add_sub_node(network, 'ip', address=subnet+'1', >> + ip_base = random.randint(1, 100) >> + addr = address=subnet+'%d' % ip_base >> > addr is not used later at all. Hence can be removed. >> + >> + ip = self.add_sub_node(network, 'ip', address=address, >> netmask='255.255.255.0') >> dhcp = self.add_sub_node(ip, 'dhcp') >> - self.add_sub_node(dhcp, 'range', start=subnet+'2', >> + range_addr = subnet+'%d' % (ip_base + 1) >> + self.add_sub_node(dhcp, 'range', start=range_addr, >> end=subnet+'254') >> >> >> > We can do something like the below to print more appropriate error > message when the ip ranges are already used for some other network pool. > > > n_list = xm_virt_util.net_list(server, virt) > for net_name in n_list: > cmd = "virsh net-dumpxml %s | awk '/range/ {print}' \ > | tr -s [:space:] | cut -d ' ' -f 3,4" % net_name > s, range = utils.run_remote(server, cmd) > start_addr, end_addr=range.split('end=') > if start_addr == address or range_addr == end_addr: > logger.error("Range already used in use") > This is a good idea - thanks Deepti! I mispoke on a previous mail.. the issue is that the value for the IP address, not the range, is already in use. But a similar fix would work. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 12 20:45:28 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 12 Mar 2009 13:45:28 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Make sure network pool is created with a random IP Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1236890700 25200 # Node ID ab10caadc452bc5413f7776a978214241b6ae2f9 # Parent 676a8b05baa09b69052d519c7b438b301bea849c [TEST] #2 Make sure network pool is created with a random IP. This will help prevent overlap with existing networks. However, this won't completely prevent the issue. We'd need to do test to see if the IP address is already used by a different network. If the network is in use, then another IP address should be used. Updates: -Check to see if pool with the specified IP range exists, if so, return a meaningful error -Since the NetXML generates a random IP, creating a NetXML object in the destroy call will generate an object with a different IP. Instead, use the virsh call to destroy the network. Signed-off-by: Kaitlin Rupert diff -r 676a8b05baa0 -r ab10caadc452 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Mar 10 22:27:59 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Mar 12 13:45:00 2009 -0700 @@ -36,7 +36,7 @@ CIM_ERROR_GETINSTANCE from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list,\ - domain_list, virt2uri + domain_list, virt2uri, net_destroy from XenKvmLib.vxml import PoolXML, NetXML from VirtLib import utils from XenKvmLib.const import default_pool_name, default_network_name @@ -438,11 +438,9 @@ if net_name == None: return FAIL - netxml = NetXML(server, virt=virt, networkname=net_name) - ret = netxml.destroy_vnet() - if not ret: - logger.error("Failed to destroy Virtual Network '%s'", - net_name) + ret = net_destroy(net_name, server, virt) + if ret != 0: + logger.error("Failed to destroy Virtual Network '%s'", net_name) return FAIL return PASS diff -r 676a8b05baa0 -r ab10caadc452 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Mar 10 22:27:59 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Mar 12 13:45:00 2009 -0700 @@ -32,6 +32,7 @@ # shared by XenXML & KVMXML. import os import sys +import random import platform import tempfile from time import sleep @@ -39,7 +40,8 @@ from xml.dom import minidom, Node from xml import xpath from VirtLib import utils, live -from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader +from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader, \ + net_list from XenKvmLib.test_doms import set_uuid, viruuid from XenKvmLib import vsms from XenKvmLib import const @@ -182,7 +184,6 @@ def get_valid_bridge_name(server): bridge_list = live.available_bridges(server) if bridgename in bridge_list: - import random vbr = bridgename + str(random.randint(1, 100)) if vbr in bridge_list: logger.error('Need to give different bridge name ' @@ -207,13 +208,27 @@ self.add_sub_node(network, 'name', self.net_name) self.add_sub_node(network, 'uuid', set_uuid()) self.add_sub_node(network, 'forward') - subnet = '192.168.122.' + subnet = '192.168.123.' self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', forwardDelay='0') - ip = self.add_sub_node(network, 'ip', address=subnet+'1', + ip_base = random.randint(1, 100) + addr = subnet+'%d' % ip_base + addr = subnet+'1' + + n_list = net_list(server, virt) + for _net_name in n_list: + cmd = "virsh net-dumpxml %s | 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("'") + if in_use_addr == addr: + logger.error("IP address is in use by a different network") + + ip = self.add_sub_node(network, 'ip', address=addr, netmask='255.255.255.0') dhcp = self.add_sub_node(ip, 'dhcp') - self.add_sub_node(dhcp, 'range', start=subnet+'2', + range_addr = subnet+'%d' % (ip_base + 1) + self.add_sub_node(dhcp, 'range', start=range_addr, end=subnet+'254') def create_vnet(self): diff -r 676a8b05baa0 -r ab10caadc452 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Mar 10 22:27:59 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Thu Mar 12 13:45:00 2009 -0700 @@ -184,6 +184,14 @@ if len(bridge) > 1: return bridge[1] +def net_destroy(network, server, virt="Xen"): + """Function destroys a given virtual network""" + + cmd = "virsh -c %s net-destroy %s" % (virt2uri(virt), network) + ret, out = utils.run_remote(server, cmd) + + return ret + def network_by_bridge(bridge, server, virt="Xen"): """Function returns virtual network for a given bridge""" From kaitlin at linux.vnet.ibm.com Thu Mar 12 20:51:23 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 12 Mar 2009 13:51:23 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] In cim_state_change(), return FAIL since status isn't set yet Message-ID: <0529bffff3f4a6f739e2.1236891083@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1236890998 25200 # Node ID 0529bffff3f4a6f739e2589e42f5406cc1296b51 # Parent ab10caadc452bc5413f7776a978214241b6ae2f9 [TEST] In cim_state_change(), return FAIL since status isn't set yet. Signed-off-by: Kaitlin Rupert diff -r ab10caadc452 -r 0529bffff3f4 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Mar 12 13:45:00 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Mar 12 13:49:58 2009 -0700 @@ -610,7 +610,7 @@ keys = { 'Name' : self.domain_name, 'CreationClassName' : cs_class } cs = GetInstance(server, cs_class, keys) if cs is None or cs.Name != self.domain_name: - return status + return FAIL try: req_state_change = pywbem.cim_types.Uint16(req_state) From kaitlin at linux.vnet.ibm.com Thu Mar 12 23:27:11 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 12 Mar 2009 16:27:11 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] [TEST] Adding support for remote migration in the vsmigrations library In-Reply-To: References: Message-ID: <49B99A4F.6070208@linux.vnet.ibm.com> > > -def get_migration_job_instance(ip, virt, id): > +def get_migration_job_instance(src_ip, virt, id): > job = [] > - key_list = ["instanceid"] > - curr_cim_rev, changeset = get_provider_version(virt, ip) > + curr_cim_rev, changeset = get_provider_version(virt, src_ip) > if curr_cim_rev < libvirt_mig_changes: > mig_job_cn = 'Virt_MigrationJob' > else: > mig_job_cn = get_typed_class(virt, 'MigrationJob') > > try: > - job = enumclass.EnumInstances(ip, mig_job_cn) > + job = enumclass.EnumInstances(src_ip, mig_job_cn) > + if len(job) < 1: Can you print an error here indicating that no job instances were returned? > > -def verify_domain_list(list, local_migrate, test_dom): > - status = PASS > - if local_migrate == 0 and test_dom not in list: > - status = FAIL > - if local_migrate == 1 and test_dom in list: > +def verify_domain_list(remote_migrate, test_dom, src_ip, target_ip): > + status = FAIL > + list_src = domain_list(src_ip) > + if remote_migrate == 0: > + if test_dom in list_src: > + status = PASS > + elif remote_migrate == 1 : > + list_target = domain_list(target_ip) The verification fails for me when migrating a KVM guest. Here's the error message I see: VirtualSystemMigrationService - 06_remote_migration.py: FAIL ERROR - Migration verification for 'f10_test' failed You'll need to specify the virtualization type - otherwise, it calls domain_list() for Xen hyp. Here's what I see when I print the contents of the list_src and list_target: ['Xen', 'Xen', 'failed'] > + if test_dom not in list_src and test_dom in list_target: > + status = PASS > + else: > + logger.error("Invalid migration option") > + > + if status != PASS: > + logger.error("Migration verification for '%s' failed", test_dom) > + return status > + > + return status > + > +def check_migration_job(src_ip, id, target_ip, test_dom, > + remote_migrate, virt='Xen', timeout=50): > + try: > + status, job_inst = get_migration_job_instance(src_ip, virt, id) > + if status != PASS: > + logger.error("Unable to get mig_job instance for '%s'", test_dom) > + return FAIL > + > status = FAIL > > - if status != PASS: > - logger.error("%s migrate failed", test_dom) > + for i in range(0, timeout): > + if job_inst.JobState == CIM_JOBSTATE_COMPLETE: > + sleep(3) > + if job_inst.Status != "Completed": > + logger.error("Failed to set the status for the migrated " \ > + "dom: '%s'", test_dom) Can you also print the job_inst.Status as well? Right now, libvirt doesn't print much when a migration fails, but it might print more info in the future. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 12 23:34:34 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 12 Mar 2009 16:34:34 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST][RFC] Added new tc to verify remote live migration In-Reply-To: <89db4ac2378c90fd8984.1236853939@localhost.localdomain> References: <89db4ac2378c90fd8984.1236853939@localhost.localdomain> Message-ID: <49B99C0A.7040905@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1236853868 25200 > # Node ID 89db4ac2378c90fd89845dd09836bfb39cc6e6ed > # Parent caae383c83ec70e6cb6de9b6e5ccf6d2fcbecb45 > [TEST][RFC] Added new tc to verify remote live migration. > > Verified with KVM. > The test case will not pass for KVM since the guest information needs to have emulator > information without which the remote migration fails. > The support to pass the emulator information via VirtualSystemMigrationSettingData is > not yet available. I haven't verified this on Xen yet. > +def main(): > + options = main.options > + virt = options.virt > + s_sysname = os.environ['SRC_IP'] You already know the source IP from options.ip - do you need to set an environment variable for it? > + t_sysname = os.environ['TARGET_IP'] Shouldn't you be able to the target ip from main.options the same way we get the source IP? > + if options.virt == 'KVM' and t_sysname == s_sysname: > + logger.info("Libvirt does not support local migratoin for KVM") > + return SKIP > + > + status = FAIL > + test_dom = 'VM_frm_' + socket.gethostname() > + > + try: > + status, cxml = setup_guest(test_dom, s_sysname, virt) > + if status != PASS: > + logger.error("Error setting up the guest") > + return status > + > + # Migrate the test_dom to t_sysname. > + # local_remote_migrate executes live migration by default > + # Enable remote migration by setting remote_migrate=1 > + vsms_cn = get_vs_mig_setting_class(virt) > + vsmservice = vsms_cn(s_sysname, virt) > + status = local_remote_migrate(vsmservice, s_sysname, t_sysname, virt, > + remote_migrate=1, guest_name=test_dom) Why not have local_remote_migrate() get its own VirtualSystemMigrationService object? There's no need to pass it in here because it's not used later on.. Or are you planning to have future tests use it for something? > + except Exception,details: > + logger.error("Exception details :%s", details) > + cxml.cim_destroy(s_sysname) > + cxml.undefine(s_sysname) > + return FAIL > + > + if status == PASS: > + # Remote Migration Successful, clean the domain on target machine > + cxml.cim_destroy(t_sysname) > + cxml.undefine(t_sysname) > + else: > + # Remote Migration not Successful, clean the domain on src machine > + cxml.cim_destroy(s_sysname) > + cxml.undefine(s_sysname) > + Technically, if the migration fails partway through migrating a guest, it's possible for the guest to end up on both systems. So it'd be good to check both the source and the target to see if the guest exists (and remove it if it does). -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Fri Mar 13 02:48:28 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 12 Mar 2009 19:48:28 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message Message-ID: <6e1a1d69588b34117d08.1236912508@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1236912499 25200 # Node ID 6e1a1d69588b34117d087a3f8c9e8dbc50618f9b # Parent 676a8b05baa09b69052d519c7b438b301bea849c [TEST] Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r 676a8b05baa0 -r 6e1a1d69588b suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Tue Mar 10 22:27:59 2009 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Thu Mar 12 19:48:19 2009 -0700 @@ -29,16 +29,18 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib.test_doms import undefine_test_domain from CimTest.Globals import logger -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import FAIL, PASS, SKIP sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] vsms_status_version = 534 +vsms_err_message = 814 def destroysystem_fail(tc, options): service = vsms.get_vsms_class(options.virt)(options.ip) classname = get_typed_class(options.virt, 'ComputerSystem') + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) if tc == 'noname': cs_ref = CIMInstanceName(classname, @@ -47,6 +49,10 @@ exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to retrieve domain name.' } + if curr_cim_rev >= vsms_err_message: + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : 'Unable to retrieve domain name: Error 0' + } elif tc == 'nonexistent': cs_ref = CIMInstanceName(classname,keybindings = { @@ -56,6 +62,10 @@ exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, 'desc' : 'Failed to find domain' } + if curr_cim_rev >= vsms_err_message: + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : "Referenced domain `##@@!!cimtest_domain'" \ + " does not exist: Domain not found"} else: return SKIP @@ -68,7 +78,7 @@ err_no = details[0] err_desc = details[1] if err_no == exp_value['rc'] and err_desc.find(exp_value['desc']) >= 0: - logger.error("For Invalid Scenario '%s'", tc) + logger.info("For Invalid Scenario '%s'", tc) logger.info('Got expected error no: %s', err_no) logger.info('Got expected error desc: %s',err_desc) return PASS @@ -82,7 +92,7 @@ options = main.options rc1 = destroysystem_fail('noname', options) rc2 = destroysystem_fail('nonexistent', options) - + status = FAIL if rc1 == PASS and rc2 == PASS: status = PASS From yunguol at cn.ibm.com Fri Mar 13 02:42:50 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 13 Mar 2009 10:42:50 +0800 Subject: [Fwd: Re: [Libvirt-cim] Test Run Summary (Mar 09 2009): KVM on Fedora release 10 (Cambridge) with sfcb] In-Reply-To: <49B87CAE.5040101@linux.vnet.ibm.com> Message-ID: Kaitlin Rupert wrote on 2009-03-12 11:08:30: > Just in case you missed it on the list.. > > These messages you're seeing are expected failures. The test case is > trying to destroy a guest that no longer exists. So you would expect to > see errors in the provider debug, right? I debug the provider and get the error message. This failure because of the error message updates in VSMS provider. I send a patch with fix. Thanks for all your help =) Now, all the test failures are fixed for KVM. I will continue to cook up the new test cases to verify VSMS.RemoveResourceSettings(). On the next, I will start to fix failures for Xen/XenFV. > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > ----- Message from Deepti B Kalakeri on > Mon, 09 Mar 2009 19:51:17 +0530 ----- > > To: > > List for discussion and development of libvirt CIM > > Subject: > > Re: [Libvirt-cim] Test Run Summary (Mar 09 2009): KVM on Fedora > release 10 (Cambridge) with sfcb > > > > Guo Lian Yun wrote: > > > > libvirt-cim-bounces at redhat.com wrote on 2009-03-09 10:45:59: > > > > > > > > libvirt-cim-bounces at redhat.com wrote on 2009-03-09 09:45:08: > > > > > > > > > > > > > > > ================================================= > > > > Test Run Summary (Mar 09 2009): KVM on Fedora release 10 > > > (Cambridge)with sfcb > > > > ================================================= > > > > Distro: Fedora release 10 (Cambridge) > > > > Kernel: 2.6.27.15-170.2.24.fc10.x86_64 > > > > libvirt: 0.4.5 > > > > Hypervisor: QEMU 0.9.1 > > > > CIMOM: sfcb sfcbd 1.3.3preview > > > > Libvirt-cim revision: 829 > > > > Libvirt-cim changeset: 1aff0d0e9bf4 > > > > Cimtest revision: 642 > > > > Cimtest changeset: 087aaba26589 > > > > ================================================= > > > > FAIL : 4 > > > > XFAIL : 3 > > > > SKIP : 5 > > > > PASS : 134 > > > > ----------------- > > > > Total : 146 > > > > ================================================= > > > > FAIL Test Summary: > > > > ElementCapabilities - 03_forward_errs.py: FAIL > > > I've sent a patch with fix. > > > > > > > ElementConforms - 01_forward.py: FAIL > > > Same as above. > > > > > > > ElementConforms - 04_ectp_rev_errs.py: FAIL > > > Same as above. > > > > > > > VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL > > > > It seems this failure because that the provider has to free the > > nonexistent domain in > > invoking method DestroySystem. > > > > Here is the debugger error in sfcb: > > libvir: Domain error : invalid domain pointer in virDomainFree > > libvir: QEMU error : Domain not found > > libvir: Domain error : invalid domain pointer in virDomainFree > Daisy, > > The test case is written to verify the DestroySystem() returns an error > when trying to remove non-existing domain > and also when an invalid domain name is passed. > The error statements returned seems to have changed. > > For ex: > The err desc for DestroySystem() when non-existing domain is passed was > previously > CIM_ERR_FAILED:Unable to retrieve domain name > > is now changed to CIM_ERR_NOT_FOUND: Unable to retrieve domain name: > Error 0 > > We need to change the way the error comparison is made. > The comparison stmt like > > if err_desc.find(exp_value['desc']) >= 0: does not work, but > if exp_value['desc'] in err_desc: works > > -- > Thanks and Regards, > Deepti B. Kalakeri > IBM Linux Technology Center > deeptik at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Fri Mar 13 05:34:20 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 13 Mar 2009 11:04:20 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] In cim_state_change(), return FAIL since status isn't set yet In-Reply-To: <0529bffff3f4a6f739e2.1236891083@localhost.localdomain> References: <0529bffff3f4a6f739e2.1236891083@localhost.localdomain> Message-ID: <49B9F05C.8040905@linux.vnet.ibm.com> +1. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1236890998 25200 > # Node ID 0529bffff3f4a6f739e2589e42f5406cc1296b51 > # Parent ab10caadc452bc5413f7776a978214241b6ae2f9 > [TEST] In cim_state_change(), return FAIL since status isn't set yet. > > Signed-off-by: Kaitlin Rupert > > diff -r ab10caadc452 -r 0529bffff3f4 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Mar 12 13:45:00 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Mar 12 13:49:58 2009 -0700 > @@ -610,7 +610,7 @@ > keys = { 'Name' : self.domain_name, 'CreationClassName' : cs_class } > cs = GetInstance(server, cs_class, keys) > if cs is None or cs.Name != self.domain_name: > - return status > + return FAIL > > try: > req_state_change = pywbem.cim_types.Uint16(req_state) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Mar 13 06:15:50 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 13 Mar 2009 11:45:50 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message In-Reply-To: <6e1a1d69588b34117d08.1236912508@elm3b197.beaverton.ibm.com> References: <6e1a1d69588b34117d08.1236912508@elm3b197.beaverton.ibm.com> Message-ID: <49B9FA16.3060809@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1236912499 25200 > # Node ID 6e1a1d69588b34117d087a3f8c9e8dbc50618f9b > # Parent 676a8b05baa09b69052d519c7b438b301bea849c > [TEST] Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message > > > > Tested for KVM with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r 676a8b05baa0 -r 6e1a1d69588b suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Tue Mar 10 22:27:59 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Thu Mar 12 19:48:19 2009 -0700 > @@ -29,16 +29,18 @@ > Please put a small description at the beginning of the tc. > from XenKvmLib.classes import get_typed_class > from XenKvmLib.test_doms import undefine_test_domain > Remove the above ununsed undefine_test_domain statement. > from CimTest.Globals import logger > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import FAIL, PASS, SKIP > remove the unused utils, import statement. > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > vsms_status_version = 534 > Remove vsms_status_version variable as it not used > +vsms_err_message = 814 > > def destroysystem_fail(tc, options): > service = vsms.get_vsms_class(options.virt)(options.ip) > > classname = get_typed_class(options.virt, 'ComputerSystem') > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > > if tc == 'noname': > cs_ref = CIMInstanceName(classname, > @@ -47,6 +49,10 @@ > exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, > 'desc' : 'Unable to retrieve domain name.' > } > + if curr_cim_rev >= vsms_err_message: > + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > + 'desc' : 'Unable to retrieve domain name: Error 0' > + } > > You are assigning the values to expr_value twice in case curr_cim_rev >= vsms_err_message. You can instead use the following or something better: if curr_cim_rev >= vsms_err_message: exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, 'desc' : 'Unable to retrieve domain name: Error 0' } else: exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, 'desc' : 'Unable to retrieve domain name.' } > elif tc == 'nonexistent': > cs_ref = CIMInstanceName(classname,keybindings = { > @@ -56,6 +62,10 @@ > exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, > 'desc' : 'Failed to find domain' > } > + if curr_cim_rev >= vsms_err_message: > + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > + 'desc' : "Referenced domain `##@@!!cimtest_domain'" \ > + " does not exist: Domain not found"} > > Same here. > else: > return SKIP > There is no need for this SKIP here. Do you have it for some specific reason ? Also, at line 73 status = FAIL is not needed as it is not used. > @@ -68,7 +78,7 @@ > err_no = details[0] > err_desc = details[1] > if err_no == exp_value['rc'] and err_desc.find(exp_value['desc']) >= 0: > - logger.error("For Invalid Scenario '%s'", tc) > + logger.info("For Invalid Scenario '%s'", tc) > logger.info('Got expected error no: %s', err_no) > logger.info('Got expected error desc: %s',err_desc) > return PASS > Can you include something like this outside the if condition to report the mismatching exception which does not match the exception we intend to verify. logger.error("Unknown exceptions %s", details) Line no 86 - 88 logger.error('destroy_fail>> %s: Error executing DestroySystem', tc) return FAIL These lines can be outside the expect block. We need this outside in case if we dont get an exception. > @@ -82,7 +92,7 @@ > options = main.options > rc1 = destroysystem_fail('noname', options) > rc2 = destroysystem_fail('nonexistent', options) > - > + > status = FAIL > if rc1 == PASS and rc2 == PASS: > status = PASS > Instead use return PASS Line no: 99 - 103 99 else: 100 rclist = [rc1, rc2] 101 rclist.sort() 102 if rclist[0] == PASS and rclist[1] == SKIP: 103 status = PASS Why do we need to set status = PASS when rclist[1] == SKIP. I think this was related to vsms_status_version branching and I believe we can remove this check now. PS: All the line nos are the ones after your patches are applied. > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Mar 13 06:46:30 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 13 Mar 2009 12:16:30 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Make sure network pool is created with a random IP In-Reply-To: References: Message-ID: <49BA0146.9040901@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1236890700 25200 > # Node ID ab10caadc452bc5413f7776a978214241b6ae2f9 > # Parent 676a8b05baa09b69052d519c7b438b301bea849c > [TEST] #2 Make sure network pool is created with a random IP. > > This will help prevent overlap with existing networks. However, this won't > completely prevent the issue. We'd need to do test to see if the IP address > is already used by a different network. If the network is in use, then another > IP address should be used. > > Updates: > -Check to see if pool with the specified IP range exists, if so, return a > meaningful error > -Since the NetXML generates a random IP, creating a NetXML object in the > destroy call will generate an object with a different IP. Instead, use > the virsh call to destroy the network. > Signed-off-by: Kaitlin Rupert > diff -r 676a8b05baa0 -r ab10caadc452 suites/libvirt-cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Mar 10 22:27:59 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Thu Mar 12 13:45:00 2009 -0700 > @@ -36,7 +36,7 @@ > CIM_ERROR_GETINSTANCE > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list,\ > - domain_list, virt2uri > + domain_list, virt2uri, net_destroy > from XenKvmLib.vxml import PoolXML, NetXML > from VirtLib import utils > from XenKvmLib.const import default_pool_name, default_network_name > @@ -438,11 +438,9 @@ > if net_name == None: > return FAIL > > - netxml = NetXML(server, virt=virt, networkname=net_name) > - ret = netxml.destroy_vnet() > - if not ret: > - logger.error("Failed to destroy Virtual Network '%s'", > - net_name) > + ret = net_destroy(net_name, server, virt) > + if ret != 0: > + logger.error("Failed to destroy Virtual Network '%s'", net_name) > return FAIL > > return PASS > diff -r 676a8b05baa0 -r ab10caadc452 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Mar 10 22:27:59 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Mar 12 13:45:00 2009 -0700 > @@ -32,6 +32,7 @@ > # shared by XenXML & KVMXML. > import os > import sys > +import random > import platform > import tempfile > from time import sleep > @@ -39,7 +40,8 @@ > from xml.dom import minidom, Node > from xml import xpath > from VirtLib import utils, live > -from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader > +from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader, \ > + net_list > from XenKvmLib.test_doms import set_uuid, viruuid > from XenKvmLib import vsms > from XenKvmLib import const > @@ -182,7 +184,6 @@ > def get_valid_bridge_name(server): > bridge_list = live.available_bridges(server) > if bridgename in bridge_list: > - import random > vbr = bridgename + str(random.randint(1, 100)) > if vbr in bridge_list: > logger.error('Need to give different bridge name ' > @@ -207,13 +208,27 @@ > self.add_sub_node(network, 'name', self.net_name) > self.add_sub_node(network, 'uuid', set_uuid()) > self.add_sub_node(network, 'forward') > - subnet = '192.168.122.' > + subnet = '192.168.123.' > self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', > forwardDelay='0') > - ip = self.add_sub_node(network, 'ip', address=subnet+'1', > + ip_base = random.randint(1, 100) > + addr = subnet+'%d' % ip_base > + addr = subnet+'1' > + > + n_list = net_list(server, virt) > + for _net_name in n_list: > + cmd = "virsh net-dumpxml %s | 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("'") > + if in_use_addr == addr: > + logger.error("IP address is in use by a different network") > break/ return None whichever suitable here once you find the IP is already in use. > + > + ip = self.add_sub_node(network, 'ip', address=addr, > netmask='255.255.255.0') > dhcp = self.add_sub_node(ip, 'dhcp') > - self.add_sub_node(dhcp, 'range', start=subnet+'2', > + range_addr = subnet+'%d' % (ip_base + 1) > + self.add_sub_node(dhcp, 'range', start=range_addr, > end=subnet+'254') > We should not continue here with assigning dhcp and other info if the IP that is generated is already in use? > def create_vnet(self): > diff -r 676a8b05baa0 -r ab10caadc452 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Tue Mar 10 22:27:59 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Thu Mar 12 13:45:00 2009 -0700 > @@ -184,6 +184,14 @@ > if len(bridge) > 1: > return bridge[1] > > +def net_destroy(network, server, virt="Xen"): > + """Function destroys a given virtual network""" > + > + cmd = "virsh -c %s net-destroy %s" % (virt2uri(virt), network) > + ret, out = utils.run_remote(server, cmd) > + > + return ret > + > def network_by_bridge(bridge, server, virt="Xen"): > """Function returns virtual network for a given bridge""" > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Fri Mar 13 07:38:19 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 13 Mar 2009 15:38:19 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: <49B83617.7040103@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-12 06:07:19: > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1236759196 25200 > > # Node ID 0e350cf7bbab15c07d948976435ff4fe1b4ab597 > > # Parent a78b6f23ebaa8a38fa591e420d742aa03cd9e515 > > [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource > > > > > > This tc verify disk and network devices now, follow up patch will > verify input and graphics devices > > > > Tested for KVM/Xen/XenFV with current sources and rpm > > > > Signed-off-by: Guolian Yun > > > > diff -r a78b6f23ebaa -r 0e350cf7bbab suites/libvirt- > cim/cimtest/VirtualSystemManagementService/16_removeresource.py > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/16_removeresource.py > Wed Mar 11 01:13:16 2009 -0700 > > @@ -0,0 +1,109 @@ > > +#!/usr/bin/python > > +# > > +# Copyright 2008 IBM Corp. > > Change date to 2009. > > > + > > +import sys > > +import pywbem > > Redundant import - this can be removed. > > > +import random > > +from pywbem.cim_obj import CIMInstanceName > > +from XenKvmLib import vsms > > Instead of importing the whole module, just import get_vsms_class(). > > > +from XenKvmLib import vxml > > Instead of importing the whole module, just import get_class(). > > > +from XenKvmLib.classes import get_typed_class > > +from CimTest.Globals import logger > > +from XenKvmLib.const import do_main, get_provider_version, > default_network_name > > +from CimTest.ReturnCodes import FAIL, PASS > > +from XenKvmLib.common_util import create_netpool_conf, destroy_netpool > > +from XenKvmLib.xm_virt_util import get_bridge_from_network_xml > > + > > +sup_types = ['Xen', 'KVM', 'XenFV'] > > +default_dom = 'domain' > > +libvirt_cim_dev_xml = 828 > > This variable is a bit oddly named. Can you use something like > rem_res_err_rev? Or something that is more descriptive of the actual > changeset? > > > +ntype = 'network' > > +nmac = '00:11:22:33:44:55' > > +npool_name = default_network_name + str(random.randint(1, 100)) > > + > > + at do_main(sup_types) > > +def main(): > > + options = main.options > > + > > + if options.virt == 'KVM': > > + nddev = 'hdb' > > + else: > > + nddev = 'xvdb' > > + > > + cxml = vxml.get_class(options.virt)(default_dom, disk=nddev, mac=nmac) > > + ret = cxml.cim_define(options.ip) > > + if not ret: > > + logger.error("Failed to define the dom: %s", default_dom) > > + return FAIL > > + > > + drasd = get_typed_class(options.virt, > 'DiskResourceAllocationSettingData') > > + drasd_id = '%s/%s' % (default_dom, nddev) > > + dkeys = {'InstanceID' : drasd_id} > > + > > + nrasd = get_typed_class(options.virt, > 'NetResourceAllocationSettingData') > > + nrasd_id = '%s/%s' % (default_dom, nmac) > > + nkeys = {'InstanceID' : nrasd_id} > > Instead of hand building the instances for the resources, use the proper > association calls to get the RASD instances. You know the guest, so > you can use SystemDevice to get the resource instance, and then > SettingsDefineState to get the RASD instances. I'm working on a new patch to get the RASD instances by association. But I can't remove "KVM_InputResourceAllocationSettingData" which output the device "mouse:ps2" can not be found. Actually, I get it by SettingsDefineState. If I remove this device from the ResourceSettings, this method works for me. > > > + > > + status, net_name = create_netpool_conf(options.ip, options.virt, > > + use_existing=False, > > + net_name=npool_name) > > Why are you creating a network? The guest is created using the default > network that already exists. > > > + if status != PASS: > > + logger.error('Unable to create network pool') > > + return FAIL > > + > > + dresource = CIMInstanceName(drasd, keybindings = dkeys) > > + nresource = CIMInstanceName(nrasd, keybindings = nkeys) > > + > > + service = vsms.get_vsms_class(options.virt)(options.ip) > > + try: > > + service. > RemoveResourceSettings(ResourceSettings=[dresource, nresource]) > > + except Exception, details: > > + logger.error('Failed to remove % or %s', dresource, nresource) > > + logger.error(details) > > + cxml.undefine(options.ip) > > + destroy_netpool(options.ip, options.virt, net_name) > > + return FAIL > > + > > + cxml.dumpxml(options.ip) > > + disk = cxml. > get_value_xpath('/domain/devices/disk/target/@dev[. = "%s"]' > > + % nddev) > > + if options.virt == 'KVM': > > + net = cxml.get_value_xpath( > > + '/domain/devices/interface/source/@network[. = "%s"]' % nmac) > > + else: > > + br = get_bridge_from_network_xml(net_name, options.ip, > options.virt) > > + net = cxml.get_value_xpath( > > + '/domain/devices/interface/source/@bridge[. = "%s"]' % br) > > You are checking for the name of the pool you created - this isn't the > same pool that was used to define the guest. > > > + > > + curr_cim_rev, changeset = get_provider_version(options.virt, > options.ip) > > + if disk != None and net != None and curr_cim_rev >= > libvirt_cim_dev_xml: > > This is actually a regression - the RemoveResources() call did work > prior to changeset 779. > > So, you'll want to return an XFAIL if the revision is: 779 <= rev <= 828. > > Instead of checking disk and net in one if, break it up so that you can > return an error message for each resource that fails: > > if disk != None: > logger.error('The disk device was not removed successfully') > if net != None: > logger.error('The network device was not removed successfully') > > > + logger.error('The resource is not removerd successfully') > > + cxml.undefine(options.ip) > > + destroy_netpool(options.ip, options.virt, net_name) > > + return FAIL > > + > > + cxml.undefine(options.ip) > > + destroy_netpool(options.ip, options.virt, net_name) > > + return PASS > > + > > I would use exceptions so that you only need to call undefine() once. > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Fri Mar 13 12:19:54 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 13 Mar 2009 17:49:54 +0530 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST][RFC] Added new tc to verify remote live migration In-Reply-To: <49B99C0A.7040905@linux.vnet.ibm.com> References: <89db4ac2378c90fd8984.1236853939@localhost.localdomain> <49B99C0A.7040905@linux.vnet.ibm.com> Message-ID: <49BA4F6A.9070503@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B. Kalakeri wrote: >> # HG changeset patch >> # User Deepti B. Kalakeri >> # Date 1236853868 25200 >> # Node ID 89db4ac2378c90fd89845dd09836bfb39cc6e6ed >> # Parent caae383c83ec70e6cb6de9b6e5ccf6d2fcbecb45 >> [TEST][RFC] Added new tc to verify remote live migration. >> >> Verified with KVM. >> The test case will not pass for KVM since the guest information needs >> to have emulator >> information without which the remote migration fails. >> The support to pass the emulator information via >> VirtualSystemMigrationSettingData is >> not yet available. > > I haven't verified this on Xen yet. I have not verified it either. > >> +def main(): >> + options = main.options >> + virt = options.virt >> + s_sysname = os.environ['SRC_IP'] > > You already know the source IP from options.ip - do you need to set an > environment variable for it? > >> + t_sysname = os.environ['TARGET_IP'] > > Shouldn't you be able to the target ip from main.options the same way > we get the source IP? > I knew that the test cases were using the const.py options but was not able to track how they inherited the command line args given. Hmmm... I traced it now and its a bit tricky. I will make the changes in the subsequent patch I submit. I have one query, MigrateVirtualSystemToHost() just takes the DestinationHost ip / hostname, but what if the user wanted to connect using a specific port. Will passing the port information as part of the DestinationHost work ? If it does not then passing the Port through command line becomes meaningless. >> + if options.virt == 'KVM' and t_sysname == s_sysname: I was wondering how to make the check for verifying if the user wanted to do local migration, which means I need to validate the src ip and dest ip to be different. The user might give the src and destination information in any form like localhost, ip address, hostname, FQDN. The live.full_hostname() does not come handy. Also, the following function gave me a similar results which could be used for comparison. [ Only some o/p given] >>> print "Hostname is ", socket.gethostbyaddr('localhost') Hostname is ('elm3b41', ['localhost.localdomain', 'localhost', 'localhost'], ['127.0.0.1']) >>> print "Hostname is ", socket.gethostbyaddr('elm3b41.beaverton.ibm.com') Hostname is ('elm3b41.beaverton.ibm.com', [], ['9.47.67.41']) >>> print "Hostname is ", socket.gethostbyaddr('9.47.67.41') Hostname is ('elm3b41.beaverton.ibm.com', [], ['9.47.67.41']) >>> print "fqdn is %s", socket.getfqdn('elm3b41') fqdn is %s localhost.localdomain >>> print "fqdn is %s", socket.getfqdn('') fqdn is %s localhost.localdomain >>> print "fqdn is %s", socket.getfqdn('9.47.67.41') fqdn is %s elm3b41.beaverton.ibm.com >>> print "fqdn is %s", socket.getfqdn('elm3b41.beaverton.ibm.com') fqdn is %s elm3b41.beaverton.ibm.com >>> print "fqdn is %s", socket.getfqdn('localhost.localdomain') fqdn is %s localhost.localdomain >>> print "FQDN is ", socket.gethostbyaddr(socket.gethostname())[0] FQDN is elm3b41 >>>socket.getfqdn('127.0.0.1') 'localhost.localdomain' Can you suggest something here ? >> + logger.info("Libvirt does not support local migratoin for KVM") >> + return SKIP >> + >> + status = FAIL >> + test_dom = 'VM_frm_' + socket.gethostname() >> + >> + try: >> + status, cxml = setup_guest(test_dom, s_sysname, virt) >> + if status != PASS: >> + logger.error("Error setting up the guest") >> + return status >> + >> + # Migrate the test_dom to t_sysname. >> + # local_remote_migrate executes live migration by default >> + # Enable remote migration by setting remote_migrate=1 >> + vsms_cn = get_vs_mig_setting_class(virt) + vsmservice = >> vsms_cn(s_sysname, virt) >> + status = local_remote_migrate(vsmservice, s_sysname, t_sysname, virt, >> + remote_migrate=1, guest_name=test_dom) > > Why not have local_remote_migrate() get its own > VirtualSystemMigrationService object? There's no need to pass it in > here because it's not used later on.. > > Or are you planning to have future tests use it for something? > Oh! yeah we do not use it for anything else in the current test case changes. I had created the VirtualSystemMigrationService object thinking that I shall execute one by one migration types. I will shift this to vsmigrations.py. But I guess writing separate scenarios for each of them makes it more cleaner or else it will become lengthier , wat say ?? >> + except Exception,details: >> + logger.error("Exception details :%s", details) >> + cxml.cim_destroy(s_sysname) >> + cxml.undefine(s_sysname) >> + return FAIL >> + >> + if status == PASS: >> + # Remote Migration Successful, clean the domain on target machine >> + cxml.cim_destroy(t_sysname) >> + cxml.undefine(t_sysname) >> + else: >> + # Remote Migration not Successful, clean the domain on src machine >> + cxml.cim_destroy(s_sysname) >> + cxml.undefine(s_sysname) >> + > > Technically, if the migration fails partway through migrating a guest, > it's possible for the guest to end up on both systems. So it'd be good > to check both the source and the target to see if the guest exists > (and remove it if it does). > > Ok I shall take care of this as well. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Mar 13 12:20:23 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 13 Mar 2009 17:50:23 +0530 Subject: [Libvirt-cim] [PATCH 3 of 4] [TEST] Adding support for remote migration in the vsmigrations library In-Reply-To: <49B99A4F.6070208@linux.vnet.ibm.com> References: <49B99A4F.6070208@linux.vnet.ibm.com> Message-ID: <49BA4F87.6080705@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> >> -def get_migration_job_instance(ip, virt, id): >> +def get_migration_job_instance(src_ip, virt, id): >> job = [] >> - key_list = ["instanceid"] >> - curr_cim_rev, changeset = get_provider_version(virt, ip) >> + curr_cim_rev, changeset = get_provider_version(virt, src_ip) >> if curr_cim_rev < libvirt_mig_changes: >> mig_job_cn = 'Virt_MigrationJob' >> else: >> mig_job_cn = get_typed_class(virt, 'MigrationJob') >> >> try: >> - job = enumclass.EnumInstances(ip, mig_job_cn) >> + job = enumclass.EnumInstances(src_ip, mig_job_cn) >> + if len(job) < 1: > > Can you print an error here indicating that no job instances were > returned? > > >> >> -def verify_domain_list(list, local_migrate, test_dom): >> - status = PASS >> - if local_migrate == 0 and test_dom not in list: >> - status = FAIL >> - if local_migrate == 1 and test_dom in list: >> +def verify_domain_list(remote_migrate, test_dom, src_ip, target_ip): >> + status = FAIL >> + list_src = domain_list(src_ip) >> + if remote_migrate == 0: >> + if test_dom in list_src: >> + status = PASS >> + elif remote_migrate == 1 : >> + list_target = domain_list(target_ip) > > The verification fails for me when migrating a KVM guest. Here's the > error message I see: > > VirtualSystemMigrationService - 06_remote_migration.py: FAIL > ERROR - Migration verification for 'f10_test' failed > > You'll need to specify the virtualization type - otherwise, it calls > domain_list() for Xen hyp. Here's what I see when I print the contents > of the list_src and list_target: > > ['Xen', 'Xen', 'failed'] > >> + if test_dom not in list_src and test_dom in list_target: >> + status = PASS >> + else: >> + logger.error("Invalid migration option") >> + >> + if status != PASS: >> + logger.error("Migration verification for '%s' failed", test_dom) >> + return status + >> + return status >> + >> +def check_migration_job(src_ip, id, target_ip, test_dom, + >> remote_migrate, virt='Xen', timeout=50): >> + try: >> + status, job_inst = get_migration_job_instance(src_ip, virt, id) >> + if status != PASS: >> + logger.error("Unable to get mig_job instance for '%s'", test_dom) >> + return FAIL >> + >> status = FAIL >> >> - if status != PASS: >> - logger.error("%s migrate failed", test_dom) >> + for i in range(0, timeout): >> + if job_inst.JobState == CIM_JOBSTATE_COMPLETE: >> + sleep(3) >> + if job_inst.Status != "Completed": >> + logger.error("Failed to set the status for the migrated " \ >> + "dom: '%s'", test_dom) > > Can you also print the job_inst.Status as well? Right now, libvirt > doesn't print much when a migration fails, but it might print more > info in the future. > I shall take care of these. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Mar 13 18:10:43 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 13 Mar 2009 11:10:43 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST][RFC] Added new tc to verify remote live migration In-Reply-To: <49BA4F6A.9070503@linux.vnet.ibm.com> References: <89db4ac2378c90fd8984.1236853939@localhost.localdomain> <49B99C0A.7040905@linux.vnet.ibm.com> <49BA4F6A.9070503@linux.vnet.ibm.com> Message-ID: <49BAA1A3.4090907@linux.vnet.ibm.com> >> Shouldn't you be able to the target ip from main.options the same way >> we get the source IP? >> > I knew that the test cases were using the const.py options but was not > able to track how they inherited the command line args given. > Hmmm... I traced it now and its a bit tricky. I will make the changes in > the subsequent patch I submit. > > I have one query, MigrateVirtualSystemToHost() just takes the > DestinationHost ip / hostname, but what if the user wanted to connect > using a specific port. > Will passing the port information as part of the DestinationHost work ? No, this won't work. > If it does not then passing the Port through command line becomes > meaningless. There's no need to specify a CIMOM port because MigrateVirtualSystemToHost() uses libvirt to migrate the guest - it doesn't use the CIMOM for this communication. It is possible to specify other libvirt transport types - this can be done using the MigrationSettingData instance. It's some what involved to use some of these transport types (more information at: http://libvirt.org/remote.html). I would recommend using the default transport type for these tests. Testing additional transport methods is something that can be added later (once all the basic migration scenarios are covered). >>> + if options.virt == 'KVM' and t_sysname == s_sysname: > I was wondering how to make the check for verifying if the user wanted > to do local migration, which means I need to validate the src ip and > dest ip to be different. > The user might give the src and destination information in any form like > localhost, ip address, hostname, FQDN. > The live.full_hostname() does not come handy. > Also, the following function gave me a similar results which could be > used for comparison. [ Only some o/p given] > > >>> print "Hostname is ", socket.gethostbyaddr('localhost') > Hostname is ('elm3b41', ['localhost.localdomain', 'localhost', > 'localhost'], ['127.0.0.1']) > >>> print "Hostname is ", > socket.gethostbyaddr('elm3b41.beaverton.ibm.com') > Hostname is ('elm3b41.beaverton.ibm.com', [], ['9.47.67.41']) > >>> print "Hostname is ", socket.gethostbyaddr('9.47.67.41') > Hostname is ('elm3b41.beaverton.ibm.com', [], ['9.47.67.41']) > > > >>> print "fqdn is %s", socket.getfqdn('elm3b41') > fqdn is %s localhost.localdomain > >>> print "fqdn is %s", socket.getfqdn('') > fqdn is %s localhost.localdomain > >>> print "fqdn is %s", socket.getfqdn('9.47.67.41') > fqdn is %s elm3b41.beaverton.ibm.com > >>> print "fqdn is %s", socket.getfqdn('elm3b41.beaverton.ibm.com') > fqdn is %s elm3b41.beaverton.ibm.com > >>> print "fqdn is %s", socket.getfqdn('localhost.localdomain') > fqdn is %s localhost.localdomain > > >>> print "FQDN is ", socket.gethostbyaddr(socket.gethostname())[0] > FQDN is elm3b41 > >>>socket.getfqdn('127.0.0.1') > 'localhost.localdomain' > > > Can you suggest something here ? This is pretty tricky. The problem is that the /etc/hosts file can be formatted in numerous ways, and there isn't really a standard across distros / systems. So the gethostbyaddr(), getfqdn(), etc can return different values. Like you've pointed out, it's tough to get a full list of possible aliases for the system. I would say, for now, if the source and the target differ, assume it's a remote migration. >>> + logger.info("Libvirt does not support local migratoin for KVM") >>> + return SKIP >>> + >>> + status = FAIL >>> + test_dom = 'VM_frm_' + socket.gethostname() >>> + >>> + try: >>> + status, cxml = setup_guest(test_dom, s_sysname, virt) >>> + if status != PASS: >>> + logger.error("Error setting up the guest") >>> + return status >>> + >>> + # Migrate the test_dom to t_sysname. >>> + # local_remote_migrate executes live migration by default >>> + # Enable remote migration by setting remote_migrate=1 >>> + vsms_cn = get_vs_mig_setting_class(virt) + vsmservice = >>> vsms_cn(s_sysname, virt) >>> + status = local_remote_migrate(vsmservice, s_sysname, t_sysname, virt, >>> + remote_migrate=1, guest_name=test_dom) >> >> Why not have local_remote_migrate() get its own >> VirtualSystemMigrationService object? There's no need to pass it in >> here because it's not used later on.. >> >> Or are you planning to have future tests use it for something? >> > Oh! yeah we do not use it for anything else in the current test case > changes. > I had created the VirtualSystemMigrationService object thinking that I > shall execute one by one migration types. > I will shift this to vsmigrations.py. > But I guess writing separate scenarios for each of them makes it more > cleaner or else it will become lengthier , wat say ?? I'm not sure what you mean here.. for each of the migration types, you can still call local_remote_migrate(). The only difference here is that the function will set up the VirtualSystemMigrationService object each time. But I don't think that's a problem - it doesn't take too much execution time. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Mar 13 19:01:14 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 13 Mar 2009 12:01:14 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: References: Message-ID: <49BAAD7A.5070900@linux.vnet.ibm.com> > > > + drasd = get_typed_class(options.virt, > > 'DiskResourceAllocationSettingData') > > > + drasd_id = '%s/%s' % (default_dom, nddev) > > > + dkeys = {'InstanceID' : drasd_id} > > > + > > > + nrasd = get_typed_class(options.virt, > > 'NetResourceAllocationSettingData') > > > + nrasd_id = '%s/%s' % (default_dom, nmac) > > > + nkeys = {'InstanceID' : nrasd_id} > > > > Instead of hand building the instances for the resources, use the proper > > association calls to get the RASD instances. You know the guest, so > > you can use SystemDevice to get the resource instance, and then > > SettingsDefineState to get the RASD instances. > > I'm working on a new patch to get the RASD instances by association. > But I can't remove "KVM_InputResourceAllocationSettingData" which output > the device "mouse:ps2" can not be found. Actually, I get it by > SettingsDefineState. > If I remove this device from the ResourceSettings, this method works > for me. > Sorry Daisy.. I'm not sure I understand the problem you're hitting. Are you seeing an error trying to remove an input device from a guest? What error message do you see? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Mar 13 19:02:58 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 13 Mar 2009 12:02:58 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Make sure network pool is created with a random IP In-Reply-To: <49BA0146.9040901@linux.vnet.ibm.com> References: <49BA0146.9040901@linux.vnet.ibm.com> Message-ID: <49BAADE2.70404@linux.vnet.ibm.com> >> + n_list = net_list(server, virt) >> + for _net_name in n_list: >> + cmd = "virsh net-dumpxml %s | 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("'") >> + if in_use_addr == addr: >> + logger.error("IP address is in use by a different >> network") >> > break/ return None whichever suitable here once you find the IP is > already in use. >> + >> + ip = self.add_sub_node(network, 'ip', address=addr, >> netmask='255.255.255.0') >> dhcp = self.add_sub_node(ip, 'dhcp') >> - self.add_sub_node(dhcp, 'range', start=subnet+'2', >> + range_addr = subnet+'%d' % (ip_base + 1) >> + self.add_sub_node(dhcp, 'range', start=range_addr, >> end=subnet+'254') >> > We should not continue here with assigning dhcp and other info if the IP > that is generated is already in use? Oops! Yes, good points. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Mar 13 19:53:45 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 13 Mar 2009 12:53:45 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Make sure network pool is created with a random IP Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1236965462 25200 # Node ID bc7ee42128a826ef12c8d7a90ff611a6688f8136 # Parent b1e05c9de638909c5c6a7ba86aa2b3551802d013 [TEST] #3 Make sure network pool is created with a random IP. This will help prevent overlap with existing networks. However, this won't completely prevent the issue. We'd need to do test to see if the IP address is already used by a different network. If the network is in use, then another IP address should be used. Updates from 2 to 3: -If IP address is already in use, return from the _init_() call. Updates from 1 to 2: -Check to see if pool with the specified IP range exists, if so, return a meaningful error -Since the NetXML generates a random IP, creating a NetXML object in the destroy call will generate an object with a different IP. Instead, use the virsh call to destroy the network. Signed-off-by: Kaitlin Rupert diff -r b1e05c9de638 -r bc7ee42128a8 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Mar 13 10:31:05 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Mar 13 10:31:02 2009 -0700 @@ -36,7 +36,7 @@ CIM_ERROR_GETINSTANCE from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list,\ - domain_list, virt2uri + domain_list, virt2uri, net_destroy from XenKvmLib.vxml import PoolXML, NetXML from VirtLib import utils from XenKvmLib.const import default_pool_name, default_network_name @@ -438,11 +438,9 @@ if net_name == None: return FAIL - netxml = NetXML(server, virt=virt, networkname=net_name) - ret = netxml.destroy_vnet() - if not ret: - logger.error("Failed to destroy Virtual Network '%s'", - net_name) + ret = net_destroy(net_name, server, virt) + if ret != 0: + logger.error("Failed to destroy Virtual Network '%s'", net_name) return FAIL return PASS diff -r b1e05c9de638 -r bc7ee42128a8 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Mar 13 10:31:05 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Mar 13 10:31:02 2009 -0700 @@ -32,6 +32,7 @@ # shared by XenXML & KVMXML. import os import sys +import random import platform import tempfile from time import sleep @@ -39,7 +40,8 @@ from xml.dom import minidom, Node from xml import xpath from VirtLib import utils, live -from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader +from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader, \ + net_list from XenKvmLib.test_doms import set_uuid, viruuid from XenKvmLib import vsms from XenKvmLib import const @@ -182,7 +184,6 @@ def get_valid_bridge_name(server): bridge_list = live.available_bridges(server) if bridgename in bridge_list: - import random vbr = bridgename + str(random.randint(1, 100)) if vbr in bridge_list: logger.error('Need to give different bridge name ' @@ -210,10 +211,25 @@ subnet = '192.168.122.' self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', forwardDelay='0') - ip = self.add_sub_node(network, 'ip', address=subnet+'1', + ip_base = random.randint(1, 100) + addr = subnet+'%d' % ip_base + addr = subnet+'1' + + n_list = net_list(server, virt) + for _net_name in n_list: + cmd = "virsh net-dumpxml %s | 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("'") + if in_use_addr == addr: + logger.error("IP address is in use by a different network") + return None + + ip = self.add_sub_node(network, 'ip', address=addr, netmask='255.255.255.0') dhcp = self.add_sub_node(ip, 'dhcp') - self.add_sub_node(dhcp, 'range', start=subnet+'2', + range_addr = subnet+'%d' % (ip_base + 1) + self.add_sub_node(dhcp, 'range', start=range_addr, end=subnet+'254') def create_vnet(self): diff -r b1e05c9de638 -r bc7ee42128a8 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Fri Mar 13 10:31:05 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Fri Mar 13 10:31:02 2009 -0700 @@ -184,6 +184,14 @@ if len(bridge) > 1: return bridge[1] +def net_destroy(network, server, virt="Xen"): + """Function destroys a given virtual network""" + + cmd = "virsh -c %s net-destroy %s" % (virt2uri(virt), network) + ret, out = utils.run_remote(server, cmd) + + return ret + def network_by_bridge(bridge, server, virt="Xen"): """Function returns virtual network for a given bridge""" From deeptik at linux.vnet.ibm.com Sun Mar 15 13:47:04 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Sun, 15 Mar 2009 19:17:04 +0530 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST][RFC] Added new tc to verify remote live migration In-Reply-To: <49BAA1A3.4090907@linux.vnet.ibm.com> References: <89db4ac2378c90fd8984.1236853939@localhost.localdomain> <49B99C0A.7040905@linux.vnet.ibm.com> <49BA4F6A.9070503@linux.vnet.ibm.com> <49BAA1A3.4090907@linux.vnet.ibm.com> Message-ID: <49BD06D8.1010505@linux.vnet.ibm.com> Kaitlin Rupert wrote: >>> Shouldn't you be able to the target ip from main.options the same >>> way we get the source IP? >>> >> I knew that the test cases were using the const.py options but was >> not able to track how they inherited the command line args given. >> Hmmm... I traced it now and its a bit tricky. I will make the changes >> in the subsequent patch I submit. >> >> I have one query, MigrateVirtualSystemToHost() just takes the >> DestinationHost ip / hostname, but what if the user wanted to connect >> using a specific port. >> Will passing the port information as part of the DestinationHost work ? > > No, this won't work. > >> If it does not then passing the Port through command line becomes >> meaningless. > > There's no need to specify a CIMOM port because > MigrateVirtualSystemToHost() uses libvirt to migrate the guest - it > doesn't use the CIMOM for this communication. > > It is possible to specify other libvirt transport types - this can be > done using the MigrationSettingData instance. It's some what involved > to use some of these transport types (more information at: > http://libvirt.org/remote.html). > > I would recommend using the default transport type for these tests. > Testing additional transport methods is something that can be added > later (once all the basic migration scenarios are covered). > >>>> + if options.virt == 'KVM' and t_sysname == s_sysname: >> I was wondering how to make the check for verifying if the user >> wanted to do local migration, which means I need to validate the src >> ip and dest ip to be different. >> The user might give the src and destination information in any form >> like localhost, ip address, hostname, FQDN. >> The live.full_hostname() does not come handy. >> Also, the following function gave me a similar results which could be >> used for comparison. [ Only some o/p given] >> >> >>> print "Hostname is ", socket.gethostbyaddr('localhost') >> Hostname is ('elm3b41', ['localhost.localdomain', 'localhost', >> 'localhost'], ['127.0.0.1']) >> >>> print "Hostname is ", >> socket.gethostbyaddr('elm3b41.beaverton.ibm.com') >> Hostname is ('elm3b41.beaverton.ibm.com', [], ['9.47.67.41']) >> >>> print "Hostname is ", socket.gethostbyaddr('9.47.67.41') >> Hostname is ('elm3b41.beaverton.ibm.com', [], ['9.47.67.41']) >> >> >> >>> print "fqdn is %s", socket.getfqdn('elm3b41') >> fqdn is %s localhost.localdomain >> >>> print "fqdn is %s", socket.getfqdn('') >> fqdn is %s localhost.localdomain >> >>> print "fqdn is %s", socket.getfqdn('9.47.67.41') >> fqdn is %s elm3b41.beaverton.ibm.com >> >>> print "fqdn is %s", socket.getfqdn('elm3b41.beaverton.ibm.com') >> fqdn is %s elm3b41.beaverton.ibm.com >> >>> print "fqdn is %s", socket.getfqdn('localhost.localdomain') >> fqdn is %s localhost.localdomain >> >> >>> print "FQDN is ", socket.gethostbyaddr(socket.gethostname())[0] >> FQDN is elm3b41 >> >>>socket.getfqdn('127.0.0.1') >> 'localhost.localdomain' >> >> >> Can you suggest something here ? > > This is pretty tricky. The problem is that the /etc/hosts file can be > formatted in numerous ways, and there isn't really a standard across > distros / systems. So the gethostbyaddr(), getfqdn(), etc can return > different values. > > Like you've pointed out, it's tough to get a full list of possible > aliases for the system. > > I would say, for now, if the source and the target differ, assume it's > a remote migration. > >>>> + logger.info("Libvirt does not support local migratoin for KVM") >>>> + return SKIP >>>> + >>>> + status = FAIL >>>> + test_dom = 'VM_frm_' + socket.gethostname() >>>> + >>>> + try: >>>> + status, cxml = setup_guest(test_dom, s_sysname, virt) >>>> + if status != PASS: >>>> + logger.error("Error setting up the guest") >>>> + return status >>>> + >>>> + # Migrate the test_dom to t_sysname. >>>> + # local_remote_migrate executes live migration by default >>>> + # Enable remote migration by setting remote_migrate=1 >>>> + vsms_cn = get_vs_mig_setting_class(virt) + vsmservice = >>>> vsms_cn(s_sysname, virt) >>>> + status = local_remote_migrate(vsmservice, s_sysname, t_sysname, >>>> virt, >>>> + remote_migrate=1, guest_name=test_dom) >>> >>> Why not have local_remote_migrate() get its own >>> VirtualSystemMigrationService object? There's no need to pass it in >>> here because it's not used later on.. >>> >>> Or are you planning to have future tests use it for something? >>> >> Oh! yeah we do not use it for anything else in the current test case >> changes. >> I had created the VirtualSystemMigrationService object thinking that >> I shall execute one by one migration types. >> I will shift this to vsmigrations.py. >> But I guess writing separate scenarios for each of them makes it more >> cleaner or else it will become lengthier , wat say ?? > > I'm not sure what you mean here.. for each of the migration types, you > can still call local_remote_migrate(). The only difference here is > that the function will set up the VirtualSystemMigrationService object > each time. Oops! I mixed two different things. Yes I had included the VirtualSystemMigrationService object creation to be able to use it for different migration types. Also, I was en quiring with you that if it is a good idea to include scenarios for all the migration types in one tc. Sorry for not being clear. > But I don't think that's a problem - it doesn't take too much > execution time. > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Mon Mar 16 06:45:54 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 16 Mar 2009 14:45:54 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 16 2009): KVM on Fedora release 10 (Cambridge) with sfcb Message-ID: ================================================= Test Run Summary (Mar 16 2009): KVM on Fedora release 10 (Cambridge) with sfcb ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 829 Libvirt-cim changeset: 1aff0d0e9bf4 Cimtest revision: 646 Cimtest changeset: b1e05c9de638 ================================================= FAIL : 1 XFAIL : 3 SKIP : 5 PASS : 137 ----------------- Total : 146 ================================================= FAIL Test Summary: VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: PASS -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_pause_pause.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_pause_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - Got CIM error 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): 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 State not supported with return code 7 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: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL ERROR - destroy_fail>> noname: Error executing DestroySystem ERROR - (6, u'Unable to retrieve domain name: Error 0') ERROR - destroy_fail>> nonexistent: Error executing DestroySystem ERROR - (6, u"Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found") InvokeMethod(DestroySystem): Unable to retrieve domain name: Error 0 InvokeMethod(DestroySystem): Referenced domain `##@@!!cimtest_domain' does not exist: Domain not found -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: SKIP ERROR - Need to give different bridge name since it already exists -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Mar 16 07:27:18 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 16 Mar 2009 00:27:18 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] [TEST[RFC] Adding option to main.py to accept target machine info for Migration Tests In-Reply-To: References: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1236948993 25200 # Node ID c504e1a011d7891cb974702ca249bc7b5ab1fffa # Parent b50635aae0979d8770435cc1d5e6b478ef0d8853 [TEST[RFC] Adding option to main.py to accept target machine info for Migration Tests. New option can be specified as below: CIM_NS=root/virt CIM_USER=userid CIM_PASS=pass ./runtests libvirt-cim -i localhost -c -v KVM -g VirtualSystemMigrationService -t 06_remote_migration.py --target_url or CIM_NS=root/virt CIM_USER=userid CIM_PASS=pass ./runtests libvirt-cim -i localhost -c -v KVM -g VirtualSystemMigrationService -t 06_remote_migration.py -m Signed-off-by: Deepti B. Kalakeri diff -r b50635aae097 -r c504e1a011d7 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Fri Mar 13 05:50:45 2009 -0700 +++ b/suites/libvirt-cim/main.py Fri Mar 13 05:56:33 2009 -0700 @@ -44,6 +44,8 @@ parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", help="IP address of machine to test (default: localhost)") +parser.add_option("-m", "--target_url", dest="t_url", default="localhost:5988", + help="URL of destination host for remote migration ") parser.add_option("-p", "--port", dest="port", type="int", default=5988, help="CIMOM port (default: 5988)") parser.add_option("-g", "--group", dest="group", @@ -199,6 +201,14 @@ # with a different port if options.port: os.environ['CIMOM_PORT'] = str(options.port) + + # src and target host info to be able to use + # in the tc for comparison in remote migration case + if ":" in options.ip: + (options.ip, port) = options.ip.split(":") + + if ":" in options.t_url: + (options.t_url, port) = options.t_url.split(":") if options.report: to_addr = options.report @@ -243,8 +253,9 @@ t_path = os.path.join(TEST_SUITE, test['group']) os.environ['CIM_TC'] = test['test'] cdto = 'cd %s' % t_path - run = 'python %s -i %s -v %s %s' % (test['test'], options.ip, - options.virt, dbg) + run = 'python %s -i %s -v %s %s -m %s' % (test['test'], options.ip, + options.virt, dbg, + options.t_url) cmd = cdto + ' && ' + ' ' + run status, output = commands.getstatusoutput(cmd) From deeptik at linux.vnet.ibm.com Mon Mar 16 07:27:19 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 16 Mar 2009 00:27:19 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] [TEST][RFC]Modifying emulator information to be used for KVM In-Reply-To: References: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1236949057 25200 # Node ID a7843fdcb24f71bfa7749d9bd96431ceef0e3e32 # Parent c504e1a011d7891cb974702ca249bc7b5ab1fffa [TEST][RFC]Modifying emulator information to be used for KVM. Signed-off-by: Deepti B. Kalakeri diff -r c504e1a011d7 -r a7843fdcb24f suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Mar 13 05:56:33 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Mar 13 05:57:37 2009 -0700 @@ -82,10 +82,12 @@ Xen_default_mac = '11:22:33:aa:bb:cc' # vxml.KVMXML -if fv_cap(CIM_IP): - KVM_default_emulator = '/usr/bin/qemu-kvm' -else: - KVM_default_emulator = '/usr/bin/qemu' +KVM_default_emulator = '/usr/local/bin/qemu-system-x86_64' +if not os.path.exists(KVM_default_emulator): + if fv_cap(CIM_IP): + KVM_default_emulator = '/usr/bin/qemu-kvm' + else: + KVM_default_emulator = '/usr/bin/qemu' KVM_disk_path = os.path.join(_image_dir, 'default-kvm-dimage') KVM_secondary_disk_path = os.path.join(_image_dir, 'default-kvm-dimage.2ND') KVM_default_disk_dev = 'hda' @@ -115,6 +117,8 @@ parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", help="IP address of machine to test, default: localhost") +parser.add_option("-m", "--target_url", dest="t_url", default="localhost:5988", + help="URL of destination host for remote migration ") parser.add_option("-v", "--virt", dest="virt", type="choice", choices=['Xen', 'KVM', 'XenFV', 'LXC'], default="Xen", help="Virt type, select from: 'Xen' & 'KVM' & 'XenFV' & 'LXC', default: Xen") From deeptik at linux.vnet.ibm.com Mon Mar 16 07:27:17 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 16 Mar 2009 00:27:17 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] [TEST][RFC] Added new tc to verify remote live migration. Message-ID: Verified with KVM. The test case will not pass for KVM since the guest information needs to have emulator information without which the remote migration fails. The support to pass the emulator information via VirtualSystemMigrationSettingData is not yet available. As a workaround for verification of the tc. ------------------------------------------- 1) create a KVM VM which has the emulator information outside the tc on the comman line. 2) comment out the setup_guest() call, also comment the undefine and destroy lines at the end of the tc. 3) specify the name of the guest create in test_dom before calling local_remote_migrate(). Signed-off-by: Deepti B. Kalakeri From deeptik at linux.vnet.ibm.com Mon Mar 16 07:27:20 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 16 Mar 2009 00:27:20 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] [TEST][RFC] #2 Adding support for remote migration in the vsmigrations library In-Reply-To: References: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1236951243 25200 # Node ID c272bb5f4c9fcbceb6e70d0b5a0cd0ea40359e72 # Parent a7843fdcb24f71bfa7749d9bd96431ceef0e3e32 [TEST][RFC] #2 Adding support for remote migration in the vsmigrations library. Updates: -------- Patch2: ------- 1) Added log messages for printing JobStatus 2) Removed the vsmservice param to local_remote_migrate and created it locally in the same function. Signed-off-by: Deepti B. Kalakeri diff -r a7843fdcb24f -r c272bb5f4c9f suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Fri Mar 13 05:57:37 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Fri Mar 13 06:34:03 2009 -0700 @@ -3,6 +3,7 @@ # # Authors: # Guolian Yun +# Deepti B. Kalakeri # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public @@ -18,34 +19,59 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -import pywbem -import time +# + +from time import sleep +from pywbem import WBEMConnection, CIMInstanceName from CimTest.CimExt import CIMMethodClass, CIMClassMOF -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.test_doms import destroy_and_undefine_domain -from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib import enumclass -from XenKvmLib.classes import get_typed_class +from XenKvmLib.classes import get_typed_class, virt_types from XenKvmLib.xm_virt_util import domain_list from XenKvmLib.const import get_provider_version +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ + CIM_ERROR_ENUMERATE +# Migration constants +CIM_MIGRATE_OFFLINE=1 +CIM_MIGRATE_LIVE=2 +CIM_MIGRATE_RESUME=3 +CIM_MIGRATE_RESTART=4 + +CIM_JOBSTATE_STARTING=3 +CIM_JOBSTATE_COMPLETE=7 +CIM_JOBSTATE_RUNNING=4 libvirt_mig_changes = 668 +def eval_cls(basename): + def func(f): + def body(virt): + if virt in virt_types: + return eval(get_typed_class(virt, basename)) + return body + return func + + class CIM_VirtualSystemMigrationService(CIMMethodClass): conn = None inst = None - def __init__(self, server, hyp): - self.conn = pywbem.WBEMConnection('http://%s' % server, - (CIM_USER, CIM_PASS), CIM_NS) + def __init__(self, server, virt='Xen'): + self.conn = WBEMConnection('http://%s' % server, + (CIM_USER, CIM_PASS), CIM_NS) - self.inst = hyp + '_VirtualSystemMigrationService' + self.inst = get_typed_class(virt, 'VirtualSystemMigrationService') + at eval_cls('VirtualSystemMigrationService') +def get_vs_mig_setting_class(virt): + pass + class Xen_VirtualSystemMigrationService(CIM_VirtualSystemMigrationService): - def __init__(self, server): - CIM_VirtualSystemMigrationService.__init__(self, server, 'Xen') + pass + +class KVM_VirtualSystemMigrationService(CIM_VirtualSystemMigrationService): + pass # classes to define VirtualSystemMigrationSettingData parameters class CIM_VirtualSystemMigrationSettingData(CIMClassMOF): @@ -56,118 +82,242 @@ self.Priority = priority class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - def __init__(self, type, priority): - CIM_VirtualSystemMigrationSettingData.__init__(self, type, - priority) + pass class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - def __init__(self, type, priority): - CIM_VirtualSystemMigrationSettingData.__init__(self, type, - priority) + pass +def get_msd(virt, mtype='live', mpriority=0): + if mtype == "live": + mtype = CIM_MIGRATE_LIVE + elif mtype == "resume": + mtype = CIM_MIGRATE_RESUME + elif mtype == "restart": + mtype = CIM_MIGRATE_RESTART + elif mtype == "offline": + mtype = CIM_MIGRATE_OFFLINE + else: + logger.error("Invalid migration type '%s' specified", mtype) + return None + try: + vsmsd_cn = get_typed_class(virt, "VirtualSystemMigrationSettingData") + msd = eval(vsmsd_cn)(type=mtype, priority=mpriority) + except Exception, details: + logger.error("In get_msd() Exception details: %s", details) + return None + + return msd.mof() + +def get_guest_ref(guest, virt): + guest_cn = get_typed_class(virt, "ComputerSystem") + keys = { 'Name' : guest, 'CreationClassName' : guest_cn } + cs_ref = None + + try: + cs_ref = CIMInstanceName(guest_cn, keybindings=keys) + + except Exception, details: + logger.error("In fn get_guest_ref() Exception details: %s", details) + return None + + return cs_ref + +#Remove this once vsms.02_host_migrate_type.py uses get_msd() def default_msd_str(mtype=3, mpriority=0): msd = Xen_VirtualSystemMigrationSettingData(type=mtype, priority=mpriority) return msd.mof() -def check_possible_host_migration(service, cs_ref, ip): - rc = None +def check_possible_host_migration(service, cs_ref, ip, msd=None): + res = None try: - rc = service.CheckVirtualSystemIsMigratableToHost(ComputerSystem=cs_ref, - DestinationHost=ip) + checkfn_name = 'service.CheckVirtualSystemIsMigratableToHost' + if msd == None: + res = eval(checkfn_name)(ComputerSystem=cs_ref, DestinationHost=ip) + else: + res = eval(checkfn_name)(ComputerSystem=cs_ref, + DestinationHost=ip, + MigrationSettingData=msd) except Exception, details: - logger.error("Error invoke 'CheckVirtualSystemIsMigratableToHost\'.") + logger.error("Error invoke 'CheckVirtualSystemIsMigratableToHost'.") logger.error("%s", details) return FAIL - if rc == None or rc[1]['IsMigratable'] != True: + if res == None or res[1]['IsMigratable'] != True: + logger.error("Migration check failed") return FAIL return PASS -def migrate_guest_to_host(service, ref, ip, msd=None): + +def migrate_guest_to_host(service, cs_ref, dest_ip, msd=None): ret = [] try: if msd == None: - ret = service.MigrateVirtualSystemToHost(ComputerSystem=ref, - DestinationHost=ip) + ret = service.MigrateVirtualSystemToHost(ComputerSystem=cs_ref, + DestinationHost=dest_ip) else: - ret = service.MigrateVirtualSystemToHost(ComputerSystem=ref, - DestinationHost=ip, + ret = service.MigrateVirtualSystemToHost(ComputerSystem=cs_ref, + DestinationHost=dest_ip, MigrationSettingData=msd) except Exception, details: - logger.error("Error invoke method 'MigrateVirtualSystemToHost\'.") - logger.error("%s", details) + logger.error("Failed to invoke method 'MigrateVirtualSystemToHost'.") + logger.error("Exception in fn migrate_guest_to_host() %s", details) return FAIL, ret if len(ret) == 0: logger.error("MigrateVirtualSystemToHost returns an empty list") return FAIL, ret + return PASS, ret -def get_migration_job_instance(ip, virt, id): +def get_migration_job_instance(src_ip, virt, id): job = [] - key_list = ["instanceid"] - curr_cim_rev, changeset = get_provider_version(virt, ip) + curr_cim_rev, changeset = get_provider_version(virt, src_ip) if curr_cim_rev < libvirt_mig_changes: mig_job_cn = 'Virt_MigrationJob' else: mig_job_cn = get_typed_class(virt, 'MigrationJob') try: - job = enumclass.EnumInstances(ip, mig_job_cn) + job = enumclass.EnumInstances(src_ip, mig_job_cn) + if len(job) < 1: + logger.error("'%s' returned empty list", mig_job_cn) + return FAIL, None + + for i in range(0, len(job)): + if job[i].InstanceID == id: + break + elif i == len(job)-1 and job[i].InstanceID != id: + logger.error("%s err: can't find expected job inst", mig_job_cn) + return FAIL, None except Exception, details: logger.error(CIM_ERROR_ENUMERATE, mig_job_cn) - logger.error(details) + logger.error("Exception in fn get_migration_job_instance() " \ + "details: %s", details) return FAIL, None - if len(job) < 1: - return FAIL, None - - for i in range(0, len(job)): - if job[i].InstanceID == id: - break - elif i == len(job)-1 and job[i].InstanceID != id: - logger.error("%s err: can't find expected job inst", mig_job_cn) - return FAIL, None - return PASS, job[i] -def verify_domain_list(list, local_migrate, test_dom): - status = PASS - if local_migrate == 0 and test_dom not in list: - status = FAIL - if local_migrate == 1 and test_dom in list: +def verify_domain_list(virt, remote_migrate, test_dom, src_ip, target_ip): + status = FAIL + list_src = domain_list(src_ip, virt) + if remote_migrate == 0: + if test_dom in list_src: + status = PASS + elif remote_migrate == 1 : + list_target = domain_list(target_ip, virt) + if test_dom not in list_src and test_dom in list_target: + status = PASS + else: + logger.error("Invalid migration option") + + if status != PASS: + logger.error("Migration verification for '%s' failed", test_dom) + return status + + return status + +def check_migration_job(src_ip, id, target_ip, test_dom, + remote_migrate, virt='Xen', timeout=50): + try: + status, job_inst = get_migration_job_instance(src_ip, virt, id) + if status != PASS: + logger.error("Unable to get mig_job instance for '%s'", test_dom) + return FAIL + status = FAIL - if status != PASS: - logger.error("%s migrate failed", test_dom) + for i in range(0, timeout): + if job_inst.JobState == CIM_JOBSTATE_COMPLETE: + sleep(3) + if job_inst.Status != "Completed": + logger.error("JobStatus for dom '%s' has '%s' instead of "\ + "'Completed'", test_dom, job_inst.Status) + return FAIL + else: + status = verify_domain_list(virt, remote_migrate, test_dom, + src_ip, target_ip) + if status != FAIL: + logger.info("Migration for '%s' succeeded.", test_dom) + logger.info("Migration job status is : %s", + job_inst.Status) + return status + elif job_inst.JobState == CIM_JOBSTATE_RUNNING and i < (timeout-1): + sleep(3) + status, job_inst = get_migration_job_instance(src_ip, virt, id) + if status != PASS: + logger.error("Could not get mig_job instance for '%s'", + test_dom) + return status + else: + logger.error("Migration timed out.... ") + logger.error("Increase timeout > %s and try again..", timeout) + return FAIL + + except Exception, details: + logger.error("In check_migration_job() Exception details: %s", details) + return FAIL + +# Desc: +# Fn Name : local_remote_migrate() +# +# Parameters: +# This fn executes local/remote migration depending on the +# value of remote_migrate. +# Parameters used: +# vsmservice = VSMigrationService Instance +# s_sysname = src host on which migration is initiated +# t_sysname = Target machine for migration +# virt = Xen, KVM +# remote_migrate = 1 [for remote migration, 0 for local] +# mtype = live/resume/offline/restart +# mpriority=0 by default +# guest_name = name of the guest to be migrated +# time_out = time for which migration is tried. +# +def local_remote_migrate(s_sysname, t_sysname, virt='KVM', + remote_migrate=1, mtype='live', mpriority=0, + guest_name=None, time_out=40): + + if guest_name == None: + logger.error("Guest to be migrated not specified.") + return FAIL + + # Get the guest ref + guest_ref = get_guest_ref(guest_name, virt) + if guest_ref == None or guest_ref['Name'] != guest_name: + logger.error("Failed to get the guest refernce to be migrated") + return FAIL + + # Get MigrationSettingData information + msd = get_msd(virt, mtype, mpriority) + if msd == None: return FAIL - return PASS + # Get VirtualSystemMigrationService object + vsms_cn = get_vs_mig_setting_class(virt) + vsmservice = vsms_cn(s_sysname, virt) -def check_migration_job(ip, id, target_ip, test_dom, local_migrate, virt='Xen'): - status, job_inst = get_migration_job_instance(ip, virt, id) + # Verify is destination(t_sysname) can be used for migration + status = check_possible_host_migration(vsmservice, guest_ref, + t_sysname, msd) if status != PASS: return FAIL - for i in range(0, 50): - if job_inst.JobState == 7: - if job_inst.Status != "Completed": - logger.error("%s migrate failed", test_dom) - return FAIL - list_after = domain_list(ip) - status = verify_domain_list(list_after, local_migrate, test_dom) - break - elif job_inst.JobState == 4 and i < 49: - time.sleep(3) - status, job_inst = get_migration_job_instance(ip, virt, id) - if status != PASS: - return FAIL - else: - logger.error("MigrateVirtualSystemToHost took too long") - return FAIL + logger.info("Migrating %s.. this will take some time.", guest_name) + # Migrate the guest to t_sysname + status, ret = migrate_guest_to_host(vsmservice, guest_ref, t_sysname, msd) + if status == FAIL: + logger.error("Failed to Migrate guest '%s' from '%s' to '%s'", + guest_name, s_sysname, t_sysname) + return status + elif len(ret) == 2: + id = ret[1]['Job'].keybindings['InstanceID'] - return PASS + # Verify if migration status + status = check_migration_job(s_sysname, id, t_sysname, guest_name, + remote_migrate, virt, timeout=time_out) + return status From deeptik at linux.vnet.ibm.com Mon Mar 16 07:27:21 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 16 Mar 2009 00:27:21 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST][RFC] #2 Added new tc to verify remote live migration In-Reply-To: References: Message-ID: <8a282c8879a9986c2bdd.1237188441@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1237188257 25200 # Node ID 8a282c8879a9986c2bdde0238a4307ea3378ee4b # Parent c272bb5f4c9fcbceb6e70d0b5a0cd0ea40359e72 [TEST][RFC] #2 Added new tc to verify remote live migration. Updates: -------- Patch 2: ------- 1) Moved the VSMS object creation to vsmigration.py local_remote_migrate() fn. 2) Added check for domains on src and target, Undefined & destoryed domain on src and target depending on their existence. Verified with KVM. The test case will not pass for KVM since the guest information needs to have emulator information without which the remote migration fails. The support to pass the emulator information via VirtualSystemMigrationSettingData is not yet available. Signed-off-by: Deepti B. Kalakeri diff -r c272bb5f4c9f -r 8a282c8879a9 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py Mon Mar 16 00:24:17 2009 -0700 @@ -0,0 +1,116 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# +# 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 testcase is used to verify the live remote migration. +# +# Date : 12-03-09 +# + +import sys +import os +from socket import gethostname, gethostbyaddr +from XenKvmLib import vxml +from XenKvmLib.xm_virt_util import domain_list +from XenKvmLib.common_util import poll_for_state_change +from CimTest.Globals import logger +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.classes import get_typed_class +from XenKvmLib.vsmigrations import local_remote_migrate + +sup_types = ['KVM', 'Xen'] + +REQUESTED_STATE = 2 + +def setup_guest(test_dom, ip, virt): + virt_xml = vxml.get_class(virt) + cxml = virt_xml(test_dom) + ret = cxml.cim_define(ip) + if not ret: + logger.error("Error define domain %s", test_dom) + return FAIL, cxml + + status = cxml.cim_start(ip) + if status != PASS: + cxml.undefine(test_dom) + logger.error("Error to start domain %s", test_dom) + return FAIL, cxml + + status, dom_cs = poll_for_state_change(ip, virt, test_dom, + REQUESTED_STATE) + if status != PASS: + cxml.cim_destroy(test_dom) + cxml.undefine(test_dom) + logger.error("'%s' didn't change state as expected" % test_dom) + return FAIL, cxml + + return PASS, cxml + + at do_main(sup_types) +def main(): + options = main.options + virt = options.virt + s_sysname = gethostbyaddr(options.ip)[0] + t_sysname = gethostbyaddr(options.t_url)[0] + if options.virt == 'KVM' and (t_sysname == s_sysname or \ + t_sysname in s_sysname): + logger.info("Libvirt does not support local migratoin for KVM") + return SKIP + + status = FAIL + test_dom = 'VM_frm_' + gethostname() + + try: + status, cxml = setup_guest(test_dom, s_sysname, virt) + if status != PASS: + logger.error("Error setting up the guest") + return status + + # Migrate the test_dom to t_sysname. + # local_remote_migrate executes live migration by default + # Enable remote migration by setting remote_migrate=1 + status = local_remote_migrate(s_sysname, t_sysname, virt, + remote_migrate=1, guest_name=test_dom) + except Exception, details: + logger.error("Exception details :%s", details) + status = FAIL + + # Clean the domain on target machine. + # This req when migration is successful, also when migration is not + # completely successful VM might be created on the target machine + # and hence need to clean. + target_list = domain_list(t_sysname, virt) + if target_list != None and test_dom in target_list: + cxml.cim_destroy(t_sysname) + cxml.undefine(t_sysname) + + # Remote Migration not Successful, clean the domain on src machine + src_list = domain_list(s_sysname, virt) + if src_list != None and test_dom in src_list: + cxml.cim_destroy(s_sysname) + cxml.undefine(s_sysname) + + return status + +if __name__ == "__main__": + sys.exit(main()) From yunguol at cn.ibm.com Mon Mar 16 07:46:10 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 16 Mar 2009 00:46:10 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message Message-ID: <079bbc777d5b6968c4d2.1237189570@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1237189564 25200 # Node ID 079bbc777d5b6968c4d2cf0220a509ffc63e820d # Parent b1e05c9de638909c5c6a7ba86aa2b3551802d013 [TEST] #2 Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message Updates from 1 to 2: 1) Remove unused import statement 2) Redefine exp_value for different provider version 3) Add log error desc for report mismatching exception Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r b1e05c9de638 -r 079bbc777d5b suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Fri Mar 13 10:31:05 2009 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Mon Mar 16 00:46:04 2009 -0700 @@ -20,47 +20,54 @@ # 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 VSMS.DestroySystem with invalid vs. + import sys import pywbem from pywbem.cim_obj import CIMInstanceName -from VirtLib import utils from XenKvmLib import vsms from XenKvmLib.classes import get_typed_class -from XenKvmLib.test_doms import undefine_test_domain from CimTest.Globals import logger -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import FAIL, PASS, SKIP sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] -vsms_status_version = 534 +vsms_err_message = 814 def destroysystem_fail(tc, options): service = vsms.get_vsms_class(options.virt)(options.ip) classname = get_typed_class(options.virt, 'ComputerSystem') + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) if tc == 'noname': cs_ref = CIMInstanceName(classname, keybindings = {'CreationClassName':classname}) - exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, - 'desc' : 'Unable to retrieve domain name.' - } + if curr_cim_rev >= vsms_err_message: + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : 'Unable to retrieve domain name: Error 0' + } + else: + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, + 'desc' : 'Unable to retrieve domain name.' + } elif tc == 'nonexistent': cs_ref = CIMInstanceName(classname,keybindings = { 'Name':'##@@!!cimtest_domain', 'CreationClassName':classname}) - exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, - 'desc' : 'Failed to find domain' - } + if curr_cim_rev >= vsms_err_message: + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : "Referenced domain `##@@!!cimtest_domain'" \ + " does not exist: Domain not found"} + else: + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, + 'desc' : 'Failed to find domain' + } - else: - return SKIP - - status = FAIL try: ret = service.DestroySystem(AffectedSystem=cs_ref) @@ -68,30 +75,33 @@ err_no = details[0] err_desc = details[1] if err_no == exp_value['rc'] and err_desc.find(exp_value['desc']) >= 0: - logger.error("For Invalid Scenario '%s'", tc) + logger.info("For Invalid Scenario '%s'", tc) logger.info('Got expected error no: %s', err_no) logger.info('Got expected error desc: %s',err_desc) return PASS - - logger.error('destroy_fail>> %s: Error executing DestroySystem', tc) - logger.error(details) - return FAIL + else: + logger.error("For Invalid Scenario '%s'", tc) + logger.error('Got error no %s, but expected no %s', + err_no, exp_value['rc']) + logger.error('Got error desc: %s, but expected desc: %s', + err_desc, exp_value['desc']) + return FAIL + logger.error('destroy_fail>> %s: Error executing DestroySystem', tc) + logger.error(details) + return FAIL @do_main(sup_types) def main(): options = main.options rc1 = destroysystem_fail('noname', options) rc2 = destroysystem_fail('nonexistent', options) - + status = FAIL if rc1 == PASS and rc2 == PASS: status = PASS else: - rclist = [rc1, rc2] - rclist.sort() - if rclist[0] == PASS and rclist[1] == SKIP: - status = PASS - + status = FAIL + return status if __name__ == "__main__": From deeptik at linux.vnet.ibm.com Mon Mar 16 08:45:23 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 16 Mar 2009 14:15:23 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Make sure network pool is created with a random IP In-Reply-To: References: Message-ID: <49BE11A3.40706@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1236965462 25200 > # Node ID bc7ee42128a826ef12c8d7a90ff611a6688f8136 > # Parent b1e05c9de638909c5c6a7ba86aa2b3551802d013 > [TEST] #3 Make sure network pool is created with a random IP. > > This will help prevent overlap with existing networks. However, this won't > completely prevent the issue. We'd need to do test to see if the IP address > is already used by a different network. If the network is in use, then another > IP address should be used. > > Updates from 2 to 3: > -If IP address is already in use, return from the _init_() call. > > Updates from 1 to 2: > -Check to see if pool with the specified IP range exists, if so, return a > meaningful error > -Since the NetXML generates a random IP, creating a NetXML object in the > destroy call will generate an object with a different IP. Instead, use > the virsh call to destroy the network. > > Signed-off-by: Kaitlin Rupert > > diff -r b1e05c9de638 -r bc7ee42128a8 suites/libvirt-cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Mar 13 10:31:05 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Mar 13 10:31:02 2009 -0700 > @@ -36,7 +36,7 @@ > CIM_ERROR_GETINSTANCE > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list,\ > - domain_list, virt2uri > + domain_list, virt2uri, net_destroy > from XenKvmLib.vxml import PoolXML, NetXML > from VirtLib import utils > from XenKvmLib.const import default_pool_name, default_network_name > @@ -438,11 +438,9 @@ > if net_name == None: > return FAIL > > - netxml = NetXML(server, virt=virt, networkname=net_name) > - ret = netxml.destroy_vnet() > - if not ret: > - logger.error("Failed to destroy Virtual Network '%s'", > - net_name) > + ret = net_destroy(net_name, server, virt) > + if ret != 0: > + logger.error("Failed to destroy Virtual Network '%s'", net_name) > return FAIL > > return PASS > diff -r b1e05c9de638 -r bc7ee42128a8 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Mar 13 10:31:05 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Mar 13 10:31:02 2009 -0700 > @@ -32,6 +32,7 @@ > # shared by XenXML & KVMXML. > import os > import sys > +import random > import platform > import tempfile > from time import sleep > @@ -39,7 +40,8 @@ > from xml.dom import minidom, Node > from xml import xpath > from VirtLib import utils, live > -from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader > +from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader, \ > + net_list > from XenKvmLib.test_doms import set_uuid, viruuid > from XenKvmLib import vsms > from XenKvmLib import const > @@ -182,7 +184,6 @@ > def get_valid_bridge_name(server): > bridge_list = live.available_bridges(server) > if bridgename in bridge_list: > - import random > vbr = bridgename + str(random.randint(1, 100)) > if vbr in bridge_list: > logger.error('Need to give different bridge name ' > @@ -210,10 +211,25 @@ > subnet = '192.168.122.' > self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', > forwardDelay='0') > - ip = self.add_sub_node(network, 'ip', address=subnet+'1', > + ip_base = random.randint(1, 100) > + addr = subnet+'%d' % ip_base > + addr = subnet+'1' > You are reassigning addr variable which removes the purpose of assigning new random ip. > + > + n_list = net_list(server, virt) > + for _net_name in n_list: > + cmd = "virsh net-dumpxml %s | 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("'") > + if in_use_addr == addr: > + logger.error("IP address is in use by a different network") > + return None > + > + ip = self.add_sub_node(network, 'ip', address=addr, > netmask='255.255.255.0') > dhcp = self.add_sub_node(ip, 'dhcp') > - self.add_sub_node(dhcp, 'range', start=subnet+'2', > + range_addr = subnet+'%d' % (ip_base + 1) > + self.add_sub_node(dhcp, 'range', start=range_addr, > end=subnet+'254') > > def create_vnet(self): > diff -r b1e05c9de638 -r bc7ee42128a8 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Fri Mar 13 10:31:05 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Fri Mar 13 10:31:02 2009 -0700 > @@ -184,6 +184,14 @@ > if len(bridge) > 1: > return bridge[1] > > +def net_destroy(network, server, virt="Xen"): > + """Function destroys a given virtual network""" > + > + cmd = "virsh -c %s net-destroy %s" % (virt2uri(virt), network) > + ret, out = utils.run_remote(server, cmd) > + > + return ret > + > def network_by_bridge(bridge, server, virt="Xen"): > """Function returns virtual network for a given bridge""" > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 16 09:03:31 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 16 Mar 2009 14:33:31 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message In-Reply-To: <079bbc777d5b6968c4d2.1237189570@elm3b197.beaverton.ibm.com> References: <079bbc777d5b6968c4d2.1237189570@elm3b197.beaverton.ibm.com> Message-ID: <49BE15E3.4030306@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1237189564 25200 > # Node ID 079bbc777d5b6968c4d2cf0220a509ffc63e820d > # Parent b1e05c9de638909c5c6a7ba86aa2b3551802d013 > [TEST] #2 Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message > > > Updates from 1 to 2: > 1) Remove unused import statement > 2) Redefine exp_value for different provider version > 3) Add log error desc for report mismatching exception > > Tested for KVM with current sources and rpm > > Signed-off-by: Guolian Yun > > diff -r b1e05c9de638 -r 079bbc777d5b suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Fri Mar 13 10:31:05 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Mon Mar 16 00:46:04 2009 -0700 > @@ -20,47 +20,54 @@ > # 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 VSMS.DestroySystem with invalid vs. > + > > import sys > import pywbem > from pywbem.cim_obj import CIMInstanceName > -from VirtLib import utils > from XenKvmLib import vsms > from XenKvmLib.classes import get_typed_class > -from XenKvmLib.test_doms import undefine_test_domain > from CimTest.Globals import logger > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version > from CimTest.ReturnCodes import FAIL, PASS, SKIP > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > -vsms_status_version = 534 > +vsms_err_message = 814 > > def destroysystem_fail(tc, options): > service = vsms.get_vsms_class(options.virt)(options.ip) > > classname = get_typed_class(options.virt, 'ComputerSystem') > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > > if tc == 'noname': > cs_ref = CIMInstanceName(classname, > keybindings = {'CreationClassName':classname}) > > - exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, > - 'desc' : 'Unable to retrieve domain name.' > - } > + if curr_cim_rev >= vsms_err_message: > + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > + 'desc' : 'Unable to retrieve domain name: Error 0' > + } > + else: > + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, > + 'desc' : 'Unable to retrieve domain name.' > + } > > elif tc == 'nonexistent': > cs_ref = CIMInstanceName(classname,keybindings = { > 'Name':'##@@!!cimtest_domain', > 'CreationClassName':classname}) > > - exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, > - 'desc' : 'Failed to find domain' > - } > + if curr_cim_rev >= vsms_err_message: > + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > + 'desc' : "Referenced domain `##@@!!cimtest_domain'" \ > + " does not exist: Domain not found"} > + else: > + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, > + 'desc' : 'Failed to find domain' > + } > > - else: > - return SKIP > - > - status = FAIL > try: > ret = service.DestroySystem(AffectedSystem=cs_ref) > > @@ -68,30 +75,33 @@ > err_no = details[0] > err_desc = details[1] > if err_no == exp_value['rc'] and err_desc.find(exp_value['desc']) >= 0: > - logger.error("For Invalid Scenario '%s'", tc) > + logger.info("For Invalid Scenario '%s'", tc) > logger.info('Got expected error no: %s', err_no) > logger.info('Got expected error desc: %s',err_desc) > return PASS > - > - logger.error('destroy_fail>> %s: Error executing DestroySystem', tc) > - logger.error(details) > - return FAIL > + else: > + logger.error("For Invalid Scenario '%s'", tc) > + logger.error('Got error no %s, but expected no %s', > + err_no, exp_value['rc']) > + logger.error('Got error desc: %s, but expected desc: %s', > + err_desc, exp_value['desc']) > + return FAIL > You can write the following log message before the if conditional statement above, we dont need to duplicate the statement. logger.error("For Invalid Scenario '%s'", tc) > + logger.error('destroy_fail>> %s: Error executing DestroySystem', tc) > + logger.error(details) > + return FAIL > > @do_main(sup_types) > def main(): > options = main.options > rc1 = destroysystem_fail('noname', options) > rc2 = destroysystem_fail('nonexistent', options) > - > + > status = FAIL > if rc1 == PASS and rc2 == PASS: > status = PASS > No need to assign status separately, instead use return PASS. > else: > - rclist = [rc1, rc2] > - rclist.sort() > - if rclist[0] == PASS and rclist[1] == SKIP: > - status = PASS > - > + status = FAIL > No need to assign status separately here for else, since status = FAIL is assigned before the if rc1 == PASS and rc2 == PASS: condition. > + > return status > Or else the main() can written as below: @do_main(sup_types) def main(): options = main.options rc1 = destroysystem_fail('noname', options) rc2 = destroysystem_fail('nonexistent', options) if rc1 == PASS and rc2 == PASS: return PASS return FAIL if __name__ == "__main__": sys.exit(main()) > if __name__ == "__main__": > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Mon Mar 16 09:35:01 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 16 Mar 2009 02:35:01 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add tc to verify VSMS.RemoveResourceSettings() with correct resource Message-ID: # HG changeset patch # User Guolian Yun # Date 1237196093 25200 # Node ID dd3b676d57e5e719213e4587743c0b0c06194160 # Parent b1e05c9de638909c5c6a7ba86aa2b3551802d013 [TEST] #2 Add tc to verify VSMS.RemoveResourceSettings() with correct resource Updates from 1 to 2: Get RASD instances by SystemDevice and SettingsDefineState associaton Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r b1e05c9de638 -r dd3b676d57e5 suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py Mon Mar 16 02:34:53 2009 -0700 @@ -0,0 +1,108 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Guolian Yun +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +import sys +from XenKvmLib.vsms import get_vsms_class +from XenKvmLib.vxml import get_class +from XenKvmLib.classes import get_typed_class +from XenKvmLib.assoc import AssociatorNames +from CimTest.Globals import logger +from XenKvmLib.const import do_main, get_provider_version +from CimTest.ReturnCodes import FAIL, PASS, SKIP + +sup_types = ['Xen', 'KVM', 'XenFV'] +default_dom = 'domain' +rem_res_err_rev_start = 779 +rem_res_err_rev_end = 828 +nmac = '00:11:22:33:44:55' + + at do_main(sup_types) +def main(): + options = main.options + + if options.virt == 'KVM': + nddev = 'hdb' + else: + nddev = 'xvdb' + + cxml = get_class(options.virt)(default_dom, disk=nddev, mac=nmac) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + return FAIL + + try: + # Get system devices through SystemDevice assocation + sd_classname = get_typed_class(options.virt, 'SystemDevice') + cs_classname = get_typed_class(options.virt, 'ComputerSystem') + + devs = AssociatorNames(options.ip, sd_classname, cs_classname, + Name=default_dom, CreationClassName=cs_classname) + + if len(devs) == 0: + raise Exception("No devices returned") + + # Get RASD instances through SettingsDefineState + sds_classname = get_typed_class(options.virt, 'SettingsDefineState') + mem = get_typed_class(options.virt, 'Memory') + proc = get_typed_class(options.virt, 'Processor') + input = get_typed_class(options.virt, 'PointingDevice') + dev_not_rem = [mem, proc, input] + + for dev in devs: + if dev['CreationClassName'] not in dev_not_rem: + ccn = dev['CreationClassName'] + sccn = dev['SystemCreationClassName'] + rasd = AssociatorNames(options.ip, sds_classname, ccn, + DeviceID = dev['DeviceID'], + CreationClassName = ccn, + SystemName = dev['SystemName'], + SystemCreationClassName = sccn) + if len(rasd) != 1: + raise Exception("%i RASD insts for %s", len(rasd), dev.DeviceID) + + # Invoke RemoveResourceSettings() to remove resource + service = get_vsms_class(options.virt)(options.ip) + service.RemoveResourceSettings(ResourceSettings=[rasd[0]]) + except Exception, details: + logger.error(details) + cxml.undefine(options.ip) + return FAIL + + cxml.dumpxml(options.ip) + device = cxml.get_value_xpath('/domain/@devices') + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + + if device == None: + status = PASS + elif device != None and curr_cim_rev >= rem_res_err_rev_start and\ + curr_cim_rev < rem_res_err_rev_end: + status = SKIP + else: + logger.error('The devices are not removed successfully') + status = FAIL + + cxml.undefine(options.ip) + return status + +if __name__ == "__main__": + sys.exit(main()) From deeptik at linux.vnet.ibm.com Mon Mar 16 09:24:02 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 16 Mar 2009 14:54:02 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 16 2009): KVM on Fedora release 10 (Cambridge) with Pegasus Message-ID: <49BE1AB2.2060309@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 16 2009): KVM on Fedora release 10 (Cambridge) with Pegasus ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.5.1 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 812 Libvirt-cim changeset: bad1a43ac1b0 Cimtest revision: 646 Cimtest changeset: b1e05c9de638 ================================================= FAIL : 0 XFAIL : 3 SKIP : 4 PASS : 139 ----------------- Total : 146 ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: 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 -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Mon Mar 16 09:20:50 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 16 Mar 2009 17:20:50 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: <49BAAD7A.5070900@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-14 03:01:14: > > > > + drasd = get_typed_class(options.virt, > > > 'DiskResourceAllocationSettingData') > > > > + drasd_id = '%s/%s' % (default_dom, nddev) > > > > + dkeys = {'InstanceID' : drasd_id} > > > > + > > > > + nrasd = get_typed_class(options.virt, > > > 'NetResourceAllocationSettingData') > > > > + nrasd_id = '%s/%s' % (default_dom, nmac) > > > > + nkeys = {'InstanceID' : nrasd_id} > > > > > > Instead of hand building the instances for the resources, use the proper > > > association calls to get the RASD instances. You know the guest, so > > > you can use SystemDevice to get the resource instance, and then > > > SettingsDefineState to get the RASD instances. > > > > I'm working on a new patch to get the RASD instances by association. > > But I can't remove "KVM_InputResourceAllocationSettingData" which output > > the device "mouse:ps2" can not be found. Actually, I get it by > > SettingsDefineState. > > If I remove this device from the ResourceSettings, this method works > > for me. > > > > Sorry Daisy.. I'm not sure I understand the problem you're hitting. > > Are you seeing an error trying to remove an input device from a guest? > What error message do you see? Sorry for my confusion. I send out #2 patch. The problem is that I can not remove InputRASD. Below is the report error: VirtualSystemManagementService - 16_removeresource.py: FAIL ERROR - 'CIMInstanceName' object has no attribute 'DeviceID' No such instance (no device domain/mouse:ps2) So I Skip InputRASD together with MemRASD and ProcRASD in #2 patch. > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Mar 16 10:20:50 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 16 Mar 2009 15:50:50 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 16 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49BE2802.6040702@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 16 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 646 Cimtest changeset: b1e05c9de638 ================================================= FAIL : 9 XFAIL : 1 SKIP : 13 PASS : 123 ----------------- Total : 146 ================================================= FAIL Test Summary: RASD - 01_verify_rasd_fields.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.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: SKIP -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedAccessPoint - 01_forward.py: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/proc)') ERROR - Enum RASDs failed -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ERROR - VirtualQuantity is 1, expected 3 ERROR - Exception: details CPU scheduling not set properly for the dom: procrasd_persist_dom -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Xen_DiskResourceAllocationSettingData instance for rstest_disk_domain not found ERROR - Failed to verify disk path for rstest_disk_domain -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - dom_migrate migrate failed Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - MigrateVirtualSystemToHost took too long -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Error start domain dom_migration InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Failed to start the dom: VSSDC_dom InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 16 10:41:10 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 16 Mar 2009 16:11:10 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 16 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49BE2CC6.7060405@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 16 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 646 Cimtest changeset: b1e05c9de638 ================================================= FAIL : 8 XFAIL : 1 SKIP : 12 PASS : 125 ----------------- Total : 146 ================================================= FAIL Test Summary: RASD - 01_verify_rasd_fields.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.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 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedAccessPoint - 01_forward.py: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/xvda)') ERROR - Enum RASDs failed -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: PASS -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Xen_DiskResourceAllocationSettingData instance for rstest_disk_domain not found ERROR - Failed to verify disk path for rstest_disk_domain -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - MigrateVirtualSystemToHost took too long Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - CS instance not returned for dom_migrate. ERROR - Error start domain dom_migrate InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). CIM_ERR_NOT_FOUND: No such instance (dom_migrate). -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Error start domain dom_migration InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Failed to start the dom: VSSDC_dom InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with return code 1 ERROR - Unable to start domain domu1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Mar 16 19:24:06 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 16 Mar 2009 12:24:06 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] [TEST][RFC] Added new tc to verify remote live migration In-Reply-To: <49BD06D8.1010505@linux.vnet.ibm.com> References: <89db4ac2378c90fd8984.1236853939@localhost.localdomain> <49B99C0A.7040905@linux.vnet.ibm.com> <49BA4F6A.9070503@linux.vnet.ibm.com> <49BAA1A3.4090907@linux.vnet.ibm.com> <49BD06D8.1010505@linux.vnet.ibm.com> Message-ID: <49BEA756.2060604@linux.vnet.ibm.com> >> I'm not sure what you mean here.. for each of the migration types, you >> can still call local_remote_migrate(). The only difference here is >> that the function will set up the VirtualSystemMigrationService object >> each time. > Oops! I mixed two different things. Yes I had included the > VirtualSystemMigrationService object creation to be able to use it for > different migration types. > Also, I was en quiring with you that if it is a good idea to include > scenarios for all the migration types in one tc. > Sorry for not being clear. No problem! I think it's possible to include all the migration types in to one test. If it looks like the test will become too complex, then you can break it up. But I think it should be easy to add the others in without too much complexity. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Mar 16 19:25:35 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 16 Mar 2009 12:25:35 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Make sure network pool is created with a random IP In-Reply-To: <49BE11A3.40706@linux.vnet.ibm.com> References: <49BE11A3.40706@linux.vnet.ibm.com> Message-ID: <49BEA7AF.4050402@linux.vnet.ibm.com> >> @@ -210,10 +211,25 @@ >> subnet = '192.168.122.' >> self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', >> forwardDelay='0') >> - ip = self.add_sub_node(network, 'ip', address=subnet+'1', >> + ip_base = random.randint(1, 100) >> + addr = subnet+'%d' % ip_base >> + addr = subnet+'1' >> > You are reassigning addr variable which removes the purpose of assigning > new random ip. Oops! I had made some changes to do some testing, and I forgot to revert my changes before sending. =( I'll clean this up and send again. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Mar 16 19:29:21 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 16 Mar 2009 12:29:21 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Make sure network pool is created with a random IP Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1236965462 25200 # Node ID e7a106fadb25acb73ecc8d5ff4137611d942548a # Parent b1e05c9de638909c5c6a7ba86aa2b3551802d013 [TEST] #4 Make sure network pool is created with a random IP. This will help prevent overlap with existing networks. However, this won't completely prevent the issue. We'd need to do test to see if the IP address is already used by a different network. If the network is in use, then another IP address should be used. Update from 3 to 4: -Remove changes made for debugging purposes: *Uisng a 192.168.122 value for the subnet instead of 192.168.123 *Overriding addr value Updates from 2 to 3: -If IP address is already in use, return from the _init_() call. Updates from 1 to 2: -Check to see if pool with the specified IP range exists, if so, return a meaningful error -Since the NetXML generates a random IP, creating a NetXML object in the destroy call will generate an object with a different IP. Instead, use the virsh call to destroy the network. Signed-off-by: Kaitlin Rupert diff -r b1e05c9de638 -r e7a106fadb25 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Mar 13 10:31:05 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Mar 13 10:31:02 2009 -0700 @@ -36,7 +36,7 @@ CIM_ERROR_GETINSTANCE from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC from XenKvmLib.xm_virt_util import diskpool_list, virsh_version, net_list,\ - domain_list, virt2uri + domain_list, virt2uri, net_destroy from XenKvmLib.vxml import PoolXML, NetXML from VirtLib import utils from XenKvmLib.const import default_pool_name, default_network_name @@ -438,11 +438,9 @@ if net_name == None: return FAIL - netxml = NetXML(server, virt=virt, networkname=net_name) - ret = netxml.destroy_vnet() - if not ret: - logger.error("Failed to destroy Virtual Network '%s'", - net_name) + ret = net_destroy(net_name, server, virt) + if ret != 0: + logger.error("Failed to destroy Virtual Network '%s'", net_name) return FAIL return PASS diff -r b1e05c9de638 -r e7a106fadb25 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Mar 13 10:31:05 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Mar 13 10:31:02 2009 -0700 @@ -32,6 +32,7 @@ # shared by XenXML & KVMXML. import os import sys +import random import platform import tempfile from time import sleep @@ -39,7 +40,8 @@ from xml.dom import minidom, Node from xml import xpath from VirtLib import utils, live -from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader +from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader, \ + net_list from XenKvmLib.test_doms import set_uuid, viruuid from XenKvmLib import vsms from XenKvmLib import const @@ -182,7 +184,6 @@ def get_valid_bridge_name(server): bridge_list = live.available_bridges(server) if bridgename in bridge_list: - import random vbr = bridgename + str(random.randint(1, 100)) if vbr in bridge_list: logger.error('Need to give different bridge name ' @@ -207,13 +208,27 @@ self.add_sub_node(network, 'name', self.net_name) self.add_sub_node(network, 'uuid', set_uuid()) self.add_sub_node(network, 'forward') - subnet = '192.168.122.' + subnet = '192.168.123.' self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', forwardDelay='0') - ip = self.add_sub_node(network, 'ip', address=subnet+'1', + ip_base = random.randint(1, 100) + addr = subnet+'%d' % ip_base + + n_list = net_list(server, virt) + for _net_name in n_list: + cmd = "virsh net-dumpxml %s | 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("'") + if in_use_addr == addr: + logger.error("IP address is in use by a different network") + return None + + ip = self.add_sub_node(network, 'ip', address=addr, netmask='255.255.255.0') dhcp = self.add_sub_node(ip, 'dhcp') - self.add_sub_node(dhcp, 'range', start=subnet+'2', + range_addr = subnet+'%d' % (ip_base + 1) + self.add_sub_node(dhcp, 'range', start=range_addr, end=subnet+'254') def create_vnet(self): diff -r b1e05c9de638 -r e7a106fadb25 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Fri Mar 13 10:31:05 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Fri Mar 13 10:31:02 2009 -0700 @@ -184,6 +184,14 @@ if len(bridge) > 1: return bridge[1] +def net_destroy(network, server, virt="Xen"): + """Function destroys a given virtual network""" + + cmd = "virsh -c %s net-destroy %s" % (virt2uri(virt), network) + ret, out = utils.run_remote(server, cmd) + + return ret + def network_by_bridge(bridge, server, virt="Xen"): """Function returns virtual network for a given bridge""" From kaitlin at linux.vnet.ibm.com Mon Mar 16 19:31:39 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 16 Mar 2009 12:31:39 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message In-Reply-To: <079bbc777d5b6968c4d2.1237189570@elm3b197.beaverton.ibm.com> References: <079bbc777d5b6968c4d2.1237189570@elm3b197.beaverton.ibm.com> Message-ID: <49BEA91B.1020605@linux.vnet.ibm.com> > + else: > + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, > + 'desc' : 'Unable to retrieve domain name.' > + } This bracket should be aligned under the opening bracket. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Mar 16 20:46:52 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 16 Mar 2009 13:46:52 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: References: Message-ID: <49BEBABC.4080406@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-14 03:01:14: > > > > > > + drasd = get_typed_class(options.virt, > > > > 'DiskResourceAllocationSettingData') > > > > > + drasd_id = '%s/%s' % (default_dom, nddev) > > > > > + dkeys = {'InstanceID' : drasd_id} > > > > > + > > > > > + nrasd = get_typed_class(options.virt, > > > > 'NetResourceAllocationSettingData') > > > > > + nrasd_id = '%s/%s' % (default_dom, nmac) > > > > > + nkeys = {'InstanceID' : nrasd_id} > > > > > > > > Instead of hand building the instances for the resources, use > the proper > > > > association calls to get the RASD instances. You know the > guest, so > > > > you can use SystemDevice to get the resource instance, and then > > > > SettingsDefineState to get the RASD instances. > > > > > > I'm working on a new patch to get the RASD instances by association. > > > But I can't remove "KVM_InputResourceAllocationSettingData" which > output > > > the device "mouse:ps2" can not be found. Actually, I get it by > > > SettingsDefineState. > > > If I remove this device from the ResourceSettings, this method works > > > for me. > > > > > > > Sorry Daisy.. I'm not sure I understand the problem you're hitting. > > > > Are you seeing an error trying to remove an input device from a guest? > > What error message do you see? > > Sorry for my confusion. I send out #2 patch. The problem is that I > can not remove InputRASD. Below is the report error: > > VirtualSystemManagementService - 16_removeresource.py: FAIL > ERROR - 'CIMInstanceName' object has no attribute 'DeviceID' > No such instance (no device domain/mouse:ps2) Which virtualization type are you seeing this issue on? I'm not seeing an issue with KVM. I tried running on a Xen system, and I get the following error: VirtualSystemManagementService - 16_removeresource.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to define domain: invalid argument in virDomainDefineXML with return code 1 ERROR - Failed to define the dom: domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to define domain: invalid argument in virDomainDefineXML Can you paste the provider debug you're seeing? > > So I Skip InputRASD together with MemRASD and ProcRASD in #2 patch. > The providers should be able to remove input devices, so you'll want to include that in the test. If you're seeing an error, it's either a test case issue or a provider issue. It's better to resolve these issues before resending an updated patch (it'll reduce the amount of churn in a given patch). Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Mar 16 20:50:27 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 16 Mar 2009 13:50:27 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: References: Message-ID: <49BEBB93.8070709@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1237196093 25200 > # Node ID dd3b676d57e5e719213e4587743c0b0c06194160 > # Parent b1e05c9de638909c5c6a7ba86aa2b3551802d013 > [TEST] #2 Add tc to verify VSMS.RemoveResourceSettings() with correct resource > > > Updates from 1 to 2: > Get RASD instances by SystemDevice and SettingsDefineState associaton > > Tested for KVM with current sources and rpm > Signed-off-by: Guolian Yun > > diff -r b1e05c9de638 -r dd3b676d57e5 suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py Mon Mar 16 02:34:53 2009 -0700 > @@ -0,0 +1,108 @@ > +#!/usr/bin/python > +# > +# Copyright 2009 IBM Corp. > +# > +# Authors: > +# Guolian Yun > +# > +# This library is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public > +# License as published by the Free Software Foundation; either > +# version 2.1 of the License, or (at your option) any later version. > +# > +# This library is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +# General Public License for more details. > +# > +# You should have received a copy of the GNU General Public > +# License along with this library; if not, write to the Free Software > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > +# > + > +import sys > +from XenKvmLib.vsms import get_vsms_class > +from XenKvmLib.vxml import get_class > +from XenKvmLib.classes import get_typed_class > +from XenKvmLib.assoc import AssociatorNames > +from CimTest.Globals import logger > +from XenKvmLib.const import do_main, get_provider_version > +from CimTest.ReturnCodes import FAIL, PASS, SKIP > + > +sup_types = ['Xen', 'KVM', 'XenFV'] > +default_dom = 'domain' > +rem_res_err_rev_start = 779 > +rem_res_err_rev_end = 828 > +nmac = '00:11:22:33:44:55' > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + if options.virt == 'KVM': > + nddev = 'hdb' > + else: > + nddev = 'xvdb' > + > + cxml = get_class(options.virt)(default_dom, disk=nddev, mac=nmac) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to define the dom: %s", default_dom) > + return FAIL > + > + try: > + # Get system devices through SystemDevice assocation > + sd_classname = get_typed_class(options.virt, 'SystemDevice') > + cs_classname = get_typed_class(options.virt, 'ComputerSystem') > + > + devs = AssociatorNames(options.ip, sd_classname, cs_classname, > + Name=default_dom, CreationClassName=cs_classname) > + > + if len(devs) == 0: > + raise Exception("No devices returned") > + > + # Get RASD instances through SettingsDefineState > + sds_classname = get_typed_class(options.virt, 'SettingsDefineState') > + mem = get_typed_class(options.virt, 'Memory') > + proc = get_typed_class(options.virt, 'Processor') > + input = get_typed_class(options.virt, 'PointingDevice') > + dev_not_rem = [mem, proc, input] > + > + for dev in devs: > + if dev['CreationClassName'] not in dev_not_rem: A cleaner way would be: if dev['CreationClassName'] in dev_not_rem: continue That way, the bulk of the for loop doesn't have to be underneath the if block. > + ccn = dev['CreationClassName'] > + sccn = dev['SystemCreationClassName'] > + rasd = AssociatorNames(options.ip, sds_classname, ccn, > + DeviceID = dev['DeviceID'], > + CreationClassName = ccn, > + SystemName = dev['SystemName'], > + SystemCreationClassName = sccn) > + if len(rasd) != 1: > + raise Exception("%i RASD insts for %s", len(rasd), dev.DeviceID) > + > + # Invoke RemoveResourceSettings() to remove resource > + service = get_vsms_class(options.virt)(options.ip) > + service.RemoveResourceSettings(ResourceSettings=[rasd[0]]) Capture the return of RemoveResourceSettings() and check for an error. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Mar 16 22:20:59 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 16 Mar 2009 15:20:59 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] [TEST][RFC] Added new tc to verify remote live migration. In-Reply-To: References: Message-ID: <49BED0CB.5070309@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > Verified with KVM. > The test case will not pass for KVM since the guest information needs to have emulator > information without which the remote migration fails. > The support to pass the emulator information via VirtualSystemMigrationSettingData is > not yet available. > > As a workaround for verification of the tc. > ------------------------------------------- > 1) create a KVM VM which has the emulator information outside the tc on the comman line. > 2) comment out the setup_guest() call, also comment the undefine and destroy lines at the end of the tc. > 3) specify the name of the guest create in test_dom before calling local_remote_migrate(). > > Signed-off-by: Deepti B. Kalakeri > This set looks good! I haven't had a chance to test on Xen yet. Also, if you are planning to include all of the migration types in one test, you'll want to change the test name from 06_remote_live_migration.py to something more generic. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 17 05:06:00 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 16 Mar 2009 22:06:00 -0700 Subject: [Libvirt-cim] [PATCH] Improve random MAC generator Message-ID: <69b7af00d9da92ce169d.1237266360@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237266354 25200 # Node ID 69b7af00d9da92ce169d915bb6b17c493fe0b021 # Parent 160e1a86d82e8ed930e3006098f2af8b230c9834 Improve random MAC generator Use microseconds since the epoch instead of seconds. When defining a guest with multiple net devices specified (in which none of them have a MAC supplied), it's possible for _net_rand_mac() to be called in rapid succession. Also, initialize s - the seed value passed to rand_r(). Signed-off-by: Kaitlin Rupert diff -r 160e1a86d82e -r 69b7af00d9da src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Mon Mar 16 13:55:02 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Mon Mar 16 22:05:54 2009 -0700 @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "cmpidt.h" @@ -383,8 +384,14 @@ const char *_mac = NULL; CMPIString *str = NULL; CMPIStatus status; + struct timeval curr_time; - srand(time(NULL)); + ret = gettimeofday(&curr_time, NULL); + if (ret != 0) + goto out; + + srand(curr_time.tv_usec); + s = curr_time.tv_usec; r = rand_r(&s); ret = asprintf(&mac, From yunguol at cn.ibm.com Tue Mar 17 05:38:30 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 16 Mar 2009 22:38:30 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message Message-ID: <8ab3cd32eec75ce195e5.1237268310@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1237268304 25200 # Node ID 8ab3cd32eec75ce195e51b6c62a4e0b2c7acc56d # Parent b1e05c9de638909c5c6a7ba86aa2b3551802d013 [TEST] #3 Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message Updates from 2 to 3: 1) Move following log message before the if conditional statement logger.info("For Invalid Scenario '%s'", tc) 2) Return PASS instead of assign status separately Updates from 1 to 2: 1) Remove unused import statement 2) Redefine exp_value for different provider version 3) Add log error desc for report mismatching exception Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r b1e05c9de638 -r 8ab3cd32eec7 suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Fri Mar 13 10:31:05 2009 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/05_destroysystem_neg.py Mon Mar 16 22:38:24 2009 -0700 @@ -20,80 +20,87 @@ # 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 VSMS.DestroySystem with invalid vs. + import sys import pywbem from pywbem.cim_obj import CIMInstanceName -from VirtLib import utils from XenKvmLib import vsms from XenKvmLib.classes import get_typed_class -from XenKvmLib.test_doms import undefine_test_domain from CimTest.Globals import logger -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version from CimTest.ReturnCodes import FAIL, PASS, SKIP sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] -vsms_status_version = 534 +vsms_err_message = 814 def destroysystem_fail(tc, options): service = vsms.get_vsms_class(options.virt)(options.ip) classname = get_typed_class(options.virt, 'ComputerSystem') + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) if tc == 'noname': cs_ref = CIMInstanceName(classname, keybindings = {'CreationClassName':classname}) - exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, - 'desc' : 'Unable to retrieve domain name.' - } + if curr_cim_rev >= vsms_err_message: + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : 'Unable to retrieve domain name: Error 0' + } + else: + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, + 'desc' : 'Unable to retrieve domain name.' + } elif tc == 'nonexistent': cs_ref = CIMInstanceName(classname,keybindings = { 'Name':'##@@!!cimtest_domain', 'CreationClassName':classname}) - exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, - 'desc' : 'Failed to find domain' - } + if curr_cim_rev >= vsms_err_message: + exp_value = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, + 'desc' : "Referenced domain `##@@!!cimtest_domain'" \ + " does not exist: Domain not found" + } + else: + exp_value = { 'rc' : pywbem.CIM_ERR_FAILED, + 'desc' : 'Failed to find domain' + } - else: - return SKIP - - status = FAIL try: ret = service.DestroySystem(AffectedSystem=cs_ref) except Exception, details: err_no = details[0] err_desc = details[1] + logger.info("For Invalid Scenario '%s'", tc) if err_no == exp_value['rc'] and err_desc.find(exp_value['desc']) >= 0: - logger.error("For Invalid Scenario '%s'", tc) logger.info('Got expected error no: %s', err_no) logger.info('Got expected error desc: %s',err_desc) return PASS - - logger.error('destroy_fail>> %s: Error executing DestroySystem', tc) - logger.error(details) - return FAIL + else: + logger.error('Got error no %s, but expected no %s', + err_no, exp_value['rc']) + logger.error('Got error desc: %s, but expected desc: %s', + err_desc, exp_value['desc']) + return FAIL + logger.error('destroy_fail>> %s: Error executing DestroySystem', tc) + logger.error(details) + return FAIL @do_main(sup_types) def main(): options = main.options rc1 = destroysystem_fail('noname', options) rc2 = destroysystem_fail('nonexistent', options) - + status = FAIL if rc1 == PASS and rc2 == PASS: - status = PASS - else: - rclist = [rc1, rc2] - rclist.sort() - if rclist[0] == PASS and rclist[1] == SKIP: - status = PASS - + return PASS + return status if __name__ == "__main__": sys.exit(main()) - From deeptik at linux.vnet.ibm.com Tue Mar 17 06:05:57 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 17 Mar 2009 11:35:57 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix VirtualSystemManagementService/05_destroysystem_neg.py with provider's updates of error message In-Reply-To: <8ab3cd32eec75ce195e5.1237268310@elm3b197.beaverton.ibm.com> References: <8ab3cd32eec75ce195e5.1237268310@elm3b197.beaverton.ibm.com> Message-ID: <49BF3DC5.6090302@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 17 06:13:02 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 17 Mar 2009 11:43:02 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Make sure network pool is created with a random IP In-Reply-To: <49BEA7AF.4050402@linux.vnet.ibm.com> References: <49BE11A3.40706@linux.vnet.ibm.com> <49BEA7AF.4050402@linux.vnet.ibm.com> Message-ID: <49BF3F6E.2060701@linux.vnet.ibm.com> Kaitlin Rupert wrote: >>> @@ -210,10 +211,25 @@ >>> subnet = '192.168.122.' >>> self.add_sub_node(network, 'bridge', name=self.vbr, stp='on', >>> forwardDelay='0') >>> - ip = self.add_sub_node(network, 'ip', address=subnet+'1', >>> + ip_base = random.randint(1, 100) >>> + addr = subnet+'%d' % ip_base >>> + addr = subnet+'1' >> You are reassigning addr variable which removes the purpose of >> assigning new random ip. > > Oops! I had made some changes to do some testing, and I forgot to > revert my changes before sending. =( I'll clean this up and send again. > No problem at all... :-) -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 17 06:40:47 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 17 Mar 2009 12:10:47 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Make sure network pool is created with a random IP In-Reply-To: References: Message-ID: <49BF45EF.4030908@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Mar 17 07:18:47 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 17 Mar 2009 12:48:47 +0530 Subject: [Libvirt-cim] [PATCH 0 of 4] [TEST][RFC] Added new tc to verify remote live migration. In-Reply-To: <49BED0CB.5070309@linux.vnet.ibm.com> References: <49BED0CB.5070309@linux.vnet.ibm.com> Message-ID: <49BF4ED7.7090401@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B. Kalakeri wrote: >> Verified with KVM. >> The test case will not pass for KVM since the guest information needs >> to have emulator >> information without which the remote migration fails. >> The support to pass the emulator information via >> VirtualSystemMigrationSettingData is >> not yet available. >> >> As a workaround for verification of the tc. >> ------------------------------------------- >> 1) create a KVM VM which has the emulator information outside the tc >> on the comman line. >> 2) comment out the setup_guest() call, also comment the undefine and >> destroy lines at the end of the tc. >> 3) specify the name of the guest create in test_dom before calling >> local_remote_migrate(). >> >> Signed-off-by: Deepti B. Kalakeri >> > > This set looks good! I haven't had a chance to test on Xen yet. > Also, if you are planning to include all of the migration types in one > test, you'll want to change the test name from > 06_remote_live_migration.py to something more generic. > I would prefer to have different test cases for different types, otherwise tracking the issues would be more problematic, the test case will be lengthier and complex keeping the scenarios separate gives a ready to use tc for verifying regression for different migration types if any. Thoughts ?? -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Tue Mar 17 08:54:01 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 17 Mar 2009 16:54:01 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: <49BEBABC.4080406@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-17 04:46:52: > Guo Lian Yun wrote: > > > > libvirt-cim-bounces at redhat.com wrote on 2009-03-14 03:01:14: > > > > > > > > + drasd = get_typed_class(options.virt, > > > > > 'DiskResourceAllocationSettingData') > > > > > > + drasd_id = '%s/%s' % (default_dom, nddev) > > > > > > + dkeys = {'InstanceID' : drasd_id} > > > > > > + > > > > > > + nrasd = get_typed_class(options.virt, > > > > > 'NetResourceAllocationSettingData') > > > > > > + nrasd_id = '%s/%s' % (default_dom, nmac) > > > > > > + nkeys = {'InstanceID' : nrasd_id} > > > > > > > > > > Instead of hand building the instances for the resources, use > > the proper > > > > > association calls to get the RASD instances. You know the > > guest, so > > > > > you can use SystemDevice to get the resource instance, and then > > > > > SettingsDefineState to get the RASD instances. > > > > > > > > I'm working on a new patch to get the RASD instances by association. > > > > But I can't remove "KVM_InputResourceAllocationSettingData" which > > output > > > > the device "mouse:ps2" can not be found. Actually, I get it by > > > > SettingsDefineState. > > > > If I remove this device from the ResourceSettings, this method works > > > > for me. > > > > > > > > > > Sorry Daisy.. I'm not sure I understand the problem you're hitting. > > > > > > Are you seeing an error trying to remove an input device from a guest? > > > What error message do you see? > > > > Sorry for my confusion. I send out #2 patch. The problem is that I > > can not remove InputRASD. Below is the report error: > > > > VirtualSystemManagementService - 16_removeresource.py: FAIL > > ERROR - 'CIMInstanceName' object has no attribute 'DeviceID' > > No such instance (no device domain/mouse:ps2) > > Which virtualization type are you seeing this issue on? I'm not seeing > an issue with KVM. I tried running on a Xen system, and I get the > following error: > > VirtualSystemManagementService - 16_removeresource.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Failed to define domain: invalid > argument in virDomainDefineXML with return code 1 > ERROR - Failed to define the dom: domain > InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to define domain: > invalid argument in virDomainDefineXML > > Can you paste the provider debug you're seeing? I hit the error for most of tc for VSMS. May I look into it tomorrow? I have to attend a couple of meeting this afternoon =) Testing Xen hypervisor -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to define domain: invalid argument in virDomainDefineXML with return code 1 ERROR - Unable to define test_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to define domain: invalid argument in virDomainDefineXML -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to define domain: invalid argument in virDomainDefineXML with return code 1 ERROR - Failed to define the dom: test_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to define domain: invalid argument in virDomainDefineXML > > > > > So I Skip InputRASD together with MemRASD and ProcRASD in #2 patch. > > > > The providers should be able to remove input devices, so you'll want to > include that in the test. > > If you're seeing an error, it's either a test case issue or a provider > issue. It's better to resolve these issues before resending an updated > patch (it'll reduce the amount of churn in a given patch). > Thanks! > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Tue Mar 17 19:26:15 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 17 Mar 2009 12:26:15 -0700 Subject: [Libvirt-cim] [PATCH] Add Emulator attribute so users can specify an emulator for the guest Message-ID: <6195f98ebe5ef0bb1db1.1237317975@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237310504 25200 # Node ID 6195f98ebe5ef0bb1db1bb8ca946d5449393c21c # Parent 1aff0d0e9bf49e738827b7157c0df407b814ae7d Add Emulator attribute so users can specify an emulator for the guest. Signed-off-by: Kaitlin Rupert diff -r 1aff0d0e9bf4 -r 6195f98ebe5e schema/VSSD.mof --- a/schema/VSSD.mof Wed Mar 04 15:25:33 2009 -0800 +++ b/schema/VSSD.mof Tue Mar 17 10:21:44 2009 -0700 @@ -29,6 +29,9 @@ "One of hd,fd,cdrom.")] string BootDevice; + [Description ("The emulator the guest should use during runtime.")] + string Emulator; + }; [Description ( @@ -42,6 +45,9 @@ [Description ("The device to boot from. One of hd,fd,cdrom.")] string BootDevice; + [Description ("The emulator the guest should use during runtime.")] + string Emulator; + }; [Description ( diff -r 1aff0d0e9bf4 -r 6195f98ebe5e src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Mar 04 15:25:33 2009 -0800 +++ b/src/Virt_VirtualSystemManagementService.c Tue Mar 17 10:21:44 2009 -0700 @@ -148,9 +148,15 @@ return 1; } -static bool fv_default_emulator(struct domain *domain) +static bool fv_set_emulator(struct domain *domain, + const char *emu) { - const char *emul = XEN_EMULATOR; + if ((domain->type == DOMAIN_XENFV) && (emu == NULL)) + emu = XEN_EMULATOR; + + /* No emulator value to set */ + if (emu == NULL) + return true; cleanup_virt_device(domain->dev_emu); @@ -161,7 +167,7 @@ } domain->dev_emu->type = CIM_RES_TYPE_EMU; - domain->dev_emu->dev.emu.path = strdup(emul); + domain->dev_emu->dev.emu.path = strdup(emu); domain->dev_emu->id = strdup("emulator"); return true; @@ -178,8 +184,6 @@ domain->type = DOMAIN_KVM; } else if (STREQC(pfx, "Xen")) { domain->type = DOMAIN_XENFV; - if (!fv_default_emulator(domain)) - return 0; } else { CU_DEBUG("Unknown fullvirt domain type: %s", pfx); return 0; @@ -192,6 +196,17 @@ free(domain->os_info.fv.boot); domain->os_info.fv.boot = strdup(val); + ret = cu_get_str_prop(inst, "Emulator", &val); + if (ret != CMPI_RC_OK) + val = NULL; + else if (disk_type_from_file(val) == DISK_UNKNOWN) { + CU_DEBUG("Emulator path does not exist: %s", val); + return 0; + } + + if (!fv_set_emulator(domain, val)) + return 0; + return 1; } From kaitlin at linux.vnet.ibm.com Tue Mar 17 21:06:36 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 17 Mar 2009 14:06:36 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] [TEST][RFC] Added new tc to verify remote live migration. In-Reply-To: <49BF4ED7.7090401@linux.vnet.ibm.com> References: <49BED0CB.5070309@linux.vnet.ibm.com> <49BF4ED7.7090401@linux.vnet.ibm.com> Message-ID: <49C010DC.7040406@linux.vnet.ibm.com> >> >> This set looks good! I haven't had a chance to test on Xen yet. >> Also, if you are planning to include all of the migration types in one >> test, you'll want to change the test name from >> 06_remote_live_migration.py to something more generic. >> > I would prefer to have different test cases for different types, otherwise > tracking the issues would be more problematic, > the test case will be lengthier and complex > keeping the scenarios separate gives a ready to use tc for verifying > regression for different migration types if any. > > Thoughts ?? > These are good arguments. I'm fine with either approach. The single test approach means there is less code duplication across multiple tests (because each test will basically be the same, right?). So it's less of a maintenance headache if things change later on. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 17 21:11:05 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 17 Mar 2009 14:11:05 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: References: Message-ID: <49C011E9.5070208@linux.vnet.ibm.com> > > Which virtualization type are you seeing this issue on? I'm not seeing > > an issue with KVM. I tried running on a Xen system, and I get the > > following error: > > > > VirtualSystemManagementService - 16_removeresource.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Failed to define domain: > invalid > > argument in virDomainDefineXML with return code 1 > > ERROR - Failed to define the dom: domain > > InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to define domain: > > invalid argument in virDomainDefineXML > > > > Can you paste the provider debug you're seeing? > > I hit the error for most of tc for VSMS. May I look into it tomorrow? > I have to attend a couple of meeting this afternoon =) > > Testing Xen hypervisor > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Failed to define domain: invalid > argument in virDomainDefineXML with return code 1 > ERROR - Unable to define test_domain > InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to define domain: > invalid argument in virDomainDefineXML > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Failed to define domain: invalid > argument in virDomainDefineXML with return code 1 > ERROR - Failed to define the dom: test_domain > InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to define domain: > invalid argument in virDomainDefineXML Hmm.. that libvirt error indicates the guest is being specified with an option that isn't valid. If you can track down what part of the guest XML it doesn't like, that would be great. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 17 22:04:27 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 17 Mar 2009 15:04:27 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] [TEST][RFC]Modifying emulator information to be used for KVM In-Reply-To: References: Message-ID: <49C01E6B.6080208@linux.vnet.ibm.com> > @@ -82,10 +82,12 @@ > Xen_default_mac = '11:22:33:aa:bb:cc' > > # vxml.KVMXML > -if fv_cap(CIM_IP): > - KVM_default_emulator = '/usr/bin/qemu-kvm' > -else: > - KVM_default_emulator = '/usr/bin/qemu' > +KVM_default_emulator = '/usr/local/bin/qemu-system-x86_64' > +if not os.path.exists(KVM_default_emulator): > + if fv_cap(CIM_IP): > + KVM_default_emulator = '/usr/bin/qemu-kvm' > + else: > + KVM_default_emulator = '/usr/bin/qemu' > KVM_disk_path = os.path.join(_image_dir, 'default-kvm-dimage') > KVM_secondary_disk_path = os.path.join(_image_dir, 'default-kvm-dimage.2ND') > KVM_default_disk_dev = 'hda' I just worked up a patch that adds the Emulator attribute. So now cim_define() needs to be modified to set the Emulator attribute of the VSSD reference. Also, I tested this set on Xen - looks good. I think this is ready to be resubmitted (with the emulator change). -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Wed Mar 18 02:23:24 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 17 Mar 2009 19:23:24 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Add tc to verify VSMS.RemoveResourceSettings() with correct resource Message-ID: # HG changeset patch # User Guolian Yun # Date 1237342979 25200 # Node ID fc062835ef35568b7379edb2e99f173f7833d3a6 # Parent daccd46e12ccf2afce3295a41510d7e94ff48d7b [TEST] #3 Add tc to verify VSMS.RemoveResourceSettings() with correct resource Updates from 2 to 3: 1) Capture the return of RemoveResourceSettings() and check for an error. 2) Verify InputRASD Updates from 1 to 2: Get RASD instances by SystemDevice and SettingsDefineState associaton Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r daccd46e12cc -r fc062835ef35 suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py Tue Mar 17 19:22:59 2009 -0700 @@ -0,0 +1,112 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Guolian Yun +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +import sys +from XenKvmLib.vsms import get_vsms_class +from XenKvmLib.vxml import get_class +from XenKvmLib.classes import get_typed_class +from XenKvmLib.assoc import AssociatorNames +from CimTest.Globals import logger +from XenKvmLib.const import do_main, get_provider_version +from CimTest.ReturnCodes import FAIL, PASS + +sup_types = ['Xen', 'KVM', 'XenFV'] +default_dom = 'domain' +rem_res_err_rev_start = 779 +rem_res_err_rev_end = 828 +ntype = 'network' +nmac = '00:11:22:33:44:55' + + at do_main(sup_types) +def main(): + options = main.options + + if options.virt == 'KVM': + nddev = 'hdb' + else: + nddev = 'xvdb' + + cxml = get_class(options.virt)(default_dom, disk=nddev, mac=nmac) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + return FAIL + + try: + # Get system devices through SystemDevice assocation + sd_classname = get_typed_class(options.virt, 'SystemDevice') + cs_classname = get_typed_class(options.virt, 'ComputerSystem') + + devs = AssociatorNames(options.ip, sd_classname, cs_classname, + Name=default_dom, CreationClassName=cs_classname) + + if len(devs) == 0: + raise Exception("No devices returned") + + # Get RASD instances through SettingsDefineState + sds_classname = get_typed_class(options.virt, 'SettingsDefineState') + mem = get_typed_class(options.virt, 'Memory') + proc = get_typed_class(options.virt, 'Processor') + dev_not_rem = [mem, proc] + + service = get_vsms_class(options.virt)(options.ip) + for dev in devs: + if dev['CreationClassName'] in dev_not_rem: + continue + else: + ccn = dev['CreationClassName'] + sccn = dev['SystemCreationClassName'] + rasd = AssociatorNames(options.ip, sds_classname, ccn, + DeviceID = dev['DeviceID'], + CreationClassName = ccn, + SystemName = dev['SystemName'], + SystemCreationClassName = sccn) + if len(rasd) != 1: + raise Exception("%i RASD insts for %s", len(rasd), dev.DeviceID) + # Invoke RemoveResourceSettings() to remove resource + ret = service.RemoveResourceSettings(ResourceSettings=[rasd[0]]) + if ret[0] != 0: + raise Exception("Remove %s error, please check", rasd[0]) + except Exception, details: + logger.error(details) + cxml.undefine(options.ip) + return FAIL + + cxml.dumpxml(options.ip) + device = cxml.get_value_xpath('/domain/@devices') + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + + if device == None: + return PASS + elif device != None and curr_cim_rev >= rem_res_err_rev_start and\ + curr_cim_rev < rem_res_err_rev_end: + return SKIP + else: + logger.error('The devices are not removed successfully') + cxml.undefine(options.ip) + return FAIL + + cxml.undefine(options.ip) + return PASS + +if __name__ == "__main__": + sys.exit(main()) From yunguol at cn.ibm.com Wed Mar 18 02:25:14 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 18 Mar 2009 10:25:14 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: Message-ID: This tc fails because that it can not get InputRASD through SettingsDefineState association with PointingDevice. Firstly, this tc gets following PointingDevice instance by SystemDevice: //localhost/root/virt:KVM_PointingDevice.CreationClassName="KVM_PointingDevice",SystemName="domain",DeviceID="domain/mouse:ps2",SystemCreationClassName="KVM_ComputerSystem" Then, it expects to get InputRASD through SettingsDefineState from KVM_PointingDevice, but it reports error as follows: Tue, 17 Mar 2009 18:58:22:TEST LOG:INFO - dev id is domain/mouse:ps2 Tue, 17 Mar 2009 18:58:22:TEST LOG:ERROR - 'CIMInstanceName' object has no attribute 'DeviceID' Since other devices work fine for me, I looked into its provider, the relationship is set up between them. Kaitlin, can you help me? Thanks! Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2009-03-18 10:23:24: > # HG changeset patch > # User Guolian Yun > # Date 1237342979 25200 > # Node ID fc062835ef35568b7379edb2e99f173f7833d3a6 > # Parent daccd46e12ccf2afce3295a41510d7e94ff48d7b > [TEST] #3 Add tc to verify VSMS.RemoveResourceSettings() with correct resource > > > > Updates from 2 to 3: > 1) Capture the return of RemoveResourceSettings() and check for an error. > 2) Verify InputRASD > > Updates from 1 to 2: > Get RASD instances by SystemDevice and SettingsDefineState associaton > > Tested for KVM with current sources and rpm > Signed-off-by: Guolian Yun > > diff -r daccd46e12cc -r fc062835ef35 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/16_removeresource.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/16_removeresource.py > Tue Mar 17 19:22:59 2009 -0700 > @@ -0,0 +1,112 @@ > +#!/usr/bin/python > +# > +# Copyright 2009 IBM Corp. > +# > +# Authors: > +# Guolian Yun > +# > +# This library is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public > +# License as published by the Free Software Foundation; either > +# version 2.1 of the License, or (at your option) any later version. > +# > +# This library is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +# General Public License for more details. > +# > +# You should have received a copy of the GNU General Public > +# License along with this library; if not, write to the Free Software > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > +# > + > +import sys > +from XenKvmLib.vsms import get_vsms_class > +from XenKvmLib.vxml import get_class > +from XenKvmLib.classes import get_typed_class > +from XenKvmLib.assoc import AssociatorNames > +from CimTest.Globals import logger > +from XenKvmLib.const import do_main, get_provider_version > +from CimTest.ReturnCodes import FAIL, PASS > + > +sup_types = ['Xen', 'KVM', 'XenFV'] > +default_dom = 'domain' > +rem_res_err_rev_start = 779 > +rem_res_err_rev_end = 828 > +ntype = 'network' > +nmac = '00:11:22:33:44:55' > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + if options.virt == 'KVM': > + nddev = 'hdb' > + else: > + nddev = 'xvdb' > + > + cxml = get_class(options.virt)(default_dom, disk=nddev, mac=nmac) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to define the dom: %s", default_dom) > + return FAIL > + > + try: > + # Get system devices through SystemDevice assocation > + sd_classname = get_typed_class(options.virt, 'SystemDevice') > + cs_classname = get_typed_class(options.virt, 'ComputerSystem') > + > + devs = AssociatorNames(options.ip, sd_classname, cs_classname, > + Name=default_dom, > CreationClassName=cs_classname) > + > + if len(devs) == 0: > + raise Exception("No devices returned") > + > + # Get RASD instances through SettingsDefineState > + sds_classname = get_typed_class(options.virt, 'SettingsDefineState') > + mem = get_typed_class(options.virt, 'Memory') > + proc = get_typed_class(options.virt, 'Processor') > + dev_not_rem = [mem, proc] > + > + service = get_vsms_class(options.virt)(options.ip) > + for dev in devs: > + if dev['CreationClassName'] in dev_not_rem: > + continue > + else: > + ccn = dev['CreationClassName'] > + sccn = dev['SystemCreationClassName'] > + rasd = AssociatorNames(options.ip, sds_classname, ccn, > + DeviceID = dev['DeviceID'], > + CreationClassName = ccn, > + SystemName = dev['SystemName'], > + SystemCreationClassName = sccn) > + if len(rasd) != 1: > + raise Exception("%i RASD insts for %s", > len(rasd), dev.DeviceID) > + # Invoke RemoveResourceSettings() to remove resource > + ret = service. > RemoveResourceSettings(ResourceSettings=[rasd[0]]) > + if ret[0] != 0: > + raise Exception("Remove %s error, please check", rasd[0]) > + except Exception, details: > + logger.error(details) > + cxml.undefine(options.ip) > + return FAIL > + > + cxml.dumpxml(options.ip) > + device = cxml.get_value_xpath('/domain/@devices') > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + > + if device == None: > + return PASS > + elif device != None and curr_cim_rev >= rem_res_err_rev_start and\ > + curr_cim_rev < rem_res_err_rev_end: > + return SKIP > + else: > + logger.error('The devices are not removed successfully') > + cxml.undefine(options.ip) > + return FAIL > + > + cxml.undefine(options.ip) > + return PASS > + > +if __name__ == "__main__": > + sys.exit(main()) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 18 02:44:58 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 18 Mar 2009 10:44:58 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 16 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: <49BE2CC6.7060405@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-16 18:41:10: > ================================================= > Test Run Summary (Mar 16 2009): Xen on Red Hat Enterprise Linux > Server release 5.3 (Tikanga) with Pegasus > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) > Kernel: 2.6.18-128.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.1 > Libvirt-cim revision: 613 > Libvirt-cim changeset: 1fcf330fadf8+ > Cimtest revision: 646 > Cimtest changeset: b1e05c9de638 > ================================================= > FAIL : 8 > XFAIL : 1 > SKIP : 12 > PASS : 125 > ----------------- > Total : 146 > ================================================= > FAIL Test Summary: > RASD - 01_verify_rasd_fields.py: FAIL It passes for me when run manually. > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL Same as above. > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL These three tc pass when run manually. > > ================================================= > XFAIL Test Summary: > ComputerSystem - 33_suspend_reboot.py: XFAIL > > ================================================= > SKIP Test Summary: > ComputerSystem - 02_nosystems.py: SKIP > HostedAccessPoint - 01_forward.py: SKIP > HostedAccessPoint - 02_reverse.py: SKIP > KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP > LogicalDisk - 02_nodevs.py: SKIP > NetworkPort - 03_user_netport.py: SKIP > RASD - 05_disk_rasd_emu_type.py: SKIP > RedirectionService - 01_enum_crs.py: SKIP > RedirectionService - 02_enum_crscap.py: SKIP > RedirectionService - 03_RedirectionSAP_errs.py: SKIP > ServiceAccessBySAP - 01_forward.py: SKIP > ServiceAccessBySAP - 02_reverse.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 > -------------------------------------------------------------------- > 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: PASS > -------------------------------------------------------------------- > 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 - 35_start_reset.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 40_RSC_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 41_cs_to_settingdefinestate.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 04_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementConforms - 03_ectp_fwd_errs.py: PASS > -------------------------------------------------------------------- > ElementConforms - 04_ectp_rev_errs.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: PASS > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: PASS > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: PASS > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > HostedAccessPoint - 01_forward.py: SKIP > -------------------------------------------------------------------- > HostedAccessPoint - 02_reverse.py: SKIP > -------------------------------------------------------------------- > 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 > -------------------------------------------------------------------- > KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP > -------------------------------------------------------------------- > LogicalDisk - 01_disk.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 02_nodevs.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > LogicalDisk - 03_ld_gi_errs.py: PASS > -------------------------------------------------------------------- > Memory - 01_memory.py: PASS > -------------------------------------------------------------------- > Memory - 02_defgetmem.py: PASS > -------------------------------------------------------------------- > Memory - 03_mem_gi_errs.py: PASS > -------------------------------------------------------------------- > NetworkPort - 01_netport.py: PASS > -------------------------------------------------------------------- > NetworkPort - 02_np_gi_errors.py: PASS > -------------------------------------------------------------------- > NetworkPort - 03_user_netport.py: SKIP > -------------------------------------------------------------------- > Processor - 01_processor.py: PASS > -------------------------------------------------------------------- > Processor - 02_definesys_get_procs.py: PASS > -------------------------------------------------------------------- > Processor - 03_proc_gi_errs.py: PASS > -------------------------------------------------------------------- > Profile - 01_enum.py: PASS > -------------------------------------------------------------------- > Profile - 02_profile_to_elec.py: PASS > -------------------------------------------------------------------- > Profile - 03_rprofile_gi_errs.py: PASS > -------------------------------------------------------------------- > RASD - 01_verify_rasd_fields.py: FAIL > ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/xvda)') > ERROR - Enum RASDs failed > -------------------------------------------------------------------- > 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: SKIP > -------------------------------------------------------------------- > RedirectionService - 01_enum_crs.py: SKIP > -------------------------------------------------------------------- > RedirectionService - 02_enum_crscap.py: SKIP > -------------------------------------------------------------------- > RedirectionService - 03_RedirectionSAP_errs.py: SKIP > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > -------------------------------------------------------------------- > ResourcePool - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePool - 02_rp_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > -------------------------------------------------------------------- > ServiceAccessBySAP - 01_forward.py: SKIP > -------------------------------------------------------------------- > ServiceAccessBySAP - 02_reverse.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: PASS > -------------------------------------------------------------------- > VSSD - 03_vssd_gi_errs.py: PASS > -------------------------------------------------------------------- > VSSD - 04_vssd_to_rasd.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 07_addresource_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 09_procrasd_persist.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 10_hv_version.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 11_define_memrasdunits.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 12_referenced_config.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL > ERROR - Xen_DiskResourceAllocationSettingData instance for > rstest_disk_domain not found > ERROR - Failed to verify disk path for rstest_disk_domain > -------------------------------------------------------------------- > VirtualSystemManagementService - 15_mod_system_settings.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > ERROR - MigrateVirtualSystemToHost took too long > Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" > -------------------------------------------------------------------- > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting > system with return code 1 > ERROR - CS instance not returned for dom_migrate. > ERROR - Error start domain dom_migrate > InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > -------------------------------------------------------------------- > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > return code 1 > ERROR - Error start domain dom_migration > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 01_forward.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > return code 1 > ERROR - Failed to start the dom: VSSDC_dom > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > return code 1 > ERROR - Unable to start domain domu1 > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > return code 1 > ERROR - Unable to start domain domu1 > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS > -------------------------------------------------------------------- > > > -- > Thanks and Regards, > Deepti B. Kalakeri > IBM Linux Technology Center > deeptik at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 18 03:04:45 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 18 Mar 2009 11:04:45 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 16 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-18 10:44:58: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-16 18:41:10: > > > ================================================= > > Test Run Summary (Mar 16 2009): Xen on Red Hat Enterprise Linux > > Server release 5.3 (Tikanga) with Pegasus > > ================================================= > > Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) > > Kernel: 2.6.18-128.el5xen > > libvirt: 0.3.3 > > Hypervisor: Xen 3.1.0 > > CIMOM: Pegasus 2.7.1 > > Libvirt-cim revision: 613 > > Libvirt-cim changeset: 1fcf330fadf8+ > > Cimtest revision: 646 > > Cimtest changeset: b1e05c9de638 > > ================================================= > > FAIL : 8 > > XFAIL : 1 > > SKIP : 12 > > PASS : 125 > > ----------------- > > Total : 146 > > ================================================= Sorry for my confusion. They pass for me with current src instead of rpm. > > FAIL Test Summary: > > RASD - 01_verify_rasd_fields.py: FAIL > It passes for me when run manually. > > > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL > Same as above. > > > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > > > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL > These three tc pass when run manually. > > > > > ================================================= > > XFAIL Test Summary: > > ComputerSystem - 33_suspend_reboot.py: XFAIL > > > > ================================================= > > SKIP Test Summary: > > ComputerSystem - 02_nosystems.py: SKIP > > HostedAccessPoint - 01_forward.py: SKIP > > HostedAccessPoint - 02_reverse.py: SKIP > > KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP > > LogicalDisk - 02_nodevs.py: SKIP > > NetworkPort - 03_user_netport.py: SKIP > > RASD - 05_disk_rasd_emu_type.py: SKIP > > RedirectionService - 01_enum_crs.py: SKIP > > RedirectionService - 02_enum_crscap.py: SKIP > > RedirectionService - 03_RedirectionSAP_errs.py: SKIP > > ServiceAccessBySAP - 01_forward.py: SKIP > > ServiceAccessBySAP - 02_reverse.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 > > -------------------------------------------------------------------- > > 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: PASS > > -------------------------------------------------------------------- > > 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 notsupported > > Bug:<00012> > > -------------------------------------------------------------------- > > ComputerSystem - 35_start_reset.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 40_RSC_start.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 41_cs_to_settingdefinestate.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 42_cs_gi_errs.py: PASS > > -------------------------------------------------------------------- > > ComputerSystemIndication - 01_created_indication.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 04_forward_errs.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 03_forward_errs.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 04_reverse_errs.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 05_hostsystem_cap.py: PASS > > -------------------------------------------------------------------- > > ElementConforms - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementConforms - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ElementConforms - 03_ectp_fwd_errs.py: PASS > > -------------------------------------------------------------------- > > ElementConforms - 04_ectp_rev_errs.py: PASS > > -------------------------------------------------------------------- > > ElementSettingData - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > > -------------------------------------------------------------------- > > EnabledLogicalElementCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 01_enum.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 02_hostsystem_to_rasd.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 03_hs_to_settdefcap.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 04_hs_to_EAPF.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 05_hs_gi_errs.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 06_hs_to_vsms.py: PASS > > -------------------------------------------------------------------- > > HostedAccessPoint - 01_forward.py: SKIP > > -------------------------------------------------------------------- > > HostedAccessPoint - 02_reverse.py: SKIP > > -------------------------------------------------------------------- > > 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 > > -------------------------------------------------------------------- > > KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP > > -------------------------------------------------------------------- > > LogicalDisk - 01_disk.py: PASS > > -------------------------------------------------------------------- > > LogicalDisk - 02_nodevs.py: SKIP > > ERROR - System has defined domains; unable to run > > -------------------------------------------------------------------- > > LogicalDisk - 03_ld_gi_errs.py: PASS > > -------------------------------------------------------------------- > > Memory - 01_memory.py: PASS > > -------------------------------------------------------------------- > > Memory - 02_defgetmem.py: PASS > > -------------------------------------------------------------------- > > Memory - 03_mem_gi_errs.py: PASS > > -------------------------------------------------------------------- > > NetworkPort - 01_netport.py: PASS > > -------------------------------------------------------------------- > > NetworkPort - 02_np_gi_errors.py: PASS > > -------------------------------------------------------------------- > > NetworkPort - 03_user_netport.py: SKIP > > -------------------------------------------------------------------- > > Processor - 01_processor.py: PASS > > -------------------------------------------------------------------- > > Processor - 02_definesys_get_procs.py: PASS > > -------------------------------------------------------------------- > > Processor - 03_proc_gi_errs.py: PASS > > -------------------------------------------------------------------- > > Profile - 01_enum.py: PASS > > -------------------------------------------------------------------- > > Profile - 02_profile_to_elec.py: PASS > > -------------------------------------------------------------------- > > Profile - 03_rprofile_gi_errs.py: PASS > > -------------------------------------------------------------------- > > RASD - 01_verify_rasd_fields.py: FAIL > > ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/xvda)') > > ERROR - Enum RASDs failed > > -------------------------------------------------------------------- > > 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: SKIP > > -------------------------------------------------------------------- > > RedirectionService - 01_enum_crs.py: SKIP > > -------------------------------------------------------------------- > > RedirectionService - 02_enum_crscap.py: SKIP > > -------------------------------------------------------------------- > > RedirectionService - 03_RedirectionSAP_errs.py: SKIP > > -------------------------------------------------------------------- > > ReferencedProfile - 01_verify_refprof.py: PASS > > -------------------------------------------------------------------- > > ReferencedProfile - 02_refprofile_errs.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 03_forward_errs.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > > -------------------------------------------------------------------- > > ResourcePool - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ResourcePool - 02_rp_gi_errors.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - > 06_RemoveResourcesFromResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > > -------------------------------------------------------------------- > > ServiceAccessBySAP - 01_forward.py: SKIP > > -------------------------------------------------------------------- > > ServiceAccessBySAP - 02_reverse.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: PASS > > -------------------------------------------------------------------- > > VSSD - 03_vssd_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VSSD - 04_vssd_to_rasd.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 01_definesystem_name.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 02_destroysystem.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 06_addresource.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 07_addresource_neg.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 08_modifyresource.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 09_procrasd_persist.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 10_hv_version.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 11_define_memrasdunits.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 12_referenced_config.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL > > ERROR - Xen_DiskResourceAllocationSettingData instance for > > rstest_disk_domain not found > > ERROR - Failed to verify disk path for rstest_disk_domain > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 15_mod_system_settings.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > > ERROR - MigrateVirtualSystemToHost took too long > > Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" > > -------------------------------------------------------------------- > > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting > > system with return code 1 > > ERROR - CS instance not returned for dom_migrate. > > ERROR - Error start domain dom_migrate > > InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup > resulting system > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > -------------------------------------------------------------------- > > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > > return code 1 > > ERROR - Error start domain dom_migration > > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > > -------------------------------------------------------------------- > > VirtualSystemMigrationSettingData - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSettingDataComponent - 01_forward.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > > return code 1 > > ERROR - Failed to start the dom: VSSDC_dom > > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > > -------------------------------------------------------------------- > > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > > return code 1 > > ERROR - Unable to start domain domu1 > > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > > -------------------------------------------------------------------- > > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > > return code 1 > > ERROR - Unable to start domain domu1 > > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > > -------------------------------------------------------------------- > > VirtualSystemSnapshotService - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSnapshotServiceCapabilities - > 02_vs_sservicecap_gi_errs.py: PASS > > -------------------------------------------------------------------- > > > > > > -- > > Thanks and Regards, > > Deepti B. Kalakeri > > IBM Linux Technology Center > > deeptik at linux.vnet.ibm.com > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 18 03:07:07 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 18 Mar 2009 11:07:07 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 18 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: ================================================= Test Run Summary (Mar 18 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 829 Libvirt-cim changeset: 1aff0d0e9bf4 Cimtest revision: Cimtest changeset: ================================================= FAIL : 2 XFAIL : 1 SKIP : 3 PASS : 140 ----------------- Total : 146 ================================================= FAIL Test Summary: VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.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 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: PASS -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - dom_migrate migrate failed ERROR - dom_migrate migrate failed -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Wed Mar 18 04:48:25 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 18 Mar 2009 10:18:25 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 16 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus In-Reply-To: References: Message-ID: <49C07D19.106@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-03-16 18:41:10: > > > ================================================= > > Test Run Summary (Mar 16 2009): Xen on Red Hat Enterprise Linux > > Server release 5.3 (Tikanga) with Pegasus > > ================================================= > > Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) > > Kernel: 2.6.18-128.el5xen > > libvirt: 0.3.3 > > Hypervisor: Xen 3.1.0 > > CIMOM: Pegasus 2.7.1 > > Libvirt-cim revision: 613 > > Libvirt-cim changeset: 1fcf330fadf8+ > > Cimtest revision: 646 > > Cimtest changeset: b1e05c9de638 > > ================================================= > > FAIL : 8 > > XFAIL : 1 > > SKIP : 12 > > PASS : 125 > > ----------------- > > Total : 146 > > ================================================= > > FAIL Test Summary: > > RASD - 01_verify_rasd_fields.py: FAIL > It passes for me when run manually. Can you check why this fails in the batch run ? > > > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL > Same as above. > > > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > > > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL > These three tc pass when run manually. > > > > > ================================================= > > XFAIL Test Summary: > > ComputerSystem - 33_suspend_reboot.py: XFAIL > > > > ================================================= > > SKIP Test Summary: > > ComputerSystem - 02_nosystems.py: SKIP > > HostedAccessPoint - 01_forward.py: SKIP > > HostedAccessPoint - 02_reverse.py: SKIP > > KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP > > LogicalDisk - 02_nodevs.py: SKIP > > NetworkPort - 03_user_netport.py: SKIP > > RASD - 05_disk_rasd_emu_type.py: SKIP > > RedirectionService - 01_enum_crs.py: SKIP > > RedirectionService - 02_enum_crscap.py: SKIP > > RedirectionService - 03_RedirectionSAP_errs.py: SKIP > > ServiceAccessBySAP - 01_forward.py: SKIP > > ServiceAccessBySAP - 02_reverse.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 > > -------------------------------------------------------------------- > > 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: PASS > > -------------------------------------------------------------------- > > 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 - 35_start_reset.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 40_RSC_start.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 41_cs_to_settingdefinestate.py: PASS > > -------------------------------------------------------------------- > > ComputerSystem - 42_cs_gi_errs.py: PASS > > -------------------------------------------------------------------- > > ComputerSystemIndication - 01_created_indication.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > > -------------------------------------------------------------------- > > ElementAllocatedFromPool - 04_forward_errs.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 03_forward_errs.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 04_reverse_errs.py: PASS > > -------------------------------------------------------------------- > > ElementCapabilities - 05_hostsystem_cap.py: PASS > > -------------------------------------------------------------------- > > ElementConforms - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementConforms - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ElementConforms - 03_ectp_fwd_errs.py: PASS > > -------------------------------------------------------------------- > > ElementConforms - 04_ectp_rev_errs.py: PASS > > -------------------------------------------------------------------- > > ElementSettingData - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > > -------------------------------------------------------------------- > > EnabledLogicalElementCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 01_enum.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 02_hostsystem_to_rasd.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 03_hs_to_settdefcap.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 04_hs_to_EAPF.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 05_hs_gi_errs.py: PASS > > -------------------------------------------------------------------- > > HostSystem - 06_hs_to_vsms.py: PASS > > -------------------------------------------------------------------- > > HostedAccessPoint - 01_forward.py: SKIP > > -------------------------------------------------------------------- > > HostedAccessPoint - 02_reverse.py: SKIP > > -------------------------------------------------------------------- > > 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 > > -------------------------------------------------------------------- > > KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP > > -------------------------------------------------------------------- > > LogicalDisk - 01_disk.py: PASS > > -------------------------------------------------------------------- > > LogicalDisk - 02_nodevs.py: SKIP > > ERROR - System has defined domains; unable to run > > -------------------------------------------------------------------- > > LogicalDisk - 03_ld_gi_errs.py: PASS > > -------------------------------------------------------------------- > > Memory - 01_memory.py: PASS > > -------------------------------------------------------------------- > > Memory - 02_defgetmem.py: PASS > > -------------------------------------------------------------------- > > Memory - 03_mem_gi_errs.py: PASS > > -------------------------------------------------------------------- > > NetworkPort - 01_netport.py: PASS > > -------------------------------------------------------------------- > > NetworkPort - 02_np_gi_errors.py: PASS > > -------------------------------------------------------------------- > > NetworkPort - 03_user_netport.py: SKIP > > -------------------------------------------------------------------- > > Processor - 01_processor.py: PASS > > -------------------------------------------------------------------- > > Processor - 02_definesys_get_procs.py: PASS > > -------------------------------------------------------------------- > > Processor - 03_proc_gi_errs.py: PASS > > -------------------------------------------------------------------- > > Profile - 01_enum.py: PASS > > -------------------------------------------------------------------- > > Profile - 02_profile_to_elec.py: PASS > > -------------------------------------------------------------------- > > Profile - 03_rprofile_gi_errs.py: PASS > > -------------------------------------------------------------------- > > RASD - 01_verify_rasd_fields.py: FAIL > > ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/xvda)') > > ERROR - Enum RASDs failed > > -------------------------------------------------------------------- > > 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: SKIP > > -------------------------------------------------------------------- > > RedirectionService - 01_enum_crs.py: SKIP > > -------------------------------------------------------------------- > > RedirectionService - 02_enum_crscap.py: SKIP > > -------------------------------------------------------------------- > > RedirectionService - 03_RedirectionSAP_errs.py: SKIP > > -------------------------------------------------------------------- > > ReferencedProfile - 01_verify_refprof.py: PASS > > -------------------------------------------------------------------- > > ReferencedProfile - 02_refprofile_errs.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 01_forward.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 02_reverse.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 03_forward_errs.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > > -------------------------------------------------------------------- > > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > > -------------------------------------------------------------------- > > ResourcePool - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ResourcePool - 02_rp_gi_errors.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 01_enum.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: > PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - > 06_RemoveResourcesFromResourcePool.py: PASS > > -------------------------------------------------------------------- > > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > > -------------------------------------------------------------------- > > ServiceAccessBySAP - 01_forward.py: SKIP > > -------------------------------------------------------------------- > > ServiceAccessBySAP - 02_reverse.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: PASS > > -------------------------------------------------------------------- > > VSSD - 03_vssd_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VSSD - 04_vssd_to_rasd.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 01_definesystem_name.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 02_destroysystem.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 06_addresource.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 07_addresource_neg.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 08_modifyresource.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 09_procrasd_persist.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 10_hv_version.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 11_define_memrasdunits.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 12_referenced_config.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 14_define_sys_disk.py: FAIL > > ERROR - Xen_DiskResourceAllocationSettingData instance for > > rstest_disk_domain not found > > ERROR - Failed to verify disk path for rstest_disk_domain > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 15_mod_system_settings.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemMigrationService - 01_migratable_host.py: FAIL > > ERROR - MigrateVirtualSystemToHost took too long > > > Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" > > -------------------------------------------------------------------- > > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting > > system with return code 1 > > ERROR - CS instance not returned for dom_migrate. > > ERROR - Error start domain dom_migrate > > InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup > resulting system > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > CIM_ERR_NOT_FOUND: No such instance (dom_migrate). > > -------------------------------------------------------------------- > > VirtualSystemMigrationService - 05_migratable_host_errs.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > > return code 1 > > ERROR - Error start domain dom_migration > > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > > -------------------------------------------------------------------- > > VirtualSystemMigrationSettingData - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSettingDataComponent - 01_forward.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSettingDataComponent - 02_reverse.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > > return code 1 > > ERROR - Failed to start the dom: VSSDC_dom > > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > > -------------------------------------------------------------------- > > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > > return code 1 > > ERROR - Unable to start domain domu1 > > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > > -------------------------------------------------------------------- > > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL > > ERROR - Got CIM error CIM_ERR_FAILED: Unable to start domain with > > return code 1 > > ERROR - Unable to start domain domu1 > > InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to start domain > > -------------------------------------------------------------------- > > VirtualSystemSnapshotService - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > > -------------------------------------------------------------------- > > VirtualSystemSnapshotServiceCapabilities - > 02_vs_sservicecap_gi_errs.py: PASS > > -------------------------------------------------------------------- > > > > > > -- > > Thanks and Regards, > > Deepti B. Kalakeri > > IBM Linux Technology Center > > deeptik at linux.vnet.ibm.com > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Mar 18 05:52:30 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 18 Mar 2009 11:22:30 +0530 Subject: [Libvirt-cim] [PATCH 0 of 4] [TEST][RFC] Added new tc to verify remote live migration. In-Reply-To: <49C010DC.7040406@linux.vnet.ibm.com> References: <49BED0CB.5070309@linux.vnet.ibm.com> <49BF4ED7.7090401@linux.vnet.ibm.com> <49C010DC.7040406@linux.vnet.ibm.com> Message-ID: <49C08C1E.7030101@linux.vnet.ibm.com> Kaitlin Rupert wrote: >>> >>> This set looks good! I haven't had a chance to test on Xen yet. >>> Also, if you are planning to include all of the migration types in >>> one test, you'll want to change the test name from >>> 06_remote_live_migration.py to something more generic. >>> >> I would prefer to have different test cases for different types, >> otherwise >> tracking the issues would be more problematic, >> the test case will be lengthier and complex >> keeping the scenarios separate gives a ready to use tc for verifying >> regression for different migration types if any. >> >> Thoughts ?? >> > > These are good arguments. I'm fine with either approach. The single > test approach means there is less code duplication across multiple > tests (because each test will basically be the same, right?). So it's > less of a maintenance headache if things change later on. > Since most of the code in the test cases is to do with guest defining/starting/destroying and then passing appropriate migration info I think these would not change much. Also, for the new tests I will see if I can include more scenarios in the same test case. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Mar 18 11:35:50 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 18 Mar 2009 17:05:50 +0530 Subject: [Libvirt-cim] [PATCH] Add Emulator attribute so users can specify an emulator for the guest In-Reply-To: <6195f98ebe5ef0bb1db1.1237317975@localhost.localdomain> References: <6195f98ebe5ef0bb1db1.1237317975@localhost.localdomain> Message-ID: <49C0DC96.5080604@linux.vnet.ibm.com> +1 . Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237310504 25200 > # Node ID 6195f98ebe5ef0bb1db1bb8ca946d5449393c21c > # Parent 1aff0d0e9bf49e738827b7157c0df407b814ae7d > Add Emulator attribute so users can specify an emulator for the guest. > > Signed-off-by: Kaitlin Rupert > > diff -r 1aff0d0e9bf4 -r 6195f98ebe5e schema/VSSD.mof > --- a/schema/VSSD.mof Wed Mar 04 15:25:33 2009 -0800 > +++ b/schema/VSSD.mof Tue Mar 17 10:21:44 2009 -0700 > @@ -29,6 +29,9 @@ > "One of hd,fd,cdrom.")] > string BootDevice; > > + [Description ("The emulator the guest should use during runtime.")] > + string Emulator; > + > }; > > [Description ( > @@ -42,6 +45,9 @@ > [Description ("The device to boot from. One of hd,fd,cdrom.")] > string BootDevice; > > + [Description ("The emulator the guest should use during runtime.")] > + string Emulator; > + > }; > > [Description ( > diff -r 1aff0d0e9bf4 -r 6195f98ebe5e src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Wed Mar 04 15:25:33 2009 -0800 > +++ b/src/Virt_VirtualSystemManagementService.c Tue Mar 17 10:21:44 2009 -0700 > @@ -148,9 +148,15 @@ > return 1; > } > > -static bool fv_default_emulator(struct domain *domain) > +static bool fv_set_emulator(struct domain *domain, > + const char *emu) > { > - const char *emul = XEN_EMULATOR; > + if ((domain->type == DOMAIN_XENFV) && (emu == NULL)) > + emu = XEN_EMULATOR; > + > + /* No emulator value to set */ > + if (emu == NULL) > + return true; > > cleanup_virt_device(domain->dev_emu); > > @@ -161,7 +167,7 @@ > } > > domain->dev_emu->type = CIM_RES_TYPE_EMU; > - domain->dev_emu->dev.emu.path = strdup(emul); > + domain->dev_emu->dev.emu.path = strdup(emu); > domain->dev_emu->id = strdup("emulator"); > > return true; > @@ -178,8 +184,6 @@ > domain->type = DOMAIN_KVM; > } else if (STREQC(pfx, "Xen")) { > domain->type = DOMAIN_XENFV; > - if (!fv_default_emulator(domain)) > - return 0; > } else { > CU_DEBUG("Unknown fullvirt domain type: %s", pfx); > return 0; > @@ -192,6 +196,17 @@ > free(domain->os_info.fv.boot); > domain->os_info.fv.boot = strdup(val); > > + ret = cu_get_str_prop(inst, "Emulator", &val); > + if (ret != CMPI_RC_OK) > + val = NULL; > + else if (disk_type_from_file(val) == DISK_UNKNOWN) { > + CU_DEBUG("Emulator path does not exist: %s", val); > + return 0; > + } > + > + if (!fv_set_emulator(domain, val)) > + return 0; > + > return 1; > } > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Mar 18 13:38:45 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 18 Mar 2009 06:38:45 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the run() fn of vxml.py Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1237383510 25200 # Node ID a06ef66126e2c8636f0b2ae0d978d38192471e9d # Parent daccd46e12ccf2afce3295a41510d7e94ff48d7b [TEST] Fixing the run() fn of vxml.py. Fixing run() fn of vxml.py to be able to run virsh commands on the remote machine. We need this for successful execution of the ssh remote commands like net-createa via virsh, otherwise the remote execution of the command fails when the file is not locally present on the remote machine. Signed-off-by: Deepti B. Kalakeri diff -r daccd46e12cc -r a06ef66126e2 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Mar 13 10:31:02 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Mar 18 06:38:30 2009 -0700 @@ -164,12 +164,29 @@ else: name = param + # We need to copy the xml files to remote machine for + # successful execution of the ssh remote commands like net-createa via virsh, + # otherwise the remote execution of the command fails when the + # file is not locally present on the remote machine. + if vcmd == 'define' or vcmd == 'create' or vcmd == 'net-create' or \ + vcmd == 'pool-create': + s, o = utils.copy_remote(ip, name, remote=name) + if s != 0: + logger.error("Failed to copy the tempxml file to execute '%s'"\ + " cmd on '%s'", vcmd, ip) + return 0 + cmd = 'virsh -c %s %s %s' % (self.vuri, vcmd, name) s, o = utils.run_remote(ip, cmd) - if vcmd == 'define' or vcmd == 'create': + if vcmd == 'define' or vcmd == 'create' or vcmd == 'net-create' \ + or vcmd == 'pool-create': # don't wait till gc does the ntf.close() ntf.close() + # Remove the tmp file copied to the remote machine + cmd = 'rm -rf %s' % name + utils.run_remote(ip, cmd) + return s == 0 class NetXML(Virsh, XMLClass): From kaitlin at linux.vnet.ibm.com Wed Mar 18 17:54:27 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 18 Mar 2009 10:54:27 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the run() fn of vxml.py In-Reply-To: References: Message-ID: <49C13553.1040003@linux.vnet.ibm.com> > @@ -164,12 +164,29 @@ > else: > name = param > > + # We need to copy the xml files to remote machine for > + # successful execution of the ssh remote commands like net-createa via virsh, > + # otherwise the remote execution of the command fails when the > + # file is not locally present on the remote machine. > + if vcmd == 'define' or vcmd == 'create' or vcmd == 'net-create' or \ > + vcmd == 'pool-create': > + s, o = utils.copy_remote(ip, name, remote=name) > + if s != 0: > + logger.error("Failed to copy the tempxml file to execute '%s'"\ > + " cmd on '%s'", vcmd, ip) > + return 0 > + You're doing this copy every time run() is called, which isn't necessary for actions that are taking place on the local system. Instead, it would be better to copy the key once. In main.py, if the user specifies --target_url, then call copy_remote(). However, the problem with copy_remote() is that it doesn't do any checking to see if the id_rsa file exists on the remote system. So if a file exists, it is replaced by the testsuite. Also, we don't really need to copy the private key itself, we need to write the public key to the target's authorized_keys file. I think something like setup_ssh_keys() is needed to do a proper key exchange between the source and target systems. Also, there's a long standing bug that needs to be fixed here.. I'll follow up with a patch. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Mar 18 18:07:40 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 18 Mar 2009 11:07:40 -0700 Subject: [Libvirt-cim] [PATCH] Fix key generation Message-ID: <5f95e05cced6279241c9.1237399660@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237399611 25200 # Node ID 5f95e05cced6279241c9200333bc4d41f83c83d8 # Parent daccd46e12ccf2afce3295a41510d7e94ff48d7b Fix key generation Instead of setting up the ssh keys prior to each test run, the keys need to be setup before main.py is called. This fixes the issue where cimtest would complain if an id_rsa key wasn't already available. Now, if the key isn't available, it generates one. Otherwise, it uses the available key. Signed-off-by: Kaitlin Rupert diff -r daccd46e12cc -r 5f95e05cced6 runtests --- a/runtests Fri Mar 13 10:31:02 2009 -0700 +++ b/runtests Wed Mar 18 11:06:51 2009 -0700 @@ -22,6 +22,8 @@ import sys import os +sys.path.append('./lib') +from VirtLib.utils import setup_ssh_key SUITES_DIR = 'suites' MAIN_FILE = 'main.py' @@ -53,6 +55,8 @@ print "\t%s" % ", ".join(available_suites()) return 1 + setup_ssh_key() + suite = sys.argv[1] print "Starting test suite: %s" % suite diff -r daccd46e12cc -r 5f95e05cced6 suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Mar 13 10:31:02 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Mar 18 11:06:51 2009 -0700 @@ -134,9 +134,9 @@ try: from CimTest.Globals import logger, log_param log_param() - from VirtLib.utils import setup_ssh_key + #from VirtLib.utils import setup_ssh_key from XenKvmLib.test_doms import destroy_and_undefine_all - setup_ssh_key() + #setup_ssh_key() destroy_and_undefine_all(options.ip, options.virt) rc = f() except Exception, e: From kaitlin at linux.vnet.ibm.com Wed Mar 18 19:21:36 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 18 Mar 2009 12:21:36 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] [TEST][RFC] Added new tc to verify remote live migration. In-Reply-To: <49C08C1E.7030101@linux.vnet.ibm.com> References: <49BED0CB.5070309@linux.vnet.ibm.com> <49BF4ED7.7090401@linux.vnet.ibm.com> <49C010DC.7040406@linux.vnet.ibm.com> <49C08C1E.7030101@linux.vnet.ibm.com> Message-ID: <49C149C0.3040603@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Kaitlin Rupert wrote: >>>> >>>> This set looks good! I haven't had a chance to test on Xen yet. >>>> Also, if you are planning to include all of the migration types in >>>> one test, you'll want to change the test name from >>>> 06_remote_live_migration.py to something more generic. >>>> >>> I would prefer to have different test cases for different types, >>> otherwise >>> tracking the issues would be more problematic, >>> the test case will be lengthier and complex >>> keeping the scenarios separate gives a ready to use tc for verifying >>> regression for different migration types if any. >>> >>> Thoughts ?? >>> >> >> These are good arguments. I'm fine with either approach. The single >> test approach means there is less code duplication across multiple >> tests (because each test will basically be the same, right?). So it's >> less of a maintenance headache if things change later on. >> > > Since most of the code in the test cases is to do with guest > defining/starting/destroying and then passing appropriate migration info > I think these would not change much. > Also, for the new tests I will see if I can include more scenarios in > the same test case. > This is fine by me =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Mar 18 19:57:19 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 18 Mar 2009 12:57:19 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Add tc to verify VSMS.RemoveResourceSettings() with correct resource In-Reply-To: References: Message-ID: <49C1521F.1010909@linux.vnet.ibm.com> > +import sys > +from XenKvmLib.vsms import get_vsms_class > +from XenKvmLib.vxml import get_class > +from XenKvmLib.classes import get_typed_class > +from XenKvmLib.assoc import AssociatorNames > +from CimTest.Globals import logger > +from XenKvmLib.const import do_main, get_provider_version > +from CimTest.ReturnCodes import FAIL, PASS Need to include SKIP here. > + > +sup_types = ['Xen', 'KVM', 'XenFV'] > +default_dom = 'domain' > +rem_res_err_rev_start = 779 > +rem_res_err_rev_end = 828 > +ntype = 'network' This isn't used in the test. > + > + service = get_vsms_class(options.virt)(options.ip) > + for dev in devs: > + if dev['CreationClassName'] in dev_not_rem: > + continue > + else: No need for an else here. If the if condition is met, the rest of the for loop is skipped over. This is why I suggested changing the if statement... > + ccn = dev['CreationClassName'] > + sccn = dev['SystemCreationClassName'] > + rasd = AssociatorNames(options.ip, sds_classname, ccn, > + DeviceID = dev['DeviceID'], > + CreationClassName = ccn, > + SystemName = dev['SystemName'], > + SystemCreationClassName = sccn) > + if len(rasd) != 1: > + raise Exception("%i RASD insts for %s", len(rasd), dev.DeviceID) Instead of dev.DeviceID, this should be dev['DeviceID']. Also, your formatting is off here - this needs to be: raise Exception("%i RASD insts for %s" % (len(rasd), dev.DeviceID)) Also, this line is also longer than 80 characters.. > + # Invoke RemoveResourceSettings() to remove resource > + ret = service.RemoveResourceSettings(ResourceSettings=[rasd[0]]) > + if ret[0] != 0: > + raise Exception("Remove %s error, please check", rasd[0]) This error is a little odd, also the formatting of Exception() is incorrect. raise Exception("RemoveResourceSettings() returned %d removing %s" % (ret[0], rasd[0])) > + except Exception, details: > + logger.error(details) > + cxml.undefine(options.ip) > + return FAIL > + > + cxml.dumpxml(options.ip) > + device = cxml.get_value_xpath('/domain/@devices') > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + > + if device == None: > + return PASS You don't undefine() the guest in this case.. > + elif device != None and curr_cim_rev >= rem_res_err_rev_start and\ > + curr_cim_rev < rem_res_err_rev_end: > + return SKIP Same issue here.. > + else: > + logger.error('The devices are not removed successfully') > + cxml.undefine(options.ip) > + return FAIL > + Instead of calling undefine() so many times in a row, this could be formatted as: if device == None: status = PASS elif device != None and curr_cim_rev >= rem_res_err_rev_start and\ curr_cim_rev < rem_res_err_rev_end: status = SKIP You don't undefine the guest in this case. else: logger.error('The devices are not removed successfully') status = FAIL > + cxml.undefine(options.ip) > + return PASS This should then be: return status -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Mar 18 21:00:25 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 18 Mar 2009 14:00:25 -0700 Subject: [Libvirt-cim] [PATCH] Advertise the profiles using SLP Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1237409963 25200 # Node ID bdf655b33c77fe916c954f205404f3a8c138a23d # Parent b40ee621a3ae88009025aa85049fb147c9c773d6 Advertise the profiles using SLP Signed-off-by: Kaitlin Rupert diff -r b40ee621a3ae -r bdf655b33c77 src/Virt_RegisteredProfile.c --- a/src/Virt_RegisteredProfile.c Wed Mar 18 11:47:37 2009 -0700 +++ b/src/Virt_RegisteredProfile.c Wed Mar 18 13:59:23 2009 -0700 @@ -49,6 +49,7 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *instance = NULL; + CMPIArray *array; instance = get_typed_instance(broker, pfx, @@ -79,6 +80,19 @@ CMSetProperty(instance, "RegisteredVersion", (CMPIValue *)profile->reg_version, CMPI_chars); + array = CMNewArray(broker, 1, CMPI_uint16, &s); + if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(array))) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Unable to create CMPIArray object"); + goto out; + } + + CMSetArrayElementAt(array, 0, &profile->ad_types, CMPI_uint16); + + CMSetProperty(instance, "AdvertiseTypes", + (CMPIValue *)&array, CMPI_uint16A); + *_inst = instance; out: diff -r b40ee621a3ae -r bdf655b33c77 src/profiles.h --- a/src/profiles.h Wed Mar 18 11:47:37 2009 -0700 +++ b/src/profiles.h Wed Mar 18 13:59:23 2009 -0700 @@ -41,6 +41,7 @@ .reg_id = "CIM:DSP1057-VirtualSystem-1.0.0a", .reg_name = "Virtual System Profile", .reg_version = "1.0.0a", + .ad_types = 3, .scoping_class = "ComputerSystem", .scoping_profile = NULL }; @@ -50,6 +51,7 @@ .reg_id = "CIM:DSP1042-SystemVirtualization-1.0.0", .reg_name = "System Virtualization", .reg_version = "1.0.0", + .ad_types = 3, .scoping_class = "HostSystem", .scoping_profile = &VirtualSystem }; @@ -59,6 +61,7 @@ .reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_d", .reg_name = "Generic Device Resource Virtualization", .reg_version = "1.0.0", + .ad_types = 3, .central_class = "DiskPool", .scoping_class = NULL, .scoping_profile = &SystemVirtualization @@ -69,6 +72,7 @@ .reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_n", .reg_name = "Generic Device Resource Virtualization", .reg_version = "1.0.0", + .ad_types = 3, .central_class = "NetworkPool", .scoping_class = NULL, .scoping_profile = &SystemVirtualization @@ -79,6 +83,7 @@ .reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_p", .reg_name = "Generic Device Resource Virtualization", .reg_version = "1.0.0", + .ad_types = 3, .central_class = "ProcessorPool", .scoping_class = NULL, .scoping_profile = &SystemVirtualization @@ -89,6 +94,7 @@ .reg_id = "CIM:DSP1045-MemoryResourceVirtualization-1.0.0", .reg_name = "Memory Resource Virtualization", .reg_version = "1.0.0", + .ad_types = 3, .scoping_class = NULL, .central_class = "MemoryPool", .scoping_profile = &SystemVirtualization @@ -99,6 +105,7 @@ .reg_id = "CIM:DSP1081-VirtualSystemMigration-0.8.1", .reg_name = "Virtual System Migration", .reg_version = "0.8.1", + .ad_types = 3, .scoping_class = NULL, .central_class = "VirtualSystemMigrationService", .scoping_profile = &SystemVirtualization @@ -109,6 +116,7 @@ .reg_id = "CIM:DSP1076-KVMRedirection-1.0.0", .reg_name = "KVM Redirection", .reg_version = "1.0.0", + .ad_types = 3, .scoping_class = "HostSystem", .central_class = "ConsoleRedirectionService", .scoping_profile = &SystemVirtualization @@ -119,6 +127,7 @@ .reg_id = "CIM:DSP1043-AllocationCapabilities-1.0.0a", .reg_name = "Allocation Capabilities", .reg_version = "1.0.0a", + .ad_types = 3, .scoping_class = "ComputerSystem", .central_class = "AllocationCapabilities", .scoping_profile = &SystemVirtualization @@ -129,6 +138,7 @@ .reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_d", .reg_name = "Resource Allocation", .reg_version = "1.1.0c", + .ad_types = 3, .scoping_class = "ComputerSystem", .central_class = "DiskPool", .scoping_profile = &SystemVirtualization @@ -139,6 +149,7 @@ .reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_n", .reg_name = "Resource Allocation", .reg_version = "1.1.0c", + .ad_types = 3, .scoping_class = "ComputerSystem", .central_class = "NetworkPool", .scoping_profile = &SystemVirtualization @@ -149,6 +160,7 @@ .reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_p", .reg_name = "Resource Allocation", .reg_version = "1.1.0c", + .ad_types = 3, .scoping_class = "ComputerSystem", .central_class = "ProcessorPool", .scoping_profile = &SystemVirtualization @@ -159,6 +171,7 @@ .reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_m", .reg_name = "Resource Allocation", .reg_version = "1.1.0c", + .ad_types = 3, .scoping_class = "ComputerSystem", .central_class = "MemoryPool", .scoping_profile = &SystemVirtualization From kaitlin at linux.vnet.ibm.com Wed Mar 18 21:21:15 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 18 Mar 2009 14:21:15 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fix key generation In-Reply-To: <5f95e05cced6279241c9.1237399660@localhost.localdomain> References: <5f95e05cced6279241c9.1237399660@localhost.localdomain> Message-ID: <49C165CB.4030001@linux.vnet.ibm.com> Forgot to include [TEST] in the header. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237399611 25200 > # Node ID 5f95e05cced6279241c9200333bc4d41f83c83d8 > # Parent daccd46e12ccf2afce3295a41510d7e94ff48d7b > Fix key generation > > Instead of setting up the ssh keys prior to each test run, the keys need to be > setup before main.py is called. This fixes the issue where cimtest would > complain if an id_rsa key wasn't already available. > > Now, if the key isn't available, it generates one. Otherwise, it uses the > available key. > > Signed-off-by: Kaitlin Rupert > > diff -r daccd46e12cc -r 5f95e05cced6 runtests > --- a/runtests Fri Mar 13 10:31:02 2009 -0700 > +++ b/runtests Wed Mar 18 11:06:51 2009 -0700 > @@ -22,6 +22,8 @@ > > import sys > import os > +sys.path.append('./lib') > +from VirtLib.utils import setup_ssh_key > > SUITES_DIR = 'suites' > MAIN_FILE = 'main.py' > @@ -53,6 +55,8 @@ > print "\t%s" % ", ".join(available_suites()) > return 1 > > + setup_ssh_key() > + > suite = sys.argv[1] > print "Starting test suite: %s" % suite > > diff -r daccd46e12cc -r 5f95e05cced6 suites/libvirt-cim/lib/XenKvmLib/const.py > --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Mar 13 10:31:02 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Mar 18 11:06:51 2009 -0700 > @@ -134,9 +134,9 @@ > try: > from CimTest.Globals import logger, log_param > log_param() > - from VirtLib.utils import setup_ssh_key > + #from VirtLib.utils import setup_ssh_key > from XenKvmLib.test_doms import destroy_and_undefine_all > - setup_ssh_key() > + #setup_ssh_key() > destroy_and_undefine_all(options.ip, options.virt) > rc = f() > except Exception, e: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Thu Mar 19 01:46:40 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Thu, 19 Mar 2009 09:46:40 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix key generation In-Reply-To: <49C165CB.4030001@linux.vnet.ibm.com> Message-ID: +1 from me =) libvirt-cim-bounces at redhat.com wrote on 2009-03-19 05:21:15: > Forgot to include [TEST] in the header. > > Kaitlin Rupert wrote: > > # HG changeset patch > > # User Kaitlin Rupert > > # Date 1237399611 25200 > > # Node ID 5f95e05cced6279241c9200333bc4d41f83c83d8 > > # Parent daccd46e12ccf2afce3295a41510d7e94ff48d7b > > Fix key generation > > > > Instead of setting up the ssh keys prior to each test run, the > keys need to be > > setup before main.py is called. This fixes the issue where cimtest would > > complain if an id_rsa key wasn't already available. > > > > Now, if the key isn't available, it generates one. Otherwise, it uses the > > available key. > > > > Signed-off-by: Kaitlin Rupert > > > > diff -r daccd46e12cc -r 5f95e05cced6 runtests > > --- a/runtests Fri Mar 13 10:31:02 2009 -0700 > > +++ b/runtests Wed Mar 18 11:06:51 2009 -0700 > > @@ -22,6 +22,8 @@ > > > > import sys > > import os > > +sys.path.append('./lib') > > +from VirtLib.utils import setup_ssh_key > > > > SUITES_DIR = 'suites' > > MAIN_FILE = 'main.py' > > @@ -53,6 +55,8 @@ > > print "\t%s" % ", ".join(available_suites()) > > return 1 > > > > + setup_ssh_key() > > + > > suite = sys.argv[1] > > print "Starting test suite: %s" % suite > > > > diff -r daccd46e12cc -r 5f95e05cced6 suites/libvirt- > cim/lib/XenKvmLib/const.py > > --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Mar 13 10: > 31:02 2009 -0700 > > +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Mar 18 11: > 06:51 2009 -0700 > > @@ -134,9 +134,9 @@ > > try: > > from CimTest.Globals import logger, log_param > > log_param() > > - from VirtLib.utils import setup_ssh_key > > + #from VirtLib.utils import setup_ssh_key > > from XenKvmLib.test_doms import > destroy_and_undefine_all > > - setup_ssh_key() > > + #setup_ssh_key() > > destroy_and_undefine_all(options.ip, options.virt) > > rc = f() > > except Exception, e: > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Thu Mar 19 02:43:10 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 18 Mar 2009 19:43:10 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #4 Add tc to verify VSMS.RemoveResourceSettings() with correct resource Message-ID: <0f841c14cbc263d2a818.1237430590@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1237430532 25200 # Node ID 0f841c14cbc263d2a8180f158ea718eebfe8ce87 # Parent daccd46e12ccf2afce3295a41510d7e94ff48d7b [TEST] #4 Add tc to verify VSMS.RemoveResourceSettings() with correct resource Updates from 3 to 4: 1) Include SKIP and XFAIL_RC from import statement 2) Remove else in dev for loop 3) Rewrite raise Exception desc using percent instead of comma 4) Use status setting to call undefine() one time Updates from 2 to 3: 1) Capture the return of RemoveResourceSettings() and check for an error. 2) Verify InputRASD Updates from 1 to 2: Get RASD instances by SystemDevice and SettingsDefineState associaton Tested for KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r daccd46e12cc -r 0f841c14cbc2 suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/16_removeresource.py Wed Mar 18 19:42:12 2009 -0700 @@ -0,0 +1,115 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Guolian Yun +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +import sys +from XenKvmLib.vsms import get_vsms_class +from XenKvmLib.vxml import get_class +from XenKvmLib.classes import get_typed_class +from XenKvmLib.assoc import AssociatorNames +from CimTest.Globals import logger +from XenKvmLib.const import do_main, get_provider_version +from CimTest.ReturnCodes import FAIL, PASS, SKIP, XFAIL_RC + +libvirt_bug = '00014' +sup_types = ['Xen', 'KVM', 'XenFV'] +default_dom = 'domain' +rem_res_err_rev_start = 779 +rem_res_err_rev_end = 828 +nmac = '00:11:22:33:44:55' + + at do_main(sup_types) +def main(): + options = main.options + + if options.virt == 'KVM': + nddev = 'hdb' + else: + nddev = 'xvdb' + + cxml = get_class(options.virt)(default_dom, disk=nddev, mac=nmac) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + return FAIL + + try: + # Get system devices through SystemDevice assocation + sd_classname = get_typed_class(options.virt, 'SystemDevice') + cs_classname = get_typed_class(options.virt, 'ComputerSystem') + + devs = AssociatorNames(options.ip, sd_classname, cs_classname, + Name=default_dom, CreationClassName=cs_classname) + + if len(devs) == 0: + raise Exception("No devices returned") + + # Get RASD instances through SettingsDefineState + sds_classname = get_typed_class(options.virt, 'SettingsDefineState') + mem = get_typed_class(options.virt, 'Memory') + proc = get_typed_class(options.virt, 'Processor') + dev_not_rem = [mem, proc] + + service = get_vsms_class(options.virt)(options.ip) + for dev in devs: + if dev['CreationClassName'] in dev_not_rem: + continue + ccn = dev['CreationClassName'] + sccn = dev['SystemCreationClassName'] + rasd = AssociatorNames(options.ip, sds_classname, ccn, + DeviceID = dev['DeviceID'], + CreationClassName = ccn, + SystemName = dev['SystemName'], + SystemCreationClassName = sccn) + if len(rasd) != 1: + raise Exception("%i RASD insts for %s" + % (len(rasd), dev['DeviceID'])) + # Invoke RemoveResourceSettings() to remove resource + ret = service.RemoveResourceSettings(ResourceSettings=[rasd[0]]) + if ret[0] != 0: + raise Exception("RemoveResourceSettings() returned %d " + + "removing %s" % (ret[0], rasd[0])) + except Exception, details: + logger.error(details) + cxml.undefine(options.ip) + input = get_typed_class(options.virt, 'PointingDevice') + if ccn == input: + return XFAIL_RC(libvirt_bug) + return FAIL + + cxml.dumpxml(options.ip) + device = cxml.get_value_xpath('/domain/@devices') + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + + if device == None: + status = PASS + elif device != None and curr_cim_rev >= rem_res_err_rev_start and\ + curr_cim_rev < rem_res_err_rev_end: + status = SKIP + else: + logger.error('The devices are not removed successfully') + status = FAIL + + cxml.undefine(options.ip) + return status + +if __name__ == "__main__": + sys.exit(main()) From deeptik at linux.vnet.ibm.com Thu Mar 19 04:25:37 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 19 Mar 2009 09:55:37 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the run() fn of vxml.py In-Reply-To: <49C13553.1040003@linux.vnet.ibm.com> References: <49C13553.1040003@linux.vnet.ibm.com> Message-ID: <49C1C941.3050209@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> @@ -164,12 +164,29 @@ >> else: >> name = param >> >> + # We need to copy the xml files to remote machine for >> + # successful execution of the ssh remote commands like >> net-createa via virsh, + # otherwise the remote execution of >> the command fails when the + # file is not locally present on >> the remote machine. >> + if vcmd == 'define' or vcmd == 'create' or vcmd == >> 'net-create' or \ >> + vcmd == 'pool-create': >> + s, o = utils.copy_remote(ip, name, remote=name) >> + if s != 0: >> + logger.error("Failed to copy the tempxml file to >> execute '%s'"\ >> + " cmd on '%s'", vcmd, ip) >> + return 0 >> + > > You're doing this copy every time run() is called, which isn't > necessary for actions that are taking place on the local system. > > Instead, it would be better to copy the key once. In main.py, if the > user specifies --target_url, then call copy_remote(). Copying the files is required when we are planning to initiate the test execution on the remote machine from the local machine. target_url is used for remote migration as of now. But otherwise also for cases like the following to run commands like define/net-create via *ssh* we would need the temp files to be present on the remote machines. This is what I realized when I executed some ssh commands manually like the one below: From Machine ABC: ssh -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa root at machinexyz "virsh -c qemu:///system net-create /tmp/tmpPnWJnU" CIM_NS=root/virt CIM_USER=root CIM_PASS= ./runtests libvirt-cim -i -c -v KVM -g ElementConforms > > However, the problem with copy_remote() is that it doesn't do > anyCopying the files is required when we are planning to run the tests > checking to see if the id_rsa file exists on the remote system. So if > a file exists, it is replaced by the testsuite. Also, we don't really > need to copy the private key itself, we need to write the public key > to the target's authorized_keys file. > Do you mean that copying the ssh_ids.pub key to authorized file will solve the problem ? If yes, then we already have copied the ssh_ids.pub manually to authorized file on the remote machine. Also, the changes are wrt to executing the commands like virsh define , virsh net-create , virsh pool-create and are conditionally executed only for these cases. Please let me know if I am missing something ? > I think something like setup_ssh_keys() is needed to do a proper key > exchange between the source and target systems. > > Also, there's a long standing bug that needs to be fixed here.. I'll > follow up with a patch. > I have not yet verified your patch yet if it will solve the issue which I mentioned above. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 19 06:14:40 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 18 Mar 2009 23:14:40 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the run() fn of vxml.py In-Reply-To: <49C1C941.3050209@linux.vnet.ibm.com> References: <49C13553.1040003@linux.vnet.ibm.com> <49C1C941.3050209@linux.vnet.ibm.com> Message-ID: <49C1E2D0.4060408@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Kaitlin Rupert wrote: >>> @@ -164,12 +164,29 @@ >>> else: >>> name = param >>> >>> + # We need to copy the xml files to remote machine for >>> + # successful execution of the ssh remote commands like >>> net-createa via virsh, + # otherwise the remote execution of >>> the command fails when the + # file is not locally present on >>> the remote machine. >>> + if vcmd == 'define' or vcmd == 'create' or vcmd == >>> 'net-create' or \ >>> + vcmd == 'pool-create': >>> + s, o = utils.copy_remote(ip, name, remote=name) >>> + if s != 0: >>> + logger.error("Failed to copy the tempxml file to >>> execute '%s'"\ >>> + " cmd on '%s'", vcmd, ip) >>> + return 0 >>> + >> >> You're doing this copy every time run() is called, which isn't >> necessary for actions that are taking place on the local system. >> >> Instead, it would be better to copy the key once. In main.py, if the >> user specifies --target_url, then call copy_remote(). > Copying the files is required when we are planning to initiate the test > execution on the remote machine from the local machine. > target_url is used for remote migration as of now. > But otherwise also for cases like the following to run commands like > define/net-create via *ssh* we would need the temp files to be present > on the remote machines. > This is what I realized when I executed some ssh commands manually like > the one below: > > > > From Machine ABC: > > ssh -q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i > /root/.ssh/id_rsa root at machinexyz "virsh -c qemu:///system net-create > /tmp/tmpPnWJnU" > > CIM_NS=root/virt CIM_USER=root CIM_PASS= ./runtests > libvirt-cim -i -c -v KVM -g ElementConforms >> >> However, the problem with copy_remote() is that it doesn't do >> anyCopying the files is required when we are planning to run the tests >> checking to see if the id_rsa file exists on the remote system. So if >> a file exists, it is replaced by the testsuite. Also, we don't really >> need to copy the private key itself, we need to write the public key >> to the target's authorized_keys file. >> > Do you mean that copying the ssh_ids.pub key to authorized file will > solve the problem ? > If yes, then we already have copied the ssh_ids.pub manually to > authorized file on the remote machine. > Also, the changes are wrt to executing the commands like virsh define , > virsh net-create , virsh pool-create and are conditionally executed only > for these cases. > > Please let me know if I am missing something ? This is my mistake Deepti. When I read the patch, I thought you were copying the ssh key of the source to the target. I wasn't reading carefully enough. Although, I'm not sure that calling copy_remote() each time is a good idea. Since most of the calls will take place on the source system, the files should already be present there. Ideally, you would have a way of specifying whether a net-create call is happening on a source or target (and copy only when necessary), but the structure of vxml isn't well suited for handling this. I think this is a reasonable approach for now. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Thu Mar 19 07:22:33 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Thu, 19 Mar 2009 00:22:33 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add branch to VSMS/14_define_sys_disk.py to fix Caption settings in DiskRASD Message-ID: <9f70dfab7a1e354ec6cf.1237447353@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1237447329 25200 # Node ID 9f70dfab7a1e354ec6cfdc14d4f80f1a79cfdb41 # Parent a06ef66126e2c8636f0b2ae0d978d38192471e9d [TEST] Add branch to VSMS/14_define_sys_disk.py to fix Caption settings in DiskRASD Tested for Xen, XenFV, KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r a06ef66126e2 -r 9f70dfab7a1e suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Wed Mar 18 06:38:30 2009 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Thu Mar 19 00:22:09 2009 -0700 @@ -36,11 +36,13 @@ from XenKvmLib.classes import get_typed_class, inst_to_mof from XenKvmLib.rasd import get_default_rasds from XenKvmLib.const import do_main, _image_dir, f9_changeset, \ - KVM_default_disk_dev, get_provider_version +Xen_default_disk_dev, XenFV_default_disk_dev, \ +KVM_default_disk_dev, get_provider_version from XenKvmLib.vxml import get_class from XenKvmLib.common_util import parse_instance_id from XenKvmLib.enumclass import EnumInstances +libvirt_cim_dasd_caption = 707 sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = 'rstest_disk_domain' @@ -66,9 +68,12 @@ for rasd in rasds: if rasd.classname == drasd_cn: - if disk_type != "" and rasd['Caption'] != disk_type: + curr_cim_rev, changeset = get_provider_version(virt, ip) + if disk_type != "" and rasd['Caption'] != disk_type and \ + curr_cim_rev >= libvirt_cim_dasd_caption: continue rasd['Address'] = addr + rasd['VirtualDevice'] = virt + '_default_disk_dev' curr_cim_rev, changeset = get_provider_version(virt, ip) if changeset == f9_changeset and virt == 'KVM': rasd['VirtualDevice'] = KVM_default_disk_dev From deeptik at linux.vnet.ibm.com Thu Mar 19 10:22:57 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 19 Mar 2009 03:22:57 -0700 Subject: [Libvirt-cim] [PATCH 1 of 5] [TESTAdding option to main.py to accept target machine info for Migration Tests In-Reply-To: References: Message-ID: <783c9510aaf930a05766.1237458177@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1237383716 25200 # Node ID 783c9510aaf930a05766707da9a5569f491cad60 # Parent cfc6d625e43e7e78161da8eaf3364bd117e2ff3f [TESTAdding option to main.py to accept target machine info for Migration Tests. New option can be specified as below: CIM_NS=root/virt CIM_USER=userid CIM_PASS=pass ./runtests libvirt-cim -i localhost -c -v KVM -g VirtualSystemMigrationService -t 06_remote_migration.py --target_url or CIM_NS=root/virt CIM_USER=userid CIM_PASS=pass ./runtests libvirt-cim -i localhost -c -v KVM -g VirtualSystemMigrationService -t 06_remote_migration.py -m Signed-off-by: Deepti B. Kalakeri diff -r cfc6d625e43e -r 783c9510aaf9 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Wed Mar 18 06:39:53 2009 -0700 +++ b/suites/libvirt-cim/main.py Wed Mar 18 06:41:56 2009 -0700 @@ -44,6 +44,8 @@ parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", help="IP address of machine to test (default: localhost)") +parser.add_option("-m", "--target_url", dest="t_url", default="localhost:5988", + help="URL of destination host for remote migration ") parser.add_option("-p", "--port", dest="port", type="int", default=5988, help="CIMOM port (default: 5988)") parser.add_option("-g", "--group", dest="group", @@ -199,6 +201,14 @@ # with a different port if options.port: os.environ['CIMOM_PORT'] = str(options.port) + + # src and target host info to be able to use + # in the tc for comparison in remote migration case + if ":" in options.ip: + (options.ip, port) = options.ip.split(":") + + if ":" in options.t_url: + (options.t_url, port) = options.t_url.split(":") if options.report: to_addr = options.report @@ -243,8 +253,9 @@ t_path = os.path.join(TEST_SUITE, test['group']) os.environ['CIM_TC'] = test['test'] cdto = 'cd %s' % t_path - run = 'python %s -i %s -v %s %s' % (test['test'], options.ip, - options.virt, dbg) + run = 'python %s -i %s -v %s %s -m %s' % (test['test'], options.ip, + options.virt, dbg, + options.t_url) cmd = cdto + ' && ' + ' ' + run status, output = commands.getstatusoutput(cmd) From deeptik at linux.vnet.ibm.com Thu Mar 19 10:22:58 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 19 Mar 2009 03:22:58 -0700 Subject: [Libvirt-cim] [PATCH 2 of 5] [TEST]Modifying emulator information to be used for KVM In-Reply-To: References: Message-ID: <26b80beef9adac44d524.1237458178@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1237384005 25200 # Node ID 26b80beef9adac44d524266ca1600c08b1742e53 # Parent 783c9510aaf930a05766707da9a5569f491cad60 [TEST]Modifying emulator information to be used for KVM. Signed-off-by: Deepti B. Kalakeri diff -r 783c9510aaf9 -r 26b80beef9ad suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Mar 18 06:41:56 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Mar 18 06:46:45 2009 -0700 @@ -82,10 +82,12 @@ Xen_default_mac = '11:22:33:aa:bb:cc' # vxml.KVMXML -if fv_cap(CIM_IP): - KVM_default_emulator = '/usr/bin/qemu-kvm' -else: - KVM_default_emulator = '/usr/bin/qemu' +KVM_default_emulator = '/usr/local/bin/qemu-system-x86_64' +if not os.path.exists(KVM_default_emulator): + if fv_cap(CIM_IP): + KVM_default_emulator = '/usr/bin/qemu-kvm' + else: + KVM_default_emulator = '/usr/bin/qemu' KVM_disk_path = os.path.join(_image_dir, 'default-kvm-dimage') KVM_secondary_disk_path = os.path.join(_image_dir, 'default-kvm-dimage.2ND') KVM_default_disk_dev = 'hda' @@ -115,6 +117,8 @@ parser = OptionParser() parser.add_option("-i", "--ip", dest="ip", default="localhost", help="IP address of machine to test, default: localhost") +parser.add_option("-m", "--target_url", dest="t_url", default="localhost:5988", + help="URL of destination host for remote migration ") parser.add_option("-v", "--virt", dest="virt", type="choice", choices=['Xen', 'KVM', 'XenFV', 'LXC'], default="Xen", help="Virt type, select from: 'Xen' & 'KVM' & 'XenFV' & 'LXC', default: Xen") From deeptik at linux.vnet.ibm.com Thu Mar 19 10:22:56 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 19 Mar 2009 03:22:56 -0700 Subject: [Libvirt-cim] [PATCH 0 of 5] [TEST] Added new tc to verify remote live migration. Message-ID: Verified with KVM. Signed-off-by: Deepti B. Kalakeri From deeptik at linux.vnet.ibm.com Thu Mar 19 10:23:01 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 19 Mar 2009 03:23:01 -0700 Subject: [Libvirt-cim] [PATCH 5 of 5] [TEST] Added new tc to verify remote live migration In-Reply-To: References: Message-ID: <0ce3d668a5fde8ff8c47.1237458181@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1237458102 25200 # Node ID 0ce3d668a5fde8ff8c47e7987ce0efacbe9762fc # Parent 7e5d84e400ea3e90ea93c7cec02d94558b41c343 [TEST] Added new tc to verify remote live migration. Verified with KVM. Signed-off-by: Deepti B. Kalakeri diff -r 7e5d84e400ea -r 0ce3d668a5fd suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/06_remote_live_migration.py Thu Mar 19 03:21:42 2009 -0700 @@ -0,0 +1,154 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# +# 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 testcase is used to verify the live remote migration. +# +# Date : 12-03-09 +# + +import sys +import os +from socket import gethostname, gethostbyaddr +from XenKvmLib import vxml +from XenKvmLib.xm_virt_util import domain_list, net_list +from CimTest.Globals import logger +from XenKvmLib.const import do_main, default_network_name +from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.classes import get_typed_class +from XenKvmLib.vsmigrations import local_remote_migrate +from XenKvmLib.common_util import poll_for_state_change, create_netpool_conf,\ + destroy_netpool + +sup_types = ['KVM', 'Xen'] + +REQUESTED_STATE = 2 + +def setup_guest(test_dom, ip, virt): + virt_xml = vxml.get_class(virt) + cxml = virt_xml(test_dom) + ret = cxml.cim_define(ip) + if not ret: + logger.error("Error define domain %s", test_dom) + return FAIL, cxml + + status = cxml.cim_start(ip) + if status != PASS: + cxml.undefine(test_dom) + logger.error("Error to start domain %s", test_dom) + return FAIL, cxml + + status, dom_cs = poll_for_state_change(ip, virt, test_dom, + REQUESTED_STATE) + if status != PASS: + cxml.cim_destroy(test_dom) + cxml.undefine(test_dom) + logger.error("'%s' didn't change state as expected" % test_dom) + return FAIL, cxml + + return PASS, cxml + +def cleanup_guest_netpool(virt, cxml, test_dom, t_sysname, s_sysname): + # Clean the domain on target machine. + # This is req when migration is successful, also when migration is not + # completely successful VM might be created on the target machine + # and hence need to clean. + target_list = domain_list(t_sysname, virt) + if target_list != None and test_dom in target_list: + ret_value = cxml.destroy(t_sysname) + if not ret_value: + logger.info("Failed to destroy the migrated domain '%s' on '%s'", + test_dom, t_sysname) + + ret_value = cxml.undefine(t_sysname) + if not ret_value: + logger.info("Failed to undefine the migrated domain '%s' on '%s'", + test_dom, t_sysname) + + # clean the networkpool created on the remote machine + target_net_list = net_list(t_sysname, virt) + if target_net_list != None and default_network_name in target_net_list: + ret_value = destroy_netpool(t_sysname, virt, default_network_name) + if ret_value != PASS: + logger.info("Unable to destroy networkpool '%s' on '%s'", + default_network_name, t_sysname) + + # Remote Migration not Successful, clean the domain on src machine + src_list = domain_list(s_sysname, virt) + if src_list != None and test_dom in src_list: + ret_value = cxml.cim_destroy(s_sysname) + if not ret_value: + logger.info("Failed to destroy the domain '%s' on the source '%s'", + test_dom, s_sysname) + + ret_value = cxml.undefine(s_sysname) + if not ret_value: + logger.info("Failed to undefine the domain '%s' on source '%s'", + test_dom, s_sysname) + + + at do_main(sup_types) +def main(): + options = main.options + virt = options.virt + s_sysname = gethostbyaddr(options.ip)[0] + t_sysname = gethostbyaddr(options.t_url)[0] + if options.virt == 'KVM' and (t_sysname == s_sysname or \ + t_sysname in s_sysname): + logger.info("Libvirt does not support local migratoin for KVM") + return SKIP + + status = FAIL + test_dom = 'VM_frm_' + gethostname() + + try: + status, cxml = setup_guest(test_dom, s_sysname, virt) + if status != PASS: + logger.error("Error setting up the guest") + return status + + # create the networkpool used in the domain to be migrated + # on the target machine. + t_net_list = net_list(t_sysname, virt) + if t_net_list != None and default_network_name not in t_net_list: + status, netpool = create_netpool_conf(t_sysname, virt, + net_name=default_network_name) + if status != PASS: + raise Exception("Unable to create network pool '%s' on '%s'" + % (default_network_name, t_sysname)) + + # Migrate the test_dom to t_sysname. + # local_remote_migrate executes live migration by default + # Enable remote migration by setting remote_migrate=1 + status = local_remote_migrate(s_sysname, t_sysname, virt, + remote_migrate=1, guest_name=test_dom) + except Exception, details: + logger.error("Exception details :%s", details) + status = FAIL + + cleanup_guest_netpool(virt, cxml, test_dom, t_sysname, s_sysname) + + return status + +if __name__ == "__main__": + sys.exit(main()) + From deeptik at linux.vnet.ibm.com Thu Mar 19 10:23:00 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 19 Mar 2009 03:23:00 -0700 Subject: [Libvirt-cim] [PATCH 4 of 5] [TEST] Adding the Emulator field to VSSD for successful remote migration In-Reply-To: References: Message-ID: <7e5d84e400ea3e90ea93.1237458180@localhost.localdomain> # HG changeset patch # User Deepti B. Kalakeri # Date 1237384697 25200 # Node ID 7e5d84e400ea3e90ea93c7cec02d94558b41c343 # Parent b8c1d36035b8077c3b2242fc8f76b8faf6d0d0b6 [TEST] Adding the Emulator field to VSSD for successful remote migration. To test these change we need the "Add Emulator attribute so users can specify an emulator for the guest" Libvirt-CIM provider patch. Signed-off-by: Deepti B. Kalakeri diff -r b8c1d36035b8 -r 7e5d84e400ea suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Mar 18 06:52:11 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Mar 18 06:58:17 2009 -0700 @@ -98,6 +98,10 @@ self.CreationClassName = self.__class__.__name__ self.AutomaticShutdownAction = VSSD_RECOVERY_NONE self.AutomaticRecoveryAction = VSSD_RECOVERY_NONE + if virt == 'KVM' : + self.Emulator = const.KVM_default_emulator + elif virt == 'XenFV' : + self.Emulator = const.XenFV_default_emulator self.isFullVirt = (type == 'KVM' or virt == 'XenFV') if self.isFullVirt: From deeptik at linux.vnet.ibm.com Thu Mar 19 10:22:59 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 19 Mar 2009 03:22:59 -0700 Subject: [Libvirt-cim] [PATCH 3 of 5] [TEST] Adding support for remote migration in the vsmigrations library In-Reply-To: References: Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1237384331 25200 # Node ID b8c1d36035b8077c3b2242fc8f76b8faf6d0d0b6 # Parent 26b80beef9adac44d524266ca1600c08b1742e53 [TEST] Adding support for remote migration in the vsmigrations library. 1) Added local_remote_migrate() fn to migrate the VM. 2) Modified check_migration_job(), get_migration_job_instance(), migrate_guest_to_host(), check_possible_host_migration() to support remote migration. Signed-off-by: Deepti B. Kalakeri diff -r 26b80beef9ad -r b8c1d36035b8 suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Mar 18 06:46:45 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsmigrations.py Wed Mar 18 06:52:11 2009 -0700 @@ -3,6 +3,7 @@ # # Authors: # Guolian Yun +# Deepti B. Kalakeri # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public @@ -18,34 +19,59 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -import pywbem -import time +# + +from time import sleep +from pywbem import WBEMConnection, CIMInstanceName from CimTest.CimExt import CIMMethodClass, CIMClassMOF -from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.test_doms import destroy_and_undefine_domain -from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from XenKvmLib import enumclass -from XenKvmLib.classes import get_typed_class +from XenKvmLib.classes import get_typed_class, virt_types from XenKvmLib.xm_virt_util import domain_list from XenKvmLib.const import get_provider_version +from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS, \ + CIM_ERROR_ENUMERATE +# Migration constants +CIM_MIGRATE_OFFLINE=1 +CIM_MIGRATE_LIVE=2 +CIM_MIGRATE_RESUME=3 +CIM_MIGRATE_RESTART=4 + +CIM_JOBSTATE_STARTING=3 +CIM_JOBSTATE_COMPLETE=7 +CIM_JOBSTATE_RUNNING=4 libvirt_mig_changes = 668 +def eval_cls(basename): + def func(f): + def body(virt): + if virt in virt_types: + return eval(get_typed_class(virt, basename)) + return body + return func + + class CIM_VirtualSystemMigrationService(CIMMethodClass): conn = None inst = None - def __init__(self, server, hyp): - self.conn = pywbem.WBEMConnection('http://%s' % server, - (CIM_USER, CIM_PASS), CIM_NS) + def __init__(self, server, virt='Xen'): + self.conn = WBEMConnection('http://%s' % server, + (CIM_USER, CIM_PASS), CIM_NS) - self.inst = hyp + '_VirtualSystemMigrationService' + self.inst = get_typed_class(virt, 'VirtualSystemMigrationService') + at eval_cls('VirtualSystemMigrationService') +def get_vs_mig_setting_class(virt): + pass + class Xen_VirtualSystemMigrationService(CIM_VirtualSystemMigrationService): - def __init__(self, server): - CIM_VirtualSystemMigrationService.__init__(self, server, 'Xen') + pass + +class KVM_VirtualSystemMigrationService(CIM_VirtualSystemMigrationService): + pass # classes to define VirtualSystemMigrationSettingData parameters class CIM_VirtualSystemMigrationSettingData(CIMClassMOF): @@ -56,118 +82,242 @@ self.Priority = priority class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - def __init__(self, type, priority): - CIM_VirtualSystemMigrationSettingData.__init__(self, type, - priority) + pass class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): - def __init__(self, type, priority): - CIM_VirtualSystemMigrationSettingData.__init__(self, type, - priority) + pass +def get_msd(virt, mtype='live', mpriority=0): + if mtype == "live": + mtype = CIM_MIGRATE_LIVE + elif mtype == "resume": + mtype = CIM_MIGRATE_RESUME + elif mtype == "restart": + mtype = CIM_MIGRATE_RESTART + elif mtype == "offline": + mtype = CIM_MIGRATE_OFFLINE + else: + logger.error("Invalid migration type '%s' specified", mtype) + return None + try: + vsmsd_cn = get_typed_class(virt, "VirtualSystemMigrationSettingData") + msd = eval(vsmsd_cn)(type=mtype, priority=mpriority) + except Exception, details: + logger.error("In get_msd() Exception details: %s", details) + return None + + return msd.mof() + +def get_guest_ref(guest, virt): + guest_cn = get_typed_class(virt, "ComputerSystem") + keys = { 'Name' : guest, 'CreationClassName' : guest_cn } + cs_ref = None + + try: + cs_ref = CIMInstanceName(guest_cn, keybindings=keys) + + except Exception, details: + logger.error("In fn get_guest_ref() Exception details: %s", details) + return None + + return cs_ref + +#Remove this once vsms.02_host_migrate_type.py uses get_msd() def default_msd_str(mtype=3, mpriority=0): msd = Xen_VirtualSystemMigrationSettingData(type=mtype, priority=mpriority) return msd.mof() -def check_possible_host_migration(service, cs_ref, ip): - rc = None +def check_possible_host_migration(service, cs_ref, ip, msd=None): + res = None try: - rc = service.CheckVirtualSystemIsMigratableToHost(ComputerSystem=cs_ref, - DestinationHost=ip) + checkfn_name = 'service.CheckVirtualSystemIsMigratableToHost' + if msd == None: + res = eval(checkfn_name)(ComputerSystem=cs_ref, DestinationHost=ip) + else: + res = eval(checkfn_name)(ComputerSystem=cs_ref, + DestinationHost=ip, + MigrationSettingData=msd) except Exception, details: - logger.error("Error invoke 'CheckVirtualSystemIsMigratableToHost\'.") + logger.error("Error invoke 'CheckVirtualSystemIsMigratableToHost'.") logger.error("%s", details) return FAIL - if rc == None or rc[1]['IsMigratable'] != True: + if res == None or res[1]['IsMigratable'] != True: + logger.error("Migration check failed") return FAIL return PASS -def migrate_guest_to_host(service, ref, ip, msd=None): + +def migrate_guest_to_host(service, cs_ref, dest_ip, msd=None): ret = [] try: if msd == None: - ret = service.MigrateVirtualSystemToHost(ComputerSystem=ref, - DestinationHost=ip) + ret = service.MigrateVirtualSystemToHost(ComputerSystem=cs_ref, + DestinationHost=dest_ip) else: - ret = service.MigrateVirtualSystemToHost(ComputerSystem=ref, - DestinationHost=ip, + ret = service.MigrateVirtualSystemToHost(ComputerSystem=cs_ref, + DestinationHost=dest_ip, MigrationSettingData=msd) except Exception, details: - logger.error("Error invoke method 'MigrateVirtualSystemToHost\'.") - logger.error("%s", details) + logger.error("Failed to invoke method 'MigrateVirtualSystemToHost'.") + logger.error("Exception in fn migrate_guest_to_host() %s", details) return FAIL, ret if len(ret) == 0: logger.error("MigrateVirtualSystemToHost returns an empty list") return FAIL, ret + return PASS, ret -def get_migration_job_instance(ip, virt, id): +def get_migration_job_instance(src_ip, virt, id): job = [] - key_list = ["instanceid"] - curr_cim_rev, changeset = get_provider_version(virt, ip) + curr_cim_rev, changeset = get_provider_version(virt, src_ip) if curr_cim_rev < libvirt_mig_changes: mig_job_cn = 'Virt_MigrationJob' else: mig_job_cn = get_typed_class(virt, 'MigrationJob') try: - job = enumclass.EnumInstances(ip, mig_job_cn) + job = enumclass.EnumInstances(src_ip, mig_job_cn) + if len(job) < 1: + logger.error("'%s' returned empty list", mig_job_cn) + return FAIL, None + + for i in range(0, len(job)): + if job[i].InstanceID == id: + break + elif i == len(job)-1 and job[i].InstanceID != id: + logger.error("%s err: can't find expected job inst", mig_job_cn) + return FAIL, None except Exception, details: logger.error(CIM_ERROR_ENUMERATE, mig_job_cn) - logger.error(details) + logger.error("Exception in fn get_migration_job_instance() " \ + "details: %s", details) return FAIL, None - if len(job) < 1: - return FAIL, None - - for i in range(0, len(job)): - if job[i].InstanceID == id: - break - elif i == len(job)-1 and job[i].InstanceID != id: - logger.error("%s err: can't find expected job inst", mig_job_cn) - return FAIL, None - return PASS, job[i] -def verify_domain_list(list, local_migrate, test_dom): - status = PASS - if local_migrate == 0 and test_dom not in list: - status = FAIL - if local_migrate == 1 and test_dom in list: +def verify_domain_list(virt, remote_migrate, test_dom, src_ip, target_ip): + status = FAIL + list_src = domain_list(src_ip, virt) + if remote_migrate == 0: + if test_dom in list_src: + status = PASS + elif remote_migrate == 1 : + list_target = domain_list(target_ip, virt) + if test_dom not in list_src and test_dom in list_target: + status = PASS + else: + logger.error("Invalid migration option") + + if status != PASS: + logger.error("Migration verification for '%s' failed", test_dom) + return status + + return status + +def check_migration_job(src_ip, id, target_ip, test_dom, + remote_migrate, virt='Xen', timeout=50): + try: + status, job_inst = get_migration_job_instance(src_ip, virt, id) + if status != PASS: + logger.error("Unable to get mig_job instance for '%s'", test_dom) + return FAIL + status = FAIL - if status != PASS: - logger.error("%s migrate failed", test_dom) + for i in range(0, timeout): + if job_inst.JobState == CIM_JOBSTATE_COMPLETE: + sleep(3) + if job_inst.Status != "Completed": + logger.error("JobStatus for dom '%s' has '%s' instead of "\ + "'Completed'", test_dom, job_inst.Status) + return FAIL + else: + status = verify_domain_list(virt, remote_migrate, test_dom, + src_ip, target_ip) + if status != FAIL: + logger.info("Migration for '%s' succeeded.", test_dom) + logger.info("Migration job status is : %s", + job_inst.Status) + return status + elif job_inst.JobState == CIM_JOBSTATE_RUNNING and i < (timeout-1): + sleep(3) + status, job_inst = get_migration_job_instance(src_ip, virt, id) + if status != PASS: + logger.error("Could not get mig_job instance for '%s'", + test_dom) + return status + else: + logger.error("Migration timed out.... ") + logger.error("Increase timeout > %s and try again..", timeout) + return FAIL + + except Exception, details: + logger.error("In check_migration_job() Exception details: %s", details) + return FAIL + +# Desc: +# Fn Name : local_remote_migrate() +# +# Parameters: +# This fn executes local/remote migration depending on the +# value of remote_migrate. +# Parameters used: +# vsmservice = VSMigrationService Instance +# s_sysname = src host on which migration is initiated +# t_sysname = Target machine for migration +# virt = Xen, KVM +# remote_migrate = 1 [for remote migration, 0 for local] +# mtype = live/resume/offline/restart +# mpriority=0 by default +# guest_name = name of the guest to be migrated +# time_out = time for which migration is tried. +# +def local_remote_migrate(s_sysname, t_sysname, virt='KVM', + remote_migrate=1, mtype='live', mpriority=0, + guest_name=None, time_out=40): + + if guest_name == None: + logger.error("Guest to be migrated not specified.") + return FAIL + + # Get the guest ref + guest_ref = get_guest_ref(guest_name, virt) + if guest_ref == None or guest_ref['Name'] != guest_name: + logger.error("Failed to get the guest refernce to be migrated") + return FAIL + + # Get MigrationSettingData information + msd = get_msd(virt, mtype, mpriority) + if msd == None: return FAIL - return PASS + # Get VirtualSystemMigrationService object + vsms_cn = get_vs_mig_setting_class(virt) + vsmservice = vsms_cn(s_sysname, virt) -def check_migration_job(ip, id, target_ip, test_dom, local_migrate, virt='Xen'): - status, job_inst = get_migration_job_instance(ip, virt, id) + # Verify is destination(t_sysname) can be used for migration + status = check_possible_host_migration(vsmservice, guest_ref, + t_sysname, msd) if status != PASS: return FAIL - for i in range(0, 50): - if job_inst.JobState == 7: - if job_inst.Status != "Completed": - logger.error("%s migrate failed", test_dom) - return FAIL - list_after = domain_list(ip) - status = verify_domain_list(list_after, local_migrate, test_dom) - break - elif job_inst.JobState == 4 and i < 49: - time.sleep(3) - status, job_inst = get_migration_job_instance(ip, virt, id) - if status != PASS: - return FAIL - else: - logger.error("MigrateVirtualSystemToHost took too long") - return FAIL + logger.info("Migrating %s.. this will take some time.", guest_name) + # Migrate the guest to t_sysname + status, ret = migrate_guest_to_host(vsmservice, guest_ref, t_sysname, msd) + if status == FAIL: + logger.error("Failed to Migrate guest '%s' from '%s' to '%s'", + guest_name, s_sysname, t_sysname) + return status + elif len(ret) == 2: + id = ret[1]['Job'].keybindings['InstanceID'] - return PASS + # Verify if migration status + status = check_migration_job(s_sysname, id, t_sysname, guest_name, + remote_migrate, virt, timeout=time_out) + return status From deeptik at linux.vnet.ibm.com Thu Mar 19 11:40:58 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 19 Mar 2009 17:10:58 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Add branch to VSMS/14_define_sys_disk.py to fix Caption settings in DiskRASD In-Reply-To: <9f70dfab7a1e354ec6cf.1237447353@elm3b197.beaverton.ibm.com> References: <9f70dfab7a1e354ec6cf.1237447353@elm3b197.beaverton.ibm.com> Message-ID: <49C22F4A.40701@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1237447329 25200 > # Node ID 9f70dfab7a1e354ec6cfdc14d4f80f1a79cfdb41 > # Parent a06ef66126e2c8636f0b2ae0d978d38192471e9d > [TEST] Add branch to VSMS/14_define_sys_disk.py to fix Caption settings in DiskRASD > > > Tested for Xen, XenFV, KVM with current sources and rpm > Signed-off-by: Guolian Yun > > diff -r a06ef66126e2 -r 9f70dfab7a1e suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Wed Mar 18 06:38:30 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Thu Mar 19 00:22:09 2009 -0700 > @@ -36,11 +36,13 @@ > from XenKvmLib.classes import get_typed_class, inst_to_mof > from XenKvmLib.rasd import get_default_rasds > from XenKvmLib.const import do_main, _image_dir, f9_changeset, \ > - KVM_default_disk_dev, get_provider_version > +Xen_default_disk_dev, XenFV_default_disk_dev, \ > +KVM_default_disk_dev, get_provider_version > from XenKvmLib.vxml import get_class > from XenKvmLib.common_util import parse_instance_id > from XenKvmLib.enumclass import EnumInstances > > +libvirt_cim_dasd_caption = 707 > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > test_dom = 'rstest_disk_domain' > > @@ -66,9 +68,12 @@ > > for rasd in rasds: > if rasd.classname == drasd_cn: > - if disk_type != "" and rasd['Caption'] != disk_type: > + curr_cim_rev, changeset = get_provider_version(virt, ip) > + if disk_type != "" and rasd['Caption'] != disk_type and \ > + curr_cim_rev >= libvirt_cim_dasd_caption: > continue > rasd['Address'] = addr > + rasd['VirtualDevice'] = virt + '_default_disk_dev' > The virtual device should have the value of either hda, xvda and not KVM_default_disk_dev or Xen_default_disk_dev. This test case passes since you only try to define the guest. We cannot start the guest with KVM_default_disk_dev or Xen_default_disk_dev information in rasd['VirtualDevice'], so it certainly wrong to have it. You can verify with the following XML which is the output of the cimserver debug: rstest_disk_domain destroy destroy 45c60611-e962-4803-9394-60a6fd4e7ada hvm 262144 262144 1 ** You will not be able to start the guest, the following error will be seen: virsh start rstest_disk_domain libvir: QEMU error : internal error unsupported disk type 'KVM_default_disk_dev' error: Failed to start domain rstest_disk_domain > curr_cim_rev, changeset = get_provider_version(virt, ip) > if changeset == f9_changeset and virt == 'KVM': > rasd['VirtualDevice'] = KVM_default_disk_dev > Also, can you get the above rasd['VirtualDevice'] before the if condition here, so that we dont have to initialise it twice in case of F9 revision is matched. > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Mar 19 11:44:49 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 19 Mar 2009 17:14:49 +0530 Subject: [Libvirt-cim] [PATCH] Fix key generation In-Reply-To: <5f95e05cced6279241c9.1237399660@localhost.localdomain> References: <5f95e05cced6279241c9.1237399660@localhost.localdomain> Message-ID: <49C23031.7000805@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237399611 25200 > # Node ID 5f95e05cced6279241c9200333bc4d41f83c83d8 > # Parent daccd46e12ccf2afce3295a41510d7e94ff48d7b > Fix key generation > > Instead of setting up the ssh keys prior to each test run, the keys need to be > setup before main.py is called. This fixes the issue where cimtest would > complain if an id_rsa key wasn't already available. > > Now, if the key isn't available, it generates one. Otherwise, it uses the > available key. > > Signed-off-by: Kaitlin Rupert > > diff -r daccd46e12cc -r 5f95e05cced6 runtests > --- a/runtests Fri Mar 13 10:31:02 2009 -0700 > +++ b/runtests Wed Mar 18 11:06:51 2009 -0700 > @@ -22,6 +22,8 @@ > > import sys > import os > +sys.path.append('./lib') > +from VirtLib.utils import setup_ssh_key > > SUITES_DIR = 'suites' > MAIN_FILE = 'main.py' > @@ -53,6 +55,8 @@ > print "\t%s" % ", ".join(available_suites()) > return 1 > > + setup_ssh_key() > + > suite = sys.argv[1] > print "Starting test suite: %s" % suite > > diff -r daccd46e12cc -r 5f95e05cced6 suites/libvirt-cim/lib/XenKvmLib/const.py > --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Mar 13 10:31:02 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Mar 18 11:06:51 2009 -0700 > @@ -134,9 +134,9 @@ > try: > from CimTest.Globals import logger, log_param > log_param() > - from VirtLib.utils import setup_ssh_key > + #from VirtLib.utils import setup_ssh_key > Can you remove the commented lines here. > from XenKvmLib.test_doms import destroy_and_undefine_all > - setup_ssh_key() > + #setup_ssh_key() > same here. > destroy_and_undefine_all(options.ip, options.virt) > rc = f() > except Exception, e: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Mar 19 20:48:34 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 19 Mar 2009 13:48:34 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix key generation Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1237495701 25200 # Node ID ddf78929ebf1b58e5c48a58d7678c47d8f7c913b # Parent 5bafbcfb09fd3fb9c4cf532488c92d9ddefc663c [TEST] #2 Fix key generation Updates: -Remove commented out lines of code. Instead of setting up the ssh keys prior to each test run, the keys need to be setup before main.py is called. This fixes the issue where cimtest would complain if an id_rsa key wasn't already available. Now, if the key isn't available, it generates one. Otherwise, it uses the available key. Signed-off-by: Kaitlin Rupert diff -r 5bafbcfb09fd -r ddf78929ebf1 runtests --- a/runtests Wed Mar 18 06:41:56 2009 -0700 +++ b/runtests Thu Mar 19 13:48:21 2009 -0700 @@ -22,6 +22,8 @@ import sys import os +sys.path.append('./lib') +from VirtLib.utils import setup_ssh_key SUITES_DIR = 'suites' MAIN_FILE = 'main.py' @@ -53,6 +55,8 @@ print "\t%s" % ", ".join(available_suites()) return 1 + setup_ssh_key() + suite = sys.argv[1] print "Starting test suite: %s" % suite diff -r 5bafbcfb09fd -r ddf78929ebf1 suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Mar 18 06:41:56 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Mar 19 13:48:21 2009 -0700 @@ -138,9 +138,7 @@ try: from CimTest.Globals import logger, log_param log_param() - from VirtLib.utils import setup_ssh_key from XenKvmLib.test_doms import destroy_and_undefine_all - setup_ssh_key() destroy_and_undefine_all(options.ip, options.virt) rc = f() except Exception, e: From kaitlin at linux.vnet.ibm.com Sun Mar 22 21:50:03 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 22 Mar 2009 14:50:03 -0700 Subject: [Libvirt-cim] [PATCH] Expose guest's emulator via the VSSD Emulator attribute Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1237758585 25200 # Node ID bf9fd956eeb00928a7f7e6a8bb3a0de11ef9fde6 # Parent 1aff0d0e9bf49e738827b7157c0df407b814ae7d Expose guest's emulator via the VSSD Emulator attribute If the guest has an emulator, set the Emulator attribute appropriately. Signed-off-by: Kaitlin Rupert diff -r 1aff0d0e9bf4 -r bf9fd956eeb0 src/Virt_VSSD.c --- a/src/Virt_VSSD.c Wed Mar 04 15:25:33 2009 -0800 +++ b/src/Virt_VSSD.c Sun Mar 22 14:49:45 2009 -0700 @@ -135,6 +135,14 @@ (CMPIValue *)&clock, CMPI_uint16); } + if (dominfo->dev_emu != NULL) { + CMSetProperty(inst, + "Emulator", + (CMPIValue *)dominfo->dev_emu->dev.emu.path, + CMPI_chars); + } + + if ((dominfo->type == DOMAIN_XENFV) || (dominfo->type == DOMAIN_KVM)) _set_fv_prop(dominfo, inst); From yunguol at cn.ibm.com Mon Mar 23 03:07:33 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 23 Mar 2009 11:07:33 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 23 2009): KVM on Fedora release 10 (Cambridge) with sfcb Message-ID: ================================================= Test Run Summary (Mar 23 2009): KVM on Fedora release 10 (Cambridge) with sfcb ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.4preview Libvirt-cim revision: 830 Libvirt-cim changeset: 6195f98ebe5e Cimtest revision: 655 Cimtest changeset: 5bafbcfb09fd ================================================= FAIL : 1 XFAIL : 4 SKIP : 5 PASS : 138 ----------------- Total : 148 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.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 ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP VirtualSystemMigrationService - 06_remote_live_migration.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 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): 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 State not supported with return code 7 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: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: FAIL ERROR - Exception : Request Failed: 200 Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 145, in do_try File "01_created_indication.py", line 146, in main sub_list, ind_names, dict = sub_ind(ip, virt) File "01_created_indication.py", line 60, in sub_ind sub.subscribe(dict['default_url'], dict['default_auth']) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py", line 345, in subscribe "CreateInstance", auth_hdr) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py", line 330, in __do_cimpost (resp.status, resp.reason)) Exception: Request Failed: 200 ERROR - None -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: 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 No such instance (no device domain/mouse:ps2) Bug:<00014> -------------------------------------------------------------------- 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Mar 23 05:39:22 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 22 Mar 2009 22:39:22 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add branch to VSMS/14_define_sys_disk.py to fix Caption settings in DiskRASD Message-ID: <57f08f1c7a1a8b7c9068.1237786762@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1237786756 25200 # Node ID 57f08f1c7a1a8b7c9068e1bf0e76368bb92ead26 # Parent 5bafbcfb09fd3fb9c4cf532488c92d9ddefc663c [TEST] #2 Add branch to VSMS/14_define_sys_disk.py to fix Caption settings in DiskRASD Updates from 1 to 2: Set rasd['VirtualDevice'] value by xvda or hda instead of KVM_default_disk_dev or Xen_default_disk_dev Tested for Xen, XenFV, KVM with current sources and rpm Signed-off-by: Guolian Yun diff -r 5bafbcfb09fd -r 57f08f1c7a1a suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Wed Mar 18 06:41:56 2009 -0700 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/14_define_sys_disk.py Sun Mar 22 22:39:16 2009 -0700 @@ -35,14 +35,14 @@ from CimTest.ReturnCodes import FAIL, PASS from XenKvmLib.classes import get_typed_class, inst_to_mof from XenKvmLib.rasd import get_default_rasds -from XenKvmLib.const import do_main, _image_dir, f9_changeset, \ - KVM_default_disk_dev, get_provider_version +from XenKvmLib.const import do_main, _image_dir, get_provider_version from XenKvmLib.vxml import get_class from XenKvmLib.common_util import parse_instance_id from XenKvmLib.enumclass import EnumInstances sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] test_dom = 'rstest_disk_domain' +libvirt_cim_dasd_caption = 707 def make_long_disk_path(ip): path = os.path.join(_image_dir, 'cimtest_large_image') @@ -64,14 +64,19 @@ rasd_list = {} + if virt == 'Xen': + test_disk = 'xvda' + else: + test_disk = 'hda' + for rasd in rasds: if rasd.classname == drasd_cn: - if disk_type != "" and rasd['Caption'] != disk_type: + curr_cim_rev, changeset = get_provider_version(virt, ip) + if disk_type != "" and rasd['Caption'] != disk_type and \ + curr_cim_rev >= libvirt_cim_dasd_caption: continue rasd['Address'] = addr - curr_cim_rev, changeset = get_provider_version(virt, ip) - if changeset == f9_changeset and virt == 'KVM': - rasd['VirtualDevice'] = KVM_default_disk_dev + rasd['VirtualDevice'] = test_disk rasd_list[rasd.classname] = inst_to_mof(rasd) return rasd_list From deeptik at linux.vnet.ibm.com Mon Mar 23 06:23:17 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 23 Mar 2009 11:53:17 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add branch to VSMS/14_define_sys_disk.py to fix Caption settings in DiskRASD In-Reply-To: <57f08f1c7a1a8b7c9068.1237786762@elm3b197.beaverton.ibm.com> References: <57f08f1c7a1a8b7c9068.1237786762@elm3b197.beaverton.ibm.com> Message-ID: <49C72AD5.3050309@linux.vnet.ibm.com> +1. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Mar 23 14:40:33 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 07:40:33 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] Add RASDs to use when defining Network Pools In-Reply-To: References: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID f288f7d8f63cbc710f0c4c207771fdf3bb6985bb # Parent a0858ba3fe8dcd82c695e1c28938bab3210da705 Add RASDs to use when defining Network Pools Signed-off-by: Kaitlin Rupert diff -r a0858ba3fe8d -r f288f7d8f63c schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Tue Mar 17 18:13:23 2009 -0700 +++ b/schema/ResourceAllocationSettingData.mof Tue Mar 17 18:13:23 2009 -0700 @@ -163,3 +163,35 @@ string BusType; }; +[Description ("Xen virtual pool settings"), + Provider("cmpi::Virt_RASD") +] +class Xen_NetPoolResourceAllocationSettingData : Xen_ResourceAllocationSettingData +{ + string Netmask; + string IPRangeStart; + string IPRangeEnd; + string ForwardMode; +}; + +[Description ("KVM virtual pool settings"), + Provider("cmpi::Virt_RASD") +] +class KVM_NetPoolResourceAllocationSettingData : KVM_ResourceAllocationSettingData +{ + string Netmask; + string IPRangeStart; + string IPRangeEnd; + string ForwardMode; +}; + +[Description ("LXC virtual pool settings"), + Provider("cmpi::Virt_RASD") +] +class LXC_NetPoolResourceAllocationSettingData : LXC_ResourceAllocationSettingData +{ + string Netmask; + string IPRangeStart; + string IPRangeEnd; + string ForwardMode; +}; diff -r a0858ba3fe8d -r f288f7d8f63c src/Makefile.am --- a/src/Makefile.am Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Makefile.am Tue Mar 17 18:13:23 2009 -0700 @@ -157,11 +157,13 @@ libVirt_RASD_la_SOURCES = Virt_RASD.c libVirt_RASD_la_LIBADD = -lVirt_Device -libVirt_ResourcePoolConfigurationService_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_ResourcePoolConfigurationService_la_DEPENDENCIES = libVirt_HostSystem.la libVirt_DevicePool.la libVirt_RASD.la libVirt_ResourcePoolConfigurationService_la_SOURCES = Virt_ResourcePoolConfigurationService.c libVirt_ResourcePoolConfigurationService_la_LIBADD = -lVirt_HostSystem -libVirt_ResourcePoolConfigurationCapabilities_la_SOURCES = Virt_ResourcePoolConfigurationCapabilities.c +libVirt_ResourcePoolConfigurationService_la_LIBADD = -lVirt_HostSystem \ + -lVirt_DevicePool \ + -lVirt_RASD libVirt_VSSDComponent_la_DEPENDENCIES = libVirt_VSSD.la libVirt_RASD.la libVirt_VSSDComponent_la_SOURCES = Virt_VSSDComponent.c diff -r a0858ba3fe8d -r f288f7d8f63c src/Virt_RASD.c --- a/src/Virt_RASD.c Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Virt_RASD.c Tue Mar 17 18:13:23 2009 -0700 @@ -526,7 +526,8 @@ if (STREQ(base, "DiskResourceAllocationSettingData")) *type = CIM_RES_TYPE_DISK; - else if (STREQ(base, "NetResourceAllocationSettingData")) + else if ((STREQ(base, "NetResourceAllocationSettingData")) || + (STREQ(base, "NetPoolResourceAllocationSettingData"))) *type = CIM_RES_TYPE_NET; else if (STREQ(base, "ProcResourceAllocationSettingData")) *type = CIM_RES_TYPE_PROC; From kaitlin at linux.vnet.ibm.com Mon Mar 23 14:40:32 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 07:40:32 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] Add logic to generate a pool XML to xmlgen.c In-Reply-To: References: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID a0858ba3fe8dcd82c695e1c28938bab3210da705 # Parent 177ae29d2ae5c1f9fe37e8cffb000bfeb2dc28af Add logic to generate a pool XML to xmlgen.c Signed-off-by: Kaitlin Rupert diff -r 177ae29d2ae5 -r a0858ba3fe8d libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Tue Mar 17 18:13:23 2009 -0700 +++ b/libxkutil/xmlgen.c Tue Mar 17 18:13:23 2009 -0700 @@ -38,6 +38,7 @@ #define XML_ERROR "Failed to allocate XML memory" typedef const char *(*devfn_t)(xmlNodePtr node, struct domain *dominfo); +typedef const char *(*poolfn_t)(xmlNodePtr node, struct virt_pool *pool); static char *disk_block_xml(xmlNodePtr root, struct disk_device *dev) { @@ -770,6 +771,117 @@ return xml; } +static const char *net_pool_xml(xmlNodePtr root, + struct virt_pool *_pool) +{ + xmlNodePtr net = NULL; + xmlNodePtr ip = NULL; + xmlNodePtr forward = NULL; + xmlNodePtr dhcp = NULL; + xmlNodePtr range = NULL; + const char *msg = NULL; + struct net_pool *pool = &_pool->pool_info.net; + + net = xmlNewChild(root, NULL, BAD_CAST "network", NULL); + if (net == NULL) + goto out; + + if (xmlNewChild(net, NULL, BAD_CAST "name", BAD_CAST _pool->id) == NULL) + goto out; + + if (xmlNewChild(net, NULL, BAD_CAST "bridge", NULL) == NULL) + goto out; + + if (xmlNewProp(net, BAD_CAST "name", BAD_CAST _pool->id) == NULL) + goto out; + + if (pool->forward_mode != NULL) { + forward = xmlNewChild(net, NULL, BAD_CAST "forward", NULL); + if (forward == NULL) + goto out; + + if (xmlNewProp(forward, + BAD_CAST "mode", + BAD_CAST pool->forward_mode) == NULL) + goto out; + + if (pool->forward_dev != NULL) { + if (xmlNewProp(forward, + BAD_CAST "dev", + BAD_CAST pool->forward_dev) == NULL) + goto out; + } + } + + ip = xmlNewChild(net, NULL, BAD_CAST "ip", NULL); + if (ip == NULL) + goto out; + + if (xmlNewProp(ip, BAD_CAST "address", BAD_CAST pool->addr) == NULL) + goto out; + + if (xmlNewProp(ip, BAD_CAST "netmask", BAD_CAST pool->netmask) == NULL) + goto out; + + if ((pool->ip_start != NULL) && (pool->ip_end != NULL)) { + dhcp = xmlNewChild(ip, NULL, BAD_CAST "dhcp", NULL); + if (dhcp == NULL) + goto out; + + range = xmlNewChild(dhcp, NULL, BAD_CAST "range", NULL); + if (range == NULL) + goto out; + + if (xmlNewProp(range, + BAD_CAST "start", + BAD_CAST pool->ip_start) == NULL) + goto out; + + if (xmlNewProp(range, + BAD_CAST "end", + BAD_CAST pool->ip_end) == NULL) + goto out; + } + + out: + return msg; +} + +char *pool_to_xml(struct virt_pool *pool) { + char *xml = NULL; + xmlNodePtr root = NULL; + int type = pool->type; + const char *msg; + poolfn_t func; + + root = xmlNewNode(NULL, BAD_CAST "tmp"); + if (root == NULL) + goto out; + + switch (type) { + case CIM_RES_TYPE_NET: + func = net_pool_xml; + break; + default: + CU_DEBUG("pool_to_xml: invalid type specified: %d", type); + goto out; + } + + msg = func(root, pool); + if (msg != NULL) { + CU_DEBUG("Failed to create pool XML: %s", msg); + goto out; + } + + xml = tree_to_xml(root->children); + out: + CU_DEBUG("Created Device XML:\n%s\n", xml); + + xmlFreeNode(root); + + return xml; +} + /* * Local Variables: * mode: C diff -r 177ae29d2ae5 -r a0858ba3fe8d libxkutil/xmlgen.h --- a/libxkutil/xmlgen.h Tue Mar 17 18:13:23 2009 -0700 +++ b/libxkutil/xmlgen.h Tue Mar 17 18:13:23 2009 -0700 @@ -22,6 +22,7 @@ #define __XMLGEN_H #include "device_parsing.h" +#include "pool_parsing.h" #include "cmpidt.h" @@ -33,4 +34,6 @@ char *system_to_xml(struct domain *dominfo); char *device_to_xml(struct virt_device *dev); +char *pool_to_xml(struct virt_pool *pool); + #endif From kaitlin at linux.vnet.ibm.com Mon Mar 23 14:40:34 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 07:40:34 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] Add suport for CreateChildResourcePool In-Reply-To: References: Message-ID: <434041f12428edfba011.1237819234@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID 434041f12428edfba01127b483ba56b3328e1d79 # Parent f288f7d8f63cbc710f0c4c207771fdf3bb6985bb Add suport for CreateChildResourcePool. Right now this creates a standalone pool. Modifications need to be made so there is a parent primordial pool, and all created network pools should be concrete pools that are child pools of the primordial pool. Signed-off-by: Kaitlin Rupert diff -r f288f7d8f63c -r 434041f12428 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.c Tue Mar 17 18:13:23 2009 -0700 @@ -3,6 +3,7 @@ * * Authors: * Dan Smith + * Kaitlin Rupert * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,12 +28,299 @@ #include #include "misc_util.h" +#include "xmlgen.h" +#include "svpc_types.h" #include "Virt_HostSystem.h" #include "Virt_ResourcePoolConfigurationService.h" +#include "Virt_DevicePool.h" +#include "Virt_RASD.h" const static CMPIBroker *_BROKER; +const char *DEF_POOL_NAME = "libvirt-cim-pool"; + +static CMPIStatus create_child_pool_parse_args(const CMPIArgs *argsin, + const char **name, + CMPIArray **set, + CMPIArray **parent_arr) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (cu_get_str_arg(argsin, "ElementName", name) != CMPI_RC_OK) { + CU_DEBUG("No ElementName string argument"); + *name = strdup(DEF_POOL_NAME); + } + + if (cu_get_array_arg(argsin, "Settings", set) != CMPI_RC_OK) { + CU_DEBUG("Failed to get Settings array arg"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_INVALID_PARAMETER, + "Missing argument `Settings'"); + goto out; + } + + if (cu_get_array_arg(argsin, "ParentPool", parent_arr) != CMPI_RC_OK) + CU_DEBUG("No parent pool specified during pool creation"); + + out: + return s; +} + +static const char *net_rasd_to_pool(CMPIInstance *inst, + struct virt_pool *pool, + const char *ns) +{ + const char *val = NULL; + const char *msg = NULL; + + /*FIXME: Need to add validation of addresses if user specified */ + + if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) + val = strdup("192.168.122.1"); + + free(pool->pool_info.net.addr); + pool->pool_info.net.addr = strdup(val); + + if (cu_get_str_prop(inst, "Netmask", &val) != CMPI_RC_OK) + val = strdup("255.255.255.0"); + + free(pool->pool_info.net.netmask); + pool->pool_info.net.netmask = strdup(val); + + if (cu_get_str_prop(inst, "IPRangeStart", &val) != CMPI_RC_OK) + val = strdup("192.168.122.2"); + + free(pool->pool_info.net.ip_start); + pool->pool_info.net.ip_start = strdup(val); + + if (cu_get_str_prop(inst, "IPRangeStart", &val) != CMPI_RC_OK) + val = strdup("192.168.122.254"); + + free(pool->pool_info.net.ip_end); + pool->pool_info.net.ip_end = strdup(val); + + return msg; + +} + +static const char *rasd_to_vpool(CMPIInstance *inst, + struct virt_pool *pool, + uint16_t type, + const char *ns) +{ + pool->type = type; + + if (type == CIM_RES_TYPE_NET) { + return net_rasd_to_pool(inst, pool, ns); + } + + pool->type = CIM_RES_TYPE_UNKNOWN; + + return "Resource type not supported on this platform"; +} + +static const char *get_pool_properties(CMPIArray *settings, + struct virt_pool *pool) +{ + CMPIObjectPath *op; + CMPIData item; + CMPIInstance *inst; + const char *msg = NULL; + uint16_t type; + int count; + + count = CMGetArrayCount(settings, NULL); + if (count < 1) + return "No resources specified"; + + if (count > 1) + CU_DEBUG("More than one RASD specified during pool creation"); + + item = CMGetArrayElementAt(settings, 0, NULL); + if (CMIsNullObject(item.value.inst)) + return "Internal array error"; + + inst = item.value.inst; + + op = CMGetObjectPath(inst, NULL); + if (op == NULL) + return "Unknown resource instance type"; + + if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) + return "Unable to determine resource type"; + + if (type != CIM_RES_TYPE_NET) + return "Only network pools currently supported"; + + msg = rasd_to_vpool(inst, pool, type, NAMESPACE(op)); + + return msg; +} + +static char *get_pool_id(int res_type, + const char *name) +{ + char *id = NULL; + const char *pool = NULL; + + if (res_type == CIM_RES_TYPE_NET) + pool = "NetworkPool"; + else if (res_type == CIM_RES_TYPE_DISK) + pool = "DiskPool"; + else if (res_type == CIM_RES_TYPE_MEM) + pool = "MemoryPool"; + else if (res_type == CIM_RES_TYPE_PROC) + pool = "ProcessorPool"; + else if (res_type == CIM_RES_TYPE_GRAPHICS) + pool = "GraphicsPool"; + else if (res_type == CIM_RES_TYPE_INPUT) + pool = "InputPool"; + else + pool = "Unknown"; + + if (asprintf(&id, "%s/%s", pool, name) == -1) { + return NULL; + } + + return id; +} + +static CMPIInstance *connect_and_create(char *xml, + const CMPIObjectPath *ref, + const char *id, + int res_type, + CMPIStatus *s) +{ + virConnectPtr conn; + CMPIInstance *inst = NULL; + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); + if (conn == NULL) { + CU_DEBUG("libvirt connection failed"); + return NULL; + } + + if (define_pool(conn, xml, res_type) == 0) { + virt_set_status(_BROKER, s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to create resource pool"); + goto out; + } + + *s = get_pool_by_name(_BROKER, ref, id, &inst); + if (s->rc != CMPI_RC_OK) { + CU_DEBUG("Failed to get new pool instance: %s", id); + cu_statusf(_BROKER, s, + CMPI_RC_ERR_FAILED, + "Failed to lookup resulting pool"); + } + + out: + virConnectClose(conn); + + return inst; +} + +static CMPIStatus create_child_pool(CMPIMethodMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + uint32_t rc = CIM_SVPC_RETURN_FAILED; + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst = NULL; + CMPIArray *set; + CMPIArray *parent_pools; + CMPIObjectPath *result; + struct virt_pool *pool = NULL; + const char *name = NULL; + const char *msg = NULL; + char *full_id = NULL; + char *xml = NULL; + + CU_DEBUG("CreateResourcePool"); + + s = create_child_pool_parse_args(argsin, &name, &set, &parent_pools); + if (s.rc != CMPI_RC_OK) + goto out; + + pool = calloc(1, sizeof(*pool)); + if (pool == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to allocate pool struct"); + goto out; + } + + msg = get_pool_properties(set, pool); + if (msg != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Settings Error: %s", msg); + + goto out; + } + + full_id = get_pool_id(pool->type, name); + if (full_id == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to format resulting pool ID"); + goto out; + } + + s = get_pool_by_name(_BROKER, reference, full_id, &inst); + if (s.rc == CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Pool with that name already exists"); + goto out; + } + + pool->id = strdup(name); + + xml = pool_to_xml(pool); + if (xml == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to generate XML for resource pool"); + goto out; + } + + CU_DEBUG("Pool XML:\n%s", xml); + + inst = connect_and_create(xml, reference, full_id, pool->type, &s); + if (inst == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to create resource pool"); + goto out; + } + + result = CMGetObjectPath(inst, &s); + if ((result != NULL) && (s.rc == CMPI_RC_OK)) { + CMSetNameSpace(result, NAMESPACE(reference)); + CMAddArg(argsout, "Pool", &result, CMPI_ref); + } + + /* FIXME: Trigger indication here */ + + cu_statusf(_BROKER, &s, CMPI_RC_OK, ""); + out: + free(xml); + free(full_id); + + if (s.rc == CMPI_RC_OK) + rc = CIM_SVPC_RETURN_COMPLETED; + CMReturnData(results, &rc, CMPI_uint32); + + return s; +} + static CMPIStatus dummy_handler(CMPIMethodMI *self, const CMPIContext *context, const CMPIResult *results, @@ -51,8 +339,12 @@ static struct method_handler CreateChildResourcePool = { .name = "CreateChildResourcePool", - .handler = dummy_handler, - .args = { ARG_END }, + .handler = create_child_pool, + .args = {{"ElementName", CMPI_string, true}, + {"Settings", CMPI_instanceA, false}, + {"ParentPool", CMPI_refA, true}, + ARG_END + } }; static struct method_handler AddResourcesToResourcePool = { From kaitlin at linux.vnet.ibm.com Mon Mar 23 14:40:31 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 07:40:31 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] Add basic support for creating network pools In-Reply-To: References: Message-ID: <177ae29d2ae5c1f9fe37.1237819231@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID 177ae29d2ae5c1f9fe37e8cffb000bfeb2dc28af # Parent e810ca0c3e585a0b58b1da2e280fb69232a20be1 Add basic support for creating network pools. Signed-off-by: Kaitlin Rupert diff -r e810ca0c3e58 -r 177ae29d2ae5 libxkutil/Makefile.am --- a/libxkutil/Makefile.am Fri Mar 20 16:26:02 2009 -0700 +++ b/libxkutil/Makefile.am Tue Mar 17 18:13:23 2009 -0700 @@ -4,14 +4,15 @@ CFLAGS += $(CFLAGS_STRICT) -noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h +noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ + pool_parsing.h lib_LTLIBRARIES = libxkutil.la AM_LDFLAGS = -lvirt -luuid libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ - xmlgen.c infostore.c + xmlgen.c infostore.c pool_parsing.c noinst_PROGRAMS = xml_parse_test diff -r e810ca0c3e58 -r 177ae29d2ae5 libxkutil/pool_parsing.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libxkutil/pool_parsing.c Tue Mar 17 18:13:23 2009 -0700 @@ -0,0 +1,70 @@ +/* + * Copyright IBM Corp. 2009 + * + * Authors: + * Kaitlin Rupert + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "pool_parsing.h" +#include "../src/svpc_types.h" + +int define_pool(virConnectPtr conn, const char *xml, int res_type) +{ + int ret = 1; + + if (res_type == CIM_RES_TYPE_NET) { + virNetworkPtr ptr = virNetworkDefineXML(conn, xml); + if (ptr == NULL) { + CU_DEBUG("Unable to define virtual network"); + return 0; + } + + if (virNetworkCreate(ptr) != 0) { + CU_DEBUG("Unable to start virtual network"); + ret = 0; + + if (virNetworkUndefine(ptr) != 0) + CU_DEBUG("Unable to undefine virtual network"); + } + + virNetworkFree(ptr); + } + + return ret; +} + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ + diff -r e810ca0c3e58 -r 177ae29d2ae5 libxkutil/pool_parsing.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libxkutil/pool_parsing.h Tue Mar 17 18:13:23 2009 -0700 @@ -0,0 +1,60 @@ +/* + * Copyright IBM Corp. 2009 + * + * Authors: + * Kaitlin Rupert + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#ifndef __RES_POOLS_H_ +#define __RES_POOLS_H + +#include +#include +#include + +#include "../src/svpc_types.h" + +struct net_pool { + char *addr; + char *netmask; + char *ip_start; + char *ip_end; + char *forward_mode; + char *forward_dev; +}; + +struct virt_pool { + uint16_t type; + union { + struct net_pool net; + } pool_info; + char *id; +}; + +int define_pool(virConnectPtr conn, const char *xml, int res_type); + + +#endif + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ From kaitlin at linux.vnet.ibm.com Mon Mar 23 14:40:30 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 07:40:30 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] Add support for network pool creation Message-ID: This just adds basic support for network pool creation. From kaitlin at linux.vnet.ibm.com Mon Mar 23 14:41:17 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 07:41:17 -0700 Subject: [Libvirt-cim] [PATCH] Setting SynchMethods of RPCC accordingly Message-ID: <727ee79a93e91a79b013.1237819277@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237328307 25200 # Node ID 727ee79a93e91a79b01335733853fb2f9d0c4624 # Parent 434041f12428edfba01127b483ba56b3328e1d79 Setting SynchMethods of RPCC accordingly. Signed-off-by: Kaitlin Rupert diff -r 434041f12428 -r 727ee79a93e9 src/Virt_ResourcePoolConfigurationCapabilities.c --- a/src/Virt_ResourcePoolConfigurationCapabilities.c Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Virt_ResourcePoolConfigurationCapabilities.c Tue Mar 17 15:18:27 2009 -0700 @@ -54,6 +54,8 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *inst = NULL; virConnectPtr conn = NULL; + CMPIArray *array; + uint32_t val; conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); if (conn == NULL) { @@ -76,7 +78,18 @@ CMSetProperty(inst, "InstanceID", (CMPIValue *)"RPCC", CMPI_chars); - /* No method currently supported */ + array = CMNewArray(_BROKER, 2, CMPI_uint32, &s); + if (s.rc != CMPI_RC_OK) + return s; + + val = CreateChildResourcePool; + CMSetArrayElementAt(array, 0, (CMPIValue *)&val, CMPI_uint32); + + val = DeleteResourcePool; + CMSetArrayElementAt(array, 1, (CMPIValue *)&val, CMPI_uint32); + + CMSetProperty(inst, "SynchronousMethodsSupported", + (CMPIValue *)&array, CMPI_uint32A); if (is_get_inst) { s = cu_validate_ref(_BROKER, reference, inst); From rmaciel at linux.vnet.ibm.com Mon Mar 23 16:07:45 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Mon, 23 Mar 2009 13:07:45 -0300 Subject: [Libvirt-cim] [PATCH] Improve random MAC generator In-Reply-To: <69b7af00d9da92ce169d.1237266360@localhost.localdomain> References: <69b7af00d9da92ce169d.1237266360@localhost.localdomain> Message-ID: <49C7B3D1.9020202@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237266354 25200 > # Node ID 69b7af00d9da92ce169d915bb6b17c493fe0b021 > # Parent 160e1a86d82e8ed930e3006098f2af8b230c9834 > Improve random MAC generator > > Use microseconds since the epoch instead of seconds. When defining a guest > with multiple net devices specified (in which none of them have a MAC supplied), > it's possible for _net_rand_mac() to be called in rapid succession. > > Also, initialize s - the seed value passed to rand_r(). > > Signed-off-by: Kaitlin Rupert > > diff -r 160e1a86d82e -r 69b7af00d9da src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Mon Mar 16 13:55:02 2009 -0700 > +++ b/src/Virt_VirtualSystemManagementService.c Mon Mar 16 22:05:54 2009 -0700 > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > #include > > #include "cmpidt.h" > @@ -383,8 +384,14 @@ > const char *_mac = NULL; > CMPIString *str = NULL; > CMPIStatus status; > + struct timeval curr_time; > > - srand(time(NULL)); > + ret = gettimeofday(&curr_time, NULL); > + if (ret != 0) > + goto out; > + > + srand(curr_time.tv_usec); > + s = curr_time.tv_usec; > r = rand_r(&s); > > ret = asprintf(&mac, > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Mon Mar 23 16:39:23 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Mon, 23 Mar 2009 13:39:23 -0300 Subject: [Libvirt-cim] [PATCH] Advertise the profiles using SLP In-Reply-To: References: Message-ID: <49C7BB3B.6050302@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237409963 25200 > # Node ID bdf655b33c77fe916c954f205404f3a8c138a23d > # Parent b40ee621a3ae88009025aa85049fb147c9c773d6 > Advertise the profiles using SLP > > Signed-off-by: Kaitlin Rupert > > diff -r b40ee621a3ae -r bdf655b33c77 src/Virt_RegisteredProfile.c > --- a/src/Virt_RegisteredProfile.c Wed Mar 18 11:47:37 2009 -0700 > +++ b/src/Virt_RegisteredProfile.c Wed Mar 18 13:59:23 2009 -0700 > @@ -49,6 +49,7 @@ > { > CMPIStatus s = {CMPI_RC_OK, NULL}; > CMPIInstance *instance = NULL; > + CMPIArray *array; > > instance = get_typed_instance(broker, > pfx, > @@ -79,6 +80,19 @@ > CMSetProperty(instance, "RegisteredVersion", > (CMPIValue *)profile->reg_version, CMPI_chars); > > + array = CMNewArray(broker, 1, CMPI_uint16, &s); > + if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(array))) { > + cu_statusf(broker, &s, > + CMPI_RC_ERR_FAILED, > + "Unable to create CMPIArray object"); > + goto out; > + } > + > + CMSetArrayElementAt(array, 0, &profile->ad_types, CMPI_uint16); > + > + CMSetProperty(instance, "AdvertiseTypes", > + (CMPIValue *)&array, CMPI_uint16A); > + > *_inst = instance; > > out: > diff -r b40ee621a3ae -r bdf655b33c77 src/profiles.h > --- a/src/profiles.h Wed Mar 18 11:47:37 2009 -0700 > +++ b/src/profiles.h Wed Mar 18 13:59:23 2009 -0700 > @@ -41,6 +41,7 @@ > .reg_id = "CIM:DSP1057-VirtualSystem-1.0.0a", > .reg_name = "Virtual System Profile", > .reg_version = "1.0.0a", > + .ad_types = 3, > .scoping_class = "ComputerSystem", > .scoping_profile = NULL > }; > @@ -50,6 +51,7 @@ > .reg_id = "CIM:DSP1042-SystemVirtualization-1.0.0", > .reg_name = "System Virtualization", > .reg_version = "1.0.0", > + .ad_types = 3, > .scoping_class = "HostSystem", > .scoping_profile = &VirtualSystem > }; > @@ -59,6 +61,7 @@ > .reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_d", > .reg_name = "Generic Device Resource Virtualization", > .reg_version = "1.0.0", > + .ad_types = 3, > .central_class = "DiskPool", > .scoping_class = NULL, > .scoping_profile = &SystemVirtualization > @@ -69,6 +72,7 @@ > .reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_n", > .reg_name = "Generic Device Resource Virtualization", > .reg_version = "1.0.0", > + .ad_types = 3, > .central_class = "NetworkPool", > .scoping_class = NULL, > .scoping_profile = &SystemVirtualization > @@ -79,6 +83,7 @@ > .reg_id = "CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_p", > .reg_name = "Generic Device Resource Virtualization", > .reg_version = "1.0.0", > + .ad_types = 3, > .central_class = "ProcessorPool", > .scoping_class = NULL, > .scoping_profile = &SystemVirtualization > @@ -89,6 +94,7 @@ > .reg_id = "CIM:DSP1045-MemoryResourceVirtualization-1.0.0", > .reg_name = "Memory Resource Virtualization", > .reg_version = "1.0.0", > + .ad_types = 3, > .scoping_class = NULL, > .central_class = "MemoryPool", > .scoping_profile = &SystemVirtualization > @@ -99,6 +105,7 @@ > .reg_id = "CIM:DSP1081-VirtualSystemMigration-0.8.1", > .reg_name = "Virtual System Migration", > .reg_version = "0.8.1", > + .ad_types = 3, > .scoping_class = NULL, > .central_class = "VirtualSystemMigrationService", > .scoping_profile = &SystemVirtualization > @@ -109,6 +116,7 @@ > .reg_id = "CIM:DSP1076-KVMRedirection-1.0.0", > .reg_name = "KVM Redirection", > .reg_version = "1.0.0", > + .ad_types = 3, > .scoping_class = "HostSystem", > .central_class = "ConsoleRedirectionService", > .scoping_profile = &SystemVirtualization > @@ -119,6 +127,7 @@ > .reg_id = "CIM:DSP1043-AllocationCapabilities-1.0.0a", > .reg_name = "Allocation Capabilities", > .reg_version = "1.0.0a", > + .ad_types = 3, > .scoping_class = "ComputerSystem", > .central_class = "AllocationCapabilities", > .scoping_profile = &SystemVirtualization > @@ -129,6 +138,7 @@ > .reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_d", > .reg_name = "Resource Allocation", > .reg_version = "1.1.0c", > + .ad_types = 3, > .scoping_class = "ComputerSystem", > .central_class = "DiskPool", > .scoping_profile = &SystemVirtualization > @@ -139,6 +149,7 @@ > .reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_n", > .reg_name = "Resource Allocation", > .reg_version = "1.1.0c", > + .ad_types = 3, > .scoping_class = "ComputerSystem", > .central_class = "NetworkPool", > .scoping_profile = &SystemVirtualization > @@ -149,6 +160,7 @@ > .reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_p", > .reg_name = "Resource Allocation", > .reg_version = "1.1.0c", > + .ad_types = 3, > .scoping_class = "ComputerSystem", > .central_class = "ProcessorPool", > .scoping_profile = &SystemVirtualization > @@ -159,6 +171,7 @@ > .reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c_m", > .reg_name = "Resource Allocation", > .reg_version = "1.1.0c", > + .ad_types = 3, > .scoping_class = "ComputerSystem", > .central_class = "MemoryPool", > .scoping_profile = &SystemVirtualization > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Mon Mar 23 18:03:43 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Mon, 23 Mar 2009 15:03:43 -0300 Subject: [Libvirt-cim] [PATCH] Expose guest's emulator via the VSSD Emulator attribute In-Reply-To: References: Message-ID: <49C7CEFF.20004@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237758585 25200 > # Node ID bf9fd956eeb00928a7f7e6a8bb3a0de11ef9fde6 > # Parent 1aff0d0e9bf49e738827b7157c0df407b814ae7d > Expose guest's emulator via the VSSD Emulator attribute > > If the guest has an emulator, set the Emulator attribute appropriately. > > Signed-off-by: Kaitlin Rupert > > diff -r 1aff0d0e9bf4 -r bf9fd956eeb0 src/Virt_VSSD.c > --- a/src/Virt_VSSD.c Wed Mar 04 15:25:33 2009 -0800 > +++ b/src/Virt_VSSD.c Sun Mar 22 14:49:45 2009 -0700 > @@ -135,6 +135,14 @@ > (CMPIValue *)&clock, CMPI_uint16); > } > > + if (dominfo->dev_emu != NULL) { > + CMSetProperty(inst, > + "Emulator", > + (CMPIValue *)dominfo->dev_emu->dev.emu.path, > + CMPI_chars); > + } > + > + > if ((dominfo->type == DOMAIN_XENFV) || > (dominfo->type == DOMAIN_KVM)) > _set_fv_prop(dominfo, inst); > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Mar 23 19:50:30 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 12:50:30 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] (#2) Add RASDs to use when defining Network Pools In-Reply-To: References: Message-ID: <3a941b3f8c9d7f3da5bb.1237837830@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID 3a941b3f8c9d7f3da5bb344d81306d850dc76cdf # Parent e5f7a88bf9aa81e71232d3ef86b7572d9461997c (#2) Add RASDs to use when defining Network Pools Updates: -Don't remove the build target for Virt_ResourcePoolConfigurationCapabilities.c Signed-off-by: Kaitlin Rupert diff -r e5f7a88bf9aa -r 3a941b3f8c9d schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Tue Mar 17 18:13:23 2009 -0700 +++ b/schema/ResourceAllocationSettingData.mof Tue Mar 17 18:13:23 2009 -0700 @@ -163,3 +163,35 @@ string BusType; }; +[Description ("Xen virtual pool settings"), + Provider("cmpi::Virt_RASD") +] +class Xen_NetPoolResourceAllocationSettingData : Xen_ResourceAllocationSettingData +{ + string Netmask; + string IPRangeStart; + string IPRangeEnd; + string ForwardMode; +}; + +[Description ("KVM virtual pool settings"), + Provider("cmpi::Virt_RASD") +] +class KVM_NetPoolResourceAllocationSettingData : KVM_ResourceAllocationSettingData +{ + string Netmask; + string IPRangeStart; + string IPRangeEnd; + string ForwardMode; +}; + +[Description ("LXC virtual pool settings"), + Provider("cmpi::Virt_RASD") +] +class LXC_NetPoolResourceAllocationSettingData : LXC_ResourceAllocationSettingData +{ + string Netmask; + string IPRangeStart; + string IPRangeEnd; + string ForwardMode; +}; diff -r e5f7a88bf9aa -r 3a941b3f8c9d src/Makefile.am --- a/src/Makefile.am Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Makefile.am Tue Mar 17 18:13:23 2009 -0700 @@ -157,9 +157,11 @@ libVirt_RASD_la_SOURCES = Virt_RASD.c libVirt_RASD_la_LIBADD = -lVirt_Device -libVirt_ResourcePoolConfigurationService_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_ResourcePoolConfigurationService_la_DEPENDENCIES = libVirt_HostSystem.la libVirt_DevicePool.la libVirt_RASD.la libVirt_ResourcePoolConfigurationService_la_SOURCES = Virt_ResourcePoolConfigurationService.c -libVirt_ResourcePoolConfigurationService_la_LIBADD = -lVirt_HostSystem +libVirt_ResourcePoolConfigurationService_la_LIBADD = -lVirt_HostSystem \ + -lVirt_DevicePool \ + -lVirt_RASD libVirt_ResourcePoolConfigurationCapabilities_la_SOURCES = Virt_ResourcePoolConfigurationCapabilities.c diff -r e5f7a88bf9aa -r 3a941b3f8c9d src/Virt_RASD.c --- a/src/Virt_RASD.c Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Virt_RASD.c Tue Mar 17 18:13:23 2009 -0700 @@ -526,7 +526,8 @@ if (STREQ(base, "DiskResourceAllocationSettingData")) *type = CIM_RES_TYPE_DISK; - else if (STREQ(base, "NetResourceAllocationSettingData")) + else if ((STREQ(base, "NetResourceAllocationSettingData")) || + (STREQ(base, "NetPoolResourceAllocationSettingData"))) *type = CIM_RES_TYPE_NET; else if (STREQ(base, "ProcResourceAllocationSettingData")) *type = CIM_RES_TYPE_PROC; From kaitlin at linux.vnet.ibm.com Mon Mar 23 19:50:28 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 12:50:28 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] Add basic support for creating network pools In-Reply-To: References: Message-ID: <177ae29d2ae5c1f9fe37.1237837828@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID 177ae29d2ae5c1f9fe37e8cffb000bfeb2dc28af # Parent e810ca0c3e585a0b58b1da2e280fb69232a20be1 Add basic support for creating network pools. Signed-off-by: Kaitlin Rupert diff -r e810ca0c3e58 -r 177ae29d2ae5 libxkutil/Makefile.am --- a/libxkutil/Makefile.am Fri Mar 20 16:26:02 2009 -0700 +++ b/libxkutil/Makefile.am Tue Mar 17 18:13:23 2009 -0700 @@ -4,14 +4,15 @@ CFLAGS += $(CFLAGS_STRICT) -noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h +noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ + pool_parsing.h lib_LTLIBRARIES = libxkutil.la AM_LDFLAGS = -lvirt -luuid libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ - xmlgen.c infostore.c + xmlgen.c infostore.c pool_parsing.c noinst_PROGRAMS = xml_parse_test diff -r e810ca0c3e58 -r 177ae29d2ae5 libxkutil/pool_parsing.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libxkutil/pool_parsing.c Tue Mar 17 18:13:23 2009 -0700 @@ -0,0 +1,70 @@ +/* + * Copyright IBM Corp. 2009 + * + * Authors: + * Kaitlin Rupert + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "pool_parsing.h" +#include "../src/svpc_types.h" + +int define_pool(virConnectPtr conn, const char *xml, int res_type) +{ + int ret = 1; + + if (res_type == CIM_RES_TYPE_NET) { + virNetworkPtr ptr = virNetworkDefineXML(conn, xml); + if (ptr == NULL) { + CU_DEBUG("Unable to define virtual network"); + return 0; + } + + if (virNetworkCreate(ptr) != 0) { + CU_DEBUG("Unable to start virtual network"); + ret = 0; + + if (virNetworkUndefine(ptr) != 0) + CU_DEBUG("Unable to undefine virtual network"); + } + + virNetworkFree(ptr); + } + + return ret; +} + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ + diff -r e810ca0c3e58 -r 177ae29d2ae5 libxkutil/pool_parsing.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libxkutil/pool_parsing.h Tue Mar 17 18:13:23 2009 -0700 @@ -0,0 +1,60 @@ +/* + * Copyright IBM Corp. 2009 + * + * Authors: + * Kaitlin Rupert + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#ifndef __RES_POOLS_H_ +#define __RES_POOLS_H + +#include +#include +#include + +#include "../src/svpc_types.h" + +struct net_pool { + char *addr; + char *netmask; + char *ip_start; + char *ip_end; + char *forward_mode; + char *forward_dev; +}; + +struct virt_pool { + uint16_t type; + union { + struct net_pool net; + } pool_info; + char *id; +}; + +int define_pool(virConnectPtr conn, const char *xml, int res_type); + + +#endif + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ From kaitlin at linux.vnet.ibm.com Mon Mar 23 19:50:29 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 12:50:29 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] (#2) Add logic to generate a pool XML to xmlgen.c In-Reply-To: References: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID e5f7a88bf9aa81e71232d3ef86b7572d9461997c # Parent 177ae29d2ae5c1f9fe37e8cffb000bfeb2dc28af (#2) Add logic to generate a pool XML to xmlgen.c Updates: -The pool ID should not be added as a property to the top level network tag. Signed-off-by: Kaitlin Rupert diff -r 177ae29d2ae5 -r e5f7a88bf9aa libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Tue Mar 17 18:13:23 2009 -0700 +++ b/libxkutil/xmlgen.c Tue Mar 17 18:13:23 2009 -0700 @@ -38,6 +38,7 @@ #define XML_ERROR "Failed to allocate XML memory" typedef const char *(*devfn_t)(xmlNodePtr node, struct domain *dominfo); +typedef const char *(*poolfn_t)(xmlNodePtr node, struct virt_pool *pool); static char *disk_block_xml(xmlNodePtr root, struct disk_device *dev) { @@ -770,6 +771,114 @@ return xml; } +static const char *net_pool_xml(xmlNodePtr root, + struct virt_pool *_pool) +{ + xmlNodePtr net = NULL; + xmlNodePtr ip = NULL; + xmlNodePtr forward = NULL; + xmlNodePtr dhcp = NULL; + xmlNodePtr range = NULL; + const char *msg = NULL; + struct net_pool *pool = &_pool->pool_info.net; + + net = xmlNewChild(root, NULL, BAD_CAST "network", NULL); + if (net == NULL) + goto out; + + if (xmlNewChild(net, NULL, BAD_CAST "name", BAD_CAST _pool->id) == NULL) + goto out; + + if (xmlNewChild(net, NULL, BAD_CAST "bridge", NULL) == NULL) + goto out; + + if (pool->forward_mode != NULL) { + forward = xmlNewChild(net, NULL, BAD_CAST "forward", NULL); + if (forward == NULL) + goto out; + + if (xmlNewProp(forward, + BAD_CAST "mode", + BAD_CAST pool->forward_mode) == NULL) + goto out; + + if (pool->forward_dev != NULL) { + if (xmlNewProp(forward, + BAD_CAST "dev", + BAD_CAST pool->forward_dev) == NULL) + goto out; + } + } + + ip = xmlNewChild(net, NULL, BAD_CAST "ip", NULL); + if (ip == NULL) + goto out; + + if (xmlNewProp(ip, BAD_CAST "address", BAD_CAST pool->addr) == NULL) + goto out; + + if (xmlNewProp(ip, BAD_CAST "netmask", BAD_CAST pool->netmask) == NULL) + goto out; + + if ((pool->ip_start != NULL) && (pool->ip_end != NULL)) { + dhcp = xmlNewChild(ip, NULL, BAD_CAST "dhcp", NULL); + if (dhcp == NULL) + goto out; + + range = xmlNewChild(dhcp, NULL, BAD_CAST "range", NULL); + if (range == NULL) + goto out; + + if (xmlNewProp(range, + BAD_CAST "start", + BAD_CAST pool->ip_start) == NULL) + goto out; + + if (xmlNewProp(range, + BAD_CAST "end", + BAD_CAST pool->ip_end) == NULL) + goto out; + } + + out: + return msg; +} + +char *pool_to_xml(struct virt_pool *pool) { + char *xml = NULL; + xmlNodePtr root = NULL; + int type = pool->type; + const char *msg; + poolfn_t func; + + root = xmlNewNode(NULL, BAD_CAST "tmp"); + if (root == NULL) + goto out; + + switch (type) { + case CIM_RES_TYPE_NET: + func = net_pool_xml; + break; + default: + CU_DEBUG("pool_to_xml: invalid type specified: %d", type); + goto out; + } + + msg = func(root, pool); + if (msg != NULL) { + CU_DEBUG("Failed to create pool XML: %s", msg); + goto out; + } + + xml = tree_to_xml(root->children); + out: + CU_DEBUG("Created Device XML:\n%s\n", xml); + + xmlFreeNode(root); + + return xml; +} + /* * Local Variables: * mode: C diff -r 177ae29d2ae5 -r e5f7a88bf9aa libxkutil/xmlgen.h --- a/libxkutil/xmlgen.h Tue Mar 17 18:13:23 2009 -0700 +++ b/libxkutil/xmlgen.h Tue Mar 17 18:13:23 2009 -0700 @@ -22,6 +22,7 @@ #define __XMLGEN_H #include "device_parsing.h" +#include "pool_parsing.h" #include "cmpidt.h" @@ -33,4 +34,6 @@ char *system_to_xml(struct domain *dominfo); char *device_to_xml(struct virt_device *dev); +char *pool_to_xml(struct virt_pool *pool); + #endif From kaitlin at linux.vnet.ibm.com Mon Mar 23 19:50:27 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 12:50:27 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] #2 Add support for network pool creation Message-ID: This just adds basic support for network pool creation. See individual patches for changes. From kaitlin at linux.vnet.ibm.com Mon Mar 23 19:50:31 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 23 Mar 2009 12:50:31 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] Add suport for CreateChildResourcePool In-Reply-To: References: Message-ID: <60ea52c462457b4aa728.1237837831@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID 60ea52c462457b4aa7289ae6baaa25a761141e07 # Parent 3a941b3f8c9d7f3da5bb344d81306d850dc76cdf Add suport for CreateChildResourcePool. Right now this creates a standalone pool. Modifications need to be made so there is a parent primordial pool, and all created network pools should be concrete pools that are child pools of the primordial pool. Signed-off-by: Kaitlin Rupert diff -r 3a941b3f8c9d -r 60ea52c46245 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.c Tue Mar 17 18:13:23 2009 -0700 @@ -3,6 +3,7 @@ * * Authors: * Dan Smith + * Kaitlin Rupert * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,12 +28,299 @@ #include #include "misc_util.h" +#include "xmlgen.h" +#include "svpc_types.h" #include "Virt_HostSystem.h" #include "Virt_ResourcePoolConfigurationService.h" +#include "Virt_DevicePool.h" +#include "Virt_RASD.h" const static CMPIBroker *_BROKER; +const char *DEF_POOL_NAME = "libvirt-cim-pool"; + +static CMPIStatus create_child_pool_parse_args(const CMPIArgs *argsin, + const char **name, + CMPIArray **set, + CMPIArray **parent_arr) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (cu_get_str_arg(argsin, "ElementName", name) != CMPI_RC_OK) { + CU_DEBUG("No ElementName string argument"); + *name = strdup(DEF_POOL_NAME); + } + + if (cu_get_array_arg(argsin, "Settings", set) != CMPI_RC_OK) { + CU_DEBUG("Failed to get Settings array arg"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_INVALID_PARAMETER, + "Missing argument `Settings'"); + goto out; + } + + if (cu_get_array_arg(argsin, "ParentPool", parent_arr) != CMPI_RC_OK) + CU_DEBUG("No parent pool specified during pool creation"); + + out: + return s; +} + +static const char *net_rasd_to_pool(CMPIInstance *inst, + struct virt_pool *pool, + const char *ns) +{ + const char *val = NULL; + const char *msg = NULL; + + /*FIXME: Need to add validation of addresses if user specified */ + + if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) + val = strdup("192.168.122.1"); + + free(pool->pool_info.net.addr); + pool->pool_info.net.addr = strdup(val); + + if (cu_get_str_prop(inst, "Netmask", &val) != CMPI_RC_OK) + val = strdup("255.255.255.0"); + + free(pool->pool_info.net.netmask); + pool->pool_info.net.netmask = strdup(val); + + if (cu_get_str_prop(inst, "IPRangeStart", &val) != CMPI_RC_OK) + val = strdup("192.168.122.2"); + + free(pool->pool_info.net.ip_start); + pool->pool_info.net.ip_start = strdup(val); + + if (cu_get_str_prop(inst, "IPRangeStart", &val) != CMPI_RC_OK) + val = strdup("192.168.122.254"); + + free(pool->pool_info.net.ip_end); + pool->pool_info.net.ip_end = strdup(val); + + return msg; + +} + +static const char *rasd_to_vpool(CMPIInstance *inst, + struct virt_pool *pool, + uint16_t type, + const char *ns) +{ + pool->type = type; + + if (type == CIM_RES_TYPE_NET) { + return net_rasd_to_pool(inst, pool, ns); + } + + pool->type = CIM_RES_TYPE_UNKNOWN; + + return "Resource type not supported on this platform"; +} + +static const char *get_pool_properties(CMPIArray *settings, + struct virt_pool *pool) +{ + CMPIObjectPath *op; + CMPIData item; + CMPIInstance *inst; + const char *msg = NULL; + uint16_t type; + int count; + + count = CMGetArrayCount(settings, NULL); + if (count < 1) + return "No resources specified"; + + if (count > 1) + CU_DEBUG("More than one RASD specified during pool creation"); + + item = CMGetArrayElementAt(settings, 0, NULL); + if (CMIsNullObject(item.value.inst)) + return "Internal array error"; + + inst = item.value.inst; + + op = CMGetObjectPath(inst, NULL); + if (op == NULL) + return "Unknown resource instance type"; + + if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) + return "Unable to determine resource type"; + + if (type != CIM_RES_TYPE_NET) + return "Only network pools currently supported"; + + msg = rasd_to_vpool(inst, pool, type, NAMESPACE(op)); + + return msg; +} + +static char *get_pool_id(int res_type, + const char *name) +{ + char *id = NULL; + const char *pool = NULL; + + if (res_type == CIM_RES_TYPE_NET) + pool = "NetworkPool"; + else if (res_type == CIM_RES_TYPE_DISK) + pool = "DiskPool"; + else if (res_type == CIM_RES_TYPE_MEM) + pool = "MemoryPool"; + else if (res_type == CIM_RES_TYPE_PROC) + pool = "ProcessorPool"; + else if (res_type == CIM_RES_TYPE_GRAPHICS) + pool = "GraphicsPool"; + else if (res_type == CIM_RES_TYPE_INPUT) + pool = "InputPool"; + else + pool = "Unknown"; + + if (asprintf(&id, "%s/%s", pool, name) == -1) { + return NULL; + } + + return id; +} + +static CMPIInstance *connect_and_create(char *xml, + const CMPIObjectPath *ref, + const char *id, + int res_type, + CMPIStatus *s) +{ + virConnectPtr conn; + CMPIInstance *inst = NULL; + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); + if (conn == NULL) { + CU_DEBUG("libvirt connection failed"); + return NULL; + } + + if (define_pool(conn, xml, res_type) == 0) { + virt_set_status(_BROKER, s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to create resource pool"); + goto out; + } + + *s = get_pool_by_name(_BROKER, ref, id, &inst); + if (s->rc != CMPI_RC_OK) { + CU_DEBUG("Failed to get new pool instance: %s", id); + cu_statusf(_BROKER, s, + CMPI_RC_ERR_FAILED, + "Failed to lookup resulting pool"); + } + + out: + virConnectClose(conn); + + return inst; +} + +static CMPIStatus create_child_pool(CMPIMethodMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + uint32_t rc = CIM_SVPC_RETURN_FAILED; + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst = NULL; + CMPIArray *set; + CMPIArray *parent_pools; + CMPIObjectPath *result; + struct virt_pool *pool = NULL; + const char *name = NULL; + const char *msg = NULL; + char *full_id = NULL; + char *xml = NULL; + + CU_DEBUG("CreateResourcePool"); + + s = create_child_pool_parse_args(argsin, &name, &set, &parent_pools); + if (s.rc != CMPI_RC_OK) + goto out; + + pool = calloc(1, sizeof(*pool)); + if (pool == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to allocate pool struct"); + goto out; + } + + msg = get_pool_properties(set, pool); + if (msg != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Settings Error: %s", msg); + + goto out; + } + + full_id = get_pool_id(pool->type, name); + if (full_id == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to format resulting pool ID"); + goto out; + } + + s = get_pool_by_name(_BROKER, reference, full_id, &inst); + if (s.rc == CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Pool with that name already exists"); + goto out; + } + + pool->id = strdup(name); + + xml = pool_to_xml(pool); + if (xml == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to generate XML for resource pool"); + goto out; + } + + CU_DEBUG("Pool XML:\n%s", xml); + + inst = connect_and_create(xml, reference, full_id, pool->type, &s); + if (inst == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to create resource pool"); + goto out; + } + + result = CMGetObjectPath(inst, &s); + if ((result != NULL) && (s.rc == CMPI_RC_OK)) { + CMSetNameSpace(result, NAMESPACE(reference)); + CMAddArg(argsout, "Pool", &result, CMPI_ref); + } + + /* FIXME: Trigger indication here */ + + cu_statusf(_BROKER, &s, CMPI_RC_OK, ""); + out: + free(xml); + free(full_id); + + if (s.rc == CMPI_RC_OK) + rc = CIM_SVPC_RETURN_COMPLETED; + CMReturnData(results, &rc, CMPI_uint32); + + return s; +} + static CMPIStatus dummy_handler(CMPIMethodMI *self, const CMPIContext *context, const CMPIResult *results, @@ -51,8 +339,12 @@ static struct method_handler CreateChildResourcePool = { .name = "CreateChildResourcePool", - .handler = dummy_handler, - .args = { ARG_END }, + .handler = create_child_pool, + .args = {{"ElementName", CMPI_string, true}, + {"Settings", CMPI_instanceA, false}, + {"ParentPool", CMPI_refA, true}, + ARG_END + } }; static struct method_handler AddResourcesToResourcePool = { From yunguol at cn.ibm.com Tue Mar 24 09:09:53 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 24 Mar 2009 02:09:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add new tc to verify VSMS.RemoveResourceSettings() with invalid instance Message-ID: <125291db2a71a803ce3e.1237885793@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1237885787 25200 # Node ID 125291db2a71a803ce3ee991dd730aaddb1d3157 # Parent 57f08f1c7a1a8b7c9068e1bf0e76368bb92ead26 [TEST] Add new tc to verify VSMS.RemoveResourceSettings() with invalid instance Tested for KVM, Xen with current sources and rpm Signed-off-by: Guolian Yun diff -r 57f08f1c7a1a -r 125291db2a71 suites/libvirt-cim/cimtest/VirtualSystemManagementService/17_removeresource_neg.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/17_removeresource_neg.py Tue Mar 24 02:09:47 2009 -0700 @@ -0,0 +1,71 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Guolian Yun +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +import sys +import pywbem +from XenKvmLib.vsms import get_vsms_class +from XenKvmLib.vxml import get_class +from CimTest.Globals import logger +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import FAIL, PASS + +exp_rc = 13 +exp_desc = 'CIM_ERR_TYPE_MISMATCH' + +sup_types = ['Xen', 'KVM', 'XenFV'] +default_dom = 'domain' + + at do_main(sup_types) +def main(): + options = main.options + + cxml = get_class(options.virt)(default_dom) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + return FAIL + + rc = -1 + try: + bad_inst = 'instance of what ever dfs&' + service = get_vsms_class(options.virt)(options.ip) + ret = service.RemoveResourceSettings(ResourceSettings=[bad_inst]) + if ret[0] == 0: + logger.error('RemoveRS should NOT return OK with wrong RS input') + rc = 0 + except pywbem.CIMError, (rc, desc): + if rc == exp_rc and desc.find(exp_desc) >= 0: + logger.info('Got expected rc code and error string') + status = PASS + else: + logger.error('Unexpected rc code %s and description"\n %s', + rc, desc) + status = FAIL + except Exception, details: + logger.error(details) + status = FAIL + + cxml.undefine(options.ip) + return status + +if __name__ == "__main__": + sys.exit(main()) From yunguol at cn.ibm.com Tue Mar 24 09:04:59 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 24 Mar 2009 17:04:59 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add new tc to verify VSMS.RemoveResourceSettings() with invalid instance In-Reply-To: <125291db2a71a803ce3e.1237885793@elm3b197.beaverton.ibm.com> Message-ID: This tc fails for KVM with current src because of the exp_desc. The error desc expects to "The value supplied is incompatible with the type" instead of "CIM_ERR_TYPE_MISMATCH" for KVM with current src. But this tc with exp_desc of "CIM_ERR_TYPE_MISMATCH" pass for Xen with current src. I'm not sure why it is? Why the error desc is different from Xen to KVM with the same libvit-cim version? libvirt-cim-bounces at redhat.com wrote on 2009-03-24 17:09:53: > # HG changeset patch > # User Guolian Yun > # Date 1237885787 25200 > # Node ID 125291db2a71a803ce3ee991dd730aaddb1d3157 > # Parent 57f08f1c7a1a8b7c9068e1bf0e76368bb92ead26 > [TEST] Add new tc to verify VSMS.RemoveResourceSettings() with > invalid instance > > > Tested for KVM, Xen with current sources and rpm > Signed-off-by: Guolian Yun > > diff -r 57f08f1c7a1a -r 125291db2a71 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/17_removeresource_neg.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/17_removeresource_neg.py > Tue Mar 24 02:09:47 2009 -0700 > @@ -0,0 +1,71 @@ > +#!/usr/bin/python > +# > +# Copyright 2009 IBM Corp. > +# > +# Authors: > +# Guolian Yun > +# > +# This library is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public > +# License as published by the Free Software Foundation; either > +# version 2.1 of the License, or (at your option) any later version. > +# > +# This library is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +# General Public License for more details. > +# > +# You should have received a copy of the GNU General Public > +# License along with this library; if not, write to the Free Software > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > +# > + > +import sys > +import pywbem > +from XenKvmLib.vsms import get_vsms_class > +from XenKvmLib.vxml import get_class > +from CimTest.Globals import logger > +from XenKvmLib.const import do_main > +from CimTest.ReturnCodes import FAIL, PASS > + > +exp_rc = 13 > +exp_desc = 'CIM_ERR_TYPE_MISMATCH' > + > +sup_types = ['Xen', 'KVM', 'XenFV'] > +default_dom = 'domain' > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + cxml = get_class(options.virt)(default_dom) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to define the dom: %s", default_dom) > + return FAIL > + > + rc = -1 > + try: > + bad_inst = 'instance of what ever dfs&' > + service = get_vsms_class(options.virt)(options.ip) > + ret = service.RemoveResourceSettings(ResourceSettings=[bad_inst]) > + if ret[0] == 0: > + logger.error('RemoveRS should NOT return OK with wrong RS input') > + rc = 0 > + except pywbem.CIMError, (rc, desc): > + if rc == exp_rc and desc.find(exp_desc) >= 0: > + logger.info('Got expected rc code and error string') > + status = PASS > + else: > + logger.error('Unexpected rc code %s and description"\n %s', > + rc, desc) > + status = FAIL > + except Exception, details: > + logger.error(details) > + status = FAIL > + > + cxml.undefine(options.ip) > + return status > + > +if __name__ == "__main__": > + sys.exit(main()) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Tue Mar 24 15:10:53 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 24 Mar 2009 08:10:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix key generation In-Reply-To: References: Message-ID: <49C8F7FD.2050804@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237495701 25200 > # Node ID ddf78929ebf1b58e5c48a58d7678c47d8f7c913b > # Parent 5bafbcfb09fd3fb9c4cf532488c92d9ddefc663c > [TEST] #2 Fix key generation > > Updates: > -Remove commented out lines of code. > > Instead of setting up the ssh keys prior to each test run, the keys need to be > setup before main.py is called. This fixes the issue where cimtest would > complain if an id_rsa key wasn't already available. > > Now, if the key isn't available, it generates one. Otherwise, it uses the > available key. > Has anyone reviewed this yet? I don't think I've seen any comments on it so far. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 24 17:03:33 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 24 Mar 2009 10:03:33 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add new tc to verify VSMS.RemoveResourceSettings() with invalid instance In-Reply-To: References: Message-ID: <49C91265.20500@linux.vnet.ibm.com> Guo Lian Yun wrote: > > This tc fails for KVM with current src because of the exp_desc. > The error desc expects to "The value supplied is incompatible with the > type" > instead of "CIM_ERR_TYPE_MISMATCH" for KVM with current src. > > But this tc with exp_desc of "CIM_ERR_TYPE_MISMATCH" pass for Xen with > current src. I'm not sure > why it is? Why the error desc is different from Xen to KVM with the same > libvit-cim version? > When I run on KVM, I see the following: Testing KVM hypervisor -------------------------------------------------------------------- VirtualSystemManagementService - 17_removeresource_neg.py: FAIL InvokeMethod(RemoveResourceSettings): CIM_ERR_TYPE_MISMATCH 13 CIM_ERR_TYPE_MISMATCH -------------------------------------------------------------------- What error are you seeing? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 24 17:12:24 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 24 Mar 2009 10:12:24 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add new tc to verify VSMS.RemoveResourceSettings() with invalid instance In-Reply-To: <125291db2a71a803ce3e.1237885793@elm3b197.beaverton.ibm.com> References: <125291db2a71a803ce3e.1237885793@elm3b197.beaverton.ibm.com> Message-ID: <49C91478.5040006@linux.vnet.ibm.com> > +exp_rc = 13 > +exp_desc = 'CIM_ERR_TYPE_MISMATCH' > + > +sup_types = ['Xen', 'KVM', 'XenFV'] > +default_dom = 'domain' > + > + at do_main(sup_types) > +def main(): > + options = main.options > + > + cxml = get_class(options.virt)(default_dom) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to define the dom: %s", default_dom) > + return FAIL > + > + rc = -1 > + try: > + bad_inst = 'instance of what ever dfs&' This will just verify the CIMOM, since the CIMOM will check the type of the parameter. Instead, you need to create a RASD instance, but have something in the instance be invalid. One example would be to create a RASD of a class type we don't support, or set all of the attributes to NULL / 0. > + service = get_vsms_class(options.virt)(options.ip) > + ret = service.RemoveResourceSettings(ResourceSettings=[bad_inst]) > + if ret[0] == 0: > + logger.error('RemoveRS should NOT return OK with wrong RS input') > + rc = 0 Why do you set the rc value here? You don't check it afterwards. > + except pywbem.CIMError, (rc, desc): > + if rc == exp_rc and desc.find(exp_desc) >= 0: > + logger.info('Got expected rc code and error string') > + status = PASS > + else: > + logger.error('Unexpected rc code %s and description"\n %s', > + rc, desc) > + status = FAIL > + except Exception, details: > + logger.error(details) > + status = FAIL > + > + cxml.undefine(options.ip) > + return status > + -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Mar 25 02:16:07 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 24 Mar 2009 19:16:07 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Remove create_using_definesystem() Message-ID: <8a672626eb00a400605f.1237947367@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237947348 25200 # Node ID 8a672626eb00a400605fd468cc225d2713bd9872 # Parent 57f08f1c7a1a8b7c9068e1bf0e76368bb92ead26 [TEST] Remove create_using_definesystem() It's no longer being used. Signed-off-by: Kaitlin Rupert diff -r 57f08f1c7a1a -r 8a672626eb00 suites/libvirt-cim/lib/XenKvmLib/common_util.py --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Sun Mar 22 22:39:16 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Mar 24 19:15:48 2009 -0700 @@ -71,64 +71,6 @@ return (0, cs) -def create_using_definesystem(domain_name, ip, params=None, ref_config=' ', - exp_err=None, virt='Xen'): - bug = "85673" - try: - class_vsms = eval('vsms.' + \ - get_typed_class(virt, 'VirtualSystemManagementService')) - service = class_vsms(ip) - - if params == None or len(params) == 0: - vssd, rasd = vsms.default_vssd_rasd_str( - dom_name=domain_name, virt=virt) - else: - vssd = params['vssd'] - rasd = params['rasd'] - - if exp_err == None or len(exp_err) == 0: - exp_rc = 0 - exp_desc = '' - - else: - exp_rc = exp_err['exp_rc'] - exp_desc = exp_err['exp_desc'] - - service.DefineSystem(SystemSettings=vssd, - ResourceSettings=rasd, - ReferenceConfiguration=ref_config) - except pywbem.CIMError, (rc, desc): - if rc == exp_rc and desc.find(exp_desc) >= 0: - logger.info('Got expected rc code and error string.') - if exp_err != None: - return PASS - return FAIL - - logger.error('Unexpected rc code %s and description:\n %s', rc, desc) - return FAIL - - except Exception, details: - logger.error('Error invoke method `DefineSystem\'. %s', details) - return FAIL - - if exp_err != None: - logger.error('DefineSystem should NOT return OK with invalid arg') - undefine_test_domain(dname, options.ip, virt=virt) - return XFAIL_RC(bug) - - set_uuid(viruuid(domain_name, ip, virt=virt)) - myxml = dumpxml(domain_name, ip, virt=virt) - - name = xml_get_dom_name(myxml) - - if name != domain_name: - logger.error ("Name should be '%s' instead of '%s'", - domain_name, name) - undefine_test_domain(name, ip, virt=virt) - return FAIL - - return PASS - def verify_err_desc(exp_rc, exp_desc, err_no, err_desc): if err_no == exp_rc and err_desc.find(exp_desc) >= 0: logger.info("Got expected exception where ") From yunguol at cn.ibm.com Wed Mar 25 03:22:06 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 24 Mar 2009 20:22:06 -0700 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Add new tc to verify VSMS.RemoveResourceSettings() with invalid instance Message-ID: <24a928b5726541fa148a.1237951326@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1237951319 25200 # Node ID 24a928b5726541fa148a0261902836417373ac5a # Parent 57f08f1c7a1a8b7c9068e1bf0e76368bb92ead26 [TEST]#2 Add new tc to verify VSMS.RemoveResourceSettings() with invalid instance Updates from 1 to 2: Create a DiskRASD with invalid InstanceID Tested for KVM, Xen with current sources and rpm Signed-off-by: Guolian Yun diff -r 57f08f1c7a1a -r 24a928b57265 suites/libvirt-cim/cimtest/VirtualSystemManagementService/17_removeresource_neg.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/17_removeresource_neg.py Tue Mar 24 20:21:59 2009 -0700 @@ -0,0 +1,76 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Guolian Yun +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +import sys +import pywbem +from pywbem.cim_obj import CIMInstanceName +from XenKvmLib.vsms import get_vsms_class +from XenKvmLib.classes import get_typed_class +from XenKvmLib.vxml import get_class +from CimTest.Globals import logger +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import FAIL, PASS + +exp_rc = 6 #CIM_ERR_NOT_FOUND +exp_desc = 'No such instance (domain/invalid)' + +sup_types = ['Xen', 'KVM', 'XenFV'] +default_dom = 'domain' + + at do_main(sup_types) +def main(): + options = main.options + status = PASS + + cxml = get_class(options.virt)(default_dom) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to define the dom: %s", default_dom) + return FAIL + + rasd = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') + rasd_id = '%s/invalid' % default_dom + keys = {'InstanceID' : rasd_id} + + try: + bad_inst = CIMInstanceName(rasd, keybindings=keys) + service = get_vsms_class(options.virt)(options.ip) + ret = service.RemoveResourceSettings(ResourceSettings=[bad_inst]) + if ret[0] == 0: + logger.error('RemoveRS should NOT return OK with wrong RS input') + status = FAIL + except pywbem.CIMError, (rc, desc): + if rc == exp_rc and desc.find(exp_desc) >= 0: + logger.info('Got expected rc code and error string') + else: + logger.error('Unexpected rc code %s and description"\n %s', + rc, desc) + status = FAIL + except Exception, details: + logger.error(details) + status = FAIL + + cxml.undefine(options.ip) + return status + +if __name__ == "__main__": + sys.exit(main()) From yunguol at cn.ibm.com Wed Mar 25 03:09:29 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 25 Mar 2009 11:09:29 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add new tc to verify VSMS.RemoveResourceSettings() with invalid instance In-Reply-To: <49C91265.20500@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-25 01:03:33: > Guo Lian Yun wrote: > > > > This tc fails for KVM with current src because of the exp_desc. > > The error desc expects to "The value supplied is incompatible with the > > type" > > instead of "CIM_ERR_TYPE_MISMATCH" for KVM with current src. > > > > But this tc with exp_desc of "CIM_ERR_TYPE_MISMATCH" pass for Xen with > > current src. I'm not sure > > why it is? Why the error desc is different from Xen to KVM with the same > > libvit-cim version? > > > > When I run on KVM, I see the following: > > Testing KVM hypervisor > -------------------------------------------------------------------- > VirtualSystemManagementService - 17_removeresource_neg.py: FAIL > InvokeMethod(RemoveResourceSettings): CIM_ERR_TYPE_MISMATCH > 13 CIM_ERR_TYPE_MISMATCH > -------------------------------------------------------------------- > > > What error are you seeing? It outputs as follows: "The value supplied is incompatible with the type" Just as you said, this bad inst will verify the COMOM instead of VSMS.RemoveRS() function. I create a DiskRASD with invalid InstanceID and pass to VSMS.RemoveRS() in #2 tc, and the tc works for me now. Thank for your help =) > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 25 03:10:39 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 25 Mar 2009 11:10:39 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix key generation In-Reply-To: Message-ID: +1. libvirt-cim-bounces at redhat.com wrote on 2009-03-20 04:48:34: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237495701 25200 > # Node ID ddf78929ebf1b58e5c48a58d7678c47d8f7c913b > # Parent 5bafbcfb09fd3fb9c4cf532488c92d9ddefc663c > [TEST] #2 Fix key generation > > Updates: > -Remove commented out lines of code. > > Instead of setting up the ssh keys prior to each test run, the keys need to be > setup before main.py is called. This fixes the issue where cimtest would > complain if an id_rsa key wasn't already available. > > Now, if the key isn't available, it generates one. Otherwise, it uses the > available key. > > Signed-off-by: Kaitlin Rupert > > diff -r 5bafbcfb09fd -r ddf78929ebf1 runtests > --- a/runtests Wed Mar 18 06:41:56 2009 -0700 > +++ b/runtests Thu Mar 19 13:48:21 2009 -0700 > @@ -22,6 +22,8 @@ > > import sys > import os > +sys.path.append('./lib') > +from VirtLib.utils import setup_ssh_key > > SUITES_DIR = 'suites' > MAIN_FILE = 'main.py' > @@ -53,6 +55,8 @@ > print "\t%s" % ", ".join(available_suites()) > return 1 > > + setup_ssh_key() > + > suite = sys.argv[1] > print "Starting test suite: %s" % suite > > diff -r 5bafbcfb09fd -r ddf78929ebf1 suites/libvirt-cim/lib/XenKvmLib/const.py > --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Wed Mar 18 06:41: > 56 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Mar 19 13:48: > 21 2009 -0700 > @@ -138,9 +138,7 @@ > try: > from CimTest.Globals import logger, log_param > log_param() > - from VirtLib.utils import setup_ssh_key > from XenKvmLib.test_doms import destroy_and_undefine_all > - setup_ssh_key() > destroy_and_undefine_all(options.ip, options.virt) > rc = f() > except Exception, e: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 25 04:47:37 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 25 Mar 2009 12:47:37 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix key generation In-Reply-To: <49C8F7FD.2050804@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-03-24 23:10:53: > Kaitlin Rupert wrote: > > # HG changeset patch > > # User Kaitlin Rupert > > # Date 1237495701 25200 > > # Node ID ddf78929ebf1b58e5c48a58d7678c47d8f7c913b > > # Parent 5bafbcfb09fd3fb9c4cf532488c92d9ddefc663c > > [TEST] #2 Fix key generation > > > > Updates: > > -Remove commented out lines of code. > > > > Instead of setting up the ssh keys prior to each test run, the > keys need to be > > setup before main.py is called. This fixes the issue where cimtest would > > complain if an id_rsa key wasn't already available. > > > > Now, if the key isn't available, it generates one. Otherwise, it uses the > > available key. > > > > Has anyone reviewed this yet? I don't think I've seen any comments on > it so far. > Sorry for our late response. +1 from me. > Thanks! > > -- > Kaitlin Rupert > IBM Linux Technology Center > kaitlin at linux.vnet.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Wed Mar 25 05:44:55 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 25 Mar 2009 13:44:55 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Remove create_using_definesystem() In-Reply-To: <8a672626eb00a400605f.1237947367@localhost.localdomain> Message-ID: +1. libvirt-cim-bounces at redhat.com wrote on 2009-03-25 10:16:07: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237947348 25200 > # Node ID 8a672626eb00a400605fd468cc225d2713bd9872 > # Parent 57f08f1c7a1a8b7c9068e1bf0e76368bb92ead26 > [TEST] Remove create_using_definesystem() > > It's no longer being used. > > Signed-off-by: Kaitlin Rupert > > diff -r 57f08f1c7a1a -r 8a672626eb00 suites/libvirt- > cim/lib/XenKvmLib/common_util.py > --- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Sun Mar 22 > 22:39:16 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Mar 24 > 19:15:48 2009 -0700 > @@ -71,64 +71,6 @@ > > return (0, cs) > > -def create_using_definesystem(domain_name, ip, params=None, ref_config=' ', > - exp_err=None, virt='Xen'): > - bug = "85673" > - try: > - class_vsms = eval('vsms.' + \ > - get_typed_class(virt, 'VirtualSystemManagementService')) > - service = class_vsms(ip) > - > - if params == None or len(params) == 0: > - vssd, rasd = vsms.default_vssd_rasd_str( > - dom_name=domain_name, virt=virt) > - else: > - vssd = params['vssd'] > - rasd = params['rasd'] > - > - if exp_err == None or len(exp_err) == 0: > - exp_rc = 0 > - exp_desc = '' > - > - else: > - exp_rc = exp_err['exp_rc'] > - exp_desc = exp_err['exp_desc'] > - > - service.DefineSystem(SystemSettings=vssd, > - ResourceSettings=rasd, > - ReferenceConfiguration=ref_config) > - except pywbem.CIMError, (rc, desc): > - if rc == exp_rc and desc.find(exp_desc) >= 0: > - logger.info('Got expected rc code and error string.') > - if exp_err != None: > - return PASS > - return FAIL > - > - logger.error('Unexpected rc code %s and description:\n %s',rc, desc) > - return FAIL > - > - except Exception, details: > - logger.error('Error invoke method `DefineSystem\'. %s', details) > - return FAIL > - > - if exp_err != None: > - logger.error('DefineSystem should NOT return OK with invalid arg') > - undefine_test_domain(dname, options.ip, virt=virt) > - return XFAIL_RC(bug) > - > - set_uuid(viruuid(domain_name, ip, virt=virt)) > - myxml = dumpxml(domain_name, ip, virt=virt) > - > - name = xml_get_dom_name(myxml) > - > - if name != domain_name: > - logger.error ("Name should be '%s' instead of '%s'", > - domain_name, name) > - undefine_test_domain(name, ip, virt=virt) > - return FAIL > - > - return PASS > - > def verify_err_desc(exp_rc, exp_desc, err_no, err_desc): > if err_no == exp_rc and err_desc.find(exp_desc) >= 0: > logger.info("Got expected exception where ") > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Wed Mar 25 07:01:55 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 25 Mar 2009 12:31:55 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Remove create_using_definesystem() In-Reply-To: <8a672626eb00a400605f.1237947367@localhost.localdomain> References: <8a672626eb00a400605f.1237947367@localhost.localdomain> Message-ID: <49C9D6E3.1090405@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Mar 25 08:12:16 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 25 Mar 2009 13:42:16 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#2 Add new tc to verify VSMS.RemoveResourceSettings() with invalid instance In-Reply-To: <24a928b5726541fa148a.1237951326@elm3b197.beaverton.ibm.com> References: <24a928b5726541fa148a.1237951326@elm3b197.beaverton.ibm.com> Message-ID: <49C9E760.50907@linux.vnet.ibm.com> +1 -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From veillard at redhat.com Wed Mar 25 09:08:27 2009 From: veillard at redhat.com (Daniel Veillard) Date: Wed, 25 Mar 2009 10:08:27 +0100 Subject: [Libvirt-cim] [PATCH 2 of 4] Add logic to generate a pool XML to xmlgen.c In-Reply-To: References: Message-ID: <20090325090827.GH31652@redhat.com> On Mon, Mar 23, 2009 at 07:40:32AM -0700, Kaitlin Rupert wrote: [...] > + net = xmlNewChild(root, NULL, BAD_CAST "network", NULL); > + if (net == NULL) > + goto out; [...] > + > + out: > + return msg; > +} I'm a bit surprized, all of there error ends up being ignored or at least not reported, I would expect a goto an error label and then some kind of logging at least > +char *pool_to_xml(struct virt_pool *pool) { [...] > + root = xmlNewNode(NULL, BAD_CAST "tmp"); > + if (root == NULL) > + goto out; same here [...] > + out: > + CU_DEBUG("Created Device XML:\n%s\n", xml); hum %s with NULL can be nasty, I really think a specific error handling is needed here :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From yunguol at cn.ibm.com Wed Mar 25 09:03:36 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 25 Mar 2009 17:03:36 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 25 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus Message-ID: ================================================= Test Run Summary (Mar 25 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus ================================================= Distro: Fedora release 10.90 (Rawhide) Kernel: 2.6.29-0.24.rc0.git13.fc11.x86_64 libvirt: Unknown Hypervisor: Unknown CIMOM: Pegasus 2.7.2 Libvirt-cim revision: 0 Libvirt-cim changeset: Unknown Cimtest revision: 656 Cimtest changeset: 57f08f1c7a1a ================================================= FAIL : 15 XFAIL : 2 SKIP : 7 PASS : 124 ----------------- Total : 148 ================================================= FAIL Test Summary: VirtualSystemManagementService - 09_procrasd_persist.py: FAIL VirtualSystemManagementService - 11_define_memrasdunits.py: FAIL VirtualSystemManagementService - 12_referenced_config.py: FAIL VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL VirtualSystemManagementService - 15_mod_system_settings.py: FAIL VirtualSystemManagementService - 16_removeresource.py: FAIL VirtualSystemSettingDataComponent - 01_forward.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL VirtualSystemSnapshotService - 01_enum.py: FAIL VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL VirtualSystemSnapshotServiceCapabilities - 01_enum.py: FAIL VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - Unable to define procrasd_persist_dom InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: FAIL ERROR - Exception: 'NoneType' object has no attribute 'InstanceID' ERROR - KeyError : 'KVM_MemResourceAllocationSettingData' Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 145, in do_try File "11_define_memrasdunits.py", line 119, in main status = try_define(options, units, value, cxml) File "11_define_memrasdunits.py", line 60, in try_define if rasd_list[mrasd_cn] is None: KeyError: 'KVM_MemResourceAllocationSettingData' ERROR - None CIM_ERR_NOT_FOUND -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - Unable to define rstest_domain using DefineSystem() ERROR - Unable to start rstest_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - Unable define domain rstest_domain ERROR - Unable to define domain rstest_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Exception: 'NoneType' object has no attribute 'InstanceID' ERROR - Unable to get template RASDs for rstest_disk_domain CIM_ERR_NOT_FOUND -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - Failed to define the dom: rstest_domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system -------------------------------------------------------------------- VirtualSystemManagementService - 16_removeresource.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - Failed to define the dom: domain InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system -------------------------------------------------------------------- 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 -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - Failed to define the dom: VSSDC_dom InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - Failed to define the dom: VSSDC_dom InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - Unable to define domain domu1 InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to lookup resulting system with return code 1 ERROR - Unable to define domain domu1 InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to lookup resulting system -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: FAIL ERROR - Failed to enumerate the class of KVM_VirtualSystemSnapshotService ERROR - Exception: reference to invalid character number: line 15, column 30 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: FAIL ERROR - list index out of range CIM_ERR_FAILED: The byte sequence starting at index 0 is not valid UTF-8 encoding. -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: FAIL ERROR - KVM_VirtualSystemSnapshotServiceCapabilities return 0 instances, excepted only 1 instance -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: FAIL ERROR - Unexpected errno 6 and desc CIM_ERR_NOT_FOUND: No such instance ERROR - Expected No such instance (InstanceID) 6 ERROR - ------ FAILED: Invalid InstanceID Key Value.------ -------------------------------------------------------------------- Wed, 25 Mar 2009 02:09:44:TEST LOG:ERROR - Failed to destroy Virtual Network 'cimtest-networkpool' Unable to destroy network pool cimtest-networkpool. Unable to clean up. Please check your environment. Unable to determine libvirt version Unable to determine hypervisior version libvir: Remote error : cannot recv data: Connection reset by peer -------------- next part -------------- An HTML attachment was scrubbed... URL: From veillard at redhat.com Wed Mar 25 09:10:40 2009 From: veillard at redhat.com (Daniel Veillard) Date: Wed, 25 Mar 2009 10:10:40 +0100 Subject: [Libvirt-cim] [PATCH 2 of 4] (#2) Add logic to generate a pool XML to xmlgen.c In-Reply-To: References: Message-ID: <20090325091040.GI31652@redhat.com> On Mon, Mar 23, 2009 at 12:50:29PM -0700, Kaitlin Rupert wrote: Sorry I sent the feedback on the previous iteration, but I think it still applies :-) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ From deeptik at linux.vnet.ibm.com Wed Mar 25 11:18:28 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 25 Mar 2009 16:48:28 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 25 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49CA1304.9030502@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 25 2009): XenFV on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 656 Cimtest changeset: 57f08f1c7a1a ================================================= FAIL : 6 XFAIL : 1 SKIP : 14 PASS : 127 ----------------- Total : 148 ================================================= FAIL Test Summary: RASD - 01_verify_rasd_fields.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 08_modifyresource.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 06_remote_live_migration.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 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedAccessPoint - 01_forward.py: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/00:16:3e:5d:c7:9e)') ERROR - Enum RASDs failed -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: 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 - Got None, exp xvdb. Got None, exp /tmp/default-kvm-dimage.2ND ERROR - Error invoking AddRS: add_disk_res ERROR - Error adding rs for disk_dev -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: FAIL ERROR - Got None, exp /tmp/default-kvm-dimage.2ND. ERROR - Error invoking ModifyRS: mod_disk_res ERROR - Error changing rs for disk path -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ERROR - VirtualQuantity is 1, expected 3 ERROR - Exception: details CPU scheduling not set properly for the dom: procrasd_persist_dom -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - JobStatus for dom 'dom_migrate' has 'Migration Failed' instead of 'Completed' Xen_ComputerSystem.CreationClassName="Xen_ComputerSystem",Name="dom_migrate" -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Migration timed out.... ERROR - Increase timeout > 50 and try again.. -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 06_remote_live_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 -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Wed Mar 25 11:19:22 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 25 Mar 2009 16:49:22 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 25 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49CA133A.8010600@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 25 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 656 Cimtest changeset: 57f08f1c7a1a ================================================= FAIL : 8 XFAIL : 1 SKIP : 12 PASS : 127 ----------------- Total : 148 ================================================= FAIL Test Summary: RASD - 01_verify_rasd_fields.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL VirtualSystemSettingDataComponent - 01_forward.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostedAccessPoint - 01_forward.py: SKIP HostedAccessPoint - 02_reverse.py: SKIP KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP ServiceAccessBySAP - 01_forward.py: SKIP ServiceAccessBySAP - 02_reverse.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 -------------------------------------------------------------------- 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: PASS -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedAccessPoint - 01_forward.py: SKIP -------------------------------------------------------------------- HostedAccessPoint - 02_reverse.py: SKIP -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: SKIP -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: FAIL ERROR - (6, u'CIM_ERR_NOT_FOUND: No such instance (domguest/mem)') ERROR - Enum RASDs failed -------------------------------------------------------------------- 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: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: SKIP -------------------------------------------------------------------- ServiceAccessBySAP - 02_reverse.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: PASS -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 16_removeresource.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Migration verification for 'dom_migrate' failed -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL ERROR - JobStatus for dom 'VM_frm_elm3b217.beaverton.ibm.com' has 'Remote already has domain `VM_frm_elm3b217.beaverton.ibm.com'' instead of 'Completed' -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to create domain with return code 1 ERROR - Failed to define the dom: VSSDC_dom InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to create domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to create domain with return code 1 ERROR - Failed to define the dom: VSSDC_dom InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to create domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to create domain with return code 1 ERROR - Unable to define domain domu1 InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to create domain -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL ERROR - Got CIM error CIM_ERR_FAILED: Failed to create domain with return code 1 ERROR - Unable to define domain domu1 InvokeMethod(DefineSystem): CIM_ERR_FAILED: Failed to create domain -------------------------------------------------------------------- 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 -------------------------------------------------------------------- Wed, 25 Mar 2009 01:13:28:TEST LOG:ERROR - Failed to destroy Virtual Network 'cimtest-networkpool' -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Wed Mar 25 16:09:43 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 25 Mar 2009 13:09:43 -0300 Subject: [Libvirt-cim] [PATCH 4 of 4] Add suport for CreateChildResourcePool In-Reply-To: <60ea52c462457b4aa728.1237837831@localhost.localdomain> References: <60ea52c462457b4aa728.1237837831@localhost.localdomain> Message-ID: <49CA5747.4050306@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237338803 25200 > # Node ID 60ea52c462457b4aa7289ae6baaa25a761141e07 > # Parent 3a941b3f8c9d7f3da5bb344d81306d850dc76cdf > Add suport for CreateChildResourcePool. > > Right now this creates a standalone pool. Modifications need to be made so > there is a parent primordial pool, and all created network pools should be > concrete pools that are child pools of the primordial pool. > > Signed-off-by: Kaitlin Rupert > > diff -r 3a941b3f8c9d -r 60ea52c46245 src/Virt_ResourcePoolConfigurationService.c > --- a/src/Virt_ResourcePoolConfigurationService.c Tue Mar 17 18:13:23 2009 -0700 > +++ b/src/Virt_ResourcePoolConfigurationService.c Tue Mar 17 18:13:23 2009 -0700 > @@ -3,6 +3,7 @@ > * > * Authors: > * Dan Smith > + * Kaitlin Rupert > * > * This library is free software; you can redistribute it and/or > * modify it under the terms of the GNU Lesser General Public > @@ -27,12 +28,299 @@ > #include > > #include "misc_util.h" > +#include "xmlgen.h" > > +#include "svpc_types.h" > #include "Virt_HostSystem.h" > #include "Virt_ResourcePoolConfigurationService.h" > +#include "Virt_DevicePool.h" > +#include "Virt_RASD.h" > > const static CMPIBroker *_BROKER; > > +const char *DEF_POOL_NAME = "libvirt-cim-pool"; > + > +static CMPIStatus create_child_pool_parse_args(const CMPIArgs *argsin, > + const char **name, > + CMPIArray **set, > + CMPIArray **parent_arr) > +{ > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + > + if (cu_get_str_arg(argsin, "ElementName", name) != CMPI_RC_OK) { > + CU_DEBUG("No ElementName string argument"); > + *name = strdup(DEF_POOL_NAME); > + } > + > + if (cu_get_array_arg(argsin, "Settings", set) != CMPI_RC_OK) { > + CU_DEBUG("Failed to get Settings array arg"); > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_INVALID_PARAMETER, > + "Missing argument `Settings'"); > + goto out; > + } > + > + if (cu_get_array_arg(argsin, "ParentPool", parent_arr) != CMPI_RC_OK) > + CU_DEBUG("No parent pool specified during pool creation"); > + > + out: > + return s; > +} > + > +static const char *net_rasd_to_pool(CMPIInstance *inst, > + struct virt_pool *pool, > + const char *ns) > +{ > + const char *val = NULL; > + const char *msg = NULL; > + > + /*FIXME: Need to add validation of addresses if user specified */ > + > + if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) > + val = strdup("192.168.122.1"); No need to do strdup here, since you strdup two lines after, no matter the result of cu_get_str_prop. Just do val = > + > + free(pool->pool_info.net.addr); > + pool->pool_info.net.addr = strdup(val); > + > + if (cu_get_str_prop(inst, "Netmask", &val) != CMPI_RC_OK) > + val = strdup("255.255.255.0"); Same here > + > + free(pool->pool_info.net.netmask); > + pool->pool_info.net.netmask = strdup(val); > + > + if (cu_get_str_prop(inst, "IPRangeStart", &val) != CMPI_RC_OK) > + val = strdup("192.168.122.2"); Same here > + > + free(pool->pool_info.net.ip_start); > + pool->pool_info.net.ip_start = strdup(val); > + > + if (cu_get_str_prop(inst, "IPRangeStart", &val) != CMPI_RC_OK) > + val = strdup("192.168.122.254"); Same here > + > + free(pool->pool_info.net.ip_end); > + pool->pool_info.net.ip_end = strdup(val); If you plan to keep the duplicated strdups, you should free the alloc'ed memory here. > + > + return msg; This will always return a NULL value. But you probably add this to be set when address validation fails, right? > + > +} > + > +static const char *rasd_to_vpool(CMPIInstance *inst, > + struct virt_pool *pool, > + uint16_t type, > + const char *ns) > +{ > + pool->type = type; > + > + if (type == CIM_RES_TYPE_NET) { > + return net_rasd_to_pool(inst, pool, ns); > + } > + > + pool->type = CIM_RES_TYPE_UNKNOWN; > + > + return "Resource type not supported on this platform"; > +} > + > +static const char *get_pool_properties(CMPIArray *settings, > + struct virt_pool *pool) > +{ > + CMPIObjectPath *op; > + CMPIData item; > + CMPIInstance *inst; > + const char *msg = NULL; > + uint16_t type; > + int count; > + > + count = CMGetArrayCount(settings, NULL); > + if (count < 1) > + return "No resources specified"; > + > + if (count > 1) > + CU_DEBUG("More than one RASD specified during pool creation"); > + > + item = CMGetArrayElementAt(settings, 0, NULL); > + if (CMIsNullObject(item.value.inst)) > + return "Internal array error"; > + > + inst = item.value.inst; > + > + op = CMGetObjectPath(inst, NULL); > + if (op == NULL) > + return "Unknown resource instance type"; > + > + if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) > + return "Unable to determine resource type"; > + > + if (type != CIM_RES_TYPE_NET) > + return "Only network pools currently supported"; > + > + msg = rasd_to_vpool(inst, pool, type, NAMESPACE(op)); > + > + return msg; > +} > + > +static char *get_pool_id(int res_type, > + const char *name) > +{ > + char *id = NULL; > + const char *pool = NULL; > + > + if (res_type == CIM_RES_TYPE_NET) > + pool = "NetworkPool"; > + else if (res_type == CIM_RES_TYPE_DISK) > + pool = "DiskPool"; > + else if (res_type == CIM_RES_TYPE_MEM) > + pool = "MemoryPool"; > + else if (res_type == CIM_RES_TYPE_PROC) > + pool = "ProcessorPool"; > + else if (res_type == CIM_RES_TYPE_GRAPHICS) > + pool = "GraphicsPool"; > + else if (res_type == CIM_RES_TYPE_INPUT) > + pool = "InputPool"; > + else > + pool = "Unknown"; > + > + if (asprintf(&id, "%s/%s", pool, name) == -1) { > + return NULL; > + } > + > + return id; > +} > + > +static CMPIInstance *connect_and_create(char *xml, > + const CMPIObjectPath *ref, > + const char *id, > + int res_type, > + CMPIStatus *s) > +{ > + virConnectPtr conn; > + CMPIInstance *inst = NULL; > + > + conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); > + if (conn == NULL) { > + CU_DEBUG("libvirt connection failed"); > + return NULL; > + } > + > + if (define_pool(conn, xml, res_type) == 0) { > + virt_set_status(_BROKER, s, > + CMPI_RC_ERR_FAILED, > + conn, > + "Unable to create resource pool"); > + goto out; > + } > + > + *s = get_pool_by_name(_BROKER, ref, id, &inst); > + if (s->rc != CMPI_RC_OK) { > + CU_DEBUG("Failed to get new pool instance: %s", id); > + cu_statusf(_BROKER, s, > + CMPI_RC_ERR_FAILED, > + "Failed to lookup resulting pool"); > + } > + > + out: > + virConnectClose(conn); > + > + return inst; > +} > + > +static CMPIStatus create_child_pool(CMPIMethodMI *self, > + const CMPIContext *context, > + const CMPIResult *results, > + const CMPIObjectPath *reference, > + const CMPIArgs *argsin, > + CMPIArgs *argsout) > +{ > + uint32_t rc = CIM_SVPC_RETURN_FAILED; > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + CMPIInstance *inst = NULL; > + CMPIArray *set; > + CMPIArray *parent_pools; > + CMPIObjectPath *result; > + struct virt_pool *pool = NULL; > + const char *name = NULL; > + const char *msg = NULL; > + char *full_id = NULL; > + char *xml = NULL; > + > + CU_DEBUG("CreateResourcePool"); > + > + s = create_child_pool_parse_args(argsin, &name, &set, &parent_pools); > + if (s.rc != CMPI_RC_OK) > + goto out; > + > + pool = calloc(1, sizeof(*pool)); > + if (pool == NULL) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Failed to allocate pool struct"); > + goto out; > + } > + > + msg = get_pool_properties(set, pool); > + if (msg != NULL) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Settings Error: %s", msg); > + > + goto out; > + } > + > + full_id = get_pool_id(pool->type, name); > + if (full_id == NULL) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unable to format resulting pool ID"); > + goto out; > + } > + > + s = get_pool_by_name(_BROKER, reference, full_id, &inst); > + if (s.rc == CMPI_RC_OK) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Pool with that name already exists"); > + goto out; > + } > + > + pool->id = strdup(name); You can use name directly, since the create_child_pool_parse_args already allocs memory for the name var. Or, if you decide to keep that way, free memory from the name var after this. > + > + xml = pool_to_xml(pool); > + if (xml == NULL) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unable to generate XML for resource pool"); > + goto out; > + } > + > + CU_DEBUG("Pool XML:\n%s", xml); > + > + inst = connect_and_create(xml, reference, full_id, pool->type, &s); > + if (inst == NULL) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unable to create resource pool"); > + goto out; > + } > + > + result = CMGetObjectPath(inst, &s); > + if ((result != NULL) && (s.rc == CMPI_RC_OK)) { > + CMSetNameSpace(result, NAMESPACE(reference)); > + CMAddArg(argsout, "Pool", &result, CMPI_ref); > + } > + > + /* FIXME: Trigger indication here */ > + > + cu_statusf(_BROKER, &s, CMPI_RC_OK, ""); > + out: > + free(xml); > + free(full_id); Missing free(msg), free(pool) How about free(inst)? > + > + if (s.rc == CMPI_RC_OK) > + rc = CIM_SVPC_RETURN_COMPLETED; > + CMReturnData(results, &rc, CMPI_uint32); > + > + return s; > +} > + > static CMPIStatus dummy_handler(CMPIMethodMI *self, > const CMPIContext *context, > const CMPIResult *results, > @@ -51,8 +339,12 @@ > > static struct method_handler CreateChildResourcePool = { > .name = "CreateChildResourcePool", > - .handler = dummy_handler, > - .args = { ARG_END }, > + .handler = create_child_pool, > + .args = {{"ElementName", CMPI_string, true}, > + {"Settings", CMPI_instanceA, false}, > + {"ParentPool", CMPI_refA, true}, > + ARG_END > + } > }; > > static struct method_handler AddResourcesToResourcePool = { > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Wed Mar 25 16:29:48 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 25 Mar 2009 13:29:48 -0300 Subject: [Libvirt-cim] [PATCH] Setting SynchMethods of RPCC accordingly In-Reply-To: <727ee79a93e91a79b013.1237819277@localhost.localdomain> References: <727ee79a93e91a79b013.1237819277@localhost.localdomain> Message-ID: <49CA5BFC.8060407@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1237328307 25200 > # Node ID 727ee79a93e91a79b01335733853fb2f9d0c4624 > # Parent 434041f12428edfba01127b483ba56b3328e1d79 > Setting SynchMethods of RPCC accordingly. > > Signed-off-by: Kaitlin Rupert > > diff -r 434041f12428 -r 727ee79a93e9 src/Virt_ResourcePoolConfigurationCapabilities.c > --- a/src/Virt_ResourcePoolConfigurationCapabilities.c Tue Mar 17 18:13:23 2009 -0700 > +++ b/src/Virt_ResourcePoolConfigurationCapabilities.c Tue Mar 17 15:18:27 2009 -0700 > @@ -54,6 +54,8 @@ > CMPIStatus s = {CMPI_RC_OK, NULL}; > CMPIInstance *inst = NULL; > virConnectPtr conn = NULL; > + CMPIArray *array; > + uint32_t val; > > conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); > if (conn == NULL) { > @@ -76,7 +78,18 @@ > CMSetProperty(inst, "InstanceID", > (CMPIValue *)"RPCC", CMPI_chars); > > - /* No method currently supported */ > + array = CMNewArray(_BROKER, 2, CMPI_uint32, &s); > + if (s.rc != CMPI_RC_OK) > + return s; > + > + val = CreateChildResourcePool; > + CMSetArrayElementAt(array, 0, (CMPIValue *)&val, CMPI_uint32); > + > + val = DeleteResourcePool; > + CMSetArrayElementAt(array, 1, (CMPIValue *)&val, CMPI_uint32); > + > + CMSetProperty(inst, "SynchronousMethodsSupported", > + (CMPIValue *)&array, CMPI_uint32A); > > if (is_get_inst) { > s = cu_validate_ref(_BROKER, reference, inst); > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Mar 25 21:53:49 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 25 Mar 2009 14:53:49 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] Add suport for CreateChildResourcePool In-Reply-To: <49CA5747.4050306@linux.vnet.ibm.com> References: <60ea52c462457b4aa728.1237837831@localhost.localdomain> <49CA5747.4050306@linux.vnet.ibm.com> Message-ID: <49CAA7ED.4000002@linux.vnet.ibm.com> >> + >> + free(pool->pool_info.net.ip_end); >> + pool->pool_info.net.ip_end = strdup(val); > > > If you plan to keep the duplicated strdups, you should free the alloc'ed > memory here. Yuck.. this was a pretty sloppy patch set. Thanks for catching the strdup() bit! > >> + >> + return msg; > > This will always return a NULL value. But you probably add this to be > set when address validation fails, right? Right - it's possible that in the future one of these attributes (or a new attribute) will be mandatory. >> + >> + s = get_pool_by_name(_BROKER, reference, full_id, &inst); >> + if (s.rc == CMPI_RC_OK) { >> + cu_statusf(_BROKER, &s, >> + CMPI_RC_ERR_FAILED, >> + "Pool with that name already exists"); >> + goto out; >> + } >> + >> + pool->id = strdup(name); > > You can use name directly, since the create_child_pool_parse_args > already allocs memory for the name var. Or, if you decide to keep that > way, free memory from the name var after this. There should a function to cleanup the virt_pool struct. I'll add that. > >> + >> + xml = pool_to_xml(pool); >> + if (xml == NULL) { >> + cu_statusf(_BROKER, &s, >> + CMPI_RC_ERR_FAILED, >> + "Unable to generate XML for resource pool"); >> + goto out; >> + } >> + >> + CU_DEBUG("Pool XML:\n%s", xml); >> + >> + inst = connect_and_create(xml, reference, full_id, >> pool->type, &s); >> + if (inst == NULL) { >> + cu_statusf(_BROKER, &s, >> + CMPI_RC_ERR_FAILED, >> + "Unable to create resource pool"); >> + goto out; >> + } >> + >> + result = CMGetObjectPath(inst, &s); >> + if ((result != NULL) && (s.rc == CMPI_RC_OK)) { >> + CMSetNameSpace(result, NAMESPACE(reference)); >> + CMAddArg(argsout, "Pool", &result, CMPI_ref); >> + } >> + >> + /* FIXME: Trigger indication here */ >> + >> + cu_statusf(_BROKER, &s, CMPI_RC_OK, ""); >> + out: >> + free(xml); >> + free(full_id); > > Missing free(msg), free(pool) > How about free(inst)? msg is a const - no need to free it. Good call on freeing the pool though - there should be a function that handles cleaning up the pool struct elements. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Mar 25 23:05:08 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 25 Mar 2009 16:05:08 -0700 Subject: [Libvirt-cim] [PATCH 3 of 4] (#2) Add RASDs to use when defining Network Pools In-Reply-To: References: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID ed393e68e8997a324651fa923e36307bae80e0ce # Parent c9ad0f077d3882423b438340d3b557c398d4c582 (#2) Add RASDs to use when defining Network Pools Updates: -Don't remove the build target for Virt_ResourcePoolConfigurationCapabilities.c Signed-off-by: Kaitlin Rupert diff -r c9ad0f077d38 -r ed393e68e899 schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Tue Mar 17 18:13:23 2009 -0700 +++ b/schema/ResourceAllocationSettingData.mof Tue Mar 17 18:13:23 2009 -0700 @@ -163,3 +163,35 @@ string BusType; }; +[Description ("Xen virtual pool settings"), + Provider("cmpi::Virt_RASD") +] +class Xen_NetPoolResourceAllocationSettingData : Xen_ResourceAllocationSettingData +{ + string Netmask; + string IPRangeStart; + string IPRangeEnd; + string ForwardMode; +}; + +[Description ("KVM virtual pool settings"), + Provider("cmpi::Virt_RASD") +] +class KVM_NetPoolResourceAllocationSettingData : KVM_ResourceAllocationSettingData +{ + string Netmask; + string IPRangeStart; + string IPRangeEnd; + string ForwardMode; +}; + +[Description ("LXC virtual pool settings"), + Provider("cmpi::Virt_RASD") +] +class LXC_NetPoolResourceAllocationSettingData : LXC_ResourceAllocationSettingData +{ + string Netmask; + string IPRangeStart; + string IPRangeEnd; + string ForwardMode; +}; diff -r c9ad0f077d38 -r ed393e68e899 src/Makefile.am --- a/src/Makefile.am Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Makefile.am Tue Mar 17 18:13:23 2009 -0700 @@ -157,9 +157,11 @@ libVirt_RASD_la_SOURCES = Virt_RASD.c libVirt_RASD_la_LIBADD = -lVirt_Device -libVirt_ResourcePoolConfigurationService_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_ResourcePoolConfigurationService_la_DEPENDENCIES = libVirt_HostSystem.la libVirt_DevicePool.la libVirt_RASD.la libVirt_ResourcePoolConfigurationService_la_SOURCES = Virt_ResourcePoolConfigurationService.c -libVirt_ResourcePoolConfigurationService_la_LIBADD = -lVirt_HostSystem +libVirt_ResourcePoolConfigurationService_la_LIBADD = -lVirt_HostSystem \ + -lVirt_DevicePool \ + -lVirt_RASD libVirt_ResourcePoolConfigurationCapabilities_la_SOURCES = Virt_ResourcePoolConfigurationCapabilities.c diff -r c9ad0f077d38 -r ed393e68e899 src/Virt_RASD.c --- a/src/Virt_RASD.c Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Virt_RASD.c Tue Mar 17 18:13:23 2009 -0700 @@ -526,7 +526,8 @@ if (STREQ(base, "DiskResourceAllocationSettingData")) *type = CIM_RES_TYPE_DISK; - else if (STREQ(base, "NetResourceAllocationSettingData")) + else if ((STREQ(base, "NetResourceAllocationSettingData")) || + (STREQ(base, "NetPoolResourceAllocationSettingData"))) *type = CIM_RES_TYPE_NET; else if (STREQ(base, "ProcResourceAllocationSettingData")) *type = CIM_RES_TYPE_PROC; From kaitlin at linux.vnet.ibm.com Wed Mar 25 23:05:06 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 25 Mar 2009 16:05:06 -0700 Subject: [Libvirt-cim] [PATCH 1 of 4] (#2) Add basic support for creating network pools In-Reply-To: References: Message-ID: <4da70fdbb9a00f3fe874.1238022306@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID 4da70fdbb9a00f3fe874c3347f175efd973d8745 # Parent b092b78f4a892c6855f6851bb3ce18d873f80be9 (#2) Add basic support for creating network pools. Updates from 1 to 2: -Add function for free'ing the elements of the virt_pool struct Signed-off-by: Kaitlin Rupert diff -r b092b78f4a89 -r 4da70fdbb9a0 libxkutil/Makefile.am --- a/libxkutil/Makefile.am Sun Mar 22 14:49:45 2009 -0700 +++ b/libxkutil/Makefile.am Tue Mar 17 18:13:23 2009 -0700 @@ -4,14 +4,15 @@ CFLAGS += $(CFLAGS_STRICT) -noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h +noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ + pool_parsing.h lib_LTLIBRARIES = libxkutil.la AM_LDFLAGS = -lvirt -luuid libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ - xmlgen.c infostore.c + xmlgen.c infostore.c pool_parsing.c noinst_PROGRAMS = xml_parse_test diff -r b092b78f4a89 -r 4da70fdbb9a0 libxkutil/pool_parsing.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libxkutil/pool_parsing.c Tue Mar 17 18:13:23 2009 -0700 @@ -0,0 +1,95 @@ +/* + * Copyright IBM Corp. 2009 + * + * Authors: + * Kaitlin Rupert + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "pool_parsing.h" +#include "../src/svpc_types.h" + +static void cleanup_net_pool(struct net_pool pool) { + free(pool.addr); + free(pool.netmask); + free(pool.ip_start); + free(pool.ip_end); + free(pool.forward_mode); + free(pool.forward_dev); +} + +void cleanup_virt_pool(struct virt_pool **pool) +{ + struct virt_pool *_pool = *pool; + + if ((pool == NULL) || (*pool == NULL)) + return; + + if (_pool->type == CIM_RES_TYPE_NET) + cleanup_net_pool(_pool->pool_info.net); + + free(_pool->id); + free(_pool); + + *pool = NULL; +} + +int define_pool(virConnectPtr conn, const char *xml, int res_type) +{ + int ret = 1; + + if (res_type == CIM_RES_TYPE_NET) { + virNetworkPtr ptr = virNetworkDefineXML(conn, xml); + if (ptr == NULL) { + CU_DEBUG("Unable to define virtual network"); + return 0; + } + + if (virNetworkCreate(ptr) != 0) { + CU_DEBUG("Unable to start virtual network"); + ret = 0; + + if (virNetworkUndefine(ptr) != 0) + CU_DEBUG("Unable to undefine virtual network"); + } + + virNetworkFree(ptr); + } + + return ret; +} + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ + diff -r b092b78f4a89 -r 4da70fdbb9a0 libxkutil/pool_parsing.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libxkutil/pool_parsing.h Tue Mar 17 18:13:23 2009 -0700 @@ -0,0 +1,62 @@ +/* + * Copyright IBM Corp. 2009 + * + * Authors: + * Kaitlin Rupert + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser 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 + */ +#ifndef __RES_POOLS_H_ +#define __RES_POOLS_H + +#include +#include +#include + +#include "../src/svpc_types.h" + +struct net_pool { + char *addr; + char *netmask; + char *ip_start; + char *ip_end; + char *forward_mode; + char *forward_dev; +}; + +struct virt_pool { + uint16_t type; + union { + struct net_pool net; + } pool_info; + char *id; +}; + +void cleanup_virt_pool(struct virt_pool **pool); + +int define_pool(virConnectPtr conn, const char *xml, int res_type); + + +#endif + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ From kaitlin at linux.vnet.ibm.com Wed Mar 25 23:05:07 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 25 Mar 2009 16:05:07 -0700 Subject: [Libvirt-cim] [PATCH 2 of 4] (#3) Add logic to generate a pool XML to xmlgen.c In-Reply-To: References: Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID c9ad0f077d3882423b438340d3b557c398d4c582 # Parent 4da70fdbb9a00f3fe874c3347f175efd973d8745 (#3) Add logic to generate a pool XML to xmlgen.c Updates from 2 to 3: -Be sure to return an error message from net_pool_xml() -Also fix the return bits of pool_to_xml() - don't print out the xml if the xml variable is NULL. Updates from 1 to 2: -The pool ID should not be added as a property to the top level network tag. Signed-off-by: Kaitlin Rupert diff -r 4da70fdbb9a0 -r c9ad0f077d38 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Tue Mar 17 18:13:23 2009 -0700 +++ b/libxkutil/xmlgen.c Tue Mar 17 18:13:23 2009 -0700 @@ -38,6 +38,7 @@ #define XML_ERROR "Failed to allocate XML memory" typedef const char *(*devfn_t)(xmlNodePtr node, struct domain *dominfo); +typedef const char *(*poolfn_t)(xmlNodePtr node, struct virt_pool *pool); static char *disk_block_xml(xmlNodePtr root, struct disk_device *dev) { @@ -770,6 +771,122 @@ return xml; } +static const char *net_pool_xml(xmlNodePtr root, + struct virt_pool *_pool) +{ + xmlNodePtr net = NULL; + xmlNodePtr ip = NULL; + xmlNodePtr forward = NULL; + xmlNodePtr dhcp = NULL; + xmlNodePtr range = NULL; + struct net_pool *pool = &_pool->pool_info.net; + + net = xmlNewChild(root, NULL, BAD_CAST "network", NULL); + if (net == NULL) + goto out; + + if (xmlNewChild(net, NULL, BAD_CAST "name", BAD_CAST _pool->id) == NULL) + goto out; + + if (xmlNewChild(net, NULL, BAD_CAST "bridge", NULL) == NULL) + goto out; + + if (pool->forward_mode != NULL) { + forward = xmlNewChild(net, NULL, BAD_CAST "forward", NULL); + if (forward == NULL) + goto out; + + if (xmlNewProp(forward, + BAD_CAST "mode", + BAD_CAST pool->forward_mode) == NULL) + goto out; + + if (pool->forward_dev != NULL) { + if (xmlNewProp(forward, + BAD_CAST "dev", + BAD_CAST pool->forward_dev) == NULL) + goto out; + } + } + + ip = xmlNewChild(net, NULL, BAD_CAST "ip", NULL); + if (ip == NULL) + goto out; + + if (xmlNewProp(ip, BAD_CAST "address", BAD_CAST pool->addr) == NULL) + goto out; + + if (xmlNewProp(ip, BAD_CAST "netmask", BAD_CAST pool->netmask) == NULL) + goto out; + + if ((pool->ip_start != NULL) && (pool->ip_end != NULL)) { + dhcp = xmlNewChild(ip, NULL, BAD_CAST "dhcp", NULL); + if (dhcp == NULL) + goto out; + + range = xmlNewChild(dhcp, NULL, BAD_CAST "range", NULL); + if (range == NULL) + goto out; + + if (xmlNewProp(range, + BAD_CAST "start", + BAD_CAST pool->ip_start) == NULL) + goto out; + + if (xmlNewProp(range, + BAD_CAST "end", + BAD_CAST pool->ip_end) == NULL) + goto out; + } + + return NULL; + + out: + return XML_ERROR; +} + +char *pool_to_xml(struct virt_pool *pool) { + char *xml = NULL; + xmlNodePtr root = NULL; + int type = pool->type; + const char *msg = NULL; + poolfn_t func; + + root = xmlNewNode(NULL, BAD_CAST "tmp"); + if (root == NULL) { + msg = XML_ERROR; + goto out; + } + + switch (type) { + case CIM_RES_TYPE_NET: + func = net_pool_xml; + break; + default: + CU_DEBUG("pool_to_xml: invalid type specified: %d", type); + msg = "pool_to_xml: invalid type specified"; + goto out; + } + + msg = func(root, pool); + if (msg != NULL) + goto out; + + xml = tree_to_xml(root->children); + if (xml == NULL) + msg = "XML generation failed"; + out: + if (msg != NULL) { + CU_DEBUG("Failed to create pool XML: %s", msg); + } else { + CU_DEBUG("Created pool XML:\n%s\n", xml); + } + + xmlFreeNode(root); + + return xml; +} + /* * Local Variables: * mode: C diff -r 4da70fdbb9a0 -r c9ad0f077d38 libxkutil/xmlgen.h --- a/libxkutil/xmlgen.h Tue Mar 17 18:13:23 2009 -0700 +++ b/libxkutil/xmlgen.h Tue Mar 17 18:13:23 2009 -0700 @@ -22,6 +22,7 @@ #define __XMLGEN_H #include "device_parsing.h" +#include "pool_parsing.h" #include "cmpidt.h" @@ -33,4 +34,6 @@ char *system_to_xml(struct domain *dominfo); char *device_to_xml(struct virt_device *dev); +char *pool_to_xml(struct virt_pool *pool); + #endif From kaitlin at linux.vnet.ibm.com Wed Mar 25 23:05:05 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 25 Mar 2009 16:05:05 -0700 Subject: [Libvirt-cim] [PATCH 0 of 4] #3 Add support for network pool creation Message-ID: This just adds basic support for network pool creation. See individual patches for changes. From kaitlin at linux.vnet.ibm.com Wed Mar 25 23:05:09 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 25 Mar 2009 16:05:09 -0700 Subject: [Libvirt-cim] [PATCH 4 of 4] (#2) Add suport for CreateChildResourcePool In-Reply-To: References: Message-ID: <8e877a88eae107b74168.1238022309@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1237338803 25200 # Node ID 8e877a88eae107b741682e708fc9e0f713129de2 # Parent ed393e68e8997a324651fa923e36307bae80e0ce (#2) Add suport for CreateChildResourcePool. Right now this creates a standalone pool. Modifications need to be made so there is a parent primordial pool, and all created network pools should be concrete pools that are child pools of the primordial pool. Updates from 1 to 2: -No need to to use strdup() when assigning a value to a const char* -Be sure to call cleanup_virt_pool() to free the items in the structure Signed-off-by: Kaitlin Rupert diff -r ed393e68e899 -r 8e877a88eae1 src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Tue Mar 17 18:13:23 2009 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.c Tue Mar 17 18:13:23 2009 -0700 @@ -3,6 +3,7 @@ * * Authors: * Dan Smith + * Kaitlin Rupert * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -27,12 +28,301 @@ #include #include "misc_util.h" +#include "xmlgen.h" +#include "svpc_types.h" #include "Virt_HostSystem.h" #include "Virt_ResourcePoolConfigurationService.h" +#include "Virt_DevicePool.h" +#include "Virt_RASD.h" const static CMPIBroker *_BROKER; +const char *DEF_POOL_NAME = "libvirt-cim-pool"; + +static CMPIStatus create_child_pool_parse_args(const CMPIArgs *argsin, + const char **name, + CMPIArray **set, + CMPIArray **parent_arr) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (cu_get_str_arg(argsin, "ElementName", name) != CMPI_RC_OK) { + CU_DEBUG("No ElementName string argument"); + *name = strdup(DEF_POOL_NAME); + } + + if (cu_get_array_arg(argsin, "Settings", set) != CMPI_RC_OK) { + CU_DEBUG("Failed to get Settings array arg"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_INVALID_PARAMETER, + "Missing argument `Settings'"); + goto out; + } + + if (cu_get_array_arg(argsin, "ParentPool", parent_arr) != CMPI_RC_OK) + CU_DEBUG("No parent pool specified during pool creation"); + + out: + return s; +} + +static const char *net_rasd_to_pool(CMPIInstance *inst, + struct virt_pool *pool, + const char *ns) +{ + const char *val = NULL; + const char *msg = NULL; + + /*FIXME: Need to add validation of addresses if user specified */ + + if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) + val = "192.168.122.1"; + + free(pool->pool_info.net.addr); + pool->pool_info.net.addr = strdup(val); + + if (cu_get_str_prop(inst, "Netmask", &val) != CMPI_RC_OK) + val = "255.255.255.0"; + + free(pool->pool_info.net.netmask); + pool->pool_info.net.netmask = strdup(val); + + if (cu_get_str_prop(inst, "IPRangeStart", &val) != CMPI_RC_OK) + val = "192.168.122.2"; + + free(pool->pool_info.net.ip_start); + pool->pool_info.net.ip_start = strdup(val); + + if (cu_get_str_prop(inst, "IPRangeStart", &val) != CMPI_RC_OK) + val = "192.168.122.254"; + + free(pool->pool_info.net.ip_end); + pool->pool_info.net.ip_end = strdup(val); + + return msg; + +} + +static const char *rasd_to_vpool(CMPIInstance *inst, + struct virt_pool *pool, + uint16_t type, + const char *ns) +{ + pool->type = type; + + if (type == CIM_RES_TYPE_NET) { + return net_rasd_to_pool(inst, pool, ns); + } + + pool->type = CIM_RES_TYPE_UNKNOWN; + + return "Resource type not supported on this platform"; +} + +static const char *get_pool_properties(CMPIArray *settings, + struct virt_pool *pool) +{ + CMPIObjectPath *op; + CMPIData item; + CMPIInstance *inst; + const char *msg = NULL; + uint16_t type; + int count; + + count = CMGetArrayCount(settings, NULL); + if (count < 1) + return "No resources specified"; + + if (count > 1) + CU_DEBUG("More than one RASD specified during pool creation"); + + item = CMGetArrayElementAt(settings, 0, NULL); + if (CMIsNullObject(item.value.inst)) + return "Internal array error"; + + inst = item.value.inst; + + op = CMGetObjectPath(inst, NULL); + if (op == NULL) + return "Unknown resource instance type"; + + if (res_type_from_rasd_classname(CLASSNAME(op), &type) != CMPI_RC_OK) + return "Unable to determine resource type"; + + if (type != CIM_RES_TYPE_NET) + return "Only network pools currently supported"; + + msg = rasd_to_vpool(inst, pool, type, NAMESPACE(op)); + + return msg; +} + +static char *get_pool_id(int res_type, + const char *name) +{ + char *id = NULL; + const char *pool = NULL; + + if (res_type == CIM_RES_TYPE_NET) + pool = "NetworkPool"; + else if (res_type == CIM_RES_TYPE_DISK) + pool = "DiskPool"; + else if (res_type == CIM_RES_TYPE_MEM) + pool = "MemoryPool"; + else if (res_type == CIM_RES_TYPE_PROC) + pool = "ProcessorPool"; + else if (res_type == CIM_RES_TYPE_GRAPHICS) + pool = "GraphicsPool"; + else if (res_type == CIM_RES_TYPE_INPUT) + pool = "InputPool"; + else + pool = "Unknown"; + + if (asprintf(&id, "%s/%s", pool, name) == -1) { + return NULL; + } + + return id; +} + +static CMPIInstance *connect_and_create(char *xml, + const CMPIObjectPath *ref, + const char *id, + int res_type, + CMPIStatus *s) +{ + virConnectPtr conn; + CMPIInstance *inst = NULL; + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), s); + if (conn == NULL) { + CU_DEBUG("libvirt connection failed"); + return NULL; + } + + if (define_pool(conn, xml, res_type) == 0) { + virt_set_status(_BROKER, s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to create resource pool"); + goto out; + } + + *s = get_pool_by_name(_BROKER, ref, id, &inst); + if (s->rc != CMPI_RC_OK) { + CU_DEBUG("Failed to get new pool instance: %s", id); + cu_statusf(_BROKER, s, + CMPI_RC_ERR_FAILED, + "Failed to lookup resulting pool"); + } + + out: + virConnectClose(conn); + + return inst; +} + +static CMPIStatus create_child_pool(CMPIMethodMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + uint32_t rc = CIM_SVPC_RETURN_FAILED; + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst = NULL; + CMPIArray *set; + CMPIArray *parent_pools; + CMPIObjectPath *result; + struct virt_pool *pool = NULL; + const char *name = NULL; + const char *msg = NULL; + char *full_id = NULL; + char *xml = NULL; + + CU_DEBUG("CreateChildResourcePool"); + + s = create_child_pool_parse_args(argsin, &name, &set, &parent_pools); + if (s.rc != CMPI_RC_OK) + goto out; + + pool = calloc(1, sizeof(*pool)); + if (pool == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to allocate pool struct"); + goto out; + } + + msg = get_pool_properties(set, pool); + if (msg != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Settings Error: %s", msg); + + goto out; + } + + full_id = get_pool_id(pool->type, name); + if (full_id == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to format resulting pool ID"); + goto out; + } + + s = get_pool_by_name(_BROKER, reference, full_id, &inst); + if (s.rc == CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Pool with that name already exists"); + goto out; + } + + pool->id = strdup(name); + + xml = pool_to_xml(pool); + if (xml == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to generate XML for resource pool"); + goto out; + } + + CU_DEBUG("Pool XML:\n%s", xml); + + inst = connect_and_create(xml, reference, full_id, pool->type, &s); + if (inst == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to create resource pool"); + goto out; + } + + result = CMGetObjectPath(inst, &s); + if ((result != NULL) && (s.rc == CMPI_RC_OK)) { + CMSetNameSpace(result, NAMESPACE(reference)); + CMAddArg(argsout, "Pool", &result, CMPI_ref); + } + + /* FIXME: Trigger indication here */ + + cu_statusf(_BROKER, &s, CMPI_RC_OK, ""); + out: + cleanup_virt_pool(&pool); + + free(xml); + free(full_id); + + if (s.rc == CMPI_RC_OK) + rc = CIM_SVPC_RETURN_COMPLETED; + CMReturnData(results, &rc, CMPI_uint32); + + return s; +} + static CMPIStatus dummy_handler(CMPIMethodMI *self, const CMPIContext *context, const CMPIResult *results, @@ -51,8 +341,12 @@ static struct method_handler CreateChildResourcePool = { .name = "CreateChildResourcePool", - .handler = dummy_handler, - .args = { ARG_END }, + .handler = create_child_pool, + .args = {{"ElementName", CMPI_string, true}, + {"Settings", CMPI_instanceA, false}, + {"ParentPool", CMPI_refA, true}, + ARG_END + } }; static struct method_handler AddResourcesToResourcePool = { From rmaciel at linux.vnet.ibm.com Thu Mar 26 17:26:00 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Thu, 26 Mar 2009 14:26:00 -0300 Subject: [Libvirt-cim] [PATCH 0 of 4] #3 Add support for network pool creation In-Reply-To: References: Message-ID: <49CBBAA8.7080903@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > This just adds basic support for network pool creation. > > See individual patches for changes. > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Thu Mar 26 18:19:09 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Thu, 26 Mar 2009 15:19:09 -0300 Subject: [Libvirt-cim] [PATCH] (#3) Changed the output of AllocationCapability association when using DiskPool as input Message-ID: <3b757b1d572ed9a6bc84.1238091549@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1236119796 10800 # Node ID 3b757b1d572ed9a6bc84a767140ae48c047027b0 # Parent 9010a4ffa133439c3e66a64552840e2a76ef9ad9 (#3) Changed the output of AllocationCapability association when using DiskPool as input This patch fix the results of a 'association instances' query when passing a disk pool AllocationCapabilities reference as input. Before this patch, this query returned RASD templates for the disk pools, but now it returns the RASD templates for each of the volumes which composes the disk pool passed as input. 3: - Kept code for versions which doesn't support disk pools 2: - Changed code style based on feedback - When emulation_type = 1 (cdrom device), the VirtualQuantity property of the template is not set - Changed ID of cdrom device - LXC is handled in a special way, because it doesn't have volumes To test: - Create a domain containing a diskpool and some volumes - Execute query: wbemcli ein 'http://localhost:5988/root/virt:CIM_AllocationCapabilities' - Select the reference to a diskpool and use in an association query like the one below: wbemcli ai -nl -ac KVM_SettingsDefineCapabilities 'http://@localhost:5988/root/virt:KVM_AllocationCapabilities.InstanceID="DiskPool/default"' - There must be four templates for each volume in the diskpool (MINIMUM, MAXIMUM, DEFAULT, INCREMENT) and their address must correspond to the address of the volume Signed-off-by: Richard Maciel diff -r 9010a4ffa133 -r 3b757b1d572e src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Tue Mar 17 15:18:27 2009 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Mar 03 19:36:36 2009 -0300 @@ -4,6 +4,7 @@ * Authors: * Dan Smith * Jay Gagnon + * Richard Maciel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -50,6 +51,16 @@ #include "Virt_AllocationCapabilities.h" #include "Virt_Device.h" +/* + * Right now, detect support and use it, if available. + * Later, this can be a configure option if needed + */ +#if LIBVIR_VERSION_NUMBER > 4000 +# define VIR_USE_LIBVIRT_STORAGE 1 +#else +# define VIR_USE_LIBVIRT_STORAGE 0 +#endif + const static CMPIBroker *_BROKER; /* These are used in more than one place so they are defined here. */ @@ -561,7 +572,376 @@ out: return s; } + +#if VIR_USE_LIBVIRT_STORAGE +static CMPIStatus set_disk_props(int type, + const CMPIObjectPath *ref, + const char *id, + const char *disk_path, + uint64_t disk_size, + uint16_t emu_type, + struct inst_list *list) +{ + const char *dev; + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (type == DOMAIN_LXC) { + dev = "/lxc_mnt/tmp"; + } + else { + dev = "hda"; + } + + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; + + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "AllocationQuantity", + (CMPIValue *)"MegaBytes", CMPI_chars); + CMSetProperty(inst, "Address", (CMPIValue *)disk_path, CMPI_chars); + + if (type == DOMAIN_LXC) + CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); + else { + if (emu_type == 0) + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&disk_size, CMPI_uint64); + + if (type == DOMAIN_XENPV) { + dev = "xvda"; + CMSetProperty(inst, "Caption", + (CMPIValue *)"PV disk", CMPI_chars); + } else if (type == DOMAIN_XENFV) { + CMSetProperty(inst, "Caption", + (CMPIValue *)"FV disk", CMPI_chars); + } + + CMSetProperty(inst, "VirtualDevice", + (CMPIValue *)dev, CMPI_chars); + CMSetProperty(inst, "EmulatedType", + (CMPIValue *)&emu_type, CMPI_uint16); + } + + inst_list_add(list, inst); + + out: + return s; +} + +static CMPIStatus cdrom_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + char *pfx; + const char *id; + char *vol_path; + uint64_t vol_size = 0; + CMPIStatus s = {CMPI_RC_OK, NULL}; + uint16_t emu_type = 1; + + switch(template_type) { + case SDC_RASD_MIN: + id = "Minimum CDROM"; + break; + case SDC_RASD_MAX: + id = "Maximum CDROM"; + break; + case SDC_RASD_INC: + id = "Increment CDROM"; + break; + case SDC_RASD_DEF: + id = "Default CDROM"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + vol_path = "/dev/null"; + + pfx = class_prefix_name(CLASSNAME(ref)); + + if (STREQ(pfx, "Xen")) { + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + for (; i < 2; i++) { + s = set_disk_props(xen_type[i], + ref, + id, + vol_path, + vol_size, + emu_type, + list); + } + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, + ref, + id, + vol_path, + vol_size, + emu_type, + list); + + } else if (!STREQ(pfx, "LXC")){ + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported virtualization type"); + } + + out: + return s; + +} + + +static CMPIStatus volume_template(const CMPIObjectPath *ref, + int template_type, + virStorageVolPtr volume_ptr, + struct inst_list *list) +{ + char *pfx; + const char *id; + char *vol_path; + uint64_t vol_size; + virStorageVolInfo vol_info; + CMPIStatus s = {CMPI_RC_OK, NULL}; + int ret; + uint16_t emu_type = 0; + + ret = virStorageVolGetInfo(volume_ptr, &vol_info); + if (ret == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume information"); + goto out; + } + + switch(template_type) { + case SDC_RASD_MIN: + if (SDC_DISK_MIN > (uint64_t)vol_info.capacity) + vol_size = (uint64_t)vol_info.capacity; + else + vol_size = SDC_DISK_MIN; + id = "Minimum"; + break; + case SDC_RASD_MAX: + vol_size = (uint64_t)vol_info.capacity; + id = "Maximum"; + break; + case SDC_RASD_INC: + vol_size = SDC_DISK_INC; + id = "Increment"; + break; + case SDC_RASD_DEF: + vol_size = (uint64_t)vol_info.allocation; + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + vol_path = virStorageVolGetPath(volume_ptr); + if (vol_path == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume path"); + goto out; + } + + pfx = class_prefix_name(CLASSNAME(ref)); + + if (STREQ(pfx, "Xen")) { + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + + for (; i < 2; i++) { + s = set_disk_props(xen_type[i], + ref, + id, + vol_path, + vol_size, + emu_type, + list); + } + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, + ref, + id, + vol_path, + vol_size, + emu_type, + list); + } else { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported virtualization type"); + } + + out: + return s; +} + +static CMPIStatus lxc_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + uint64_t vol_size = 0; + int emu_type = 0; + char *vol_path = "/tmp"; + const char *id; + + CMPIStatus s = {CMPI_RC_OK, NULL}; + + switch(template_type) { + case SDC_RASD_MIN: + id = "Minimum"; + break; + case SDC_RASD_MAX: + id = "Maximum"; + break; + case SDC_RASD_INC: + id = "Increment"; + break; + case SDC_RASD_DEF: + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + s = set_disk_props(DOMAIN_LXC, + ref, + id, + vol_path, + vol_size, + emu_type, + list); + + out: + return s; + +} + +static CMPIStatus disk_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn = NULL; + virStoragePoolPtr poolptr = NULL; + virStorageVolPtr volptr = NULL; + const char *instid = NULL; + char *host = NULL; + const char *poolname = NULL; + char **volnames = NULL; + int numvols = 0; + int numvolsret = 0; + int i; + char *pfx = NULL; + + pfx = class_prefix_name(CLASSNAME(ref)); + if (STREQ(pfx, "LXC")) { + s = lxc_template(ref, template_type, list); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + + if (cu_get_str_path(ref, "InstanceID", &instid) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get InstanceID for disk device"); + goto out; + } + + if (parse_fq_devid(instid, &host, (char **)&poolname) != 1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get pool device id"); + goto out; + } + + if ((poolptr = virStoragePoolLookupByName(conn, poolname)) == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage pool `%s' not found", + poolname); + goto out; + } + + if ((numvols = virStoragePoolNumOfVolumes(poolptr)) == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get the number of volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + volnames = (char **)malloc(sizeof(char *) * numvols); + if (volnames == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Could not allocate space for list of volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + numvolsret = virStoragePoolListVolumes(poolptr, volnames, numvols); + + if (numvolsret == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get a pointer to volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + for (i = 0; i < numvolsret; i++) { + volptr = virStorageVolLookupByName(poolptr, volnames[i]); + if (volptr == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage Volume `%s' not found", + volnames[i]); + goto out; + } + + s = volume_template(ref, template_type, volptr, list); + if (s.rc != CMPI_RC_OK) + goto out; + } + + s = cdrom_template(ref, template_type, list); + + out: + free(volnames); + virStorageVolFree(volptr); + virStoragePoolFree(poolptr); + virConnectClose(conn); + + return s; +} +#else static int get_disk_freespace(const CMPIObjectPath *ref, CMPIStatus *s, uint64_t *free_space) @@ -761,6 +1141,7 @@ out: return s; } +#endif static CMPIStatus graphics_template(const CMPIObjectPath *ref, int template_type, From kaitlin at linux.vnet.ibm.com Thu Mar 26 21:27:07 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 26 Mar 2009 14:27:07 -0700 Subject: [Libvirt-cim] [PATCH] (#3) Changed the output of AllocationCapability association when using DiskPool as input In-Reply-To: <3b757b1d572ed9a6bc84.1238091549@localhost.localdomain> References: <3b757b1d572ed9a6bc84.1238091549@localhost.localdomain> Message-ID: <49CBF32B.5060104@linux.vnet.ibm.com> Richard Maciel wrote: > # HG changeset patch > # User Richard Maciel > # Date 1236119796 10800 > # Node ID 3b757b1d572ed9a6bc84a767140ae48c047027b0 > # Parent 9010a4ffa133439c3e66a64552840e2a76ef9ad9 > (#3) Changed the output of AllocationCapability association when using DiskPool as input > > This patch fix the results of a 'association instances' query when passing a disk pool AllocationCapabilities reference as input. Before this patch, this query returned RASD templates for the disk pools, but now it returns the RASD templates for each of the volumes which composes the disk pool passed as input. > > 3: > - Kept code for versions which doesn't support disk pools This approach leaves a lot of redundant code. There aren't alot of differences in the two versions of set_disk_props(). So any time there is a change in the way we set a given attribute (or a new attribute, etc), we'd need to modify both code paths... It seems like only the disk_template() function needs to differ.. what about something like: When disk pool support doesn't exist: 1) Call default_disk_template() 2) if virt_type != LXC: Call cdrom_template() When disk pool support exists: 1) if virt_type == LXC: Call _disk_template() 2) Do the storage volume look up 3) Call volume_template() 4) Call cdrom_template() Then default_disk_template() would look like what disk_template() looks like in the current code. Does this seem reasonable? > +static CMPIStatus cdrom_template(const CMPIObjectPath *ref, > + int template_type, > + struct inst_list *list) > +{ > + char *pfx; > + const char *id; > + char *vol_path; This can be a const - otherwise it needs to be freed before exiting the function. > + uint64_t vol_size = 0; > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + uint16_t emu_type = 1; > + > + switch(template_type) { > + case SDC_RASD_MIN: > + id = "Minimum CDROM"; > + break; > + case SDC_RASD_MAX: > + id = "Maximum CDROM"; > + break; > + case SDC_RASD_INC: > + id = "Increment CDROM"; > + break; > + case SDC_RASD_DEF: > + id = "Default CDROM"; > + break; > + default: > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unsupported sdc_rasd type"); > + goto out; > + } > + > + vol_path = "/dev/null"; > + > + pfx = class_prefix_name(CLASSNAME(ref)); pfx isn't freed. > + > + if (STREQ(pfx, "Xen")) { > + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; > + int i = 0; > > + for (; i < 2; i++) { > + s = set_disk_props(xen_type[i], > + ref, > + id, > + vol_path, > + vol_size, > + emu_type, > + list); > + } > + } else if (STREQ(pfx, "KVM")) { > + s = set_disk_props(DOMAIN_KVM, > + ref, > + id, > + vol_path, > + vol_size, > + emu_type, > + list); > + > + } else if (!STREQ(pfx, "LXC")){ > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unsupported virtualization type"); > + } > + > + out: > + return s; > + > +} > + > + > +static CMPIStatus volume_template(const CMPIObjectPath *ref, > + int template_type, > + virStorageVolPtr volume_ptr, > + struct inst_list *list) > +{ > + char *pfx; > + const char *id; > + char *vol_path; > + uint64_t vol_size; > + virStorageVolInfo vol_info; > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + int ret; > + uint16_t emu_type = 0; > + > + ret = virStorageVolGetInfo(volume_ptr, &vol_info); > + if (ret == -1) { > + virt_set_status(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + virStorageVolGetConnect(volume_ptr), > + "Unable to get volume information"); > + goto out; > + } > + > + switch(template_type) { > + case SDC_RASD_MIN: > + if (SDC_DISK_MIN > (uint64_t)vol_info.capacity) > + vol_size = (uint64_t)vol_info.capacity; > + else > + vol_size = SDC_DISK_MIN; > + id = "Minimum"; > + break; > + case SDC_RASD_MAX: > + vol_size = (uint64_t)vol_info.capacity; > + id = "Maximum"; > + break; > + case SDC_RASD_INC: > + vol_size = SDC_DISK_INC; > + id = "Increment"; > + break; > + case SDC_RASD_DEF: > + vol_size = (uint64_t)vol_info.allocation; > + id = "Default"; > + break; > + default: > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unsupported sdc_rasd type"); > + goto out; > + } > + > + vol_path = virStorageVolGetPath(volume_ptr); This needs to be freed before exiting. > + if (vol_path == NULL) { > + virt_set_status(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + virStorageVolGetConnect(volume_ptr), > + "Unable to get volume path"); > + goto out; > + } > + > + pfx = class_prefix_name(CLASSNAME(ref)); Needs to be freed before exiting. > +static CMPIStatus lxc_template(const CMPIObjectPath *ref, > + int template_type, > + struct inst_list *list) > +{ > + uint64_t vol_size = 0; > + int emu_type = 0; > + char *vol_path = "/tmp"; Declare this as a const. > + const char *id; > + > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + > + switch(template_type) { > + case SDC_RASD_MIN: > + id = "Minimum"; > + break; > + case SDC_RASD_MAX: > + id = "Maximum"; > + break; > + case SDC_RASD_INC: > + id = "Increment"; > + break; > + case SDC_RASD_DEF: > + id = "Default"; > + break; > + default: > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unsupported sdc_rasd type"); > + goto out; > + } > + > + s = set_disk_props(DOMAIN_LXC, > + ref, > + id, > + vol_path, > + vol_size, > + emu_type, > + list); > + > + out: > + return s; > + > +} > + > +static CMPIStatus disk_template(const CMPIObjectPath *ref, > + int template_type, > + struct inst_list *list) > +{ > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + virConnectPtr conn = NULL; > + virStoragePoolPtr poolptr = NULL; > + virStorageVolPtr volptr = NULL; > + const char *instid = NULL; > + char *host = NULL; > + const char *poolname = NULL; > + char **volnames = NULL; > + int numvols = 0; > + int numvolsret = 0; > + int i; > + char *pfx = NULL; > + > + pfx = class_prefix_name(CLASSNAME(ref)); Free this before exiting the function. > + if (STREQ(pfx, "LXC")) { > + s = lxc_template(ref, template_type, list); > + goto out; > + } > + > + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); > + > + if (cu_get_str_path(ref, "InstanceID", &instid) != CMPI_RC_OK) { > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unable to get InstanceID for disk device"); > + goto out; > + } > + > + if (parse_fq_devid(instid, &host, (char **)&poolname) != 1) { Free host before exiting the function. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Fri Mar 27 18:19:22 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 27 Mar 2009 15:19:22 -0300 Subject: [Libvirt-cim] [PATCH] (#4) Changed the output of AllocationCapability association when using DiskPool as input Message-ID: <6277cea336817d6a8885.1238177962@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1236119796 10800 # Node ID 6277cea336817d6a8885d0caeb2e7a0a92705150 # Parent 9010a4ffa133439c3e66a64552840e2a76ef9ad9 (#4) Changed the output of AllocationCapability association when using DiskPool as input This patch fix the results of a 'association instances' query when passing a disk pool AllocationCapabilities reference as input. Before this patch, this query returned RASD templates for the disk pools, but now it returns the RASD templates for each of the volumes which composes the disk pool passed as input. 4: - Joined both set_disk_props functions in only one (using #if to separate versions). This removed duplicated code. - Fixed memory leak points 3: - Kept code for versions which doesn't support disk pools 2: - Changed code style based on feedback - When emulation_type = 1 (cdrom device), the VirtualQuantity property of the template is not set - Changed ID of cdrom device - LXC is handled in a special way, because it doesn't have volumes To test: - Create a domain containing a diskpool and some volumes - Execute query: wbemcli ein 'http://localhost:5988/root/virt:CIM_AllocationCapabilities' - Select the reference to a diskpool and use in an association query like the one below: wbemcli ai -nl -ac KVM_SettingsDefineCapabilities 'http://@localhost:5988/root/virt:KVM_AllocationCapabilities.InstanceID="DiskPool/default"' - There must be four templates for each volume in the diskpool (MINIMUM, MAXIMUM, DEFAULT, INCREMENT) and their address must correspond to the address of the volume Signed-off-by: Richard Maciel diff -r 9010a4ffa133 -r 6277cea33681 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Tue Mar 17 15:18:27 2009 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Mar 03 19:36:36 2009 -0300 @@ -4,6 +4,7 @@ * Authors: * Dan Smith * Jay Gagnon + * Richard Maciel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -50,6 +51,16 @@ #include "Virt_AllocationCapabilities.h" #include "Virt_Device.h" +/* + * Right now, detect support and use it, if available. + * Later, this can be a configure option if needed + */ +#if LIBVIR_VERSION_NUMBER > 4000 +# define VIR_USE_LIBVIRT_STORAGE 1 +#else +# define VIR_USE_LIBVIRT_STORAGE 0 +#endif + const static CMPIBroker *_BROKER; /* These are used in more than one place so they are defined here. */ @@ -561,7 +572,385 @@ out: return s; } + +static CMPIStatus set_disk_props(int type, + const CMPIObjectPath *ref, + const char *id, + const char *disk_path, + uint64_t disk_size, + uint16_t emu_type, + struct inst_list *list) +{ + const char *dev; + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (type == DOMAIN_LXC) { + dev = "/lxc_mnt/tmp"; + } + else { + dev = "hda"; + } + + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; + + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "AllocationQuantity", + (CMPIValue *)"MegaBytes", CMPI_chars); + CMSetProperty(inst, "Address", (CMPIValue *)disk_path, CMPI_chars); + +#if !VIR_USE_LIBVIRT_STORAGE + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&disk_size, CMPI_uint64); +#endif + + if (type == DOMAIN_LXC) + CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); + else { +#if VIR_USE_LIBVIRT_STORAGE + if (emu_type == 0) + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&disk_size, CMPI_uint64); +#endif + + if (type == DOMAIN_XENPV) { + dev = "xvda"; + CMSetProperty(inst, "Caption", + (CMPIValue *)"PV disk", CMPI_chars); + } else if (type == DOMAIN_XENFV) { + CMSetProperty(inst, "Caption", + (CMPIValue *)"FV disk", CMPI_chars); + } + + CMSetProperty(inst, "VirtualDevice", + (CMPIValue *)dev, CMPI_chars); + CMSetProperty(inst, "EmulatedType", + (CMPIValue *)&emu_type, CMPI_uint16); + } + + inst_list_add(list, inst); + + out: + return s; +} + +#if VIR_USE_LIBVIRT_STORAGE +static CMPIStatus cdrom_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + char *pfx = NULL; + const char *id; + const char *vol_path = "/dev/null"; + uint64_t vol_size = 0; + CMPIStatus s = {CMPI_RC_OK, NULL}; + uint16_t emu_type = 1; + + switch(template_type) { + case SDC_RASD_MIN: + id = "Minimum CDROM"; + break; + case SDC_RASD_MAX: + id = "Maximum CDROM"; + break; + case SDC_RASD_INC: + id = "Increment CDROM"; + break; + case SDC_RASD_DEF: + id = "Default CDROM"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + pfx = class_prefix_name(CLASSNAME(ref)); + if (STREQ(pfx, "Xen")) { + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + for (; i < 2; i++) { + s = set_disk_props(xen_type[i], + ref, + id, + vol_path, + vol_size, + emu_type, + list); + } + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, + ref, + id, + vol_path, + vol_size, + emu_type, + list); + + } else if (!STREQ(pfx, "LXC")){ + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported virtualization type"); + } + + out: + free(pfx); + + return s; +} + +static CMPIStatus volume_template(const CMPIObjectPath *ref, + int template_type, + virStorageVolPtr volume_ptr, + struct inst_list *list) +{ + char *pfx = NULL; + const char *id; + char *vol_path = NULL; + uint64_t vol_size; + virStorageVolInfo vol_info; + CMPIStatus s = {CMPI_RC_OK, NULL}; + int ret; + uint16_t emu_type = 0; + + ret = virStorageVolGetInfo(volume_ptr, &vol_info); + if (ret == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume information"); + goto out; + } + + switch(template_type) { + case SDC_RASD_MIN: + if (SDC_DISK_MIN > (uint64_t)vol_info.capacity) + vol_size = (uint64_t)vol_info.capacity; + else + vol_size = SDC_DISK_MIN; + id = "Minimum"; + break; + case SDC_RASD_MAX: + vol_size = (uint64_t)vol_info.capacity; + id = "Maximum"; + break; + case SDC_RASD_INC: + vol_size = SDC_DISK_INC; + id = "Increment"; + break; + case SDC_RASD_DEF: + vol_size = (uint64_t)vol_info.allocation; + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + vol_path = virStorageVolGetPath(volume_ptr); + if (vol_path == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume path"); + goto out; + } + + pfx = class_prefix_name(CLASSNAME(ref)); + + if (STREQ(pfx, "Xen")) { + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + + for (; i < 2; i++) { + s = set_disk_props(xen_type[i], + ref, + id, + vol_path, + vol_size, + emu_type, + list); + } + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, + ref, + id, + vol_path, + vol_size, + emu_type, + list); + } else { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported virtualization type"); + } + + out: + free(pfx); + free(vol_path); + + return s; +} + +static CMPIStatus lxc_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + uint64_t vol_size = 0; + int emu_type = 0; + const char *vol_path = "/tmp"; + const char *id; + + CMPIStatus s = {CMPI_RC_OK, NULL}; + + switch(template_type) { + case SDC_RASD_MIN: + id = "Minimum"; + break; + case SDC_RASD_MAX: + id = "Maximum"; + break; + case SDC_RASD_INC: + id = "Increment"; + break; + case SDC_RASD_DEF: + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + s = set_disk_props(DOMAIN_LXC, + ref, + id, + vol_path, + vol_size, + emu_type, + list); + + out: + return s; + +} + +static CMPIStatus disk_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn = NULL; + virStoragePoolPtr poolptr = NULL; + virStorageVolPtr volptr = NULL; + const char *instid = NULL; + char *host = NULL; + const char *poolname = NULL; + char **volnames = NULL; + int numvols = 0; + int numvolsret = 0; + int i; + char *pfx = NULL; + + pfx = class_prefix_name(CLASSNAME(ref)); + if (STREQ(pfx, "LXC")) { + s = lxc_template(ref, template_type, list); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + + if (cu_get_str_path(ref, "InstanceID", &instid) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get InstanceID for disk device"); + goto out; + } + + if (parse_fq_devid(instid, &host, (char **)&poolname) != 1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get pool device id"); + goto out; + } + + if ((poolptr = virStoragePoolLookupByName(conn, poolname)) == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage pool `%s' not found", + poolname); + goto out; + } + + if ((numvols = virStoragePoolNumOfVolumes(poolptr)) == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get the number of volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + volnames = (char **)malloc(sizeof(char *) * numvols); + if (volnames == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Could not allocate space for list of volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + numvolsret = virStoragePoolListVolumes(poolptr, volnames, numvols); + + if (numvolsret == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get a pointer to volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + for (i = 0; i < numvolsret; i++) { + volptr = virStorageVolLookupByName(poolptr, volnames[i]); + if (volptr == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage Volume `%s' not found", + volnames[i]); + goto out; + } + + s = volume_template(ref, template_type, volptr, list); + if (s.rc != CMPI_RC_OK) + goto out; + } + + s = cdrom_template(ref, template_type, list); + + out: + free(pfx); + free(volnames); + free(host); + virStorageVolFree(volptr); + virStoragePoolFree(poolptr); + virConnectClose(conn); + + return s; +} +#else static int get_disk_freespace(const CMPIObjectPath *ref, CMPIStatus *s, uint64_t *free_space) @@ -608,62 +997,6 @@ return ret; } -static CMPIStatus set_disk_props(int type, - 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}; - - if (type == DOMAIN_LXC) { - addr = "/tmp"; - dev = "/lxc_mnt/tmp"; - } - else { - dev = "hda"; - addr = "/dev/null"; - } - - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); - if ((inst == NULL) || (s.rc != CMPI_RC_OK)) - goto out; - - CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); - CMSetProperty(inst, "AllocationQuantity", - (CMPIValue *)"MegaBytes", CMPI_chars); - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&disk_size, CMPI_uint64); - CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars); - - if (type == DOMAIN_LXC) - CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); - else { - if (type == DOMAIN_XENPV) { - dev = "xvda"; - CMSetProperty(inst, "Caption", - (CMPIValue *)"PV disk", CMPI_chars); - } else if (type == DOMAIN_XENFV) { - CMSetProperty(inst, "Caption", - (CMPIValue *)"FV disk", CMPI_chars); - } - - CMSetProperty(inst, "VirtualDevice", - (CMPIValue *)dev, CMPI_chars); - CMSetProperty(inst, "EmulatedType", - (CMPIValue *)&emu_type, CMPI_uint16); - } - - inst_list_add(list, inst); - - out: - return s; -} - static CMPIStatus disk_template(const CMPIObjectPath *ref, int template_type, struct inst_list *list) @@ -673,6 +1006,7 @@ const char *id; uint64_t disk_size; uint16_t emu_type = 0; + const char *addr = "/dev/null"; CMPIStatus s = {CMPI_RC_OK, NULL}; switch(template_type) { @@ -702,7 +1036,6 @@ } pfx = class_prefix_name(CLASSNAME(ref)); - if (STREQ(pfx, "Xen")) { int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; int i = 0; @@ -712,6 +1045,7 @@ s = set_disk_props(xen_type[i], ref, id, + addr, disk_size, emu_type, list); @@ -721,7 +1055,8 @@ emu_type = 1; s = set_disk_props(xen_type[i], ref, - id, + id, + addr, disk_size, emu_type, list); @@ -731,7 +1066,8 @@ } else if (STREQ(pfx, "KVM")) { s = set_disk_props(DOMAIN_KVM, ref, - id, + id, + addr, disk_size, emu_type, list); @@ -742,13 +1078,16 @@ s = set_disk_props(DOMAIN_KVM, ref, id, + addr, disk_size, emu_type, list); } else if (STREQ(pfx, "LXC")) { + addr = "/tmp"; s = set_disk_props(DOMAIN_LXC, ref, id, + addr, disk_size, emu_type, list); @@ -761,6 +1100,7 @@ out: return s; } +#endif static CMPIStatus graphics_template(const CMPIObjectPath *ref, int template_type, From kaitlin at linux.vnet.ibm.com Fri Mar 27 21:36:38 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 27 Mar 2009 14:36:38 -0700 Subject: [Libvirt-cim] [PATCH] (#4) Changed the output of AllocationCapability association when using DiskPool as input In-Reply-To: <6277cea336817d6a8885.1238177962@localhost.localdomain> References: <6277cea336817d6a8885.1238177962@localhost.localdomain> Message-ID: <49CD46E6.4090304@linux.vnet.ibm.com> > +static CMPIStatus set_disk_props(int type, > + const CMPIObjectPath *ref, > + const char *id, > + const char *disk_path, > + uint64_t disk_size, > + uint16_t emu_type, > + struct inst_list *list) > +{ > + const char *dev; > + CMPIInstance *inst; > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + > + if (type == DOMAIN_LXC) { > + dev = "/lxc_mnt/tmp"; > + } > + else { > + dev = "hda"; > + } > + > + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); > + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) > + goto out; > + > + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); > + CMSetProperty(inst, "AllocationQuantity", > + (CMPIValue *)"MegaBytes", CMPI_chars); > + CMSetProperty(inst, "Address", (CMPIValue *)disk_path, CMPI_chars); > + > +#if !VIR_USE_LIBVIRT_STORAGE > + CMSetProperty(inst, "VirtualQuantity", > + (CMPIValue *)&disk_size, CMPI_uint64); > +#endif There's no need to set the VirtualQuantity for the CDROM. I know this is set in the current code, but it really doesn't make much sense. So I would remove this case. > + > + if (type == DOMAIN_LXC) > + CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); > + else { > +#if VIR_USE_LIBVIRT_STORAGE > + if (emu_type == 0) > + CMSetProperty(inst, "VirtualQuantity", > + (CMPIValue *)&disk_size, CMPI_uint64); > +#endif You can remove the #if / #endif here. Just set the VirtualQuantity in the case where emu_type == 0. > + > + if (type == DOMAIN_XENPV) { > + dev = "xvda"; > + CMSetProperty(inst, "Caption", > + (CMPIValue *)"PV disk", CMPI_chars); > + } else if (type == DOMAIN_XENFV) { > + CMSetProperty(inst, "Caption", > + (CMPIValue *)"FV disk", CMPI_chars); > + } > + > + CMSetProperty(inst, "VirtualDevice", > + (CMPIValue *)dev, CMPI_chars); > + CMSetProperty(inst, "EmulatedType", > + (CMPIValue *)&emu_type, CMPI_uint16); > + } > + > + inst_list_add(list, inst); > + > + out: > + return s; > +} > + > +#if VIR_USE_LIBVIRT_STORAGE > +static CMPIStatus cdrom_template(const CMPIObjectPath *ref, > + int template_type, > + struct inst_list *list) Why not use the CDROM template for both the VIR_USE_LIBVIRT_STORAGE and the !VIR_USE_LIBVIRT_STORAGE cases? The CDROM device should look the same regardless of whether this is storage pool support. Why not call this to handle CDROM devices in both situations? > +static CMPIStatus lxc_template(const CMPIObjectPath *ref, > + int template_type, > + struct inst_list *list) > +{ > + uint64_t vol_size = 0; > + int emu_type = 0; > + const char *vol_path = "/tmp"; > + const char *id; This function looks really similar to the disk_template() function (for the !VIR_USE_LIBVIRT_STORAGE case). Why not use the same function for both? This is why I suggested using a default_disk_template() function. > + > + CMPIStatus s = {CMPI_RC_OK, NULL}; > + > + switch(template_type) { > + case SDC_RASD_MIN: > + id = "Minimum"; > + break; > + case SDC_RASD_MAX: > + id = "Maximum"; > + break; > + case SDC_RASD_INC: > + id = "Increment"; > + break; > + case SDC_RASD_DEF: > + id = "Default"; > + break; > + default: > + cu_statusf(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + "Unsupported sdc_rasd type"); > + goto out; > + } > + > + s = set_disk_props(DOMAIN_LXC, > + ref, > + id, > + vol_path, > + vol_size, > + emu_type, > + list); > + > + out: > + return s; > + > +} > static CMPIStatus disk_template(const CMPIObjectPath *ref, > int template_type, > struct inst_list *list) This code looks similar to the lxc_template() code. Why not move this code to a separate function? > @@ -673,6 +1006,7 @@ > const char *id; > uint64_t disk_size; > uint16_t emu_type = 0; > + const char *addr = "/dev/null"; > CMPIStatus s = {CMPI_RC_OK, NULL}; > > switch(template_type) { > @@ -702,7 +1036,6 @@ > } > > pfx = class_prefix_name(CLASSNAME(ref)); > - > if (STREQ(pfx, "Xen")) { > int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; > int i = 0; > @@ -712,6 +1045,7 @@ > s = set_disk_props(xen_type[i], > ref, > id, > + addr, > disk_size, > emu_type, > list); > @@ -721,7 +1055,8 @@ > emu_type = 1; > s = set_disk_props(xen_type[i], > ref, > - id, > + id, > + addr, > disk_size, > emu_type, > list); > @@ -731,7 +1066,8 @@ > } else if (STREQ(pfx, "KVM")) { > s = set_disk_props(DOMAIN_KVM, > ref, > - id, > + id, > + addr, > disk_size, > emu_type, > list); > @@ -742,13 +1078,16 @@ > s = set_disk_props(DOMAIN_KVM, > ref, > id, > + addr, > disk_size, > emu_type, > list); > } else if (STREQ(pfx, "LXC")) { > + addr = "/tmp"; > s = set_disk_props(DOMAIN_LXC, > ref, > id, > + addr, > disk_size, > emu_type, > list); > @@ -761,6 +1100,7 @@ > out: > return s; > } > +#endif > > static CMPIStatus graphics_template(const CMPIObjectPath *ref, > int template_type, > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Sun Mar 29 22:09:19 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 29 Mar 2009 15:09:19 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add SLES 11 specific changeset and branch tests accordingly Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1229638233 28800 # Node ID f0b8eb632baa3a40721364a090ec3d40e4d68f6f # Parent ba88e8c112586b1578976e69c33cde6e4ecd91c3 [TEST] Add SLES 11 specific changeset and branch tests accordingly Signed-off-by: Kaitlin Rupert diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Fri Mar 27 16:44:59 2009 -0700 +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py Thu Dec 18 14:10:33 2008 -0800 @@ -27,7 +27,8 @@ import sys from XenKvmLib.enumclass import EnumInstances -from XenKvmLib.const import do_main, platform_sup, get_provider_version +from XenKvmLib.const import do_main, platform_sup, get_provider_version, \ + sles11_changeset from CimTest.Globals import logger, CIM_ERROR_ENUMERATE from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.common_util import cleanup_restore @@ -42,8 +43,8 @@ get_typed_class(virt, 'DiskPool'), get_typed_class(virt, 'NetworkPool')] - curr_cim_rev, changeset = get_provider_version(virt, ip) - if curr_cim_rev >= input_graphics_pool_rev: + curr_rev, changeset = get_provider_version(virt, ip) + if curr_rev >= input_graphics_pool_rev and changeset != sles11_changeset: pt.append(get_typed_class(virt, 'GraphicsPool')) pt.append(get_typed_class(virt, 'InputPool')) diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-cim/cimtest/ElementConforms/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri Mar 27 16:44:59 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Dec 18 14:10:33 2008 -0800 @@ -44,7 +44,7 @@ from CimTest import Globals from XenKvmLib.common_util import get_host_info from CimTest.Globals import logger, CIM_ERROR_ENUMERATE -from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.enumclass import EnumInstances @@ -61,12 +61,17 @@ cn_names = ["ComputerSystem"] - curr_cim_rev, changeset = get_provider_version(virt, server) - if curr_cim_rev >= libvirt_cim_ectp_changes: + curr_rev, changeset = get_provider_version(virt, server) + if curr_rev >= libvirt_cim_ectp_changes: cn_names2 = ["VirtualSystemMigrationService", "DiskPool", "NetworkPool", "ProcessorPool", "MemoryPool", "AllocationCapabilities"] cn_names.extend(cn_names2) - if curr_cim_rev >= libvirt_cim_input_graphics_ectp: + + if changeset == sles11_changeset: + cn_names2 = ["DiskPool", "NetworkPool", "ProcessorPool"] + cn_names.extend(cn_names2) + + if curr_rev >= libvirt_cim_input_graphics_ectp: cn_names.append("ConsoleRedirectionService") status, host_inst = get_host_info(server, virt) diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Fri Mar 27 16:44:59 2009 -0700 +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Thu Dec 18 14:10:33 2008 -0800 @@ -48,7 +48,7 @@ from XenKvmLib.enumclass import GetInstance, CIM_CimtestClass, EnumInstances from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import get_class -from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset sup_types = ['Xen', 'KVM', 'XenFV'] @@ -105,7 +105,7 @@ return status rev, changeset = get_provider_version(options.virt, options.ip) - if rev < err_msg_changeset: + if rev < err_msg_changeset and changeset != sles11_changeset: old_ret = { 'rc' : CIM_ERR_NOT_FOUND, 'desc' : "No such instance (invalid_devid)" } diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-cim/cimtest/NetworkPort/01_netport.py --- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Fri Mar 27 16:44:59 2009 -0700 +++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Thu Dec 18 14:10:33 2008 -0800 @@ -37,9 +37,8 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import XenXML, KVMXML, get_class from CimTest.Globals import logger -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from XenKvmLib.const import get_provider_version sup_types = ['Xen', 'KVM', 'XenFV'] @@ -53,7 +52,7 @@ # The value of LinkTechnology should be set to 0 for rev > 599 # else, it should be set to 2 - if net_rev > rev: + if net_rev > rev and changeset != sles11_changeset: return 0 else: return 2 diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py --- a/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Fri Mar 27 16:44:59 2009 -0700 +++ b/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Thu Dec 18 14:10:33 2008 -0800 @@ -54,7 +54,7 @@ from XenKvmLib.classes import get_typed_class from XenKvmLib.vxml import get_class from XenKvmLib.test_doms import destroy_and_undefine_all -from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset from XenKvmLib.enumclass import GetInstance, CIM_CimtestClass, EnumInstances sup_types = ['Xen', 'KVM', 'XenFV'] @@ -109,7 +109,7 @@ return FAIL rev, changeset = get_provider_version(options.virt, options.ip) - if rev < err_msg_changeset: + if rev < err_msg_changeset and changeset != sles11_changeset: old_ret = { 'rc' : CIM_ERR_NOT_FOUND, 'desc' : "No such instance (invalid_devid)" } diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Fri Mar 27 16:44:59 2009 -0700 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py Thu Dec 18 14:10:33 2008 -0800 @@ -151,7 +151,7 @@ from XenKvmLib.classes import get_typed_class from CimTest.ReturnCodes import PASS, FAIL from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS -from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] @@ -252,7 +252,7 @@ ] rev, changeset = get_provider_version(options.virt, options.ip) - if rev < 682: + if rev < 682 and changeset != sles11_changeset: old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, 'desc' : "No such instance (INVALID_DevID_Keyval)" } diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Mar 27 16:44:59 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Dec 18 14:10:33 2008 -0800 @@ -23,14 +23,16 @@ import traceback from optparse import OptionParser from VirtLib.live import fv_cap +from VirtLib.utils import run_remote from CimTest.Globals import CIM_IP from pywbem import WBEMConnection from XenKvmLib.classes import get_typed_class platform_sup = ["Xen", "KVM", "XenFV"] -#RPM changeset values +#Distro changeset values f9_changeset="1fcf330fadf8+" +sles11_changeset="SLES_11" VIRSH_ERROR_DEFINE = "Failed to define a domain with the name %s from virsh" @@ -152,6 +154,11 @@ def get_provider_version(virt, ip): + cmd = "cat /etc/issue | grep 'SUSE Linux Enterprise Server 11'" + rc, out = run_remote(ip, cmd) + if rc == 0: + return 0, sles11_changeset + conn = WBEMConnection('http://%s' % ip, (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), os.getenv('CIM_NS')) From kaitlin at linux.vnet.ibm.com Sun Mar 29 23:25:02 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 29 Mar 2009 16:25:02 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Remove default emulator in VSSD, also fix path of default in const.py Message-ID: <444cee668a76b0ef7fa1.1238369102@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1238367843 25200 # Node ID 444cee668a76b0ef7fa1b5da94ae3763522834f2 # Parent 9e3054481df49d4045498d50188a62acddffab15 [TEST] Remove default emulator in VSSD, also fix path of default in const.py libvirt will determine the proper emulator to use based on the capabilities of the system. No need to define a default. If a different emulator is needed (i.e. because qemu / kvm is installed in a non-standard location), the test case can specify an emulator using the Emulator attribute of the VSSD. Signed-off-by: Kaitlin Rupert diff -r 9e3054481df4 -r 444cee668a76 suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Mar 24 19:15:48 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Sun Mar 29 16:04:03 2009 -0700 @@ -22,7 +22,6 @@ import platform import traceback from optparse import OptionParser -from VirtLib.live import fv_cap from CimTest.Globals import CIM_IP from pywbem import WBEMConnection from XenKvmLib.classes import get_typed_class @@ -82,12 +81,7 @@ Xen_default_mac = '11:22:33:aa:bb:cc' # vxml.KVMXML -KVM_default_emulator = '/usr/local/bin/qemu-system-x86_64' -if not os.path.exists(KVM_default_emulator): - if fv_cap(CIM_IP): - KVM_default_emulator = '/usr/bin/qemu-kvm' - else: - KVM_default_emulator = '/usr/bin/qemu' +KVM_default_emulator = '/usr/bin/qemu-system-x86_64' KVM_disk_path = os.path.join(_image_dir, 'default-kvm-dimage') KVM_secondary_disk_path = os.path.join(_image_dir, 'default-kvm-dimage.2ND') KVM_default_disk_dev = 'hda' diff -r 9e3054481df4 -r 444cee668a76 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Mar 24 19:15:48 2009 -0700 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Sun Mar 29 16:04:03 2009 -0700 @@ -89,7 +89,7 @@ # classes to define VSSD parameters class CIM_VirtualSystemSettingData(CIMClassMOF): - def __init__(self, name, virt, bldr=None): + def __init__(self, name, virt, bldr=None, emulator=None): type = get_class_type(self.__class__.__name__) self.InstanceID = '%s:%s' % (type, name) self.Caption = self.Description = 'Virtual System' @@ -98,10 +98,9 @@ self.CreationClassName = self.__class__.__name__ self.AutomaticShutdownAction = VSSD_RECOVERY_NONE self.AutomaticRecoveryAction = VSSD_RECOVERY_NONE - if virt == 'KVM' : - self.Emulator = const.KVM_default_emulator - elif virt == 'XenFV' : - self.Emulator = const.XenFV_default_emulator + + if emulator is not None: + self.Emulator = emulator self.isFullVirt = (type == 'KVM' or virt == 'XenFV') if self.isFullVirt: From kaitlin at linux.vnet.ibm.com Sun Mar 29 23:49:05 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Sun, 29 Mar 2009 16:49:05 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add check to see if user can ssh to remote host Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1238367843 25200 # Node ID f67cd4aacb45f3a1ecfadeb3103058f0abf675d0 # Parent 444cee668a76b0ef7fa1b5da94ae3763522834f2 [TEST] Add check to see if user can ssh to remote host If this check fails, indicate to user they need to copy their key to root's authorized_keys file. If the user is root (or cimtest is run using sudo), the public key is written to authorized_keys automatically. Signed-off-by: Kaitlin Rupert diff -r 444cee668a76 -r f67cd4aacb45 lib/VirtLib/utils.py --- a/lib/VirtLib/utils.py Sun Mar 29 16:04:03 2009 -0700 +++ b/lib/VirtLib/utils.py Sun Mar 29 16:04:03 2009 -0700 @@ -27,9 +27,16 @@ # ssh utils SSH_PARMS="-q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -root_dot_ssh = os.path.join(os.getenv('HOME'), '.ssh') -SSH_KEY = os.path.join(root_dot_ssh, 'id_rsa') -AUTHED_KEYS = os.path.join(root_dot_ssh, 'authorized_keys') +USER_SSH_PATH = os.path.join(os.getenv('HOME'), '.ssh') +ROOT_SSH_PATH = "/root/.ssh" +SSH_KEY = os.path.join(USER_SSH_PATH, 'id_rsa') +AUTHED_KEYS = os.path.join(ROOT_SSH_PATH, 'authorized_keys') + +def run_remote_chk(ip, cmd): + + cmd = 'ssh %s -o PasswordAuthentication=no -i %s root@%s "%s"' % \ + (SSH_PARMS, SSH_KEY, ip, cmd) + return commands.getstatusoutput(cmd) def run_remote(ip, cmd): @@ -72,23 +79,37 @@ t0Vm53Jlg5CzFbn9EZp3LN9D/GEwKOqPehB+P0qhz15H8j6VQQ== -----END RSA PRIVATE KEY----- """ + + def gen_pubkey(): + print "\nGenerating public key from private key...\n" + cmd = 'ssh-keygen -y -f %s' % SSH_KEY + return commands.getoutput(cmd) def write_pubkey(pubkey): + cmd = "whoami" + rc, o = commands.getstatusoutput(cmd) + if rc != 0 or o != "root": + return + f = open(AUTHED_KEYS, 'a+') f.write('\n'+pubkey) f.flush() f.close() - + def write_privkey(privkey): - f = open(SSH_KEY, 'w') + if not os.path.exists(SSH_KEY): + if not os.path.exists(USER_SSH_PATH): + os.mkdir(USER_SSH_PATH) + f = file(SSH_KEY,'wt') + else: + f = open(SSH_KEY, 'w') f.write(privkey) f.flush() f.close() os.chmod(SSH_KEY, 0400) if os.path.exists(SSH_KEY): - cmd = 'ssh-keygen -y -f %s' % SSH_KEY - pubkey = commands.getoutput(cmd) + pubkey = gen_pubkey() if os.path.exists(AUTHED_KEYS): cmd = """grep "%s" %s >/dev/null 2>&1""" % (pubkey, AUTHED_KEYS) rc, o = commands.getstatusoutput(cmd) @@ -98,6 +119,5 @@ write_pubkey(pubkey) else: write_privkey(ssh_key) - cmd = 'ssh-keygen -y -f %s' % SSH_KEY - pubkey = commands.getoutput(cmd) + pubkey = gen_pubkey() write_pubkey(pubkey) diff -r 444cee668a76 -r f67cd4aacb45 suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py Sun Mar 29 16:04:03 2009 -0700 +++ b/suites/libvirt-cim/main.py Sun Mar 29 16:04:03 2009 -0700 @@ -93,6 +93,14 @@ print "Cleaned log files." def pre_check(ip, virt): + cmd = "ls" + ret, out = utils.run_remote_chk(ip, cmd) + if ret != 0: + msg = "Unable to write to %s.\nPlease add your public key (%s.pub)" \ + " to %s's %s and rerun the test" % (utils.AUTHED_KEYS, + utils.SSH_KEY, ip, utils.AUTHED_KEYS) + return msg + cmd = "virsh -c %s list --all" % virt2uri(virt) ret, out = utils.run_remote(ip, cmd) if ret != 0: From yunguol at cn.ibm.com Mon Mar 30 08:13:42 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 30 Mar 2009 16:13:42 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add SLES 11 specific changeset and branch tests accordingly In-Reply-To: Message-ID: +1 Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2009-03-30 06:09:19: > # HG changeset patch > # User Kaitlin Rupert > # Date 1229638233 28800 > # Node ID f0b8eb632baa3a40721364a090ec3d40e4d68f6f > # Parent ba88e8c112586b1578976e69c33cde6e4ecd91c3 > [TEST] Add SLES 11 specific changeset and branch tests accordingly > > Signed-off-by: Kaitlin Rupert > > diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt- > cim/cimtest/AllocationCapabilities/01_enum.py > --- a/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py > Fri Mar 27 16:44:59 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/01_enum.py > Thu Dec 18 14:10:33 2008 -0800 > @@ -27,7 +27,8 @@ > > import sys > from XenKvmLib.enumclass import EnumInstances > -from XenKvmLib.const import do_main, platform_sup, get_provider_version > +from XenKvmLib.const import do_main, platform_sup, get_provider_version, \ > + sles11_changeset > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.common_util import cleanup_restore > @@ -42,8 +43,8 @@ > get_typed_class(virt, 'DiskPool'), > get_typed_class(virt, 'NetworkPool')] > > - curr_cim_rev, changeset = get_provider_version(virt, ip) > - if curr_cim_rev >= input_graphics_pool_rev: > + curr_rev, changeset = get_provider_version(virt, ip) > + if curr_rev >= input_graphics_pool_rev and changeset != sles11_changeset: > pt.append(get_typed_class(virt, 'GraphicsPool')) > pt.append(get_typed_class(virt, 'InputPool')) > > diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt- > cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Fri > Mar 27 16:44:59 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu > Dec 18 14:10:33 2008 -0800 > @@ -44,7 +44,7 @@ > from CimTest import Globals > from XenKvmLib.common_util import get_host_info > from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > -from XenKvmLib.const import do_main, get_provider_version > +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.enumclass import EnumInstances > > @@ -61,12 +61,17 @@ > > cn_names = ["ComputerSystem"] > > - curr_cim_rev, changeset = get_provider_version(virt, server) > - if curr_cim_rev >= libvirt_cim_ectp_changes: > + curr_rev, changeset = get_provider_version(virt, server) > + if curr_rev >= libvirt_cim_ectp_changes: > cn_names2 = ["VirtualSystemMigrationService", "DiskPool", > "NetworkPool", > "ProcessorPool", "MemoryPool", "AllocationCapabilities"] > cn_names.extend(cn_names2) > - if curr_cim_rev >= libvirt_cim_input_graphics_ectp: > + > + if changeset == sles11_changeset: > + cn_names2 = ["DiskPool", "NetworkPool", "ProcessorPool"] > + cn_names.extend(cn_names2) > + > + if curr_rev >= libvirt_cim_input_graphics_ectp: > cn_names.append("ConsoleRedirectionService") > > status, host_inst = get_host_info(server, virt) > diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt- > cim/cimtest/LogicalDisk/03_ld_gi_errs.py > --- a/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Fri > Mar 27 16:44:59 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/LogicalDisk/03_ld_gi_errs.py Thu > Dec 18 14:10:33 2008 -0800 > @@ -48,7 +48,7 @@ > from XenKvmLib.enumclass import GetInstance, CIM_CimtestClass, EnumInstances > from XenKvmLib.classes import get_typed_class > from XenKvmLib.vxml import get_class > -from XenKvmLib.const import do_main, get_provider_version > +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset > > sup_types = ['Xen', 'KVM', 'XenFV'] > > @@ -105,7 +105,7 @@ > return status > > rev, changeset = get_provider_version(options.virt, options.ip) > - if rev < err_msg_changeset: > + if rev < err_msg_changeset and changeset != sles11_changeset: > old_ret = { 'rc' : CIM_ERR_NOT_FOUND, > 'desc' : "No such instance (invalid_devid)" > } > diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt- > cim/cimtest/NetworkPort/01_netport.py > --- a/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Fri Mar > 27 16:44:59 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/NetworkPort/01_netport.py Thu Dec > 18 14:10:33 2008 -0800 > @@ -37,9 +37,8 @@ > from XenKvmLib.classes import get_typed_class > from XenKvmLib.vxml import XenXML, KVMXML, get_class > from CimTest.Globals import logger > -from XenKvmLib.const import do_main > +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > -from XenKvmLib.const import get_provider_version > > sup_types = ['Xen', 'KVM', 'XenFV'] > > @@ -53,7 +52,7 @@ > > # The value of LinkTechnology should be set to 0 for rev > 599 > # else, it should be set to 2 > - if net_rev > rev: > + if net_rev > rev and changeset != sles11_changeset: > return 0 > else: > return 2 > diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt- > cim/cimtest/Processor/03_proc_gi_errs.py > --- a/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Fri > Mar 27 16:44:59 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/Processor/03_proc_gi_errs.py Thu > Dec 18 14:10:33 2008 -0800 > @@ -54,7 +54,7 @@ > from XenKvmLib.classes import get_typed_class > from XenKvmLib.vxml import get_class > from XenKvmLib.test_doms import destroy_and_undefine_all > -from XenKvmLib.const import do_main, get_provider_version > +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset > from XenKvmLib.enumclass import GetInstance, CIM_CimtestClass, EnumInstances > > sup_types = ['Xen', 'KVM', 'XenFV'] > @@ -109,7 +109,7 @@ > return FAIL > > rev, changeset = get_provider_version(options.virt, options.ip) > - if rev < err_msg_changeset: > + if rev < err_msg_changeset and changeset != sles11_changeset: > old_ret = { 'rc' : CIM_ERR_NOT_FOUND, > 'desc' : "No such instance (invalid_devid)" > } > diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt- > cim/cimtest/SettingsDefine/03_sds_fwd_errs.py > --- a/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py > Fri Mar 27 16:44:59 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/SettingsDefine/03_sds_fwd_errs.py > Thu Dec 18 14:10:33 2008 -0800 > @@ -151,7 +151,7 @@ > from XenKvmLib.classes import get_typed_class > from CimTest.ReturnCodes import PASS, FAIL > from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS > -from XenKvmLib.const import do_main, get_provider_version > +from XenKvmLib.const import do_main, get_provider_version, sles11_changeset > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > > @@ -252,7 +252,7 @@ > ] > > rev, changeset = get_provider_version(options.virt, options.ip) > - if rev < 682: > + if rev < 682 and changeset != sles11_changeset: > old_ret = { 'rc' : pywbem.CIM_ERR_NOT_FOUND, > 'desc' : "No such instance (INVALID_DevID_Keyval)" > } > diff -r ba88e8c11258 -r f0b8eb632baa suites/libvirt-cim/lib/XenKvmLib/const.py > --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Mar 27 16:44: > 59 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Dec 18 14:10: > 33 2008 -0800 > @@ -23,14 +23,16 @@ > import traceback > from optparse import OptionParser > from VirtLib.live import fv_cap > +from VirtLib.utils import run_remote > from CimTest.Globals import CIM_IP > from pywbem import WBEMConnection > from XenKvmLib.classes import get_typed_class > > platform_sup = ["Xen", "KVM", "XenFV"] > > -#RPM changeset values > +#Distro changeset values > f9_changeset="1fcf330fadf8+" > +sles11_changeset="SLES_11" > > VIRSH_ERROR_DEFINE = "Failed to define a domain with the name %s from virsh" > > @@ -152,6 +154,11 @@ > > > def get_provider_version(virt, ip): > + cmd = "cat /etc/issue | grep 'SUSE Linux Enterprise Server 11'" > + rc, out = run_remote(ip, cmd) > + if rc == 0: > + return 0, sles11_changeset > + > conn = WBEMConnection('http://%s' % ip, > (os.getenv('CIM_USER'), os.getenv('CIM_PASS')), > os.getenv('CIM_NS')) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Mar 30 08:26:16 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 30 Mar 2009 16:26:16 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Remove default emulator in VSSD, also fix path of default in const.py In-Reply-To: <444cee668a76b0ef7fa1.1238369102@localhost.localdomain> Message-ID: +1 Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2009-03-30 07:25:02: > # HG changeset patch > # User Kaitlin Rupert > # Date 1238367843 25200 > # Node ID 444cee668a76b0ef7fa1b5da94ae3763522834f2 > # Parent 9e3054481df49d4045498d50188a62acddffab15 > [TEST] Remove default emulator in VSSD, also fix path of default in const.py > > libvirt will determine the proper emulator to use based on the capabilities > of the system. No need to define a default. If a different > emulator is needed > (i.e. because qemu / kvm is installed in a non-standard location), the test > case can specify an emulator using the Emulator attribute of the VSSD. > > > Signed-off-by: Kaitlin Rupert > > diff -r 9e3054481df4 -r 444cee668a76 suites/libvirt-cim/lib/XenKvmLib/const.py > --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Mar 24 19:15: > 48 2009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Sun Mar 29 16:04: > 03 2009 -0700 > @@ -22,7 +22,6 @@ > import platform > import traceback > from optparse import OptionParser > -from VirtLib.live import fv_cap > from CimTest.Globals import CIM_IP > from pywbem import WBEMConnection > from XenKvmLib.classes import get_typed_class > @@ -82,12 +81,7 @@ > Xen_default_mac = '11:22:33:aa:bb:cc' > > # vxml.KVMXML > -KVM_default_emulator = '/usr/local/bin/qemu-system-x86_64' > -if not os.path.exists(KVM_default_emulator): > - if fv_cap(CIM_IP): > - KVM_default_emulator = '/usr/bin/qemu-kvm' > - else: > - KVM_default_emulator = '/usr/bin/qemu' > +KVM_default_emulator = '/usr/bin/qemu-system-x86_64' > KVM_disk_path = os.path.join(_image_dir, 'default-kvm-dimage') > KVM_secondary_disk_path = os.path.join(_image_dir, 'default-kvm-dimage.2ND') > KVM_default_disk_dev = 'hda' > diff -r 9e3054481df4 -r 444cee668a76 suites/libvirt-cim/lib/XenKvmLib/vsms.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Mar 24 19:15:482009 -0700 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Sun Mar 29 16:04:032009 -0700 > @@ -89,7 +89,7 @@ > > # classes to define VSSD parameters > class CIM_VirtualSystemSettingData(CIMClassMOF): > - def __init__(self, name, virt, bldr=None): > + def __init__(self, name, virt, bldr=None, emulator=None): > type = get_class_type(self.__class__.__name__) > self.InstanceID = '%s:%s' % (type, name) > self.Caption = self.Description = 'Virtual System' > @@ -98,10 +98,9 @@ > self.CreationClassName = self.__class__.__name__ > self.AutomaticShutdownAction = VSSD_RECOVERY_NONE > self.AutomaticRecoveryAction = VSSD_RECOVERY_NONE > - if virt == 'KVM' : > - self.Emulator = const.KVM_default_emulator > - elif virt == 'XenFV' : > - self.Emulator = const.XenFV_default_emulator > + > + if emulator is not None: > + self.Emulator = emulator > > self.isFullVirt = (type == 'KVM' or virt == 'XenFV') > if self.isFullVirt: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Mar 30 09:11:36 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 30 Mar 2009 17:11:36 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 30 2009): KVM on Fedora release 10 (Cambridge) with sfcb Message-ID: ================================================= Test Run Summary (Mar 30 2009): KVM on Fedora release 10 (Cambridge) with sfcb ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.4preview Libvirt-cim revision: 838 Libvirt-cim changeset: 68bcaa603bd7 Cimtest revision: 659 Cimtest changeset: 9e3054481df4 ================================================= FAIL : 2 XFAIL : 4 SKIP : 5 PASS : 138 ----------------- Total : 149 ================================================= FAIL Test Summary: ComputerSystemIndication - 01_created_indication.py: FAIL ResourcePoolConfigurationService - 04_CreateChildResourcePool.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 ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP VirtualSystemMigrationService - 06_remote_live_migration.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 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): 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 State not supported with return code 7 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: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: FAIL ERROR - Exception : Request Failed: 200 Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 143, in do_try File "01_created_indication.py", line 146, in main sub_list, ind_names, dict = sub_ind(ip, virt) File "01_created_indication.py", line 60, in sub_ind sub.subscribe(dict['default_url'], dict['default_auth']) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py", line 345, in subscribe "CreateInstance", auth_hdr) File "/data/users/daisy/cimtest/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py", line 330, in __do_cimpost (resp.status, resp.reason)) Exception: Request Failed: 200 ERROR - None -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description One or more parameter values passed to the method were invalid InvokeMethod(CreateChildResourcePool): One or more parameter values passed to the method were invalid -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: 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 No such instance (no device domain/mouse:ps2) Bug:<00014> -------------------------------------------------------------------- VirtualSystemManagementService - 17_removeresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 06_remote_live_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 -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Mar 30 10:28:47 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 30 Mar 2009 15:58:47 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 30 2009): KVM on Fedora release 10 (Cambridge) with Pegasus Message-ID: <49D09EDF.7050503@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 30 2009): KVM on Fedora release 10 (Cambridge) with Pegasus ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.15-170.2.24.fc10.x86_64 libvirt: 0.5.1 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 812 Libvirt-cim changeset: bad1a43ac1b0 Cimtest revision: 659 Cimtest changeset: 9e3054481df4 ================================================= FAIL : 1 XFAIL : 3 SKIP : 4 PASS : 141 ----------------- Total : 149 ================================================= FAIL Test Summary: VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: 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: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 17_removeresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL ERROR - Failed to create Virtual Network 'cimtest-networkpool' ERROR - Exception details :Unable to create network pool 'cimtest-networkpool' on 'elm3a148.beaverton.ibm.com' -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Mar 30 13:32:46 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 30 Mar 2009 19:02:46 +0530 Subject: [Libvirt-cim] Test Run Summary (Mar 30 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus Message-ID: <49D0C9FE.7060709@linux.vnet.ibm.com> ================================================= Test Run Summary (Mar 30 2009): Xen on Red Hat Enterprise Linux Server release 5.3 (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.3 (Tikanga) Kernel: 2.6.18-128.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 838 Libvirt-cim changeset: 68bcaa603bd7 Cimtest revision: Cimtest changeset: ================================================= FAIL : 9 XFAIL : 2 SKIP : 3 PASS : 135 ----------------- Total : 149 ================================================= FAIL Test Summary: ComputerSystem - 01_enum.py: FAIL ComputerSystem - 32_start_reboot.py: FAIL ElementCapabilities - 01_forward.py: FAIL ElementCapabilities - 02_reverse.py: FAIL EnabledLogicalElementCapabilities - 01_enum.py: FAIL ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL VirtualSystemMigrationService - 01_migratable_host.py: FAIL VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 16_removeresource.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP NetworkPort - 03_user_netport.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: FAIL ERROR - Provider does not report system `Xen', but virsh does -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP -------------------------------------------------------------------- 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: FAIL ERROR - Unable to check guest state ERROR - Exception: Wrong guest instance ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: Wrong guest instance ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Unable to check guest state ERROR - Exception: EnabledState is 3, expected 2. ERROR - Exception: Unable reboot dom 'cs_test_domain' CIM_ERR_FAILED: Unable to get domain information: internal error domain information incomplete, missing id CIM_ERR_NOT_FOUND: Referenced domain `cs_test_domain' does not exist: internal error failed to parse Xend domain information -------------------------------------------------------------------- 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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: FAIL ERROR - IndexError : list index out of range Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 143, in do_try File "01_forward.py", line 138, in main if elec[0].classname != cn: IndexError: list index out of range ERROR - None CIM_ERR_INVALID_CLASS: Linux_ComputerSystem CIM_ERR_NOT_FOUND: Referenced domain `Xen' does not exist: Domain not found: xenUnifiedDomainLookupByName -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: FAIL ERROR - No ELEC instances returned CIM_ERR_INVALID_CLASS: Linux_ComputerSystem CIM_ERR_NOT_FOUND: No such instance (Xen): Domain not found: xenUnifiedDomainLookupByName -------------------------------------------------------------------- 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: FAIL ERROR - Get domain list error, the number of domains is not equal -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER InvokeMethod(CreateChildResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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 -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: PASS -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 16_removeresource.py: XFAIL ERROR - 0 RASD insts for domain/mouse:xen CIM_ERR_NOT_FOUND: No such instance (no device domain/mouse:xen) Bug:<00014> -------------------------------------------------------------------- VirtualSystemManagementService - 17_removeresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: FAIL ERROR - Error create domain dom_migrate -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - Migration timed out.... ERROR - Increase timeout > 50 and try again.. -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL ERROR - Need to give different bridge name since it already exists ERROR - Exception: In fn create_netpool_conf(): 2 ERROR - Exception details :Unable to create network pool 'cimtest-networkpool' on 'elm3b25.beaverton.ibm.com' -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Mon Mar 30 15:27:34 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Mon, 30 Mar 2009 12:27:34 -0300 Subject: [Libvirt-cim] [PATCH] (#5) Changed the output of AllocationCapability association when using DiskPool as input Message-ID: # HG changeset patch # User Richard Maciel # Date 1236119796 10800 # Node ID e2fa7b350add17b43dcd0037edcfcc16d98c37c1 # Parent 9010a4ffa133439c3e66a64552840e2a76ef9ad9 (#5) Changed the output of AllocationCapability association when using DiskPool as input This patch fix the results of a 'association instances' query when passing a disk pool AllocationCapabilities reference as input. Before this patch, this query returned RASD templates for the disk pools, but now it returns the RASD templates for each of the volumes which composes the disk pool passed as input. 5: - Using code organization suggested, to reduce code duplication - Fixed email address in the beginning of the code 4: - Joined both set_disk_props functions in only one (using #if to separate versions). This removed duplicated code. - Fixed memory leak points 3: - Kept code for versions which doesn't support disk pools 2: - Changed code style based on feedback - When emulation_type = 1 (cdrom device), the VirtualQuantity property of the template is not set - Changed ID of cdrom device - LXC is handled in a special way, because it doesn't have volumes To test: - Create a domain containing a diskpool and some volumes - Execute query: wbemcli ein 'http://localhost:5988/root/virt:CIM_AllocationCapabilities' - Select the reference to a diskpool and use in an association query like the one below: wbemcli ai -nl -ac KVM_SettingsDefineCapabilities 'http://@localhost:5988/root/virt:KVM_AllocationCapabilities.InstanceID="DiskPool/default"' - There must be four templates for each volume in the diskpool (MINIMUM, MAXIMUM, DEFAULT, INCREMENT) and their address must correspond to the address of the volume Signed-off-by: Richard Maciel diff -r 9010a4ffa133 -r e2fa7b350add src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Tue Mar 17 15:18:27 2009 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Mar 03 19:36:36 2009 -0300 @@ -4,6 +4,7 @@ * Authors: * Dan Smith * Jay Gagnon + * Richard Maciel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -50,6 +51,16 @@ #include "Virt_AllocationCapabilities.h" #include "Virt_Device.h" +/* + * Right now, detect support and use it, if available. + * Later, this can be a configure option if needed + */ +#if LIBVIR_VERSION_NUMBER > 4000 +# define VIR_USE_LIBVIRT_STORAGE 1 +#else +# define VIR_USE_LIBVIRT_STORAGE 0 +#endif + const static CMPIBroker *_BROKER; /* These are used in more than one place so they are defined here. */ @@ -561,7 +572,129 @@ out: return s; } + +static CMPIStatus set_disk_props(int type, + const CMPIObjectPath *ref, + const char *id, + const char *disk_path, + uint64_t disk_size, + uint16_t emu_type, + struct inst_list *list) +{ + const char *dev; + CMPIInstance *inst; + CMPIStatus s = {CMPI_RC_OK, NULL}; + + if (type == DOMAIN_LXC) { + dev = "/lxc_mnt/tmp"; + } + else { + dev = "hda"; + } + + inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); + if ((inst == NULL) || (s.rc != CMPI_RC_OK)) + goto out; + + CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); + CMSetProperty(inst, "AllocationQuantity", + (CMPIValue *)"MegaBytes", CMPI_chars); + CMSetProperty(inst, "Address", (CMPIValue *)disk_path, CMPI_chars); + + if (type == DOMAIN_LXC) + CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); + else { + if (emu_type == 0) + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&disk_size, CMPI_uint64); + + if (type == DOMAIN_XENPV) { + dev = "xvda"; + CMSetProperty(inst, "Caption", + (CMPIValue *)"PV disk", CMPI_chars); + } else if (type == DOMAIN_XENFV) { + CMSetProperty(inst, "Caption", + (CMPIValue *)"FV disk", CMPI_chars); + } + + CMSetProperty(inst, "VirtualDevice", + (CMPIValue *)dev, CMPI_chars); + CMSetProperty(inst, "EmulatedType", + (CMPIValue *)&emu_type, CMPI_uint16); + } + + inst_list_add(list, inst); + + out: + return s; +} + +static CMPIStatus cdrom_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + char *pfx = NULL; + const char *id; + const char *vol_path = "/dev/null"; + uint64_t vol_size = 0; + CMPIStatus s = {CMPI_RC_OK, NULL}; + uint16_t emu_type = 1; + + switch(template_type) { + case SDC_RASD_MIN: + id = "Minimum CDROM"; + break; + case SDC_RASD_MAX: + id = "Maximum CDROM"; + break; + case SDC_RASD_INC: + id = "Increment CDROM"; + break; + case SDC_RASD_DEF: + id = "Default CDROM"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + pfx = class_prefix_name(CLASSNAME(ref)); + if (STREQ(pfx, "Xen")) { + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + for (; i < 2; i++) { + s = set_disk_props(xen_type[i], + ref, + id, + vol_path, + vol_size, + emu_type, + list); + } + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, + ref, + id, + vol_path, + vol_size, + emu_type, + list); + + } else if (!STREQ(pfx, "LXC")){ + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported virtualization type"); + } + + out: + free(pfx); + + return s; +} + static int get_disk_freespace(const CMPIObjectPath *ref, CMPIStatus *s, uint64_t *free_space) @@ -587,7 +720,7 @@ goto out; } - /* Getting the relevant resource pool directly finds the free space + /* Getting the relevant resource pool directly finds the free space * for us. It is in the Capacity field. */ *s = get_pool_by_name(_BROKER, ref, inst_id, &pool_inst); if (s->rc != CMPI_RC_OK) @@ -608,82 +741,39 @@ return ret; } -static CMPIStatus set_disk_props(int type, - const CMPIObjectPath *ref, - const char *id, - uint64_t disk_size, - uint16_t emu_type, - struct inst_list *list) +static CMPIStatus default_disk_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) { - const char *addr; - const char *dev; - CMPIInstance *inst; + uint64_t disk_size = 0; + int emu_type = 0; + char *pfx = NULL; + const char *disk_path = "/dev/null"; + const char *id; + int type = 0; + bool ret; + CMPIStatus s = {CMPI_RC_OK, NULL}; - if (type == DOMAIN_LXC) { - addr = "/tmp"; - dev = "/lxc_mnt/tmp"; - } - else { - dev = "hda"; - addr = "/dev/null"; - } - - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK); - if ((inst == NULL) || (s.rc != CMPI_RC_OK)) - goto out; - - CMSetProperty(inst, "InstanceID", (CMPIValue *)id, CMPI_chars); - CMSetProperty(inst, "AllocationQuantity", - (CMPIValue *)"MegaBytes", CMPI_chars); - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&disk_size, CMPI_uint64); - CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars); - - if (type == DOMAIN_LXC) - CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); - else { - if (type == DOMAIN_XENPV) { - dev = "xvda"; - CMSetProperty(inst, "Caption", - (CMPIValue *)"PV disk", CMPI_chars); - } else if (type == DOMAIN_XENFV) { - CMSetProperty(inst, "Caption", - (CMPIValue *)"FV disk", CMPI_chars); - } - - CMSetProperty(inst, "VirtualDevice", - (CMPIValue *)dev, CMPI_chars); - CMSetProperty(inst, "EmulatedType", - (CMPIValue *)&emu_type, CMPI_uint16); - } - - inst_list_add(list, inst); - - out: - return s; -} - -static CMPIStatus disk_template(const CMPIObjectPath *ref, - int template_type, - struct inst_list *list) -{ - bool ret; - char *pfx; - const char *id; - uint64_t disk_size; - uint16_t emu_type = 0; - CMPIStatus s = {CMPI_RC_OK, NULL}; + pfx = class_prefix_name(CLASSNAME(ref)); switch(template_type) { case SDC_RASD_MIN: - disk_size = SDC_DISK_MIN; + if (!STREQ(pfx, "LXC")) { + ret = get_disk_freespace(ref, &s, &disk_size); + if (!ret) + goto out; + if (SDC_DISK_MIN < disk_size) + disk_size = SDC_DISK_MIN; + } id = "Minimum"; break; case SDC_RASD_MAX: - ret = get_disk_freespace(ref, &s, &disk_size); - if (!ret) - goto out; + if (!STREQ(pfx, "LXC")) { + ret = get_disk_freespace(ref, &s, &disk_size); + if (!ret) + goto out; + } id = "Maximum"; break; case SDC_RASD_INC: @@ -701,67 +791,273 @@ goto out; } + if (STREQ(pfx, "Xen")) { + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + + for (; i < 2; i++) { + s = set_disk_props(xen_type[i], + ref, + id, + disk_path, + disk_size, + emu_type, + list); + if (s.rc != CMPI_RC_OK) + goto out; + } + } else { + if (STREQ(pfx, "KVM")) { + type = DOMAIN_KVM; + } else if (STREQ(pfx, "LXC")) { + type = DOMAIN_LXC; + disk_path = "/tmp"; + disk_size = 0; + } + + s = set_disk_props(type, + ref, + id, + disk_path, + disk_size, + emu_type, + list); + } + + out: + free(pfx); + return s; +} + +#if VIR_USE_LIBVIRT_STORAGE +static CMPIStatus volume_template(const CMPIObjectPath *ref, + int template_type, + virStorageVolPtr volume_ptr, + struct inst_list *list) +{ + char *pfx = NULL; + const char *id; + char *vol_path = NULL; + uint64_t vol_size; + virStorageVolInfo vol_info; + CMPIStatus s = {CMPI_RC_OK, NULL}; + int ret; + uint16_t emu_type = 0; + + ret = virStorageVolGetInfo(volume_ptr, &vol_info); + if (ret == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume information"); + goto out; + } + + switch(template_type) { + case SDC_RASD_MIN: + if (SDC_DISK_MIN > (uint64_t)vol_info.capacity) + vol_size = (uint64_t)vol_info.capacity; + else + vol_size = SDC_DISK_MIN; + id = "Minimum"; + break; + case SDC_RASD_MAX: + vol_size = (uint64_t)vol_info.capacity; + id = "Maximum"; + break; + case SDC_RASD_INC: + vol_size = SDC_DISK_INC; + id = "Increment"; + break; + case SDC_RASD_DEF: + vol_size = (uint64_t)vol_info.allocation; + id = "Default"; + break; + default: + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unsupported sdc_rasd type"); + goto out; + } + + vol_path = virStorageVolGetPath(volume_ptr); + if (vol_path == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virStorageVolGetConnect(volume_ptr), + "Unable to get volume path"); + goto out; + } + pfx = class_prefix_name(CLASSNAME(ref)); if (STREQ(pfx, "Xen")) { 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; + ref, + id, + vol_path, + vol_size, + emu_type, + list); } } 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; - - 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, - emu_type, - list); + ref, + id, + vol_path, + vol_size, + emu_type, + list); } else { - cu_statusf(_BROKER, &s, + cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, "Unsupported virtualization type"); } out: + free(pfx); + free(vol_path); + return s; } +static CMPIStatus disk_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn = NULL; + virStoragePoolPtr poolptr = NULL; + virStorageVolPtr volptr = NULL; + const char *instid = NULL; + char *host = NULL; + const char *poolname = NULL; + char **volnames = NULL; + int numvols = 0; + int numvolsret = 0; + int i; + char *pfx = NULL; + + pfx = class_prefix_name(CLASSNAME(ref)); + if (STREQ(pfx, "LXC")) { + s = default_disk_template(ref, template_type, list); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s); + + if (cu_get_str_path(ref, "InstanceID", &instid) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get InstanceID for disk device"); + goto out; + } + + if (parse_fq_devid(instid, &host, (char **)&poolname) != 1) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get pool device id"); + goto out; + } + + if ((poolptr = virStoragePoolLookupByName(conn, poolname)) == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage pool `%s' not found", + poolname); + goto out; + } + + if ((numvols = virStoragePoolNumOfVolumes(poolptr)) == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get the number of volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + volnames = (char **)malloc(sizeof(char *) * numvols); + if (volnames == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Could not allocate space for list of volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + numvolsret = virStoragePoolListVolumes(poolptr, volnames, numvols); + + if (numvolsret == -1) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to get a pointer to volumes \ + of storage pool `%s'", + poolname); + goto out; + } + + for (i = 0; i < numvolsret; i++) { + volptr = virStorageVolLookupByName(poolptr, volnames[i]); + if (volptr == NULL) { + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + conn, + "Storage Volume `%s' not found", + volnames[i]); + goto out; + } + + s = volume_template(ref, template_type, volptr, list); + if (s.rc != CMPI_RC_OK) + goto out; + } + + s = cdrom_template(ref, template_type, list); + + out: + free(pfx); + free(volnames); + free(host); + virStorageVolFree(volptr); + virStoragePoolFree(poolptr); + virConnectClose(conn); + + return s; +} +#else +static CMPIStatus disk_template(const CMPIObjectPath *ref, + int template_type, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + char *pfx = NULL; + + s = default_disk_template(ref, template_type, list); + if (s.rc != CMPI_RC_OK) + goto out; + + pfx = class_prefix_name(CLASSNAME(ref)); + if (STREQ(pfx, "LXC")) + goto out; + + s = cdrom_template(ref, template_type, list); + + out: + free(pfx); + + return s; +} +#endif + static CMPIStatus graphics_template(const CMPIObjectPath *ref, int template_type, struct inst_list *list) From yunguol at cn.ibm.com Tue Mar 31 02:22:54 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 31 Mar 2009 10:22:54 +0800 Subject: [Libvirt-cim] Test Run Summary (Mar 31 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus Message-ID: ================================================= Test Run Summary (Mar 31 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus ================================================= Distro: Fedora release 10.90 (Rawhide) Kernel: 2.6.29-0.24.rc0.git13.fc11.x86_64 libvirt: 0.6.1 Hypervisor: QEMU 0.10.0 CIMOM: Pegasus 2.7.2 Libvirt-cim revision: 839 Libvirt-cim changeset: 47050ea54020 Cimtest revision: 659 Cimtest changeset: 9e3054481df4 ================================================= FAIL : 7 XFAIL : 3 SKIP : 5 PASS : 134 ----------------- Total : 149 ================================================= FAIL Test Summary: HostSystem - 03_hs_to_settdefcap.py: FAIL ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL SettingsDefineCapabilities - 01_forward.py: FAIL VirtualSystemManagementService - 09_procrasd_persist.py: FAIL VirtualSystemManagementService - 11_define_memrasdunits.py: FAIL VirtualSystemManagementService - 12_referenced_config.py: FAIL VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 16_removeresource.py: XFAIL ================================================= SKIP Test Summary: VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP VirtualSystemMigrationService - 06_remote_live_migration.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 - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: FAIL ERROR - 'KVM_SettingsDefineCapabilities' returned 88 RASD objects instead of 8 CIM_ERR_INVALID_CLASS: Linux_ComputerSystem -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.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 -------------------------------------------------------------------- KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER InvokeMethod(CreateChildResourcePool): CIM_ERR_INVALID_PARAMETER -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 01_forward.py: PASS -------------------------------------------------------------------- ServiceAccessBySAP - 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: FAIL ERROR - KVM_SettingsDefineCapabilities returned 0 ResourcePool objects instead of 8 CIM_ERR_FAILED: Unable to get volume information: cannot open volume '/tmp/tmpSQbE28': No such file or directory -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: FAIL ERROR - Unable to set template ProcRASD CIM_ERR_FAILED: Unable to get volume information: cannot open volume '/tmp/tmpSQbE28': No such file or directory -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: FAIL ERROR - KeyError : 'KVM_MemResourceAllocationSettingData' Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 143, in do_try File "11_define_memrasdunits.py", line 119, in main status = try_define(options, units, value, cxml) File "11_define_memrasdunits.py", line 60, in try_define if rasd_list[mrasd_cn] is None: KeyError: 'KVM_MemResourceAllocationSettingData' ERROR - None CIM_ERR_FAILED: Unable to get volume information: cannot open volume '/tmp/tmpSQbE28': No such file or directory -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: FAIL ERROR - 'KVM_NetResourceAllocationSettingData' CIM_ERR_FAILED: Unable to get volume information: cannot open volume '/tmp/tmpSQbE28': No such file or directory -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: FAIL ERROR - Unable to get template RASDs for rstest_disk_domain CIM_ERR_FAILED: Unable to get volume information: cannot open volume '/tmp/tmpSQbE28': No such file or directory -------------------------------------------------------------------- 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- 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 -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From dayne.medlyn at hp.com Tue Mar 31 04:13:37 2009 From: dayne.medlyn at hp.com (Medlyn, Dayne (VSL - Ft Collins)) Date: Tue, 31 Mar 2009 04:13:37 +0000 Subject: [Libvirt-cim] How does libvirt-CIM Message-ID: The web page advertises that libvirt-CIM is based on the CIM 2.16 schema. As we look at the latest libvirt-CIM in the HG repository there are a number of classes that are not in the 2.16 schema but show up in later schemas (2.19.1 and 2.20 experimental), for example CIM_VirtualSystemMigrationCapabilities class. Can you help me understand what the strategy is relative to the use/implementation of classes not part of the 2.16 schema but now part of current schema? Are there plans to re-base to a newer version of the CIM schema? Thanks. Dayne Medlyn From yunguol at cn.ibm.com Tue Mar 31 05:23:47 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 31 Mar 2009 13:23:47 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add check to see if user can ssh to remote host In-Reply-To: Message-ID: +1. Best, Regards Daisy (???) VSM Team, China Systems & Technology Labs (CSTL) E-mail: yunguol at cn.ibm.com TEL: (86)-21-60922403 Building 10, 399 Ke Yuan Rd, Pudong Shanghai, 201203 libvirt-cim-bounces at redhat.com wrote on 2009-03-30 07:49:05: > # HG changeset patch > # User Kaitlin Rupert > # Date 1238367843 25200 > # Node ID f67cd4aacb45f3a1ecfadeb3103058f0abf675d0 > # Parent 444cee668a76b0ef7fa1b5da94ae3763522834f2 > [TEST] Add check to see if user can ssh to remote host > > If this check fails, indicate to user they need to copy their key to root's > authorized_keys file. If the user is root (or cimtest is run using sudo), the > public key is written to authorized_keys automatically. > > Signed-off-by: Kaitlin Rupert > > diff -r 444cee668a76 -r f67cd4aacb45 lib/VirtLib/utils.py > --- a/lib/VirtLib/utils.py Sun Mar 29 16:04:03 2009 -0700 > +++ b/lib/VirtLib/utils.py Sun Mar 29 16:04:03 2009 -0700 > @@ -27,9 +27,16 @@ > # ssh utils > > SSH_PARMS="-q -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" > -root_dot_ssh = os.path.join(os.getenv('HOME'), '.ssh') > -SSH_KEY = os.path.join(root_dot_ssh, 'id_rsa') > -AUTHED_KEYS = os.path.join(root_dot_ssh, 'authorized_keys') > +USER_SSH_PATH = os.path.join(os.getenv('HOME'), '.ssh') > +ROOT_SSH_PATH = "/root/.ssh" > +SSH_KEY = os.path.join(USER_SSH_PATH, 'id_rsa') > +AUTHED_KEYS = os.path.join(ROOT_SSH_PATH, 'authorized_keys') > + > +def run_remote_chk(ip, cmd): > + > + cmd = 'ssh %s -o PasswordAuthentication=no -i %s root@%s "%s"' % \ > + (SSH_PARMS, SSH_KEY, ip, cmd) > + return commands.getstatusoutput(cmd) > > def run_remote(ip, cmd): > > @@ -72,23 +79,37 @@ > t0Vm53Jlg5CzFbn9EZp3LN9D/GEwKOqPehB+P0qhz15H8j6VQQ== > -----END RSA PRIVATE KEY----- > """ > + > + def gen_pubkey(): > + print "\nGenerating public key from private key...\n" > + cmd = 'ssh-keygen -y -f %s' % SSH_KEY > + return commands.getoutput(cmd) > > def write_pubkey(pubkey): > + cmd = "whoami" > + rc, o = commands.getstatusoutput(cmd) > + if rc != 0 or o != "root": > + return > + > f = open(AUTHED_KEYS, 'a+') > f.write('\n'+pubkey) > f.flush() > f.close() > - > + > def write_privkey(privkey): > - f = open(SSH_KEY, 'w') > + if not os.path.exists(SSH_KEY): > + if not os.path.exists(USER_SSH_PATH): > + os.mkdir(USER_SSH_PATH) > + f = file(SSH_KEY,'wt') > + else: > + f = open(SSH_KEY, 'w') > f.write(privkey) > f.flush() > f.close() > os.chmod(SSH_KEY, 0400) > > if os.path.exists(SSH_KEY): > - cmd = 'ssh-keygen -y -f %s' % SSH_KEY > - pubkey = commands.getoutput(cmd) > + pubkey = gen_pubkey() > if os.path.exists(AUTHED_KEYS): > cmd = """grep "%s" %s >/dev/null 2>&1""" % (pubkey, AUTHED_KEYS) > rc, o = commands.getstatusoutput(cmd) > @@ -98,6 +119,5 @@ > write_pubkey(pubkey) > else: > write_privkey(ssh_key) > - cmd = 'ssh-keygen -y -f %s' % SSH_KEY > - pubkey = commands.getoutput(cmd) > + pubkey = gen_pubkey() > write_pubkey(pubkey) > diff -r 444cee668a76 -r f67cd4aacb45 suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py Sun Mar 29 16:04:03 2009 -0700 > +++ b/suites/libvirt-cim/main.py Sun Mar 29 16:04:03 2009 -0700 > @@ -93,6 +93,14 @@ > print "Cleaned log files." > > def pre_check(ip, virt): > + cmd = "ls" > + ret, out = utils.run_remote_chk(ip, cmd) > + if ret != 0: > + msg = "Unable to write to %s.\nPlease add your public key (%s.pub)" \ > + " to %s's %s and rerun the test" % (utils.AUTHED_KEYS, > + utils.SSH_KEY, ip, utils.AUTHED_KEYS) > + return msg > + > cmd = "virsh -c %s list --all" % virt2uri(virt) > ret, out = utils.run_remote(ip, cmd) > if ret != 0: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Tue Mar 31 06:53:53 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 30 Mar 2009 23:53:53 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Add branch of err code to RPCS/04 Message-ID: <9722c5133bdb3f640224.1238482433@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1238482424 25200 # Node ID 9722c5133bdb3f6402244e64e3daf8d2e046dd6f # Parent 9e3054481df49d4045498d50188a62acddffab15 [TEST] Add branch of err code to RPCS/04 Tested for KVM, Xen with current sources and rpm Signed-off-by: Guolian Yun diff -r 9e3054481df4 -r 9722c5133bdb suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Mar 24 19:15:48 2009 -0700 +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Mon Mar 30 23:53:44 2009 -0700 @@ -52,17 +52,22 @@ from XenKvmLib import rpcs_service from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS -from XenKvmLib.const import do_main, platform_sup +from XenKvmLib.const import do_main, platform_sup, get_provider_version from XenKvmLib.classes import get_typed_class -cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED cim_mname = "CreateChildResourcePool" +libvirt_cim_child_pool_rev = 837 @do_main(platform_sup) def main(): options = main.options rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \ "ResourcePoolConfigurationService"))(options.ip) + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev >= libvirt_cim_child_pool_rev: + cim_errno = 4 + else: + cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED try: rpcs_conn.CreateChildResourcePool() except pywbem.CIMError, (err_no, desc): From deeptik at linux.vnet.ibm.com Tue Mar 31 12:16:47 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 31 Mar 2009 17:46:47 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Add branch of err code to RPCS/04 In-Reply-To: <9722c5133bdb3f640224.1238482433@elm3b197.beaverton.ibm.com> References: <9722c5133bdb3f640224.1238482433@elm3b197.beaverton.ibm.com> Message-ID: <49D209AF.6030304@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1238482424 25200 > # Node ID 9722c5133bdb3f6402244e64e3daf8d2e046dd6f > # Parent 9e3054481df49d4045498d50188a62acddffab15 > [TEST] Add branch of err code to RPCS/04 > > > Tested for KVM, Xen with current sources and rpm > Signed-off-by: Guolian Yun > > diff -r 9e3054481df4 -r 9722c5133bdb suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py > --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Tue Mar 24 19:15:48 2009 -0700 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/04_CreateChildResourcePool.py Mon Mar 30 23:53:44 2009 -0700 > @@ -52,17 +52,22 @@ > from XenKvmLib import rpcs_service > from CimTest.Globals import logger > from CimTest.ReturnCodes import FAIL, PASS > -from XenKvmLib.const import do_main, platform_sup > +from XenKvmLib.const import do_main, platform_sup, get_provider_version > from XenKvmLib.classes import get_typed_class > > -cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > cim_mname = "CreateChildResourcePool" > +libvirt_cim_child_pool_rev = 837 > > @do_main(platform_sup) > def main(): > options = main.options > rpcs_conn = eval("rpcs_service." + get_typed_class(options.virt, \ > "ResourcePoolConfigurationService"))(options.ip) > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if curr_cim_rev >= libvirt_cim_child_pool_rev: > + cim_errno = 4 > Instead of including the numeric value, for readability purpose you could assign pywbem.CIM_ERR_INVALID_PARAMETER. otherwise +1 for me. > + else: > + cim_errno = pywbem.CIM_ERR_NOT_SUPPORTED > try: > rpcs_conn.CreateChildResourcePool() > except pywbem.CIMError, (err_no, desc): > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 31 20:11:20 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 31 Mar 2009 13:11:20 -0700 Subject: [Libvirt-cim] How does libvirt-CIM In-Reply-To: References: Message-ID: <49D278E8.6090207@linux.vnet.ibm.com> Medlyn, Dayne (VSL - Ft Collins) wrote: > The web page advertises that libvirt-CIM is based on the CIM 2.16 schema. As we look at the latest libvirt-CIM in the HG repository there are a number of classes that are not in the 2.16 schema but show up in later schemas (2.19.1 and 2.20 experimental), for example CIM_VirtualSystemMigrationCapabilities class. Can you help me understand what the strategy is relative to the use/implementation of classes not part of the 2.16 schema but now part of current schema? Are there plans to re-base to a newer version of the CIM schema? > > Thanks. > > Dayne Medlyn > Hi Dayne, We added these classes before the classes were available in an official schema. At the time, we wanted to add migration support, but the classes weren't available yet. The schema version we are using is quite dated. We are planning to update sometime this year. When we make the jump to a more relevant schema version, these re-implemented classes will be replaced by the official versions. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Mar 31 21:47:06 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 31 Mar 2009 14:47:06 -0700 Subject: [Libvirt-cim] [PATCH 0 of 2] Add support for DeleteResourcePool() Message-ID: From kaitlin at linux.vnet.ibm.com Tue Mar 31 21:47:08 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 31 Mar 2009 14:47:08 -0700 Subject: [Libvirt-cim] [PATCH 2 of 2] Add support for DeleteResourcePool() In-Reply-To: References: Message-ID: <3dff43d9b55fdd8b6843.1238536028@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1238534753 25200 # Node ID 3dff43d9b55fdd8b684370a5e1de61640924d63e # Parent 91ecd86e3c8799eb3b0cac91b9716c1fb6b782a9 Add support for DeleteResourcePool() Signed-off-by: Kaitlin Rupert diff -r 91ecd86e3c87 -r 3dff43d9b55f src/Virt_ResourcePoolConfigurationService.c --- a/src/Virt_ResourcePoolConfigurationService.c Tue Mar 31 14:25:53 2009 -0700 +++ b/src/Virt_ResourcePoolConfigurationService.c Tue Mar 31 14:25:53 2009 -0700 @@ -323,6 +323,90 @@ return s; } +static CMPIStatus delete_pool(CMPIMethodMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIArgs *argsin, + CMPIArgs *argsout) +{ + uint32_t rc = CIM_SVPC_RETURN_FAILED; + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst = NULL; + CMPIObjectPath *pool = NULL; + virConnectPtr conn = NULL; + const char *poolid = NULL; + char *pool_name = NULL; + uint16_t type; + + CU_DEBUG("DeleteResourcePool"); + + if (cu_get_ref_arg(argsin, "Pool", &pool) != CMPI_RC_OK) { + CU_DEBUG("Failed to get Pool reference arg"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_INVALID_PARAMETER, + "Missing argument `Pool'"); + goto out; + } + + s = get_pool_by_ref(_BROKER, pool, &inst); + if (s.rc != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Resource pool instance does not exist"); + goto out; + } + + if (cu_get_str_path(pool, "InstanceID", &poolid) != CMPI_RC_OK) { + CU_DEBUG("Failed to get InstanceID from pool reference"); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Missing InstanceID in pool reference"); + goto out; + } + + pool_name = name_from_pool_id(poolid); + if (pool_name == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_INVALID_PARAMETER, + "Pool has invalid InstanceID"); + goto out; + } + + type = res_type_from_pool_classname(CLASSNAME(pool)); + if (type == CIM_RES_TYPE_UNKNOWN) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to determine resource type of pool"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to connect to hypervisor"); + goto out; + } + + if (destroy_pool(conn, pool_name, type) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to destroy resource pool"); + goto out; + } + + out: + free(pool_name); + virConnectClose(conn); + + if (s.rc == CMPI_RC_OK) + rc = CIM_SVPC_RETURN_COMPLETED; + CMReturnData(results, &rc, CMPI_uint32); + + return s; +} + static CMPIStatus dummy_handler(CMPIMethodMI *self, const CMPIContext *context, const CMPIResult *results, @@ -363,8 +447,10 @@ static struct method_handler DeleteResourcePool = { .name = "DeleteResourcePool", - .handler = dummy_handler, - .args = { ARG_END } + .handler = delete_pool, + .args = {{"Pool", CMPI_ref, false}, + ARG_END + } }; static struct method_handler *my_handlers[] = { From kaitlin at linux.vnet.ibm.com Tue Mar 31 21:47:07 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 31 Mar 2009 14:47:07 -0700 Subject: [Libvirt-cim] [PATCH 1 of 2] Add ability to delete a virtual network pools In-Reply-To: References: Message-ID: <91ecd86e3c8799eb3b0c.1238536027@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1238534753 25200 # Node ID 91ecd86e3c8799eb3b0cac91b9716c1fb6b782a9 # Parent 47050ea54020ae7dfd3ae0f936ef9bfea052d70c Add ability to delete a virtual network pools Signed-off-by: Kaitlin Rupert diff -r 47050ea54020 -r 91ecd86e3c87 libxkutil/pool_parsing.c --- a/libxkutil/pool_parsing.c Tue Mar 03 19:36:36 2009 -0300 +++ b/libxkutil/pool_parsing.c Tue Mar 31 14:25:53 2009 -0700 @@ -83,6 +83,38 @@ return ret; } +int destroy_pool(virConnectPtr conn, const char *name, int res_type) +{ + int ret = 0; + + if (res_type == CIM_RES_TYPE_NET) { + + virNetworkPtr ptr = virNetworkLookupByName(conn, name); + if (ptr == NULL) { + CU_DEBUG("Virtual network %s is not defined", name); + return ret; + } + + if (virNetworkDestroy(ptr) != 0) { + CU_DEBUG("Unable to destroy virtual network"); + goto err1; + } + + if (virNetworkUndefine(ptr) != 0) { + CU_DEBUG("Unable to undefine virtual network"); + goto err1; + } + + ret = 1; + + err1: + virNetworkFree(ptr); + } + + + return ret; +} + /* * Local Variables: * mode: C diff -r 47050ea54020 -r 91ecd86e3c87 libxkutil/pool_parsing.h --- a/libxkutil/pool_parsing.h Tue Mar 03 19:36:36 2009 -0300 +++ b/libxkutil/pool_parsing.h Tue Mar 31 14:25:53 2009 -0700 @@ -47,6 +47,7 @@ void cleanup_virt_pool(struct virt_pool **pool); int define_pool(virConnectPtr conn, const char *xml, int res_type); +int destroy_pool(virConnectPtr conn, const char *name, int res_type); #endif