From veillard at redhat.com Fri Jan 2 08:14:20 2009 From: veillard at redhat.com (Daniel Veillard) Date: Fri, 2 Jan 2009 09:14:20 +0100 Subject: [Libvirt-cim] libvirt.org going down for hardware upgrade in one hour Message-ID: <20090102081420.GA7575@redhat.com> The box is being replaced with something more current, hopefully this won't disturb people much, and the switch will take less than an hour, please avoid commiting to the various CVS/mercurial bases at this point, thanks, 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 veillard at redhat.com Fri Jan 2 11:37:06 2009 From: veillard at redhat.com (Daniel Veillard) Date: Fri, 2 Jan 2009 12:37:06 +0100 Subject: [Libvirt-cim] libvirt.org going down for hardware upgrade in one hour In-Reply-To: <20090102081420.GA7575@redhat.com> References: <20090102081420.GA7575@redhat.com> Message-ID: <20090102113706.GD7575@redhat.com> On Fri, Jan 02, 2009 at 09:14:20AM +0100, Daniel Veillard wrote: > The box is being replaced with something more current, > hopefully this won't disturb people much, and the switch will take less > than an hour, please avoid commiting to the various CVS/mercurial > bases at this point, thanks, The box is back on-line for a couple of hours now, basic things seems to be working fine, but I'm sure there will be a couple of problems though :-) 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 Mon Jan 5 02:42:03 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 5 Jan 2009 10:42:03 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 05 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb Message-ID: ================================================= Test Run Summary (Jan 05 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 791 Libvirt-cim changeset: 3557859610b4 Cimtest revision: 576 Cimtest changeset: 7ff2982fa8c1 ================================================= FAIL : 1 XFAIL : 8 SKIP : 31 PASS : 100 ----------------- Total : 140 ================================================= FAIL Test Summary: SettingsDefine - 02_reverse.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 06_paused_active_suspend.py: XFAIL ComputerSystem - 23_suspend_suspend.py: XFAIL ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL HostSystem - 02_hostsystem_to_rasd.py: XFAIL HostedDependency - 03_enabledstate.py: XFAIL VSSD - 04_vssd_to_rasd.py: XFAIL VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystemIndication - 01_created_indication.py: SKIP ElementAllocatedFromPool - 03_reverse_errs.py: SKIP ElementAllocatedFromPool - 04_forward_errs.py: SKIP LogicalDisk - 01_disk.py: SKIP LogicalDisk - 02_nodevs.py: SKIP LogicalDisk - 03_ld_gi_errs.py: SKIP NetworkPort - 01_netport.py: SKIP NetworkPort - 02_np_gi_errors.py: SKIP NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: SKIP Processor - 02_definesys_get_procs.py: SKIP Processor - 03_proc_gi_errs.py: SKIP RASD - 04_disk_rasd_size.py: SKIP ResourceAllocationFromPool - 05_RAPF_err.py: SKIP ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemManagementService - 08_modifyresource.py: SKIP VirtualSystemManagementService - 09_procrasd_persist.py: SKIP VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP VirtualSystemManagementService - 12_referenced_config.py: SKIP VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: XFAIL ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Unable to suspend dom 'DomST1' using RequestedStateChange() InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: XFAIL ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Unable to 'Suspend' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - Exception: (1, u'Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: SKIP -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned CrossClass_GuestDom/mouse:xen instead of CrossClass_GuestDom/mouse:usb Class not found Bug:<00009> -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: XFAIL ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Failed to suspend the dom: hd_domain1 InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: SKIP -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: SKIP -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: SKIP -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: SKIP -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: SKIP -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: SKIP -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: SKIP -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: SKIP -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: FAIL ERROR - EnabledState is 3 instead of 2. ERROR - Try to increase the timeout and run the test again ERROR - Unable start dom 'virtgst' -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned VSSDC_dom/mouse:xen instead of VSSDC_dom/mouse:usb Bug:<00009> -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00008> -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Jan 5 02:47:11 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 5 Jan 2009 10:47:11 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 05 2009): KVM on Fedora release 9.90.1 (Rawhide) with sfcb Message-ID: ================================================= Test Run Summary (Jan 05 2009): KVM on Fedora release 9.90.1 (Rawhide) with sfcb ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 791 Libvirt-cim changeset: 3557859610b4 Cimtest revision: 576 Cimtest changeset: 7ff2982fa8c1 ================================================= FAIL : 2 XFAIL : 2 SKIP : 4 PASS : 132 ----------------- Total : 140 ================================================= FAIL Test Summary: ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL RASD - 01_verify_rasd_fields.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_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - Exception: (1, u'Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL ERROR - KVM_SystemDevice returned 6 Logical Devices objects -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: FAIL ERROR - Mistmatching association values -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: 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 Jan 5 03:05:16 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 5 Jan 2009 11:05:16 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 05 2009): KVM on Fedora release 9 (Sulphur) with Pegasus Message-ID: ================================================= Test Run Summary (Jan 05 2009): KVM on Fedora release 9 (Sulphur) with Pegasus ================================================= Distro: Fedora release 9 (Sulphur) Kernel: 2.6.25.14-108.fc9.x86_64 libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 576 Cimtest changeset: 7ff2982fa8c1 ================================================= FAIL : 0 XFAIL : 3 SKIP : 7 PASS : 130 ----------------- Total : 140 ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: PASS -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation Failed') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00010> -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Jan 5 03:16:00 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 5 Jan 2009 11:16:00 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 05 2009): KVM on Fedora release 9.90.1 (Rawhide) with sfcb In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-05 10:47:11: > > ================================================= > Test Run Summary (Jan 05 2009): KVM on Fedora release 9.90.1 > (Rawhide) with sfcb > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 791 > Libvirt-cim changeset: 3557859610b4 > Cimtest revision: 576 > Cimtest changeset: 7ff2982fa8c1 > ================================================= > FAIL : 2 > XFAIL : 2 > SKIP : 4 > PASS : 132 > ----------------- > Total : 140 > ================================================= > FAIL Test Summary: > ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL > RASD - 01_verify_rasd_fields.py: FAIL > The patches to fix these are under review. Thanks! > ================================================= > 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_suspend_suspend.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 27_define_suspend_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 32_start_reboot.py: XFAIL > ERROR - Exception: (1, u'Unable to reboot domain: > this function is not supported by the hypervisor: virDomainReboot') > ERROR - Unable to 'Reboot' dom 'cs_test_domain' > using RequestedStateChange() > InvokeMethod(RequestStateChange): Unable to reboot domain: this > function is not supported by the hypervisor: virDomainReboot > Bug:<00005> > -------------------------------------------------------------------- > ComputerSystem - 33_suspend_reboot.py: XFAIL > ERROR - In fn cim_state_change() > ERROR - Failed to change state of the domain 'test_domain' > ERROR - Exception: (7, u'State not supported') > ERROR - Exception: Unable Suspend dom 'test_domain' > InvokeMethod(RequestStateChange): State not supported > Bug:<00012> > -------------------------------------------------------------------- > ComputerSystem - 35_start_reset.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 40_RSC_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL > ERROR - KVM_SystemDevice returned 6 Logical Devices objects > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 03_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 04_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementConforms - 03_ectp_fwd_errs.py: PASS > -------------------------------------------------------------------- > ElementConforms - 04_ectp_rev_errs.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: PASS > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: PASS > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: PASS > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > HostedDependency - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedDependency - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedDependency - 03_enabledstate.py: PASS > -------------------------------------------------------------------- > HostedDependency - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedService - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedService - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 01_disk.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 02_nodevs.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 03_ld_gi_errs.py: PASS > -------------------------------------------------------------------- > Memory - 01_memory.py: PASS > -------------------------------------------------------------------- > Memory - 02_defgetmem.py: PASS > -------------------------------------------------------------------- > Memory - 03_mem_gi_errs.py: PASS > -------------------------------------------------------------------- > NetworkPort - 01_netport.py: PASS > -------------------------------------------------------------------- > NetworkPort - 02_np_gi_errors.py: PASS > -------------------------------------------------------------------- > NetworkPort - 03_user_netport.py: PASS > -------------------------------------------------------------------- > Processor - 01_processor.py: PASS > -------------------------------------------------------------------- > Processor - 02_definesys_get_procs.py: PASS > -------------------------------------------------------------------- > Processor - 03_proc_gi_errs.py: PASS > -------------------------------------------------------------------- > Profile - 01_enum.py: PASS > -------------------------------------------------------------------- > Profile - 02_profile_to_elec.py: PASS > -------------------------------------------------------------------- > Profile - 03_rprofile_gi_errs.py: PASS > -------------------------------------------------------------------- > RASD - 01_verify_rasd_fields.py: FAIL > ERROR - Mistmatching association values > -------------------------------------------------------------------- > RASD - 02_enum.py: PASS > -------------------------------------------------------------------- > RASD - 03_rasd_errs.py: PASS > -------------------------------------------------------------------- > RASD - 04_disk_rasd_size.py: PASS > -------------------------------------------------------------------- > RedirectionService - 01_enum_crs.py: PASS > -------------------------------------------------------------------- > RedirectionService - 02_enum_crscap.py: PASS > -------------------------------------------------------------------- > RedirectionService - 03_RedirectionSAP_errs.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 05_RAPF_err.py: PASS > -------------------------------------------------------------------- > ResourcePool - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePool - 02_rp_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 02_reverse.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 03_sds_fwd_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 04_sds_rev_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS > -------------------------------------------------------------------- > SystemDevice - 01_forward.py: PASS > -------------------------------------------------------------------- > SystemDevice - 02_reverse.py: PASS > -------------------------------------------------------------------- > SystemDevice - 03_fwderrs.py: PASS > -------------------------------------------------------------------- > VSSD - 01_enum.py: PASS > -------------------------------------------------------------------- > VSSD - 02_bootldr.py: SKIP > -------------------------------------------------------------------- > VSSD - 03_vssd_gi_errs.py: PASS > -------------------------------------------------------------------- > VSSD - 04_vssd_to_rasd.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 07_addresource_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 09_procrasd_persist.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 10_hv_version.py: 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 yunguol at cn.ibm.com Mon Jan 5 03:18:16 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 5 Jan 2009 11:18:16 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 05 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-05 10:42:03: > > ================================================= > Test Run Summary (Jan 05 2009): LXC on Fedora release 9.90.1 > (Rawhide) with sfcb > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 791 > Libvirt-cim changeset: 3557859610b4 > Cimtest revision: 576 > Cimtest changeset: 7ff2982fa8c1 > ================================================= > FAIL : 1 > XFAIL : 8 > SKIP : 31 > PASS : 100 > ----------------- > Total : 140 > ================================================= > FAIL Test Summary: > SettingsDefine - 02_reverse.py: FAIL > This fails because of dirty guest in the machine, it passes for me when I delete it. > ================================================= > XFAIL Test Summary: > ComputerSystem - 06_paused_active_suspend.py: XFAIL > ComputerSystem - 23_suspend_suspend.py: XFAIL > ComputerSystem - 32_start_reboot.py: XFAIL > ComputerSystem - 33_suspend_reboot.py: XFAIL > HostSystem - 02_hostsystem_to_rasd.py: XFAIL > HostedDependency - 03_enabledstate.py: XFAIL > VSSD - 04_vssd_to_rasd.py: XFAIL > VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL > > ================================================= > SKIP Test Summary: > ComputerSystem - 02_nosystems.py: SKIP > ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP > ComputerSystemIndication - 01_created_indication.py: SKIP > ElementAllocatedFromPool - 03_reverse_errs.py: SKIP > ElementAllocatedFromPool - 04_forward_errs.py: SKIP > LogicalDisk - 01_disk.py: SKIP > LogicalDisk - 02_nodevs.py: SKIP > LogicalDisk - 03_ld_gi_errs.py: SKIP > NetworkPort - 01_netport.py: SKIP > NetworkPort - 02_np_gi_errors.py: SKIP > NetworkPort - 03_user_netport.py: SKIP > Processor - 01_processor.py: SKIP > Processor - 02_definesys_get_procs.py: SKIP > Processor - 03_proc_gi_errs.py: SKIP > RASD - 04_disk_rasd_size.py: SKIP > ResourceAllocationFromPool - 05_RAPF_err.py: SKIP > ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP > VSSD - 02_bootldr.py: SKIP > VirtualSystemManagementService - 06_addresource.py: SKIP > VirtualSystemManagementService - 08_modifyresource.py: SKIP > VirtualSystemManagementService - 09_procrasd_persist.py: SKIP > VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP > VirtualSystemManagementService - 12_referenced_config.py: SKIP > VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > > ================================================= > Full report: > -------------------------------------------------------------------- > AllocationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 02_nosystems.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > ComputerSystem - 03_defineVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 04_defineStartVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 05_activate_defined_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 06_paused_active_suspend.py: XFAIL > ERROR - Exception: (1, u'Unable to pause domain: > this function is not supported by the hypervisor: virDomainSuspend') > ERROR - Unable to suspend dom 'DomST1' using > RequestedStateChange() > InvokeMethod(RequestStateChange): Unable to pause domain: this > function is not supported by the hypervisor: virDomainSuspend > Bug:<00011> > -------------------------------------------------------------------- > ComputerSystem - 22_define_suspend.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 23_suspend_suspend.py: XFAIL > ERROR - Exception: (1, u'Unable to pause domain: > this function is not supported by the hypervisor: virDomainSuspend') > ERROR - Unable to 'Suspend' dom 'cs_test_domain' > using RequestedStateChange() > InvokeMethod(RequestStateChange): Unable to pause domain: this > function is not supported by the hypervisor: virDomainSuspend > Bug:<00011> > -------------------------------------------------------------------- > ComputerSystem - 27_define_suspend_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 32_start_reboot.py: XFAIL > ERROR - Exception: (1, u'Unable to reboot domain: > this function is not supported by the hypervisor: virDomainReboot') > ERROR - Unable to 'Reboot' dom 'cs_test_domain' > using RequestedStateChange() > InvokeMethod(RequestStateChange): Unable to reboot domain: this > function is not supported by the hypervisor: virDomainReboot > Bug:<00005> > -------------------------------------------------------------------- > ComputerSystem - 33_suspend_reboot.py: XFAIL > ERROR - In fn cim_state_change() > ERROR - Failed to change state of the domain 'test_domain' > ERROR - Exception: (7, u'State not supported') > ERROR - Exception: Unable Suspend dom 'test_domain' > InvokeMethod(RequestStateChange): State not supported > Bug:<00012> > -------------------------------------------------------------------- > ComputerSystem - 35_start_reset.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 40_RSC_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: SKIP > -------------------------------------------------------------------- > ElementAllocatedFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 03_reverse_errs.py: SKIP > -------------------------------------------------------------------- > ElementAllocatedFromPool - 04_forward_errs.py: SKIP > -------------------------------------------------------------------- > ElementCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementConforms - 03_ectp_fwd_errs.py: PASS > -------------------------------------------------------------------- > ElementConforms - 04_ectp_rev_errs.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: XFAIL > ERROR - InstanceID Mismatch > ERROR - Returned CrossClass_GuestDom/mouse:xen > instead of CrossClass_GuestDom/mouse:usb > Class not found > Bug:<00009> > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: PASS > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: PASS > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > HostedDependency - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedDependency - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedDependency - 03_enabledstate.py: XFAIL > ERROR - Exception: (1, u'Unable to pause domain: > this function is not supported by the hypervisor: virDomainSuspend') > ERROR - Failed to suspend the dom: hd_domain1 > InvokeMethod(RequestStateChange): Unable to pause domain: this > function is not supported by the hypervisor: virDomainSuspend > Bug:<00011> > -------------------------------------------------------------------- > HostedDependency - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedService - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedService - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 01_disk.py: SKIP > -------------------------------------------------------------------- > LogicalDisk - 02_nodevs.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > LogicalDisk - 03_ld_gi_errs.py: SKIP > -------------------------------------------------------------------- > Memory - 01_memory.py: PASS > -------------------------------------------------------------------- > Memory - 02_defgetmem.py: PASS > -------------------------------------------------------------------- > Memory - 03_mem_gi_errs.py: PASS > -------------------------------------------------------------------- > NetworkPort - 01_netport.py: SKIP > -------------------------------------------------------------------- > NetworkPort - 02_np_gi_errors.py: SKIP > -------------------------------------------------------------------- > NetworkPort - 03_user_netport.py: SKIP > -------------------------------------------------------------------- > Processor - 01_processor.py: SKIP > -------------------------------------------------------------------- > Processor - 02_definesys_get_procs.py: SKIP > -------------------------------------------------------------------- > Processor - 03_proc_gi_errs.py: SKIP > -------------------------------------------------------------------- > Profile - 01_enum.py: PASS > -------------------------------------------------------------------- > Profile - 02_profile_to_elec.py: PASS > -------------------------------------------------------------------- > Profile - 03_rprofile_gi_errs.py: PASS > -------------------------------------------------------------------- > RASD - 01_verify_rasd_fields.py: PASS > -------------------------------------------------------------------- > RASD - 02_enum.py: PASS > -------------------------------------------------------------------- > RASD - 03_rasd_errs.py: PASS > -------------------------------------------------------------------- > RASD - 04_disk_rasd_size.py: SKIP > -------------------------------------------------------------------- > RedirectionService - 01_enum_crs.py: PASS > -------------------------------------------------------------------- > RedirectionService - 02_enum_crscap.py: PASS > -------------------------------------------------------------------- > RedirectionService - 03_RedirectionSAP_errs.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 05_RAPF_err.py: SKIP > -------------------------------------------------------------------- > ResourcePool - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePool - 02_rp_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP > -------------------------------------------------------------------- > SettingsDefine - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 02_reverse.py: FAIL > ERROR - EnabledState is 3 instead of 2. > ERROR - Try to increase the timeout and run the test again > ERROR - Unable start dom 'virtgst' > -------------------------------------------------------------------- > SettingsDefine - 03_sds_fwd_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 04_sds_rev_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS > -------------------------------------------------------------------- > SystemDevice - 01_forward.py: PASS > -------------------------------------------------------------------- > SystemDevice - 02_reverse.py: PASS > -------------------------------------------------------------------- > SystemDevice - 03_fwderrs.py: PASS > -------------------------------------------------------------------- > VSSD - 01_enum.py: PASS > -------------------------------------------------------------------- > VSSD - 02_bootldr.py: SKIP > -------------------------------------------------------------------- > VSSD - 03_vssd_gi_errs.py: PASS > -------------------------------------------------------------------- > VSSD - 04_vssd_to_rasd.py: XFAIL > ERROR - InstanceID Mismatch > ERROR - Returned VSSDC_dom/mouse:xen instead of > VSSDC_dom/mouse:usb > Bug:<00009> > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 07_addresource_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 09_procrasd_persist.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 10_hv_version.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 12_referenced_config.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 14_define_sys_disk.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL > ERROR - rstest_domain not updated properly. > ERROR - Exp AutomaticRecoveryAction=3, got 2 > Bug:<00008> > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > -------------------------------------------------------------------- > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > -------------------------------------------------------------------- > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 01_forward.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 02_reverse.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS > -------------------------------------------------------------------- > _______________________________________________ > 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 Jan 5 05:46:31 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 05 Jan 2009 11:16:31 +0530 Subject: [Libvirt-cim] Test Run Summary (Jan 05 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb In-Reply-To: References: Message-ID: <49619EB7.9070502@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-01-05 10:42:03: > > > > > ================================================= > > Test Run Summary (Jan 05 2009): LXC on Fedora release 9.90.1 > > (Rawhide) with sfcb > > ================================================= > > Distro: Fedora release 9.90.1 (Rawhide) > > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > > libvirt: 0.4.5 > > Hypervisor: QEMU 0.9.1 > > CIMOM: sfcb sfcbd 1.3.3preview > > Libvirt-cim revision: 791 > > Libvirt-cim changeset: 3557859610b4 > > Cimtest revision: 576 > > Cimtest changeset: 7ff2982fa8c1 > > ================================================= > > FAIL : 1 > > XFAIL : 8 > > SKIP : 31 > > PASS : 100 > > ----------------- > > Total : 140 > > ================================================= > > FAIL Test Summary: > > SettingsDefine - 02_reverse.py: FAIL > > > This fails because of dirty guest in the machine, it passes for me > when I delete it. Is the guest which is affecting the execution of this test case created by our tests ? If yes, then we need to fix the tc which is leaving the guest uncleaned. Thanks and Regards, Deepti. From yunguol at cn.ibm.com Mon Jan 5 06:18:22 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 5 Jan 2009 14:18:22 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 05 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb In-Reply-To: <49619EB7.9070502@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-05 13:46:31: > > > Guo Lian Yun wrote: > > > > libvirt-cim-bounces at redhat.com wrote on 2009-01-05 10:42:03: > > > > > > > > ================================================= > > > Test Run Summary (Jan 05 2009): LXC on Fedora release 9.90.1 > > > (Rawhide) with sfcb > > > ================================================= > > > Distro: Fedora release 9.90.1 (Rawhide) > > > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > > > libvirt: 0.4.5 > > > Hypervisor: QEMU 0.9.1 > > > CIMOM: sfcb sfcbd 1.3.3preview > > > Libvirt-cim revision: 791 > > > Libvirt-cim changeset: 3557859610b4 > > > Cimtest revision: 576 > > > Cimtest changeset: 7ff2982fa8c1 > > > ================================================= > > > FAIL : 1 > > > XFAIL : 8 > > > SKIP : 31 > > > PASS : 100 > > > ----------------- > > > Total : 140 > > > ================================================= > > > FAIL Test Summary: > > > SettingsDefine - 02_reverse.py: FAIL > > > > > This fails because of dirty guest in the machine, it passes for me > > when I delete it. > Is the guest which is affecting the execution of this test case created > by our tests ? > If yes, then we need to fix the tc which is leaving the guest uncleaned. > The guest is not created by our tests. That is created by me to do a test before cimtest running. Thanks! > Thanks and Regards, > Deepti. > > _______________________________________________ > 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 Jan 5 06:19:54 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 5 Jan 2009 14:19:54 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 05 2009): KVM on Fedora release 10 (Cambridge) with Pegasus Message-ID: ================================================= Test Run Summary (Jan 05 2009): KVM on Fedora release 10 (Cambridge) with Pegasus ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.7-134.fc10.x86_64 libvirt: Unknown Hypervisor: Unknown CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 791 Libvirt-cim changeset: 3557859610b4 Cimtest revision: 576 Cimtest changeset: 7ff2982fa8c1 ================================================= FAIL : 2 XFAIL : 2 SKIP : 5 PASS : 131 ----------------- Total : 140 ================================================= FAIL Test Summary: ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL RASD - 01_verify_rasd_fields.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: HostSystem - 05_hs_gi_errs.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: PASS -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - Exception: (1, u'CIM_ERR_FAILED: Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot') ERROR - Unable to 'Reboot' dom 'cs_test_domain' using RequestedStateChange() InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL ERROR - KVM_SystemDevice returned 6 Logical Devices objects -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: SKIP -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: 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: FAIL ERROR - Mistmatching association values -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: 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 Jan 5 07:53:43 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 05 Jan 2009 13:23:43 +0530 Subject: [Libvirt-cim] [PATCH] [TEST]#6 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: References: Message-ID: <4961BC87.7080306@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1230607499 28800 > # Node ID ed69cafdfc5d43fa8864edb62e774d8c53bf4d55 > # Parent 5849e413cc6e3d3330d11fbda9e9b954af774ac0 > [TEST]#6 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM > > I cann't connect to the machine for Xen test, so this patch only supports KVM now > > Signed-off-by: Guolian Yun > > diff -r 5849e413cc6e -r ed69cafdfc5d suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Mon Dec 29 19:24:59 2008 -0800 > @@ -0,0 +1,88 @@ > +#!/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 > +from XenKvmLib.enumclass import EnumInstances > +from XenKvmLib.classes import get_typed_class > +from XenKvmLib.common_util import parse_instance_id > +from XenKvmLib.const import do_main > +from XenKvmLib.vxml import get_class > +from CimTest.ReturnCodes import PASS, FAIL > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > CIM_ERROR_ENUMERATE is not used and needs to be removed. > +from XenKvmLib.const import get_provider_version > + > +SUPPORTED_TYPES = ['KVM'] > +default_dom = 'test_domain' > +libvirt_em_type_changeset = 737 > + > + at do_main(SUPPORTED_TYPES) > +def main(): > + status = FAIL > + options = main.options > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if curr_cim_rev < libvirt_em_type_changeset: > + return SKIP > + > + emu_types = [0, 1] > + try: > + for exp_emu_type in emu_types: > + cxml = get_class(options.virt)(default_dom, emu_type=exp_emu_type) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to call DefineSystem()") > + return FAIL > + > + drasd= get_typed_class(options.virt,'DiskResourceAllocationSettingData') > + > + drasd_list = EnumInstances(options.ip, drasd, ret_cim_inst=True) > Why dont we use the GetInstance() on the define domain instead of enumerating. That way we will avoid the for loop for rasd in drasd_list: below. Any thoughts ?? > + if len(drasd_list) < 1: > + raise Exception("%s returned %i instances, expected at least 1", > + drasd, len(drasd_list)) > I just double checked that the raise Exception statements cannot work without the % sign. Please change the above to the following : raise Exception("%s returned %i instances, expected at least 1" % (drasd, len(drasd_list))) > + > + found_rasd = None > + for rasd in drasd_list: > + guest, dev, status = parse_instance_id(rasd['InstanceID']) > + if status != PASS: > + raise Exception("Unable to parse InstanceID: %s" \ > + % rasd['InstanceID']) > + if guest == default_dom: > + if rasd['EmulatedType'] == exp_emu_type: > + found_rasd = rasd > + status = PASS > + break > + else: > + raise Exception("EmulatedType Mismatch: got %d," > + "expected %d", (rasd['EmulatedType'], > + exp_emu_type)) > My mistake in the last review, Please change the above back to : raise Exception("EmulatedType Mismatch: got %d, \ expected %d" % (rasd['EmulatedType'], exp_emu_type)) > + > + if found_rasd is None: > + raise Exception("DiskRASD for define dom was not found") > Very minor correction, can you change the define to defined in the above exception statement. > + except Exception, detail: > + logger.error("Exception: %s", detail) > + status = FAIL > + > + cxml.undefine(options.ip) > + > + return status > + > +if __name__ == "__main__": > + sys.exit(main()) > diff -r 5849e413cc6e -r ed69cafdfc5d suites/libvirt-cim/lib/XenKvmLib/vsms.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Dec 23 13:51:22 2008 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Dec 29 19:24:59 2008 -0800 > @@ -126,8 +126,10 @@ > > # classes to define RASD parameters > class CIM_DiskResourceAllocationSettingData(CIMClassMOF): > - def __init__(self, dev, source, name): > + def __init__(self, dev, source, name, emu_type=None): > self.ResourceType = RASD_TYPE_DISK > + if emu_type != None: > + self.EmulatedType = emu_type > if dev != None: > self.VirtualDevice = dev > self.InstanceID = '%s/%s' % (name, dev) > @@ -239,6 +241,7 @@ > proc_vcpu=1, > mem_mb=512, > malloc_units="MegaBytes", > + emu_type=None, > virt='Xen'): > vssd = get_vssd_mof(virt, dom_name) > > @@ -252,7 +255,7 @@ > elif virt == 'LXC': > disk_dev = const.LXC_default_mp > disk_source = const.LXC_default_source > - d = class_dasd(disk_dev, disk_source, dom_name) > + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > > class_masd = get_masd_class(virt) > m = class_masd( > diff -r 5849e413cc6e -r ed69cafdfc5d suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Dec 23 13:51:22 2008 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Dec 29 19:24:59 2008 -0800 > @@ -466,11 +466,13 @@ > > class VirtCIM: > def __init__(self, virt, dom_name, disk_dev, disk_source, > - net_type, net_name, net_mac, vcpus, mem, mem_allocunits): > + net_type, net_name, net_mac, vcpus, mem, > + mem_allocunits, emu_type): > self.virt = virt > self.domain_name = dom_name > self.vssd = vsms.get_vssd_mof(virt, dom_name) > - self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name) > + self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, > + dom_name, emu_type) > self.nasd = vsms.get_nasd_class(virt)(type=net_type, > mac=net_mac, > name=dom_name, > @@ -687,13 +689,15 @@ > disk_file_path=const.KVM_disk_path, > disk=const.KVM_default_disk_dev, > ntype=const.default_net_type, > - net_name=const.default_network_name): > + net_name=const.default_network_name, > + emu_type=None): > if not os.path.exists(disk_file_path): > logger.error('Error: Disk image does not exist') > sys.exit(1) > VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus) > VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path, > - ntype, net_name, mac, vcpus, mem, mem_allocunits) > + ntype, net_name, mac, vcpus, mem, > + mem_allocunits, emu_type) > self._os() > self._devices(const.KVM_default_emulator, ntype, > disk_file_path, disk, mac, net_name) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Mon Jan 5 10:03:51 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 05 Jan 2009 15:33:51 +0530 Subject: [Libvirt-cim] Test Run Summary (Jan 05 2009): Xen on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) with Pegasus Message-ID: <4961DB07.5050303@linux.vnet.ibm.com> ================================================= Test Run Summary (Jan 05 2009): Xen on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) Kernel: 2.6.18-88.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 791 Libvirt-cim changeset: 3557859610b4 Cimtest revision: 576 Cimtest changeset: 7ff2982fa8c1 ================================================= FAIL : 3 XFAIL : 1 SKIP : 3 PASS : 133 ----------------- Total : 140 ================================================= FAIL Test Summary: ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL RASD - 01_verify_rasd_fields.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_suspend_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_suspend_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: PASS -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL ERROR - Xen_SystemDevice returned 6 Logical Devices objects -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: 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 - Mistmatching association values -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: 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: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - EnabledState is 9 instead of 2. ERROR - Try to increase the timeout and run the test again ERROR - Error start domain dom_migrate ERROR - AttributeError : 'NoneType' object has no attribute 'destroy' Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 132, in do_try File "02_host_migrate_type.py", line 184, in main cxml.destroy(options.ip) AttributeError: 'NoneType' object has no attribute 'destroy' ERROR - None -------------------------------------------------------------------- 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. From kaitlin at linux.vnet.ibm.com Mon Jan 5 19:15:17 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 11:15:17 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add function to check state Message-ID: <6f478a44ce06ad28bd0c.1231182917@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231179092 28800 # Node ID 6f478a44ce06ad28bd0c5f019eeb0fff13c6e274 # Parent 7ff2982fa8c146251ba93d030da5024dae5ffa6d [TEST] Add function to check state Also clean up cim_state_change() and remove poll_for_state_change(). Signed-off-by: Kaitlin Rupert diff -r 7ff2982fa8c1 -r 6f478a44ce06 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Dec 29 04:49:43 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 05 10:11:32 2009 -0800 @@ -526,44 +526,39 @@ return False return ret[0] == 0 - def poll_for_state_change(self, server, domain_name, cs_class, keys, - req_state, timeout): - dom_cs = None + def check_guest_state(self, server, en_state, req_state=None): + if req_state is None: + req_state = en_state + + cs_class = get_typed_class(self.virt, 'ComputerSystem') + keys = { 'Name' : self.domain_name, 'CreationClassName' : cs_class } + try: + cs = GetInstance(server, cs_class, keys) + if cs.Name != self.domain_name: + raise Exception("Wrong guest instance") - for i in range(1, (timeout + 1)): - dom_cs = GetInstance(server, cs_class, keys) - if dom_cs is None or dom_cs.Name != domain_name: - continue + if cs.EnabledState != en_state: + raise Exception("EnabledState is %i, expected %i." % \ + (cs.EnabledState, en_state)) - sleep(1) - if dom_cs.EnabledState == req_state: - break - + if cs.RequestedState != req_state: + raise Exception("RequestedState is %i, expected %i." % \ + (cs.RequestedState, req_state)) + except Exception, detail: - logger.error("In fn poll_for_state_change()") + logger.error("Unable to check guest state") logger.error("Exception: %s" % detail) return FAIL - if dom_cs is None or dom_cs.Name != domain_name: - logger.error("CS instance not returned for %s." % domain_name) - return FAIL - - if dom_cs.EnabledState != req_state: - logger.error("EnabledState is %i instead of %i.", - dom_cs.EnabledState, req_state) - logger.error("Try to increase the timeout and run the test again") - return FAIL - return PASS - def cim_state_change(self, server, virt, domain_name, - req_state, req_timeout, poll_time): + def cim_state_change(self, server, req_state, req_timeout, poll_time): cs = None - cs_class = get_typed_class(virt, 'ComputerSystem') - keys = { 'Name' : domain_name, 'CreationClassName' : cs_class } + cs_class = get_typed_class(self.virt, 'ComputerSystem') + keys = { 'Name' : self.domain_name, 'CreationClassName' : cs_class } cs = GetInstance(server, cs_class, keys) - if cs is None or cs.Name != domain_name: + if cs is None or cs.Name != self.domain_name: return status try: @@ -578,41 +573,44 @@ logger.error("Exception: %s", detail) return FAIL - status = self.poll_for_state_change(server, domain_name, cs_class, keys, - req_state, poll_time) + for i in range(1, (poll_time + 1)): + status = self.check_guest_state(server, req_state) + if status == PASS: + break + return status def cim_start(self, server, req_time=const.TIME, poll_time=30): - return self.cim_state_change(server, self.virt, self.domain_name, - const.CIM_ENABLE, req_time, poll_time) + return self.cim_state_change(server, const.CIM_ENABLE, + req_time, poll_time) def cim_disable(self, server, req_time=const.TIME, poll_time=30): - return self.cim_state_change(server, self.virt, self.domain_name, - const.CIM_DISABLE, req_time, poll_time) + return self.cim_state_change(server, const.CIM_DISABLE, + req_time, poll_time) def cim_shutdown(self, server, req_time=const.TIME, poll_time=30): - return self.cim_state_change(server, self.virt, self.domain_name, - const.CIM_SHUTDOWN, req_time, poll_time) + return self.cim_state_change(server, const.CIM_SHUTDOWN, + req_time, poll_time) def cim_no_state_change(self, server, req_time=const.TIME, poll_time=30): - return self.cim_state_change(server, self.virt, self.domain_name, - const.CIM_NOCHANGE, req_time, poll_time) + return self.cim_state_change(server, const.CIM_NOCHANGE, + req_time, poll_time) def cim_suspend(self, server, req_time=const.TIME, poll_time=30): - return self.cim_state_change(server, self.virt, self.domain_name, - const.CIM_SUSPEND, req_time, poll_time) + return self.cim_state_change(server, const.CIM_SUSPEND, + req_time, poll_time) def cim_pause(self, server, req_time=const.TIME, poll_time=30): - return self.cim_state_change(server, self.virt, self.domain_name, - const.CIM_PAUSE, req_time, poll_time) + return self.cim_state_change(server, const.CIM_PAUSE, + req_time, poll_time) def cim_reboot(self, server, req_time=const.TIME, poll_time=30): - return self.cim_state_change(server, self.virt, self.domain_name, - const.CIM_REBOOT, req_time, poll_time) + return self.cim_state_change(server, const.CIM_REBOOT, + req_time, poll_time) def cim_reset(self, server, req_time=const.TIME, poll_time=30): - return self.cim_state_change(server, self.virt, self.domain_name, - const.CIM_RESET, req_time, poll_time) + return self.cim_state_change(server, const.CIM_RESET, + req_time, poll_time) class XenXML(VirtXML, VirtCIM): From kaitlin at linux.vnet.ibm.com Mon Jan 5 19:13:48 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 11:13:48 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update CS 06_paused_active_suspend.py to use cim_() functions In-Reply-To: <4959FDD2.1090100@linux.vnet.ibm.com> References: <4959FDD2.1090100@linux.vnet.ibm.com> Message-ID: <49625BEC.6000006@linux.vnet.ibm.com> >> sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] >> test_dom = "DomST1" >> -mem = 128 # MB >> START_STATE = 2 FINAL_STATE = 9 >> > We can use const.CIM_ENABLE and const.CIM_PAUSE for START_STATE and > FINAL_STATE respectively. Good catch. >> + cs_class = get_typed_class(virt, 'ComputerSystem') >> + keys = { 'Name' : test_dom, 'CreationClassName' : cs_class } >> + >> + dom_cs = GetInstance(server, cs_class, keys) >> + if dom_cs.Name != test_dom: >> + raise Exception("Instance matching %s was not returned" % >> test_dom) >> + >> + if int(dom_cs.EnabledState) != int(START_STATE): >> + raise Exception("%s start state is %s, exp %s" % (test_dom, >> + dom_cs.EnabledState, START_STATE)) >> > The below piece of code is repeated : > > cs = GetInstance(options.ip, cs_class, keys) > if cs.Name != test_dom: > raise Exception("VS '%s' is not available" % test_dom) > > if int(cs.EnabledState) != int(START_STATE): > raise Exception("%s start state is %s, exp %s" % (test_dom, > cs.EnabledState, START_STATE)) > > We can put this in a fn like check_state() , any thoughts ?? > Yep, that's a good idea. I'll send a patch for this. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 5 19:18:41 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 11:18:41 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update CS 05_activate_defined_start.py Message-ID: <1745043d345ceb2ee244.1231183121@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231183006 28800 # Node ID 1745043d345ceb2ee24462bee31c8c5e640e6bad # Parent 6f478a44ce06ad28bd0c5f019eeb0fff13c6e274 [TEST] #2 Update CS 05_activate_defined_start.py Re-wrote this test to fix readibilty and layout. Updates: -Use check_guest_state() -Use CIM state values defined in const.py Signed-off-by: Kaitlin Rupert diff -r 6f478a44ce06 -r 1745043d345c suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Mon Jan 05 10:11:32 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/05_activate_defined_start.py Mon Jan 05 11:16:46 2009 -0800 @@ -29,96 +29,49 @@ # The test is considered to be successful if RequestedState Property # has a value of "2" when the VS is moved from defined to activate state. # -# List of Valid state values (Refer to VSP spec doc Table 2 for more) -# --------------------------------- -# State | Values -# --------------------------------- -# Defined | 3 -# Active | 2 -# Paused | 9 -# Suspended | 6 -# -# # Date : 17-10-2007 import sys -from XenKvmLib import enumclass -from XenKvmLib import vxml -from VirtLib import utils +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.vxml import get_class from CimTest.Globals import logger -from XenKvmLib.const import do_main +from XenKvmLib.const import do_main, CIM_ENABLE, CIM_DISABLE from XenKvmLib.classes import get_typed_class -from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from CimTest.ReturnCodes import PASS, FAIL sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "DomST1" -mem = 128 # MB -bug_no = "00002" -START_STATE = 3 -FINAL_STATE = 2 @do_main(sup_types) def main(): options = main.options status = FAIL - cxml = vxml.get_class(options.virt)(test_dom, mem) + cxml = get_class(options.virt)(test_dom) ret = cxml.cim_define(options.ip) #Define a VS if not ret : logger.error("ERROR: VS '%s' was not defined", test_dom) return status - cs_class = get_typed_class(options.virt, 'ComputerSystem') - keys = { 'Name' : test_dom, 'CreationClassName' : cs_class } + try: + status = cxml.check_guest_state(options.ip, CIM_DISABLE, 0) + if status != PASS: + raise Exception("%s not in expected state" % test_dom) - try: - cs = enumclass.GetInstance(options.ip, cs_class, keys) - if cs.Name == test_dom: - from_State = cs.EnabledState - else: - logger.error("VS '%s' is not available", test_dom) - return status + #Change the state of the VS to Start + status = cxml.cim_start(options.ip) + if status != PASS: + raise Exception("Unable start dom '%s'" % test_dom) + + #Get the value of the EnabledState property and RequestedState property. + status = cxml.check_guest_state(options.ip, CIM_ENABLE) + if status != PASS: + raise Exception("%s not in expected state" % test_dom) except Exception, detail: logger.error("Exception: %s" % detail) - cxml.undefine(options.ip) - return status - - try: - #Change the state of the VS to Start - status = cxml.cim_start(options.ip) - if status != PASS: - logger.error("Unable start dom '%s' using " - "RequestedStateChange()", test_dom) - cxml.undefine(options.ip) - return status - - #Get the value of the EnabledState property and RequestedState property. - cs= enumclass.GetInstance(options.ip, cs_class, keys) - if cs.Name == test_dom: - to_RequestedState = cs.RequestedState - enabledState = cs.EnabledState - else: - logger.error("VS '%s' is not found", test_dom) - return status - - # Success: - # if - # From state == defined - # To state == running - # Enabled_state == RequestedState - - if from_State == START_STATE and \ - to_RequestedState == FINAL_STATE and \ - enabledState == to_RequestedState: - status = PASS - else: - logger.error("VS '%s' transition from Defined State to " - "Activate state was not Successful", test_dom) - status = XFAIL_RC(bug_no) - except Exception, detail: - logger.error("Exception: %s" % detail) + status = FAIL cxml.cim_destroy(options.ip) cxml.undefine(options.ip) From kaitlin at linux.vnet.ibm.com Mon Jan 5 19:18:56 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 11:18:56 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update CS 06_paused_active_suspend.py to use cim_() functions Message-ID: <0e6f4b82fce48e3ed1ee.1231183136@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231183018 28800 # Node ID 0e6f4b82fce48e3ed1eeb46f3b8f318ebc9f5ffb # Parent 1745043d345ceb2ee24462bee31c8c5e640e6bad [TEST] #2 Update CS 06_paused_active_suspend.py to use cim_() functions. This test has been re-written so it is now easier to read and flows better. Updates: -Use check_guest_state() -Use CIM state values defined in const.py Signed-off-by: Kaitlin Rupert diff -r 1745043d345c -r 0e6f4b82fce4 suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Mon Jan 05 11:16:46 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/06_paused_active_suspend.py Mon Jan 05 11:16:58 2009 -0800 @@ -26,36 +26,20 @@ # information related to this is captured in the RequestedState Property # of the VS. # The test is considered to be successful if RequestedState Property -# has a value of "9" when the VS is moved from active to suspend state. +# has a value of "9" when the VS is moved from active to paused state. # -# List of Valid state values (Refer to VSP spec doc Table 2 for more) -# --------------------------------- -# State | Values -# --------------------------------- -# Defined | 3 -# Active | 2 -# Paused | 9 -# Suspended | 6 -# -# # Date :18-10-2007 import sys -from XenKvmLib import vxml -from VirtLib import utils -from XenKvmLib.test_doms import destroy_and_undefine_all +from XenKvmLib.vxml import get_class from CimTest.Globals import logger -from XenKvmLib.const import do_main -from XenKvmLib.common_util import call_request_state_change, \ -poll_for_state_change +from XenKvmLib.const import do_main, CIM_ENABLE, CIM_PAUSE from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.classes import get_typed_class +from XenKvmLib.enumclass import GetInstance sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] test_dom = "DomST1" -mem = 128 # MB -START_STATE = 2 -FINAL_STATE = 9 -TIME = "00000000000000.000000:000" bug_libvirt = "00011" @do_main(sup_types) @@ -65,69 +49,42 @@ server = options.ip virt = options.virt - destroy_and_undefine_all(server) - - cxml = vxml.get_class(virt)(test_dom, mem) + cxml = get_class(virt)(test_dom) #Create VS + pause_failed = False try: - ret = cxml.create(server) + ret = cxml.cim_define(server) if not ret: - logger.error("VS '%s' was not created" % test_dom) - return status + raise Exception("VS '%s' was not defined" % test_dom) + + status = cxml.cim_start(server) + if status != PASS: + raise Exception("Unable start dom '%s'" % test_dom) + + status = cxml.check_guest_state(options.ip, CIM_ENABLE) + if status != PASS: + raise Exception("%s not in expected state" % test_dom) + + #Pause the VS + status = cxml.cim_pause(server) + if status != PASS: + pause_failed = True + raise Exception("Unable pause dom '%s'" % test_dom) + + status = cxml.check_guest_state(options.ip, CIM_PAUSE) + if status != PASS: + raise Exception("%s not in expected state" % test_dom) + except Exception, detail: logger.error("Exception variable: %s" % detail) - return status - - status, dom_cs = poll_for_state_change(server, virt, test_dom, - START_STATE) - - if status != PASS: - cxml.destroy(server) - return status - - from_State = dom_cs.EnabledState - - #Suspend the VS - status = call_request_state_change(test_dom, server, FINAL_STATE, - TIME, virt) - if status != PASS: - logger.error("Unable to suspend dom '%s' using RequestedStateChange()", - test_dom) - cxml.destroy(server) - if virt == 'LXC': - return XFAIL_RC(bug_libvirt) - return status - - #Polling for the value of EnabledState to be set to 9. - #We need to wait for the EnabledState to be set appropriately since - #it does not get set immediatley to value of 9 when suspended. - status, dom_cs = poll_for_state_change(server, virt, test_dom, - FINAL_STATE, timeout=40) - - if status != PASS: - cxml.destroy(server) - return status - - enabledState = dom_cs.EnabledState - to_RequestedState = dom_cs.RequestedState - - # Success: - # if - # From state == 2 - # To state == 9 - # Enabled_state == RequestedState - - if from_State == START_STATE and \ - to_RequestedState == FINAL_STATE and \ - to_RequestedState == enabledState: - status = PASS - else: - logger.error("VS '%s' transition from Activate State to Suspend State" - " was not Successful" % test_dom) status = FAIL cxml.destroy(server) + cxml.undefine(options.ip) + + if pause_failed and virt == 'LXC': + return XFAIL_RC(bug_libvirt) return status if __name__ == "__main__": From kaitlin at linux.vnet.ibm.com Mon Jan 5 21:20:02 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 13:20:02 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing 41_cs_to_settingdefinestate.py CS tc In-Reply-To: <7e5820001e1f1dbcc8b5.1230733301@elm3b151.beaverton.ibm.com> References: <7e5820001e1f1dbcc8b5.1230733301@elm3b151.beaverton.ibm.com> Message-ID: <49627982.8080507@linux.vnet.ibm.com> > 4) Algined the tc to 80 columns. Can you fix the comment block at the top of the test case? These lines aren't formatted to 80 characters. Can you also fix the indention for the Associators() call in get_associators_info(). The indention looks like the following: assoc_info = Associators(server, an, cn, InstanceID = instid) It should look like: assoc_info = Associators(server, an, cn, InstanceID = instid) > + > + > +def get_SDS_verify_RASD_build_vssdc_input(server, virt, an, cs_cn, > + rasd_values, sd_assoc_info): This function is pretty big - can you break this up into smaller functions? > > - # Expect the SystemDevice to return 4 logical device records. > - # one each for memory, network, disk and processor and hence 4. > - # and hence expect the in_setting_define_state to contain just 4 entries. > - an = get_typed_class(virt, "SystemDevice") > + # Expect the SystemDevice records == len(rasd_values) entries. > qcn = "Logical Devices" > - exp_len = 4 > + exp_len = len(rasd_values) > if check_len(an, in_setting_define_state, qcn, exp_len) != PASS: > return FAIL, in_setting_define_state I know you need to check the len is several places, but the check_len() function is just a few lines of code. I think having a function for this abstracts too much of the function into a separate function. I would remove the check_len() and print_err() functions. They're not really large enough to need their own functions. > > - status, cs_dom = poll_for_state_change(server, virt, test_dom, 2, > - timeout=10) > - if status != PASS and cs_dom.RequestedState != 0: > - vsxml.destroy(server) > - return FAIL > + an = get_typed_class(virt, 'SystemDevice') > + qcn = 'Logical Devices' This spacing here is strange. It should be: an = get_typed_class(virt, 'SystemDevice') One whitespace before and after the '=' > + rasd_val, status = init_rasd_list(virt, server) > + status, in_vssdc_list = get_SDS_verify_RASD_build_vssdc_input(server, > + virt, an, > + cs_class, > + rasd_val, > + sd_assoc) > + exp_len = len(rasd_val) > + if status !=PASS or check_len(an, in_vssdc_list, qcn, exp_len) != PASS: Space between != and PASS. > > - # verify the results of SettingsDefineState with the cs_values list that was > - # built using the output of the enumeration on ComputerSystem. > - status = verify_CS_values(cs_assoc_info, cs_values, an, qcn) > + # verify the results of SettingsDefineState with the cs_values list that was This line is longer than 80 characters. I think main() is still a little difficult to read. I would try to break it up into functions. You could have something like the following: 1) system_device_assoc() - do your verify in this function 2) sds_assoc() 3) vssdc_assoc() You don't have to do it this way, but it's just a suggestion on how to break the test case up some. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 5 22:48:03 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 14:48:03 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Rename 27_define_suspend_errs.py to 27_define_pause_errs.py Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231193318 28800 # Node ID ae40dfa1b8f6e134d200233d2e5b3395855cafa2 # Parent 5ca146678acf60551b90b1e07a94633f0668b8c3 [TEST] Rename 27_define_suspend_errs.py to 27_define_pause_errs.py CIM requested state 9 is pause, not suspend. So this test is being renamed. It was also updated to use cim_() functions. Signed-off-by: Kaitlin Rupert diff -r 5ca146678acf -r ae40dfa1b8f6 suites/libvirt-cim/cimtest/ComputerSystem/27_define_pause_errs.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/27_define_pause_errs.py Mon Jan 05 14:08:38 2009 -0800 @@ -0,0 +1,75 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Anoop V Chakkalakkal +# +# +# 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 +# +# Test Case Info: +# -------------- +# This test case is used to verify the Virtual System State Transition +# The test is considered to be successful if the request for the invalid +# state change from defined to suspend fails +# +# Date: 05-03-2008 +# + +import sys +from CimTest.Globals import logger +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class + +sup_types = ['Xen', 'XenFV', 'LXC', 'KVM'] + +default_dom = 'test_domain' + + at do_main(sup_types) +def main(): + options = main.options + server = options.ip + virt = options.virt + status = FAIL + + try: + # define the vs + cxml = get_class(options.virt)(default_dom) + ret = cxml.cim_define(server) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) + + status = cxml.cim_pause(server) + if status != PASS: + raise Exception("Unable pause dom '%s'" % default_dom) + + except Exception, details: + logger.error("Exception: %s", details) + status = FAIL + + if status != FAIL: + logger.error("Expected Defined -> Suspended state transition to fail") + status = FAIL + else: + status = PASS + + cxml.undefine(server) + + return status + +if __name__ == "__main__": + sys.exit(main()) diff -r 5ca146678acf -r ae40dfa1b8f6 suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Mon Jan 05 13:41:14 2009 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -#!/usr/bin/python -# -# Copyright 2008 IBM Corp. -# -# Authors: -# Anoop V Chakkalakkal -# -# -# 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 -# -# Test Case Info: -# -------------- -# This test case is used to verify the Virtual System State Transition -# The test is considered to be successful if the request for the invalid -# state change from defined to suspend fails -# -# List of Valid state values (Refer to VSP spec doc Table 2 for more) -# --------------------------------- -# State | Values -# --------------------------------- -# Defined | 3 -# Suspend | 9 -# -# Date: 05-03-2008 -# - -import sys -import pywbem -from VirtLib import utils -from CimTest.Globals import logger -from XenKvmLib.const import do_main -from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import try_request_state_change, \ - create_using_definesystem - -sup_types = ['Xen', 'XenFV', 'LXC', 'KVM'] - -SUSPEND_STATE = 9 -default_dom = 'test_domain' -TIME = "00000000000000.000000:000" -exp_rc = pywbem.CIM_ERR_FAILED -exp_desc = 'Domain not running' - - - at do_main(sup_types) -def main(): - options = main.options - server = options.ip - virt = options.virt - status = FAIL - - try: - # define the vs - status = create_using_definesystem(default_dom, server, virt=virt) - if status != PASS: - logger.error("Unable to define domain '%s' using DefineSystem()", - default_dom) - return status - - except Exception, details: - logger.error("Exception: %s", details) - destroy_and_undefine_domain(default_dom, server, virt) - return FAIL - - status = try_request_state_change(default_dom, server, - SUSPEND_STATE, TIME, exp_rc, - exp_desc, virt) - - if status != PASS: - logger.error("Expected Defined -> Suspended state transition to fail") - - destroy_and_undefine_domain(default_dom, server, virt) - return status - -if __name__ == "__main__": - sys.exit(main()) From kaitlin at linux.vnet.ibm.com Mon Jan 5 22:48:18 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 14:48:18 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update 32_start_reboot.py to use cim_() functions Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231194787 28800 # Node ID f317d11f46a29a8141563498076d716153dfc5f2 # Parent ae40dfa1b8f6e134d200233d2e5b3395855cafa2 [TEST] Update 32_start_reboot.py to use cim_() functions Also change cim_state_change() to support enable and requested state parameters. Signed-off-by: Kaitlin Rupert diff -r ae40dfa1b8f6 -r f317d11f46a2 suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Jan 05 14:08:38 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Jan 05 14:33:07 2009 -0800 @@ -28,26 +28,13 @@ # The test is considered to be successful if RequestedState Property # has a value of 10 when the VS is moved from active to reboot state. # -# List of Valid state values (Refer to VSP spec doc Table 2 for more) -# --------------------------------- -# State | Values -# --------------------------------- -# Defined | 3 -# Active | 2 -# Rebooted | 10 -# # Date: 03-03-2008 import sys -from VirtLib import utils -from time import sleep from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import create_using_definesystem, \ - call_request_state_change, \ - poll_for_state_change +from XenKvmLib.vxml import get_class sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] @@ -64,45 +51,35 @@ server = options.ip virt = options.virt - tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ - ('Reboot', [ACTIVE_STATE, REBOOT_STATE])] - + action_failed = False try: # define the vs - status = create_using_definesystem(default_dom, server, - virt=virt) + cxml = get_class(virt)(default_dom) + ret = cxml.cim_define(server) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) + + status = cxml.cim_start(server) if status != PASS: - logger.error("Unable to define domain '%s' using DefineSystem()", - default_dom) - return status + action_failed = True + raise Exception("Unable start dom '%s'" % default_dom) - # start, then reboot - for action, state in tc_scen: - en_state = state[0] - rq_state = state[1] - status = call_request_state_change(default_dom, server, - rq_state, TIME, - virt=virt) - if status != PASS: - logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", - action, default_dom) - status = XFAIL_RC(bug_libvirt) - break - - status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, - timeout=10) - - if status != PASS or dom_cs.RequestedState != rq_state: - status = FAIL - logger.error("Attributes for dom '%s' is not set as expected.", - default_dom) - break + status = cxml.cim_reboot(server) + if status != PASS: + action_failed = True + raise Exception("Unable reboot dom '%s'" % default_dom) except Exception, detail: logger.error("Exception: %s", detail) status = FAIL - destroy_and_undefine_domain(default_dom, server, virt) + cxml.cim_destroy(server) + cxml.undefine(server) + + if action_failed: + if virt == "KVM" or virt == "LXC": + return XFAIL_RC(bug_libvirt) + return status if __name__ == "__main__": diff -r ae40dfa1b8f6 -r f317d11f46a2 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 05 14:08:38 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 05 14:33:07 2009 -0800 @@ -535,7 +535,7 @@ try: cs = GetInstance(server, cs_class, keys) - if cs.Name != self.domain_name: + if cs is None or cs.Name != self.domain_name: raise Exception("Wrong guest instance") if cs.EnabledState != en_state: @@ -553,7 +553,11 @@ return PASS - def cim_state_change(self, server, req_state, req_timeout, poll_time): + def cim_state_change(self, server, req_state, req_timeout, poll_time, + en_state=None): + if en_state is None: + en_state = req_state + cs = None cs_class = get_typed_class(self.virt, 'ComputerSystem') keys = { 'Name' : self.domain_name, 'CreationClassName' : cs_class } @@ -562,7 +566,7 @@ return status try: - req_state_change = pywbem.cim_types.Uint16(req_state) + req_state_change = pywbem.cim_types.Uint16(req_state) time_period = pywbem.cim_types.CIMDateTime(req_timeout) cs.RequestStateChange(RequestedState=req_state_change, TimeoutPeriod=time_period) @@ -574,7 +578,7 @@ return FAIL for i in range(1, (poll_time + 1)): - status = self.check_guest_state(server, req_state) + status = self.check_guest_state(server, en_state, req_state) if status == PASS: break @@ -606,7 +610,7 @@ def cim_reboot(self, server, req_time=const.TIME, poll_time=30): return self.cim_state_change(server, const.CIM_REBOOT, - req_time, poll_time) + req_time, poll_time, const.CIM_ENABLE) def cim_reset(self, server, req_time=const.TIME, poll_time=30): return self.cim_state_change(server, const.CIM_RESET, From kaitlin at linux.vnet.ibm.com Mon Jan 5 22:48:40 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 14:48:40 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update 35_start_reset.py to work with cim_() functions Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231195386 28800 # Node ID e476bb52a679fd519086a5fbb8310568cb192ddc # Parent f317d11f46a29a8141563498076d716153dfc5f2 [TEST] Update 35_start_reset.py to work with cim_() functions Signed-off-by: Kaitlin Rupert diff -r f317d11f46a2 -r e476bb52a679 suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Mon Jan 05 14:33:07 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/35_start_reset.py Mon Jan 05 14:43:06 2009 -0800 @@ -29,80 +29,48 @@ # has a value of 2 when the VS is moved from defined to active state and # and has a value of 11 when reset # -# List of Valid state values (Refer to VSP spec doc Table 2 for more) -# --------------------------------- -# State | Values -# --------------------------------- -# Defined | 3 -# Active | 2 -# Reset | 11 -# # Date: 06-03-2008 import sys -from VirtLib import utils from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import get_cs_instance, create_using_definesystem, \ - call_request_state_change, \ - poll_for_state_change +from XenKvmLib.vxml import get_class sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] -ACTIVE_STATE = 2 -RESET_STATE = 11 - default_dom = 'cs_test_domain' -TIME = "00000000000000.000000:000" @do_main(sup_types) def main(): options = main.options status = FAIL server = options.ip - virt = options.virt - - tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), - ('Reset', [ACTIVE_STATE, RESET_STATE])] + virt = options.virt try: # define the vs - status = create_using_definesystem(default_dom, server, - virt=virt) - if status != PASS: - logger.error("Unable to define domain '%s' using DefineSystem()", - default_dom) - return status + cxml = get_class(virt)(default_dom) + ret = cxml.cim_define(server) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) # start and reset - for action, state in tc_scen: - en_state = state[0] - rq_state = state[1] - status = call_request_state_change(default_dom, server, - rq_state, TIME, - virt=virt) - if status != PASS: - logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", - action, default_dom) - break + status = cxml.cim_start(server) + if status != PASS: + raise Exception("Unable start dom '%s'" % default_dom) - status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, - timeout=30) - - if status != PASS or dom_cs.RequestedState != rq_state: - status = FAIL - logger.error("Attributes for dom '%s' is not set as expected.", - default_dom) - break - + status = cxml.cim_reset(server) + if status != PASS: + raise Exception("Unable reset dom '%s'" % default_dom) except Exception, detail: logger.error("Exception: %s", detail) status = FAIL - destroy_and_undefine_domain(default_dom, server, virt) + cxml.cim_destroy(server) + cxml.undefine(server) + return status if __name__ == "__main__": diff -r f317d11f46a2 -r e476bb52a679 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 05 14:33:07 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 05 14:43:06 2009 -0800 @@ -614,7 +614,7 @@ def cim_reset(self, server, req_time=const.TIME, poll_time=30): return self.cim_state_change(server, const.CIM_RESET, - req_time, poll_time) + req_time, poll_time, const.CIM_ENABLE) class XenXML(VirtXML, VirtCIM): From kaitlin at linux.vnet.ibm.com Mon Jan 5 22:48:54 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 14:48:54 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update 40_RSC_start.py to use cim_start() Message-ID: <5650fd38e40aca51f200.1231195734@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231195541 28800 # Node ID 5650fd38e40aca51f20037f9df695930ddff7cdf # Parent e476bb52a679fd519086a5fbb8310568cb192ddc [TEST] Update 40_RSC_start.py to use cim_start() Signed-off-by: Kaitlin Rupert diff -r e476bb52a679 -r 5650fd38e40a suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Mon Jan 05 14:43:06 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/40_RSC_start.py Mon Jan 05 14:45:41 2009 -0800 @@ -34,19 +34,14 @@ # import sys -import pywbem -from VirtLib import utils -from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import * from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] default_dom = 'cs_test_domain' -REQUESTED_STATE = 2 -TIME = "00000000000000.000000:000" @do_main(sup_types) def main(): @@ -56,34 +51,23 @@ status = FAIL try: - rc = create_using_definesystem(default_dom, server, - virt=virt) - if rc != 0: - status = FAIL - raise Exception("DefineSystem() failed to create domain: '%s'" % - default_dom) + cxml = get_class(virt)(default_dom) + ret = cxml.cim_define(server) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) - rc = call_request_state_change(default_dom, server, - REQUESTED_STATE, TIME, virt) - if rc != 0: - status = FAIL - raise Exception("RequestedStateChange() could not be used to start" - " domain: '%s'" % default_dom) - - status, dom_cs = poll_for_state_change(server, virt, default_dom, - REQUESTED_STATE, timeout=10) - - if status != PASS or dom_cs.RequestedState != REQUESTED_STATE: - status = FAIL - raise Exception("Attributes were not set as expected for " - "domain: '%s'" % default_dom) - else: - status = PASS + status = cxml.cim_start(server) + if status != PASS: + action_failed = True + raise Exception("Unable start dom '%s'" % default_dom) except Exception, detail: logger.error("Exception: %s", detail) + status = FAIL - destroy_and_undefine_domain(default_dom, server, virt) + cxml.cim_destroy(server) + cxml.undefine(server) + return status if __name__ == "__main__": From kaitlin at linux.vnet.ibm.com Mon Jan 5 23:13:09 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 15:13:09 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update Processor -t 02_definesys_get_procs.py to use cim_define() Message-ID: <87b41555ea6e8a363cc9.1231197189@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231196579 28800 # Node ID 87b41555ea6e8a363cc966b599e0cf28af4fd318 # Parent 5650fd38e40aca51f20037f9df695930ddff7cdf [TEST] Update Processor -t 02_definesys_get_procs.py to use cim_define() Signed-off-by: Kaitlin Rupert diff -r 5650fd38e40a -r 87b41555ea6e suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py --- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Mon Jan 05 14:45:41 2009 -0800 +++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Mon Jan 05 15:02:59 2009 -0800 @@ -32,11 +32,7 @@ # import sys -import pywbem -from XenKvmLib.classes import get_typed_class -from XenKvmLib.vxml import XenXML, KVMXML, get_class -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem +from XenKvmLib.vxml import get_class from XenKvmLib.devices import get_dom_proc_insts from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -71,33 +67,29 @@ @do_main(sup_types) def main(): options = main.options - status = PASS - - undefine_test_domain(default_dom, options.ip) + status = FAIL try: - rc = create_using_definesystem(default_dom, options.ip, params=None, - ref_config=' ', exp_err=None, - virt=options.virt) - if rc != 0: - raise Exception("Unable create domain %s using DefineSystem()" \ - % default_dom) + cxml = get_class(options.virt)(default_dom) + ret = cxml.cim_define(options.ip) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) proc_list = get_dom_proc_insts(options.virt, options.ip, default_dom) if len(proc_list) == 0: raise Exception("Failied to retrieve vcpu instances for %s" \ % default_dom) - rc = check_processors(proc_list) - if rc != 0: + status = check_processors(proc_list) + if status != PASS: raise Exception("Processor instances for %s are not as expected." \ % default_dom) - + except Exception, detail: logger.error("Exception: %s" % detail) status = FAIL - undefine_test_domain(default_dom, options.ip) + cxml.undefine(options.ip) return status From kaitlin at linux.vnet.ibm.com Mon Jan 5 23:27:56 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 05 Jan 2009 15:27:56 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update Memory - 02_defgetmem.py to use cim_define() Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231198069 28800 # Node ID e285d6399feada658bb9a360aab15f1ff5d76e1f # Parent 87b41555ea6e8a363cc966b599e0cf28af4fd318 [TEST] Update Memory - 02_defgetmem.py to use cim_define() Also, modify the test to use PASS/FAIL values. Signed-off-by: Kaitlin Rupert diff -r 87b41555ea6e -r e285d6399fea suites/libvirt-cim/cimtest/Memory/02_defgetmem.py --- a/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Mon Jan 05 15:02:59 2009 -0800 +++ b/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Mon Jan 05 15:27:49 2009 -0800 @@ -29,64 +29,57 @@ # 4. Verify the DeviceId and domName with the instance info. import sys -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem +from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.devices import get_dom_mem_inst from CimTest.Globals import logger from XenKvmLib.const import do_main +from XenKvmLib.vxml import get_class sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] default_dom = "domu" def check_mem(memInst): - status = 0 for mem in memInst: if mem['SystemName'] != default_dom: logger.error("Inst returned is for guesst %s, expected guest %s.", mem['SystemName'], default_dom) - return 1 + return FAIL devid = "%s/%s" % (default_dom, "mem" ) if mem['DeviceID'] != devid: logger.error("DeviceID %s does not match expected %s.", mem['DeviceID'], devid) - status = 1 - else: - logger.info("Memory : Verified domain %s having DeviceID %s" % \ - (default_dom, devid)) + return FAIL - return status + logger.info("Verified domain %s having DeviceID %s", default_dom, devid) + + return PASS @do_main(sup_types) def main(): options = main.options - status = 0 + status = FAIL - undefine_test_domain(default_dom, options.ip) - - + cxml = get_class(options.virt)(default_dom) try: - rc = create_using_definesystem(default_dom, options.ip, params=None, - ref_config='', exp_err=None, - virt=options.virt) - if rc != 0: - raise Exception("Unable to create domain %s using DefineSys()" % default_dom) + ret = cxml.cim_define(options.ip) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) memInst = get_dom_mem_inst(options.virt, options.ip, default_dom) + if len(memInst) == 0: + raise Exception("Failied to get mem instances for %s" % default_dom) - if len(memInst) == 0: - raise Exception("Failied to retrieve mem instances for %s" % default_dom) - - rc = check_mem(memInst) - if rc != 0: - raise Exception("Memory instance for %s is not as expected." % default_dom) + status = check_mem(memInst) + if status != PASS: + raise Exception("Memory inst for %s not as expected." % default_dom) except Exception, detail: logger.error("Exception: %s" % detail) - status = 1 + status = FAIL - undefine_test_domain(default_dom, options.ip) + cxml.undefine(options.ip) return status From yunguol at cn.ibm.com Tue Jan 6 02:49:45 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 05 Jan 2009 18:49:45 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM Message-ID: # HG changeset patch # User Guolian Yun # Date 1231210158 28800 # Node ID b592961ccaac67ad3cfd8876beb22beec0c28492 # Parent 64b84ef28b22d17dd22027c632a9dc44d642d2b5 [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM Updates form 6 to 7: Correct exception description Signed-off-by: Guolian Yun diff -r 64b84ef28b22 -r b592961ccaac suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Mon Jan 05 18:49:18 2009 -0800 @@ -0,0 +1,88 @@ +#!/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 +from XenKvmLib.enumclass import EnumInstances +from XenKvmLib.classes import get_typed_class +from XenKvmLib.common_util import parse_instance_id +from XenKvmLib.const import do_main +from XenKvmLib.vxml import get_class +from CimTest.ReturnCodes import PASS, FAIL +from CimTest.Globals import logger +from XenKvmLib.const import get_provider_version + +SUPPORTED_TYPES = ['KVM'] +default_dom = 'test_domain' +libvirt_em_type_changeset = 737 + + at do_main(SUPPORTED_TYPES) +def main(): + status = FAIL + options = main.options + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) + if curr_cim_rev < libvirt_em_type_changeset: + return SKIP + + emu_types = [0, 1] + try: + for exp_emu_type in emu_types: + cxml = get_class(options.virt)(default_dom, emu_type=exp_emu_type) + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Failed to call DefineSystem()") + return FAIL + + drasd= get_typed_class(options.virt,'DiskResourceAllocationSettingData') + + drasd_list = EnumInstances(options.ip, drasd, ret_cim_inst=True) + if len(drasd_list) < 1: + raise Exception("%s returned %i instances, expected at least 1" \ + %(drasd, len(drasd_list))) + + found_rasd = None + for rasd in drasd_list: + guest, dev, status = parse_instance_id(rasd['InstanceID']) + if status != PASS: + raise Exception("Unable to parse InstanceID: %s" \ + % rasd['InstanceID']) + if guest == default_dom: + if rasd['EmulatedType'] == exp_emu_type: + found_rasd = rasd + status = PASS + break + else: + raise Exception("EmulatedType Mismatch: got %d," + "expected %d" %(rasd['EmulatedType'], + exp_emu_type)) + + if found_rasd is None: + raise Exception("DiskRASD for defined dom was not found") + except Exception, detail: + logger.error("Exception: %s", detail) + status = FAIL + + cxml.undefine(options.ip) + + return status + +if __name__ == "__main__": + sys.exit(main()) diff -r 64b84ef28b22 -r b592961ccaac suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Dec 30 00:58:06 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jan 05 18:49:18 2009 -0800 @@ -126,8 +126,10 @@ # classes to define RASD parameters class CIM_DiskResourceAllocationSettingData(CIMClassMOF): - def __init__(self, dev, source, name): + def __init__(self, dev, source, name, emu_type=None): self.ResourceType = RASD_TYPE_DISK + if emu_type != None: + self.EmulatedType = emu_type if dev != None: self.VirtualDevice = dev self.InstanceID = '%s/%s' % (name, dev) @@ -239,6 +241,7 @@ proc_vcpu=1, mem_mb=512, malloc_units="MegaBytes", + emu_type=None, virt='Xen'): vssd = get_vssd_mof(virt, dom_name) @@ -252,7 +255,7 @@ elif virt == 'LXC': disk_dev = const.LXC_default_mp disk_source = const.LXC_default_source - d = class_dasd(disk_dev, disk_source, dom_name) + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) class_masd = get_masd_class(virt) m = class_masd( diff -r 64b84ef28b22 -r b592961ccaac suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Dec 30 00:58:06 2008 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 05 18:49:18 2009 -0800 @@ -466,11 +466,13 @@ class VirtCIM: def __init__(self, virt, dom_name, disk_dev, disk_source, - net_type, net_name, net_mac, vcpus, mem, mem_allocunits): + net_type, net_name, net_mac, vcpus, mem, + mem_allocunits, emu_type): self.virt = virt self.domain_name = dom_name self.vssd = vsms.get_vssd_mof(virt, dom_name) - self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name) + self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, + dom_name, emu_type) self.nasd = vsms.get_nasd_class(virt)(type=net_type, mac=net_mac, name=dom_name, @@ -687,13 +689,15 @@ disk_file_path=const.KVM_disk_path, disk=const.KVM_default_disk_dev, ntype=const.default_net_type, - net_name=const.default_network_name): + net_name=const.default_network_name, + emu_type=None): if not os.path.exists(disk_file_path): logger.error('Error: Disk image does not exist') sys.exit(1) VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus) VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path, - ntype, net_name, mac, vcpus, mem, mem_allocunits) + ntype, net_name, mac, vcpus, mem, + mem_allocunits, emu_type) self._os() self._devices(const.KVM_default_emulator, ntype, disk_file_path, disk, mac, net_name) From yunguol at cn.ibm.com Tue Jan 6 02:41:26 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 6 Jan 2009 10:41:26 +0800 Subject: [Libvirt-cim] [PATCH] [TEST]#6 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: <4961BC87.7080306@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-05 15:53:43: > > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1230607499 28800 > > # Node ID ed69cafdfc5d43fa8864edb62e774d8c53bf4d55 > > # Parent 5849e413cc6e3d3330d11fbda9e9b954af774ac0 > > [TEST]#6 Add new test to verify enum of DiskRASD to have > EmulatedType=0 for Disk and EmulatedType=1 for CDROM > > > > I cann't connect to the machine for Xen test, so this patch only > supports KVM now > > > > Signed-off-by: Guolian Yun > > > > diff -r 5849e413cc6e -r ed69cafdfc5d suites/libvirt- > cim/cimtest/RASD/05_disk_rasd_emu_type.py > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > +++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py > Mon Dec 29 19:24:59 2008 -0800 > > @@ -0,0 +1,88 @@ > > +#!/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 > > +from XenKvmLib.enumclass import EnumInstances > > +from XenKvmLib.classes import get_typed_class > > +from XenKvmLib.common_util import parse_instance_id > > +from XenKvmLib.const import do_main > > +from XenKvmLib.vxml import get_class > > +from CimTest.ReturnCodes import PASS, FAIL > > +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE > > > CIM_ERROR_ENUMERATE is not used and needs to be removed. > > +from XenKvmLib.const import get_provider_version > > + > > +SUPPORTED_TYPES = ['KVM'] > > +default_dom = 'test_domain' > > +libvirt_em_type_changeset = 737 > > + > > + at do_main(SUPPORTED_TYPES) > > +def main(): > > + status = FAIL > > + options = main.options > > + curr_cim_rev, changeset = get_provider_version(options.virt, > options.ip) > > + if curr_cim_rev < libvirt_em_type_changeset: > > + return SKIP > > + > > + emu_types = [0, 1] > > + try: > > + for exp_emu_type in emu_types: > > + cxml = get_class(options.virt)(default_dom, > emu_type=exp_emu_type) > > + ret = cxml.cim_define(options.ip) > > + if not ret: > > + logger.error("Failed to call DefineSystem()") > > + return FAIL > > + > > + drasd= get_typed_class(options. > virt,'DiskResourceAllocationSettingData') > > + > > + drasd_list = EnumInstances(options.ip, drasd, > ret_cim_inst=True) > > > Why dont we use the GetInstance() on the define domain instead of > enumerating. That way we will avoid the for loop > > for rasd in drasd_list: below. Any thoughts ?? We can use the GetInstnace() on the define domain by passing a key list. I think it's similar with EnumInstances() call. If you think it's better than EnumInstances, I will change it on next patch. Thanks! > > > + if len(drasd_list) < 1: > > + raise Exception("%s returned %i instances, > expected at least 1", > > + drasd, len(drasd_list)) > > > I just double checked that the raise Exception statements cannot work > without the % sign. > Please change the above to the following : > > raise Exception("%s returned %i instances, expected at least 1" % > (drasd, len(drasd_list))) > > > > + > > + found_rasd = None > > + for rasd in drasd_list: > > + guest, dev, status = parse_instance_id(rasd['InstanceID']) > > + if status != PASS: > > + raise Exception("Unable to parse InstanceID: %s" \ > > + % rasd['InstanceID']) > > + if guest == default_dom: > > + if rasd['EmulatedType'] == exp_emu_type: > > + found_rasd = rasd > > + status = PASS > > + break > > + else: > > + raise Exception("EmulatedType Mismatch: got %d," > > + "expected %d", > (rasd['EmulatedType'], > > + exp_emu_type)) > > > My mistake in the last review, Please change the above back to : > raise Exception("EmulatedType Mismatch: got %d, \ > expected %d" % (rasd['EmulatedType'], > exp_emu_type)) > > > + > > + if found_rasd is None: > > + raise Exception("DiskRASD for define dom was not found") > > > Very minor correction, can you change the define to defined in the above > exception statement. > > + except Exception, detail: > > + logger.error("Exception: %s", detail) > > + status = FAIL > > + > > + cxml.undefine(options.ip) > > + > > + return status > > + > > +if __name__ == "__main__": > > + sys.exit(main()) > > diff -r 5849e413cc6e -r ed69cafdfc5d suites/libvirt- > cim/lib/XenKvmLib/vsms.py > > --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Dec 23 13:51: > 22 2008 -0800 > > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Dec 29 19:24: > 59 2008 -0800 > > @@ -126,8 +126,10 @@ > > > > # classes to define RASD parameters > > class CIM_DiskResourceAllocationSettingData(CIMClassMOF): > > - def __init__(self, dev, source, name): > > + def __init__(self, dev, source, name, emu_type=None): > > self.ResourceType = RASD_TYPE_DISK > > + if emu_type != None: > > + self.EmulatedType = emu_type > > if dev != None: > > self.VirtualDevice = dev > > self.InstanceID = '%s/%s' % (name, dev) > > @@ -239,6 +241,7 @@ > > proc_vcpu=1, > > mem_mb=512, > > malloc_units="MegaBytes", > > + emu_type=None, > > virt='Xen'): > > vssd = get_vssd_mof(virt, dom_name) > > > > @@ -252,7 +255,7 @@ > > elif virt == 'LXC': > > disk_dev = const.LXC_default_mp > > disk_source = const.LXC_default_source > > - d = class_dasd(disk_dev, disk_source, dom_name) > > + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > > > > class_masd = get_masd_class(virt) > > m = class_masd( > > diff -r 5849e413cc6e -r ed69cafdfc5d suites/libvirt- > cim/lib/XenKvmLib/vxml.py > > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Dec 23 13:51: > 22 2008 -0800 > > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Dec 29 19:24: > 59 2008 -0800 > > @@ -466,11 +466,13 @@ > > > > class VirtCIM: > > def __init__(self, virt, dom_name, disk_dev, disk_source, > > - net_type, net_name, net_mac, vcpus, mem, mem_allocunits): > > + net_type, net_name, net_mac, vcpus, mem, > > + mem_allocunits, emu_type): > > self.virt = virt > > self.domain_name = dom_name > > self.vssd = vsms.get_vssd_mof(virt, dom_name) > > - self.dasd = vsms.get_dasd_class(virt)(disk_dev, > disk_source, dom_name) > > + self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, > > + dom_name, emu_type) > > self.nasd = vsms.get_nasd_class(virt)(type=net_type, > > mac=net_mac, > > name=dom_name, > > @@ -687,13 +689,15 @@ > > disk_file_path=const.KVM_disk_path, > > disk=const.KVM_default_disk_dev, > > ntype=const.default_net_type, > > - net_name=const.default_network_name): > > + net_name=const.default_network_name, > > + emu_type=None): > > if not os.path.exists(disk_file_path): > > logger.error('Error: Disk image does not exist') > > sys.exit(1) > > VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus) > > VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path, > > - ntype, net_name, mac, vcpus, mem, mem_allocunits) > > + ntype, net_name, mac, vcpus, mem, > > + mem_allocunits, emu_type) > > self._os() > > self._devices(const.KVM_default_emulator, ntype, > > disk_file_path, disk, mac, net_name) > > > > _______________________________________________ > > 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 Tue Jan 6 06:02:48 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 11:32:48 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: References: Message-ID: <4962F408.1080901@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1231210158 28800 > # Node ID b592961ccaac67ad3cfd8876beb22beec0c28492 > # Parent 64b84ef28b22d17dd22027c632a9dc44d642d2b5 > [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM > > Updates form 6 to 7: > Correct exception description > > Signed-off-by: Guolian Yun > > diff -r 64b84ef28b22 -r b592961ccaac suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Mon Jan 05 18:49:18 2009 -0800 > @@ -0,0 +1,88 @@ > +#!/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 > +from XenKvmLib.enumclass import EnumInstances > +from XenKvmLib.classes import get_typed_class > +from XenKvmLib.common_util import parse_instance_id > +from XenKvmLib.const import do_main > +from XenKvmLib.vxml import get_class > +from CimTest.ReturnCodes import PASS, FAIL > +from CimTest.Globals import logger > +from XenKvmLib.const import get_provider_version > + > +SUPPORTED_TYPES = ['KVM'] > +default_dom = 'test_domain' > +libvirt_em_type_changeset = 737 > + > + at do_main(SUPPORTED_TYPES) > +def main(): > + status = FAIL > + options = main.options > + curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) > + if curr_cim_rev < libvirt_em_type_changeset: > + return SKIP > + > + emu_types = [0, 1] > + try: > + for exp_emu_type in emu_types: > + cxml = get_class(options.virt)(default_dom, emu_type=exp_emu_type) > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Failed to call DefineSystem()") > + return FAIL > + > + drasd= get_typed_class(options.virt,'DiskResourceAllocationSettingData') > + > + drasd_list = EnumInstances(options.ip, drasd, ret_cim_inst=True) > Are you planning to change the EnumInstance to GetInstance() ?? Or is this final changes for the test case ? Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Tue Jan 6 07:33:30 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 13:03:30 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update CS 05_activate_defined_start.py In-Reply-To: <1745043d345ceb2ee244.1231183121@localhost.localdomain> References: <1745043d345ceb2ee244.1231183121@localhost.localdomain> Message-ID: <4963094A.3020303@linux.vnet.ibm.com> +1 for me. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Tue Jan 6 07:33:27 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 13:03:27 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Add function to check state In-Reply-To: <6f478a44ce06ad28bd0c.1231182917@localhost.localdomain> References: <6f478a44ce06ad28bd0c.1231182917@localhost.localdomain> Message-ID: <49630947.1040200@linux.vnet.ibm.com> +1 for me. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Tue Jan 6 07:45:11 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 13:15:11 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update CS 06_paused_active_suspend.py to use cim_() functions In-Reply-To: <0e6f4b82fce48e3ed1ee.1231183136@localhost.localdomain> References: <0e6f4b82fce48e3ed1ee.1231183136@localhost.localdomain> Message-ID: <49630C07.8030403@linux.vnet.ibm.com> +1 for me. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Tue Jan 6 07:55:38 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 13:25:38 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Rename 27_define_suspend_errs.py to 27_define_pause_errs.py In-Reply-To: References: Message-ID: <49630E7A.9040000@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231193318 28800 > # Node ID ae40dfa1b8f6e134d200233d2e5b3395855cafa2 > # Parent 5ca146678acf60551b90b1e07a94633f0668b8c3 > [TEST] Rename 27_define_suspend_errs.py to 27_define_pause_errs.py > > CIM requested state 9 is pause, not suspend. So this test is being renamed. > It was also updated to use cim_() functions. > > Signed-off-by: Kaitlin Rupert > > diff -r 5ca146678acf -r ae40dfa1b8f6 suites/libvirt-cim/cimtest/ComputerSystem/27_define_pause_errs.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/27_define_pause_errs.py Mon Jan 05 14:08:38 2009 -0800 > @@ -0,0 +1,75 @@ > +#!/usr/bin/python > +# > +# Copyright 2008 IBM Corp. > +# > +# Authors: > +# Anoop V Chakkalakkal > +# > +# > +# 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 > +# > +# Test Case Info: > +# -------------- > +# This test case is used to verify the Virtual System State Transition > +# The test is considered to be successful if the request for the invalid > +# state change from defined to suspend fails > We need to change this to pause instead of suspend in the comment. > +# > +# Date: 05-03-2008 > +# > + > +import sys > +from CimTest.Globals import logger > +from XenKvmLib.const import do_main > +from CimTest.ReturnCodes import PASS, FAIL > +from XenKvmLib.vxml import get_class > + > +sup_types = ['Xen', 'XenFV', 'LXC', 'KVM'] > + > +default_dom = 'test_domain' > + > + at do_main(sup_types) > +def main(): > + options = main.options > + server = options.ip > + virt = options.virt > + status = FAIL > + > + try: > + # define the vs > + cxml = get_class(options.virt)(default_dom) > + ret = cxml.cim_define(server) > + if not ret: > + raise Exception("Failed to define the guest: %s" % default_dom) > + > + status = cxml.cim_pause(server) > + if status != PASS: > + raise Exception("Unable pause dom '%s'" % default_dom) > + > + except Exception, details: > + logger.error("Exception: %s", details) > + status = FAIL > + > + if status != FAIL: > + logger.error("Expected Defined -> Suspended state transition to fail") > It should be "Expected Defined -> Paused state transition to fail" > + status = FAIL > + else: > + status = PASS > + > + cxml.undefine(server) > + > + return status > + > +if __name__ == "__main__": > + sys.exit(main()) > diff -r 5ca146678acf -r ae40dfa1b8f6 suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Mon Jan 05 13:41:14 2009 -0800 > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 > @@ -1,89 +0,0 @@ > -#!/usr/bin/python > -# > -# Copyright 2008 IBM Corp. > -# > -# Authors: > -# Anoop V Chakkalakkal > -# > -# > -# 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 > -# > -# Test Case Info: > -# -------------- > -# This test case is used to verify the Virtual System State Transition > -# The test is considered to be successful if the request for the invalid > -# state change from defined to suspend fails > -# > -# List of Valid state values (Refer to VSP spec doc Table 2 for more) > -# --------------------------------- > -# State | Values > -# --------------------------------- > -# Defined | 3 > -# Suspend | 9 > -# > -# Date: 05-03-2008 > -# > - > -import sys > -import pywbem > -from VirtLib import utils > -from CimTest.Globals import logger > -from XenKvmLib.const import do_main > -from CimTest.ReturnCodes import PASS, FAIL > -from XenKvmLib.test_doms import destroy_and_undefine_domain > -from XenKvmLib.common_util import try_request_state_change, \ > - create_using_definesystem > - > -sup_types = ['Xen', 'XenFV', 'LXC', 'KVM'] > - > -SUSPEND_STATE = 9 > -default_dom = 'test_domain' > -TIME = "00000000000000.000000:000" > -exp_rc = pywbem.CIM_ERR_FAILED > -exp_desc = 'Domain not running' > - > - > - at do_main(sup_types) > -def main(): > - options = main.options > - server = options.ip > - virt = options.virt > - status = FAIL > - > - try: > - # define the vs > - status = create_using_definesystem(default_dom, server, virt=virt) > - if status != PASS: > - logger.error("Unable to define domain '%s' using DefineSystem()", > - default_dom) > - return status > - > - except Exception, details: > - logger.error("Exception: %s", details) > - destroy_and_undefine_domain(default_dom, server, virt) > - return FAIL > - > - status = try_request_state_change(default_dom, server, > - SUSPEND_STATE, TIME, exp_rc, > - exp_desc, virt) > - > - if status != PASS: > - logger.error("Expected Defined -> Suspended state transition to fail") > - > - destroy_and_undefine_domain(default_dom, server, virt) > - 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 > From deeptik at linux.vnet.ibm.com Tue Jan 6 09:42:32 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 15:12:32 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update 32_start_reboot.py to use cim_() functions In-Reply-To: References: Message-ID: <49632788.1020501@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231194787 28800 > # Node ID f317d11f46a29a8141563498076d716153dfc5f2 > # Parent ae40dfa1b8f6e134d200233d2e5b3395855cafa2 > [TEST] Update 32_start_reboot.py to use cim_() functions > > Also change cim_state_change() to support enable and requested state parameters. > > Signed-off-by: Kaitlin Rupert > > diff -r ae40dfa1b8f6 -r f317d11f46a2 suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py > --- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Jan 05 14:08:38 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Jan 05 14:33:07 2009 -0800 > @@ -28,26 +28,13 @@ > # The test is considered to be successful if RequestedState Property > # has a value of 10 when the VS is moved from active to reboot state. > # > -# List of Valid state values (Refer to VSP spec doc Table 2 for more) > -# --------------------------------- > -# State | Values > -# --------------------------------- > -# Defined | 3 > -# Active | 2 > -# Rebooted | 10 > -# > # Date: 03-03-2008 > > import sys > -from VirtLib import utils > -from time import sleep > from CimTest.Globals import logger > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > -from XenKvmLib.test_doms import destroy_and_undefine_domain > -from XenKvmLib.common_util import create_using_definesystem, \ > - call_request_state_change, \ > - poll_for_state_change > +from XenKvmLib.vxml import get_class > > sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] > The following can be removed from the test case since they are not used in the updated test case. ACTIVE_STATE = 2 REBOOT_STATE = 10 TIME = "00000000000000.000000:000" > @@ -64,45 +51,35 @@ > server = options.ip > virt = options.virt > > - tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ > - ('Reboot', [ACTIVE_STATE, REBOOT_STATE])] > - > + action_failed = False > try: > # define the vs > - status = create_using_definesystem(default_dom, server, > - virt=virt) > + cxml = get_class(virt)(default_dom) > + ret = cxml.cim_define(server) > + if not ret: > + raise Exception("Failed to define the guest: %s" % default_dom) > + > + status = cxml.cim_start(server) > if status != PASS: > - logger.error("Unable to define domain '%s' using DefineSystem()", > - default_dom) > - return status > + action_failed = True > If we set action_failed here we return XFAIL even for start operation which is not valid. Since cim_start() is supported and should not XFAIL. No need to set action_failed here. > + raise Exception("Unable start dom '%s'" % default_dom) > > - # start, then reboot > - for action, state in tc_scen: > - en_state = state[0] > - rq_state = state[1] > - status = call_request_state_change(default_dom, server, > - rq_state, TIME, > - virt=virt) > - if status != PASS: > - logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", > - action, default_dom) > - status = XFAIL_RC(bug_libvirt) > - break > - > - status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, > - timeout=10) > - > - if status != PASS or dom_cs.RequestedState != rq_state: > - status = FAIL > - logger.error("Attributes for dom '%s' is not set as expected.", > - default_dom) > - break > + status = cxml.cim_reboot(server) > + if status != PASS: > + action_failed = True > + raise Exception("Unable reboot dom '%s'" % default_dom) > > except Exception, detail: > logger.error("Exception: %s", detail) > status = FAIL > > - destroy_and_undefine_domain(default_dom, server, virt) > + cxml.cim_destroy(server) > + cxml.undefine(server) > + > + if action_failed: > + if virt == "KVM" or virt == "LXC": > + return XFAIL_RC(bug_libvirt) > + > return status > > if __name__ == "__main__": > diff -r ae40dfa1b8f6 -r f317d11f46a2 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 05 14:08:38 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 05 14:33:07 2009 -0800 > @@ -535,7 +535,7 @@ > > try: > cs = GetInstance(server, cs_class, keys) > - if cs.Name != self.domain_name: > + if cs is None or cs.Name != self.domain_name: > raise Exception("Wrong guest instance") > > if cs.EnabledState != en_state: > @@ -553,7 +553,11 @@ > > return PASS > > - def cim_state_change(self, server, req_state, req_timeout, poll_time): > + def cim_state_change(self, server, req_state, req_timeout, poll_time, > + en_state=None): > + if en_state is None: > + en_state = req_state > + > cs = None > cs_class = get_typed_class(self.virt, 'ComputerSystem') > keys = { 'Name' : self.domain_name, 'CreationClassName' : cs_class } > @@ -562,7 +566,7 @@ > return status > > try: > - req_state_change = pywbem.cim_types.Uint16(req_state) > + req_state_change = pywbem.cim_types.Uint16(req_state) > time_period = pywbem.cim_types.CIMDateTime(req_timeout) > cs.RequestStateChange(RequestedState=req_state_change, > TimeoutPeriod=time_period) > @@ -574,7 +578,7 @@ > return FAIL > > for i in range(1, (poll_time + 1)): > - status = self.check_guest_state(server, req_state) > + status = self.check_guest_state(server, en_state, req_state) > if status == PASS: > break > > @@ -606,7 +610,7 @@ > > def cim_reboot(self, server, req_time=const.TIME, poll_time=30): > return self.cim_state_change(server, const.CIM_REBOOT, > - req_time, poll_time) > + req_time, poll_time, const.CIM_ENABLE) > The test case gives a false positive. The following are the log messages which means the tc is suppose to fail. Tue, 06 Jan 2009 01:10:14:TEST LOG:INFO - ====32_start_reboot.py Log==== Tue, 06 Jan 2009 01:10:17:TEST LOG:ERROR - Unable to check guest state Tue, 06 Jan 2009 01:10:17:TEST LOG:ERROR - Exception: Wrong guest instance Tue, 06 Jan 2009 01:10:18:TEST LOG:ERROR - Unable to check guest state Tue, 06 Jan 2009 01:10:18:TEST LOG:ERROR - Exception: EnabledState is 9, expected 2. But, the test case gives a PASS message on the console. > def cim_reset(self, server, req_time=const.TIME, poll_time=30): > return self.cim_state_change(server, const.CIM_RESET, > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Jan 6 10:02:11 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 15:32:11 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update 40_RSC_start.py to use cim_start() In-Reply-To: <5650fd38e40aca51f200.1231195734@localhost.localdomain> References: <5650fd38e40aca51f200.1231195734@localhost.localdomain> Message-ID: <49632C23.9030200@linux.vnet.ibm.com> +1 for me. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Tue Jan 6 09:56:43 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 15:26:43 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update 35_start_reset.py to work with cim_() functions In-Reply-To: References: Message-ID: <49632ADB.3000607@linux.vnet.ibm.com> +1 for me. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Tue Jan 6 10:14:51 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 15:44:51 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update Processor -t 02_definesys_get_procs.py to use cim_define() In-Reply-To: <87b41555ea6e8a363cc9.1231197189@localhost.localdomain> References: <87b41555ea6e8a363cc9.1231197189@localhost.localdomain> Message-ID: <49632F1B.4070607@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231196579 28800 > # Node ID 87b41555ea6e8a363cc966b599e0cf28af4fd318 > # Parent 5650fd38e40aca51f20037f9df695930ddff7cdf > [TEST] Update Processor -t 02_definesys_get_procs.py to use cim_define() > > Signed-off-by: Kaitlin Rupert > > diff -r 5650fd38e40a -r 87b41555ea6e suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py > --- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Mon Jan 05 14:45:41 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Mon Jan 05 15:02:59 2009 -0800 > @@ -32,11 +32,7 @@ > # > > import sys > -import pywbem > -from XenKvmLib.classes import get_typed_class > -from XenKvmLib.vxml import XenXML, KVMXML, get_class > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > +from XenKvmLib.vxml import get_class > from XenKvmLib.devices import get_dom_proc_insts > from CimTest.Globals import logger > from XenKvmLib.const import do_main > @@ -71,33 +67,29 @@ > @do_main(sup_types) > def main(): > options = main.options > - status = PASS > - > - undefine_test_domain(default_dom, options.ip) > + status = FAIL > > try: > - rc = create_using_definesystem(default_dom, options.ip, params=None, > - ref_config=' ', exp_err=None, > - virt=options.virt) > - if rc != 0: > - raise Exception("Unable create domain %s using DefineSystem()" \ > - % default_dom) > + cxml = get_class(options.virt)(default_dom) > + ret = cxml.cim_define(options.ip) > + if not ret: > + raise Exception("Failed to define the guest: %s" % default_dom) > > proc_list = get_dom_proc_insts(options.virt, options.ip, default_dom) > if len(proc_list) == 0: > raise Exception("Failied to retrieve vcpu instances for %s" \ > % default_dom) > Very Minor spell error, can you change Failied to Failed instead ? > - rc = check_processors(proc_list) > - if rc != 0: > + status = check_processors(proc_list) > + if status != PASS: > raise Exception("Processor instances for %s are not as expected." \ > % default_dom) > In the check_processors() can you change the spelling of guesst to guest: logger.error("Inst returned is for guesst %s, expected guest %s.", procs['SystemName'], default_dom) > - > + > except Exception, detail: > logger.error("Exception: %s" % detail) > status = FAIL > > - undefine_test_domain(default_dom, options.ip) > + cxml.undefine(options.ip) > > return status > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From deeptik at linux.vnet.ibm.com Tue Jan 6 10:21:57 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 06 Jan 2009 15:51:57 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update Memory - 02_defgetmem.py to use cim_define() In-Reply-To: References: Message-ID: <496330C5.8050605@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231198069 28800 > # Node ID e285d6399feada658bb9a360aab15f1ff5d76e1f > # Parent 87b41555ea6e8a363cc966b599e0cf28af4fd318 > [TEST] Update Memory - 02_defgetmem.py to use cim_define() > > Also, modify the test to use PASS/FAIL values. > > Signed-off-by: Kaitlin Rupert > > diff -r 87b41555ea6e -r e285d6399fea suites/libvirt-cim/cimtest/Memory/02_defgetmem.py > --- a/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Mon Jan 05 15:02:59 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Mon Jan 05 15:27:49 2009 -0800 > @@ -29,64 +29,57 @@ > # 4. Verify the DeviceId and domName with the instance info. > > import sys > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > +from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.devices import get_dom_mem_inst > from CimTest.Globals import logger > from XenKvmLib.const import do_main > +from XenKvmLib.vxml import get_class > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > default_dom = "domu" > > def check_mem(memInst): > - status = 0 > for mem in memInst: > if mem['SystemName'] != default_dom: > logger.error("Inst returned is for guesst %s, expected guest %s.", > mem['SystemName'], default_dom) > - return 1 > + return FAIL > > devid = "%s/%s" % (default_dom, "mem" ) > > if mem['DeviceID'] != devid: > logger.error("DeviceID %s does not match expected %s.", > mem['DeviceID'], devid) > - status = 1 > - else: > - logger.info("Memory : Verified domain %s having DeviceID %s" % \ > - (default_dom, devid)) > + return FAIL > > - return status > + logger.info("Verified domain %s having DeviceID %s", default_dom, devid) > + > + return PASS > > @do_main(sup_types) > def main(): > options = main.options > - status = 0 > + status = FAIL > > - undefine_test_domain(default_dom, options.ip) > - > - > + cxml = get_class(options.virt)(default_dom) > try: > - rc = create_using_definesystem(default_dom, options.ip, params=None, > - ref_config='', exp_err=None, > - virt=options.virt) > - if rc != 0: > - raise Exception("Unable to create domain %s using DefineSys()" % default_dom) > + ret = cxml.cim_define(options.ip) > + if not ret: > + raise Exception("Failed to define the guest: %s" % default_dom) > > memInst = get_dom_mem_inst(options.virt, options.ip, default_dom) > + if len(memInst) == 0: > + raise Exception("Failied to get mem instances for %s" % default_dom) > Very Minor spell error, can you change Failied to Failed instead ? > - if len(memInst) == 0: > - raise Exception("Failied to retrieve mem instances for %s" % default_dom) > - > - rc = check_mem(memInst) > - if rc != 0: > - raise Exception("Memory instance for %s is not as expected." % default_dom) > + status = check_mem(memInst) > In the check_mem() can you change the spelling of guesst to guest: logger.error("Inst returned is for guesst %s, expected guest %s.", mem['SystemName'], default_dom) > + if status != PASS: > + raise Exception("Memory inst for %s not as expected." % default_dom) > > except Exception, detail: > logger.error("Exception: %s" % detail) > - status = 1 > + status = FAIL > > - undefine_test_domain(default_dom, options.ip) > + cxml.undefine(options.ip) > > return status > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim > From danms at us.ibm.com Tue Jan 6 16:50:00 2009 From: danms at us.ibm.com (Dan Smith) Date: Tue, 06 Jan 2009 08:50:00 -0800 Subject: [Libvirt-cim] [PATCH] Added 2 end points for the ServiceAffectsElement association, both related to the LogicalDevice class In-Reply-To: <0a617ecc1b6f49a1391a.1229729926@F10> (Richard Maciel's message of "Fri, 19 Dec 2008 21:38:46 -0200") References: <0a617ecc1b6f49a1391a.1229729926@F10> Message-ID: <87vdssfkg7.fsf@caffeine.danplanet.com> RM> # HG changeset patch RM> # User Richard Maciel RM> # Date 1229729923 7200 RM> # Node ID 0a617ecc1b6f49a1391afa5566f3f7ca710ec5cb RM> # Parent 27c75ec951e790bfec72273828154eec647e4caf RM> Added 2 end points for the ServiceAffectsElement association, both related to the LogicalDevice class. Was there a follow-up for this patch? I saw some comments but not a revised version. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From danms at us.ibm.com Tue Jan 6 16:54:55 2009 From: danms at us.ibm.com (Dan Smith) Date: Tue, 06 Jan 2009 08:54:55 -0800 Subject: [Libvirt-cim] [PATCH] Add EmulatedType to DiskRASDs In-Reply-To: (Kaitlin Rupert's message of "Wed, 24 Dec 2008 14:05:26 -0800") References: Message-ID: <87r63gfk80.fsf@caffeine.danplanet.com> KR> This sets EmulatedType to 0. Should an additional template RASD KR> be returned for EmulatedType 1? I've applied this, but I think it might be nice to expose one for type 1 as well, with a caption (or something) to identify it as a CDROM. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Tue Jan 6 17:55:46 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 06 Jan 2009 09:55:46 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update 32_start_reboot.py to use cim_() functions In-Reply-To: <49632788.1020501@linux.vnet.ibm.com> References: <49632788.1020501@linux.vnet.ibm.com> Message-ID: <49639B22.3090703@linux.vnet.ibm.com> >> @@ -606,7 +610,7 @@ >> def cim_reboot(self, server, req_time=const.TIME, >> poll_time=30): return self.cim_state_change(server, >> const.CIM_REBOOT, - req_time, >> poll_time) + req_time, poll_time, >> const.CIM_ENABLE) > The test case gives a false positive. The following are the log messages > which means the tc is suppose to fail. > > Tue, 06 Jan 2009 01:10:14:TEST LOG:INFO - ====32_start_reboot.py Log==== > Tue, 06 Jan 2009 01:10:17:TEST LOG:ERROR - Unable to check guest state > Tue, 06 Jan 2009 01:10:17:TEST LOG:ERROR - Exception: Wrong guest instance > Tue, 06 Jan 2009 01:10:18:TEST LOG:ERROR - Unable to check guest state > Tue, 06 Jan 2009 01:10:18:TEST LOG:ERROR - Exception: EnabledState is 9, > expected 2. > > But, the test case gives a PASS message on the console. > When you reboot a guest, the will be paused briefly before being restarted. When cim_state_change(), it calls check_guest_state() in a loop to verify the guest reaches the appropriate state. check_guest_state() prints an error message if the state is not in the expected state. I could change these from error messages to info messages. But check_guest_state() would still need to return an error in this case (even though the test doesn't report an error because the guest really is rebooted in this case). -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Jan 6 17:59:01 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 06 Jan 2009 09:59:01 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update 32_start_reboot.py to use cim_() functions Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231264630 28800 # Node ID d0566805a9ec7b5d3a9a20af71b89053b3b01b09 # Parent ae40dfa1b8f6e134d200233d2e5b3395855cafa2 [TEST] #2 Update 32_start_reboot.py to use cim_() functions Also change cim_state_change() to support enable and requested state parameters. Updates: -Remove unused variables -Don't return an XFAIL is starting the guest fails Signed-off-by: Kaitlin Rupert diff -r ae40dfa1b8f6 -r d0566805a9ec suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Mon Jan 05 14:08:38 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/32_start_reboot.py Tue Jan 06 09:57:10 2009 -0800 @@ -28,34 +28,18 @@ # The test is considered to be successful if RequestedState Property # has a value of 10 when the VS is moved from active to reboot state. # -# List of Valid state values (Refer to VSP spec doc Table 2 for more) -# --------------------------------- -# State | Values -# --------------------------------- -# Defined | 3 -# Active | 2 -# Rebooted | 10 -# # Date: 03-03-2008 import sys -from VirtLib import utils -from time import sleep from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC -from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import create_using_definesystem, \ - call_request_state_change, \ - poll_for_state_change +from XenKvmLib.vxml import get_class sup_types = ['Xen', 'XenFV', 'KVM', 'LXC'] bug_libvirt = "00005" -ACTIVE_STATE = 2 -REBOOT_STATE = 10 default_dom = 'cs_test_domain' -TIME = "00000000000000.000000:000" @do_main(sup_types) def main(): @@ -64,45 +48,34 @@ server = options.ip virt = options.virt - tc_scen = [('Start', [ACTIVE_STATE, ACTIVE_STATE]), \ - ('Reboot', [ACTIVE_STATE, REBOOT_STATE])] - + action_failed = False try: # define the vs - status = create_using_definesystem(default_dom, server, - virt=virt) + cxml = get_class(virt)(default_dom) + ret = cxml.cim_define(server) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) + + status = cxml.cim_start(server) if status != PASS: - logger.error("Unable to define domain '%s' using DefineSystem()", - default_dom) - return status + raise Exception("Unable start dom '%s'" % default_dom) - # start, then reboot - for action, state in tc_scen: - en_state = state[0] - rq_state = state[1] - status = call_request_state_change(default_dom, server, - rq_state, TIME, - virt=virt) - if status != PASS: - logger.error("Unable to '%s' dom '%s' using RequestedStateChange()", - action, default_dom) - status = XFAIL_RC(bug_libvirt) - break - - status, dom_cs = poll_for_state_change(server, virt, default_dom, en_state, - timeout=10) - - if status != PASS or dom_cs.RequestedState != rq_state: - status = FAIL - logger.error("Attributes for dom '%s' is not set as expected.", - default_dom) - break + status = cxml.cim_reboot(server) + if status != PASS: + action_failed = True + raise Exception("Unable reboot dom '%s'" % default_dom) except Exception, detail: logger.error("Exception: %s", detail) status = FAIL - destroy_and_undefine_domain(default_dom, server, virt) + cxml.cim_destroy(server) + cxml.undefine(server) + + if action_failed: + if virt == "KVM" or virt == "LXC": + return XFAIL_RC(bug_libvirt) + return status if __name__ == "__main__": diff -r ae40dfa1b8f6 -r d0566805a9ec suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 05 14:08:38 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Jan 06 09:57:10 2009 -0800 @@ -535,7 +535,7 @@ try: cs = GetInstance(server, cs_class, keys) - if cs.Name != self.domain_name: + if cs is None or cs.Name != self.domain_name: raise Exception("Wrong guest instance") if cs.EnabledState != en_state: @@ -553,7 +553,11 @@ return PASS - def cim_state_change(self, server, req_state, req_timeout, poll_time): + def cim_state_change(self, server, req_state, req_timeout, poll_time, + en_state=None): + if en_state is None: + en_state = req_state + cs = None cs_class = get_typed_class(self.virt, 'ComputerSystem') keys = { 'Name' : self.domain_name, 'CreationClassName' : cs_class } @@ -562,7 +566,7 @@ return status try: - req_state_change = pywbem.cim_types.Uint16(req_state) + req_state_change = pywbem.cim_types.Uint16(req_state) time_period = pywbem.cim_types.CIMDateTime(req_timeout) cs.RequestStateChange(RequestedState=req_state_change, TimeoutPeriod=time_period) @@ -574,7 +578,7 @@ return FAIL for i in range(1, (poll_time + 1)): - status = self.check_guest_state(server, req_state) + status = self.check_guest_state(server, en_state, req_state) if status == PASS: break @@ -606,7 +610,7 @@ def cim_reboot(self, server, req_time=const.TIME, poll_time=30): return self.cim_state_change(server, const.CIM_REBOOT, - req_time, poll_time) + req_time, poll_time, const.CIM_ENABLE) def cim_reset(self, server, req_time=const.TIME, poll_time=30): return self.cim_state_change(server, const.CIM_RESET, From kaitlin at linux.vnet.ibm.com Tue Jan 6 18:13:39 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 06 Jan 2009 10:13:39 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update Processor -t 02_definesys_get_procs.py to use cim_define() Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231196579 28800 # Node ID cb00f1c2beec9467129888d13bf9976b30e93c0a # Parent 8e6a23215bdf94810add8264555ab43ff2ec210b [TEST] #2 Update Processor -t 02_definesys_get_procs.py to use cim_define() Updates: -Fixed some silly typos Signed-off-by: Kaitlin Rupert diff -r 8e6a23215bdf -r cb00f1c2beec suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py --- a/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Tue Jan 06 10:10:23 2009 -0800 +++ b/suites/libvirt-cim/cimtest/Processor/02_definesys_get_procs.py Mon Jan 05 15:02:59 2009 -0800 @@ -32,11 +32,7 @@ # import sys -import pywbem -from XenKvmLib.classes import get_typed_class -from XenKvmLib.vxml import XenXML, KVMXML, get_class -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem +from XenKvmLib.vxml import get_class from XenKvmLib.devices import get_dom_proc_insts from CimTest.Globals import logger from XenKvmLib.const import do_main @@ -55,7 +51,7 @@ for proc in procs: if proc['SystemName'] != default_dom: - logger.error("Inst returned is for guesst %s, expected guest %s.", + logger.error("Inst returned is for guest %s, expected guest %s.", procs['SystemName'], default_dom) return FAIL @@ -71,33 +67,29 @@ @do_main(sup_types) def main(): options = main.options - status = PASS - - undefine_test_domain(default_dom, options.ip) + status = FAIL try: - rc = create_using_definesystem(default_dom, options.ip, params=None, - ref_config=' ', exp_err=None, - virt=options.virt) - if rc != 0: - raise Exception("Unable create domain %s using DefineSystem()" \ - % default_dom) + cxml = get_class(options.virt)(default_dom) + ret = cxml.cim_define(options.ip) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) proc_list = get_dom_proc_insts(options.virt, options.ip, default_dom) if len(proc_list) == 0: - raise Exception("Failied to retrieve vcpu instances for %s" \ + raise Exception("Failed to retrieve vcpu instances for %s" \ % default_dom) - rc = check_processors(proc_list) - if rc != 0: + status = check_processors(proc_list) + if status != PASS: raise Exception("Processor instances for %s are not as expected." \ % default_dom) - + except Exception, detail: logger.error("Exception: %s" % detail) status = FAIL - undefine_test_domain(default_dom, options.ip) + cxml.undefine(options.ip) return status From kaitlin at linux.vnet.ibm.com Tue Jan 6 18:03:27 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 06 Jan 2009 10:03:27 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Rename 27_define_suspend_errs.py to 27_define_pause_errs.py Message-ID: <95141f9f1593e01a70ba.1231265007@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231193318 28800 # Node ID 95141f9f1593e01a70ba5c64444a4a33d0bb4854 # Parent 5ca146678acf60551b90b1e07a94633f0668b8c3 [TEST] #2 Rename 27_define_suspend_errs.py to 27_define_pause_errs.py CIM requested state 9 is pause, not suspend. So this test is being renamed. It was also updated to use cim_() functions. Updates: -Change "suspended" in comments and log message to "paused" Signed-off-by: Kaitlin Rupert diff -r 5ca146678acf -r 95141f9f1593 suites/libvirt-cim/cimtest/ComputerSystem/27_define_pause_errs.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/27_define_pause_errs.py Mon Jan 05 14:08:38 2009 -0800 @@ -0,0 +1,75 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Anoop V Chakkalakkal +# +# +# 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 +# +# Test Case Info: +# -------------- +# This test case is used to verify the Virtual System State Transition +# The test is considered to be successful if the request for the invalid +# state change from defined to paused fails +# +# Date: 05-03-2008 +# + +import sys +from CimTest.Globals import logger +from XenKvmLib.const import do_main +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class + +sup_types = ['Xen', 'XenFV', 'LXC', 'KVM'] + +default_dom = 'test_domain' + + at do_main(sup_types) +def main(): + options = main.options + server = options.ip + virt = options.virt + status = FAIL + + try: + # define the vs + cxml = get_class(options.virt)(default_dom) + ret = cxml.cim_define(server) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) + + status = cxml.cim_pause(server) + if status != PASS: + raise Exception("Unable pause dom '%s'" % default_dom) + + except Exception, details: + logger.error("Exception: %s", details) + status = FAIL + + if status != FAIL: + logger.error("Expected Defined -> Paused state transition to fail") + status = FAIL + else: + status = PASS + + cxml.undefine(server) + + return status + +if __name__ == "__main__": + sys.exit(main()) diff -r 5ca146678acf -r 95141f9f1593 suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/27_define_suspend_errs.py Mon Jan 05 13:41:14 2009 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -#!/usr/bin/python -# -# Copyright 2008 IBM Corp. -# -# Authors: -# Anoop V Chakkalakkal -# -# -# 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 -# -# Test Case Info: -# -------------- -# This test case is used to verify the Virtual System State Transition -# The test is considered to be successful if the request for the invalid -# state change from defined to suspend fails -# -# List of Valid state values (Refer to VSP spec doc Table 2 for more) -# --------------------------------- -# State | Values -# --------------------------------- -# Defined | 3 -# Suspend | 9 -# -# Date: 05-03-2008 -# - -import sys -import pywbem -from VirtLib import utils -from CimTest.Globals import logger -from XenKvmLib.const import do_main -from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.test_doms import destroy_and_undefine_domain -from XenKvmLib.common_util import try_request_state_change, \ - create_using_definesystem - -sup_types = ['Xen', 'XenFV', 'LXC', 'KVM'] - -SUSPEND_STATE = 9 -default_dom = 'test_domain' -TIME = "00000000000000.000000:000" -exp_rc = pywbem.CIM_ERR_FAILED -exp_desc = 'Domain not running' - - - at do_main(sup_types) -def main(): - options = main.options - server = options.ip - virt = options.virt - status = FAIL - - try: - # define the vs - status = create_using_definesystem(default_dom, server, virt=virt) - if status != PASS: - logger.error("Unable to define domain '%s' using DefineSystem()", - default_dom) - return status - - except Exception, details: - logger.error("Exception: %s", details) - destroy_and_undefine_domain(default_dom, server, virt) - return FAIL - - status = try_request_state_change(default_dom, server, - SUSPEND_STATE, TIME, exp_rc, - exp_desc, virt) - - if status != PASS: - logger.error("Expected Defined -> Suspended state transition to fail") - - destroy_and_undefine_domain(default_dom, server, virt) - return status - -if __name__ == "__main__": - sys.exit(main()) From kaitlin at linux.vnet.ibm.com Tue Jan 6 18:15:15 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 06 Jan 2009 10:15:15 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update Memory - 02_defgetmem.py to use cim_define() Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231265708 28800 # Node ID d40521f17a98e3403eef62b0e5c42d8b3b8f5c09 # Parent cb00f1c2beec9467129888d13bf9976b30e93c0a [TEST] #2 Update Memory - 02_defgetmem.py to use cim_define() Also, modify the test to use PASS/FAIL values. Updates: -Fixed some typos Signed-off-by: Kaitlin Rupert diff -r cb00f1c2beec -r d40521f17a98 suites/libvirt-cim/cimtest/Memory/02_defgetmem.py --- a/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Mon Jan 05 15:02:59 2009 -0800 +++ b/suites/libvirt-cim/cimtest/Memory/02_defgetmem.py Tue Jan 06 10:15:08 2009 -0800 @@ -29,64 +29,57 @@ # 4. Verify the DeviceId and domName with the instance info. import sys -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem +from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.devices import get_dom_mem_inst from CimTest.Globals import logger from XenKvmLib.const import do_main +from XenKvmLib.vxml import get_class sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] default_dom = "domu" def check_mem(memInst): - status = 0 for mem in memInst: if mem['SystemName'] != default_dom: - logger.error("Inst returned is for guesst %s, expected guest %s.", + logger.error("Inst returned is for guest %s, expected guest %s.", mem['SystemName'], default_dom) - return 1 + return FAIL devid = "%s/%s" % (default_dom, "mem" ) if mem['DeviceID'] != devid: logger.error("DeviceID %s does not match expected %s.", mem['DeviceID'], devid) - status = 1 - else: - logger.info("Memory : Verified domain %s having DeviceID %s" % \ - (default_dom, devid)) + return FAIL - return status + logger.info("Verified domain %s having DeviceID %s", default_dom, devid) + + return PASS @do_main(sup_types) def main(): options = main.options - status = 0 + status = FAIL - undefine_test_domain(default_dom, options.ip) - - + cxml = get_class(options.virt)(default_dom) try: - rc = create_using_definesystem(default_dom, options.ip, params=None, - ref_config='', exp_err=None, - virt=options.virt) - if rc != 0: - raise Exception("Unable to create domain %s using DefineSys()" % default_dom) + ret = cxml.cim_define(options.ip) + if not ret: + raise Exception("Failed to define the guest: %s" % default_dom) memInst = get_dom_mem_inst(options.virt, options.ip, default_dom) + if len(memInst) == 0: + raise Exception("Failed to get mem instances for %s" % default_dom) - if len(memInst) == 0: - raise Exception("Failied to retrieve mem instances for %s" % default_dom) - - rc = check_mem(memInst) - if rc != 0: - raise Exception("Memory instance for %s is not as expected." % default_dom) + status = check_mem(memInst) + if status != PASS: + raise Exception("Memory inst for %s not as expected." % default_dom) except Exception, detail: logger.error("Exception: %s" % detail) - status = 1 + status = FAIL - undefine_test_domain(default_dom, options.ip) + cxml.undefine(options.ip) return status From kaitlin at linux.vnet.ibm.com Tue Jan 6 19:10:12 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 06 Jan 2009 11:10:12 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSMS 01_definesystem_name.py to use cim_() functions Message-ID: <270c97141e74456e0513.1231269012@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231268986 28800 # Node ID 270c97141e74456e051361572b2ba77af8f0fd94 # Parent d40521f17a98e3403eef62b0e5c42d8b3b8f5c09 [TEST] Update VSMS 01_definesystem_name.py to use cim_() functions Signed-off-by: Kaitlin Rupert diff -r d40521f17a98 -r 270c97141e74 suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 10:15:08 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 11:09:46 2009 -0800 @@ -23,12 +23,10 @@ # import sys -import pywbem -from VirtLib import utils -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem from XenKvmLib.const import do_main from CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC'] default_dom = 'test_domain' @@ -37,10 +35,18 @@ def main(): options = main.options - status = create_using_definesystem(default_dom, options.ip, - virt=options.virt) - undefine_test_domain(default_dom, options.ip, - virt=options.virt) + cxml = get_class(options.virt)(default_dom) + + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Unable to define %s" % default_dom) + return FAIL + + status = cxml.cim_start(options.ip) + if status != PASS: + logger.info("Starting defined %s failed" % default_dom) + + cxml.undefine(options.ip) return status From kaitlin at linux.vnet.ibm.com Tue Jan 6 19:55:15 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 06 Jan 2009 11:55:15 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update CSI 01 to use cim_() functions Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231271658 28800 # Node ID d0b13b624d8c54bb8c625f3d0855ac7f80cdcdbd # Parent 270c97141e74456e051361572b2ba77af8f0fd94 [TEST] Update CSI 01 to use cim_() functions. Signed-off-by: Kaitlin Rupert diff -r 270c97141e74 -r d0b13b624d8c suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py --- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Tue Jan 06 11:09:46 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Tue Jan 06 11:54:18 2009 -0800 @@ -24,23 +24,17 @@ import os import signal import time -from pywbem.cim_obj import CIMInstanceName from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.common_util import create_using_definesystem, \ - call_request_state_change -from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.classes import get_typed_class from XenKvmLib.indication_tester import CIMIndicationSubscription from XenKvmLib.vxml import set_default -from XenKvmLib.vsms import get_vsms_class +from XenKvmLib.vxml import get_class SUPPORTED_TYPES = ['Xen', 'XenFV', 'KVM'] test_dom = "domU" -REQ_STATE = 2 -TIME = "00000000000000.000000:000" def sub_ind(ip, virt): dict = set_default(ip) @@ -70,28 +64,24 @@ return sub_list, ind_names, dict -def gen_ind(test_dom, ip, vtype, ind): +def gen_ind(test_dom, ip, vtype, ind, cxml): if ind == "define": - return create_using_definesystem(test_dom, ip, virt=vtype) + ret = cxml.cim_define(ip) + if not ret: + return FAIL + return PASS elif ind == "start": - rc = call_request_state_change(test_dom, ip, REQ_STATE, TIME, vtype) - if rc != 0: - logger.error("Failed to start domain: %s" % test_dom) + status = cxml.cim_start(ip) + if status != PASS: + logger.error("Failed to start domain: %s", test_dom) return FAIL return PASS elif ind == "destroy": - service = get_vsms_class(vtype)(ip) - try: - classname = get_typed_class(vtype, 'ComputerSystem') - cs_ref = CIMInstanceName(classname, keybindings = { - 'Name':test_dom, - 'CreationClassName':classname}) - service.DestroySystem(AffectedSystem=cs_ref) - except Exception, details: - logger.error('Unknow exception happened') - logger.error(details) + ret = cxml.cim_destroy(ip) + if not ret: + logger.error("Unable to destroy %s", test_dom) return FAIL return PASS @@ -151,12 +141,16 @@ @do_main(SUPPORTED_TYPES) def main(): options = main.options + ip = options.ip + virt = options.virt status = FAIL - sub_list, ind_names, dict = sub_ind(options.ip, options.virt) + sub_list, ind_names, dict = sub_ind(ip, virt) ind_list = ["define", "start", "destroy"] + cxml = get_class(virt)(test_dom) + for ind in ind_list: sub = sub_list[ind] ind_name = ind_names[ind] @@ -171,7 +165,7 @@ os._exit(0) else: try: - status = gen_ind(test_dom, options.ip, options.virt, ind) + status = gen_ind(test_dom, ip, virt, ind, cxml) if status != PASS: os.kill(pid, signal.SIGKILL) raise Exception("Unable to generate indication") @@ -190,7 +184,8 @@ sub.unsubscribe(dict['default_auth']) logger.info("Cancelling subscription for %s" % ind_names[ind]) - destroy_and_undefine_domain(test_dom, options.ip, options.virt) + cxml.cim_destroy(ip) + cxml.undefine(ip) return status From richardm at br.ibm.com Wed Jan 7 01:50:39 2009 From: richardm at br.ibm.com (Richard Maciel) Date: Tue, 06 Jan 2009 23:50:39 -0200 Subject: [Libvirt-cim] [PATCH 2 of 2] Added association SAPAvailableForElement (ComputerSystem <-> KVMRedirectionSAP) In-Reply-To: References: Message-ID: # HG changeset patch # User Richard Maciel # Date 1229728232 7200 # Node ID c4b178c78475fe8ad11328d80f38bcdcf0d50e70 # Parent 45248145f54799c6a931081a8cc251d798487dc1 Added association SAPAvailableForElement (ComputerSystem <-> KVMRedirectionSAP) * Added entries in the Makefile.am file to handle Virt_SAPAvailableForElement.c compilation * Created Virt_SAPAvailableForElement.c file #2 * ComputerSystem->KVMRedirectionSAP query was displaying all available KVMRedirectionSAP in the system, where it should be only the related to the provided ComputerSystem Signed-off-by: Richard Maciel diff -r 45248145f547 -r c4b178c78475 src/Makefile.am --- a/src/Makefile.am Fri Dec 19 21:10:28 2008 -0200 +++ b/src/Makefile.am Fri Dec 19 21:10:32 2008 -0200 @@ -74,7 +74,8 @@ libVirt_ConcreteComponent.la \ libVirt_ServiceAffectsElement.la \ libVirt_HostedAccessPoint.la \ - libVirt_ServiceAccessBySAP.la + libVirt_ServiceAccessBySAP.la \ + libVirt_SAPAvailableForElement.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_ComputerSystem_la_DEPENDENCIES = libVirt_VirtualSystemSnapshotService.la @@ -226,3 +227,7 @@ libVirt_HostedAccessPoint_la_SOURCES = Virt_HostedAccessPoint.c libVirt_HostedAccessPoint_la_LIBADD = -lVirt_HostSystem -lVirt_KVMRedirectionSAP +libVirt_SAPAvailableForElement_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_KVMRedirectionSAP.la +libVirt_SAPAvailableForElement_la_SOURCES = Virt_SAPAvailableForElement.c +libVirt_SAPAvailableForElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_KVMRedirectionSAP + diff -r 45248145f547 -r c4b178c78475 src/Virt_SAPAvailableForElement.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Virt_SAPAvailableForElement.c Fri Dec 19 21:10:32 2008 -0200 @@ -0,0 +1,180 @@ +/* + * Copyright IBM Corp. 2008 + * + * Authors: + * Richard Maciel + * + * 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 "cmpidt.h" +#include "cmpift.h" +#include "cmpimacs.h" + +#include +#include +#include "misc_util.h" + +#include "Virt_ComputerSystem.h" +#include "Virt_KVMRedirectionSAP.h" + +static const CMPIBroker *_BROKER; + +static CMPIStatus sapavail_to_guest(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + const char *dom_name; + + if (!match_hypervisor_prefix(ref, info)) + goto out; + + s = get_console_sap_by_ref(_BROKER, ref, &instance); + if (s.rc != CMPI_RC_OK) + goto out; + + s.rc = cu_get_str_path(ref, "SystemName", &dom_name); + if (s.rc != CMPI_RC_OK) + goto out; + + s = get_domain_by_name(_BROKER, ref, dom_name, &instance); + + if (s.rc == CMPI_RC_OK) + inst_list_add(list, instance); + + out: + return s; +} + + +static CMPIStatus guest_to_sapavail(const CMPIObjectPath *ref, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + const char *sap_host_name = NULL; + const char *dom_host_name = NULL; + int i; + struct inst_list temp_list; + + inst_list_init(&temp_list); + + if (!match_hypervisor_prefix(ref, info)) + goto out; + + s = get_domain_by_ref(_BROKER, ref, &instance); + if (s.rc != CMPI_RC_OK) + goto out; + + s.rc = cu_get_str_path(ref, "Name", &dom_host_name); + if (s.rc != CMPI_RC_OK) + goto out; + + s = enum_console_sap(_BROKER, ref, &temp_list); + + for (i = 0; i < temp_list.cur; i++) { + s.rc = cu_get_str_prop(temp_list.list[i], + "SystemName", + &sap_host_name); + if (s.rc != CMPI_RC_OK) + goto out; + + if (STREQC(dom_host_name, sap_host_name)) + inst_list_add(list, temp_list.list[i]); + } + + out: + inst_list_free(&temp_list); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char* managedelem[] = { + "Xen_ComputerSystem", + "KVM_ComputerSystem", + "LXC_ComputerSystem", + NULL +}; + +static char* availablesap[] = { + "Xen_KVMRedirectionSAP", + "KVM_KVMRedirectionSAP", + "LXC_KVMRedirectionSAP", + NULL +}; + +static char* assoc_classname[] = { + "Xen_SAPAvailableForElement", + "KVM_SAPAvailableForElement", + "LXC_SAPAvailableForElement", + NULL +}; + +static struct std_assoc _guest_to_sapavail = { + .source_class = (char **)&managedelem, + .source_prop = "ManagedElement", + + .target_class = (char **)&availablesap, + .target_prop = "AvailableSAP", + + .assoc_class = (char **)&assoc_classname, + + .handler = guest_to_sapavail, + .make_ref = make_ref +}; + +static struct std_assoc _sapavail_to_guest = { + .source_class = (char **)&availablesap, + .source_prop = "AvailableSAP", + + .target_class = (char **)&managedelem, + .target_prop = "ManagedElement", + + .assoc_class = (char **)&assoc_classname, + + .handler = sapavail_to_guest, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_guest_to_sapavail, + &_sapavail_to_guest, + NULL +}; + +STDA_AssocMIStub(, + Virt_SAPAvailableForElement, + _BROKER, + libvirt_cim_init(), + handlers); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ From richardm at br.ibm.com Wed Jan 7 01:50:38 2009 From: richardm at br.ibm.com (Richard Maciel) Date: Tue, 06 Jan 2009 23:50:38 -0200 Subject: [Libvirt-cim] [PATCH 1 of 2] Added association SAPAvailableForElement (ComputerSystem <-> KVMRedirectionSAP) In-Reply-To: References: Message-ID: <45248145f54799c6a931.1231293038@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1229728228 7200 # Node ID 45248145f54799c6a931081a8cc251d798487dc1 # Parent 3557859610b4eaf8a2bdcb28d7002121e3e776b1 Added association SAPAvailableForElement (ComputerSystem <-> KVMRedirectionSAP) * Created SAPAvailableForElement.{mof,registration} files * Changed Makefile.am to properly handle mof and registration files #2 * Removed unused support for CIMV2 Signed-off-by: Richard Maciel diff -r 3557859610b4 -r 45248145f547 Makefile.am --- a/Makefile.am Wed Dec 10 12:42:02 2008 -0800 +++ b/Makefile.am Fri Dec 19 21:10:28 2008 -0200 @@ -54,7 +54,8 @@ schema/GraphicsPool.mof \ schema/InputPool.mof \ schema/HostedAccessPoint.mof \ - schema/ServiceAccessBySAP.mof + schema/ServiceAccessBySAP.mof \ + schema/SAPAvailableForElement.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -126,7 +127,8 @@ schema/GraphicsPool.registration \ schema/InputPool.registration \ schema/HostedAccessPoint.registration \ - schema/ServiceAccessBySAP.registration + schema/ServiceAccessBySAP.registration \ + schema/SAPAvailableForElement.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff -r 3557859610b4 -r 45248145f547 schema/SAPAvailableForElement.mof --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/SAPAvailableForElement.mof Fri Dec 19 21:10:28 2008 -0200 @@ -0,0 +1,22 @@ +// Copyright IBM Corp. 2007 + +[Association, + Provider("cmpi::Virt_SAPAvailableForElement") +] +class Xen_SAPAvailableForElement : CIM_SAPAvailableForElement +{ +}; + +[Association, + Provider("cmpi::Virt_SAPAvailableForElement") +] +class KVM_SAPAvailableForElement : CIM_SAPAvailableForElement +{ +}; + +[Association, + Provider("cmpi::Virt_SAPAvailableForElement") +] +class LXC_SAPAvailableForElement : CIM_SAPAvailableForElement +{ +}; diff -r 3557859610b4 -r 45248145f547 schema/SAPAvailableForElement.registration --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/schema/SAPAvailableForElement.registration Fri Dec 19 21:10:28 2008 -0200 @@ -0,0 +1,5 @@ +# Copyright IBM Corp. 2007 +# Classname Namespace ProviderName ProviderModule ProviderTypes +Xen_SAPAvailableForElement root/virt Virt_SAPAvailableForElement Virt_SAPAvailableForElement association +KVM_SAPAvailableForElement root/virt Virt_SAPAvailableForElement Virt_SAPAvailableForElement association +LXC_SAPAvailableForElement root/virt Virt_SAPAvailableForElement Virt_SAPAvailableForElement association From richardm at br.ibm.com Wed Jan 7 01:50:37 2009 From: richardm at br.ibm.com (Richard Maciel) Date: Tue, 06 Jan 2009 23:50:37 -0200 Subject: [Libvirt-cim] [PATCH 0 of 2] #3 Added association SAPAvailableForElement (ComputerSystem <-> KVMRedirectionSAP) Message-ID: This patch depends on the patch which adds the association HostedAccessPoint (HostSystem <-> KVMRedirectionSAP) From richardm at br.ibm.com Wed Jan 7 01:53:40 2009 From: richardm at br.ibm.com (Richard Maciel) Date: Tue, 06 Jan 2009 23:53:40 -0200 Subject: [Libvirt-cim] [PATCH] Message-ID: # HG changeset patch # User Richard Maciel # Date 1229729923 7200 # Node ID ebb3a754af1f3eed21b8daf65c0b72ad9d7e65e3 # Parent c4b178c78475fe8ad11328d80f38bcdcf0d50e70 #2 Added 2 end points for the ServiceAffectsElement association, both related to the LogicalDevice class. - ConsoleRedirectionService <-> DisplayController - ConsoleRedirectionService <-> PointingDevice Signed-off-by: Richard Maciel diff -r c4b178c78475 -r ebb3a754af1f src/Makefile.am --- a/src/Makefile.am Fri Dec 19 21:10:32 2008 -0200 +++ b/src/Makefile.am Fri Dec 19 21:38:43 2008 -0200 @@ -213,9 +213,9 @@ libVirt_ConsoleRedirectionServiceCapabilities_la_SOURCES = Virt_ConsoleRedirectionServiceCapabilities.c -libVirt_ServiceAffectsElement_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_ConsoleRedirectionService.la +libVirt_ServiceAffectsElement_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_Device.la libVirt_ConsoleRedirectionService.la libVirt_ServiceAffectsElement_la_SOURCES = Virt_ServiceAffectsElement.c -libVirt_ServiceAffectsElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_ConsoleRedirectionService +libVirt_ServiceAffectsElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_Device -lVirt_ConsoleRedirectionService libVirt_KVMRedirectionSAP_la_SOURCES = Virt_KVMRedirectionSAP.c diff -r c4b178c78475 -r ebb3a754af1f src/Virt_ServiceAffectsElement.c --- a/src/Virt_ServiceAffectsElement.c Fri Dec 19 21:10:32 2008 -0200 +++ b/src/Virt_ServiceAffectsElement.c Fri Dec 19 21:38:43 2008 -0200 @@ -29,9 +29,11 @@ #include #include #include "misc_util.h" +#include "svpc_types.h" #include "Virt_ComputerSystem.h" #include "Virt_ConsoleRedirectionService.h" +#include "Virt_Device.h" const static CMPIBroker *_BROKER; @@ -41,15 +43,70 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *instance = NULL; - + const char *host = NULL; + int i; + int num_of_domains; + if (!match_hypervisor_prefix(ref, info)) - return s; + goto out; s = get_console_rs(ref, &instance, _BROKER, info->context, true); if (s.rc != CMPI_RC_OK) - return s; + goto out; s = enum_domains(_BROKER, ref, list); + if (s.rc != CMPI_RC_OK) + goto out; + + num_of_domains = list->cur; + + /* + * For each domain, insert its video and pointer devices into + * the list + */ + for (i = 0; i < num_of_domains; i++) { + s.rc = cu_get_str_prop(list->list[i], "Name", &host); + if (s.rc != CMPI_RC_OK) + goto out; + + s = enum_devices(_BROKER, + ref, + host, + CIM_RES_TYPE_INPUT, + list); + if (s.rc != CMPI_RC_OK) + goto out; + + s = enum_devices(_BROKER, + ref, + host, + CIM_RES_TYPE_GRAPHICS, + list); + if (s.rc != CMPI_RC_OK) + goto out; + } + + out: + return s; +} + +static CMPIStatus validate_cs_or_dev_ref(const CMPIContext *context, + const CMPIObjectPath *ref) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst = NULL; + char* classname; + + classname = class_base_name(CLASSNAME(ref)); + + if (STREQC(classname, "ComputerSystem")) { + s = get_domain_by_ref(_BROKER, ref, &inst); + } else if ((STREQC(classname, "PointingDevice")) || + (STREQC(classname, "DisplayController"))) { + s = get_device_by_ref(_BROKER, ref, &inst); + } + + free(classname); return s; } @@ -63,8 +120,8 @@ if (!match_hypervisor_prefix(ref, info)) return s; - - s = get_domain_by_ref(_BROKER, ref, &inst); + + s = validate_cs_or_dev_ref(info->context, ref); if (s.rc != CMPI_RC_OK) return s; @@ -83,6 +140,12 @@ "Xen_ComputerSystem", "KVM_ComputerSystem", "LXC_ComputerSystem", + "Xen_PointingDevice", + "KVM_PointingDevice", + "LXC_PointingDevice", + "Xen_DisplayController", + "KVM_DisplayController", + "LXC_DisplayController", NULL }; From richardm at br.ibm.com Wed Jan 7 02:04:03 2009 From: richardm at br.ibm.com (Richard Maciel) Date: Wed, 07 Jan 2009 00:04:03 -0200 Subject: [Libvirt-cim] [PATCH] #2 Added 2 end points for the ServiceAffectsElement association, both related to the LogicalDevice class Message-ID: # HG changeset patch # User Richard Maciel # Date 1229729923 7200 # Node ID ebb3a754af1f3eed21b8daf65c0b72ad9d7e65e3 # Parent c4b178c78475fe8ad11328d80f38bcdcf0d50e70 #2 Added 2 end points for the ServiceAffectsElement association, both related to the LogicalDevice class. - ConsoleRedirectionService <-> DisplayController - ConsoleRedirectionService <-> PointingDevice Signed-off-by: Richard Maciel diff -r c4b178c78475 -r ebb3a754af1f src/Makefile.am --- a/src/Makefile.am Fri Dec 19 21:10:32 2008 -0200 +++ b/src/Makefile.am Fri Dec 19 21:38:43 2008 -0200 @@ -213,9 +213,9 @@ libVirt_ConsoleRedirectionServiceCapabilities_la_SOURCES = Virt_ConsoleRedirectionServiceCapabilities.c -libVirt_ServiceAffectsElement_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_ConsoleRedirectionService.la +libVirt_ServiceAffectsElement_la_DEPENDENCIES = libVirt_ComputerSystem.la libVirt_Device.la libVirt_ConsoleRedirectionService.la libVirt_ServiceAffectsElement_la_SOURCES = Virt_ServiceAffectsElement.c -libVirt_ServiceAffectsElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_ConsoleRedirectionService +libVirt_ServiceAffectsElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_Device -lVirt_ConsoleRedirectionService libVirt_KVMRedirectionSAP_la_SOURCES = Virt_KVMRedirectionSAP.c diff -r c4b178c78475 -r ebb3a754af1f src/Virt_ServiceAffectsElement.c --- a/src/Virt_ServiceAffectsElement.c Fri Dec 19 21:10:32 2008 -0200 +++ b/src/Virt_ServiceAffectsElement.c Fri Dec 19 21:38:43 2008 -0200 @@ -29,9 +29,11 @@ #include #include #include "misc_util.h" +#include "svpc_types.h" #include "Virt_ComputerSystem.h" #include "Virt_ConsoleRedirectionService.h" +#include "Virt_Device.h" const static CMPIBroker *_BROKER; @@ -41,15 +43,70 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; CMPIInstance *instance = NULL; - + const char *host = NULL; + int i; + int num_of_domains; + if (!match_hypervisor_prefix(ref, info)) - return s; + goto out; s = get_console_rs(ref, &instance, _BROKER, info->context, true); if (s.rc != CMPI_RC_OK) - return s; + goto out; s = enum_domains(_BROKER, ref, list); + if (s.rc != CMPI_RC_OK) + goto out; + + num_of_domains = list->cur; + + /* + * For each domain, insert its video and pointer devices into + * the list + */ + for (i = 0; i < num_of_domains; i++) { + s.rc = cu_get_str_prop(list->list[i], "Name", &host); + if (s.rc != CMPI_RC_OK) + goto out; + + s = enum_devices(_BROKER, + ref, + host, + CIM_RES_TYPE_INPUT, + list); + if (s.rc != CMPI_RC_OK) + goto out; + + s = enum_devices(_BROKER, + ref, + host, + CIM_RES_TYPE_GRAPHICS, + list); + if (s.rc != CMPI_RC_OK) + goto out; + } + + out: + return s; +} + +static CMPIStatus validate_cs_or_dev_ref(const CMPIContext *context, + const CMPIObjectPath *ref) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *inst = NULL; + char* classname; + + classname = class_base_name(CLASSNAME(ref)); + + if (STREQC(classname, "ComputerSystem")) { + s = get_domain_by_ref(_BROKER, ref, &inst); + } else if ((STREQC(classname, "PointingDevice")) || + (STREQC(classname, "DisplayController"))) { + s = get_device_by_ref(_BROKER, ref, &inst); + } + + free(classname); return s; } @@ -63,8 +120,8 @@ if (!match_hypervisor_prefix(ref, info)) return s; - - s = get_domain_by_ref(_BROKER, ref, &inst); + + s = validate_cs_or_dev_ref(info->context, ref); if (s.rc != CMPI_RC_OK) return s; @@ -83,6 +140,12 @@ "Xen_ComputerSystem", "KVM_ComputerSystem", "LXC_ComputerSystem", + "Xen_PointingDevice", + "KVM_PointingDevice", + "LXC_PointingDevice", + "Xen_DisplayController", + "KVM_DisplayController", + "LXC_DisplayController", NULL }; From deeptik at linux.vnet.ibm.com Wed Jan 7 09:31:03 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Wed, 07 Jan 2009 01:31:03 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fixing 41_cs_to_settingdefinestate.py CS tc Message-ID: <484cffb372f419a67620.1231320663@elm3b197.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1231320603 28800 # Node ID 484cffb372f419a676209b368b60fc538d544c73 # Parent 64b84ef28b22d17dd22027c632a9dc44d642d2b5 [TEST] #2 Fixing 41_cs_to_settingdefinestate.py CS tc. Changes: -------- >From Patch 1 to 2: ------------------------- 1) Removed ununsed variables. 2) Algined to comments line to 80 columns. 3) removed check_len(), print_err() functions. 4) Made main() and get_SDS_verify_RASD_build_vssdc_input() more modular and small. Patch 1: -------- This test has been almost re-written to accomdate latest library changes. 1) cim_define and cim_start usage. 2) Use the library fn enum_rasd(). 3) Removed unnecessary import statements. 4) Algined the tc to 80 columns. Tested for KVM and Xen with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 64b84ef28b22 -r 484cffb372f4 suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Tue Dec 30 00:58:06 2008 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Wed Jan 07 01:30:03 2009 -0800 @@ -27,12 +27,12 @@ # SettingsDefineState. # # It traverses the following path: -# {ComputerSystem} (select the guest domain) --> [SystemDevice](from output select -# guest domain instances of Device, from the guest domain instances, -# select one Device instance) --> [SettingsDefineState] (from output, select a RASD -# instance - should only be 1) --> [VSSDComponent] (from output, select a VSSD instance -# - should only be 1) --> [SettingsDefineState] (Verify the ComputerSystem instance is -# the one we started with) +# {ComputerSystem} (select the guest domain) --> [SystemDevice](from output +# select guest domain instances of Device, from the guest domain instances, +# select one Device instance) --> [SettingsDefineState] (from output, select +# a RASD instance - should only be 1) --> [VSSDComponent] (from output, +# select a VSSD instance - should only be 1) --> [SettingsDefineState] +# (Verify the ComputerSystem instance is the one we started with) # # Steps: # ------ @@ -41,367 +41,289 @@ # and and verify the EnabledState is 2. # 3) Create info list for the guest domain to be used later for comparison. # 4) Get the various devices allocated to the domain by using the SystemDevice -# association and giving the ComputerSystem output from the previous enumeration -# as inputs to the association. -# 5) For each of the Devices get the association on SettingsDefineState, we should -# get only one record as output. +# association and giving the ComputerSystem output from the previous +# enumeration as inputs to the association. +# 5) For each of the Devices get the association on SettingsDefineState, we +# should get only one record as output. # 6) Verify the Disk, Memory, Network, Processor RASD values. # 7) Call VSSDComponent association for each of the RASD types, we should # get only one VSSD record as output. -# 8) Verify the VSSD output for every VSSDComponent association with the RASD types. -# 9) Using the VSSD output query the SettingsDefineState association, again we should -# get only one computersystem record as output. -# 10)Verify the computersystem values with the computersystem info that was created from -# the enumeration in the beginning. +# 8) Verify the VSSD output for every VSSDComponent association with the +# RASD types. +# 9) Using the VSSD output query the SettingsDefineState association, again we +# should get only one computersystem record as output. +# 10)Verify the computersystem values with the computersystem info that was +# created from the enumeration in the beginning. # 11) Destroy the domain. -# Date : 05.02.2008 +# Date : 05.02.2008 import sys from VirtLib import utils from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class -from XenKvmLib.test_doms import destroy_and_undefine_all -from XenKvmLib.assoc import Associators, AssociatorNames -from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ -CIM_ERROR_ASSOCIATORS +from XenKvmLib.assoc import Associators, AssociatorNames, compare_all_prop +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib import rasd -from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ -verify_diskrasd_values, verify_memrasd_values, rasd_init_list -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.classes import get_typed_class +from XenKvmLib.rasd import enum_rasds +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.common_util import parse_instance_id sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = "CrossClass_GuestDom" -test_vcpus = 1 -test_mem = 128 -test_mac = "00:11:22:33:44:aa" -def vssd_init_list(virt): - """ - Creating the lists that will be used for comparisons. - """ - if virt == 'XenFV': - virt = 'Xen' - - vssd_values = { - 'Caption' : "Virtual System", - 'InstanceID' : '%s:%s' % (virt, test_dom), - 'ElementName' : test_dom, - 'VirtualSystemIdentifier' : test_dom, - 'VirtualSystemType' : virt, - 'Classname' : get_typed_class(virt, - "VirtualSystemSettingData") - } - - return vssd_values - -def cs_init_list(cs_dom): - """ - Creating the lists that will be used for comparisons. - """ - cs_values = { - 'Caption' : cs_dom.Caption, - 'EnabledState' : cs_dom.EnabledState, - 'RequestedState' : cs_dom.RequestedState, - 'CreationClassName' : cs_dom.CreationClassName, - 'Name' : cs_dom.Name - } - return cs_values - -def setup_env(server, virt, test_disk): +def setup_env(server, virt): vsxml_info = None - status = PASS - destroy_and_undefine_all(server) virt_xml = get_class(virt) - vsxml_info = virt_xml(test_dom, mem = test_mem, - vcpus=test_vcpus, - mac = test_mac, - disk = test_disk) + vsxml_info = virt_xml(test_dom) + ret = vsxml_info.cim_define(server) + if not ret: + logger.error("Failed to define the dom: %s", test_dom) + return FAIL, vsxml_info - ret = vsxml_info.create(server) + status = vsxml_info.cim_start(server) if not ret: - logger.error("Failed to create the dom: %s", test_dom) - status = FAIL + logger.error("Failed to start the dom: %s", test_dom) + vsxml_info.undefine(server) + return FAIL, vsxml_info - return status, vsxml_info + return PASS, vsxml_info - -def print_err(err, detail, cn): - logger.error(err % cn) - logger.error("Exception: %s", detail) - -def vssd_sds_err( an, fieldname, ret_val, exp_val): - error = "Mismatching %s Values in %s association" - details = "Returned %s instead of %s" - err = error % (fieldname, an) - detail = details % (ret_val, exp_val) - logger.error(err) - logger.error(detail) - -def get_associatornames_info(server, virt, vsxml, cn, an, qcn, name): - status = PASS - assoc_info = [] - try: - assoc_info = AssociatorNames(server, - an, - cn, - CreationClassName=cn, - Name = name) - if len(assoc_info) < 1: - logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) - status = FAIL - except Exception, detail: - print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn) - status = FAIL - - if status != PASS: - vsxml.destroy(server) - - return status, assoc_info - -def get_associators_info(server, virt, vsxml, cn, an, qcn, instid): +def get_associators_info(server, cn, an, qcn, instid): status = PASS assoc_info = [] try: assoc_info = Associators(server, - an, - cn, - InstanceID = instid) + an, + cn, + InstanceID = instid) if len(assoc_info) < 1: - logger.error("%s returned %i %s objects" % - (an, len(assoc_info), qcn)) + logger.error("%s returned %i %s objects", + an, len(assoc_info), qcn) status = FAIL except Exception, detail: - print_err(CIM_ERROR_ASSOCIATORS, detail, cn) + logger.error(CIM_ERROR_ASSOCIATORS, cn) + logger.error("Exception: %s", detail) status = FAIL - - if status != PASS: - vsxml.destroy(server) return status, assoc_info -def check_len(an, assoc_list_info, qcn, exp_len): - if len(assoc_list_info) != exp_len: - logger.error("%s returned %i %s objects", an, - len(assoc_list_info), qcn) - return FAIL - return PASS +def init_rasd_list(virt, ip): + rasd_insts = {} + rasds, status = enum_rasds(virt, ip) + if status != PASS: + logger.error("Enum RASDs failed") + return rasd_insts, status -def get_SDS_verify_RASD_build_vssdc_input(server, virt, vsxml, - test_disk, sd_assoc_info): - status = PASS - in_setting_define_state = {} - in_vssdc = {} - prasd = get_typed_class(virt, 'ProcResourceAllocationSettingData') - mrasd = get_typed_class(virt, 'MemResourceAllocationSettingData') - nrasd = get_typed_class(virt, 'NetResourceAllocationSettingData') - drasd = get_typed_class(virt, 'DiskResourceAllocationSettingData') + for rasd_cn, rasd_list in rasds.iteritems(): + for rasd in rasd_list: + guest, dev, status = parse_instance_id(rasd.InstanceID) + if status != PASS: + logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID) + return rasd_insts, FAIL + if guest == test_dom: + rasd_insts[rasd.Classname] = rasd + + return rasd_insts, PASS + + +def verify_values(assoc_info, vssd_cs_values, an, qcn): + if len(assoc_info) != 1: + logger.error("%s returned %i %s objects, Expected 1", an, + len(assoc_info), qcn) + return FAIL + + vssd_cs_assoc = assoc_info[0] + return compare_all_prop(vssd_cs_assoc, vssd_cs_values) + +def build_sd_info(sd_assoc_info, qcn, an, rasd_values): + sd_info = {} + + # Building the input for SettingsDefineState association. + for sd_val in sd_assoc_info: + if sd_val['SystemName'] == test_dom: + classname_keyvalue = sd_val['CreationClassName'] + deviceid = sd_val['DeviceID'] + sd_info[classname_keyvalue] = deviceid + + # Expect the SystemDevice records == len(rasd_values) entries. + if len(sd_info) != len(rasd_values): + logger.error("%s returned %i %s objects, Expected %i", an, + len(sd_info), qcn, len(rasd_values)) + return FAIL, sd_info + + return PASS, sd_info + +def get_cs_sysdev_info(server, virt, qcn, rasd_val): + sd_info={} + try: + cs_class = get_typed_class(virt, 'ComputerSystem') + keys = { 'Name' : test_dom, 'CreationClassName' : cs_class } + dom_cs = GetInstance(server, cs_class, keys) + if dom_cs.Name != test_dom: + raise Exception("Instance matching %s was not returned" % test_dom) + + an = get_typed_class(virt, 'SystemDevice') + sd_assoc = AssociatorNames(server, an, cs_class, + CreationClassName=cs_class, + Name=test_dom) + if len(sd_assoc) < 1: + raise Exception ("%s returned %d %s objects" \ + % (an, len(sd_assoc), qcn)) + + status, sd_info = build_sd_info(sd_assoc, qcn, an, rasd_val) + if status != PASS: + raise Exception ("Failed to get SystemDevice info for: %s" \ + % test_dom) + + except Exception, details: + logger.error("Exception details: %s", details) + return FAIL, dom_cs, sd_info + + return PASS, dom_cs, sd_info + +def get_sds_info(server, virt, cs_cn, rasd_values, + in_setting_define_state, qcn): + sds_info = {} try: - # Building the input for SettingsDefineState association. - for i in range(len(sd_assoc_info)): - if sd_assoc_info[i]['SystemName'] == test_dom: - classname_keyvalue = sd_assoc_info[i]['CreationClassName'] - deviceid = sd_assoc_info[i]['DeviceID'] - in_setting_define_state[classname_keyvalue] = deviceid - - # Expect the SystemDevice to return 4 logical device records. - # one each for memory, network, disk and processor and hence 4. - # and hence expect the in_setting_define_state to contain just 4 entries. - an = get_typed_class(virt, "SystemDevice") - qcn = "Logical Devices" - exp_len = 4 - if check_len(an, in_setting_define_state, qcn, exp_len) != PASS: - return FAIL, in_setting_define_state - - # Get the rasd values that will be used to compare with the SettingsDefineState - # output. - status, rasd_values, in_list = rasd_init_list(vsxml, virt, test_disk, - test_dom, test_mac, - test_mem) - if status != PASS: - return status, rasd_values - - sccn = get_typed_class(virt,"ComputerSystem") - an = get_typed_class(virt,"SettingsDefineState") + an = get_typed_class(virt,"SettingsDefineState") for cn, devid in sorted(in_setting_define_state.items()): - assoc_info = Associators(server, - an, - cn, - DeviceID = devid, + assoc_info = Associators(server, an, cn, DeviceID = devid, CreationClassName = cn, SystemName = test_dom, - SystemCreationClassName = sccn) + SystemCreationClassName = cs_cn) - # we expect only one RASD record to be returned for each device that is used to - # query with the SettingsDefineState association. + # we expect only one RASD record to be returned for each device + # type when queried with SDS association. if len(assoc_info) != 1: - logger.error("%s returned %i %s objects" % (an, len(assoc_info), cn)) - status = FAIL - break - index = (len(assoc_info) - 1) - rasd = rasd_values[cn] - CCName = assoc_info[index].classname - if CCName == prasd: - status = verify_procrasd_values(assoc_info[index], rasd) - elif CCName == nrasd: - status = verify_netrasd_values(assoc_info[index], rasd) - elif CCName == drasd: - status = verify_diskrasd_values(assoc_info[index], rasd) - elif CCName == mrasd: - status = verify_memrasd_values(assoc_info[index], rasd) - else: - status = FAIL + raise Exception("%s returned %d %s objects, Expected 1" \ + % (an, len(assoc_info), cn)) + + assoc_val = assoc_info[0] + CCName = assoc_val.classname + exp_rasd = rasd_values[CCName] + if assoc_val['InstanceID'] != exp_rasd.InstanceID: + raise Exception ("Got %s instead of %s" \ + % (assoc_val['InstanceID'], + exp_rasd.InstanceID)) + + # Build the input required for VSSDC association query. + vs_name = assoc_val['InstanceID'] + if vs_name.find(test_dom) >= 0: + instid = assoc_val['InstanceID'] + sds_info[CCName] = instid + + if len(sds_info) != len(rasd_values): + raise Exception("%s returned %i %s objects, Expected %i" \ + % (an, len(sds_info), qcn, len(rasd_values))) + + except Exception, details: + logger.error("Exception: %s", details) + return FAIL, sds_info + + return PASS, sds_info + +def get_vssd_info(server, virt, in_vssdc_list, qcn): + try: + # Get the vssd values which will be used for verifying the + # VSSD output from the VSSDC results. + if virt == "XenFV": + instIdval = "Xen:%s" % test_dom + else: + instIdval = "%s:%s" % (virt, test_dom) + + vssd_class = get_typed_class(virt, 'VirtualSystemSettingData') + keys = { 'InstanceID' : instIdval } + vssd_values = GetInstance(server, vssd_class, keys) + if vssd_values.ElementName != test_dom: + raise Exception ("Instance matching %s was not returned" % test_dom) + + an = get_typed_class(virt, 'VirtualSystemSettingDataComponent') + for cn, instid in sorted((in_vssdc_list.items())): + status, vssd_assoc_info = get_associators_info(server, cn, an, + vssd_class, + instid) if status != PASS: - logger.error("Mistmatching RASD values" ) - break - vs_name = assoc_info[index]['InstanceID'] - if vs_name.find(test_dom) >= 0: - instid = assoc_info[index]['InstanceID'] - in_vssdc[CCName] = instid - except Exception, detail: - print_err(CIM_ERROR_ASSOCIATORS, detail, an) - status = FAIL - return status, in_vssdc + raise Exception ("Failed to get VSSD info") + status = verify_values(vssd_assoc_info, vssd_values, an, qcn) + if status != PASS: + raise Exception ("VSSD values verification error") -def verify_fields(an, field_name, vssd_cs_assoc_info, vssd_cs_values): - if vssd_cs_assoc_info[field_name] != vssd_cs_values[field_name]: - vssd_sds_err(an, field_name, vssd_cs_assoc_info[field_name], \ - vssd_cs_values[field_name]) - return FAIL - return PASS + except Exception, details: + logger.error("Exception details: %s", details) + return FAIL, vssd_assoc_info + return PASS, vssd_assoc_info -def verify_VSSD_values(assoc_info, vssd_values, an, qcn): - # We expect that VirtualSystemSettingDataComponent returns only one - # VirtualSystemSettingData object when queried with disk, processor, - # network and memory rasd's and all of them return the same output. - exp_len = 1 +def verify_vssdc_assoc(server, virt, cs_class, vssd_assoc_info, dom_cs): + try: + # Since the VirtualSystemSettingDataComponent returns similar + # output when queried with every RASD, we are taking the output of + # the last associtaion query as inputs for + # querying SettingsDefineState. + cn = vssd_assoc_info[0].classname + an = get_typed_class(virt, 'SettingsDefineState') + instid = vssd_assoc_info[0]['InstanceID'] + status, cs_assoc_info = get_associators_info(server, cn, an, + cs_class, instid) + if status != PASS: + raise Exception ("Failed to get assoc info for dom: %s", test_dom) - if check_len(an, assoc_info, qcn, exp_len) != PASS: + # verify the results of SettingsDefineState with the cs_values list + # that was built using the output of the GetInstance on ComputerSystem. + status = verify_values(cs_assoc_info, dom_cs, an, cs_class) + + except Exception, details: + logger.error("Exception details: %s", details) return FAIL - vssd_assoc = assoc_info[0] - if verify_fields(an, 'Caption', vssd_assoc, vssd_values) != PASS: - return FAIL - if verify_fields(an, 'InstanceID', vssd_assoc, vssd_values) != PASS: - return FAIL - if verify_fields(an, 'ElementName', vssd_assoc, vssd_values) != PASS: - return FAIL - if verify_fields(an, 'VirtualSystemIdentifier', vssd_assoc, vssd_values) != PASS: - return FAIL - if verify_fields(an, 'VirtualSystemType', vssd_assoc, vssd_values) != PASS: - return FAIL - if vssd_assoc.classname != vssd_values['Classname']: - vssd_sds_err(an, 'Classname', vssd_assoc.classname, - vssd_values['Classname']) - return FAIL - return PASS -def verify_CS_values(assoc_info, cs_values, an, qcn): - exp_len = 1 - - if check_len(an, assoc_info, qcn, exp_len) != PASS: - return FAIL - cs_assoc = assoc_info[0] - if verify_fields(an, 'Caption', cs_assoc, cs_values) != PASS: - return FAIL - if verify_fields(an, 'EnabledState', cs_assoc, cs_values) != PASS: - return FAIL - if verify_fields(an, 'RequestedState', cs_assoc, cs_values) != PASS: - return FAIL - if verify_fields(an, 'CreationClassName', cs_assoc, cs_values) != PASS: - return FAIL - if verify_fields(an, 'Name', cs_assoc, cs_values) != PASS: - return FAIL - return PASS + return status + @do_main(sup_types) def main(): server = main.options.ip virt = main.options.virt - if virt == 'Xen': - test_disk = "xvda" - else: - test_disk = "hda" - status, vsxml = setup_env(server, virt, test_disk) - if status != PASS: - return status + try: + status, vsxml = setup_env(server, virt) + if status != PASS: + return status - status, cs_dom = poll_for_state_change(server, virt, test_dom, 2, - timeout=10) - if status != PASS and cs_dom.RequestedState != 0: - vsxml.destroy(server) - return FAIL + qcn = 'Logical Devices' + rasd_val, status = init_rasd_list(virt, server) - # Creating the cs info list which will be used later for comparison. - cs_values = cs_init_list(cs_dom) - - cn = cs_dom.CreationClassName - an = get_typed_class(virt, 'SystemDevice') - qcn = 'Logical Devices' - name = test_dom - status, sd_assoc_info = get_associatornames_info(server, virt, vsxml, - cn, an, qcn, name) - if status != PASS or len(sd_assoc_info) == 0: - return status + status, dom_cs, sd_info = get_cs_sysdev_info(server, virt, + qcn, rasd_val) + if status != PASS: + raise Exception ("Failed to get SystemDevice information") - status, in_vssdc_list = get_SDS_verify_RASD_build_vssdc_input(server, virt, - vsxml, test_disk, - sd_assoc_info) - if status != PASS or len(in_vssdc_list) == 0 : - vsxml.destroy(server) - return status + cs_class = dom_cs.CreationClassName - # Verifying that the in_vssdc_list contains 4 entries one each for mem rasd, - # network rasd, processor rasd and disk rasd. - exp_len = 4 - if check_len(an, in_vssdc_list, qcn, exp_len) != PASS: - vsxml.destroy(server) - return FAIL + status, sds_info = get_sds_info(server, virt, cs_class, rasd_val, + sd_info, qcn) + if status != PASS: + raise Exception ("Failed to get SetingDefineState information") - # Get the vssd values which will be used for verifying the - # VirtualSystemSettingData output from the - # VirtualSystemSettingDataComponent results. - vssd_values = vssd_init_list(virt) - an = get_typed_class(virt, 'VirtualSystemSettingDataComponent') - qcn = get_typed_class(virt, 'VirtualSystemSettingData') - for cn, instid in sorted((in_vssdc_list.items())): - status, vssd_assoc_info = get_associators_info(server, virt, vsxml, cn, - an, qcn, instid) - if status != PASS or len(vssd_assoc_info) == 0: - break - status = verify_VSSD_values(vssd_assoc_info, vssd_values, an, qcn) + status, vssd_assoc_info = get_vssd_info(server, virt, sds_info, qcn) if status != PASS: - break - if status != PASS: - vsxml.destroy(server) - return status + raise Exception ("Failed to get VSSD information") - # Since the VirtualSystemSettingDataComponent returns similar - # output when queried with every RASD, we are taking the output of - # the last associtaion query as inputs for - # querying SettingsDefineState. - cn = vssd_assoc_info[0].classname - an = get_typed_class(virt, 'SettingsDefineState') - qcn = get_typed_class(virt, 'ComputerSystem') - instid = vssd_assoc_info[0]['InstanceID'] - status, cs_assoc_info = get_associators_info(server, virt, vsxml, cn, - an, qcn, instid) - if status != PASS or len(cs_assoc_info) == 0: - return status + status = verify_vssdc_assoc(server, virt, cs_class, + vssd_assoc_info, dom_cs) - # verify the results of SettingsDefineState with the cs_values list that was - # built using the output of the enumeration on ComputerSystem. - status = verify_CS_values(cs_assoc_info, cs_values, an, qcn) + except Exception, details: + logger.error("Exception details is %s", details) + status = FAIL + vsxml.destroy(server) + vsxml.undefine(server) return status if __name__ == "__main__": sys.exit(main()) From deeptik at linux.vnet.ibm.com Wed Jan 7 09:32:59 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 07 Jan 2009 15:02:59 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update 32_start_reboot.py to use cim_() functions In-Reply-To: References: Message-ID: <496476CB.7000007@linux.vnet.ibm.com> +1 for me. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Wed Jan 7 09:40:25 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 07 Jan 2009 15:10:25 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update 32_start_reboot.py to use cim_() functions In-Reply-To: <49639B22.3090703@linux.vnet.ibm.com> References: <49632788.1020501@linux.vnet.ibm.com> <49639B22.3090703@linux.vnet.ibm.com> Message-ID: <49647889.8010909@linux.vnet.ibm.com> Kaitlin Rupert wrote: >>> @@ -606,7 +610,7 @@ >>> def cim_reboot(self, server, req_time=const.TIME, poll_time=30): >>> return self.cim_state_change(server, const.CIM_REBOOT, - req_time, >>> poll_time) + req_time, poll_time, const.CIM_ENABLE) >> The test case gives a false positive. The following are the log >> messages which means the tc is suppose to fail. >> >> Tue, 06 Jan 2009 01:10:14:TEST LOG:INFO - ====32_start_reboot.py Log==== >> Tue, 06 Jan 2009 01:10:17:TEST LOG:ERROR - Unable to check guest state >> Tue, 06 Jan 2009 01:10:17:TEST LOG:ERROR - Exception: Wrong guest >> instance >> Tue, 06 Jan 2009 01:10:18:TEST LOG:ERROR - Unable to check guest state >> Tue, 06 Jan 2009 01:10:18:TEST LOG:ERROR - Exception: EnabledState is >> 9, expected 2. >> >> But, the test case gives a PASS message on the console. >> > > When you reboot a guest, the will be paused briefly before being > restarted. When cim_state_change(), it calls check_guest_state() in a > loop to verify the guest reaches the appropriate state. > > check_guest_state() prints an error message if the state is not in the > expected state. > > I could change these from error messages to info messages. But > check_guest_state() would still need to return an error in this case > (even though the test doesn't report an error because the guest really > is rebooted in this case). I get your point here, but still it left me confused as to why I am getting the Error Messages. It would be good to change the Error messages to Info messages whenever appropriate. We can use the timeout period to decide whether it is time to print an error message in case the guest info is not found or the states are not yet properly. Any thoughts ?? Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Wed Jan 7 09:59:30 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 07 Jan 2009 15:29:30 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Rename 27_define_suspend_errs.py to 27_define_pause_errs.py In-Reply-To: <95141f9f1593e01a70ba.1231265007@localhost.localdomain> References: <95141f9f1593e01a70ba.1231265007@localhost.localdomain> Message-ID: <49647D02.6030302@linux.vnet.ibm.com> +1 for me . Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Wed Jan 7 10:06:35 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 07 Jan 2009 15:36:35 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update Processor -t 02_definesys_get_procs.py to use cim_define() In-Reply-To: References: Message-ID: <49647EAB.1020207@linux.vnet.ibm.com> +1 for me. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Wed Jan 7 10:19:15 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 07 Jan 2009 15:49:15 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update Memory - 02_defgetmem.py to use cim_define() In-Reply-To: References: Message-ID: <496481A3.4000205@linux.vnet.ibm.com> + 1 for me. Thanks and Regards, Deepti. From deeptik at linux.vnet.ibm.com Wed Jan 7 10:24:56 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 07 Jan 2009 15:54:56 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSMS 01_definesystem_name.py to use cim_() functions In-Reply-To: <270c97141e74456e0513.1231269012@localhost.localdomain> References: <270c97141e74456e0513.1231269012@localhost.localdomain> Message-ID: <496482F8.3040106@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231268986 28800 > # Node ID 270c97141e74456e051361572b2ba77af8f0fd94 > # Parent d40521f17a98e3403eef62b0e5c42d8b3b8f5c09 > [TEST] Update VSMS 01_definesystem_name.py to use cim_() functions > > Signed-off-by: Kaitlin Rupert > > diff -r d40521f17a98 -r 270c97141e74 suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 10:15:08 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 11:09:46 2009 -0800 > @@ -23,12 +23,10 @@ > # > > import sys > -import pywbem > -from VirtLib import utils > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > from XenKvmLib.const import do_main > from CimTest.Globals import logger > +from CimTest.ReturnCodes import PASS, FAIL > +from XenKvmLib.vxml import get_class > > SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC'] > default_dom = 'test_domain' > @@ -37,10 +35,18 @@ > def main(): > options = main.options > > - status = create_using_definesystem(default_dom, options.ip, > - virt=options.virt) > - undefine_test_domain(default_dom, options.ip, > - virt=options.virt) > + cxml = get_class(options.virt)(default_dom) > + > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Unable to define %s" % default_dom) > + return FAIL > + > + status = cxml.cim_start(options.ip) > + if status != PASS: > + logger.info("Starting defined %s failed" % default_dom) > Need to destroy the domain before undefine before exiting the test case. > + > + cxml.undefine(options.ip) > > 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 Wed Jan 7 10:28:34 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 07 Jan 2009 15:58:34 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSMS 01_definesystem_name.py to use cim_() functions In-Reply-To: <270c97141e74456e0513.1231269012@localhost.localdomain> References: <270c97141e74456e0513.1231269012@localhost.localdomain> Message-ID: <496483D2.1060206@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231268986 28800 > # Node ID 270c97141e74456e051361572b2ba77af8f0fd94 > # Parent d40521f17a98e3403eef62b0e5c42d8b3b8f5c09 > [TEST] Update VSMS 01_definesystem_name.py to use cim_() functions > > Signed-off-by: Kaitlin Rupert > > diff -r d40521f17a98 -r 270c97141e74 suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 10:15:08 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 11:09:46 2009 -0800 > @@ -23,12 +23,10 @@ > # > > import sys > -import pywbem > -from VirtLib import utils > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > from XenKvmLib.const import do_main > from CimTest.Globals import logger > +from CimTest.ReturnCodes import PASS, FAIL > +from XenKvmLib.vxml import get_class > > SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC'] > default_dom = 'test_domain' > @@ -37,10 +35,18 @@ > def main(): > options = main.options > > - status = create_using_definesystem(default_dom, options.ip, > - virt=options.virt) > - undefine_test_domain(default_dom, options.ip, > - virt=options.virt) > + cxml = get_class(options.virt)(default_dom) > + > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Unable to define %s" % default_dom) > + return FAIL > + > + status = cxml.cim_start(options.ip) > + if status != PASS: > + logger.info("Starting defined %s failed" % default_dom) > Can we change the above log message to something like: logger.info("Failed to start the defined domain: %s" % default_dom) or logger.info("Failed starting defined domain: %s" % default_dom) or something much better ? > + > + cxml.undefine(options.ip) > > 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 Wed Jan 7 11:30:43 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 07 Jan 2009 17:00:43 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update CSI 01 to use cim_() functions In-Reply-To: References: Message-ID: <49649263.5000303@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231271658 28800 > # Node ID d0b13b624d8c54bb8c625f3d0855ac7f80cdcdbd > # Parent 270c97141e74456e051361572b2ba77af8f0fd94 > [TEST] Update CSI 01 to use cim_() functions. > > Signed-off-by: Kaitlin Rupert > > diff -r 270c97141e74 -r d0b13b624d8c suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py > --- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Tue Jan 06 11:09:46 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Tue Jan 06 11:54:18 2009 -0800 > @@ -24,23 +24,17 @@ > import os > import signal > import time > Better way is to import time as below: from time import sleep > -from pywbem.cim_obj import CIMInstanceName > from CimTest.Globals import logger > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL > -from XenKvmLib.common_util import create_using_definesystem, \ > - call_request_state_change > -from XenKvmLib.test_doms import destroy_and_undefine_domain > from XenKvmLib.classes import get_typed_class > from XenKvmLib.indication_tester import CIMIndicationSubscription > from XenKvmLib.vxml import set_default > -from XenKvmLib.vsms import get_vsms_class > +from XenKvmLib.vxml import get_class > > SUPPORTED_TYPES = ['Xen', 'XenFV', 'KVM'] > > test_dom = "domU" > -REQ_STATE = 2 > -TIME = "00000000000000.000000:000" > > def sub_ind(ip, virt): > dict = set_default(ip) > @@ -70,28 +64,24 @@ > > return sub_list, ind_names, dict > > -def gen_ind(test_dom, ip, vtype, ind): > +def gen_ind(test_dom, ip, vtype, ind, cxml): > if ind == "define": > - return create_using_definesystem(test_dom, ip, virt=vtype) > + ret = cxml.cim_define(ip) > + if not ret: > + return FAIL > + return PASS > > You can remove the blank line from here. > elif ind == "start": > - rc = call_request_state_change(test_dom, ip, REQ_STATE, TIME, vtype) > - if rc != 0: > - logger.error("Failed to start domain: %s" % test_dom) > + status = cxml.cim_start(ip) > + if status != PASS: > + logger.error("Failed to start domain: %s", test_dom) > return FAIL > return PASS > You can remove the blank line from here. > elif ind == "destroy": > - service = get_vsms_class(vtype)(ip) > - try: > - classname = get_typed_class(vtype, 'ComputerSystem') > - cs_ref = CIMInstanceName(classname, keybindings = { > - 'Name':test_dom, > - 'CreationClassName':classname}) > - service.DestroySystem(AffectedSystem=cs_ref) > - except Exception, details: > - logger.error('Unknow exception happened') > - logger.error(details) > + ret = cxml.cim_destroy(ip) > + if not ret: > + logger.error("Unable to destroy %s", test_dom) > return FAIL > return PASS > > @@ -151,12 +141,16 @@ > @do_main(SUPPORTED_TYPES) > def main(): > options = main.options > + ip = options.ip > + virt = options.virt > status = FAIL > > - sub_list, ind_names, dict = sub_ind(options.ip, options.virt) > + sub_list, ind_names, dict = sub_ind(ip, virt) > > ind_list = ["define", "start", "destroy"] > > + cxml = get_class(virt)(test_dom) > + > for ind in ind_list: > sub = sub_list[ind] > ind_name = ind_names[ind] > @@ -171,7 +165,7 @@ > os._exit(0) > else: > try: > - status = gen_ind(test_dom, options.ip, options.virt, ind) > + status = gen_ind(test_dom, ip, virt, ind, cxml) > if status != PASS: > os.kill(pid, signal.SIGKILL) > raise Exception("Unable to generate indication") > @@ -190,7 +184,8 @@ > sub.unsubscribe(dict['default_auth']) > logger.info("Cancelling subscription for %s" % ind_names[ind]) > > - destroy_and_undefine_domain(test_dom, options.ip, options.virt) > + cxml.cim_destroy(ip) > Calling the cim_destroy leaves the following error message in the log, since the domain would have already been destroyed: Wed, 07 Jan 2009 03:49:43:TEST LOG:ERROR - Error invoking DestroySystem Wed, 07 Jan 2009 03:49:43:TEST LOG:ERROR - Got error (1, u'CIM_ERR_FAILED: Failed to find domain') with exception CIMError > + cxml.undefine(ip) > > 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 kaitlin at linux.vnet.ibm.com Wed Jan 7 15:34:55 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 07:34:55 -0800 Subject: [Libvirt-cim] [PATCH 0 of 2] #3 Added association SAPAvailableForElement (ComputerSystem <-> KVMRedirectionSAP) In-Reply-To: References: Message-ID: <4964CB9F.7060606@linux.vnet.ibm.com> Richard Maciel wrote: > This patch depends on the patch which adds the association HostedAccessPoint (HostSystem <-> KVMRedirectionSAP) > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 7 15:46:32 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 07:46:32 -0800 Subject: [Libvirt-cim] [PATCH] #2 Added 2 end points for the ServiceAffectsElement association, both related to the LogicalDevice class In-Reply-To: References: Message-ID: <4964CE58.9010701@linux.vnet.ibm.com> Richard Maciel wrote: > # HG changeset patch > # User Richard Maciel > # Date 1229729923 7200 > # Node ID ebb3a754af1f3eed21b8daf65c0b72ad9d7e65e3 > # Parent c4b178c78475fe8ad11328d80f38bcdcf0d50e70 > #2 Added 2 end points for the ServiceAffectsElement association, both related to the LogicalDevice class. > +1 -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 7 16:47:44 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 08:47:44 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 01_definesystem_name.py to use cim_() functions Message-ID: <02df4284e91f0c3def60.1231346864@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231345874 28800 # Node ID 02df4284e91f0c3def604cf9e208bf5df256fe91 # Parent c3e4470bce26b1da0e848f5be2ae411b9ea1b937 [TEST] #2 Update VSMS 01_definesystem_name.py to use cim_() functions Updates: -Added cim_destroy() to destroy the guest at the end of the test -Reworded log message for clarity Signed-off-by: Kaitlin Rupert diff -r c3e4470bce26 -r 02df4284e91f suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 11:56:13 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Wed Jan 07 08:31:14 2009 -0800 @@ -23,12 +23,10 @@ # import sys -import pywbem -from VirtLib import utils -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem from XenKvmLib.const import do_main from CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC'] default_dom = 'test_domain' @@ -37,10 +35,19 @@ def main(): options = main.options - status = create_using_definesystem(default_dom, options.ip, - virt=options.virt) - undefine_test_domain(default_dom, options.ip, - virt=options.virt) + cxml = get_class(options.virt)(default_dom) + + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Unable to define %s" % default_dom) + return FAIL + + status = cxml.cim_start(options.ip) + if status != PASS: + logger.info("Failed to start the defined domain: %s" % default_dom) + + cxml.cim_destroy(options.ip) + cxml.undefine(options.ip) return status From kaitlin at linux.vnet.ibm.com Wed Jan 7 16:48:14 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 08:48:14 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: <4962F408.1080901@linux.vnet.ibm.com> References: <4962F408.1080901@linux.vnet.ibm.com> Message-ID: <4964DCCE.8040502@linux.vnet.ibm.com> >> get_typed_class(options.virt,'DiskResourceAllocationSettingData') >> + + drasd_list = EnumInstances(options.ip, drasd, >> ret_cim_inst=True) >> > Are you planning to change the EnumInstance to GetInstance() ?? Or is > this final changes for the test case ? Hi Daisy, I haven't taken a look at this test yet because I'm not sure if you plan to update it to replace EnumInstance() with GetInstance(). Are you planning on sending another patch? -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 7 17:27:05 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 09:27:05 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update CSI 01 to use cim_() functions Message-ID: <39f538ac0d3023d20257.1231349225@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231347232 28800 # Node ID 39f538ac0d3023d202572ddc47021633c30d9de2 # Parent 02df4284e91f0c3def604cf9e208bf5df256fe91 [TEST] #2 Update CSI 01 to use cim_() functions. Updates: -Cleanup import statements -Remove unnecessary blank lines -Remove unnecessary call to cim_destroy() Signed-off-by: Kaitlin Rupert diff -r 02df4284e91f -r 39f538ac0d30 suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py --- a/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Wed Jan 07 08:31:14 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystemIndication/01_created_indication.py Wed Jan 07 08:53:52 2009 -0800 @@ -21,26 +21,20 @@ # import sys -import os -import signal -import time -from pywbem.cim_obj import CIMInstanceName +from os import waitpid, kill, fork, _exit, WNOHANG +from signal import SIGKILL +from time import sleep from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib.common_util import create_using_definesystem, \ - call_request_state_change -from XenKvmLib.test_doms import destroy_and_undefine_domain from XenKvmLib.classes import get_typed_class from XenKvmLib.indication_tester import CIMIndicationSubscription from XenKvmLib.vxml import set_default -from XenKvmLib.vsms import get_vsms_class +from XenKvmLib.vxml import get_class SUPPORTED_TYPES = ['Xen', 'XenFV', 'KVM'] test_dom = "domU" -REQ_STATE = 2 -TIME = "00000000000000.000000:000" def sub_ind(ip, virt): dict = set_default(ip) @@ -70,28 +64,22 @@ return sub_list, ind_names, dict -def gen_ind(test_dom, ip, vtype, ind): +def gen_ind(test_dom, ip, vtype, ind, cxml): if ind == "define": - return create_using_definesystem(test_dom, ip, virt=vtype) - + ret = cxml.cim_define(ip) + if not ret: + return FAIL + return PASS elif ind == "start": - rc = call_request_state_change(test_dom, ip, REQ_STATE, TIME, vtype) - if rc != 0: - logger.error("Failed to start domain: %s" % test_dom) + status = cxml.cim_start(ip) + if status != PASS: + logger.error("Failed to start domain: %s", test_dom) return FAIL return PASS - elif ind == "destroy": - service = get_vsms_class(vtype)(ip) - try: - classname = get_typed_class(vtype, 'ComputerSystem') - cs_ref = CIMInstanceName(classname, keybindings = { - 'Name':test_dom, - 'CreationClassName':classname}) - service.DestroySystem(AffectedSystem=cs_ref) - except Exception, details: - logger.error('Unknow exception happened') - logger.error(details) + ret = cxml.cim_destroy(ip) + if not ret: + logger.error("Unable to destroy %s", test_dom) return FAIL return PASS @@ -121,7 +109,7 @@ def poll_for_ind(pid, ind_name): status = FAIL for i in range(0, 20): - pw = os.waitpid(pid, os.WNOHANG) + pw = waitpid(pid, WNOHANG) # If pid exits, waitpid returns [pid, return_code] # If pid is still running, waitpid returns [0, 0] @@ -134,12 +122,12 @@ elif pw[1] == 0 and i < 19: if i % 10 == 0: logger.info("In child, waiting for %s indication", ind_name) - time.sleep(1) + sleep(1) else: # Time is up and waitpid never returned the expected pid if pw[0] != pid: logger.error("Waited too long for %s indication", ind_name) - os.kill(pid, signal.SIGKILL) + kill(pid, SIGKILL) else: logger.error("Received indication error: %d" % pw[1]) @@ -151,34 +139,38 @@ @do_main(SUPPORTED_TYPES) def main(): options = main.options + ip = options.ip + virt = options.virt status = FAIL - sub_list, ind_names, dict = sub_ind(options.ip, options.virt) + sub_list, ind_names, dict = sub_ind(ip, virt) ind_list = ["define", "start", "destroy"] + cxml = get_class(virt)(test_dom) + for ind in ind_list: sub = sub_list[ind] ind_name = ind_names[ind] try: - pid = os.fork() + pid = fork() if pid == 0: status = handle_request(sub, ind_name, dict, len(ind_list)) if status != PASS: - os._exit(1) + _exit(1) - os._exit(0) + _exit(0) else: try: - status = gen_ind(test_dom, options.ip, options.virt, ind) + status = gen_ind(test_dom, ip, virt, ind, cxml) if status != PASS: - os.kill(pid, signal.SIGKILL) + kill(pid, SIGKILL) raise Exception("Unable to generate indication") status = poll_for_ind(pid, ind) except Exception, details: - os.kill(pid, signal.SIGKILL) + kill(pid, SIGKILL) raise Exception(details) except Exception, details: @@ -190,7 +182,7 @@ sub.unsubscribe(dict['default_auth']) logger.info("Cancelling subscription for %s" % ind_names[ind]) - destroy_and_undefine_domain(test_dom, options.ip, options.virt) + cxml.undefine(ip) return status From kaitlin at linux.vnet.ibm.com Wed Jan 7 17:40:14 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 09:40:14 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fixing 41_cs_to_settingdefinestate.py CS tc In-Reply-To: <484cffb372f419a67620.1231320663@elm3b197.beaverton.ibm.com> References: <484cffb372f419a67620.1231320663@elm3b197.beaverton.ibm.com> Message-ID: <4964E8FE.8020100@linux.vnet.ibm.com> > +def get_cs_sysdev_info(server, virt, qcn, rasd_val): > + sd_info={} > + try: > + cs_class = get_typed_class(virt, 'ComputerSystem') > + keys = { 'Name' : test_dom, 'CreationClassName' : cs_class } > + dom_cs = GetInstance(server, cs_class, keys) > + if dom_cs.Name != test_dom: > + raise Exception("Instance matching %s was not returned" % test_dom) > + > + an = get_typed_class(virt, 'SystemDevice') > + sd_assoc = AssociatorNames(server, an, cs_class, > + CreationClassName=cs_class, > + Name=test_dom) > + if len(sd_assoc) < 1: > + raise Exception ("%s returned %d %s objects" \ > + % (an, len(sd_assoc), qcn)) Remove space between Exception and (. > + > + status, sd_info = build_sd_info(sd_assoc, qcn, an, rasd_val) > + if status != PASS: > + raise Exception ("Failed to get SystemDevice info for: %s" \ > + % test_dom) Remove space between Exception and (. > - status = FAIL > + raise Exception("%s returned %d %s objects, Expected 1" \ > + % (an, len(assoc_info), cn)) > + > + assoc_val = assoc_info[0] > + CCName = assoc_val.classname > + exp_rasd = rasd_values[CCName] > + if assoc_val['InstanceID'] != exp_rasd.InstanceID: > + raise Exception ("Got %s instead of %s" \ > + % (assoc_val['InstanceID'], > + exp_rasd.InstanceID)) Remove space between Exception and (. > +def get_vssd_info(server, virt, in_vssdc_list, qcn): > + try: > + # Get the vssd values which will be used for verifying the > + # VSSD output from the VSSDC results. > + if virt == "XenFV": > + instIdval = "Xen:%s" % test_dom > + else: > + instIdval = "%s:%s" % (virt, test_dom) > + > + vssd_class = get_typed_class(virt, 'VirtualSystemSettingData') > + keys = { 'InstanceID' : instIdval } > + vssd_values = GetInstance(server, vssd_class, keys) > + if vssd_values.ElementName != test_dom: > + raise Exception ("Instance matching %s was not returned" % test_dom) Remove space between Exception and (. > + > + an = get_typed_class(virt, 'VirtualSystemSettingDataComponent') > + for cn, instid in sorted((in_vssdc_list.items())): > + status, vssd_assoc_info = get_associators_info(server, cn, an, > + vssd_class, > + instid) > if status != PASS: > - logger.error("Mistmatching RASD values" ) > - break > - vs_name = assoc_info[index]['InstanceID'] > - if vs_name.find(test_dom) >= 0: > - instid = assoc_info[index]['InstanceID'] > - in_vssdc[CCName] = instid > - except Exception, detail: > - print_err(CIM_ERROR_ASSOCIATORS, detail, an) > - status = FAIL > - return status, in_vssdc > + raise Exception ("Failed to get VSSD info") Remove space between Exception and (. > > + status = verify_values(vssd_assoc_info, vssd_values, an, qcn) > + if status != PASS: > + raise Exception ("VSSD values verification error") Remove space between Exception and (. > > -def verify_fields(an, field_name, vssd_cs_assoc_info, vssd_cs_values): > - if vssd_cs_assoc_info[field_name] != vssd_cs_values[field_name]: > - vssd_sds_err(an, field_name, vssd_cs_assoc_info[field_name], \ > - vssd_cs_values[field_name]) > - return FAIL > - return PASS > + except Exception, details: > + logger.error("Exception details: %s", details) > + return FAIL, vssd_assoc_info > > + return PASS, vssd_assoc_info > > -def verify_VSSD_values(assoc_info, vssd_values, an, qcn): > - # We expect that VirtualSystemSettingDataComponent returns only one > - # VirtualSystemSettingData object when queried with disk, processor, > - # network and memory rasd's and all of them return the same output. > - exp_len = 1 > +def verify_vssdc_assoc(server, virt, cs_class, vssd_assoc_info, dom_cs): > + try: > + # Since the VirtualSystemSettingDataComponent returns similar > + # output when queried with every RASD, we are taking the output of > + # the last associtaion query as inputs for > + # querying SettingsDefineState. > + cn = vssd_assoc_info[0].classname > + an = get_typed_class(virt, 'SettingsDefineState') > + instid = vssd_assoc_info[0]['InstanceID'] > + status, cs_assoc_info = get_associators_info(server, cn, an, > + cs_class, instid) > + if status != PASS: > + raise Exception ("Failed to get assoc info for dom: %s", test_dom) Remove space between Exception and (. > + status, dom_cs, sd_info = get_cs_sysdev_info(server, virt, > + qcn, rasd_val) > + if status != PASS: > + raise Exception ("Failed to get SystemDevice information") Remove space between Exception and (. > + status, sds_info = get_sds_info(server, virt, cs_class, rasd_val, > + sd_info, qcn) > + if status != PASS: > + raise Exception ("Failed to get SetingDefineState information") Remove space between Exception and (. > + status, vssd_assoc_info = get_vssd_info(server, virt, sds_info, qcn) > if status != PASS: > - break > - if status != PASS: > - vsxml.destroy(server) > - return status > + raise Exception ("Failed to get VSSD information") Remove space between Exception and (. > + status = verify_vssdc_assoc(server, virt, cs_class, > + vssd_assoc_info, dom_cs) > > - # verify the results of SettingsDefineState with the cs_values list that was > - # built using the output of the enumeration on ComputerSystem. > - status = verify_CS_values(cs_assoc_info, cs_values, an, qcn) > + except Exception, details: > + logger.error("Exception details is %s", details) > + status = FAIL > + > vsxml.destroy(server) This should be cim_destroy(). Otherwise, I think this looks much easier to read. Thanks for overhauling this test! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 7 17:53:28 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 09:53:28 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update RASD -t 04_disk_rasd_size.py to user cim_define() Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231350675 28800 # Node ID f0ebc2def018b3d34a897762e249e922ca44f71f # Parent 0e5943129dc448a12b0cb8c382afbdcc61d89a7a [TEST] Update RASD -t 04_disk_rasd_size.py to user cim_define() Also, reorganize the test slighly so that there's no need to pass cxml to a function for the define call. Signed-off-by: Kaitlin Rupert diff -r 0e5943129dc4 -r f0ebc2def018 suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py --- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Jan 07 09:51:11 2009 -0800 +++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Jan 07 09:51:15 2009 -0800 @@ -29,11 +29,9 @@ from XenKvmLib.const import do_main from CimTest.Globals import logger from VirtLib import utils -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib import vsms from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class +from XenKvmLib.vxml import get_class def make_image(ip, size): s, fn = utils.run_remote(ip, "mktemp") @@ -59,47 +57,17 @@ try: cim_size = int(rasd["VirtualQuantity"]) - except Exception, e: - logger.error("Failed to get DiskRASD size: %s" % e) + except Exception, details: + logger.error("Failed to get DiskRASD size: %s" % details) return FAIL if cim_size != size: logger.error("CIM reports %i bytes, but should be %i bytes" % (cim_size, size)) return FAIL - else: - logger.info("Verified %i bytes" % cim_size) - return PASS -def test_rasd(options, temp, test_size): - vssd = vsms.get_vssd_mof(options.virt, default_dom) - - drasd_class = vsms.get_dasd_class(options.virt) - drasd = drasd_class("hda", temp, default_dom) - - mrasd_class = vsms.get_masd_class(options.virt) - mrasd = mrasd_class(name=default_dom, megabytes=32) - - params = { - "vssd" : vssd, - "rasd" : [drasd.mof(), mrasd.mof()] - } - - create_using_definesystem(default_dom, - options.ip, - params=params, - virt=options.virt) - - cn = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') - rasds = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True) - - status = FAIL - for rasd in rasds: - if rasd["Address"] == temp: - status = check_rasd_size(rasd, test_size) - break - - return status + logger.info("Verified %i bytes" % cim_size) + return PASS @do_main(sup_types) def main(): @@ -113,14 +81,29 @@ return FAIL logger.info("Created temp disk %s of size %i bytes" % (temp, test_size)) + + cxml = get_class(options.virt)(default_dom, mem=32, + disk_file_path=temp, disk="hda") + try: + ret = cxml.cim_define(options.ip) + if not ret: + raise Exception("Failed to define the dom: %s" % default_dom) - try: - status = test_rasd(options, temp, test_size) - except Exception, e: - logger.error("Failed to test RASD: %s" % e) + cn = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') + rasds = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True) - undefine_test_domain(default_dom, options.ip, options.virt) + status = FAIL + for rasd in rasds: + if rasd["Address"] == temp: + status = check_rasd_size(rasd, test_size) + break + + except Exception, details: + logger.error("Failed to test RASD: %s" % details) + status = FAIL + kill_image(options.ip, temp) + cxml.undefine(options.ip) return status From kaitlin at linux.vnet.ibm.com Wed Jan 7 18:08:18 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 10:08:18 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update 32_start_reboot.py to use cim_() functions In-Reply-To: <49647889.8010909@linux.vnet.ibm.com> References: <49632788.1020501@linux.vnet.ibm.com> <49639B22.3090703@linux.vnet.ibm.com> <49647889.8010909@linux.vnet.ibm.com> Message-ID: <4964EF92.4080901@linux.vnet.ibm.com> > I get your point here, but still it left me confused as to why I am > getting the Error Messages. > It would be good to change the Error messages to Info messages whenever > appropriate. > We can use the timeout period to decide whether it is time to print an > error message in case the guest info is not found or the states are not > yet properly. > Any thoughts ?? > Using the timeout won't work because it is check_guest_state() that is printing the error messages, not cim_state_change(). I'm going to submit a patch that changes the log message from error to info. The test case should be responsible for printing its own error message in the case of a failure, so changing this to info messages shouldn't be too problematic. The only problem it causes is that when you run with -debug, the info messages won't print to the terminal, so you'll have to check the individual log to see why the test failed. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 7 18:10:17 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 10:10:17 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Print info messages instead of errors in check_guest_state() Message-ID: <64672f2644fb26a6788f.1231351817@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231351800 28800 # Node ID 64672f2644fb26a6788f171685269e59b9029142 # Parent f0ebc2def018b3d34a897762e249e922ca44f71f [TEST] Print info messages instead of errors in check_guest_state() Signed-off-by: Kaitlin Rupert diff -r f0ebc2def018 -r 64672f2644fb suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 07 09:51:15 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 07 10:10:00 2009 -0800 @@ -547,8 +547,7 @@ (cs.RequestedState, req_state)) except Exception, detail: - logger.error("Unable to check guest state") - logger.error("Exception: %s" % detail) + logger.info("Exception: %s" % detail) return FAIL return PASS From kaitlin at linux.vnet.ibm.com Wed Jan 7 18:15:52 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 07 Jan 2009 10:15:52 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSMS 04_definesystem_ers.py to use cim_define() Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231351832 28800 # Node ID a320568c9308dc0d42c8fe46a7aad0f3ff699260 # Parent 64672f2644fb26a6788f171685269e59b9029142 [TEST] Update VSMS 04_definesystem_ers.py to use cim_define() Add a err_rc and err_desc elements to the VirtCIM class. This will allow us to check the error code and error description in case of failed CIM method calls. Add two functions: set_sys_settings() and set_res_settings(). These allow the caller to set the VSSD and RASDs after the initial init() of the VirtCIM class. Some of the logic in cim_define() was changed to allow the passing of just a single RASD to DefineSystem() (instead of passing all the RASDs). Signed-off-by: Kaitlin Rupert diff -r 64672f2644fb -r a320568c9308 suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Wed Jan 07 10:10:00 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Wed Jan 07 10:10:32 2009 -0800 @@ -23,17 +23,14 @@ # import sys -import pywbem -from VirtLib import utils -from XenKvmLib import vsms -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem +from pywbem import CIM_ERR_FAILED from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.vxml import get_class sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] -exp_rc = 1 #CMPI_RC_ERR_FAILED +exp_rc = CIM_ERR_FAILED exp_desc = 'Unable to parse embedded object' @do_main(sup_types) @@ -41,26 +38,34 @@ options = main.options dname = 'test_domain' - vssd, rasd = vsms.default_vssd_rasd_str(dom_name=dname, virt=options.virt) - params = {'vssd' : vssd, - 'rasd' : ['wrong'] - } + cxml = get_class(options.virt)(dname) - exp_err = {'exp_rc' : exp_rc, - 'exp_desc' : exp_desc - } + rasd_list = { "MemResourceAllocationSettingData" : "wrong" } + cxml.set_res_settings(rasd_list) + ret = cxml.cim_define(options.ip) + if ret: + logger.error('DefineSystem should NOT return OK with a wrong ss input') + status = FAIL - rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', - exp_err=exp_err, virt=options.virt) + try: + if int(cxml.err_rc) != exp_rc: + raise Exception("Got rc: %d, exp %d." % (int(cxml.err_rc), exp_rc)) - if rc != PASS: - logger.error('DefineSystem should NOT return OK with a wrong ss input') + if cxml.err_desc.find(exp_desc) < 0: + raise Exception("Got desc: '%s', exp '%s'" % (cxml.err_desc, + exp_desc)) - undefine_test_domain(dname, options.ip, virt=options.virt) + status = PASS - return rc + except Exception, details: + logger.error(details) + status = FAIL + + cxml.undefine(options.ip) + + return status if __name__ == "__main__": sys.exit(main()) diff -r 64672f2644fb -r a320568c9308 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 07 10:10:00 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 07 10:10:32 2009 -0800 @@ -469,6 +469,8 @@ net_type, net_name, net_mac, vcpus, mem, mem_allocunits): self.virt = virt self.domain_name = dom_name + self.err_rc = None + self.err_desc = None self.vssd = vsms.get_vssd_mof(virt, dom_name) self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name) self.nasd = vsms.get_nasd_class(virt)(type=net_type, @@ -487,11 +489,17 @@ def cim_define(self, ip, ref_conf=None): service = vsms.get_vsms_class(self.virt)(ip) sys_settings = str(self.vssd) - if self.virt == 'LXC' and const.LXC_netns_support is False: - res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] - else: - res_settings = [str(self.dasd), str(self.nasd), - str(self.pasd), str(self.masd)] + + res_settings = [] + if self.dasd is not None: + res_settings.append(str(self.dasd)) + if self.pasd is not None: + res_settings.append(str(self.pasd)) + if self.masd is not None: + res_settings.append(str(self.masd)) + if self.nasd is not None or \ + (self.virt == 'LXC' and const.LXC_netns_support is False): + res_settings.append(str(self.nasd)) if ref_conf is None: ref_conf = ' ' @@ -502,6 +510,8 @@ ReferenceConfiguration=ref_conf) except pywbem.CIMError, (rc, desc): logger.error('Got CIM error %s with return code %s' % (desc, rc)) + self.err_rc = rc + self.err_desc = desc return False except Exception, details: @@ -519,6 +529,12 @@ target = pywbem.cim_obj.CIMInstanceName(cs_cn, keybindings = keys) try: ret = service.DestroySystem(AffectedSystem=target) + except pywbem.CIMError, (rc, desc): + logger.error('Got CIM error %s with return code %s' % (desc, rc)) + self.err_rc = rc + self.err_desc = desc + return False + except Exception, details: logger.error('Error invoking DestroySystem') logger.error('Got error %s with exception %s' \ @@ -570,6 +586,12 @@ cs.RequestStateChange(RequestedState=req_state_change, TimeoutPeriod=time_period) + except pywbem.CIMError, (rc, desc): + logger.error('Got CIM error %s with return code %s' % (desc, rc)) + self.err_rc = rc + self.err_desc = desc + return FAIL + except Exception, detail: logger.error("In fn cim_state_change()") logger.error("Failed to change state of the domain '%s'", cs.Name) @@ -615,6 +637,19 @@ return self.cim_state_change(server, const.CIM_RESET, req_time, poll_time, const.CIM_ENABLE) + def set_sys_settings(self, vssd): + self.vssd = vssd + + def set_res_settings(self, rasd_list): + for cn, rasd in rasd_list.iteritems(): + if cn.find("MemResourceAllocationSettingData") >= 0: + self.masd = rasd + elif cn.find("ProcResourceAllocationSettingData") >= 0: + self.pasd = rasd + elif cn.find("DiskResourceAllocationSettingData") >= 0: + self.dasd = rasd + elif cn.find("NetResourceAllocationSettingData") >= 0: + self.nasd = rasd class XenXML(VirtXML, VirtCIM): From deeptik at linux.vnet.ibm.com Thu Jan 8 05:38:59 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 08 Jan 2009 11:08:59 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 01_definesystem_name.py to use cim_() functions In-Reply-To: <02df4284e91f0c3def60.1231346864@localhost.localdomain> References: <02df4284e91f0c3def60.1231346864@localhost.localdomain> Message-ID: <49659173.9050301@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231345874 28800 > # Node ID 02df4284e91f0c3def604cf9e208bf5df256fe91 > # Parent c3e4470bce26b1da0e848f5be2ae411b9ea1b937 > [TEST] #2 Update VSMS 01_definesystem_name.py to use cim_() functions > > Updates: > -Added cim_destroy() to destroy the guest at the end of the test > -Reworded log message for clarity > > Signed-off-by: Kaitlin Rupert > > diff -r c3e4470bce26 -r 02df4284e91f suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 11:56:13 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Wed Jan 07 08:31:14 2009 -0800 > @@ -23,12 +23,10 @@ > # > > import sys > -import pywbem > -from VirtLib import utils > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > from XenKvmLib.const import do_main > from CimTest.Globals import logger > +from CimTest.ReturnCodes import PASS, FAIL > +from XenKvmLib.vxml import get_class > > SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC'] > default_dom = 'test_domain' > @@ -37,10 +35,19 @@ > def main(): > options = main.options > > - status = create_using_definesystem(default_dom, options.ip, > - virt=options.virt) > - undefine_test_domain(default_dom, options.ip, > - virt=options.virt) > + cxml = get_class(options.virt)(default_dom) > + > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("Unable to define %s" % default_dom) > + return FAIL > + > + status = cxml.cim_start(options.ip) > + if status != PASS: > + logger.info("Failed to start the defined domain: %s" % default_dom) > This should be logger.error() instead of logger.info message. sorry for missing this in the previous patch. > + > + cxml.cim_destroy(options.ip) > + cxml.undefine(options.ip) > > 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 Thu Jan 8 05:44:24 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 08 Jan 2009 11:14:24 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update CSI 01 to use cim_() functions In-Reply-To: <39f538ac0d3023d20257.1231349225@localhost.localdomain> References: <39f538ac0d3023d20257.1231349225@localhost.localdomain> Message-ID: <496592B8.5090906@linux.vnet.ibm.com> +1 for me. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Jan 8 06:23:46 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 08 Jan 2009 11:53:46 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update RASD -t 04_disk_rasd_size.py to user cim_define() In-Reply-To: References: Message-ID: <49659BF2.8060705@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231350675 28800 > # Node ID f0ebc2def018b3d34a897762e249e922ca44f71f > # Parent 0e5943129dc448a12b0cb8c382afbdcc61d89a7a > [TEST] Update RASD -t 04_disk_rasd_size.py to user cim_define() > > Also, reorganize the test slighly so that there's no need to pass cxml to a > function for the define call. > > Signed-off-by: Kaitlin Rupert > > diff -r 0e5943129dc4 -r f0ebc2def018 suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py > --- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Jan 07 09:51:11 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Wed Jan 07 09:51:15 2009 -0800 > @@ -29,11 +29,9 @@ > from XenKvmLib.const import do_main > from CimTest.Globals import logger > from VirtLib import utils > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > -from XenKvmLib import vsms > from XenKvmLib import enumclass > from XenKvmLib.classes import get_typed_class > +from XenKvmLib.vxml import get_class > > def make_image(ip, size): > s, fn = utils.run_remote(ip, "mktemp") > @@ -59,47 +57,17 @@ > > Can you change the message in the check_rasd_size() fn : if rasd["AllocationUnits"] != "Bytes": logger.error("AllocationUnits != Bytes?") return FAIL Looking at the error message in the log or on console will not give a clear information that we were expecting AllocationUnits to be Bytes. Can you change it to something like: logger.error("Allocationunits mismatch, returned %s , Expected %s", rasd["AllocationUnits"] ,"Bytes") or something better. > try: > cim_size = int(rasd["VirtualQuantity"]) > - except Exception, e: > - logger.error("Failed to get DiskRASD size: %s" % e) > + except Exception, details: > + logger.error("Failed to get DiskRASD size: %s" % details) > return FAIL > > if cim_size != size: > logger.error("CIM reports %i bytes, but should be %i bytes" % (cim_size, > size)) > This should be aligned as below and we can also use comman instead of %: logger.error("CIM reports disksize as %i bytes, but should be %i bytes" , cim_size, size) > return FAIL > - else: > - logger.info("Verified %i bytes" % cim_size) > - return PASS > > -def test_rasd(options, temp, test_size): > - vssd = vsms.get_vssd_mof(options.virt, default_dom) > - > - drasd_class = vsms.get_dasd_class(options.virt) > - drasd = drasd_class("hda", temp, default_dom) > - > - mrasd_class = vsms.get_masd_class(options.virt) > - mrasd = mrasd_class(name=default_dom, megabytes=32) > - > - params = { > - "vssd" : vssd, > - "rasd" : [drasd.mof(), mrasd.mof()] > - } > - > - create_using_definesystem(default_dom, > - options.ip, > - params=params, > - virt=options.virt) > - > - cn = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') > - rasds = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True) > - > - status = FAIL > - for rasd in rasds: > - if rasd["Address"] == temp: > - status = check_rasd_size(rasd, test_size) > - break > - > - return status > + logger.info("Verified %i bytes" % cim_size) > + return PASS > > @do_main(sup_types) > def main(): > @@ -113,14 +81,29 @@ > return FAIL > > logger.info("Created temp disk %s of size %i bytes" % (temp, test_size)) > + > + cxml = get_class(options.virt)(default_dom, mem=32, > + disk_file_path=temp, disk="hda") > The above line can be split as follows: virt_type = get_class(options.virt) > + try: > + ret = cxml.cim_define(options.ip) > + if not ret: > + raise Exception("Failed to define the dom: %s" % default_dom) > > - try: > - status = test_rasd(options, temp, test_size) > - except Exception, e: > - logger.error("Failed to test RASD: %s" % e) > + cn = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') > + rasds = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True) > > Instead of Enumerating the DiskRASD we can use GetInstance() on the domain. Like that we would avoid the for rasd in rasds loop. Instead we can verify the address directly if it is returned and then call the check_rasd_size() directly. Any specific reason to use EnumInstances ? > - undefine_test_domain(default_dom, options.ip, options.virt) > + status = FAIL > + for rasd in rasds: > + if rasd["Address"] == temp: > + status = check_rasd_size(rasd, test_size) > + break > + > + except Exception, details: > + logger.error("Failed to test RASD: %s" % details) > + status = FAIL > + > kill_image(options.ip, temp) > + cxml.undefine(options.ip) > > 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 Thu Jan 8 06:45:47 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 08 Jan 2009 12:15:47 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update 32_start_reboot.py to use cim_() functions In-Reply-To: <4964EF92.4080901@linux.vnet.ibm.com> References: <49632788.1020501@linux.vnet.ibm.com> <49639B22.3090703@linux.vnet.ibm.com> <49647889.8010909@linux.vnet.ibm.com> <4964EF92.4080901@linux.vnet.ibm.com> Message-ID: <4965A11B.6050602@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> I get your point here, but still it left me confused as to why I am >> getting the Error Messages. >> It would be good to change the Error messages to Info messages >> whenever appropriate. >> We can use the timeout period to decide whether it is time to print >> an error message in case the guest info is not found or the states >> are not yet properly. >> Any thoughts ?? >> > > Using the timeout won't work because it is check_guest_state() that is > printing the error messages, not cim_state_change(). I'm going to > submit a patch that changes the log message from error to info. > > What I was thinking is to supply the timeout param and maintain a static like variable( that is present in C) and use this static like variable to compare in check_guest_state(). We can achieve the static behaviour in python by declaring a global variable in the check_guest_state() function. But, I think using globals is highly discouraged ? > The test case should be responsible for printing its own error message > in the case of a failure, so changing this to info messages shouldn't > be too problematic. > > The only problem it causes is that when you run with -debug, the info > messages won't print to the terminal, so you'll have to check the > individual log to see why the test failed. I think it is better to leave this as it is for now. Since someone might forget to ON the --debug option to see the log messages. Any thoughts ?? -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Thu Jan 8 07:54:00 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 08 Jan 2009 13:24:00 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSMS 04_definesystem_ers.py to use cim_define() In-Reply-To: References: Message-ID: <4965B118.8080805@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1231351832 28800 > # Node ID a320568c9308dc0d42c8fe46a7aad0f3ff699260 > # Parent 64672f2644fb26a6788f171685269e59b9029142 > [TEST] Update VSMS 04_definesystem_ers.py to use cim_define() > > Add a err_rc and err_desc elements to the VirtCIM class. This will allow > us to check the error code and error description in case of failed CIM > method calls. > > Add two functions: set_sys_settings() and set_res_settings(). These allow the > caller to set the VSSD and RASDs after the initial init() of the VirtCIM class. > > Some of the logic in cim_define() was changed to allow the passing of just > a single RASD to DefineSystem() (instead of passing all the RASDs). > > Signed-off-by: Kaitlin Rupert > > diff -r 64672f2644fb -r a320568c9308 suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Wed Jan 07 10:10:00 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Wed Jan 07 10:10:32 2009 -0800 > @@ -23,17 +23,14 @@ > # > > import sys > -import pywbem > -from VirtLib import utils > -from XenKvmLib import vsms > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > +from pywbem import CIM_ERR_FAILED > from CimTest.Globals import logger > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > +from XenKvmLib.vxml import get_class > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > -exp_rc = 1 #CMPI_RC_ERR_FAILED > +exp_rc = CIM_ERR_FAILED > exp_desc = 'Unable to parse embedded object' > > @do_main(sup_types) > @@ -41,26 +38,34 @@ > options = main.options > > dname = 'test_domain' > - vssd, rasd = vsms.default_vssd_rasd_str(dom_name=dname, virt=options.virt) > > - params = {'vssd' : vssd, > - 'rasd' : ['wrong'] > - } > + cxml = get_class(options.virt)(dname) > > - exp_err = {'exp_rc' : exp_rc, > - 'exp_desc' : exp_desc > - } > + rasd_list = { "MemResourceAllocationSettingData" : "wrong" } > + cxml.set_res_settings(rasd_list) > > + ret = cxml.cim_define(options.ip) > + if ret: > + logger.error('DefineSystem should NOT return OK with a wrong ss input') > + status = FAIL > > - rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', > - exp_err=exp_err, virt=options.virt) > + try: > + if int(cxml.err_rc) != exp_rc: > + raise Exception("Got rc: %d, exp %d." % (int(cxml.err_rc), exp_rc)) > > - if rc != PASS: > - logger.error('DefineSystem should NOT return OK with a wrong ss input') > + if cxml.err_desc.find(exp_desc) < 0: > + raise Exception("Got desc: '%s', exp '%s'" % (cxml.err_desc, > + exp_desc)) > > How about including the above checks for err_rc and err_desc in the cim_define() like the way we have in create_using_definesystem(). This would avoid repeating this check in every test which verifies the error conditions. > - undefine_test_domain(dname, options.ip, virt=options.virt) > + status = PASS > > - return rc > + except Exception, details: > + logger.error(details) > + status = FAIL > + > + cxml.undefine(options.ip) > + > + return status > > if __name__ == "__main__": > sys.exit(main()) > diff -r 64672f2644fb -r a320568c9308 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 07 10:10:00 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 07 10:10:32 2009 -0800 > @@ -469,6 +469,8 @@ > net_type, net_name, net_mac, vcpus, mem, mem_allocunits): > self.virt = virt > self.domain_name = dom_name > + self.err_rc = None > + self.err_desc = None > self.vssd = vsms.get_vssd_mof(virt, dom_name) > self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name) > self.nasd = vsms.get_nasd_class(virt)(type=net_type, > @@ -487,11 +489,17 @@ > def cim_define(self, ip, ref_conf=None): > service = vsms.get_vsms_class(self.virt)(ip) > sys_settings = str(self.vssd) > - if self.virt == 'LXC' and const.LXC_netns_support is False: > - res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] > - else: > - res_settings = [str(self.dasd), str(self.nasd), > - str(self.pasd), str(self.masd)] > + > + res_settings = [] > + if self.dasd is not None: > + res_settings.append(str(self.dasd)) > + if self.pasd is not None: > + res_settings.append(str(self.pasd)) > + if self.masd is not None: > + res_settings.append(str(self.masd)) > + if self.nasd is not None or \ > + (self.virt == 'LXC' and const.LXC_netns_support is False): > + res_settings.append(str(self.nasd)) > > if ref_conf is None: > ref_conf = ' ' > @@ -502,6 +510,8 @@ > ReferenceConfiguration=ref_conf) > except pywbem.CIMError, (rc, desc): > logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + self.err_rc = rc > + self.err_desc = desc > return False > > except Exception, details: > @@ -519,6 +529,12 @@ > target = pywbem.cim_obj.CIMInstanceName(cs_cn, keybindings = keys) > try: > ret = service.DestroySystem(AffectedSystem=target) > + except pywbem.CIMError, (rc, desc): > + logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + self.err_rc = rc > + self.err_desc = desc > + return False > + > except Exception, details: > logger.error('Error invoking DestroySystem') > logger.error('Got error %s with exception %s' \ > @@ -570,6 +586,12 @@ > cs.RequestStateChange(RequestedState=req_state_change, > TimeoutPeriod=time_period) > > + except pywbem.CIMError, (rc, desc): > + logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + self.err_rc = rc > + self.err_desc = desc > + return FAIL > + > except Exception, detail: > logger.error("In fn cim_state_change()") > logger.error("Failed to change state of the domain '%s'", cs.Name) > @@ -615,6 +637,19 @@ > return self.cim_state_change(server, const.CIM_RESET, > req_time, poll_time, const.CIM_ENABLE) > > + def set_sys_settings(self, vssd): > + self.vssd = vssd > + > + def set_res_settings(self, rasd_list): > + for cn, rasd in rasd_list.iteritems(): > + if cn.find("MemResourceAllocationSettingData") >= 0: > + self.masd = rasd > + elif cn.find("ProcResourceAllocationSettingData") >= 0: > + self.pasd = rasd > + elif cn.find("DiskResourceAllocationSettingData") >= 0: > + self.dasd = rasd > + elif cn.find("NetResourceAllocationSettingData") >= 0: > + self.nasd = rasd > > class XenXML(VirtXML, VirtCIM): > > > _______________________________________________ > 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 Jan 8 09:32:32 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 08 Jan 2009 01:32:32 -0800 Subject: [Libvirt-cim] [PATCH] TEST] #3 Fixing 41_cs_to_settingdefinestate.py CS tc Message-ID: <4271244c8945d777e6f4.1231407152@elm3b197.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1231407135 28800 # Node ID 4271244c8945d777e6f42afd5cf98c433df05c2e # Parent 840f4651f746882475188adba781fafbf583c07b TEST] #3 Fixing 41_cs_to_settingdefinestate.py CS tc. Changes: -------- >From Patch 2 to 3: ------------------ 1) Removed space between Exception and the ( 2) changed destroy to cim_destroy >From Patch 1 to 2: ------------------ 1) Removed ununsed variables. 2) Algined to comments line to 80 columns. 3) removed check_len(), print_err() functions. 4) Made main() and get_SDS_verify_RASD_build_vssdc_input() more modular and small. Patch 1: -------- This test has been almost re-written to accomdate latest library changes. 1) cim_define and cim_start usage. 2) Use the library fn enum_rasd(). 3) Removed unnecessary import statements. 4) Algined the tc to 80 columns. Tested for KVM and Xen with current sources. Signed-off-by: Deepti B. Kalakeri diff -r 840f4651f746 -r 4271244c8945 suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py --- a/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Tue Jan 06 11:56:13 2009 -0800 +++ b/suites/libvirt-cim/cimtest/ComputerSystem/41_cs_to_settingdefinestate.py Thu Jan 08 01:32:15 2009 -0800 @@ -27,12 +27,12 @@ # SettingsDefineState. # # It traverses the following path: -# {ComputerSystem} (select the guest domain) --> [SystemDevice](from output select -# guest domain instances of Device, from the guest domain instances, -# select one Device instance) --> [SettingsDefineState] (from output, select a RASD -# instance - should only be 1) --> [VSSDComponent] (from output, select a VSSD instance -# - should only be 1) --> [SettingsDefineState] (Verify the ComputerSystem instance is -# the one we started with) +# {ComputerSystem} (select the guest domain) --> [SystemDevice](from output +# select guest domain instances of Device, from the guest domain instances, +# select one Device instance) --> [SettingsDefineState] (from output, select +# a RASD instance - should only be 1) --> [VSSDComponent] (from output, +# select a VSSD instance - should only be 1) --> [SettingsDefineState] +# (Verify the ComputerSystem instance is the one we started with) # # Steps: # ------ @@ -41,367 +41,289 @@ # and and verify the EnabledState is 2. # 3) Create info list for the guest domain to be used later for comparison. # 4) Get the various devices allocated to the domain by using the SystemDevice -# association and giving the ComputerSystem output from the previous enumeration -# as inputs to the association. -# 5) For each of the Devices get the association on SettingsDefineState, we should -# get only one record as output. +# association and giving the ComputerSystem output from the previous +# enumeration as inputs to the association. +# 5) For each of the Devices get the association on SettingsDefineState, we +# should get only one record as output. # 6) Verify the Disk, Memory, Network, Processor RASD values. # 7) Call VSSDComponent association for each of the RASD types, we should # get only one VSSD record as output. -# 8) Verify the VSSD output for every VSSDComponent association with the RASD types. -# 9) Using the VSSD output query the SettingsDefineState association, again we should -# get only one computersystem record as output. -# 10)Verify the computersystem values with the computersystem info that was created from -# the enumeration in the beginning. +# 8) Verify the VSSD output for every VSSDComponent association with the +# RASD types. +# 9) Using the VSSD output query the SettingsDefineState association, again we +# should get only one computersystem record as output. +# 10)Verify the computersystem values with the computersystem info that was +# created from the enumeration in the beginning. # 11) Destroy the domain. -# Date : 05.02.2008 +# Date : 05.02.2008 import sys from VirtLib import utils from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class -from XenKvmLib.test_doms import destroy_and_undefine_all -from XenKvmLib.assoc import Associators, AssociatorNames -from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORNAMES, \ -CIM_ERROR_ASSOCIATORS +from XenKvmLib.assoc import Associators, AssociatorNames, compare_all_prop +from CimTest.Globals import logger, CIM_ERROR_ASSOCIATORS from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL -from XenKvmLib import rasd -from XenKvmLib.rasd import verify_procrasd_values, verify_netrasd_values, \ -verify_diskrasd_values, verify_memrasd_values, rasd_init_list -from XenKvmLib.common_util import poll_for_state_change -from XenKvmLib.classes import get_typed_class +from XenKvmLib.rasd import enum_rasds +from XenKvmLib.enumclass import GetInstance +from XenKvmLib.common_util import parse_instance_id sup_types = ['Xen', 'XenFV', 'KVM'] test_dom = "CrossClass_GuestDom" -test_vcpus = 1 -test_mem = 128 -test_mac = "00:11:22:33:44:aa" -def vssd_init_list(virt): - """ - Creating the lists that will be used for comparisons. - """ - if virt == 'XenFV': - virt = 'Xen' - - vssd_values = { - 'Caption' : "Virtual System", - 'InstanceID' : '%s:%s' % (virt, test_dom), - 'ElementName' : test_dom, - 'VirtualSystemIdentifier' : test_dom, - 'VirtualSystemType' : virt, - 'Classname' : get_typed_class(virt, - "VirtualSystemSettingData") - } - - return vssd_values - -def cs_init_list(cs_dom): - """ - Creating the lists that will be used for comparisons. - """ - cs_values = { - 'Caption' : cs_dom.Caption, - 'EnabledState' : cs_dom.EnabledState, - 'RequestedState' : cs_dom.RequestedState, - 'CreationClassName' : cs_dom.CreationClassName, - 'Name' : cs_dom.Name - } - return cs_values - -def setup_env(server, virt, test_disk): +def setup_env(server, virt): vsxml_info = None - status = PASS - destroy_and_undefine_all(server) virt_xml = get_class(virt) - vsxml_info = virt_xml(test_dom, mem = test_mem, - vcpus=test_vcpus, - mac = test_mac, - disk = test_disk) + vsxml_info = virt_xml(test_dom) + ret = vsxml_info.cim_define(server) + if not ret: + logger.error("Failed to define the dom: %s", test_dom) + return FAIL, vsxml_info - ret = vsxml_info.create(server) + status = vsxml_info.cim_start(server) if not ret: - logger.error("Failed to create the dom: %s", test_dom) - status = FAIL + logger.error("Failed to start the dom: %s", test_dom) + vsxml_info.undefine(server) + return FAIL, vsxml_info - return status, vsxml_info + return PASS, vsxml_info - -def print_err(err, detail, cn): - logger.error(err % cn) - logger.error("Exception: %s", detail) - -def vssd_sds_err( an, fieldname, ret_val, exp_val): - error = "Mismatching %s Values in %s association" - details = "Returned %s instead of %s" - err = error % (fieldname, an) - detail = details % (ret_val, exp_val) - logger.error(err) - logger.error(detail) - -def get_associatornames_info(server, virt, vsxml, cn, an, qcn, name): - status = PASS - assoc_info = [] - try: - assoc_info = AssociatorNames(server, - an, - cn, - CreationClassName=cn, - Name = name) - if len(assoc_info) < 1: - logger.error("%s returned %i %s objects" % (an, len(assoc_info), qcn)) - status = FAIL - except Exception, detail: - print_err(CIM_ERROR_ASSOCIATORNAMES, detail, cn) - status = FAIL - - if status != PASS: - vsxml.destroy(server) - - return status, assoc_info - -def get_associators_info(server, virt, vsxml, cn, an, qcn, instid): +def get_associators_info(server, cn, an, qcn, instid): status = PASS assoc_info = [] try: assoc_info = Associators(server, - an, - cn, - InstanceID = instid) + an, + cn, + InstanceID = instid) if len(assoc_info) < 1: - logger.error("%s returned %i %s objects" % - (an, len(assoc_info), qcn)) + logger.error("%s returned %i %s objects", + an, len(assoc_info), qcn) status = FAIL except Exception, detail: - print_err(CIM_ERROR_ASSOCIATORS, detail, cn) + logger.error(CIM_ERROR_ASSOCIATORS, cn) + logger.error("Exception: %s", detail) status = FAIL - - if status != PASS: - vsxml.destroy(server) return status, assoc_info -def check_len(an, assoc_list_info, qcn, exp_len): - if len(assoc_list_info) != exp_len: - logger.error("%s returned %i %s objects", an, - len(assoc_list_info), qcn) - return FAIL - return PASS +def init_rasd_list(virt, ip): + rasd_insts = {} + rasds, status = enum_rasds(virt, ip) + if status != PASS: + logger.error("Enum RASDs failed") + return rasd_insts, status -def get_SDS_verify_RASD_build_vssdc_input(server, virt, vsxml, - test_disk, sd_assoc_info): - status = PASS - in_setting_define_state = {} - in_vssdc = {} - prasd = get_typed_class(virt, 'ProcResourceAllocationSettingData') - mrasd = get_typed_class(virt, 'MemResourceAllocationSettingData') - nrasd = get_typed_class(virt, 'NetResourceAllocationSettingData') - drasd = get_typed_class(virt, 'DiskResourceAllocationSettingData') + for rasd_cn, rasd_list in rasds.iteritems(): + for rasd in rasd_list: + guest, dev, status = parse_instance_id(rasd.InstanceID) + if status != PASS: + logger.error("Unable to parse InstanceID: %s" % rasd.InstanceID) + return rasd_insts, FAIL + if guest == test_dom: + rasd_insts[rasd.Classname] = rasd + + return rasd_insts, PASS + + +def verify_values(assoc_info, vssd_cs_values, an, qcn): + if len(assoc_info) != 1: + logger.error("%s returned %i %s objects, Expected 1", an, + len(assoc_info), qcn) + return FAIL + + vssd_cs_assoc = assoc_info[0] + return compare_all_prop(vssd_cs_assoc, vssd_cs_values) + +def build_sd_info(sd_assoc_info, qcn, an, rasd_values): + sd_info = {} + + # Building the input for SettingsDefineState association. + for sd_val in sd_assoc_info: + if sd_val['SystemName'] == test_dom: + classname_keyvalue = sd_val['CreationClassName'] + deviceid = sd_val['DeviceID'] + sd_info[classname_keyvalue] = deviceid + + # Expect the SystemDevice records == len(rasd_values) entries. + if len(sd_info) != len(rasd_values): + logger.error("%s returned %i %s objects, Expected %i", an, + len(sd_info), qcn, len(rasd_values)) + return FAIL, sd_info + + return PASS, sd_info + +def get_cs_sysdev_info(server, virt, qcn, rasd_val): + sd_info={} + try: + cs_class = get_typed_class(virt, 'ComputerSystem') + keys = { 'Name' : test_dom, 'CreationClassName' : cs_class } + dom_cs = GetInstance(server, cs_class, keys) + if dom_cs.Name != test_dom: + raise Exception("Instance matching %s was not returned" % test_dom) + + an = get_typed_class(virt, 'SystemDevice') + sd_assoc = AssociatorNames(server, an, cs_class, + CreationClassName=cs_class, + Name=test_dom) + if len(sd_assoc) < 1: + raise Exception("%s returned %d %s objects" \ + % (an, len(sd_assoc), qcn)) + + status, sd_info = build_sd_info(sd_assoc, qcn, an, rasd_val) + if status != PASS: + raise Exception("Failed to get SystemDevice info for: %s" \ + % test_dom) + + except Exception, details: + logger.error("Exception details: %s", details) + return FAIL, dom_cs, sd_info + + return PASS, dom_cs, sd_info + +def get_sds_info(server, virt, cs_cn, rasd_values, + in_setting_define_state, qcn): + sds_info = {} try: - # Building the input for SettingsDefineState association. - for i in range(len(sd_assoc_info)): - if sd_assoc_info[i]['SystemName'] == test_dom: - classname_keyvalue = sd_assoc_info[i]['CreationClassName'] - deviceid = sd_assoc_info[i]['DeviceID'] - in_setting_define_state[classname_keyvalue] = deviceid - - # Expect the SystemDevice to return 4 logical device records. - # one each for memory, network, disk and processor and hence 4. - # and hence expect the in_setting_define_state to contain just 4 entries. - an = get_typed_class(virt, "SystemDevice") - qcn = "Logical Devices" - exp_len = 4 - if check_len(an, in_setting_define_state, qcn, exp_len) != PASS: - return FAIL, in_setting_define_state - - # Get the rasd values that will be used to compare with the SettingsDefineState - # output. - status, rasd_values, in_list = rasd_init_list(vsxml, virt, test_disk, - test_dom, test_mac, - test_mem) - if status != PASS: - return status, rasd_values - - sccn = get_typed_class(virt,"ComputerSystem") - an = get_typed_class(virt,"SettingsDefineState") + an = get_typed_class(virt,"SettingsDefineState") for cn, devid in sorted(in_setting_define_state.items()): - assoc_info = Associators(server, - an, - cn, - DeviceID = devid, + assoc_info = Associators(server, an, cn, DeviceID = devid, CreationClassName = cn, SystemName = test_dom, - SystemCreationClassName = sccn) + SystemCreationClassName = cs_cn) - # we expect only one RASD record to be returned for each device that is used to - # query with the SettingsDefineState association. + # we expect only one RASD record to be returned for each device + # type when queried with SDS association. if len(assoc_info) != 1: - logger.error("%s returned %i %s objects" % (an, len(assoc_info), cn)) - status = FAIL - break - index = (len(assoc_info) - 1) - rasd = rasd_values[cn] - CCName = assoc_info[index].classname - if CCName == prasd: - status = verify_procrasd_values(assoc_info[index], rasd) - elif CCName == nrasd: - status = verify_netrasd_values(assoc_info[index], rasd) - elif CCName == drasd: - status = verify_diskrasd_values(assoc_info[index], rasd) - elif CCName == mrasd: - status = verify_memrasd_values(assoc_info[index], rasd) - else: - status = FAIL + raise Exception("%s returned %d %s objects, Expected 1" \ + % (an, len(assoc_info), cn)) + + assoc_val = assoc_info[0] + CCName = assoc_val.classname + exp_rasd = rasd_values[CCName] + if assoc_val['InstanceID'] != exp_rasd.InstanceID: + raise Exception("Got %s instead of %s" \ + % (assoc_val['InstanceID'], + exp_rasd.InstanceID)) + + # Build the input required for VSSDC association query. + vs_name = assoc_val['InstanceID'] + if vs_name.find(test_dom) >= 0: + instid = assoc_val['InstanceID'] + sds_info[CCName] = instid + + if len(sds_info) != len(rasd_values): + raise Exception("%s returned %i %s objects, Expected %i" \ + % (an, len(sds_info), qcn, len(rasd_values))) + + except Exception, details: + logger.error("Exception: %s", details) + return FAIL, sds_info + + return PASS, sds_info + +def get_vssd_info(server, virt, in_vssdc_list, qcn): + try: + # Get the vssd values which will be used for verifying the + # VSSD output from the VSSDC results. + if virt == "XenFV": + instIdval = "Xen:%s" % test_dom + else: + instIdval = "%s:%s" % (virt, test_dom) + + vssd_class = get_typed_class(virt, 'VirtualSystemSettingData') + keys = { 'InstanceID' : instIdval } + vssd_values = GetInstance(server, vssd_class, keys) + if vssd_values.ElementName != test_dom: + raise Exception("Instance matching %s was not returned" % test_dom) + + an = get_typed_class(virt, 'VirtualSystemSettingDataComponent') + for cn, instid in sorted((in_vssdc_list.items())): + status, vssd_assoc_info = get_associators_info(server, cn, an, + vssd_class, + instid) if status != PASS: - logger.error("Mistmatching RASD values" ) - break - vs_name = assoc_info[index]['InstanceID'] - if vs_name.find(test_dom) >= 0: - instid = assoc_info[index]['InstanceID'] - in_vssdc[CCName] = instid - except Exception, detail: - print_err(CIM_ERROR_ASSOCIATORS, detail, an) - status = FAIL - return status, in_vssdc + raise Exception("Failed to get VSSD info") + status = verify_values(vssd_assoc_info, vssd_values, an, qcn) + if status != PASS: + raise Exception("VSSD values verification error") -def verify_fields(an, field_name, vssd_cs_assoc_info, vssd_cs_values): - if vssd_cs_assoc_info[field_name] != vssd_cs_values[field_name]: - vssd_sds_err(an, field_name, vssd_cs_assoc_info[field_name], \ - vssd_cs_values[field_name]) - return FAIL - return PASS + except Exception, details: + logger.error("Exception details: %s", details) + return FAIL, vssd_assoc_info + return PASS, vssd_assoc_info -def verify_VSSD_values(assoc_info, vssd_values, an, qcn): - # We expect that VirtualSystemSettingDataComponent returns only one - # VirtualSystemSettingData object when queried with disk, processor, - # network and memory rasd's and all of them return the same output. - exp_len = 1 +def verify_vssdc_assoc(server, virt, cs_class, vssd_assoc_info, dom_cs): + try: + # Since the VirtualSystemSettingDataComponent returns similar + # output when queried with every RASD, we are taking the output of + # the last associtaion query as inputs for + # querying SettingsDefineState. + cn = vssd_assoc_info[0].classname + an = get_typed_class(virt, 'SettingsDefineState') + instid = vssd_assoc_info[0]['InstanceID'] + status, cs_assoc_info = get_associators_info(server, cn, an, + cs_class, instid) + if status != PASS: + raise Exception("Failed to get assoc info for dom: %s", test_dom) - if check_len(an, assoc_info, qcn, exp_len) != PASS: + # verify the results of SettingsDefineState with the cs_values list + # that was built using the output of the GetInstance on ComputerSystem. + status = verify_values(cs_assoc_info, dom_cs, an, cs_class) + + except Exception, details: + logger.error("Exception details: %s", details) return FAIL - vssd_assoc = assoc_info[0] - if verify_fields(an, 'Caption', vssd_assoc, vssd_values) != PASS: - return FAIL - if verify_fields(an, 'InstanceID', vssd_assoc, vssd_values) != PASS: - return FAIL - if verify_fields(an, 'ElementName', vssd_assoc, vssd_values) != PASS: - return FAIL - if verify_fields(an, 'VirtualSystemIdentifier', vssd_assoc, vssd_values) != PASS: - return FAIL - if verify_fields(an, 'VirtualSystemType', vssd_assoc, vssd_values) != PASS: - return FAIL - if vssd_assoc.classname != vssd_values['Classname']: - vssd_sds_err(an, 'Classname', vssd_assoc.classname, - vssd_values['Classname']) - return FAIL - return PASS -def verify_CS_values(assoc_info, cs_values, an, qcn): - exp_len = 1 - - if check_len(an, assoc_info, qcn, exp_len) != PASS: - return FAIL - cs_assoc = assoc_info[0] - if verify_fields(an, 'Caption', cs_assoc, cs_values) != PASS: - return FAIL - if verify_fields(an, 'EnabledState', cs_assoc, cs_values) != PASS: - return FAIL - if verify_fields(an, 'RequestedState', cs_assoc, cs_values) != PASS: - return FAIL - if verify_fields(an, 'CreationClassName', cs_assoc, cs_values) != PASS: - return FAIL - if verify_fields(an, 'Name', cs_assoc, cs_values) != PASS: - return FAIL - return PASS + return status + @do_main(sup_types) def main(): server = main.options.ip virt = main.options.virt - if virt == 'Xen': - test_disk = "xvda" - else: - test_disk = "hda" - status, vsxml = setup_env(server, virt, test_disk) - if status != PASS: - return status + try: + status, vsxml = setup_env(server, virt) + if status != PASS: + return status - status, cs_dom = poll_for_state_change(server, virt, test_dom, 2, - timeout=10) - if status != PASS and cs_dom.RequestedState != 0: - vsxml.destroy(server) - return FAIL + qcn = 'Logical Devices' + rasd_val, status = init_rasd_list(virt, server) - # Creating the cs info list which will be used later for comparison. - cs_values = cs_init_list(cs_dom) - - cn = cs_dom.CreationClassName - an = get_typed_class(virt, 'SystemDevice') - qcn = 'Logical Devices' - name = test_dom - status, sd_assoc_info = get_associatornames_info(server, virt, vsxml, - cn, an, qcn, name) - if status != PASS or len(sd_assoc_info) == 0: - return status + status, dom_cs, sd_info = get_cs_sysdev_info(server, virt, + qcn, rasd_val) + if status != PASS: + raise Exception("Failed to get SystemDevice information") - status, in_vssdc_list = get_SDS_verify_RASD_build_vssdc_input(server, virt, - vsxml, test_disk, - sd_assoc_info) - if status != PASS or len(in_vssdc_list) == 0 : - vsxml.destroy(server) - return status + cs_class = dom_cs.CreationClassName - # Verifying that the in_vssdc_list contains 4 entries one each for mem rasd, - # network rasd, processor rasd and disk rasd. - exp_len = 4 - if check_len(an, in_vssdc_list, qcn, exp_len) != PASS: - vsxml.destroy(server) - return FAIL + status, sds_info = get_sds_info(server, virt, cs_class, rasd_val, + sd_info, qcn) + if status != PASS: + raise Exception("Failed to get SetingDefineState information") - # Get the vssd values which will be used for verifying the - # VirtualSystemSettingData output from the - # VirtualSystemSettingDataComponent results. - vssd_values = vssd_init_list(virt) - an = get_typed_class(virt, 'VirtualSystemSettingDataComponent') - qcn = get_typed_class(virt, 'VirtualSystemSettingData') - for cn, instid in sorted((in_vssdc_list.items())): - status, vssd_assoc_info = get_associators_info(server, virt, vsxml, cn, - an, qcn, instid) - if status != PASS or len(vssd_assoc_info) == 0: - break - status = verify_VSSD_values(vssd_assoc_info, vssd_values, an, qcn) + status, vssd_assoc_info = get_vssd_info(server, virt, sds_info, qcn) if status != PASS: - break - if status != PASS: - vsxml.destroy(server) - return status + raise Exception("Failed to get VSSD information") - # Since the VirtualSystemSettingDataComponent returns similar - # output when queried with every RASD, we are taking the output of - # the last associtaion query as inputs for - # querying SettingsDefineState. - cn = vssd_assoc_info[0].classname - an = get_typed_class(virt, 'SettingsDefineState') - qcn = get_typed_class(virt, 'ComputerSystem') - instid = vssd_assoc_info[0]['InstanceID'] - status, cs_assoc_info = get_associators_info(server, virt, vsxml, cn, - an, qcn, instid) - if status != PASS or len(cs_assoc_info) == 0: - return status + status = verify_vssdc_assoc(server, virt, cs_class, + vssd_assoc_info, dom_cs) - # verify the results of SettingsDefineState with the cs_values list that was - # built using the output of the enumeration on ComputerSystem. - status = verify_CS_values(cs_assoc_info, cs_values, an, qcn) - vsxml.destroy(server) + except Exception, details: + logger.error("Exception details is %s", details) + status = FAIL + + vsxml.cim_destroy(server) + vsxml.undefine(server) return status if __name__ == "__main__": sys.exit(main()) From kaitlin at linux.vnet.ibm.com Thu Jan 8 18:28:31 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 08 Jan 2009 10:28:31 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 01_definesystem_name.py to use cim_() functions In-Reply-To: <49659173.9050301@linux.vnet.ibm.com> References: <02df4284e91f0c3def60.1231346864@localhost.localdomain> <49659173.9050301@linux.vnet.ibm.com> Message-ID: <496645CF.2040208@linux.vnet.ibm.com> >> + status = cxml.cim_start(options.ip) >> + if status != PASS: >> + logger.info("Failed to start the defined domain: %s" % >> default_dom) > This should be logger.error() instead of logger.info message. > sorry for missing this in the previous patch. Oops - good catch. I missed it too! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 8 19:11:50 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 08 Jan 2009 11:11:50 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Update VSMS 01_definesystem_name.py to use cim_() functions Message-ID: <38811eb854a1c52be94d.1231441910@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231441895 28800 # Node ID 38811eb854a1c52be94d7e8440c2272b94b70708 # Parent 840f4651f746882475188adba781fafbf583c07b [TEST] #3 Update VSMS 01_definesystem_name.py to use cim_() functions Updates from 2 to 3: -In case of an error, use logger.error not logger.info Updates from 1 to 2: -Added cim_destroy() to destroy the guest at the end of the test -Reworded log message for clarity Signed-off-by: Kaitlin Rupert diff -r 840f4651f746 -r 38811eb854a1 suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Tue Jan 06 11:56:13 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/01_definesystem_name.py Thu Jan 08 11:11:35 2009 -0800 @@ -23,12 +23,10 @@ # import sys -import pywbem -from VirtLib import utils -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem from XenKvmLib.const import do_main from CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC'] default_dom = 'test_domain' @@ -37,10 +35,19 @@ def main(): options = main.options - status = create_using_definesystem(default_dom, options.ip, - virt=options.virt) - undefine_test_domain(default_dom, options.ip, - virt=options.virt) + cxml = get_class(options.virt)(default_dom) + + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("Unable to define %s" % default_dom) + return FAIL + + status = cxml.cim_start(options.ip) + if status != PASS: + logger.error("Failed to start the defined domain: %s" % default_dom) + + cxml.cim_destroy(options.ip) + cxml.undefine(options.ip) return status From kaitlin at linux.vnet.ibm.com Thu Jan 8 23:02:51 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 08 Jan 2009 15:02:51 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update RASD -t 04_disk_rasd_size.py to user cim_define() Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1231455763 28800 # Node ID ea39f5d207a8fbade59995cd5041a10cb58b0aa0 # Parent 59af62c3ec5696d019e505a05032616af9b12fcd [TEST] #2 Update RASD -t 04_disk_rasd_size.py to user cim_define() Also, reorganize the test slighly so that there's no need to pass cxml to a function for the define call. Updates: -Improve error message -Fixed some formatting issues Signed-off-by: Kaitlin Rupert diff -r 59af62c3ec56 -r ea39f5d207a8 suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py --- a/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Thu Jan 08 14:36:28 2009 -0800 +++ b/suites/libvirt-cim/cimtest/RASD/04_disk_rasd_size.py Thu Jan 08 15:02:43 2009 -0800 @@ -29,11 +29,9 @@ from XenKvmLib.const import do_main from CimTest.Globals import logger from VirtLib import utils -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib import vsms from XenKvmLib import enumclass from XenKvmLib.classes import get_typed_class +from XenKvmLib.vxml import get_class def make_image(ip, size): s, fn = utils.run_remote(ip, "mktemp") @@ -54,52 +52,22 @@ def check_rasd_size(rasd, size): if rasd["AllocationUnits"] != "Bytes": - logger.error("AllocationUnits != Bytes?") + logger.error("Got %s units, exp Bytes", rasd["AllocationUnits"]) return FAIL try: cim_size = int(rasd["VirtualQuantity"]) - except Exception, e: - logger.error("Failed to get DiskRASD size: %s" % e) + except Exception, details: + logger.error("Failed to get DiskRASD size: %s" % details) return FAIL if cim_size != size: - logger.error("CIM reports %i bytes, but should be %i bytes" % (cim_size, - size)) + logger.error("CIM reports %i bytes, but should be %i bytes", cim_size, + size) return FAIL - else: - logger.info("Verified %i bytes" % cim_size) - return PASS -def test_rasd(options, temp, test_size): - vssd = vsms.get_vssd_mof(options.virt, default_dom) - - drasd_class = vsms.get_dasd_class(options.virt) - drasd = drasd_class("hda", temp, default_dom) - - mrasd_class = vsms.get_masd_class(options.virt) - mrasd = mrasd_class(name=default_dom, megabytes=32) - - params = { - "vssd" : vssd, - "rasd" : [drasd.mof(), mrasd.mof()] - } - - create_using_definesystem(default_dom, - options.ip, - params=params, - virt=options.virt) - - cn = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') - rasds = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True) - - status = FAIL - for rasd in rasds: - if rasd["Address"] == temp: - status = check_rasd_size(rasd, test_size) - break - - return status + logger.info("Verified %i bytes" % cim_size) + return PASS @do_main(sup_types) def main(): @@ -113,14 +81,30 @@ return FAIL logger.info("Created temp disk %s of size %i bytes" % (temp, test_size)) + + virtxml = get_class(options.virt) + cxml = virtxml(default_dom, mem=32, disk_file_path=temp, disk="hda") try: - status = test_rasd(options, temp, test_size) - except Exception, e: - logger.error("Failed to test RASD: %s" % e) + ret = cxml.cim_define(options.ip) + if not ret: + raise Exception("Failed to define the dom: %s" % default_dom) - undefine_test_domain(default_dom, options.ip, options.virt) + cn = get_typed_class(options.virt, 'DiskResourceAllocationSettingData') + rasds = enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True) + + status = FAIL + for rasd in rasds: + if rasd["Address"] == temp: + status = check_rasd_size(rasd, test_size) + break + + except Exception, details: + logger.error("Failed to test RASD: %s" % details) + status = FAIL + kill_image(options.ip, temp) + cxml.undefine(options.ip) return status From kaitlin at linux.vnet.ibm.com Thu Jan 8 23:00:51 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 08 Jan 2009 15:00:51 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update RASD -t 04_disk_rasd_size.py to user cim_define() In-Reply-To: <49659BF2.8060705@linux.vnet.ibm.com> References: <49659BF2.8060705@linux.vnet.ibm.com> Message-ID: <496685A3.8040703@linux.vnet.ibm.com> >> - try: >> - status = test_rasd(options, temp, test_size) >> - except Exception, e: >> - logger.error("Failed to test RASD: %s" % e) >> + cn = get_typed_class(options.virt, >> 'DiskResourceAllocationSettingData') + rasds = >> enumclass.EnumInstances(options.ip, cn, ret_cim_inst=True) >> >> > Instead of Enumerating the DiskRASD we can use GetInstance() on the domain. > Like that we would avoid the for rasd in rasds loop. > Instead we can verify the address directly if it is returned and then > call the check_rasd_size() directly. > Any specific reason to use EnumInstances ? I'd like to leave EnumInstances() here. From what I've seen, EnumerateInstances() is used by CIM clients more often than GetInstance() is. For GetInstance(), you need to have the reference object beforehand. Since we don't have one, in this case, we build one - but that's because we know how the InstanceID is formatted. From what I understand, the CIM client shouldn't need to build reference objects. It should only use the reference objects returned by the CIMOM - either by a EnumerateInstanceNames() or an AssociatorNames() call. I think it's good for the tests to have a mix of both, although my preference is to use EnumInstances() because it's less contrived. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 8 23:21:14 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 08 Jan 2009 15:21:14 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update 32_start_reboot.py to use cim_() functions In-Reply-To: <4965A11B.6050602@linux.vnet.ibm.com> References: <49632788.1020501@linux.vnet.ibm.com> <49639B22.3090703@linux.vnet.ibm.com> <49647889.8010909@linux.vnet.ibm.com> <4964EF92.4080901@linux.vnet.ibm.com> <4965A11B.6050602@linux.vnet.ibm.com> Message-ID: <49668A6A.3060305@linux.vnet.ibm.com> > What I was thinking is to supply the timeout param and maintain a static > like variable( that is present in C) and use this static like variable > to compare in check_guest_state(). > We can achieve the static behaviour in python by declaring a global > variable in the check_guest_state() function. But, I think using globals > is highly discouraged ? Yes, I think it is best to avoid global variables. It makes the code execution more confusing, and they are generally considered less safe. >> The test case should be responsible for printing its own error message >> in the case of a failure, so changing this to info messages shouldn't >> be too problematic. >> >> The only problem it causes is that when you run with -debug, the info >> messages won't print to the terminal, so you'll have to check the >> individual log to see why the test failed. > I think it is better to leave this as it is for now. Since someone might > forget to ON the --debug option to see the log messages. Using the debug option doesn't print info messages to the console. Error messages are printed, info messages are not. I'll continue to do some more brainstorming on this issue. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 8 23:26:20 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 08 Jan 2009 15:26:20 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSMS 04_definesystem_ers.py to use cim_define() In-Reply-To: <4965B118.8080805@linux.vnet.ibm.com> References: <4965B118.8080805@linux.vnet.ibm.com> Message-ID: <49668B9C.3040003@linux.vnet.ibm.com> >> - if rc != PASS: >> - logger.error('DefineSystem should NOT return OK with a wrong >> ss input') >> + if cxml.err_desc.find(exp_desc) < 0: >> + raise Exception("Got desc: '%s', exp '%s'" % >> (cxml.err_desc, + exp_desc)) >> >> > How about including the above checks for err_rc and err_desc in the > cim_define() like the way we have in create_using_definesystem(). > This would avoid repeating this check in every test which verifies the > error conditions. I purposefully didn't add this to cim_define() because I think that overloads the purpose of the cim_define() function. We don't need to very the error condition very often and it causes the cim_define() function to be more bloated than need be. I can make this a separate function if you'd like, which is honestly probably a better approach than what I have here. If you use a function, you don't have to access the elements of the VirtCIM class directly. I'll work up a new patch with a function for this. Thanks for bringing it up. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 8 23:44:18 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 08 Jan 2009 15:44:18 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 04_definesystem_ers.py to use cim_define() Message-ID: <4fe54bc4c934de944f1a.1231458258@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1231458233 28800 # Node ID 4fe54bc4c934de944f1aa4c47d4ed2ee27d2caa6 # Parent 860a4f93be18ad6d84b5ea8724be123b2980b479 [TEST] #2 Update VSMS 04_definesystem_ers.py to use cim_define() Add a err_rc and err_desc elements to the VirtCIM class. This will allow us to check the error code and error description in case of failed CIM method calls. Add two functions: set_sys_settings() and set_res_settings(). These allow the caller to set the VSSD and RASDs after the initial init() of the VirtCIM class. Some of the logic in cim_define() was changed to allow the passing of just a single RASD to DefineSystem() (instead of passing all the RASDs). Updates: -Create function to verify return code and error description if define fails Signed-off-by: Kaitlin Rupert diff -r 860a4f93be18 -r 4fe54bc4c934 suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Thu Jan 08 15:30:13 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Thu Jan 08 15:43:53 2009 -0800 @@ -23,17 +23,14 @@ # import sys -import pywbem -from VirtLib import utils -from XenKvmLib import vsms -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem +from pywbem import CIM_ERR_FAILED from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.vxml import get_class sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] -exp_rc = 1 #CMPI_RC_ERR_FAILED +exp_rc = CIM_ERR_FAILED exp_desc = 'Unable to parse embedded object' @do_main(sup_types) @@ -41,26 +38,28 @@ options = main.options dname = 'test_domain' - vssd, rasd = vsms.default_vssd_rasd_str(dom_name=dname, virt=options.virt) - params = {'vssd' : vssd, - 'rasd' : ['wrong'] - } + cxml = get_class(options.virt)(dname) - exp_err = {'exp_rc' : exp_rc, - 'exp_desc' : exp_desc - } + rasd_list = { "MemResourceAllocationSettingData" : "wrong" } + cxml.set_res_settings(rasd_list) + try: + ret = cxml.cim_define(options.ip) + if ret: + raise Exception('DefineSystem returned OK with invalid params') - rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', - exp_err=exp_err, virt=options.virt) + status = cxml.verify_error_msg(exp_rc, exp_desc) + if status != PASS: + raise Exception('DefineSystem failed for an unexpected reason') - if rc != PASS: - logger.error('DefineSystem should NOT return OK with a wrong ss input') + except Exception, details: + logger.error(details) + status = FAIL - undefine_test_domain(dname, options.ip, virt=options.virt) + cxml.undefine(options.ip) - return rc + return status if __name__ == "__main__": sys.exit(main()) diff -r 860a4f93be18 -r 4fe54bc4c934 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 08 15:30:13 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 08 15:43:53 2009 -0800 @@ -469,6 +469,8 @@ net_type, net_name, net_mac, vcpus, mem, mem_allocunits): self.virt = virt self.domain_name = dom_name + self.err_rc = None + self.err_desc = None self.vssd = vsms.get_vssd_mof(virt, dom_name) self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, dom_name) self.nasd = vsms.get_nasd_class(virt)(type=net_type, @@ -487,11 +489,17 @@ def cim_define(self, ip, ref_conf=None): service = vsms.get_vsms_class(self.virt)(ip) sys_settings = str(self.vssd) - if self.virt == 'LXC' and const.LXC_netns_support is False: - res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] - else: - res_settings = [str(self.dasd), str(self.nasd), - str(self.pasd), str(self.masd)] + + res_settings = [] + if self.dasd is not None: + res_settings.append(str(self.dasd)) + if self.pasd is not None: + res_settings.append(str(self.pasd)) + if self.masd is not None: + res_settings.append(str(self.masd)) + if self.nasd is not None or \ + (self.virt == 'LXC' and const.LXC_netns_support is False): + res_settings.append(str(self.nasd)) if ref_conf is None: ref_conf = ' ' @@ -502,6 +510,8 @@ ReferenceConfiguration=ref_conf) except pywbem.CIMError, (rc, desc): logger.error('Got CIM error %s with return code %s' % (desc, rc)) + self.err_rc = rc + self.err_desc = desc return False except Exception, details: @@ -519,6 +529,12 @@ target = pywbem.cim_obj.CIMInstanceName(cs_cn, keybindings = keys) try: ret = service.DestroySystem(AffectedSystem=target) + except pywbem.CIMError, (rc, desc): + logger.error('Got CIM error %s with return code %s' % (desc, rc)) + self.err_rc = rc + self.err_desc = desc + return False + except Exception, details: logger.error('Error invoking DestroySystem') logger.error('Got error %s with exception %s' \ @@ -570,6 +586,12 @@ cs.RequestStateChange(RequestedState=req_state_change, TimeoutPeriod=time_period) + except pywbem.CIMError, (rc, desc): + logger.error('Got CIM error %s with return code %s' % (desc, rc)) + self.err_rc = rc + self.err_desc = desc + return FAIL + except Exception, detail: logger.error("In fn cim_state_change()") logger.error("Failed to change state of the domain '%s'", cs.Name) @@ -615,6 +637,36 @@ return self.cim_state_change(server, const.CIM_RESET, req_time, poll_time, const.CIM_ENABLE) + def set_sys_settings(self, vssd): + self.vssd = vssd + + def set_res_settings(self, rasd_list): + for cn, rasd in rasd_list.iteritems(): + if cn.find("MemResourceAllocationSettingData") >= 0: + self.masd = rasd + elif cn.find("ProcResourceAllocationSettingData") >= 0: + self.pasd = rasd + elif cn.find("DiskResourceAllocationSettingData") >= 0: + self.dasd = rasd + elif cn.find("NetResourceAllocationSettingData") >= 0: + self.nasd = rasd + + def verify_error_msg(self, exp_rc, exp_desc): + try: + rc = int(self.err_rc) + + if rc != exp_rc: + raise Exception("Got rc: %d, exp %d." % (rc, exp_rc)) + + if self.err_desc.find(exp_desc) < 0: + raise Exception("Got desc: '%s', exp '%s'" % (self.err_desc, + exp_desc)) + + except Exception, details: + logger.error(details) + return FAIL + + return PASS class XenXML(VirtXML, VirtCIM): From yunguol at cn.ibm.com Fri Jan 9 02:07:02 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 9 Jan 2009 10:07:02 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: <4964DCCE.8040502@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-08 00:48:14: > >> get_typed_class(options.virt,'DiskResourceAllocationSettingData') > >> + + drasd_list = EnumInstances(options.ip, drasd, > >> ret_cim_inst=True) > >> > > Are you planning to change the EnumInstance to GetInstance() ?? Or is > > this final changes for the test case ? > > Hi Daisy, > > I haven't taken a look at this test yet because I'm not sure if you plan > to update it to replace EnumInstance() with GetInstance(). > > Are you planning on sending another patch? Hi Kaitin & Deepti, I caught a cold and out of office these two days. Sorry for my late replay. If EnumInstance() is OK to us, please apply this 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 deeptik at linux.vnet.ibm.com Fri Jan 9 08:17:13 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 09 Jan 2009 13:47:13 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Update VSMS 01_definesystem_name.py to use cim_() functions In-Reply-To: <38811eb854a1c52be94d.1231441910@localhost.localdomain> References: <38811eb854a1c52be94d.1231441910@localhost.localdomain> Message-ID: <49670809.2030203@linux.vnet.ibm.com> +1 for me. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Jan 9 08:26:44 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 09 Jan 2009 13:56:44 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update RASD -t 04_disk_rasd_size.py to user cim_define() In-Reply-To: References: Message-ID: <49670A44.4030206@linux.vnet.ibm.com> +1 for me. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Jan 9 10:31:43 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 09 Jan 2009 16:01:43 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: References: Message-ID: <4967278F.40307@linux.vnet.ibm.com> +1 for me, but see the comments inline below: yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1231210158 28800 > # Node ID b592961ccaac67ad3cfd8876beb22beec0c28492 > # Parent 64b84ef28b22d17dd22027c632a9dc44d642d2b5 > [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM > > Updates form 6 to 7: > Correct exception description > > Signed-off-by: Guolian Yun > > > + > + emu_types = [0, 1] > + try: > + for exp_emu_type in emu_types: > + cxml = get_class(options.virt)(default_dom, emu_type=exp_emu_type) > When you update the test case for Xen and other virt types, can you change the above to the following : virt_xml = get_class(options.virt) cxml = virt_xml(default_dom, emu_type=exp_emu_type) -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Jan 9 10:34:40 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 09 Jan 2009 16:04:40 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: References: Message-ID: <49672840.3020907@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-01-08 00:48:14: > > > >> get_typed_class(options.virt,'DiskResourceAllocationSettingData') > > >> + + drasd_list = EnumInstances(options.ip, drasd, > > >> ret_cim_inst=True) > > >> > > > Are you planning to change the EnumInstance to GetInstance() ?? Or is > > > this final changes for the test case ? > > > > Hi Daisy, > > > > I haven't taken a look at this test yet because I'm not sure if you > plan > > to update it to replace EnumInstance() with GetInstance(). > > > > Are you planning on sending another patch? > > Hi Kaitin & Deepti, > > I caught a cold and out of office these two days. Sorry for my late > replay. No problem. Hope you are feeling better now. I have reviewed the tc and replied to the same. > If EnumInstance() is OK to us, please apply this 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 > ------------------------------------------------------------------------ > > _______________________________________________ > 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 Fri Jan 9 21:19:19 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 09 Jan 2009 13:19:19 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: References: Message-ID: <4967BF57.6090503@linux.vnet.ibm.com> > > Hi Kaitin & Deepti, > > I caught a cold and out of office these two days. Sorry for my late > replay. > If EnumInstance() is OK to us, please apply this patch. > Thanks! Hope you're feeling better! This patch is in now, can you update it to work with Xen? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From richardm at br.ibm.com Fri Jan 9 22:00:52 2009 From: richardm at br.ibm.com (Richard Maciel) Date: Fri, 09 Jan 2009 20:00:52 -0200 Subject: [Libvirt-cim] [PATCH] This patch advertises the Allocation Capabilities Profile and the Resource Allocation Profile Message-ID: <85adb98a1f73de69432e.1231538452@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1231536014 7200 # Node ID 85adb98a1f73de69432e84faf6ef338d29fbfca7 # Parent 3557859610b4eaf8a2bdcb28d7002121e3e776b1 This patch advertises the Allocation Capabilities Profile and the Resource Allocation Profile * Added two new reg_prof instances that represent the added profiles Signed-off-by: Richard Maciel diff -r 3557859610b4 -r 85adb98a1f73 src/profiles.h --- a/src/profiles.h Wed Dec 10 12:42:02 2008 -0800 +++ b/src/profiles.h Fri Jan 09 19:20:14 2009 -0200 @@ -114,6 +114,26 @@ .scoping_profile = &SystemVirtualization }; +struct reg_prof AllocationCapabilities = { + .reg_org = 2, + .reg_id = "CIM:DSP1043-AllocationCapabilities-1.0.0a", + .reg_name = "Allocation Capabilities", + .reg_version = "1.0.0a", + .scoping_class = "ComputerSystem", + .central_class = "AllocationCapabilities", + .scoping_profile = &SystemVirtualization +}; + +struct reg_prof ResourceAllocation = { + .reg_org = 2, + .reg_id = "CIM:DSP1041-ResourceAllocation-1.1.0c", + .reg_name = "Resource Allocation", + .reg_version = "1.1.0c", + .scoping_class = "ComputerSystem", + .central_class = "ResourcePool", + .scoping_profile = &SystemVirtualization +}; + // Make sure to add pointer to your reg_prof struct here. struct reg_prof *profiles[] = { &SystemVirtualization, @@ -124,6 +144,8 @@ &MemoryResourceVirtualization, &VirtualSystemMigration, &KVMRedirection, + &AllocationCapabilities, + &ResourceAllocation, NULL }; From yunguol at cn.ibm.com Mon Jan 12 02:10:17 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 12 Jan 2009 10:10:17 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: <4967278F.40307@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-09 18:31:43: > +1 for me, but see the comments inline below: > > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1231210158 28800 > > # Node ID b592961ccaac67ad3cfd8876beb22beec0c28492 > > # Parent 64b84ef28b22d17dd22027c632a9dc44d642d2b5 > > [TEST] #7 Add new test to verify enum of DiskRASD to have > EmulatedType=0 for Disk and EmulatedType=1 for CDROM > > > > Updates form 6 to 7: > > Correct exception description > > > > Signed-off-by: Guolian Yun > > > > > > + > > + emu_types = [0, 1] > > + try: > > + for exp_emu_type in emu_types: > > + cxml = get_class(options.virt)(default_dom, > emu_type=exp_emu_type) > > > When you update the test case for Xen and other virt types, can you > change the above to the following : > virt_xml = get_class(options.virt) > > cxml = virt_xml(default_dom, emu_type=exp_emu_type) > Good catch. This sounds good to me. I will update it later. Thanks! > > -- > 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 Jan 12 02:08:12 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 12 Jan 2009 10:08:12 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #7 Add new test to verify enum of DiskRASD to have EmulatedType=0 for Disk and EmulatedType=1 for CDROM In-Reply-To: <4967BF57.6090503@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-10 05:19:19: > > > > Hi Kaitin & Deepti, > > > > I caught a cold and out of office these two days. Sorry for my late > > replay. > > If EnumInstance() is OK to us, please apply this patch. > > Thanks! > > Hope you're feeling better! This patch is in now, can you update it to > work with Xen? Thanks! Sure, It's in my plan. 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 Mon Jan 12 02:17:21 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 12 Jan 2009 10:17:21 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 12 2009): KVM on Fedora release 9.90.1 (Rawhide) with Pegasus Message-ID: ================================================= Test Run Summary (Jan 12 2009): KVM on Fedora release 9.90.1 (Rawhide) with Pegasus ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.2 Libvirt-cim revision: 795 Libvirt-cim changeset: 2ce9df98547a Cimtest revision: 591 Cimtest changeset: 5cd63239ee18 ================================================= FAIL : 0 XFAIL : 2 SKIP : 4 PASS : 135 ----------------- Total : 141 ================================================= 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 - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot') ERROR - Exception: Unable reboot dom 'cs_test_domain' InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: 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 Jan 12 02:23:20 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 11 Jan 2009 18:23:20 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix RASD/05_disk_rasd_emu_type.py to work with libvirt-cim rpm installed Message-ID: <6cb990930f0c3e82c85d.1231727000@elm3b193.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1231726993 28800 # Node ID 6cb990930f0c3e82c85d4e3437d7b9b5e0d0037a # Parent 5cd63239ee18370a87d82b8d72856fa0f297b273 [TEST] Fix RASD/05_disk_rasd_emu_type.py to work with libvirt-cim rpm installed Signed-off-by: Guolian Yun diff -r 5cd63239ee18 -r 6cb990930f0c suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py --- a/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Thu Jan 08 15:02:43 2009 -0800 +++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Sun Jan 11 18:23:13 2009 -0800 @@ -26,7 +26,7 @@ from XenKvmLib.common_util import parse_instance_id from XenKvmLib.const import do_main from XenKvmLib.vxml import get_class -from CimTest.ReturnCodes import PASS, FAIL +from CimTest.ReturnCodes import PASS, FAIL, SKIP from CimTest.Globals import logger from XenKvmLib.const import get_provider_version @@ -45,7 +45,8 @@ emu_types = [0, 1] try: for exp_emu_type in emu_types: - cxml = get_class(options.virt)(default_dom, emu_type=exp_emu_type) + virt_xml = get_class(options.virt) + cxml = virt_xml(default_dom, emu_type=exp_emu_type) ret = cxml.cim_define(options.ip) if not ret: logger.error("Failed to call DefineSystem()") From yunguol at cn.ibm.com Mon Jan 12 02:47:15 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 12 Jan 2009 10:47:15 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 12 2009): KVM on Fedora release 9 (Sulphur) with Pegasus Message-ID: ================================================= Test Run Summary (Jan 12 2009): KVM on Fedora release 9 (Sulphur) with Pegasus ================================================= Distro: Fedora release 9 (Sulphur) Kernel: 2.6.25.14-108.fc9.x86_64 libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 591 Cimtest changeset: 5cd63239ee18 ================================================= FAIL : 1 XFAIL : 3 SKIP : 10 PASS : 130 ----------------- Total : 144 ================================================= FAIL Test Summary: RASD - 05_disk_rasd_emu_type.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: ERROR - NameError : global name 'SKIP' is not defined return SKIP NameError: global name 'SKIP' is not defined RedirectionService - 01_enum_crs.py: SKIP RedirectionService - 02_enum_crscap.py: SKIP RedirectionService - 03_RedirectionSAP_errs.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: PASS -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_pause_pause.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_pause_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation Failed') ERROR - Exception: Unable reboot dom 'cs_test_domain' InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: FAIL ERROR - NameError : global name 'SKIP' is not defined Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 132, in do_try File "05_disk_rasd_emu_type.py", line 43, in main return SKIP NameError: global name 'SKIP' is not defined ERROR - None -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: SKIP -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: SKIP -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: SKIP -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00010> -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Jan 12 03:28:59 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Sun, 11 Jan 2009 19:28:59 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update RASD/05_disk_rasd_emu_type.py to support Xen Message-ID: # HG changeset patch # User Guolian Yun # Date 1231730933 28800 # Node ID b7039ca10406849aadd502d738942bd97d775b8d # Parent 5cd63239ee18370a87d82b8d72856fa0f297b273 [TEST] Update RASD/05_disk_rasd_emu_type.py to support Xen This tc fails for Xen when emu_types = 1, I'm looking into this now. Signed-off-by: Guolian Yun diff -r 5cd63239ee18 -r b7039ca10406 suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py --- a/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Thu Jan 08 15:02:43 2009 -0800 +++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Sun Jan 11 19:28:53 2009 -0800 @@ -30,7 +30,7 @@ from CimTest.Globals import logger from XenKvmLib.const import get_provider_version -SUPPORTED_TYPES = ['KVM'] +SUPPORTED_TYPES = ['KVM', 'Xen'] default_dom = 'test_domain' libvirt_em_type_changeset = 737 diff -r 5cd63239ee18 -r b7039ca10406 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 08 15:02:43 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Sun Jan 11 19:28:53 2009 -0800 @@ -631,7 +631,8 @@ disk_file_path=const.Xen_disk_path, disk=const.Xen_default_disk_dev, ntype=const.default_net_type, - net_name=const.default_network_name): + net_name=const.default_network_name, + emu_type=None): if not (os.path.exists(const.Xen_kernel_path) \ and os.path.exists(const.Xen_init_path)): logger.error('ERROR: Either the kernel image ' @@ -642,7 +643,8 @@ self._devices(disk_file_path, disk, ntype, mac, net_name) VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path, - ntype, net_name, mac, vcpus, mem, mem_allocunits) + ntype, net_name, mac, vcpus, mem, mem_allocunits, + emu_type) def _os(self, os_kernel, os_initrd): os = self.get_node('/domain/os') From deeptik at linux.vnet.ibm.com Mon Jan 12 04:27:31 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 12 Jan 2009 09:57:31 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix RASD/05_disk_rasd_emu_type.py to work with libvirt-cim rpm installed In-Reply-To: <6cb990930f0c3e82c85d.1231727000@elm3b193.beaverton.ibm.com> References: <6cb990930f0c3e82c85d.1231727000@elm3b193.beaverton.ibm.com> Message-ID: <496AC6B3.5040107@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 Jan 12 04:47:16 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 12 Jan 2009 10:17:16 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 04_definesystem_ers.py to use cim_define() In-Reply-To: <4fe54bc4c934de944f1a.1231458258@localhost.localdomain> References: <4fe54bc4c934de944f1a.1231458258@localhost.localdomain> Message-ID: <496ACB54.50601@linux.vnet.ibm.com> The tc fails with the following reason for LXC : -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: FAIL ERROR - TypeError : __init__() takes exactly 12 arguments (11 given) Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 132, in do_try File "04_definesystem_ers.py", line 42, in main cxml = get_class(options.virt)(dname) File "./lib/XenKvmLib/vxml.py", line 855, in __init__ TypeError: __init__() takes exactly 12 arguments (11 given) ERROR - None -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Jan 12 05:40:13 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 12 Jan 2009 11:10:13 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 04_definesystem_ers.py to use cim_define() In-Reply-To: <496ACB54.50601@linux.vnet.ibm.com> References: <4fe54bc4c934de944f1a.1231458258@localhost.localdomain> <496ACB54.50601@linux.vnet.ibm.com> Message-ID: <496AD7BD.90804@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > The tc fails with the following reason for LXC : > > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: FAIL > ERROR - TypeError : __init__() takes exactly 12 arguments (11 given) > Traceback (most recent call last): > File "./lib/XenKvmLib/const.py", line 132, in do_try > File "04_definesystem_ers.py", line 42, in main > cxml = get_class(options.virt)(dname) > File "./lib/XenKvmLib/vxml.py", line 855, in __init__ > TypeError: __init__() takes exactly 12 arguments (11 given) > ERROR - None > -------------------------------------------------------------------- > This is because the VirtCIM has a new compulsory param emu_type which needs to passed from LXCXML, XenXML and XenFVXML. Daisy, Since you are working on the emulated type test case, can you verify this and correct the vxml.py ?? -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Mon Jan 12 07:23:13 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 12 Jan 2009 12:53:13 +0530 Subject: [Libvirt-cim] Test Run Summary (Jan 12 2009): Xen on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) with Pegasus Message-ID: <496AEFE1.70206@linux.vnet.ibm.com> ================================================= Test Run Summary (Jan 12 2009): Xen on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) Kernel: 2.6.18-88.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 795 Libvirt-cim changeset: 2ce9df98547a Cimtest revision: 591 Cimtest changeset: 5cd63239ee18 ================================================= FAIL : 1 XFAIL : 1 SKIP : 4 PASS : 135 ----------------- Total : 141 ================================================= FAIL Test Summary: 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 RASD - 05_disk_rasd_emu_type.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 - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: 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: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: 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: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - EnabledState is 9 instead of 2. ERROR - Try to increase the timeout and run the test again ERROR - Error start domain dom_migrate ERROR - AttributeError : 'NoneType' object has no attribute 'destroy' Traceback (most recent call last): File "./lib/XenKvmLib/const.py", line 132, in do_try File "02_host_migrate_type.py", line 184, in main cxml.destroy(options.ip) AttributeError: 'NoneType' object has no attribute 'destroy' ERROR - None -------------------------------------------------------------------- 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 Mon Jan 12 09:11:38 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 12 Jan 2009 17:11:38 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 04_definesystem_ers.py to use cim_define() In-Reply-To: <496AD7BD.90804@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-12 13:40:13: > > > Deepti B Kalakeri wrote: > > The tc fails with the following reason for LXC : > > > > -------------------------------------------------------------------- > > VirtualSystemManagementService - 04_definesystem_ers.py: FAIL > > ERROR - TypeError : __init__() takes exactly 12 arguments (11 given) > > Traceback (most recent call last): > > File "./lib/XenKvmLib/const.py", line 132, in do_try > > File "04_definesystem_ers.py", line 42, in main > > cxml = get_class(options.virt)(dname) > > File "./lib/XenKvmLib/vxml.py", line 855, in __init__ > > TypeError: __init__() takes exactly 12 arguments (11 given) > > ERROR - None > > -------------------------------------------------------------------- > > > > This is because the VirtCIM has a new compulsory param emu_type which > needs to passed from LXCXML, XenXML and XenFVXML. > > Daisy, > Since you are working on the emulated type test case, can you verify > this and correct the vxml.py ?? I'm working on this, a patch will submit later. Thanks! > > -- > 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 Jan 12 09:59:13 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 12 Jan 2009 01:59:13 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update vsms.py and vxml.py to support emu_type for Xen and KVM, also pass for LXC Message-ID: <3514eb48a62cab3ed58a.1231754353@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1231754345 28800 # Node ID 3514eb48a62cab3ed58a2aee14de5f781f779c59 # Parent 5cd63239ee18370a87d82b8d72856fa0f297b273 [TEST] Update vsms.py and vxml.py to support emu_type for Xen and KVM, also pass for LXC Signed-off-by: Guolian Yun diff -r 5cd63239ee18 -r 3514eb48a62c suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Thu Jan 08 15:02:43 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jan 12 01:59:05 2009 -0800 @@ -249,13 +249,15 @@ if virt == 'KVM': disk_dev = 'hda' disk_source = const.KVM_disk_path + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) elif virt == 'XenFV': disk_dev = 'hda' disk_source = const.XenFV_disk_path + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) elif virt == 'LXC': disk_dev = const.LXC_default_mp disk_source = const.LXC_default_source - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) + d = class_dasd(disk_dev, disk_source, dom_name) class_masd = get_masd_class(virt) m = class_masd( diff -r 5cd63239ee18 -r 3514eb48a62c suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 08 15:02:43 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 12 01:59:05 2009 -0800 @@ -471,16 +471,18 @@ self.virt = virt self.domain_name = dom_name self.vssd = vsms.get_vssd_mof(virt, dom_name) - self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, - dom_name, emu_type) self.nasd = vsms.get_nasd_class(virt)(type=net_type, mac=net_mac, name=dom_name, virt_net=net_name) if virt == 'LXC': self.pasd = vsms.get_pasd_class(virt)(name=dom_name) + self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, + dom_name) else: self.pasd = vsms.get_pasd_class(virt)(vcpu=vcpus, name=dom_name) + self.dasd = vsms.get_dasd_class(virt)(disk_dev, disk_source, + dom_name, emu_type) self.masd = vsms.get_masd_class(virt)(megabytes=mem, mallocunits=mem_allocunits, name=dom_name) @@ -631,7 +633,8 @@ disk_file_path=const.Xen_disk_path, disk=const.Xen_default_disk_dev, ntype=const.default_net_type, - net_name=const.default_network_name): + net_name=const.default_network_name, + emu_type=None): if not (os.path.exists(const.Xen_kernel_path) \ and os.path.exists(const.Xen_init_path)): logger.error('ERROR: Either the kernel image ' @@ -642,7 +645,8 @@ self._devices(disk_file_path, disk, ntype, mac, net_name) VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path, - ntype, net_name, mac, vcpus, mem, mem_allocunits) + ntype, net_name, mac, vcpus, mem, mem_allocunits, + emu_type) def _os(self, os_kernel, os_initrd): os = self.get_node('/domain/os') @@ -743,13 +747,15 @@ disk_file_path=const.XenFV_disk_path, disk=const.XenFV_default_disk_dev, ntype=const.default_net_type, - net_name=const.default_network_name): + net_name=const.default_network_name, + emu_type=None): if not os.path.exists(disk_file_path): logger.error('Error: Disk image does not exist') sys.exit(1) VirtXML.__init__(self, 'xenfv', test_dom, set_uuid(), mem, vcpus) VirtCIM.__init__(self, 'XenFV', test_dom, disk, disk_file_path, - ntype, net_name, mac, vcpus, mem, mem_allocunits) + ntype, net_name, mac, vcpus, mem, mem_allocunits, + emu_type) self._features() self._os(const.XenFV_default_loader) self._devices(const.XenFV_default_emulator, @@ -800,7 +806,7 @@ VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus) VirtCIM.__init__(self, 'LXC', test_dom, const.LXC_default_mp, const.LXC_default_source, ntype, net_name, mac, vcpus, - mem, const.default_mallocunits) + mem, const.default_mallocunits, None) self._os(const.LXC_init_path) self._devices(mac, ntype, net_name, const.LXC_default_tty) self.create_lxc_file(CIM_IP, const.LXC_init_path) From deeptik at linux.vnet.ibm.com Mon Jan 12 15:04:03 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 12 Jan 2009 20:34:03 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update vsms.py and vxml.py to support emu_type for Xen and KVM, also pass for LXC In-Reply-To: <3514eb48a62cab3ed58a.1231754353@elm3b197.beaverton.ibm.com> References: <3514eb48a62cab3ed58a.1231754353@elm3b197.beaverton.ibm.com> Message-ID: <496B5BE3.5010104@linux.vnet.ibm.com> An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Jan 12 16:26:40 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Mon, 12 Jan 2009 08:26:40 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fixing the NoneType error Message-ID: <14a98d29daf0df995c04.1231777600@elm3b197.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1231777367 28800 # Node ID 14a98d29daf0df995c048d91e57bd2d556a7d190 # Parent 1a8c2307b4189b864f79b5dc6cb0bfa02383ebd8 [TEST] Fixing the NoneType error. The tc will still fail for Xen, since the libvirt is not able to move the guest to running even after considerable amount of time after migration. Signed-off-by: Deepti B. Kalakeri diff -r 1a8c2307b418 -r 14a98d29daf0 suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py --- a/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Mon Jan 12 08:21:10 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemMigrationService/02_host_migrate_type.py Mon Jan 12 08:22:47 2009 -0800 @@ -47,7 +47,6 @@ cxml.cim_define(ip) except Exception: logger.error("Error define domain %s" % guest_name) - cxml.undefine(ip) return FAIL, None classname = 'Xen_ComputerSystem' @@ -138,51 +137,56 @@ ref_list = [] cs_ref = None - status, ref_list = setup_env(options.ip, mlist, local_migrate, virt) - if status != PASS or len(ref_list) < 1: - return FAIL - cs_ref = ref_list[0] + try: + status, ref_list = setup_env(options.ip, mlist, local_migrate, virt) + if status != PASS or len(ref_list) < 1: + return FAIL - for type, item in mlist.iteritems(): - guest_name = cs_ref['Name'] + cs_ref = ref_list[0] + for type, item in mlist.iteritems(): + guest_name = cs_ref['Name'] - status, cxml = start_guest(options.ip, guest_name, type, virt) - if status != PASS: - break + status, cxml = start_guest(options.ip, guest_name, type, virt) + if status != PASS: + break - status = check_possible_host_migration(service, cs_ref, target_ip) - if status != PASS: - break + status = check_possible_host_migration(service, cs_ref, target_ip) + if status != PASS: + break - logger.info("Migrating guest with the following options:") - logger.info("%s" % item) - status, ret = migrate_guest_to_host(service, cs_ref, target_ip, item) - if status == FAIL: - logger.error("MigrateVirtualSystemToHost: unexpected list length %s" - % len(ret)) + logger.info("Migrating guest with the following options:") + logger.info("%s" % item) + status, ret = migrate_guest_to_host(service, cs_ref, target_ip, item) + if status == FAIL: + logger.error("MigrateVirtualSystemToHost: unexpected list length %s" + % len(ret)) + cxml.destroy(options.ip) + cxml.undefine(options.ip) + return status + elif len(ret) == 2: + id = ret[1]['Job'].keybindings['InstanceID'] + + status = check_migration_job(options.ip, id, target_ip, + guest_name, local_migrate, virt) + if status != PASS: + break + + #Get new ref + if local_migrate == 1: + cxml.destroy(options.ip) + cxml.undefine(options.ip) + ref_list.remove(cs_ref) + if len(ref_list) > 0: + cs_ref = ref_list[0] + + if local_migrate == 0 and cxml is not None: cxml.destroy(options.ip) cxml.undefine(options.ip) - return status - elif len(ret) == 2: - id = ret[1]['Job'].keybindings['InstanceID'] - status = check_migration_job(options.ip, id, target_ip, - guest_name, local_migrate, virt) - if status != PASS: - break - - #Get new ref - if local_migrate == 1: - cxml.destroy(options.ip) - cxml.undefine(options.ip) - ref_list.remove(cs_ref) - if len(ref_list) > 0: - cs_ref = ref_list[0] - - if local_migrate == 0: - cxml.destroy(options.ip) - cxml.undefine(options.ip) + except Exception, details: + logger.error("Exception details: %s", details) + status = FAIL return status From kaitlin at linux.vnet.ibm.com Mon Jan 12 21:54:05 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 12 Jan 2009 13:54:05 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update RASD/05_disk_rasd_emu_type.py to support Xen In-Reply-To: References: Message-ID: <496BBBFD.9080900@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1231730933 28800 > # Node ID b7039ca10406849aadd502d738942bd97d775b8d > # Parent 5cd63239ee18370a87d82b8d72856fa0f297b273 > [TEST] Update RASD/05_disk_rasd_emu_type.py to support Xen > > This tc fails for Xen when emu_types = 1, I'm looking into this now. > Xen doesn't support adding CDROM devices. Emu type = 1 isn't valid for Xen guests. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 12 22:10:06 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 12 Jan 2009 14:10:06 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update vsms.py and vxml.py to support emu_type for Xen and KVM, also pass for LXC In-Reply-To: <496B5BE3.5010104@linux.vnet.ibm.com> References: <3514eb48a62cab3ed58a.1231754353@elm3b197.beaverton.ibm.com> <496B5BE3.5010104@linux.vnet.ibm.com> Message-ID: <496BBFBE.5080102@linux.vnet.ibm.com> I didn't see Deepti's review and also forgot to test on Xen. So I've pushed this in. Daisy - can you fix these items on the current tree? Thanks! >> > We will not have any value for disk assigned for Xen since none of the > if conditional loops take care of this. > We will get the following error the end of the function when we try to > return d.mof in case Xen virt types. > > *UnboundLocalError: local variable 'd' referenced before assignment > > *You might want to do something like this to avoid passing emu_type for LXC: > if virt == 'LXC': > d = class_dasd(disk_dev, disk_source, dom_name) > else: > d = class_dasd(disk_dev, disk_source, dom_name, emu_type) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Tue Jan 13 03:10:50 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 12 Jan 2009 19:10:50 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM devices while emu_type=1 Message-ID: <816ef67322b8cbcbe358.1231816250@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1231816243 28800 # Node ID 816ef67322b8cbcbe3583d2d35c0378b182a5433 # Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4 [TEST] #2 Update RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM devices while emu_type=1 Updates from 1 to 2: Skip Emu Type = 1 for Xen guests becasue that Xen doesn't support adding CDROM devices Signed-off-by: Guolian Yun diff -r 43bf01b82ce9 -r 816ef67322b8 suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py --- a/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Mon Jan 12 08:22:47 2009 -0800 +++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Mon Jan 12 19:10:43 2009 -0800 @@ -30,7 +30,7 @@ from CimTest.Globals import logger from XenKvmLib.const import get_provider_version -SUPPORTED_TYPES = ['KVM'] +SUPPORTED_TYPES = ['KVM', 'Xen'] default_dom = 'test_domain' libvirt_em_type_changeset = 737 @@ -42,7 +42,10 @@ if curr_cim_rev < libvirt_em_type_changeset: return SKIP - emu_types = [0, 1] + if options.virt == 'Xen': + emu_types = [0] + else: + emu_types = [0, 1] try: for exp_emu_type in emu_types: virt_xml = get_class(options.virt) From yunguol at cn.ibm.com Tue Jan 13 03:07:06 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 12 Jan 2009 19:07:06 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix none value for disk assigned for Xen Message-ID: <1ac5b107e0f047c30d6a.1231816026@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1231816020 28800 # Node ID 1ac5b107e0f047c30d6a0044735b09e3fe144100 # Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4 [TEST] Fix none value for disk assigned for Xen Signed-off-by: Guolian Yun diff -r 43bf01b82ce9 -r 1ac5b107e0f0 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jan 12 08:22:47 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jan 12 19:07:00 2009 -0800 @@ -249,16 +249,18 @@ if virt == 'KVM': disk_dev = 'hda' disk_source = const.KVM_disk_path - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) elif virt == 'XenFV': disk_dev = 'hda' disk_source = const.XenFV_disk_path - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) elif virt == 'LXC': disk_dev = const.LXC_default_mp disk_source = const.LXC_default_source + + if virt == 'LXC': d = class_dasd(disk_dev, disk_source, dom_name) - + else: + # Xen's case falls in here using the default values + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) class_masd = get_masd_class(virt) m = class_masd( megabytes=mem_mb, From yunguol at cn.ibm.com Tue Jan 13 03:00:07 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 13 Jan 2009 11:00:07 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update RASD/05_disk_rasd_emu_type.py to support Xen In-Reply-To: <496BBBFD.9080900@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-13 05:54:05: > yunguol at cn.ibm.com wrote: > > # HG changeset patch > > # User Guolian Yun > > # Date 1231730933 28800 > > # Node ID b7039ca10406849aadd502d738942bd97d775b8d > > # Parent 5cd63239ee18370a87d82b8d72856fa0f297b273 > > [TEST] Update RASD/05_disk_rasd_emu_type.py to support Xen > > > > This tc fails for Xen when emu_types = 1, I'm looking into this now. > > > > Xen doesn't support adding CDROM devices. Emu type = 1 isn't valid for > Xen guests. Got it. I update this tc to support Xen and skip Emu Type = 1 for Xen guests. 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 Tue Jan 13 03:01:07 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 13 Jan 2009 11:01:07 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update vsms.py and vxml.py to support emu_type for Xen and KVM, also pass for LXC In-Reply-To: <496BBFBE.5080102@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-13 06:10:06: > I didn't see Deepti's review and also forgot to test on Xen. So I've > pushed this in. > > Daisy - can you fix these items on the current tree? Thanks! Sure. Patch is on the way. Thanks! > > >> > > We will not have any value for disk assigned for Xen since none of the > > if conditional loops take care of this. > > We will get the following error the end of the function when we try to > > return d.mof in case Xen virt types. > > > > *UnboundLocalError: local variable 'd' referenced before assignment > > > > *You might want to do something like this to avoid passing emu_type for LXC: > > if virt == 'LXC': > > d = class_dasd(disk_dev, disk_source, dom_name) > > else: > > d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > > > -- > 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 Tue Jan 13 03:13:30 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 13 Jan 2009 11:13:30 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 13 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb Message-ID: ================================================= Test Run Summary (Jan 13 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 796 Libvirt-cim changeset: 39b2711243d3 Cimtest revision: 594 Cimtest changeset: 43bf01b82ce9 ================================================= FAIL : 1 XFAIL : 8 SKIP : 32 PASS : 100 ----------------- Total : 141 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 06_paused_active_suspend.py: XFAIL ComputerSystem - 23_pause_pause.py: XFAIL ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL HostSystem - 02_hostsystem_to_rasd.py: XFAIL HostedDependency - 03_enabledstate.py: XFAIL VSSD - 04_vssd_to_rasd.py: XFAIL VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystemIndication - 01_created_indication.py: SKIP ElementAllocatedFromPool - 03_reverse_errs.py: SKIP ElementAllocatedFromPool - 04_forward_errs.py: SKIP LogicalDisk - 01_disk.py: SKIP LogicalDisk - 02_nodevs.py: SKIP LogicalDisk - 03_ld_gi_errs.py: SKIP NetworkPort - 01_netport.py: SKIP NetworkPort - 02_np_gi_errors.py: SKIP NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: SKIP Processor - 02_definesys_get_procs.py: SKIP Processor - 03_proc_gi_errs.py: SKIP RASD - 04_disk_rasd_size.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP ResourceAllocationFromPool - 05_RAPF_err.py: SKIP ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemManagementService - 08_modifyresource.py: SKIP VirtualSystemManagementService - 09_procrasd_persist.py: SKIP VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP VirtualSystemManagementService - 12_referenced_config.py: SKIP VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'DomST1' ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Exception variable: Unable pause dom 'DomST1' InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_pause_pause.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Exception: 'Unable pause dom 'cs_test_domain'' InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 27_define_pause_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot') ERROR - Exception: Unable reboot dom 'cs_test_domain' InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: SKIP -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'LXC_AllocationCapabilities' ERROR - Exception: Failed to verify instance Class not found -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned CrossClass_GuestDom/mouse:xen instead of CrossClass_GuestDom/mouse:usb Class not found Bug:<00009> -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: XFAIL ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Failed to suspend the dom: hd_domain1 InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: SKIP -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: SKIP -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: SKIP -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: SKIP -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: SKIP -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: SKIP -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: SKIP -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: SKIP -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: SKIP -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned VSSDC_dom/mouse:xen instead of VSSDC_dom/mouse:usb Bug:<00009> -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00008> -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Tue Jan 13 06:00:52 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 13 Jan 2009 11:30:52 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix none value for disk assigned for Xen In-Reply-To: <1ac5b107e0f047c30d6a.1231816026@elm3b197.beaverton.ibm.com> References: <1ac5b107e0f047c30d6a.1231816026@elm3b197.beaverton.ibm.com> Message-ID: <496C2E14.6010002@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1231816020 28800 > # Node ID 1ac5b107e0f047c30d6a0044735b09e3fe144100 > # Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4 > [TEST] Fix none value for disk assigned for Xen > > Signed-off-by: Guolian Yun > > diff -r 43bf01b82ce9 -r 1ac5b107e0f0 suites/libvirt-cim/lib/XenKvmLib/vsms.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jan 12 08:22:47 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jan 12 19:07:00 2009 -0800 > @@ -249,16 +249,18 @@ > if virt == 'KVM': > disk_dev = 'hda' > disk_source = const.KVM_disk_path > - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > elif virt == 'XenFV': > disk_dev = 'hda' > disk_source = const.XenFV_disk_path > - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > elif virt == 'LXC': > disk_dev = const.LXC_default_mp > disk_source = const.LXC_default_source > + > + if virt == 'LXC': > d = class_dasd(disk_dev, disk_source, dom_name) > - > + else: > + # Xen's case falls in here using the default values > + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > +1 , but make sure next time we align the comments with the block properly. > class_masd = get_masd_class(virt) > m = class_masd( > megabytes=mem_mb, > The above function call should be aligned as follows. m = class_masd(megabytes=mem_mb, mallocunits=malloc_units, name=dom_name) > _______________________________________________ > 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 Tue Jan 13 06:09:29 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 13 Jan 2009 11:39:29 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM devices while emu_type=1 In-Reply-To: <816ef67322b8cbcbe358.1231816250@elm3b197.beaverton.ibm.com> References: <816ef67322b8cbcbe358.1231816250@elm3b197.beaverton.ibm.com> Message-ID: <496C3019.4070700@linux.vnet.ibm.com> +1 , but there are some lines which are going beyond 80+ columns in the test case. Next time, make sure to stick to 80 columns rule in the test case. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From yunguol at cn.ibm.com Tue Jan 13 06:38:21 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Mon, 12 Jan 2009 22:38:21 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix to stick to 80 columns rule in two lines Message-ID: <0c7c27ad9c6db00d9f6d.1231828701@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1231828694 28800 # Node ID 0c7c27ad9c6db00d9f6d0ac6b8249b05093aea74 # Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4 [TEST] Fix to stick to 80 columns rule in two lines Signed-off-by: Guolian Yun diff -r 43bf01b82ce9 -r 0c7c27ad9c6d suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py --- a/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Mon Jan 12 08:22:47 2009 -0800 +++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Mon Jan 12 22:38:14 2009 -0800 @@ -52,12 +52,13 @@ logger.error("Failed to call DefineSystem()") return FAIL - drasd= get_typed_class(options.virt,'DiskResourceAllocationSettingData') + drasd= get_typed_class(options.virt, + 'DiskResourceAllocationSettingData') drasd_list = EnumInstances(options.ip, drasd, ret_cim_inst=True) if len(drasd_list) < 1: - raise Exception("%s returned %i instances, expected at least 1" \ - %(drasd, len(drasd_list))) + raise Exception("%s returned %i instances, expected at least 1"\ + %(drasd, len(drasd_list))) found_rasd = None for rasd in drasd_list: From yunguol at cn.ibm.com Tue Jan 13 06:21:43 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 13 Jan 2009 14:21:43 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM devices while emu_type=1 In-Reply-To: <496C3019.4070700@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-13 14:09:29: > +1 , but there are some lines which are going beyond 80+ columns in the > test case. > Next time, make sure to stick to 80 columns rule in the test case. > I've sent a new patch to fix this. Thanks! > -- > 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 Tue Jan 13 06:59:38 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 13 Jan 2009 12:29:38 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix to stick to 80 columns rule in two lines In-Reply-To: <0c7c27ad9c6db00d9f6d.1231828701@elm3b197.beaverton.ibm.com> References: <0c7c27ad9c6db00d9f6d.1231828701@elm3b197.beaverton.ibm.com> Message-ID: <496C3BDA.3020102@linux.vnet.ibm.com> You need to do these changes on top of "#2 Update RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM devices while emu_type=1" or else kaitlin needs to add this before she applies "#2 Update RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM devices while emu_type=1" patch to the tree. +1 for these changes. yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1231828694 28800 > # Node ID 0c7c27ad9c6db00d9f6d0ac6b8249b05093aea74 > # Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4 > [TEST] Fix to stick to 80 columns rule in two lines > > Signed-off-by: Guolian Yun > > diff -r 43bf01b82ce9 -r 0c7c27ad9c6d suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py > --- a/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Mon Jan 12 08:22:47 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/RASD/05_disk_rasd_emu_type.py Mon Jan 12 22:38:14 2009 -0800 > @@ -52,12 +52,13 @@ > logger.error("Failed to call DefineSystem()") > return FAIL > > - drasd= get_typed_class(options.virt,'DiskResourceAllocationSettingData') > + drasd= get_typed_class(options.virt, > + 'DiskResourceAllocationSettingData') > > drasd_list = EnumInstances(options.ip, drasd, ret_cim_inst=True) > if len(drasd_list) < 1: > - raise Exception("%s returned %i instances, expected at least 1" \ > - %(drasd, len(drasd_list))) > + raise Exception("%s returned %i instances, expected at least 1"\ > + %(drasd, len(drasd_list))) > > found_rasd = None > for rasd in drasd_list: > > _______________________________________________ > 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 Tue Jan 13 10:20:41 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 13 Jan 2009 15:50:41 +0530 Subject: [Libvirt-cim] Problem with KVMRedirectionSAP records for KVM. Message-ID: <496C6AF9.4010301@linux.vnet.ibm.com> Hi, I have the following domains on my machine, each of them have the graphics tags in them: virsh list --all Id Name State ---------------------------------- - graphics_domain2 shut off - testdom1 shut off Here is the xml files that I used to create the guests. The only common thing in them is the uuid. SAP1.xml : testdom1 6fa1cd59-0c71-483d-bd63-7a6a3f53d180 131072 131072 1 hvm destroy restart destroy /usr/bin/qemu SAP2.xml : graphics_domain2 6fa1cd59-0c71-483d-bd63-7a6a3f53d180 131072 131072 1 hvm destroy restart destroy /usr/bin/qemu wbemcli ein 'http://root:passwd at localhost/root/virt:KVM_KVMRedirectionSAP' -nl localhost:5988/root/virt:KVM_KVMRedirectionSAP.CreationClassName="KVM_KVMRedirectionSAP",Name="5901:-1",SystemCreationClassName="KVM_ComputerSystem",SystemName="testdom1" localhost:5988/root/virt:KVM_KVMRedirectionSAP.CreationClassName="KVM_KVMRedirectionSAP",Name="5901:-1",SystemCreationClassName="KVM_ComputerSystem",SystemName="testdom1" But the EnumerateInstance of the ComputerSystem will give the correct results: wbemcli ein 'http://root:passwd at localhost/root/virt:KVM_ComputerSystem' -nl localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="testdom1" localhost:5988/root/virt:KVM_ComputerSystem.CreationClassName="KVM_ComputerSystem",Name="graphics_domain2" This symptoms is not seen with Xen, where the xml contains the same UUID. I want to know why is this kind of difference in the behaviour and whether this is expected. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Jan 13 18:35:18 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 13 Jan 2009 10:35:18 -0800 Subject: [Libvirt-cim] Problem with KVMRedirectionSAP records for KVM. In-Reply-To: <496C6AF9.4010301@linux.vnet.ibm.com> References: <496C6AF9.4010301@linux.vnet.ibm.com> Message-ID: <496CDEE6.7070200@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > Hi, > > I have the following domains on my machine, each of them have the > graphics tags in them: > > virsh list --all > Id Name State > ---------------------------------- > - graphics_domain2 shut off > - testdom1 shut off > > > > > This symptoms is not seen with Xen, where the xml contains the same UUID. > I want to know why is this kind of difference in the behaviour and > whether this is expected. > This looks like a libvirt bug. The UUID of a guest should be unique - each guest should have a different one. If you define an XML with the UUID of another guest, the guest should be updated. In this case, a new guest is defined, which is incorrect behavior. If you modify your XMLs so that the guest name of each is the same, then you will only see one guest. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Jan 13 20:35:35 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 13 Jan 2009 12:35:35 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix none value for disk assigned for Xen In-Reply-To: <496C2E14.6010002@linux.vnet.ibm.com> References: <1ac5b107e0f047c30d6a.1231816026@elm3b197.beaverton.ibm.com> <496C2E14.6010002@linux.vnet.ibm.com> Message-ID: <496CFB17.9090209@linux.vnet.ibm.com> >> + + if virt == 'LXC': >> d = class_dasd(disk_dev, disk_source, dom_name) >> - + else: >> + # Xen's case falls in here using the default values >> + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > +1 , but make sure next time we align the comments with the block properly. >> class_masd = get_masd_class(virt) >> m = class_masd( >> megabytes=mem_mb, >> > The above function call should be aligned as follows. > m = class_masd(megabytes=mem_mb, > mallocunits=malloc_units, > name=dom_name) I agree with these comments. Daisy - can you resend the patch with these updates? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Jan 13 20:53:32 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 13 Jan 2009 12:53:32 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix to stick to 80 columns rule in two lines In-Reply-To: <496C3BDA.3020102@linux.vnet.ibm.com> References: <0c7c27ad9c6db00d9f6d.1231828701@elm3b197.beaverton.ibm.com> <496C3BDA.3020102@linux.vnet.ibm.com> Message-ID: <496CFF4C.7080304@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > You need to do these changes on top of "#2 Update > RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM > devices while emu_type=1" > or else kaitlin needs to add this before she applies "#2 Update > RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM > devices while emu_type=1" patch to the tree. > I agree. In these kinds of cases, the patch is generally resent to include the new changes instead of generating a second patch. There can be exceptions if a patch is particularly long or if it easier to read if it is broken up. However, both patches looked good to me and both are applied. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From yunguol at cn.ibm.com Wed Jan 14 02:23:45 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 14 Jan 2009 10:23:45 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix to stick to 80 columns rule in two lines In-Reply-To: <496CFF4C.7080304@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-14 04:53:32: > Deepti B Kalakeri wrote: > > You need to do these changes on top of "#2 Update > > RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM > > devices while emu_type=1" > > or else kaitlin needs to add this before she applies "#2 Update > > RASD-05_disk_rasd_emu_type.py to support Xen, skip adding CDROM > > devices while emu_type=1" patch to the tree. > > > > I agree. In these kinds of cases, the patch is generally resent to > include the new changes instead of generating a second patch. > > There can be exceptions if a patch is particularly long or if it easier > to read if it is broken up. > > However, both patches looked good to me and both are applied. > Thanks! I will merge those two patches and resent in these kinds of cases next time. > -- > 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 Jan 14 02:57:55 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Wed, 14 Jan 2009 10:57:55 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix none value for disk assigned for Xen In-Reply-To: <496CFB17.9090209@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-14 04:35:35: > >> + + if virt == 'LXC': > >> d = class_dasd(disk_dev, disk_source, dom_name) > >> - + else: > >> + # Xen's case falls in here using the default values > >> + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > > +1 , but make sure next time we align the comments with the block properly. > >> class_masd = get_masd_class(virt) > >> m = class_masd( > >> megabytes=mem_mb, > >> > > The above function call should be aligned as follows. > > m = class_masd(megabytes=mem_mb, > > mallocunits=malloc_units, > > name=dom_name) > > I agree with these comments. Daisy - can you resend the patch with > these updates? I think it's better to align them as follows: m = class_masd(megabytes=mem_mb, mallocunits=malloc_units, name=dom_name) Also, the other functions such as network and processor call have to be updated. I resend a new patch to fix them. 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 Wed Jan 14 05:22:31 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Tue, 13 Jan 2009 21:22:31 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix none value for disk assigned for Xen and align parameters in function call Message-ID: # HG changeset patch # User Guolian Yun # Date 1231902765 28800 # Node ID ff2f8adc42d8c41f1af67b0b23e05f9396132a72 # Parent 74392c40130a7aa3f6b8c4dfffa0d357b232479b [TEST] #2 Fix none value for disk assigned for Xen and align parameters in function call Signed-off-by: Guolian Yun diff -r 74392c40130a -r ff2f8adc42d8 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jan 13 13:09:25 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jan 13 19:12:45 2009 -0800 @@ -245,25 +245,31 @@ virt='Xen'): vssd = get_vssd_mof(virt, dom_name) + # Xen uses the default dev and source values for disk class_dasd = get_dasd_class(virt) if virt == 'KVM': disk_dev = 'hda' disk_source = const.KVM_disk_path - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) elif virt == 'XenFV': disk_dev = 'hda' disk_source = const.XenFV_disk_path - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) elif virt == 'LXC': disk_dev = const.LXC_default_mp disk_source = const.LXC_default_source - d = class_dasd(disk_dev, disk_source, dom_name) - + if virt == 'LXC': + d = class_dasd(disk_dev, + disk_source, + dom_name) + else: + d = class_dasd(disk_dev, + disk_source, + dom_name, + emu_type) + class_masd = get_masd_class(virt) - m = class_masd( - megabytes=mem_mb, - mallocunits=malloc_units, - name=dom_name) + m = class_masd(megabytes=mem_mb, + mallocunits=malloc_units, + name=dom_name) # LXC only takes disk and memory device for now. if virt == 'LXC': @@ -278,15 +284,13 @@ net_mac = const.XenFV_default_mac elif virt == 'LXC': net_mac = const.LXC_default_mac - n = class_nasd( - type=net_type, - mac=net_mac, - name=dom_name, - virt_net=net_name) + n = class_nasd(type=net_type, + mac=net_mac, + name=dom_name, + virt_net=net_name) class_pasd = get_pasd_class(virt) - p = class_pasd( - vcpu=proc_vcpu, - name=dom_name) + p = class_pasd(vcpu=proc_vcpu, + name=dom_name) return vssd, [d.mof(), n.mof(), p.mof(), m.mof()] From rmaciel at linux.vnet.ibm.com Wed Jan 14 12:20:52 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 14 Jan 2009 10:20:52 -0200 Subject: [Libvirt-cim] [PATCH] [TEST] Fix none value for disk assigned for Xen In-Reply-To: References: Message-ID: <496DD8A4.40205@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-01-14 04:35:35: > > > >> + + if virt == 'LXC': > > >> d = class_dasd(disk_dev, disk_source, dom_name) > > >> - + else: > > >> + # Xen's case falls in here using the default values > > >> + d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > > > +1 , but make sure next time we align the comments with the block > properly. > > >> class_masd = get_masd_class(virt) > > >> m = class_masd( > > >> megabytes=mem_mb, > > >> > > > The above function call should be aligned as follows. > > > m = class_masd(megabytes=mem_mb, > > > mallocunits=malloc_units, > > > name=dom_name) > > > > I agree with these comments. Daisy - can you resend the patch with > > these updates? > > I think it's better to align them as follows: > m = class_masd(megabytes=mem_mb, > mallocunits=malloc_units, > name=dom_name) > > Also, the other functions such as network and processor call have to > be updated. > I resend a new patch to fix them. > > 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 > ------------------------------------------------------------------------ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim I usually follow this style m = class_masd(megabytes=mem_mb, mallocunits=malloc_units, name=dom_name) (i.e. aligning the function parameters, like in C). But, to be honest, there isn't a written convention on that and I didn't find any existing case on the code, so we can follow the style. -- Richard Maciel, MSc IBM Linux Technology Center rmaciel at linux.vnet.ibm.com From danms at us.ibm.com Wed Jan 14 14:48:09 2009 From: danms at us.ibm.com (Dan Smith) Date: Wed, 14 Jan 2009 06:48:09 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix none value for disk assigned for Xen In-Reply-To: (Guo Lian Yun's message of "Wed, 14 Jan 2009 10:57:55 +0800") References: Message-ID: <87hc42djva.fsf@caffeine.danplanet.com> GY> I think it's better to align them as follows: GY> m = class_masd(megabytes=mem_mb, GY> mallocunits=malloc_units, GY> name=dom_name) You need an extra space in the subsequent lines. The first character of the parameter names should align with each other. Currently, the first character of "mallocunits" (for example) aligns with the open paren, which is not correct. -- Dan Smith IBM Linux Technology Center email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 14 15:30:03 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 14 Jan 2009 07:30:03 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix none value for disk assigned for Xen In-Reply-To: <496DD8A4.40205@linux.vnet.ibm.com> References: <496DD8A4.40205@linux.vnet.ibm.com> Message-ID: <496E04FB.7070101@linux.vnet.ibm.com> >> > >> > I agree with these comments. Daisy - can you resend the patch with >> > these updates? >> >> I think it's better to align them as follows: >> m = class_masd(megabytes=mem_mb, >> mallocunits=malloc_units, >> name=dom_name) >> Also, the other functions such as network and processor call have to >> be updated. >> I resend a new patch to fix them. >> >> Thanks! > I usually follow this style > > m = class_masd(megabytes=mem_mb, > mallocunits=malloc_units, > name=dom_name) > > (i.e. aligning the function parameters, like in C). But, to be honest, > there isn't a written convention on that and I didn't find any existing > case on the code, so we can follow the style. > See Dan's comment - the spacing is slightly off in this alignment. Daisy has the alignment fixed in the second revision of her patch. There isn't a coding style document for cimtest yet. However, I can work on putting on together since it is a good thing to have. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 14 15:35:07 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 14 Jan 2009 07:35:07 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix none value for disk assigned for Xen and align parameters in function call In-Reply-To: References: Message-ID: <496E062B.2060205@linux.vnet.ibm.com> > > + # Xen uses the default dev and source values for disk This comment is misplaced here. You have it well before the Xen case. Instead, I would place it below (and modify it slightly since you've changed the code some).. > class_dasd = get_dasd_class(virt) > if virt == 'KVM': > disk_dev = 'hda' > disk_source = const.KVM_disk_path > - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > elif virt == 'XenFV': > disk_dev = 'hda' > disk_source = const.XenFV_disk_path > - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > elif virt == 'LXC': > disk_dev = const.LXC_default_mp > disk_source = const.LXC_default_source > - d = class_dasd(disk_dev, disk_source, dom_name) > - #LXC guests do not need to set the EmulationType > + if virt == 'LXC': > + d = class_dasd(disk_dev, > + disk_source, > + dom_name) > + else: > + d = class_dasd(disk_dev, > + disk_source, > + dom_name, > + emu_type) > + Or something similar.. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From ugopalak at in.ibm.com Wed Jan 14 16:00:21 2009 From: ugopalak at in.ibm.com (U Gopalakrishnan) Date: Wed, 14 Jan 2009 21:30:21 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim Message-ID: Hello, I am trying to setup latest libvirt-cim in RHEL 5.2 with Pegasus server 2.8.0-1. I am using libvirt-cim source snapshot dated 01/13/09 obtained from ftp://libvirt.org/libvirt/CIM/ . Following the README in the source, the 'make postinstall' step fails with the following error. Processing provider modules: Virt_AllocationCapabilities Virt_ComputerSystem Virt_ComputerSystemIndication Virt_ComputerSystemMigrationIndication Virt_ConcreteComponent Virt_ConsoleRedirectionService Virt_ConsoleRedirectionServiceCapabilities Virt_Device Virt_DevicePool Virt_ElementAllocatedFromPool Virt_ElementCapabilities Virt_ElementConformsToProfile Virt_ElementSettingData Virt_EnabledLogicalElementCapabilities Virt_HostedAccessPoint Virt_HostedDependency Virt_HostedResourcePool Virt_HostedService Virt_HostSystem Virt_KVMRedirectionSAP Virt_RASD Virt_ResourceAllocationFromPool Virt_ResourcePoolConfigurationCapabilities Virt_ResourcePoolConfigurationService Virt_SAPAvailableForElement Virt_ServiceAccessBySAP Virt_ServiceAffectsElement Virt_SettingsDefineCapabilities Virt_SettingsDefineState Virt_SystemDevice Virt_VirtualSystemManagementCapabilities Virt_VirtualSystemManagementService Virt_VirtualSystemSnapshotService Virt_VirtualSystemSnapshotServiceCapabilities Virt_VSMigrationCapabilities Virt_VSMigrationService Virt_VSMigrationSettingData Virt_VSSD Virt_VSSDComponent Registering providers with active cimserver Parsing error: parse error: Could not find declaration for Qualifier named ASSOCIATION make: *** [postinstall] Error 250 Any ideas? Thanks Gopal -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Wed Jan 14 17:57:57 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 14 Jan 2009 09:57:57 -0800 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: References: Message-ID: <496E27A5.4020007@linux.vnet.ibm.com> U Gopalakrishnan wrote: > > Hello, > > I am trying to setup latest libvirt-cim in RHEL 5.2 with Pegasus server > 2.8.0-1. I am using libvirt-cim source snapshot dated 01/13/09 obtained > from ftp://libvirt.org/libvirt/CIM/ . > Following the README in the source, the 'make postinstall' step fails > with the following error. > > Registering providers with active cimserver > Parsing error: parse error: Could not find declaration for Qualifier > named ASSOCIATION > make: *** [postinstall] Error 250 > Hi Gopal, This error looks like the Pegasus repository isn't setup properly. Before running make postinstall, did you run "make preinstall"? After running make preinstall, you'll need to restart Pegasus. Not sure if you've looked at this, but there's some instructions at: http://wiki.libvirt.org/page/Libvirt-cim_setup Let us know if this doesn't resolve the issue. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From jfehlig at novell.com Wed Jan 14 19:34:43 2009 From: jfehlig at novell.com (Jim Fehlig) Date: Wed, 14 Jan 2009 13:34:43 -0600 Subject: [Libvirt-cim] [PATCH] Use previously obtained libvirt connection object Message-ID: # HG changeset patch # User Jim Fehlig # Date 1231965200 25200 # Node ID b4f1d84b87c20350fdfe0651a684a24b7e03ba28 # Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8 Use previously obtained libvirt connection object Libvirt connection object already obtained from virDomainPtr, use it. Signed-off-by: Jim Fehlig diff -r 8c56ab06aeb9 -r b4f1d84b87c2 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Wed Jan 14 08:41:52 2009 -0800 +++ b/src/Virt_ComputerSystem.c Wed Jan 14 13:33:20 2009 -0700 @@ -800,13 +800,13 @@ static CMPIStatus domain_reset(virDomain if (ret != 0) { virt_set_status(_BROKER, &s, CMPI_RC_ERR_FAILED, - virDomainGetConnect(dom), + conn, "Unable to destroy domain"); goto out; } - dom = virDomainLookupByName(virDomainGetConnect(dom), - virDomainGetName(dom)); + dom = virDomainLookupByName(conn, + virDomainGetName(dom)); if (dom == NULL) { dom = virDomainDefineXML(conn, xml); @@ -814,7 +814,7 @@ static CMPIStatus domain_reset(virDomain CU_DEBUG("Failed to define domain from XML"); virt_set_status(_BROKER, &s, CMPI_RC_ERR_FAILED, - virDomainGetConnect(dom), + conn, "Unable to define domain"); goto out; } @@ -827,7 +827,7 @@ static CMPIStatus domain_reset(virDomain if (ret != 0) virt_set_status(_BROKER, &s, CMPI_RC_ERR_FAILED, - virDomainGetConnect(dom), + conn, "Failed to start domain"); out: From jfehlig at novell.com Wed Jan 14 19:44:00 2009 From: jfehlig at novell.com (Jim Fehlig) Date: Wed, 14 Jan 2009 13:44:00 -0600 Subject: [Libvirt-cim] [PATCH] Improve error messages for resource manipulation and migration Message-ID: <611757263eddd2bb9738.1231965840@jfehlig3.provo.novell.com> # HG changeset patch # User Jim Fehlig # Date 1231965788 25200 # Node ID 611757263eddd2bb97383d250ee636300a91a9e6 # Parent b4f1d84b87c20350fdfe0651a684a24b7e03ba28 Improve error messages for resource manipulation and migration This patch extends on c/s 768, adding use of virt_set_status() in resource manipulation extrinsics in Virt_VirtualSystemManagementService and migration extrinsic in Virt_VSMigrationService. Signed-off-by: Jim Fehlig diff -r b4f1d84b87c2 -r 611757263edd src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Wed Jan 14 13:33:20 2009 -0700 +++ b/src/Virt_VSMigrationService.c Wed Jan 14 13:43:08 2009 -0700 @@ -939,9 +939,10 @@ static CMPIStatus handle_migrate(virConn ddom = virDomainMigrate(dom, dconn, type, NULL, NULL, 0); if (ddom == NULL) { CU_DEBUG("Migration failed"); - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Migration Failed"); + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + virDomainGetConnect(dom), + "Migration Failed"); } out: virDomainFree(ddom); diff -r b4f1d84b87c2 -r 611757263edd src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Jan 14 13:33:20 2009 -0700 +++ b/src/Virt_VirtualSystemManagementService.c Wed Jan 14 13:43:08 2009 -0700 @@ -1479,9 +1479,10 @@ static CMPIStatus _resource_dynamic(stru CU_DEBUG("Doing dynamic device update for `%s'", dominfo->name); if (func(dom, dev) == 0) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Unable to change (%i) device", action); + virt_set_status(_BROKER, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to change (%i) device", action); } else { cu_statusf(_BROKER, &s, CMPI_RC_OK, From yunguol at cn.ibm.com Thu Jan 15 05:29:54 2009 From: yunguol at cn.ibm.com (yunguol at cn.ibm.com) Date: Wed, 14 Jan 2009 21:29:54 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix none value for disk assigned for Xen and align parameters in function call Message-ID: <32645e444b323b137d0c.1231997394@elm3b197.beaverton.ibm.com> # HG changeset patch # User Guolian Yun # Date 1231997388 28800 # Node ID 32645e444b323b137d0c0a2a323be574b370d75a # Parent 74392c40130a7aa3f6b8c4dfffa0d357b232479b [TEST] #3 Fix none value for disk assigned for Xen and align parameters in function call Updates from 2 to 3: Change comments place Signed-off-by: Guolian Yun diff -r 74392c40130a -r 32645e444b32 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jan 13 13:09:25 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Jan 14 21:29:48 2009 -0800 @@ -249,21 +249,28 @@ if virt == 'KVM': disk_dev = 'hda' disk_source = const.KVM_disk_path - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) elif virt == 'XenFV': disk_dev = 'hda' disk_source = const.XenFV_disk_path - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) elif virt == 'LXC': disk_dev = const.LXC_default_mp disk_source = const.LXC_default_source - d = class_dasd(disk_dev, disk_source, dom_name) - + + #LXC guests do not need to set the EmulationType + if virt == 'LXC': + d = class_dasd(disk_dev, + disk_source, + dom_name) + else: + d = class_dasd(disk_dev, + disk_source, + dom_name, + emu_type) + class_masd = get_masd_class(virt) - m = class_masd( - megabytes=mem_mb, - mallocunits=malloc_units, - name=dom_name) + m = class_masd(megabytes=mem_mb, + mallocunits=malloc_units, + name=dom_name) # LXC only takes disk and memory device for now. if virt == 'LXC': @@ -278,15 +285,13 @@ net_mac = const.XenFV_default_mac elif virt == 'LXC': net_mac = const.LXC_default_mac - n = class_nasd( - type=net_type, - mac=net_mac, - name=dom_name, - virt_net=net_name) + n = class_nasd(type=net_type, + mac=net_mac, + name=dom_name, + virt_net=net_name) class_pasd = get_pasd_class(virt) - p = class_pasd( - vcpu=proc_vcpu, - name=dom_name) + p = class_pasd(vcpu=proc_vcpu, + name=dom_name) return vssd, [d.mof(), n.mof(), p.mof(), m.mof()] From deeptik at linux.vnet.ibm.com Thu Jan 15 05:43:20 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 15 Jan 2009 11:13:20 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix none value for disk assigned for Xen and align parameters in function call In-Reply-To: <32645e444b323b137d0c.1231997394@elm3b197.beaverton.ibm.com> References: <32645e444b323b137d0c.1231997394@elm3b197.beaverton.ibm.com> Message-ID: <496ECCF8.9010107@linux.vnet.ibm.com> yunguol at cn.ibm.com wrote: > # HG changeset patch > # User Guolian Yun > # Date 1231997388 28800 > # Node ID 32645e444b323b137d0c0a2a323be574b370d75a > # Parent 74392c40130a7aa3f6b8c4dfffa0d357b232479b > [TEST] #3 Fix none value for disk assigned for Xen and align parameters in function call > > Updates from 2 to 3: > Change comments place > > Signed-off-by: Guolian Yun > > diff -r 74392c40130a -r 32645e444b32 suites/libvirt-cim/lib/XenKvmLib/vsms.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jan 13 13:09:25 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Jan 14 21:29:48 2009 -0800 > @@ -249,21 +249,28 @@ > if virt == 'KVM': > disk_dev = 'hda' > disk_source = const.KVM_disk_path > - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > elif virt == 'XenFV': > disk_dev = 'hda' > disk_source = const.XenFV_disk_path > - d = class_dasd(disk_dev, disk_source, dom_name, emu_type) > elif virt == 'LXC': > disk_dev = const.LXC_default_mp > disk_source = const.LXC_default_source > - d = class_dasd(disk_dev, disk_source, dom_name) > - > + > + #LXC guests do not need to set the EmulationType > + if virt == 'LXC': > + d = class_dasd(disk_dev, > + disk_source, > + dom_name) > If we are able to fit a function call within 80 columns we don't need to write each arguments in separate lines. > + else: > + d = class_dasd(disk_dev, > + disk_source, > + dom_name, > + emu_type) > + > class_masd = get_masd_class(virt) > - m = class_masd( > - megabytes=mem_mb, > - mallocunits=malloc_units, > - name=dom_name) > + m = class_masd(megabytes=mem_mb, > + mallocunits=malloc_units, > + name=dom_name) > > # LXC only takes disk and memory device for now. > if virt == 'LXC': > @@ -278,15 +285,13 @@ > net_mac = const.XenFV_default_mac > elif virt == 'LXC': > net_mac = const.LXC_default_mac > Since you comment above saying that LXC does not support network yet, it would be good to remove elif virt == 'LXC': net_mac = const.LXC_default_mac part as of now and add it when it is needed. I leave it upto you. Otherwise +1 for me. > - n = class_nasd( > - type=net_type, > - mac=net_mac, > - name=dom_name, > - virt_net=net_name) > + n = class_nasd(type=net_type, > + mac=net_mac, > + name=dom_name, > + virt_net=net_name) > class_pasd = get_pasd_class(virt) > - p = class_pasd( > - vcpu=proc_vcpu, > - name=dom_name) > + p = class_pasd(vcpu=proc_vcpu, > + name=dom_name) > > return vssd, [d.mof(), n.mof(), p.mof(), m.mof()] > > > _______________________________________________ > 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 ugopalak at in.ibm.com Thu Jan 15 09:25:46 2009 From: ugopalak at in.ibm.com (U Gopalakrishnan) Date: Thu, 15 Jan 2009 14:55:46 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: <496E27A5.4020007@linux.vnet.ibm.com> Message-ID: Hi Kaitlin, I followed the instructions in the wiki, postinstall step is now completing without a make error. But I see few error messages in the output. I think most of them are harmless and is because the postinstall step is run multiple times. But one particular error message given below is worrying me. Parsing error: parse error: Error adding class Xen_HostedResourcePool to the repository: CIM_ERR_INVALID_SUPERCLASS: CIM_HostedResourcePool The complete output from the 'make postinstall' command is attached. Please advise on whether these error messages needs to be looked into or could be safely ignored. Also, the README contained in the source tar.gz files found at ftp://libvirt.org/libvirt/CIM/ seems to be outdated, e.g. it didn't mention about the make preinstall step. May be README could just give a link to the wiki page which seems to be current. Thanks Gopal Kaitlin Rupert Sent by: libvirt-cim-bounces at redhat.com 01/14/2009 23:27 Please respond to List for discussion and development of libvirt CIM To List for discussion and development of libvirt CIM cc Subject Re: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim U Gopalakrishnan wrote: > > Hello, > > I am trying to setup latest libvirt-cim in RHEL 5.2 with Pegasus server > 2.8.0-1. I am using libvirt-cim source snapshot dated 01/13/09 obtained > from ftp://libvirt.org/libvirt/CIM/ . > Following the README in the source, the 'make postinstall' step fails > with the following error. > > Registering providers with active cimserver > Parsing error: parse error: Could not find declaration for Qualifier > named ASSOCIATION > make: *** [postinstall] Error 250 > Hi Gopal, This error looks like the Pegasus repository isn't setup properly. Before running make postinstall, did you run "make preinstall"? After running make preinstall, you'll need to restart Pegasus. Not sure if you've looked at this, but there's some instructions at: http://wiki.libvirt.org/page/Libvirt-cim_setup Let us know if this doesn't resolve the issue. -- 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: postinstall.out Type: application/octet-stream Size: 34479 bytes Desc: not available URL: From deeptik at linux.vnet.ibm.com Thu Jan 15 11:39:03 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Thu, 15 Jan 2009 03:39:03 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to verify KVMRedirectionSAP Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1232018404 28800 # Node ID cc74023eeaf78970482e0a7a0c4c37a7ff997530 # Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4 [TEST] Adding new tc to verify KVMRedirectionSAP. Tested with KVM/Xen on current sources and KVM with F9 rpm. Signed-off-by: Deepti B. Kalakeri diff -r 43bf01b82ce9 -r cc74023eeaf7 suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Thu Jan 15 03:20:04 2009 -0800 @@ -0,0 +1,166 @@ +#!/usr/bin/python +# +# Copyright 2008 IBM Corp. +# +# Authors: +# Deepti B. Kalakeri +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# This test case is used to verify the KVMRedirectionSAP properties in detail. +# This test case verifies the following: +# +# When the domain is defined: +# KVMRedirectionSAP.Enabled = 3 and +# KVMRedirectionSAP.[ElementName, Name] = -1:-1 +# +# When the defined domain is started: +# KVMRedirectionSAP.Enabled = 6 and +# KVMRedirectionSAP.[ElementName, Name] = port used in the xml:0 +# +# Date : 15-01-2009 +# + +import sys +from XenKvmLib.vxml import get_class +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.enumclass import EnumInstances +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.const import KVMRedSAP_proto, CIM_SAP_AVAILABLE_STATE, \ + CIM_SAP_INACTIVE_STATE + +sup_types = ['Xen', 'KVM'] +libvirtcim_redSAP_changes = 716 +test_dom = 'test_redsap_dom' + +def enum_redsap(server, virt, classname): + redsap_insts = { } + status = FAIL + + try: + redsap_list = EnumInstances(server, classname) + for redsap in redsap_list: + guest = redsap.SystemName + if guest == test_dom: + if redsap.Classname not in redsap_insts.keys(): + redsap_insts[redsap.Classname] = redsap + status = PASS + else: + raise Exception("Got more than one record for: %s" \ + % test_dom) + except Exception, details: + logger.error(CIM_ERROR_ENUMERATE, classname) + logger.error("Exception details: %s", details) + return status, redsap_insts + + +def verify_redsap_values(val_list, redsap_inst, classname): + try: + for key in val_list.keys(): + redsap = redsap_inst[classname] + ret_val = eval('redsap.' + key) + if ret_val != val_list[key]: + raise Exception("'%s' Value Mismatch, Expected %s, Got %s" \ + % (key, val_list[key], ret_val)) + except Exception, details: + logger.error("Exception details: %s", details) + return FAIL + + return PASS + + at do_main(sup_types) +def main(): + virt = main.options.virt + server = main.options.ip + + cname = 'KVMRedirectionSAP' + classname = get_typed_class(virt, cname) + + # This check is required for libivirt-cim providers which do not have + # REDSAP changes in it and the REDSAP provider is available with + # revision >= 716. + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev < libvirtcim_redSAP_changes: + logger.info("'%s' provider not supported, hence skipping the tc ....", + classname) + return SKIP + + vsxml = None + action_start = False + + try: + virt_xml = get_class(virt) + vsxml = virt_xml(test_dom) + ret = vsxml.cim_define(server) + if not ret: + raise Exception("Failed to define the dom: %s" % test_dom) + + status, redsap_inst = enum_redsap(server, virt, classname) + if status != PASS: + raise Exception("Failed to get information on the defined dom:%s" \ + % test_dom) + + # val_list that will be used for comparing with enum of + # KVMRedirectionSAP values + sccn = get_typed_class(virt, 'ComputerSystem') + g_type = vsxml.xml_get_graphics_type() + val_list = { + 'SystemCreationClassName' : sccn, + 'SystemName' : test_dom, + 'CreationClassName' : classname, + 'KVMProtocol' : KVMRedSAP_proto[g_type], + 'EnabledState' : CIM_SAP_INACTIVE_STATE + } + val_list['ElementName'] = val_list['Name'] = "%s:%s" % ('-1', '-1') + + status = verify_redsap_values(val_list, redsap_inst, classname) + if status != PASS: + raise Exception("Failed to verify information on the defined "\ + "dom:%s" % test_dom) + + status = vsxml.cim_start(server) + if not ret: + raise Exception("Failed to start the dom: %s" % test_dom) + + status, redsap_inst = enum_redsap(server, virt, classname) + if status != PASS: + action_start = True + raise Exception("Failed to get information for running dom:%s" \ + % test_dom) + + lport = vsxml.xml_get_graphics_port() + val_list['ElementName'] = val_list['Name'] = "%s:%s" % (lport, '0') + val_list['EnabledState'] = CIM_SAP_AVAILABLE_STATE + + status = verify_redsap_values(val_list, redsap_inst, classname) + if status != PASS: + action_start = True + raise Exception("Failed to verify information for running dom:%s" \ + % test_dom) + + except Exception, detail: + logger.error("Exception: %s", detail) + status = FAIL + + if action_start == True: + vsxml.cim_destroy(server) + + vsxml.undefine(server) + return status + +if __name__ == "__main__": + sys.exit(main()) diff -r 43bf01b82ce9 -r cc74023eeaf7 suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Mon Jan 12 08:22:47 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Jan 15 03:20:04 2009 -0800 @@ -46,6 +46,15 @@ # Default TimeoutPeriod param for CS.RequestedStateChange() TIME = "00000000000000.000000:000" + +#KVMRedirectionSAP protocol values +KVMRedSAP_proto = { 'raw' : 2, 'rdp' : 3, 'vnc' : 4 } + +# CIM values for KVMRedirectionSAP.EnabledState +CIM_SAP_ACTIVE_STATE = 2 +CIM_SAP_INACTIVE_STATE = 3 +CIM_SAP_AVAILABLE_STATE = 6 + # vxml.NetXML default_bridge_name = 'testbridge' diff -r 43bf01b82ce9 -r cc74023eeaf7 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Jan 12 08:22:47 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 15 03:20:04 2009 -0800 @@ -413,6 +413,15 @@ '/domain/devices/interface/source/@network') return networkStr + def xml_get_graphics_type(self): + graphicstypeStr = self.get_value_xpath( + '/domain/devices/graphics/@type') + return graphicstypeStr + + def xml_get_graphics_port(self): + graphicsportStr = self.get_value_xpath( + '/domain/devices/graphics/@port') + return graphicsportStr def dumpxml(self, ip): cmd = 'virsh -c %s dumpxml %s' % (self.vuri, self.dname) From deeptik at linux.vnet.ibm.com Thu Jan 15 11:32:08 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 15 Jan 2009 17:02:08 +0530 Subject: [Libvirt-cim] Problem with KVMRedirectionSAP records for KVM. In-Reply-To: <496CDEE6.7070200@linux.vnet.ibm.com> References: <496C6AF9.4010301@linux.vnet.ibm.com> <496CDEE6.7070200@linux.vnet.ibm.com> Message-ID: <496F1EB8.6000609@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B Kalakeri wrote: >> Hi, >> >> I have the following domains on my machine, each of them have the >> graphics tags in them: >> >> virsh list --all >> Id Name State >> ---------------------------------- >> - graphics_domain2 shut off >> - testdom1 shut off >> > >> >> >> >> This symptoms is not seen with Xen, where the xml contains the same >> UUID. >> I want to know why is this kind of difference in the behaviour and >> whether this is expected. >> > > This looks like a libvirt bug. The UUID of a guest should be unique - > each guest should have a different one. If you define an XML with the > UUID of another guest, the guest should be updated. In this case, a > new guest is defined, which is incorrect behavior. > Ok ! One more thing, When we define a guest using the virsh and enumerate KVMRedirectionSAP , the lport of the ElementName/Name will contain the port value in the used in the XML file and the looks something like 5900: -1 (where 5900 is the port value used in the XML). But defining the guest using the DefineSystem() returns a value of -1 : -1 in the ElementName/Name. The DMTF - 1076 does not specify how the value of ElementName/Name filed should be. Is this expected behavior ? > If you modify your XMLs so that the guest name of each is the same, > then you will only see one guest. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Thu Jan 15 14:19:44 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Thu, 15 Jan 2009 12:19:44 -0200 Subject: [Libvirt-cim] [PATCH] Use previously obtained libvirt connection object In-Reply-To: References: Message-ID: <496F4600.9050400@linux.vnet.ibm.com> +1, besides a "stealth" fix to identation on line 809. Jim Fehlig wrote: > # HG changeset patch > # User Jim Fehlig > # Date 1231965200 25200 > # Node ID b4f1d84b87c20350fdfe0651a684a24b7e03ba28 > # Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8 > Use previously obtained libvirt connection object > > Libvirt connection object already obtained from virDomainPtr, use it. > > Signed-off-by: Jim Fehlig > > diff -r 8c56ab06aeb9 -r b4f1d84b87c2 src/Virt_ComputerSystem.c > --- a/src/Virt_ComputerSystem.c Wed Jan 14 08:41:52 2009 -0800 > +++ b/src/Virt_ComputerSystem.c Wed Jan 14 13:33:20 2009 -0700 > @@ -800,13 +800,13 @@ static CMPIStatus domain_reset(virDomain > if (ret != 0) { > virt_set_status(_BROKER, &s, > CMPI_RC_ERR_FAILED, > - virDomainGetConnect(dom), > + conn, > "Unable to destroy domain"); > goto out; > } > > - dom = virDomainLookupByName(virDomainGetConnect(dom), > - virDomainGetName(dom)); > + dom = virDomainLookupByName(conn, > + virDomainGetName(dom)); > > if (dom == NULL) { > dom = virDomainDefineXML(conn, xml); > @@ -814,7 +814,7 @@ static CMPIStatus domain_reset(virDomain > CU_DEBUG("Failed to define domain from XML"); > virt_set_status(_BROKER, &s, > CMPI_RC_ERR_FAILED, > - virDomainGetConnect(dom), > + conn, > "Unable to define domain"); > goto out; > } > @@ -827,7 +827,7 @@ static CMPIStatus domain_reset(virDomain > if (ret != 0) > virt_set_status(_BROKER, &s, > CMPI_RC_ERR_FAILED, > - virDomainGetConnect(dom), > + conn, > "Failed to start domain"); > > out: > > _______________________________________________ > 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 Jan 15 15:19:41 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Thu, 15 Jan 2009 13:19:41 -0200 Subject: [Libvirt-cim] [PATCH] Improve error messages for resource manipulation and migration In-Reply-To: <611757263eddd2bb9738.1231965840@jfehlig3.provo.novell.com> References: <611757263eddd2bb9738.1231965840@jfehlig3.provo.novell.com> Message-ID: <496F540D.1030506@linux.vnet.ibm.com> +1 Jim Fehlig wrote: > # HG changeset patch > # User Jim Fehlig > # Date 1231965788 25200 > # Node ID 611757263eddd2bb97383d250ee636300a91a9e6 > # Parent b4f1d84b87c20350fdfe0651a684a24b7e03ba28 > Improve error messages for resource manipulation and migration > > This patch extends on c/s 768, adding use of virt_set_status() in > resource manipulation extrinsics in Virt_VirtualSystemManagementService > and migration extrinsic in Virt_VSMigrationService. > > Signed-off-by: Jim Fehlig > > diff -r b4f1d84b87c2 -r 611757263edd src/Virt_VSMigrationService.c > --- a/src/Virt_VSMigrationService.c Wed Jan 14 13:33:20 2009 -0700 > +++ b/src/Virt_VSMigrationService.c Wed Jan 14 13:43:08 2009 -0700 > @@ -939,9 +939,10 @@ static CMPIStatus handle_migrate(virConn > ddom = virDomainMigrate(dom, dconn, type, NULL, NULL, 0); > if (ddom == NULL) { > CU_DEBUG("Migration failed"); > - cu_statusf(_BROKER, &s, > - CMPI_RC_ERR_FAILED, > - "Migration Failed"); > + virt_set_status(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + virDomainGetConnect(dom), > + "Migration Failed"); > } > out: > virDomainFree(ddom); > diff -r b4f1d84b87c2 -r 611757263edd src/Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c Wed Jan 14 13:33:20 2009 -0700 > +++ b/src/Virt_VirtualSystemManagementService.c Wed Jan 14 13:43:08 2009 -0700 > @@ -1479,9 +1479,10 @@ static CMPIStatus _resource_dynamic(stru > CU_DEBUG("Doing dynamic device update for `%s'", dominfo->name); > > if (func(dom, dev) == 0) { > - cu_statusf(_BROKER, &s, > - CMPI_RC_ERR_FAILED, > - "Unable to change (%i) device", action); > + virt_set_status(_BROKER, &s, > + CMPI_RC_ERR_FAILED, > + conn, > + "Unable to change (%i) device", action); > } else { > cu_statusf(_BROKER, &s, > CMPI_RC_OK, > > _______________________________________________ > 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 Jan 15 20:09:19 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 15 Jan 2009 12:09:19 -0800 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: References: Message-ID: <496F97EF.40506@linux.vnet.ibm.com> > But one particular error message given below is worrying me. > > Parsing error: parse error: Error adding class Xen_HostedResourcePool to > the repository: CIM_ERR_INVALID_SUPERCLASS: CIM_HostedResourcePool I wasn't able to reproduce this problem using a clean tree and clean Pegasus repository. Sounds like the CIM_HostedResourcePool and Xen_HostedResourcePool classes might not have been added to your repository. You can verify with the following commands: To check the root/virt namespace: wbemcli ecn http://localhost/root/virt:CIM_HostedResourcePool wbemcli ecn http://localhost/root/virt:Xen_HostedResourcePool To check the root/cimv2 namespace: wbemcli ecn http://localhost/root/cimv2:CIM_HostedResourcePool wbemcli ecn http://localhost/root/cimv2:Xen_HostedResourcePool If the class isn't found (should look like the output below), you can try running the following: 1) make preuninstall 2) make preinstall 3) Restart the CIMOM 4) make postinstall Let us know if the problem persists. Also, let us know which CIMOM you are using. I tested with Pegasus 2.7.2-2 on an Fedora 10 system. ----- $ wbemcli ecn http://localhost/root/cimv2:CIM_HostedResourcePool localhost:5988/root/cimv2:Xen_HostedResourcePool localhost:5988/root/cimv2:KVM_HostedResourcePool localhost:5988/root/cimv2:LXC_HostedResourcePool > > The complete output from the 'make postinstall' command is attached. > > Please advise on whether these error messages needs to be looked into or > could be safely ignored. Warning: the instance already exists. In this implementation, that means it cannot be changed. These message can be ignored. You're correct, this is because make postinstall was run several times. It means that some of the providers are already registered properly. ---------- Parsing error: parse error: Error adding class Virt_VirtualSystemSnapshotService to the repository: CIM_ERR_CLASS_HAS_CHILDREN: Virt_VirtualSystemSnapshotService This means the class is already present in the repository. You can verify using: $ wbemcli ecn http://localhost/root/virt:Virt_VirtualSystemSnapshotService localhost:5988/root/virt:KVM_VirtualSystemSnapshotService localhost:5988/root/virt:Xen_VirtualSystemSnapshotService localhost:5988/root/virt:LXC_VirtualSystemSnapshotService ----------- Parsing error: parse error: Error adding class CIM_VirtualSystemMigrationService to the repository: CIM_ERR_CLASS_HAS_CHILDREN: CIM_VirtualSystemMigrationService Same issue here. > > Also, the README contained in the source tar.gz files found at > ftp://libvirt.org/libvirt/CIM/ seems to be outdated, e.g. it didn't > mention about the make preinstall step. May be README could just give a > link to the wiki page which seems to be current. Sounds like the README is out of date. I'll update this information. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 15 20:32:19 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 15 Jan 2009 12:32:19 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix none value for disk assigned for Xen and align parameters in function call In-Reply-To: <496ECCF8.9010107@linux.vnet.ibm.com> References: <32645e444b323b137d0c.1231997394@elm3b197.beaverton.ibm.com> <496ECCF8.9010107@linux.vnet.ibm.com> Message-ID: <496F9D53.2030405@linux.vnet.ibm.com> > Since you comment above saying that LXC does not support network yet, it > would be good to remove > > elif virt == 'LXC': > net_mac = const.LXC_default_mac > > part as of now and add it when it is needed. I leave it upto you. If one is running a patched kernel with NETNS support, it is possible to get network to work with Containers. So I would leave this as is. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 15 22:13:30 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 15 Jan 2009 14:13:30 -0800 Subject: [Libvirt-cim] Problem with KVMRedirectionSAP records for KVM. In-Reply-To: <496F1EB8.6000609@linux.vnet.ibm.com> References: <496C6AF9.4010301@linux.vnet.ibm.com> <496CDEE6.7070200@linux.vnet.ibm.com> <496F1EB8.6000609@linux.vnet.ibm.com> Message-ID: <496FB50A.6050905@linux.vnet.ibm.com> >> > Ok ! One more thing, When we define a guest using the virsh and > enumerate KVMRedirectionSAP , the lport of the ElementName/Name will > contain the port value in the used in the XML file and the looks > something like 5900: -1 (where 5900 is the port value used in the XML). > But defining the guest using the DefineSystem() returns a value of -1 : > -1 in the ElementName/Name. Are you specifying a value of 5900 in your XML? Does it look like: When you define the guest using DefineSystem(), what are you setting the Address attribute of the GraphicsRASD to? The Address attribute is in the form of: Address="127.0.0.1:-1" The portion after the : is the port number. If a value isn't supplied for the Address, the default is to use -1. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 15 22:56:11 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 15 Jan 2009 14:56:11 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to verify KVMRedirectionSAP In-Reply-To: References: Message-ID: <496FBF0B.2050707@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1232018404 28800 > # Node ID cc74023eeaf78970482e0a7a0c4c37a7ff997530 > # Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4 > [TEST] Adding new tc to verify KVMRedirectionSAP. > > Tested with KVM/Xen on current sources and KVM with F9 rpm. I should have caught this earlier, but we're currently doing the following: self.add_sub_node(devices, 'graphics', type='vnc', port='5900', keymap='en-us') This adds the graphics device node to the XML, which is good - we need this when calling define() (i.e. using virsh). However, when cim_define() is called, the XML isn't used at all. Instead, cim_define() passes RASD objects to the DefineSystem() call. Right now, cim_define() doesn't specify a graphics RASD. When the DefineSystem() call is made, the provider is using default values since no graphics RASD is supplied. If you have an existing guest that has a VNC port of 5900, this test will fail. > diff -r 43bf01b82ce9 -r cc74023eeaf7 suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Thu Jan 15 03:20:04 2009 -0800 > @@ -0,0 +1,166 @@ > + g_type = vsxml.xml_get_graphics_type() This call is getting the graphics value from the XML. However, that might not be an accurate representation of what was passed to the DefineSystem() call. We need to do some cleanup here to ensure that the XML is a reflection of the actual guest that was defined. > + > + lport = vsxml.xml_get_graphics_port() Same comment here. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 15 22:59:20 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 15 Jan 2009 14:59:20 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 04_definesystem_ers.py to use cim_define() In-Reply-To: <496AD7BD.90804@linux.vnet.ibm.com> References: <4fe54bc4c934de944f1a.1231458258@localhost.localdomain> <496ACB54.50601@linux.vnet.ibm.com> <496AD7BD.90804@linux.vnet.ibm.com> Message-ID: <496FBFC8.2000405@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > > > Deepti B Kalakeri wrote: >> The tc fails with the following reason for LXC : >> >> -------------------------------------------------------------------- >> VirtualSystemManagementService - 04_definesystem_ers.py: FAIL >> ERROR - TypeError : __init__() takes exactly 12 arguments (11 given) >> Traceback (most recent call last): >> File "./lib/XenKvmLib/const.py", line 132, in do_try >> File "04_definesystem_ers.py", line 42, in main >> cxml = get_class(options.virt)(dname) >> File "./lib/XenKvmLib/vxml.py", line 855, in __init__ >> TypeError: __init__() takes exactly 12 arguments (11 given) >> ERROR - None >> -------------------------------------------------------------------- >> > > This is because the VirtCIM has a new compulsory param emu_type which > needs to passed from LXCXML, XenXML and XenFVXML. > > Daisy, > Since you are working on the emulated type test case, can you verify > this and correct the vxml.py ?? > Now that this fix is in, can I get another review of this patch? Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 15 23:15:50 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 15 Jan 2009 15:15:50 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add support for EmulatedType 1 to SDC Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232061344 28800 # Node ID a0d97b02af71c0cd5b13a88ab0ba089ea3c35d2a # Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8 [TEST] Add support for EmulatedType 1 to SDC. Also fix a bug with the if statement in set_disk_props() and a spacing bug. Signed-off-by: Kaitlin Rupert diff -r 8c56ab06aeb9 -r a0d97b02af71 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Jan 14 08:41:52 2009 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Thu Jan 15 15:15:44 2009 -0800 @@ -611,13 +611,13 @@ const CMPIObjectPath *ref, const char *id, uint64_t disk_size, + uint16_t emu_type, struct inst_list *list) { const char *addr; const char *dev; CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; - uint16_t emu_type = 0; if (type == DOMAIN_LXC) { addr = "/tmp"; @@ -646,7 +646,7 @@ dev = "xvda"; CMSetProperty(inst, "Caption", (CMPIValue *)"PV disk", CMPI_chars); - } else if (type, DOMAIN_XENFV) { + } else if (type == DOMAIN_XENFV) { CMSetProperty(inst, "Caption", (CMPIValue *)"FV disk", CMPI_chars); } @@ -671,6 +671,7 @@ char *pfx; const char *id; uint64_t disk_size; + uint16_t emu_type = 0; CMPIStatus s = {CMPI_RC_OK, NULL}; switch(template_type) { @@ -702,16 +703,54 @@ pfx = class_prefix_name(CLASSNAME(ref)); if (STREQ(pfx, "Xen")) { - s = set_disk_props(DOMAIN_XENPV, ref, id, disk_size, list); - + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + + for (; i < 2; i++) { + emu_type = 0; + s = set_disk_props(xen_type[i], + ref, + id, + disk_size, + emu_type, + list); + if (s.rc != CMPI_RC_OK) + goto out; + + emu_type = 1; + s = set_disk_props(xen_type[i], + ref, + id, + disk_size, + emu_type, + list); + if (s.rc != CMPI_RC_OK) + goto out; + } + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, + ref, + id, + disk_size, + emu_type, + list); if (s.rc != CMPI_RC_OK) - goto out; + goto out; - s = set_disk_props(DOMAIN_XENFV, ref, id, disk_size, list); - } else if (STREQ(pfx, "KVM")) { - s = set_disk_props(DOMAIN_KVM, ref, id, disk_size, list); + emu_type = 1; + s = set_disk_props(DOMAIN_KVM, + ref, + id, + disk_size, + emu_type, + list); } else if (STREQ(pfx, "LXC")) { - s = set_disk_props(DOMAIN_LXC, ref, id, disk_size, list); + s = set_disk_props(DOMAIN_LXC, + ref, + id, + disk_size, + emu_type, + list); } else { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, From ugopalak at in.ibm.com Fri Jan 16 05:41:25 2009 From: ugopalak at in.ibm.com (U Gopalakrishnan) Date: Fri, 16 Jan 2009 11:11:25 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: <496F97EF.40506@linux.vnet.ibm.com> Message-ID: > You can verify with the following commands: > To check the root/virt namespace: > wbemcli ecn http://localhost/root/virt:CIM_HostedResourcePool localhost:5988/root/virt:LXC_HostedResourcePool localhost:5988/root/virt:KVM_HostedResourcePool localhost:5988/root/virt:Xen_HostedResourcePool localhost:5988/root/virt:CIM_HostedStoragePool > wbemcli ecn http://localhost/root/virt:Xen_HostedResourcePool (no output) > To check the root/cimv2 namespace: > wbemcli ecn http://localhost/root/cimv2:CIM_HostedResourcePool * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: CIM_HostedResourcePool > wbemcli ecn http://localhost/root/cimv2:Xen_HostedResourcePool * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: Xen_HostedResourcePool > If the class isn't found (should look like the output below), you can > try running the following: > 1) make preuninstall > 2) make preinstall > 3) Restart the CIMOM > 4) make postinstall > Let us know if the problem persists. I still get CIM_ERR_INVALID_SUPERCLASS: CIM_HostedResourcePool. The complete make postinstall output is attached. Also the 'wbemcli ecn ..' command gives the same out as shown above even after re-running the postinstall. > Also, let us know which CIMOM you > are using. I tested with Pegasus 2.7.2-2 on an Fedora 10 system. I am running on Pegasus 2.8.0-1 on RHEL 5.2 system. Thanks Gopal -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: postinstall.out Type: application/octet-stream Size: 7745 bytes Desc: not available URL: From yunguol at cn.ibm.com Fri Jan 16 09:44:38 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Fri, 16 Jan 2009 17:44:38 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 04_definesystem_ers.py to use cim_define() In-Reply-To: <496FBFC8.2000405@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-16 06:59:20: > Deepti B Kalakeri wrote: > > > > > > Deepti B Kalakeri wrote: > >> The tc fails with the following reason for LXC : > >> > >> -------------------------------------------------------------------- > >> VirtualSystemManagementService - 04_definesystem_ers.py: FAIL > >> ERROR - TypeError : __init__() takes exactly 12 arguments (11 given) > >> Traceback (most recent call last): > >> File "./lib/XenKvmLib/const.py", line 132, in do_try > >> File "04_definesystem_ers.py", line 42, in main > >> cxml = get_class(options.virt)(dname) > >> File "./lib/XenKvmLib/vxml.py", line 855, in __init__ > >> TypeError: __init__() takes exactly 12 arguments (11 given) > >> ERROR - None > >> -------------------------------------------------------------------- > >> > > > > This is because the VirtCIM has a new compulsory param emu_type which > > needs to passed from LXCXML, XenXML and XenFVXML. > > > > Daisy, > > Since you are working on the emulated type test case, can you verify > > this and correct the vxml.py ?? > > > > Now that this fix is in, can I get another review of this patch? > +1. But you have to rebase and apply it into the tree. 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 deeptik at linux.vnet.ibm.com Fri Jan 16 10:35:17 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 16 Jan 2009 16:05:17 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to verify KVMRedirectionSAP In-Reply-To: <496FBF0B.2050707@linux.vnet.ibm.com> References: <496FBF0B.2050707@linux.vnet.ibm.com> Message-ID: <497062E5.3060805@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B. Kalakeri wrote: >> # HG changeset patch >> # User Deepti B. Kalakeri >> # Date 1232018404 28800 >> # Node ID cc74023eeaf78970482e0a7a0c4c37a7ff997530 >> # Parent 43bf01b82ce9f627af1b5db55922b0584cd0e3b4 >> [TEST] Adding new tc to verify KVMRedirectionSAP. >> >> Tested with KVM/Xen on current sources and KVM with F9 rpm. > > I should have caught this earlier, but we're currently doing the > following: > > self.add_sub_node(devices, 'graphics', type='vnc', port='5900', > keymap='en-us') > > This adds the graphics device node to the XML, which is good - we need > this when calling define() (i.e. using virsh). > > However, when cim_define() is called, the XML isn't used at all. > Instead, cim_define() passes RASD objects to the DefineSystem() call. > Right now, cim_define() doesn't specify a graphics RASD. When the > DefineSystem() call is made, the provider is using default values > since no graphics RASD is supplied. > > If you have an existing guest that has a VNC port of 5900, this test > will fail. Ya, I too overlooked this . > >> diff -r 43bf01b82ce9 -r cc74023eeaf7 >> suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ >> b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py >> Thu Jan 15 03:20:04 2009 -0800 >> @@ -0,0 +1,166 @@ > > >> + g_type = vsxml.xml_get_graphics_type() > > This call is getting the graphics value from the XML. However, that > might not be an accurate representation of what was passed to the > DefineSystem() call. > > We need to do some cleanup here to ensure that the XML is a reflection > of the actual guest that was defined. > >> + >> + lport = vsxml.xml_get_graphics_port() > > Same comment here. > I will look into this and make the changes to vxml.py on top your changes which are part of "#2 Update VSMS 04_definesystem_ers.py to use cim_define()" -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Jan 16 10:19:43 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 16 Jan 2009 15:49:43 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: References: Message-ID: <49705F3F.8050608@linux.vnet.ibm.com> U Gopalakrishnan wrote: > > > You can verify with the following commands: > > > To check the root/virt namespace: > > wbemcli ecn http://localhost/root/virt:CIM_HostedResourcePool > > localhost:5988/root/virt:LXC_HostedResourcePool > localhost:5988/root/virt:KVM_HostedResourcePool > localhost:5988/root/virt:Xen_HostedResourcePool > localhost:5988/root/virt:CIM_HostedStoragePool > > > > wbemcli ecn http://localhost/root/virt:Xen_HostedResourcePool > (no output) > > > To check the root/cimv2 namespace: > > wbemcli ecn http://localhost/root/cimv2:CIM_HostedResourcePool > > * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: CIM_HostedResourcePool > > > wbemcli ecn http://localhost/root/cimv2:Xen_HostedResourcePool > > * wbemcli: Cim: (5) CIM_ERR_INVALID_CLASS: Xen_HostedResourcePool > > > If the class isn't found (should look like the output below), you can > > try running the following: > > > 1) make preuninstall > > 2) make preinstall > > 3) Restart the CIMOM > > 4) make postinstall > > > Let us know if the problem persists. > > I still get CIM_ERR_INVALID_SUPERCLASS: CIM_HostedResourcePool. The > completeIn this implementation, that means it cannot be changed. > Warning: the instance already exists. > In this implementation, that means it cannot be changed. > Warning: the instance already exists. > In this implementation, that means it cannot be changed. > Warning: the instance already exists. > In this implementation, that means it cannot be changed. > > make postinstall output is attached. > > Also the 'wbemcli ecn ..' command gives the same out as shown above > even after re-running the postinstall. The postinstall log attached to the mail and the wbemcli ecn command for the root/cimv2 namespace imply that you do not have the CIM_HostedResourcePool registered, and hence you are seeing the above error messages and also in the postinstall o/p. > > > Also, let us know which CIMOM you > > are using. I tested with Pegasus 2.7.2-2 on an Fedora 10 system. > > I am running on Pegasus 2.8.0-1 on RHEL 5.2 system. > I tried doing a make postinstall today on RHEL5.2 and faced the same problem. The make preinstall steps did not seem to eliminate the problem for me as well. > > Thanks > Gopal > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 Fri Jan 16 16:41:14 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 16 Jan 2009 08:41:14 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add support for EmulatedType 1 to SDC In-Reply-To: References: Message-ID: <4970B8AA.1010000@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232061344 28800 > # Node ID a0d97b02af71c0cd5b13a88ab0ba089ea3c35d2a > # Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8 > [TEST] Add support for EmulatedType 1 to SDC. > > Also fix a bug with the if statement in set_disk_props() and a spacing bug. > > Signed-off-by: Kaitlin Rupert > Please ignore this patch - I meant to send this as a libvirt-cim patch, not a cimtest patch. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Jan 16 18:19:15 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 16 Jan 2009 10:19:15 -0800 Subject: [Libvirt-cim] [PATCH] Add support for EmulatedType 1 to SDC Message-ID: <2409abcca2b26accdb85.1232129955@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232129948 28800 # Node ID 2409abcca2b26accdb8529a0951b42446ddcc1f0 # Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8 Add support for EmulatedType 1 to SDC. Also fix a bug with the if statement in set_disk_props() and a spacing bug. Signed-off-by: Kaitlin Rupert diff -r 8c56ab06aeb9 -r 2409abcca2b2 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Jan 14 08:41:52 2009 -0800 +++ b/src/Virt_SettingsDefineCapabilities.c Fri Jan 16 10:19:08 2009 -0800 @@ -611,13 +611,13 @@ const CMPIObjectPath *ref, const char *id, uint64_t disk_size, + uint16_t emu_type, struct inst_list *list) { const char *addr; const char *dev; CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; - uint16_t emu_type = 0; if (type == DOMAIN_LXC) { addr = "/tmp"; @@ -646,7 +646,7 @@ dev = "xvda"; CMSetProperty(inst, "Caption", (CMPIValue *)"PV disk", CMPI_chars); - } else if (type, DOMAIN_XENFV) { + } else if (type == DOMAIN_XENFV) { CMSetProperty(inst, "Caption", (CMPIValue *)"FV disk", CMPI_chars); } @@ -671,6 +671,7 @@ char *pfx; const char *id; uint64_t disk_size; + uint16_t emu_type = 0; CMPIStatus s = {CMPI_RC_OK, NULL}; switch(template_type) { @@ -702,16 +703,54 @@ pfx = class_prefix_name(CLASSNAME(ref)); if (STREQ(pfx, "Xen")) { - s = set_disk_props(DOMAIN_XENPV, ref, id, disk_size, list); - + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; + int i = 0; + + for (; i < 2; i++) { + emu_type = 0; + s = set_disk_props(xen_type[i], + ref, + id, + disk_size, + emu_type, + list); + if (s.rc != CMPI_RC_OK) + goto out; + + emu_type = 1; + s = set_disk_props(xen_type[i], + ref, + id, + disk_size, + emu_type, + list); + if (s.rc != CMPI_RC_OK) + goto out; + } + } else if (STREQ(pfx, "KVM")) { + s = set_disk_props(DOMAIN_KVM, + ref, + id, + disk_size, + emu_type, + list); if (s.rc != CMPI_RC_OK) - goto out; + goto out; - s = set_disk_props(DOMAIN_XENFV, ref, id, disk_size, list); - } else if (STREQ(pfx, "KVM")) { - s = set_disk_props(DOMAIN_KVM, ref, id, disk_size, list); + emu_type = 1; + s = set_disk_props(DOMAIN_KVM, + ref, + id, + disk_size, + emu_type, + list); } else if (STREQ(pfx, "LXC")) { - s = set_disk_props(DOMAIN_LXC, ref, id, disk_size, list); + s = set_disk_props(DOMAIN_LXC, + ref, + id, + disk_size, + emu_type, + list); } else { cu_statusf(_BROKER, &s, CMPI_RC_ERR_FAILED, From kaitlin at linux.vnet.ibm.com Fri Jan 16 18:57:42 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 16 Jan 2009 10:57:42 -0800 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: References: Message-ID: <4970D8A6.3090307@linux.vnet.ibm.com> > > If the class isn't found (should look like the output below), you can > > try running the following: > > > 1) make preuninstall > > 2) make preinstall > > 3) Restart the CIMOM > > 4) make postinstall > > > Let us know if the problem persists. > > I still get CIM_ERR_INVALID_SUPERCLASS: CIM_HostedResourcePool. The > complete > make postinstall output is attached. > > Also the 'wbemcli ecn ..' command gives the same out as shown above even > after re-running the postinstall. > > > Also, let us know which CIMOM you > > are using. I tested with Pegasus 2.7.2-2 on an Fedora 10 system. > > I am running on Pegasus 2.8.0-1 on RHEL 5.2 system. > Is your root/cimv2 namespace populated? I'm guessing that CIM_HostedResourcePool is not added to the root/cimv2 namespace during the make preinstall because CIM_SystemComponent is not there. You can check to see if the root/cimv2 namespace is populated by doing the following: /var/lib/Pegasus/repository/root#cimv2/classes You should see a number of classes there. CIM_SystemComponent should be present there as well. I uninstalled Pegasus on my RHEL 5.2 system, removed the repository, and then reinstalled Pegasus. The tog-pegasus-2.7.0-1.el5 rpm populates root/cimv2. My guess is your Pegasus install isn't populating the root/cimv2 namespace. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Jan 16 20:28:12 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 16 Jan 2009 12:28:12 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Update VSMS 04_definesystem_ers.py to use cim_define() Message-ID: <57f3bc7c3105bb779b41.1232137692@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232135486 28800 # Node ID 57f3bc7c3105bb779b41e19b1c03a1e5f214cec1 # Parent 32645e444b323b137d0c0a2a323be574b370d75a [TEST] #3 Update VSMS 04_definesystem_ers.py to use cim_define() Add a err_rc and err_desc elements to the VirtCIM class. This will allow us to check the error code and error description in case of failed CIM method calls. Add two functions: set_sys_settings() and set_res_settings(). These allow the caller to set the VSSD and RASDs after the initial init() of the VirtCIM class. Some of the logic in cim_define() was changed to allow the passing of just a single RASD to DefineSystem() (instead of passing all the RASDs). Updates from 2 to 3: -Rebased on current tree Updates from 1 to 2: -Create function to verify return code and error description if define fails Signed-off-by: Kaitlin Rupert diff -r 32645e444b32 -r 57f3bc7c3105 suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Wed Jan 14 21:29:48 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Fri Jan 16 11:51:26 2009 -0800 @@ -23,17 +23,14 @@ # import sys -import pywbem -from VirtLib import utils -from XenKvmLib import vsms -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem +from pywbem import CIM_ERR_FAILED from CimTest.Globals import logger from XenKvmLib.const import do_main from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC +from XenKvmLib.vxml import get_class sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] -exp_rc = 1 #CMPI_RC_ERR_FAILED +exp_rc = CIM_ERR_FAILED exp_desc = 'Unable to parse embedded object' @do_main(sup_types) @@ -41,26 +38,28 @@ options = main.options dname = 'test_domain' - vssd, rasd = vsms.default_vssd_rasd_str(dom_name=dname, virt=options.virt) - params = {'vssd' : vssd, - 'rasd' : ['wrong'] - } + cxml = get_class(options.virt)(dname) - exp_err = {'exp_rc' : exp_rc, - 'exp_desc' : exp_desc - } + rasd_list = { "MemResourceAllocationSettingData" : "wrong" } + cxml.set_res_settings(rasd_list) + try: + ret = cxml.cim_define(options.ip) + if ret: + raise Exception('DefineSystem returned OK with invalid params') - rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', - exp_err=exp_err, virt=options.virt) + status = cxml.verify_error_msg(exp_rc, exp_desc) + if status != PASS: + raise Exception('DefineSystem failed for an unexpected reason') - if rc != PASS: - logger.error('DefineSystem should NOT return OK with a wrong ss input') + except Exception, details: + logger.error(details) + status = FAIL - undefine_test_domain(dname, options.ip, virt=options.virt) + cxml.undefine(options.ip) - return rc + return status if __name__ == "__main__": sys.exit(main()) diff -r 32645e444b32 -r 57f3bc7c3105 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 14 21:29:48 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Jan 16 11:51:26 2009 -0800 @@ -470,6 +470,8 @@ mem_allocunits, emu_type): self.virt = virt self.domain_name = dom_name + self.err_rc = None + self.err_desc = None self.vssd = vsms.get_vssd_mof(virt, dom_name) self.nasd = vsms.get_nasd_class(virt)(type=net_type, mac=net_mac, @@ -491,11 +493,17 @@ def cim_define(self, ip, ref_conf=None): service = vsms.get_vsms_class(self.virt)(ip) sys_settings = str(self.vssd) - if self.virt == 'LXC' and const.LXC_netns_support is False: - res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] - else: - res_settings = [str(self.dasd), str(self.nasd), - str(self.pasd), str(self.masd)] + + res_settings = [] + if self.dasd is not None: + res_settings.append(str(self.dasd)) + if self.pasd is not None: + res_settings.append(str(self.pasd)) + if self.masd is not None: + res_settings.append(str(self.masd)) + if self.nasd is not None or \ + (self.virt == 'LXC' and const.LXC_netns_support is False): + res_settings.append(str(self.nasd)) if ref_conf is None: ref_conf = ' ' @@ -506,6 +514,8 @@ ReferenceConfiguration=ref_conf) except pywbem.CIMError, (rc, desc): logger.error('Got CIM error %s with return code %s' % (desc, rc)) + self.err_rc = rc + self.err_desc = desc return False except Exception, details: @@ -523,6 +533,12 @@ target = pywbem.cim_obj.CIMInstanceName(cs_cn, keybindings = keys) try: ret = service.DestroySystem(AffectedSystem=target) + except pywbem.CIMError, (rc, desc): + logger.error('Got CIM error %s with return code %s' % (desc, rc)) + self.err_rc = rc + self.err_desc = desc + return False + except Exception, details: logger.error('Error invoking DestroySystem') logger.error('Got error %s with exception %s' \ @@ -575,6 +591,12 @@ cs.RequestStateChange(RequestedState=req_state_change, TimeoutPeriod=time_period) + except pywbem.CIMError, (rc, desc): + logger.error('Got CIM error %s with return code %s' % (desc, rc)) + self.err_rc = rc + self.err_desc = desc + return FAIL + except Exception, detail: logger.error("In fn cim_state_change()") logger.error("Failed to change state of the domain '%s'", cs.Name) @@ -620,6 +642,36 @@ return self.cim_state_change(server, const.CIM_RESET, req_time, poll_time, const.CIM_ENABLE) + def set_sys_settings(self, vssd): + self.vssd = vssd + + def set_res_settings(self, rasd_list): + for cn, rasd in rasd_list.iteritems(): + if cn.find("MemResourceAllocationSettingData") >= 0: + self.masd = rasd + elif cn.find("ProcResourceAllocationSettingData") >= 0: + self.pasd = rasd + elif cn.find("DiskResourceAllocationSettingData") >= 0: + self.dasd = rasd + elif cn.find("NetResourceAllocationSettingData") >= 0: + self.nasd = rasd + + def verify_error_msg(self, exp_rc, exp_desc): + try: + rc = int(self.err_rc) + + if rc != exp_rc: + raise Exception("Got rc: %d, exp %d." % (rc, exp_rc)) + + if self.err_desc.find(exp_desc) < 0: + raise Exception("Got desc: '%s', exp '%s'" % (self.err_desc, + exp_desc)) + + except Exception, details: + logger.error(details) + return FAIL + + return PASS class XenXML(VirtXML, VirtCIM): From kaitlin at linux.vnet.ibm.com Fri Jan 16 20:27:38 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 16 Jan 2009 12:27:38 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Adding new tc to verify KVMRedirectionSAP In-Reply-To: <497062E5.3060805@linux.vnet.ibm.com> References: <496FBF0B.2050707@linux.vnet.ibm.com> <497062E5.3060805@linux.vnet.ibm.com> Message-ID: <4970EDBA.1070509@linux.vnet.ibm.com> >> > I will look into this and make the changes to vxml.py on top your > changes which are part of "#2 Update VSMS 04_definesystem_ers.py to use > cim_define()" > Great, this sounds good. I just resubmitted that test. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Jan 16 21:17:57 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 16 Jan 2009 13:17:57 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add some error checking when detecting hypervisor version Message-ID: <2500265f6c78b23eadda.1232140677@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232140666 28800 # Node ID 2500265f6c78b23eaddaffe3595bb2dee127cc13 # Parent 57f3bc7c3105bb779b41e19b1c03a1e5f214cec1 [TEST] Add some error checking when detecting hypervisor version Signed-off-by: Kaitlin Rupert diff -r 57f3bc7c3105 -r 2500265f6c78 suites/libvirt-cim/lib/XenKvmLib/reporting.py --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Fri Jan 16 11:51:26 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Fri Jan 16 13:17:46 2009 -0800 @@ -50,8 +50,11 @@ libvirt_ver = virsh_ver.splitlines()[0].split()[4] if virsh_ver.splitlines()[3].find("hypervisor"): - hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] - hyp_ver = hyp_ver.split(": ")[1] + tok = virsh_ver.splitlines()[3].split("hypervisor") + if len(tok) > 1: + tok = tok[1].split(": ") + if len(tok) > 1: + hyp_ver = tok[1] return libvirt_ver, hyp_ver From kaitlin at linux.vnet.ibm.com Fri Jan 16 22:19:36 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 16 Jan 2009 14:19:36 -0800 Subject: [Libvirt-cim] [PATCH] Update build produce in README Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232144345 28800 # Node ID ddb4e1368c0919dd310c1cd3b8fa4c104caf18df # Parent 2409abcca2b26accdb8529a0951b42446ddcc1f0 Update build produce in README Signed-off-by: Kaitlin Rupert diff -r 2409abcca2b2 -r ddb4e1368c09 README --- a/README Fri Jan 16 10:19:08 2009 -0800 +++ b/README Fri Jan 16 14:19:05 2009 -0800 @@ -29,8 +29,13 @@ Procedure: - $ ./autoconfiscate.sh + -If building a tree cloned from the hg repository, run this step first: + $ ./autoconfiscate.sh + $ ./configure $ make + $ make preinstall + $ Restart Pegasus or SFCB $ sudo make install $ sudo make postinstall + $ Restart Pegasus or SFCB From kaitlin at linux.vnet.ibm.com Fri Jan 16 22:44:50 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 16 Jan 2009 14:44:50 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add CodyingSystem and SubmittingPatches files Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232145843 28800 # Node ID d94576542b4d6479ad04da466406c0cdb391f6e8 # Parent 684561f21975c7420cb7e15affc1eec4a8ed35ae [TEST] Add CodyingSystem and SubmittingPatches files Signed-off-by: Kaitlin Rupert diff -r 684561f21975 -r d94576542b4d doc/CodingStyle --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/CodingStyle Fri Jan 16 14:44:03 2009 -0800 @@ -0,0 +1,41 @@ + +The CodingStyle for cimtest (and libcmpiutil) mostly mirrors that of +libvirt-cim but with the following "clarifications": + +- Four-space indents + +- 80-char width limit. Break long function calls by: + a) putting *every* parameter of the call on its own line + -or- + b) putting as many params in a line as will fit in the 80-char limit; + overflow params are placed on the subsequent line + +- Split lines should aligned like the following: + + VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path, + ntype, net_name, mac, vcpus, mem, mem_allocunits, + emu_type) + +- Identifiers should be named with underbars_and_lowercase. + +- When passing parameters to logger.error() and logger.info(), use + commas: + + logger.error("%s is not a valid network type", net_type) + + Not percent signs: + + logger.error('Got CIM error %s with return code %s' % (desc, rc)) + +- When passing parameters to Exception(), use percents: + + raise Exception("Unable to define %s" % test_dom) + + Not commas: + + raise Exception("Unable to define %s", test_dom) + +- Except for special cases, import the needed functions from a module. Do not + import the entire module: + + from XenKvmLib.classes import virt_types diff -r 684561f21975 -r d94576542b4d doc/SubmittingPatches --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/SubmittingPatches Fri Jan 16 14:44:03 2009 -0800 @@ -0,0 +1,117 @@ +To submit patches to libvirt-cim, you must follow the DCO process, outlined +below. + +Developer's Certificate of Origin 1.1 + By making a contribution to this project, I certify that: + + (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + + (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + + (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + + (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +then you just add a line saying + + Signed-off-by: Random J Developer + +using your real name (sorry, no pseudonyms or anonymous contributions.) + + + +Guidelines for Submitting Patches. + + Patches should be submitted using Mercurial's patchbomb extension, + and we recommend using the queues extension as well. On top of that, + we have some guidelines you should follow when submitting patches. + This makes reviewing patches easier, which in turns improves the + chances of your patch being accepted in a timely fashion. + +Single Patches: + + (a) When you add a patch to the queue you have an idea of where you're + going with it, and the commit message should reflect that. Be + specific. Avoid just saying something like, "Various fixes to + AllocationCapabilities." Add a list of what was actually fixed, + like, "Add EnumInstanceNames support," and, "Eliminate duplicate + instances." + + (b) The first line of your commit message will be the subject of the + patch email when you send it out, so write it like a subject. Keep + it short and to the point, then start a new line and feel free to be + as verbose as you need to be. The entire commit message will be + included in the patch. + + (c) Stay on task with a patch. If you notice other problems while you + are working on patch, and they are not most definitely specific to + your patch, they should be another patch. The same goes for + nitpicking. While it might be only a line or two here and there + that is off track, this is actually one of the easiest ways to make + a patch difficult to review. All the trivial changes hide what is + really going on. Make the unrelated changes a new patch or don't + make them at all. + + (d) Before you email, export. If you have a patch called "alloc_fixes", + which would be emailed with "hg email alloc_fixes", you should first + run "hg export alloc_fixes". This lets you review your patch. Does + it have any typos in the comments? Did you accidentally include an + irrelevant change? Is your commit message still accurate and useful? + This is the single biggest step in ensuring you have a good patch. + + (e) If your patch needs to be reworked and resent, prepend a "version + number" to the first line of the commit message. For example, "Add + EnumInstance to RASD," becomes "(#2) Add EnumInstance to RASD." + This helps mail readers thread discussions correctly and helps + maintainers know they are applying the right version of your patch. + At the end of the commit message, explain what is different from one + version to the next. Nobody likes having to diff a diff. + + (f) If your patch depends on a patch that exists on the mailing list but + not in the tree, it is okay to send your patch to the list as long + as your commit message mentions the dependency. It is also a good + idea to import the patch into your tree before you make your patch. + For example, a new patch called "cu_statusf API change" is on the + list, and your patch needs the new API. Save the email (no need to + trim headers) as api_change.eml, then do "hg qimport api_change.eml" + and "hg qpush" so that the patch is applied to your tree. Now write + your patch on top of it. You should still indicate the dependency + in your commit message. + + +Patchsets: + + (a) When you send a group of patches, Mercurial's email extension will + create a "header" email. Make the subject and body of that email + meaningful, so we know how the patches relate. It's easy to say, + "Each patch has a commit message, it's obvious how they work + together," but the rest of the list usually won't agree with that. + If the commit messages for each patch are good, you shouldn't need + more than a sentence or two to tie them all together, but you do + need it. + + (b) If any of your patches are rejected and you rework them, resend the + entire set. This prevents things like, "So use patch 1 of 4 from + the set I sent yesterday, 2 and 3 of 4 from the patch I sent an hour + later, and patch 4 of 4 from today." + + (c) If you resend a patchset, apply part (e) of the Single Patches + guidelines to your "Patch [0 of 3]" header email, for all the same + reasons. + +Questions/Comments on the Guidelines should be directed to: + Kaitlin Rupert From yunguol at cn.ibm.com Mon Jan 19 02:21:56 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 19 Jan 2009 10:21:56 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add some error checking when detecting hypervisor version In-Reply-To: <2500265f6c78b23eadda.1232140677@localhost.localdomain> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-17 05:17:57: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232140666 28800 > # Node ID 2500265f6c78b23eaddaffe3595bb2dee127cc13 > # Parent 57f3bc7c3105bb779b41e19b1c03a1e5f214cec1 > [TEST] Add some error checking when detecting hypervisor version > > Signed-off-by: Kaitlin Rupert > > diff -r 57f3bc7c3105 -r 2500265f6c78 suites/libvirt- > cim/lib/XenKvmLib/reporting.py > --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Fri Jan 16 11: > 51:26 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Fri Jan 16 13: > 17:46 2009 -0800 > @@ -50,8 +50,11 @@ > libvirt_ver = virsh_ver.splitlines()[0].split()[4] > > if virsh_ver.splitlines()[3].find("hypervisor"): > - hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] > - hyp_ver = hyp_ver.split(": ")[1] > + tok = virsh_ver.splitlines()[3].split("hypervisor") > + if len(tok) > 1: > + tok = tok[1].split(": ") > + if len(tok) > 1: > + hyp_ver = tok[1] > > return libvirt_ver, hyp_ver > > +1 from me. It's better to print out error log if len(tok)<= 1. > _______________________________________________ > 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 Jan 19 02:42:31 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 19 Jan 2009 10:42:31 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 19 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb Message-ID: ================================================= Test Run Summary (Jan 19 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 800 Libvirt-cim changeset: 611757263edd Cimtest revision: 598 Cimtest changeset: 32645e444b32 ================================================= FAIL : 1 XFAIL : 8 SKIP : 32 PASS : 100 ----------------- Total : 141 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 06_paused_active_suspend.py: XFAIL ComputerSystem - 23_pause_pause.py: XFAIL ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL HostSystem - 02_hostsystem_to_rasd.py: XFAIL HostedDependency - 03_enabledstate.py: XFAIL VSSD - 04_vssd_to_rasd.py: XFAIL VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystemIndication - 01_created_indication.py: SKIP ElementAllocatedFromPool - 03_reverse_errs.py: SKIP ElementAllocatedFromPool - 04_forward_errs.py: SKIP LogicalDisk - 01_disk.py: SKIP LogicalDisk - 02_nodevs.py: SKIP LogicalDisk - 03_ld_gi_errs.py: SKIP NetworkPort - 01_netport.py: SKIP NetworkPort - 02_np_gi_errors.py: SKIP NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: SKIP Processor - 02_definesys_get_procs.py: SKIP Processor - 03_proc_gi_errs.py: SKIP RASD - 04_disk_rasd_size.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP ResourceAllocationFromPool - 05_RAPF_err.py: SKIP ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemManagementService - 08_modifyresource.py: SKIP VirtualSystemManagementService - 09_procrasd_persist.py: SKIP VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP VirtualSystemManagementService - 12_referenced_config.py: SKIP VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'DomST1' ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Exception variable: Unable pause dom 'DomST1' InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_pause_pause.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Exception: 'Unable pause dom 'cs_test_domain'' InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 27_define_pause_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot') ERROR - Exception: Unable reboot dom 'cs_test_domain' InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: SKIP -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'LXC_AllocationCapabilities' ERROR - Exception: Failed to verify instance Class not found -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned CrossClass_GuestDom/mouse:xen instead of CrossClass_GuestDom/mouse:usb Class not found Bug:<00009> -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: XFAIL ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Failed to suspend the dom: hd_domain1 InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: SKIP -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: SKIP -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: SKIP -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: SKIP -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: SKIP -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: SKIP -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: SKIP -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: SKIP -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: SKIP -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned VSSDC_dom/mouse:xen instead of VSSDC_dom/mouse:usb Bug:<00009> -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00008> -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From yunguol at cn.ibm.com Mon Jan 19 02:44:18 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 19 Jan 2009 10:44:18 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Update VSMS 04_definesystem_ers.py to use cim_define() In-Reply-To: <57f3bc7c3105bb779b41.1232137692@localhost.localdomain> Message-ID: +1. libvirt-cim-bounces at redhat.com wrote on 2009-01-17 04:28:12: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232135486 28800 > # Node ID 57f3bc7c3105bb779b41e19b1c03a1e5f214cec1 > # Parent 32645e444b323b137d0c0a2a323be574b370d75a > [TEST] #3 Update VSMS 04_definesystem_ers.py to use cim_define() > > Add a err_rc and err_desc elements to the VirtCIM class. This will allow > us to check the error code and error description in case of failed CIM > method calls. > > Add two functions: set_sys_settings() and set_res_settings(). Theseallow the > caller to set the VSSD and RASDs after the initial init() of the > VirtCIM class. > > Some of the logic in cim_define() was changed to allow the passing of just > a single RASD to DefineSystem() (instead of passing all the RASDs). > > Updates from 2 to 3: > -Rebased on current tree > > Updates from 1 to 2: > -Create function to verify return code and error description if define fails > > Signed-off-by: Kaitlin Rupert > > diff -r 32645e444b32 -r 57f3bc7c3105 suites/libvirt- > cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py > --- a/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py > Wed Jan 14 21:29:48 2009 -0800 > +++ b/suites/libvirt- > cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py > Fri Jan 16 11:51:26 2009 -0800 > @@ -23,17 +23,14 @@ > # > > import sys > -import pywbem > -from VirtLib import utils > -from XenKvmLib import vsms > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > +from pywbem import CIM_ERR_FAILED > from CimTest.Globals import logger > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > +from XenKvmLib.vxml import get_class > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > -exp_rc = 1 #CMPI_RC_ERR_FAILED > +exp_rc = CIM_ERR_FAILED > exp_desc = 'Unable to parse embedded object' > > @do_main(sup_types) > @@ -41,26 +38,28 @@ > options = main.options > > dname = 'test_domain' > - vssd, rasd = vsms.default_vssd_rasd_str(dom_name=dname, > virt=options.virt) > > - params = {'vssd' : vssd, > - 'rasd' : ['wrong'] > - } > + cxml = get_class(options.virt)(dname) > > - exp_err = {'exp_rc' : exp_rc, > - 'exp_desc' : exp_desc > - } > + rasd_list = { "MemResourceAllocationSettingData" : "wrong" } > + cxml.set_res_settings(rasd_list) > > + try: > + ret = cxml.cim_define(options.ip) > + if ret: > + raise Exception('DefineSystem returned OK with invalid params') > > - rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', > - exp_err=exp_err, virt=options.virt) > + status = cxml.verify_error_msg(exp_rc, exp_desc) > + if status != PASS: > + raise Exception('DefineSystem failed for an unexpected reason') > > - if rc != PASS: > - logger.error('DefineSystem should NOT return OK with a > wrong ss input') > + except Exception, details: > + logger.error(details) > + status = FAIL > > - undefine_test_domain(dname, options.ip, virt=options.virt) > + cxml.undefine(options.ip) > > - return rc > + return status > > if __name__ == "__main__": > sys.exit(main()) > diff -r 32645e444b32 -r 57f3bc7c3105 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 14 21:29:482009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Jan 16 11:51:262009 -0800 > @@ -470,6 +470,8 @@ > mem_allocunits, emu_type): > self.virt = virt > self.domain_name = dom_name > + self.err_rc = None > + self.err_desc = None > self.vssd = vsms.get_vssd_mof(virt, dom_name) > self.nasd = vsms.get_nasd_class(virt)(type=net_type, > mac=net_mac, > @@ -491,11 +493,17 @@ > def cim_define(self, ip, ref_conf=None): > service = vsms.get_vsms_class(self.virt)(ip) > sys_settings = str(self.vssd) > - if self.virt == 'LXC' and const.LXC_netns_support is False: > - res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] > - else: > - res_settings = [str(self.dasd), str(self.nasd), > - str(self.pasd), str(self.masd)] > + > + res_settings = [] > + if self.dasd is not None: > + res_settings.append(str(self.dasd)) > + if self.pasd is not None: > + res_settings.append(str(self.pasd)) > + if self.masd is not None: > + res_settings.append(str(self.masd)) > + if self.nasd is not None or \ > + (self.virt == 'LXC' and const.LXC_netns_support is False): > + res_settings.append(str(self.nasd)) > > if ref_conf is None: > ref_conf = ' ' > @@ -506,6 +514,8 @@ > ReferenceConfiguration=ref_conf) > except pywbem.CIMError, (rc, desc): > logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + self.err_rc = rc > + self.err_desc = desc > return False > > except Exception, details: > @@ -523,6 +533,12 @@ > target = pywbem.cim_obj.CIMInstanceName(cs_cn, keybindings = keys) > try: > ret = service.DestroySystem(AffectedSystem=target) > + except pywbem.CIMError, (rc, desc): > + logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + self.err_rc = rc > + self.err_desc = desc > + return False > + > except Exception, details: > logger.error('Error invoking DestroySystem') > logger.error('Got error %s with exception %s' \ > @@ -575,6 +591,12 @@ > cs.RequestStateChange(RequestedState=req_state_change, > TimeoutPeriod=time_period) > > + except pywbem.CIMError, (rc, desc): > + logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + self.err_rc = rc > + self.err_desc = desc > + return FAIL > + > except Exception, detail: > logger.error("In fn cim_state_change()") > logger.error("Failed to change state of the domain '% > s'", cs.Name) > @@ -620,6 +642,36 @@ > return self.cim_state_change(server, const.CIM_RESET, > req_time, poll_time, const.CIM_ENABLE) > > + def set_sys_settings(self, vssd): > + self.vssd = vssd > + > + def set_res_settings(self, rasd_list): > + for cn, rasd in rasd_list.iteritems(): > + if cn.find("MemResourceAllocationSettingData") >= 0: > + self.masd = rasd > + elif cn.find("ProcResourceAllocationSettingData") >= 0: > + self.pasd = rasd > + elif cn.find("DiskResourceAllocationSettingData") >= 0: > + self.dasd = rasd > + elif cn.find("NetResourceAllocationSettingData") >= 0: > + self.nasd = rasd > + > + def verify_error_msg(self, exp_rc, exp_desc): > + try: > + rc = int(self.err_rc) > + > + if rc != exp_rc: > + raise Exception("Got rc: %d, exp %d." % (rc, exp_rc)) > + > + if self.err_desc.find(exp_desc) < 0: > + raise Exception("Got desc: '%s', exp '%s'" % (self.err_desc, > + exp_desc)) > + > + except Exception, details: > + logger.error(details) > + return FAIL > + > + return PASS > > class XenXML(VirtXML, VirtCIM): > > > _______________________________________________ > 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 Jan 19 03:02:26 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 19 Jan 2009 11:02:26 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 19 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb In-Reply-To: Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-19 10:42:31: > > > ================================================= > Test Run Summary (Jan 19 2009): LXC on Fedora release 9.90.1 > (Rawhide) with sfcb > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > libvirt: 0.4.5 > Hypervisor: QEMU 0.9.1 > CIMOM: sfcb sfcbd 1.3.3preview > Libvirt-cim revision: 800 > Libvirt-cim changeset: 611757263edd > Cimtest revision: 598 > Cimtest changeset: 32645e444b32 > ================================================= > FAIL : 1 > XFAIL : 8 > SKIP : 32 > PASS : 100 > ----------------- > Total : 141 > ================================================= > FAIL Test Summary: > ElementConforms - 01_forward.py: FAIL > This fails because of provider's updates of adding AllocationCapabilities and ResourceAllocation in registered profiles. So the tc also has to verify them. > ================================================= > XFAIL Test Summary: > ComputerSystem - 06_paused_active_suspend.py: XFAIL > ComputerSystem - 23_pause_pause.py: XFAIL > ComputerSystem - 32_start_reboot.py: XFAIL > ComputerSystem - 33_suspend_reboot.py: XFAIL > HostSystem - 02_hostsystem_to_rasd.py: XFAIL > HostedDependency - 03_enabledstate.py: XFAIL > VSSD - 04_vssd_to_rasd.py: XFAIL > VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL > > ================================================= > SKIP Test Summary: > ComputerSystem - 02_nosystems.py: SKIP > ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP > ComputerSystemIndication - 01_created_indication.py: SKIP > ElementAllocatedFromPool - 03_reverse_errs.py: SKIP > ElementAllocatedFromPool - 04_forward_errs.py: SKIP > LogicalDisk - 01_disk.py: SKIP > LogicalDisk - 02_nodevs.py: SKIP > LogicalDisk - 03_ld_gi_errs.py: SKIP > NetworkPort - 01_netport.py: SKIP > NetworkPort - 02_np_gi_errors.py: SKIP > NetworkPort - 03_user_netport.py: SKIP > Processor - 01_processor.py: SKIP > Processor - 02_definesys_get_procs.py: SKIP > Processor - 03_proc_gi_errs.py: SKIP > RASD - 04_disk_rasd_size.py: SKIP > RASD - 05_disk_rasd_emu_type.py: SKIP > ResourceAllocationFromPool - 05_RAPF_err.py: SKIP > ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP > VSSD - 02_bootldr.py: SKIP > VirtualSystemManagementService - 06_addresource.py: SKIP > VirtualSystemManagementService - 08_modifyresource.py: SKIP > VirtualSystemManagementService - 09_procrasd_persist.py: SKIP > VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP > VirtualSystemManagementService - 12_referenced_config.py: SKIP > VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > > ================================================= > Full report: > -------------------------------------------------------------------- > AllocationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > AllocationCapabilities - 02_alloccap_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 02_nosystems.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > ComputerSystem - 03_defineVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 04_defineStartVS.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 05_activate_defined_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 06_paused_active_suspend.py: XFAIL > ERROR - In fn cim_state_change() > ERROR - Failed to change state of the domain 'DomST1' > ERROR - Exception: (1, u'Unable to pause domain: > this function is not supported by the hypervisor: virDomainSuspend') > ERROR - Exception variable: Unable pause dom 'DomST1' > InvokeMethod(RequestStateChange): Unable to pause domain: this > function is not supported by the hypervisor: virDomainSuspend > Bug:<00011> > -------------------------------------------------------------------- > ComputerSystem - 22_define_suspend.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 23_pause_pause.py: XFAIL > ERROR - In fn cim_state_change() > ERROR - Failed to change state of the domain 'cs_test_domain' > ERROR - Exception: (1, u'Unable to pause domain: > this function is not supported by the hypervisor: virDomainSuspend') > ERROR - Exception: 'Unable pause dom 'cs_test_domain'' > InvokeMethod(RequestStateChange): Unable to pause domain: this > function is not supported by the hypervisor: virDomainSuspend > Bug:<00011> > -------------------------------------------------------------------- > ComputerSystem - 27_define_pause_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 32_start_reboot.py: XFAIL > ERROR - In fn cim_state_change() > ERROR - Failed to change state of the domain 'cs_test_domain' > ERROR - Exception: (1, u'Unable to reboot domain: > this function is not supported by the hypervisor: virDomainReboot') > ERROR - Exception: Unable reboot dom 'cs_test_domain' > InvokeMethod(RequestStateChange): Unable to reboot domain: this > function is not supported by the hypervisor: virDomainReboot > Bug:<00005> > -------------------------------------------------------------------- > ComputerSystem - 33_suspend_reboot.py: XFAIL > ERROR - In fn cim_state_change() > ERROR - Failed to change state of the domain 'test_domain' > ERROR - Exception: (7, u'State not supported') > ERROR - Exception: Unable Suspend dom 'test_domain' > InvokeMethod(RequestStateChange): State not supported > Bug:<00012> > -------------------------------------------------------------------- > ComputerSystem - 35_start_reset.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 40_RSC_start.py: PASS > -------------------------------------------------------------------- > ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP > -------------------------------------------------------------------- > ComputerSystem - 42_cs_gi_errs.py: PASS > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: SKIP > -------------------------------------------------------------------- > ElementAllocatedFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementAllocatedFromPool - 03_reverse_errs.py: SKIP > -------------------------------------------------------------------- > ElementAllocatedFromPool - 04_forward_errs.py: SKIP > -------------------------------------------------------------------- > ElementCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ElementCapabilities - 05_hostsystem_cap.py: PASS > -------------------------------------------------------------------- > ElementConforms - 01_forward.py: FAIL > ERROR - verify_fields() exception: > u'LXC_AllocationCapabilities' > ERROR - Exception: Failed to verify instance > Class not found > -------------------------------------------------------------------- > ElementConforms - 02_reverse.py: PASS > -------------------------------------------------------------------- > ElementConforms - 03_ectp_fwd_errs.py: PASS > -------------------------------------------------------------------- > ElementConforms - 04_ectp_rev_errs.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 01_forward.py: PASS > -------------------------------------------------------------------- > ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 01_enum.py: PASS > -------------------------------------------------------------------- > HostSystem - 02_hostsystem_to_rasd.py: XFAIL > ERROR - InstanceID Mismatch > ERROR - Returned CrossClass_GuestDom/mouse:xen > instead of CrossClass_GuestDom/mouse:usb > Class not found > Bug:<00009> > -------------------------------------------------------------------- > HostSystem - 03_hs_to_settdefcap.py: PASS > -------------------------------------------------------------------- > HostSystem - 04_hs_to_EAPF.py: PASS > -------------------------------------------------------------------- > HostSystem - 05_hs_gi_errs.py: PASS > -------------------------------------------------------------------- > HostSystem - 06_hs_to_vsms.py: PASS > -------------------------------------------------------------------- > HostedDependency - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedDependency - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedDependency - 03_enabledstate.py: XFAIL > ERROR - Exception: (1, u'Unable to pause domain: > this function is not supported by the hypervisor: virDomainSuspend') > ERROR - Failed to suspend the dom: hd_domain1 > InvokeMethod(RequestStateChange): Unable to pause domain: this > function is not supported by the hypervisor: virDomainSuspend > Bug:<00011> > -------------------------------------------------------------------- > HostedDependency - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedResourcePool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 01_forward.py: PASS > -------------------------------------------------------------------- > HostedService - 02_reverse.py: PASS > -------------------------------------------------------------------- > HostedService - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > HostedService - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > LogicalDisk - 01_disk.py: SKIP > -------------------------------------------------------------------- > LogicalDisk - 02_nodevs.py: SKIP > ERROR - System has defined domains; unable to run > -------------------------------------------------------------------- > LogicalDisk - 03_ld_gi_errs.py: SKIP > -------------------------------------------------------------------- > Memory - 01_memory.py: PASS > -------------------------------------------------------------------- > Memory - 02_defgetmem.py: PASS > -------------------------------------------------------------------- > Memory - 03_mem_gi_errs.py: PASS > -------------------------------------------------------------------- > NetworkPort - 01_netport.py: SKIP > -------------------------------------------------------------------- > NetworkPort - 02_np_gi_errors.py: SKIP > -------------------------------------------------------------------- > NetworkPort - 03_user_netport.py: SKIP > -------------------------------------------------------------------- > Processor - 01_processor.py: SKIP > -------------------------------------------------------------------- > Processor - 02_definesys_get_procs.py: SKIP > -------------------------------------------------------------------- > Processor - 03_proc_gi_errs.py: SKIP > -------------------------------------------------------------------- > Profile - 01_enum.py: PASS > -------------------------------------------------------------------- > Profile - 02_profile_to_elec.py: PASS > -------------------------------------------------------------------- > Profile - 03_rprofile_gi_errs.py: PASS > -------------------------------------------------------------------- > RASD - 01_verify_rasd_fields.py: PASS > -------------------------------------------------------------------- > RASD - 02_enum.py: PASS > -------------------------------------------------------------------- > RASD - 03_rasd_errs.py: PASS > -------------------------------------------------------------------- > RASD - 04_disk_rasd_size.py: SKIP > -------------------------------------------------------------------- > RASD - 05_disk_rasd_emu_type.py: SKIP > -------------------------------------------------------------------- > RedirectionService - 01_enum_crs.py: PASS > -------------------------------------------------------------------- > RedirectionService - 02_enum_crscap.py: PASS > -------------------------------------------------------------------- > RedirectionService - 03_RedirectionSAP_errs.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 01_verify_refprof.py: PASS > -------------------------------------------------------------------- > ReferencedProfile - 02_refprofile_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 01_forward.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 02_reverse.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 04_reverse_errs.py: PASS > -------------------------------------------------------------------- > ResourceAllocationFromPool - 05_RAPF_err.py: SKIP > -------------------------------------------------------------------- > ResourcePool - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePool - 02_rp_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 01_enum.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP > -------------------------------------------------------------------- > ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP > -------------------------------------------------------------------- > SettingsDefine - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 02_reverse.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 03_sds_fwd_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefine - 04_sds_rev_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 01_forward.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 03_forward_errs.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS > -------------------------------------------------------------------- > SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS > -------------------------------------------------------------------- > SystemDevice - 01_forward.py: PASS > -------------------------------------------------------------------- > SystemDevice - 02_reverse.py: PASS > -------------------------------------------------------------------- > SystemDevice - 03_fwderrs.py: PASS > -------------------------------------------------------------------- > VSSD - 01_enum.py: PASS > -------------------------------------------------------------------- > VSSD - 02_bootldr.py: SKIP > -------------------------------------------------------------------- > VSSD - 03_vssd_gi_errs.py: PASS > -------------------------------------------------------------------- > VSSD - 04_vssd_to_rasd.py: XFAIL > ERROR - InstanceID Mismatch > ERROR - Returned VSSDC_dom/mouse:xen instead of > VSSDC_dom/mouse:usb > Bug:<00009> > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 01_definesystem_name.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 02_destroysystem.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 03_definesystem_ess.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 04_definesystem_ers.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 05_destroysystem_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 06_addresource.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 07_addresource_neg.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 08_modifyresource.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 09_procrasd_persist.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 10_hv_version.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 12_referenced_config.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP > -------------------------------------------------------------------- > VirtualSystemManagementService - 14_define_sys_disk.py: PASS > -------------------------------------------------------------------- > VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL > ERROR - rstest_domain not updated properly. > ERROR - Exp AutomaticRecoveryAction=3, got 2 > Bug:<00008> > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationService - 01_migratable_host.py: SKIP > -------------------------------------------------------------------- > VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP > -------------------------------------------------------------------- > VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 01_forward.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 02_reverse.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS > -------------------------------------------------------------------- > VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS > -------------------------------------------------------------------- > _______________________________________________ > 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 Jan 19 03:03:36 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 19 Jan 2009 11:03:36 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 19 2009): KVM on Fedora release 9.90.1 (Rawhide) with sfcb Message-ID: ================================================= Test Run Summary (Jan 19 2009): KVM on Fedora release 9.90.1 (Rawhide) with sfcb ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 800 Libvirt-cim changeset: 611757263edd Cimtest revision: 598 Cimtest changeset: 32645e444b32 ================================================= FAIL : 1 XFAIL : 2 SKIP : 4 PASS : 134 ----------------- Total : 141 ================================================= FAIL Test Summary: ElementConforms - 01_forward.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 - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot') ERROR - Exception: Unable reboot dom 'cs_test_domain' InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: 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 Class not found -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: 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 Jan 19 03:14:39 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 19 Jan 2009 11:14:39 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 19 2009): KVM on Fedora release 10 (Cambridge) with Pegasus Message-ID: ================================================= Test Run Summary (Jan 19 2009): KVM on Fedora release 10 (Cambridge) with Pegasus ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.7-134.fc10.x86_64 libvirt: Unknown Hypervisor: Unknown CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 800 Libvirt-cim changeset: 611757263edd Cimtest revision: 598 Cimtest changeset: 32645e444b32 ================================================= FAIL : 1 XFAIL : 2 SKIP : 7 PASS : 131 ----------------- Total : 141 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP HostSystem - 05_hs_gi_errs.py: SKIP LogicalDisk - 02_nodevs.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_pause_pause.py: PASS -------------------------------------------------------------------- ComputerSystem - 27_define_pause_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'CIM_ERR_FAILED: Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot') 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 - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'KVM_AllocationCapabilities' ERROR - Exception: Failed to verify instance -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: SKIP -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: 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 -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: 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 Jan 19 03:19:08 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 19 Jan 2009 11:19:08 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 19 2009): LXC on Fedora release 10 (Cambridge) with Pegasus Message-ID: ================================================= Test Run Summary (Jan 19 2009): LXC on Fedora release 10 (Cambridge) with Pegasus ================================================= Distro: Fedora release 10 (Cambridge) Kernel: 2.6.27.7-134.fc10.x86_64 libvirt: Unknown Hypervisor: Unknown CIMOM: Pegasus 2.7.1 Libvirt-cim revision: 800 Libvirt-cim changeset: 611757263edd Cimtest revision: 598 Cimtest changeset: 32645e444b32 ================================================= FAIL : 1 XFAIL : 9 SKIP : 33 PASS : 98 ----------------- Total : 141 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 06_paused_active_suspend.py: XFAIL ComputerSystem - 23_pause_pause.py: XFAIL ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL HostSystem - 02_hostsystem_to_rasd.py: XFAIL HostedDependency - 03_enabledstate.py: XFAIL VSSD - 04_vssd_to_rasd.py: XFAIL VirtualSystemManagementService - 10_hv_version.py: XFAIL VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystemIndication - 01_created_indication.py: SKIP ElementAllocatedFromPool - 03_reverse_errs.py: SKIP ElementAllocatedFromPool - 04_forward_errs.py: SKIP HostSystem - 05_hs_gi_errs.py: SKIP LogicalDisk - 01_disk.py: SKIP LogicalDisk - 02_nodevs.py: SKIP LogicalDisk - 03_ld_gi_errs.py: SKIP NetworkPort - 01_netport.py: SKIP NetworkPort - 02_np_gi_errors.py: SKIP NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: SKIP Processor - 02_definesys_get_procs.py: SKIP Processor - 03_proc_gi_errs.py: SKIP RASD - 04_disk_rasd_size.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP ResourceAllocationFromPool - 05_RAPF_err.py: SKIP ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemManagementService - 08_modifyresource.py: SKIP VirtualSystemManagementService - 09_procrasd_persist.py: SKIP VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP VirtualSystemManagementService - 12_referenced_config.py: SKIP VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'DomST1' ERROR - Exception: (1, u'CIM_ERR_FAILED: Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Exception variable: Unable pause dom 'DomST1' InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_pause_pause.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'CIM_ERR_FAILED: Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Exception: 'Unable pause dom 'cs_test_domain'' InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 27_define_pause_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'CIM_ERR_FAILED: Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot') 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 - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: SKIP -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'LXC_AllocationCapabilities' ERROR - Exception: Failed to verify instance -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned CrossClass_GuestDom/mouse:xen instead of CrossClass_GuestDom/mouse:usb Bug:<00009> -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: SKIP -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: XFAIL ERROR - Exception: (1, u'CIM_ERR_FAILED: Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Failed to suspend the dom: hd_domain1 InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: SKIP -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: SKIP -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: SKIP -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: SKIP -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: SKIP -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: SKIP -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: SKIP -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: SKIP -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: SKIP -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned VSSDC_dom/mouse:xen instead of VSSDC_dom/mouse:usb Bug:<00009> -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: XFAIL ERROR - CIM says version is `LXC 2.6.27', but libvirt says `None' Bug:<00006> -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00008> -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From ugopalak at in.ibm.com Mon Jan 19 04:36:04 2009 From: ugopalak at in.ibm.com (U Gopalakrishnan) Date: Mon, 19 Jan 2009 10:06:04 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: <4970D8A6.3090307@linux.vnet.ibm.com> Message-ID: > You can check to see if the root/cimv2 namespace is populated by doing > the following: > /var/lib/Pegasus/repository/root#cimv2/classes > You should see a number of classes there. CIM_SystemComponent should be > present there as well. I checked by Pegasus installation root/cimv2 is populated and CIM_SystemComponent class is also present. Here is the output. # ls /var/lib/Pegasus/repository/root#cimv2/classes |grep CIM_SystemComponent CIM_AccountOnSystem.CIM_SystemComponent CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent CIM_ASBGPEndpoints.CIM_SystemComponent CIM_ComponentCS.CIM_SystemComponent CIM_Confederation.CIM_SystemComponent CIM_ContainedDomain.CIM_SystemComponent CIM_FilterEntryInSystem.CIM_SystemComponent CIM_FilterListInSystem.CIM_SystemComponent CIM_HostedFileSystem.CIM_SystemComponent CIM_HostedStoragePool.CIM_SystemComponent CIM_InstalledOS.CIM_SystemComponent CIM_J2eeApplicationModule.CIM_SystemComponent CIM_J2eeServerInDomain.CIM_SystemComponent CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent CIM_ResourceOfSystem.CIM_SystemComponent CIM_RoutersInAS.CIM_SystemComponent CIM_SystemBIOS.CIM_SystemComponent CIM_SystemComponent.CIM_Component CIM_SystemDevice.CIM_SystemComponent # I dont see CIM_HostedResourcePool in root/cimv2. But do see it in root/virt namespace. # ls /var/lib/Pegasus/repository/root#virt/classes |grep CIM_SystemComponent CIM_AccountOnSystem.CIM_SystemComponent CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent CIM_ASBGPEndpoints.CIM_SystemComponent CIM_ComponentCS.CIM_SystemComponent CIM_Confederation.CIM_SystemComponent CIM_ContainedDomain.CIM_SystemComponent CIM_FilterEntryInSystem.CIM_SystemComponent CIM_FilterListInSystem.CIM_SystemComponent CIM_HostedFileSystem.CIM_SystemComponent CIM_HostedResourcePool.CIM_SystemComponent CIM_InstalledOS.CIM_SystemComponent CIM_J2eeApplicationModule.CIM_SystemComponent CIM_J2eeServerInDomain.CIM_SystemComponent CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent CIM_ResourceOfSystem.CIM_SystemComponent CIM_RoutersInAS.CIM_SystemComponent CIM_SystemBIOS.CIM_SystemComponent CIM_SystemComponent.CIM_Component CIM_SystemDevice.CIM_SystemComponent # Thanks Gopal -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Jan 19 05:59:25 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 19 Jan 2009 11:29:25 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: References: Message-ID: <497416BD.1020605@linux.vnet.ibm.com> U Gopalakrishnan wrote: > > > You can check to see if the root/cimv2 namespace is populated by doing > > the following: > > > /var/lib/Pegasus/repository/root#cimv2/classes > > > You should see a number of classes there. CIM_SystemComponent > should be > > present there as well. > > I checked by Pegasus installation root/cimv2 is populated and > CIM_SystemComponent class is also present. > Here is the output. > > # ls /var/lib/Pegasus/repository/root#cimv2/classes |grep > CIM_SystemComponent > CIM_AccountOnSystem.CIM_SystemComponent > CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent > CIM_ASBGPEndpoints.CIM_SystemComponent > CIM_ComponentCS.CIM_SystemComponent > CIM_Confederation.CIM_SystemComponent > CIM_ContainedDomain.CIM_SystemComponent > CIM_FilterEntryInSystem.CIM_SystemComponent > CIM_FilterListInSystem.CIM_SystemComponent > CIM_HostedFileSystem.CIM_SystemComponent > CIM_HostedStoragePool.CIM_SystemComponent > CIM_InstalledOS.CIM_SystemComponent > CIM_J2eeApplicationModule.CIM_SystemComponent > CIM_J2eeServerInDomain.CIM_SystemComponent > CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent > CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent > CIM_ResourceOfSystem.CIM_SystemComponent > CIM_RoutersInAS.CIM_SystemComponent > CIM_SystemBIOS.CIM_SystemComponent > CIM_SystemComponent.CIM_Component > CIM_SystemDevice.CIM_SystemComponent > # > > I dont see CIM_HostedResourcePool in root/cimv2. But do see it in > root/virt namespace. The CIM_HostedResourcePool needs to be present in the root/cimv2 namespace as well. > > # ls /var/lib/Pegasus/repository/root#virt/classes |grep > CIM_SystemComponent > CIM_AccountOnSystem.CIM_SystemComponent > CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent > CIM_ASBGPEndpoints.CIM_SystemComponent > CIM_ComponentCS.CIM_SystemComponent > CIM_Confederation.CIM_SystemComponent > CIM_ContainedDomain.CIM_SystemComponent > CIM_FilterEntryInSystem.CIM_SystemComponent > CIM_FilterListInSystem.CIM_SystemComponent > CIM_HostedFileSystem.CIM_SystemComponent > CIM_HostedResourcePool.CIM_SystemComponent > CIM_InstalledOS.CIM_SystemComponent > CIM_J2eeApplicationModule.CIM_SystemComponent > CIM_J2eeServerInDomain.CIM_SystemComponent > CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent > CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent > CIM_ResourceOfSystem.CIM_SystemComponent > CIM_RoutersInAS.CIM_SystemComponent > CIM_SystemBIOS.CIM_SystemComponent > CIM_SystemComponent.CIM_Component > CIM_SystemDevice.CIM_SystemComponent > # > > Thanks > Gopal Can you 1) unistall the pegasus 2) rm -rf /var/lib/Pegasus/repository, 3) Install the pegasus 4) verify the HostedResourcePool registered in the root/cimv2 namespace by executing wbemcli ecn http://root:passwd at localhost/root/cimv2 | grep CIM_HostedResourcePool localhost:5988/root/cimv2:CIM_HostedResourcePool 5) then do a make preinstall ,make postinstall. This should quickly solve the problem for you. > ------------------------------------------------------------------------ > > _______________________________________________ > 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 Jan 19 05:54:45 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 19 Jan 2009 13:54:45 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 19 2009): KVM on Fedora release 9 (Sulphur) with Pegasus Message-ID: ================================================= Test Run Summary (Jan 19 2009): KVM on Fedora release 9 (Sulphur) with Pegasus ================================================= Distro: Fedora release 9 (Sulphur) Kernel: 2.6.25.14-108.fc9.x86_64 libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 598 Cimtest changeset: 32645e444b32 ================================================= FAIL : 0 XFAIL : 3 SKIP : 8 PASS : 130 ----------------- Total : 141 ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: 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 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 - In fn cim_state_change() ERROR - Failed to change state of the domain 'cs_test_domain' ERROR - Exception: (1, u'CIM_ERR_FAILED: Domain Operation Failed') ERROR - Exception: Unable reboot dom 'cs_test_domain' InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed Bug:<00005> -------------------------------------------------------------------- ComputerSystem - 33_suspend_reboot.py: XFAIL ERROR - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: PASS -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00010> -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From deeptik at linux.vnet.ibm.com Mon Jan 19 06:37:01 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 19 Jan 2009 12:07:01 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Add CodyingSystem and SubmittingPatches files In-Reply-To: References: Message-ID: <49741F8D.4090306@linux.vnet.ibm.com> Very Good write up. I have few ideas along with some comments on this patch(Please see inline for comments). We can improve it further including the information for "How to write a test case?" This would include information like: 1) What kind of function should be included in the libraries present in the XenKVMLib directory. 2) What should not be included in libraries present in the cimtest/lib. 3) What type of logger statements to be used for giving different messages, for ex: use logger.info("Some information") or else use logger.error("To print error") 4) Also, License information to be included in the test cases. 5) Including small description about what the test case does at the beginning will help in maintenance in the long run. 6) Commands to submit a Single patch, commands to submit a Patch Set using *"hg". T*his will make things easy for someone who is using *hg* for the first time and might encourage more new people to contribute. We can rename the CodingStyle file to "Cimtest_Howto_Doc" and then Include all the above information along with the CodingStyle in one file. We can advertise the presence of these documents at the http://wiki.libvirt.org/page/Cimtest_todo page. Any thoughts ?? Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232145843 28800 > # Node ID d94576542b4d6479ad04da466406c0cdb391f6e8 > # Parent 684561f21975c7420cb7e15affc1eec4a8ed35ae > [TEST] Add CodyingSystem and SubmittingPatches files > > Signed-off-by: Kaitlin Rupert > > + > +Guidelines for Submitting Patches. > + > + Patches should be submitted using Mercurial's patchbomb extension, > + and we recommend using the queues extension as well. On top of that, > + we have some guidelines you should follow when submitting patches. > + This makes reviewing patches easier, which in turns improves the > + chances of your patch being accepted in a timely fashion. > + > +Single Patches: > + > + (a) When you add a patch to the queue you have an idea of where you're > + going with it, and the commit message should reflect that. Be > + specific. Avoid just saying something like, "Various fixes to > + AllocationCapabilities." Add a list of what was actually fixed, > + like, "Add EnumInstanceNames support," and, "Eliminate duplicate > + instances." > + > + (b) The first line of your commit message will be the subject of the > + patch email when you send it out, so write it like a subject. Keep > + it short and to the point, then start a new line and feel free to be > + as verbose as you need to be. The entire commit message will be > + included in the patch. > + > + (c) Stay on task with a patch. If you notice other problems while you > + are working on patch, and they are not most definitely specific to > + your patch, they should be another patch. The same goes for > + nitpicking. While it might be only a line or two here and there > + that is off track, this is actually one of the easiest ways to make > + a patch difficult to review. All the trivial changes hide what is > + really going on. Make the unrelated changes a new patch or don't > + make them at all. > + > + (d) Before you email, export. If you have a patch called "alloc_fixes", > + which would be emailed with "hg email alloc_fixes", you should first > + run "hg export alloc_fixes". This lets you review your patch. Does > + it have any typos in the comments? Did you accidentally include an > + irrelevant change? Is your commit message still accurate and useful? > + This is the single biggest step in ensuring you have a good patch. > Need to include the step in case where hg export exposes something missing. Do we need to rework or just include the changes on top of the latest changes commit the changes and send the two patches? OR include the new work in the latest cimtest tree, do the missing changes and send all the changes as part of one patch. > + > + (e) If your patch needs to be reworked and resent, prepend a "version > + number" to the first line of the commit message. For example, "Add > + EnumInstance to RASD," becomes "(#2) Add EnumInstance to RASD." > + This helps mail readers thread discussions correctly and helps > + maintainers know they are applying the right version of your patch. > + At the end of the commit message, explain what is different from one > + version to the next. Nobody likes having to diff a diff. > + > + (f) If your patch depends on a patch that exists on the mailing list but > + not in the tree, it is okay to send your patch to the list as long > + as your commit message mentions the dependency. It is also a good > + idea to import the patch into your tree before you make your patch. > + For example, a new patch called "cu_statusf API change" is on the > + list, and your patch needs the new API. Save the email (no need to > + trim headers) as api_change.eml, then do "hg qimport api_change.eml" > + and "hg qpush" so that the patch is applied to your tree. Now write > + your patch on top of it. You should still indicate the dependency > + in your commit message. > + > + > +Patchsets: > + > + (a) When you send a group of patches, Mercurial's email extension will > + create a "header" email. Make the subject and body of that email > + meaningful, so we know how the patches relate. It's easy to say, > + "Each patch has a commit message, it's obvious how they work > + together," but the rest of the list usually won't agree with that. > + If the commit messages for each patch are good, you shouldn't need > + more than a sentence or two to tie them all together, but you do > + need it. > + > + (b) If any of your patches are rejected and you rework them, resend the > + entire set. This prevents things like, "So use patch 1 of 4 from > + the set I sent yesterday, 2 and 3 of 4 from the patch I sent an hour > + later, and patch 4 of 4 from today." > + > + (c) If you resend a patchset, apply part (e) of the Single Patches > + guidelines to your "Patch [0 of 3]" header email, for all the same > + reasons. > + > Including the Sign-off in each cimtest patch is also very important. > +Questions/Comments on the Guidelines should be directed to: > + Kaitlin Rupert > > _______________________________________________ > 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 ugopalak at in.ibm.com Mon Jan 19 07:21:32 2009 From: ugopalak at in.ibm.com (U Gopalakrishnan) Date: Mon, 19 Jan 2009 12:51:32 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: <497416BD.1020605@linux.vnet.ibm.com> Message-ID: Hi Deepti, > Can you > 1) unistall the pegasus > 2) rm -rf /var/lib/Pegasus/repository, > 3) Install the pegasus > 4) verify the HostedResourcePool registered in the root/cimv2 namespace > by executing > wbemcli ecn http://root:passwd at localhost/root/cimv2 | grep > CIM_HostedResourcePool > localhost:5988/root/cimv2:CIM_HostedResourcePool Re-installed pegasus, and checked for CIM_HostedResourcePool in root/cimv2. The class is not registered. # wbemcli ecn http://root:xxxx at localhost/root/cimv2 | grep CIM_HostedResourcePool # Here is all the SystemComponent classes # ls /var/lib/Pegasus/repository/root#cimv2/classes | grep CIM_SystemComponent CIM_AccountOnSystem.CIM_SystemComponent CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent CIM_ASBGPEndpoints.CIM_SystemComponent CIM_ComponentCS.CIM_SystemComponent CIM_Confederation.CIM_SystemComponent CIM_ContainedDomain.CIM_SystemComponent CIM_FilterEntryInSystem.CIM_SystemComponent CIM_FilterListInSystem.CIM_SystemComponent CIM_HostedFileSystem.CIM_SystemComponent CIM_HostedStoragePool.CIM_SystemComponent CIM_InstalledOS.CIM_SystemComponent CIM_J2eeApplicationModule.CIM_SystemComponent CIM_J2eeServerInDomain.CIM_SystemComponent CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent CIM_ResourceOfSystem.CIM_SystemComponent CIM_RoutersInAS.CIM_SystemComponent CIM_SystemBIOS.CIM_SystemComponent CIM_SystemComponent.CIM_Component CIM_SystemDevice.CIM_SystemComponent # how do we proceed now? Thanks Gopal Deepti B Kalakeri Sent by: libvirt-cim-bounces at redhat.com 01/19/2009 11:29 Please respond to List for discussion and development of libvirt CIM To List for discussion and development of libvirt CIM cc Subject Re: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim U Gopalakrishnan wrote: > > > You can check to see if the root/cimv2 namespace is populated by doing > > the following: > > > /var/lib/Pegasus/repository/root#cimv2/classes > > > You should see a number of classes there. CIM_SystemComponent > should be > > present there as well. > > I checked by Pegasus installation root/cimv2 is populated and > CIM_SystemComponent class is also present. > Here is the output. > > # ls /var/lib/Pegasus/repository/root#cimv2/classes |grep > CIM_SystemComponent > CIM_AccountOnSystem.CIM_SystemComponent > CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent > CIM_ASBGPEndpoints.CIM_SystemComponent > CIM_ComponentCS.CIM_SystemComponent > CIM_Confederation.CIM_SystemComponent > CIM_ContainedDomain.CIM_SystemComponent > CIM_FilterEntryInSystem.CIM_SystemComponent > CIM_FilterListInSystem.CIM_SystemComponent > CIM_HostedFileSystem.CIM_SystemComponent > CIM_HostedStoragePool.CIM_SystemComponent > CIM_InstalledOS.CIM_SystemComponent > CIM_J2eeApplicationModule.CIM_SystemComponent > CIM_J2eeServerInDomain.CIM_SystemComponent > CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent > CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent > CIM_ResourceOfSystem.CIM_SystemComponent > CIM_RoutersInAS.CIM_SystemComponent > CIM_SystemBIOS.CIM_SystemComponent > CIM_SystemComponent.CIM_Component > CIM_SystemDevice.CIM_SystemComponent > # > > I dont see CIM_HostedResourcePool in root/cimv2. But do see it in > root/virt namespace. The CIM_HostedResourcePool needs to be present in the root/cimv2 namespace as well. > > # ls /var/lib/Pegasus/repository/root#virt/classes |grep > CIM_SystemComponent > CIM_AccountOnSystem.CIM_SystemComponent > CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent > CIM_ASBGPEndpoints.CIM_SystemComponent > CIM_ComponentCS.CIM_SystemComponent > CIM_Confederation.CIM_SystemComponent > CIM_ContainedDomain.CIM_SystemComponent > CIM_FilterEntryInSystem.CIM_SystemComponent > CIM_FilterListInSystem.CIM_SystemComponent > CIM_HostedFileSystem.CIM_SystemComponent > CIM_HostedResourcePool.CIM_SystemComponent > CIM_InstalledOS.CIM_SystemComponent > CIM_J2eeApplicationModule.CIM_SystemComponent > CIM_J2eeServerInDomain.CIM_SystemComponent > CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent > CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent > CIM_ResourceOfSystem.CIM_SystemComponent > CIM_RoutersInAS.CIM_SystemComponent > CIM_SystemBIOS.CIM_SystemComponent > CIM_SystemComponent.CIM_Component > CIM_SystemDevice.CIM_SystemComponent > # > > Thanks > Gopal Can you 1) unistall the pegasus 2) rm -rf /var/lib/Pegasus/repository, 3) Install the pegasus 4) verify the HostedResourcePool registered in the root/cimv2 namespace by executing wbemcli ecn http://root:passwd at localhost/root/cimv2 | grep CIM_HostedResourcePool localhost:5988/root/cimv2:CIM_HostedResourcePool 5) then do a make preinstall ,make postinstall. This should quickly solve the problem for you. > ------------------------------------------------------------------------ > > _______________________________________________ > 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 Jan 19 07:26:48 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Mon, 19 Jan 2009 15:26:48 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add CodyingSystem and SubmittingPatches files In-Reply-To: <49741F8D.4090306@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-19 14:37:01: > Very Good write up. I have few ideas along with some comments on this > patch(Please see inline for comments). > We can improve it further including the information for "How to write a > test case?" > This would include information like: > 1) What kind of function should be included in the libraries present in > the XenKVMLib directory. > 2) What should not be included in libraries present in the cimtest/lib. > 3) What type of logger statements to be used for giving different > messages, for ex: use logger.info("Some information") or else use > logger.error("To print error") > 4) Also, License information to be included in the test cases. > 5) Including small description about what the test case does at the > beginning will help in maintenance in the long run. > 6) Commands to submit a Single patch, commands to submit a Patch Set > using *"hg". > T*his will make things easy for someone who is using *hg* for the first > time and might encourage more new people to contribute. > We can rename the CodingStyle file to "Cimtest_Howto_Doc" and then > Include all the above information along with the CodingStyle in one file. > We can advertise the presence of these documents at the > http://wiki.libvirt.org/page/Cimtest_todo page. > Any thoughts ?? > Good. When this patch is applied, I think we should check all the libraries and test cases present to make them follow this coding style. Then we can cook up new tc. > > Kaitlin Rupert wrote: > > # HG changeset patch > > # User Kaitlin Rupert > > # Date 1232145843 28800 > > # Node ID d94576542b4d6479ad04da466406c0cdb391f6e8 > > # Parent 684561f21975c7420cb7e15affc1eec4a8ed35ae > > [TEST] Add CodyingSystem and SubmittingPatches files > > > > Signed-off-by: Kaitlin Rupert > > > > + > > +Guidelines for Submitting Patches. > > + > > + Patches should be submitted using Mercurial's > patchbomb extension, > > + and we recommend using the queues extension as well. > On top of that, > > + we have some guidelines you should follow when > submitting patches. > > + This makes reviewing patches easier, which in turns > improves the > > + chances of your patch being accepted in a timely fashion. > > + > > +Single Patches: > > + > > + (a) When you add a patch to the queue you have an idea of > where you're > > + going with it, and the commit message should reflect that. Be > > + specific. Avoid just saying something like, "Various fixes to > > + AllocationCapabilities." Add a list of what was > actually fixed, > > + like, "Add EnumInstanceNames support," and, "Eliminateduplicate > > + instances." > > + > > + (b) The first line of your commit message will be the > subject of the > > + patch email when you send it out, so write it like a > subject. Keep > > + it short and to the point, then start a new line and > feel free to be > > + as verbose as you need to be. The entire commit > message will be > > + included in the patch. > > + > > + (c) Stay on task with a patch. If you notice other > problems while you > > + are working on patch, and they are not most definitely > specific to > > + your patch, they should be another patch. The same goes for > > + nitpicking. While it might be only a line or two hereand there > > + that is off track, this is actually one of the easiest > ways to make > > + a patch difficult to review. All the trivial changes > hide what is > > + really going on. Make the unrelated changes a new > patch or don't > > + make them at all. > > + > > + (d) Before you email, export. If you have a patch called > "alloc_fixes", > > + which would be emailed with "hg email alloc_fixes", > you should first > > + run "hg export alloc_fixes". This lets you review > your patch. Does > > + it have any typos in the comments? Did you > accidentally include an > > + irrelevant change? Is your commit message still > accurate and useful? > > + This is the single biggest step in ensuring you have a > good patch. > > > Need to include the step in case where hg export exposes something missing. > Do we need to rework or just include the changes on top of the latest > changes commit the changes and send the two patches? > OR include the new work in the latest cimtest tree, do the missing > changes and send all the changes as part of one patch. > > + > > + (e) If your patch needs to be reworked and resent, prepend > a "version > > + number" to the first line of the commit message. For > example, "Add > > + EnumInstance to RASD," becomes "(#2) Add EnumInstance > to RASD." > > + This helps mail readers thread discussions correctly and helps > > + maintainers know they are applying the right version > of your patch. > > + At the end of the commit message, explain what is > different from one > > + version to the next. Nobody likes having to diff a diff. > > + > > + (f) If your patch depends on a patch that exists on the > mailing list but > > + not in the tree, it is okay to send your patch to the > list as long > > + as your commit message mentions the dependency. It is > also a good > > + idea to import the patch into your tree before you > make your patch. > > + For example, a new patch called "cu_statusf API > change" is on the > > + list, and your patch needs the new API. Save the > email (no need to > > + trim headers) as api_change.eml, then do "hg qimport > api_change.eml" > > + and "hg qpush" so that the patch is applied to your > tree. Now write > > + your patch on top of it. You should still indicate > the dependency > > + in your commit message. > > + > > + > > +Patchsets: > > + > > + (a) When you send a group of patches, Mercurial's email > extension will > > + create a "header" email. Make the subject and body ofthat email > > + meaningful, so we know how the patches relate. It's > easy to say, > > + "Each patch has a commit message, it's obvious how they work > > + together," but the rest of the list usually won't > agree with that. > > + If the commit messages for each patch are good, you > shouldn't need > > + more than a sentence or two to tie them all together, > but you do > > + need it. > > + > > + (b) If any of your patches are rejected and you rework > them, resend the > > + entire set. This prevents things like, "So use patch > 1 of 4 from > > + the set I sent yesterday, 2 and 3 of 4 from the patch > I sent an hour > > + later, and patch 4 of 4 from today." > > + > > + (c) If you resend a patchset, apply part (e) of the Single Patches > > + guidelines to your "Patch [0 of 3]" header email, for > all the same > > + reasons. > > + > > > Including the Sign-off in each cimtest patch is also very important. > > +Questions/Comments on the Guidelines should be directed to: > > + Kaitlin Rupert > > > > _______________________________________________ > > 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 deeptik at linux.vnet.ibm.com Mon Jan 19 07:35:29 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 19 Jan 2009 13:05:29 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Update VSMS 04_definesystem_ers.py to use cim_define() In-Reply-To: <57f3bc7c3105bb779b41.1232137692@localhost.localdomain> References: <57f3bc7c3105bb779b41.1232137692@localhost.localdomain> Message-ID: <49742D41.6080908@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232135486 28800 > # Node ID 57f3bc7c3105bb779b41e19b1c03a1e5f214cec1 > # Parent 32645e444b323b137d0c0a2a323be574b370d75a > [TEST] #3 Update VSMS 04_definesystem_ers.py to use cim_define() > > Add a err_rc and err_desc elements to the VirtCIM class. This will allow > us to check the error code and error description in case of failed CIM > method calls. > > Add two functions: set_sys_settings() and set_res_settings(). These allow the > caller to set the VSSD and RASDs after the initial init() of the VirtCIM class. > > Some of the logic in cim_define() was changed to allow the passing of just > a single RASD to DefineSystem() (instead of passing all the RASDs). > > Updates from 2 to 3: > -Rebased on current tree > > Updates from 1 to 2: > -Create function to verify return code and error description if define fails > > Signed-off-by: Kaitlin Rupert > > diff -r 32645e444b32 -r 57f3bc7c3105 suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Wed Jan 14 21:29:48 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/04_definesystem_ers.py Fri Jan 16 11:51:26 2009 -0800 > @@ -23,17 +23,14 @@ > # > > import sys > -import pywbem > -from VirtLib import utils > -from XenKvmLib import vsms > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > +from pywbem import CIM_ERR_FAILED > from CimTest.Globals import logger > from XenKvmLib.const import do_main > from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC > +from XenKvmLib.vxml import get_class > > sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > -exp_rc = 1 #CMPI_RC_ERR_FAILED > +exp_rc = CIM_ERR_FAILED > exp_desc = 'Unable to parse embedded object' > > @do_main(sup_types) > @@ -41,26 +38,28 @@ > options = main.options > > dname = 'test_domain' > - vssd, rasd = vsms.default_vssd_rasd_str(dom_name=dname, virt=options.virt) > > - params = {'vssd' : vssd, > - 'rasd' : ['wrong'] > - } > + cxml = get_class(options.virt)(dname) > > - exp_err = {'exp_rc' : exp_rc, > - 'exp_desc' : exp_desc > - } > + rasd_list = { "MemResourceAllocationSettingData" : "wrong" } > + cxml.set_res_settings(rasd_list) > > + try: > + ret = cxml.cim_define(options.ip) > + if ret: > + raise Exception('DefineSystem returned OK with invalid params') > > - rc = create_using_definesystem(dname, options.ip, params, ref_config=' ', > - exp_err=exp_err, virt=options.virt) > + status = cxml.verify_error_msg(exp_rc, exp_desc) > + if status != PASS: > + raise Exception('DefineSystem failed for an unexpected reason') > > - if rc != PASS: > - logger.error('DefineSystem should NOT return OK with a wrong ss input') > + except Exception, details: > + logger.error(details) > + status = FAIL > > - undefine_test_domain(dname, options.ip, virt=options.virt) > + cxml.undefine(options.ip) > > - return rc > + return status > > if __name__ == "__main__": > sys.exit(main()) > diff -r 32645e444b32 -r 57f3bc7c3105 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 14 21:29:48 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Jan 16 11:51:26 2009 -0800 > @@ -470,6 +470,8 @@ > mem_allocunits, emu_type): > self.virt = virt > self.domain_name = dom_name > + self.err_rc = None > + self.err_desc = None > self.vssd = vsms.get_vssd_mof(virt, dom_name) > self.nasd = vsms.get_nasd_class(virt)(type=net_type, > mac=net_mac, > @@ -491,11 +493,17 @@ > def cim_define(self, ip, ref_conf=None): > service = vsms.get_vsms_class(self.virt)(ip) > sys_settings = str(self.vssd) > - if self.virt == 'LXC' and const.LXC_netns_support is False: > - res_settings = [str(self.dasd), str(self.pasd), str(self.masd)] > - else: > - res_settings = [str(self.dasd), str(self.nasd), > - str(self.pasd), str(self.masd)] > + > + res_settings = [] > + if self.dasd is not None: > + res_settings.append(str(self.dasd)) > + if self.pasd is not None: > + res_settings.append(str(self.pasd)) > + if self.masd is not None: > + res_settings.append(str(self.masd)) > + if self.nasd is not None or \ > + (self.virt == 'LXC' and const.LXC_netns_support is False): > + res_settings.append(str(self.nasd)) > > if ref_conf is None: > ref_conf = ' ' > @@ -506,6 +514,8 @@ > ReferenceConfiguration=ref_conf) > except pywbem.CIMError, (rc, desc): > logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + self.err_rc = rc > + self.err_desc = desc > return False > > except Exception, details: > @@ -523,6 +533,12 @@ > target = pywbem.cim_obj.CIMInstanceName(cs_cn, keybindings = keys) > try: > ret = service.DestroySystem(AffectedSystem=target) > + except pywbem.CIMError, (rc, desc): > + logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + self.err_rc = rc > + self.err_desc = desc > + return False > + > except Exception, details: > logger.error('Error invoking DestroySystem') > logger.error('Got error %s with exception %s' \ > @@ -575,6 +591,12 @@ > cs.RequestStateChange(RequestedState=req_state_change, > TimeoutPeriod=time_period) > > + except pywbem.CIMError, (rc, desc): > + logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + self.err_rc = rc > + self.err_desc = desc > + return FAIL > + > except Exception, detail: > logger.error("In fn cim_state_change()") > logger.error("Failed to change state of the domain '%s'", cs.Name) > @@ -620,6 +642,36 @@ > return self.cim_state_change(server, const.CIM_RESET, > req_time, poll_time, const.CIM_ENABLE) > > + def set_sys_settings(self, vssd): > + self.vssd = vssd > + > + def set_res_settings(self, rasd_list): > + for cn, rasd in rasd_list.iteritems(): > + if cn.find("MemResourceAllocationSettingData") >= 0: > + self.masd = rasd > + elif cn.find("ProcResourceAllocationSettingData") >= 0: > + self.pasd = rasd > + elif cn.find("DiskResourceAllocationSettingData") >= 0: > + self.dasd = rasd > + elif cn.find("NetResourceAllocationSettingData") >= 0: > + self.nasd = rasd > + > + def verify_error_msg(self, exp_rc, exp_desc): > + try: > + rc = int(self.err_rc) > + > + if rc != exp_rc: > + raise Exception("Got rc: %d, exp %d." % (rc, exp_rc)) > + > + if self.err_desc.find(exp_desc) < 0: > + raise Exception("Got desc: '%s', exp '%s'" % (self.err_desc, > + exp_desc)) > + > + except Exception, details: > + logger.error(details) > + return FAIL > + > + return PASS > > class XenXML(VirtXML, VirtCIM): > > > _______________________________________________ > 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 Jan 19 07:48:10 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 19 Jan 2009 13:18:10 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: References: Message-ID: <4974303A.3020400@linux.vnet.ibm.com> U Gopalakrishnan wrote: > > Hi Deepti, > > > Can you > > 1) unistall the pegasus > > 2) rm -rf /var/lib/Pegasus/repository, > > 3) Install the pegasus > > 4) verify the HostedResourcePool registered in the root/cimv2 namespace > > by executing > > wbemcli ecn http://root:passwd at localhost/root/cimv2 | grep > > CIM_HostedResourcePool > > localhost:5988/root/cimv2:CIM_HostedResourcePool > > Re-installed pegasus, and checked for CIM_HostedResourcePool in > root/cimv2. > The class is not registered. > > # wbemcli ecn http://root:xxxx at localhost/root/cimv2 | grep > CIM_HostedResourcePool Oh! I am not sure why Pegasus 2.8.0-1 is not working. Since Kaitlin was able to work with tog-pegasus-2.7.0-1 version and you are finding problems with the Pegasus 2.8.0-1 can you try to install the Pegasus 2.7.0-1 and try. > # > > Here is all the SystemComponent classes > > # ls /var/lib/Pegasus/repository/root#cimv2/classes | grep > CIM_SystemComponent > CIM_AccountOnSystem.CIM_SystemComponent > CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent > CIM_ASBGPEndpoints.CIM_SystemComponent > CIM_ComponentCS.CIM_SystemComponent > CIM_Confederation.CIM_SystemComponent > CIM_ContainedDomain.CIM_SystemComponent > CIM_FilterEntryInSystem.CIM_SystemComponent > CIM_FilterListInSystem.CIM_SystemComponent > CIM_HostedFileSystem.CIM_SystemComponent > CIM_HostedStoragePool.CIM_SystemComponent > CIM_InstalledOS.CIM_SystemComponent > CIM_J2eeApplicationModule.CIM_SystemComponent > CIM_J2eeServerInDomain.CIM_SystemComponent > CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent > CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent > CIM_ResourceOfSystem.CIM_SystemComponent > CIM_RoutersInAS.CIM_SystemComponent > CIM_SystemBIOS.CIM_SystemComponent > CIM_SystemComponent.CIM_Component > CIM_SystemDevice.CIM_SystemComponent > # > > how do we proceed now? > > Thanks > Gopal > > > > *Deepti B Kalakeri * > Sent by: libvirt-cim-bounces at redhat.com > > 01/19/2009 11:29 > Please respond to > List for discussion and development of libvirt CIM > > > > > To > List for discussion and development of libvirt CIM > > cc > > Subject > Re: [Libvirt-cim] 'Parsing error' during make postinstall step of > installing libvirt-cim > > > > > > > > > > > > U Gopalakrishnan wrote: > > > > > You can check to see if the root/cimv2 namespace is populated by doing > > > the following: > > > > > /var/lib/Pegasus/repository/root#cimv2/classes > > > > > You should see a number of classes there. CIM_SystemComponent > > should be > > > present there as well. > > > > I checked by Pegasus installation root/cimv2 is populated and > > CIM_SystemComponent class is also present. > > Here is the output. > > > > # ls /var/lib/Pegasus/repository/root#cimv2/classes |grep > > CIM_SystemComponent > > CIM_AccountOnSystem.CIM_SystemComponent > > CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent > > CIM_ASBGPEndpoints.CIM_SystemComponent > > CIM_ComponentCS.CIM_SystemComponent > > CIM_Confederation.CIM_SystemComponent > > CIM_ContainedDomain.CIM_SystemComponent > > CIM_FilterEntryInSystem.CIM_SystemComponent > > CIM_FilterListInSystem.CIM_SystemComponent > > CIM_HostedFileSystem.CIM_SystemComponent > > CIM_HostedStoragePool.CIM_SystemComponent > > CIM_InstalledOS.CIM_SystemComponent > > CIM_J2eeApplicationModule.CIM_SystemComponent > > CIM_J2eeServerInDomain.CIM_SystemComponent > > CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent > > CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent > > CIM_ResourceOfSystem.CIM_SystemComponent > > CIM_RoutersInAS.CIM_SystemComponent > > CIM_SystemBIOS.CIM_SystemComponent > > CIM_SystemComponent.CIM_Component > > CIM_SystemDevice.CIM_SystemComponent > > # > > > > I dont see CIM_HostedResourcePool in root/cimv2. But do see it in > > root/virt namespace. > The CIM_HostedResourcePool needs to be present in the root/cimv2 > namespace as well. > > > > # ls /var/lib/Pegasus/repository/root#virt/classes |grep > > CIM_SystemComponent > > CIM_AccountOnSystem.CIM_SystemComponent > > CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent > > CIM_ASBGPEndpoints.CIM_SystemComponent > > CIM_ComponentCS.CIM_SystemComponent > > CIM_Confederation.CIM_SystemComponent > > CIM_ContainedDomain.CIM_SystemComponent > > CIM_FilterEntryInSystem.CIM_SystemComponent > > CIM_FilterListInSystem.CIM_SystemComponent > > CIM_HostedFileSystem.CIM_SystemComponent > > CIM_HostedResourcePool.CIM_SystemComponent > > CIM_InstalledOS.CIM_SystemComponent > > CIM_J2eeApplicationModule.CIM_SystemComponent > > CIM_J2eeServerInDomain.CIM_SystemComponent > > CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent > > CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent > > CIM_ResourceOfSystem.CIM_SystemComponent > > CIM_RoutersInAS.CIM_SystemComponent > > CIM_SystemBIOS.CIM_SystemComponent > > CIM_SystemComponent.CIM_Component > > CIM_SystemDevice.CIM_SystemComponent > > # > > > > Thanks > > Gopal > Can you > 1) unistall the pegasus > 2) rm -rf /var/lib/Pegasus/repository, > 3) Install the pegasus > 4) verify the HostedResourcePool registered in the root/cimv2 namespace > by executing > wbemcli ecn http://root:passwd at localhost/root/cimv2 | grep > CIM_HostedResourcePool > localhost:5988/root/cimv2:CIM_HostedResourcePool > 5) then do a make preinstall ,make postinstall. > > > This should quickly solve the problem for you. > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > 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 zli at linux.vnet.ibm.com Mon Jan 19 10:21:00 2009 From: zli at linux.vnet.ibm.com (Zhengang Li) Date: Mon, 19 Jan 2009 18:21:00 +0800 Subject: [Libvirt-cim] Test Run Summary (Jan 19 2009): KVM on Fedora release 9.90.1 (Rawhide) with sfcb In-Reply-To: References: Message-ID: <4974540C.6060702@linux.vnet.ibm.com> Hi Dan & Kaitlin, On 1/19/2009 11:03 ??, Guo Lian Yun wrote: > > ================================================= > Test Run Summary (Jan 19 2009): KVM on Fedora release 9.90.1 (Rawhide) > with sfcb > ================================================= > Distro: Fedora release 9.90.1 (Rawhide) > Kernel: 2.6.27-0.323.rc6.fc10.x86_64 > -------------------------------------------------------------------- > ComputerSystemIndication - 01_created_indication.py: PASS Did anyone run the indication test recently with sfcb on x86 (non-64bit) system? I ran into a CreateSubscription error like this: sfcb log says a sigsev: -#- Virt_ComputerSystemIndicationProvider - 10624 provider exiting due to a SIGSEGV signal Debugging there, a backtrace shows me a null mi->ft in stdi_enable_indications() yet same pointer in sfcb's stack is valid: (gdb) bt #0 stdi_enable_indications (mi=0xbfb3e778, ctx=0xb801f0b8) at std_indication.c:270 #1 0xb7fc137c in enableIndications (hdr=0x80625c0, info=0x805b0d0, requestor=-75) at providerDrv.c:2192 #2 0xb7fc2d80 in processProviderInvocationRequestsThread (prms=0x805a8d0) at providerDrv.c:2585 #3 0xb7fc3514 in processProviderInvocationRequests (name=0x8050720 "Virt_ComputerSystemIndicationProvider") at providerDrv.c:2700 #4 0xb7fb523c in getProcess (info=0x80507a8, proc=0xbfb3ef14) at providerDrv.c:602 #5 0xb7fb5709 in forkProvider (info=0x80507a8, req=0x805abb0, msg=0x0) at providerDrv.c:653 #6 0xb7fadc9d in lookupProviderList (type=4, requestor=0xbfb3f018, req=0x805abb0) at providerMgr.c:368 #7 0xb7fae3eb in processIndProviderList (requestor=0xbfb3f018, req=0x805abb0) at providerMgr.c:449 #8 0xb7fb025e in processProviderMgrRequests () at providerMgr.c:857 #9 0x0804aa14 in main (argc=3, argv=0xbfb3f154) at sfcBroker.c:791 (gdb) p *mi $5 = {hdl = 0x0, ft = 0x0} (gdb) up #1 0xb7fc137c in enableIndications (hdr=0x80625c0, info=0x805b0d0, requestor=-75) at providerDrv.c:2192 2192 info->indicationMI->ft->enableIndications(info->indicationMI,ctx); (gdb) p *(info->indicationMI) $6 = {hdl = 0xb801f0a0, ft = 0xb801f180} (gdb) Any clue here? I'm on SLES11 RC1, default i586 install, default sblim-sfcb, libvirt-cim & libcmpiutil packages. Same packages set on an x86_64 system gave me the correct result. > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim From ugopalak at in.ibm.com Mon Jan 19 10:43:06 2009 From: ugopalak at in.ibm.com (U Gopalakrishnan) Date: Mon, 19 Jan 2009 16:13:06 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: <4974303A.3020400@linux.vnet.ibm.com> Message-ID: > Oh! I am not sure why Pegasus 2.8.0-1 is not working. > Since Kaitlin was able to work with tog-pegasus-2.7.0-1 version and you > are finding problems with the Pegasus 2.8.0-1 can you try to install the > Pegasus 2.7.0-1 and try. I could manage to get only pegasus 2.7.0-2 source. I built it and installed, but still don't see CIM_HostedResourcePool class in root/cimv2 namespace :( Do you think there could be difference between 2.7.0-2 and 2.7.0-1 that could be breaking us? Also do you have a 2.7.0-1 binary/source rpm or source zip? Thanks Gopal -------------- next part -------------- An HTML attachment was scrubbed... URL: From kaitlin at linux.vnet.ibm.com Mon Jan 19 15:28:18 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 19 Jan 2009 07:28:18 -0800 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: References: Message-ID: <49749C12.5010906@linux.vnet.ibm.com> U Gopalakrishnan wrote: > > > Oh! I am not sure why Pegasus 2.8.0-1 is not working. > > Since Kaitlin was able to work with tog-pegasus-2.7.0-1 version and you > > are finding problems with the Pegasus 2.8.0-1 can you try to install the > > Pegasus 2.7.0-1 and try. The make preinstall step will add CIM_HostedResourcePool to the root/cimv2 namespace. CIM_HostedResourcePool is a subclass of CIM_SystemComponent, so CIM_SystemComponent needs to be present in the repository before CIM_HostedResourcePool can be added. Gopal, after rebuilding the Pegasus repository, have you tried running "make preinstall" again? After "make preinstall", be sure to restart Pegasus before running "make install" and "make postinstall" > > I could manage to get only pegasus 2.7.0-2 source. I built it and > installed, > but still don't see CIM_HostedResourcePool class in root/cimv2 namespace :( > > Do you think there could be difference between 2.7.0-2 and 2.7.0-1 that > could be breaking us? I don't think there should be much difference between the versions. > > Also do you have a 2.7.0-1 binary/source rpm or source zip? > I am using the Pegasus rpm from the RedHat 5.2 iso. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 19 16:18:04 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 19 Jan 2009 08:18:04 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add some error checking when detecting hypervisor version In-Reply-To: References: Message-ID: <4974A7BC.9000908@linux.vnet.ibm.com> > virsh_ver.splitlines()[3].split("hypervisor")[1] > > - hyp_ver = hyp_ver.split(": ")[1] > > + tok = virsh_ver.splitlines()[3].split("hypervisor") > > + if len(tok) > 1: > > + tok = tok[1].split(": ") > > + if len(tok) > 1: > > + hyp_ver = tok[1] > > > > return libvirt_ver, hyp_ver > > > > +1 from me. > It's better to print out error log if len(tok)<= 1. > I can resend with some additional logging. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 19 16:32:03 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 19 Jan 2009 08:32:03 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add some error checking when detecting hypervisor version Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232382714 28800 # Node ID a5a4d35749d1d9ed8604ea4879e12828c7f5b169 # Parent 57f3bc7c3105bb779b41e19b1c03a1e5f214cec1 [TEST] #2 Add some error checking when detecting hypervisor version Updates: -In libvirt or hypervisior version cannot be determined, print error message to console. Signed-off-by: Kaitlin Rupert diff -r 57f3bc7c3105 -r a5a4d35749d1 suites/libvirt-cim/lib/XenKvmLib/reporting.py --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Fri Jan 16 11:51:26 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Mon Jan 19 08:31:54 2009 -0800 @@ -50,8 +50,17 @@ libvirt_ver = virsh_ver.splitlines()[0].split()[4] if virsh_ver.splitlines()[3].find("hypervisor"): - hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] - hyp_ver = hyp_ver.split(": ")[1] + tok = virsh_ver.splitlines()[3].split("hypervisor") + if len(tok) > 1: + tok = tok[1].split(": ") + if len(tok) > 1: + hyp_ver = tok[1] + + if libvirt_ver == "Unknown": + print "\nUnable to determine libvirt version\n" + + if hyp_ver == "Unknown": + print "\nUnable to determine hypervisior version\n" return libvirt_ver, hyp_ver From kaitlin at linux.vnet.ibm.com Mon Jan 19 16:59:35 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 19 Jan 2009 08:59:35 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add CodyingSystem and SubmittingPatches files In-Reply-To: <49741F8D.4090306@linux.vnet.ibm.com> References: <49741F8D.4090306@linux.vnet.ibm.com> Message-ID: <4974B177.90301@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > Very Good write up. I have few ideas along with some comments on this > patch(Please see inline for comments). > We can improve it further including the information for "How to write a > test case?" I think most of the things you have listed here can be inferred by reading the existing test cases. I know the style has changed some, so a lot of the test cases aren't in the best shape they could be. But a lot of these issues are being fixed as tests are being updated. > This would include information like: > 1) What kind of function should be included in the libraries present in > the XenKVMLib directory. > 2) What should not be included in libraries present in the cimtest/lib. This will change over time, so I worry that the statements will become out of date and the file will not be updated accordingly. > 3) What type of logger statements to be used for giving different > messages, for ex: use logger.info("Some information") or else use > logger.error("To print error") The name of the functions here should make it obvious which to use. > 4) Also, License information to be included in the test cases. > 5) Including small description about what the test case does at the > beginning will help in maintenance in the long run. These are good points. I can update the style guide to include this info. > 6) Commands to submit a Single patch, commands to submit a Patch Set > using *"hg". > T*his will make things easy for someone who is using *hg* for the first > time and might encourage more new people to contribute. It's good to encourage people to contribute, but there are plenty of hg references out there that people can use. The SubmittingPatches file already mentioned that patches should be submitted using the patchbomb feature. From there, someone can reference mercurial's how to documents for more information. > We can rename the CodingStyle file to "Cimtest_Howto_Doc" and then > Include all the above information along with the CodingStyle in one file. I would like to keep the name as is since it parallels the format/structure of what's in libvirt-cim. > We can advertise the presence of these documents at the > http://wiki.libvirt.org/page/Cimtest_todo page. Not sure what you mean here.. the todo page is for keeping track of improvements/enhancements to the testsuite, as well as test cases that need to be written. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 19 17:01:13 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 19 Jan 2009 09:01:13 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add CodyingSystem and SubmittingPatches files In-Reply-To: References: Message-ID: <4974B1D9.7060508@linux.vnet.ibm.com> > Good. When this patch is applied, I think we should check all the > libraries and test cases > present to make them follow this coding style. Then we can cook up new > tc. > Sure. Daisy, if you'd like to look into this, that would be great. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 19 17:10:26 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 19 Jan 2009 09:10:26 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add CodyingSystem and SubmittingPatches files Message-ID: <043761891eecf7e5f565.1232385026@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232385019 28800 # Node ID 043761891eecf7e5f565a0ca74749494d878fd80 # Parent a5a4d35749d1d9ed8604ea4879e12828c7f5b169 [TEST] #2 Add CodyingSystem and SubmittingPatches files Updates: -Added information about license header and comments Signed-off-by: Kaitlin Rupert diff -r a5a4d35749d1 -r 043761891eec doc/CodingStyle --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/CodingStyle Mon Jan 19 09:10:19 2009 -0800 @@ -0,0 +1,47 @@ + +The CodingStyle for cimtest (and libcmpiutil) mostly mirrors that of +libvirt-cim but with the following "clarifications": + +- Each new file needs to have be appropriate license header (see existing test + cases) + +- Test cases should also include a short desciption that describes the purpose + of the test. + +- Four-space indents + +- 80-char width limit. Break long function calls by: + a) putting *every* parameter of the call on its own line + -or- + b) putting as many params in a line as will fit in the 80-char limit; + overflow params are placed on the subsequent line + +- Split lines should aligned like the following: + + VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path, + ntype, net_name, mac, vcpus, mem, mem_allocunits, + emu_type) + +- Identifiers should be named with underbars_and_lowercase. + +- When passing parameters to logger.error() and logger.info(), use + commas: + + logger.error("%s is not a valid network type", net_type) + + Not percent signs: + + logger.error('Got CIM error %s with return code %s' % (desc, rc)) + +- When passing parameters to Exception(), use percents: + + raise Exception("Unable to define %s" % test_dom) + + Not commas: + + raise Exception("Unable to define %s", test_dom) + +- Except for special cases, import the needed functions from a module. Do not + import the entire module: + + from XenKvmLib.classes import virt_types diff -r a5a4d35749d1 -r 043761891eec doc/SubmittingPatches --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/SubmittingPatches Mon Jan 19 09:10:19 2009 -0800 @@ -0,0 +1,117 @@ +To submit patches to libvirt-cim, you must follow the DCO process, outlined +below. + +Developer's Certificate of Origin 1.1 + By making a contribution to this project, I certify that: + + (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + + (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + + (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + + (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +then you just add a line saying + + Signed-off-by: Random J Developer + +using your real name (sorry, no pseudonyms or anonymous contributions.) + + + +Guidelines for Submitting Patches. + + Patches should be submitted using Mercurial's patchbomb extension, + and we recommend using the queues extension as well. On top of that, + we have some guidelines you should follow when submitting patches. + This makes reviewing patches easier, which in turns improves the + chances of your patch being accepted in a timely fashion. + +Single Patches: + + (a) When you add a patch to the queue you have an idea of where you're + going with it, and the commit message should reflect that. Be + specific. Avoid just saying something like, "Various fixes to + AllocationCapabilities." Add a list of what was actually fixed, + like, "Add EnumInstanceNames support," and, "Eliminate duplicate + instances." + + (b) The first line of your commit message will be the subject of the + patch email when you send it out, so write it like a subject. Keep + it short and to the point, then start a new line and feel free to be + as verbose as you need to be. The entire commit message will be + included in the patch. + + (c) Stay on task with a patch. If you notice other problems while you + are working on patch, and they are not most definitely specific to + your patch, they should be another patch. The same goes for + nitpicking. While it might be only a line or two here and there + that is off track, this is actually one of the easiest ways to make + a patch difficult to review. All the trivial changes hide what is + really going on. Make the unrelated changes a new patch or don't + make them at all. + + (d) Before you email, export. If you have a patch called "alloc_fixes", + which would be emailed with "hg email alloc_fixes", you should first + run "hg export alloc_fixes". This lets you review your patch. Does + it have any typos in the comments? Did you accidentally include an + irrelevant change? Is your commit message still accurate and useful? + This is the single biggest step in ensuring you have a good patch. + + (e) If your patch needs to be reworked and resent, prepend a "version + number" to the first line of the commit message. For example, "Add + EnumInstance to RASD," becomes "(#2) Add EnumInstance to RASD." + This helps mail readers thread discussions correctly and helps + maintainers know they are applying the right version of your patch. + At the end of the commit message, explain what is different from one + version to the next. Nobody likes having to diff a diff. + + (f) If your patch depends on a patch that exists on the mailing list but + not in the tree, it is okay to send your patch to the list as long + as your commit message mentions the dependency. It is also a good + idea to import the patch into your tree before you make your patch. + For example, a new patch called "cu_statusf API change" is on the + list, and your patch needs the new API. Save the email (no need to + trim headers) as api_change.eml, then do "hg qimport api_change.eml" + and "hg qpush" so that the patch is applied to your tree. Now write + your patch on top of it. You should still indicate the dependency + in your commit message. + + +Patchsets: + + (a) When you send a group of patches, Mercurial's email extension will + create a "header" email. Make the subject and body of that email + meaningful, so we know how the patches relate. It's easy to say, + "Each patch has a commit message, it's obvious how they work + together," but the rest of the list usually won't agree with that. + If the commit messages for each patch are good, you shouldn't need + more than a sentence or two to tie them all together, but you do + need it. + + (b) If any of your patches are rejected and you rework them, resend the + entire set. This prevents things like, "So use patch 1 of 4 from + the set I sent yesterday, 2 and 3 of 4 from the patch I sent an hour + later, and patch 4 of 4 from today." + + (c) If you resend a patchset, apply part (e) of the Single Patches + guidelines to your "Patch [0 of 3]" header email, for all the same + reasons. + +Questions/Comments on the Guidelines should be directed to: + Kaitlin Rupert From deeptik at linux.vnet.ibm.com Mon Jan 19 17:26:37 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 19 Jan 2009 22:56:37 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Add CodyingSystem and SubmittingPatches files In-Reply-To: <4974B177.90301@linux.vnet.ibm.com> References: <49741F8D.4090306@linux.vnet.ibm.com> <4974B177.90301@linux.vnet.ibm.com> Message-ID: <4974B7CD.1070300@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B Kalakeri wrote: >> Very Good write up. I have few ideas along with some comments on this >> patch(Please see inline for comments). >> We can improve it further including the information for "How to write >> a test case?" > > I think most of the things you have listed here can be inferred by > reading the existing test cases. I know the style has changed some, > so a lot of the test cases aren't in the best shape they could be. > But a lot of these issues are being fixed as tests are being updated. > >> This would include information like: >> 1) What kind of function should be included in the libraries present >> in the XenKVMLib directory. >> 2) What should not be included in libraries present in the cimtest/lib. > > This will change over time, so I worry that the statements will become > out of date and the file will not be updated accordingly. > >> 3) What type of logger statements to be used for giving different >> messages, for ex: use logger.info("Some information") or else use >> logger.error("To print error") > > The name of the functions here should make it obvious which to use. > >> 4) Also, License information to be included in the test cases. >> 5) Including small description about what the test case does at the >> beginning will help in maintenance in the long run. > > These are good points. I can update the style guide to include this info. > >> 6) Commands to submit a Single patch, commands to submit a Patch Set >> using *"hg". >> T*his will make things easy for someone who is using *hg* for the >> first time and might encourage more new people to contribute. > > It's good to encourage people to contribute, but there are plenty of > hg references out there that people can use. > > The SubmittingPatches file already mentioned that patches should be > submitted using the patchbomb feature. From there, someone can > reference mercurial's how to documents for more information. > >> We can rename the CodingStyle file to "Cimtest_Howto_Doc" and then >> Include all the above information along with the CodingStyle in one >> file. > > I would like to keep the name as is since it parallels the > format/structure of what's in libvirt-cim. > >> We can advertise the presence of these documents at the >> http://wiki.libvirt.org/page/Cimtest_todo page. > > Not sure what you mean here.. the todo page is for keeping track of > improvements/enhancements to the testsuite, as well as test cases that > need to be written. > I meant to refer the presence of the docs that you have written in the To do page, for first timer to give a pointer to these docs which might solve some of their FAQ's immediately. I understand that its standard to have the docs directory is obvious, but still it might help someone. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 19 18:59:12 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 19 Jan 2009 10:59:12 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Fix verify_rasds() and verify_devices() in SD 02_reverse.py Message-ID: <1f401b57daf5ef20dda2.1232391552@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232391542 28800 # Node ID 1f401b57daf5ef20dda27f391a4eaff3d15f72d8 # Parent 1313971a3554942a538a2c322f29a2321d0f4e08 [TEST] Fix verify_rasds() and verify_devices() in SD 02_reverse.py Since VSSDC should return RASDs that all correspond to the guest, there's no need to parse the InstanceID to see if the guest name matches the guest we've created. Also, fix the logic of the verify functions to be a little cleaner. Compare all the properties of the instances, not just the InstanceIDs/DeviceIDs. Remove parse_instance_id() from verify_devices(); guest and dev_id were not being used in the function. Signed-off-by: Kaitlin Rupert diff -r 1313971a3554 -r 1f401b57daf5 suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Mon Jan 19 10:51:08 2009 -0800 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Mon Jan 19 10:59:02 2009 -0800 @@ -55,7 +55,7 @@ from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.const import do_main -from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.assoc import AssociatorNames, compare_all_prop from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class from XenKvmLib.rasd import enum_rasds @@ -135,7 +135,7 @@ return dev_insts, PASS -def verify_rasd(virt, enum_list, rasds, guest_name): +def verify_rasd(virt, enum_list, rasds): proc_rasd_cn = get_typed_class(virt, "ProcResourceAllocationSettingData") for rasd in enum_list: @@ -143,48 +143,40 @@ enum_list.remove(rasd) continue - guest, dev, status = parse_instance_id(rasd['InstanceID']) + exp_rasd = rasds[rasd.classname] + + if rasd['InstanceID'] != exp_rasd.InstanceID: + logger.error("Got %s instead of %s", rasd['InstanceID'], + exp_rasd.InstanceID) + return FAIL + + status = compare_all_prop(rasd, exp_rasd) if status != PASS: - logger.error("Unable to parse InstanceID: %s", rasd['InstanceID']) return status - if guest != guest_name: - continue - - exp_rasd = rasds[rasd.classname] - - if rasd['InstanceID'] == exp_rasd.InstanceID: - status = PASS - else: - logger.info("Got %s instead of %s" % (rasd['InstanceID'], - exp_rasd.InstanceID)) - status = FAIL - - if status != PASS: - logger.error("RASD with id %s not returned", exp_rasd.InstanceID) + if len(enum_list) != len(rasds): + logger.error("Got %d RASDs, expected %d", len(enum_list), len(rasds)) return FAIL return PASS def verify_devices(enum_list, devs): - for dev in enum_list: - guest, dev_id, status = parse_instance_id(dev['DeviceID']) - if status != PASS: - logger.error("Unable to parse InstanceID: %s", dev['DeviceID']) - return status + dev = enum_list[0] + dev_cn = dev.classname - exp_dev = devs[dev.classname] + if len(enum_list) != 1: + logger.error("Got %d %s devices, expected 1", len(enum_list), dev_cn) + return FAIL - if dev['DeviceID'] == exp_dev.DeviceID: - status = PASS - else: - logger.info("Got %s instead of %s" % (dev['DeviceID'], - exp_dev.DeviceID)) - status = FAIL + exp_dev = devs[dev_cn] + if dev['DeviceID'] != exp_dev.DeviceID: + logger.error("Got %s instead of %s", dev['DeviceID'], exp_dev.DeviceID) + return FAIL + + status = compare_all_prop(dev, exp_dev) if status != PASS: - logger.error("Device with id %s not returned", exp_dev.DeviceID) - return FAIL + return status return PASS @@ -217,13 +209,10 @@ assoc = AssociatorNames(options.ip, vssdc_cn, vssd_cn, InstanceID = instIdval) - status = verify_rasd(virt, assoc, rasds, test_dom) + status = verify_rasd(virt, assoc, rasds) if status != PASS: raise Exception("Failed to verify RASDs") - if len(assoc) != len(rasds): - raise Exception("Got %d RASDs, exp %d" % (len(assoc), len(rasds))) - sds_cn = get_typed_class(virt, 'SettingsDefineState') devs, status = init_device_list(virt, options.ip, test_dom) From deeptik at linux.vnet.ibm.com Mon Jan 19 17:28:50 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Mon, 19 Jan 2009 22:58:50 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add CodyingSystem and SubmittingPatches files In-Reply-To: <043761891eecf7e5f565.1232385026@localhost.localdomain> References: <043761891eecf7e5f565.1232385026@localhost.localdomain> Message-ID: <4974B852.6050305@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232385019 28800 > # Node ID 043761891eecf7e5f565a0ca74749494d878fd80 > # Parent a5a4d35749d1d9ed8604ea4879e12828c7f5b169 > [TEST] #2 Add CodyingSystem and SubmittingPatches files > > Updates: > -Added information about license header and comments > > Signed-off-by: Kaitlin Rupert > > diff -r a5a4d35749d1 -r 043761891eec doc/CodingStyle > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/doc/CodingStyle Mon Jan 19 09:10:19 2009 -0800 > @@ -0,0 +1,47 @@ > + > +The CodingStyle for cimtest (and libcmpiutil) mostly mirrors that of > +libvirt-cim but with the following "clarifications": > + > +- Each new file needs to have be appropriate license header (see existing test > + cases) > + > +- Test cases should also include a short desciption that describes the purpose > + of the test. > + > +- Four-space indents > + > +- 80-char width limit. Break long function calls by: > + a) putting *every* parameter of the call on its own line > + -or- > + b) putting as many params in a line as will fit in the 80-char limit; > + overflow params are placed on the subsequent line > + > +- Split lines should aligned like the following: > + > + VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path, > + ntype, net_name, mac, vcpus, mem, mem_allocunits, > + emu_type) > + > +- Identifiers should be named with underbars_and_lowercase. > + > +- When passing parameters to logger.error() and logger.info(), use > + commas: > + > + logger.error("%s is not a valid network type", net_type) > + > + Not percent signs: > + > + logger.error('Got CIM error %s with return code %s' % (desc, rc)) > + > +- When passing parameters to Exception(), use percents: > + > + raise Exception("Unable to define %s" % test_dom) > + > + Not commas: > + > + raise Exception("Unable to define %s", test_dom) > + > +- Except for special cases, import the needed functions from a module. Do not > + import the entire module: > + > + from XenKvmLib.classes import virt_types > diff -r a5a4d35749d1 -r 043761891eec doc/SubmittingPatches > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/doc/SubmittingPatches Mon Jan 19 09:10:19 2009 -0800 > @@ -0,0 +1,117 @@ > +To submit patches to libvirt-cim, you must follow the DCO process, outlined > +below. > + > +Developer's Certificate of Origin 1.1 > + By making a contribution to this project, I certify that: > + > + (a) The contribution was created in whole or in part by me and I > + have the right to submit it under the open source license > + indicated in the file; or > + > + (b) The contribution is based upon previous work that, to the best > + of my knowledge, is covered under an appropriate open source > + license and I have the right under that license to submit that > + work with modifications, whether created in whole or in part > + by me, under the same open source license (unless I am > + permitted to submit under a different license), as indicated > + in the file; or > + > + (c) The contribution was provided directly to me by some other > + person who certified (a), (b) or (c) and I have not modified > + it. > + > + (d) I understand and agree that this project and the contribution > + are public and that a record of the contribution (including all > + personal information I submit with it, including my sign-off) is > + maintained indefinitely and may be redistributed consistent with > + this project or the open source license(s) involved. > + > +then you just add a line saying > + > + Signed-off-by: Random J Developer > + > +using your real name (sorry, no pseudonyms or anonymous contributions.) > + > + > + > +Guidelines for Submitting Patches. > + > + Patches should be submitted using Mercurial's patchbomb extension, > + and we recommend using the queues extension as well. On top of that, > + we have some guidelines you should follow when submitting patches. > + This makes reviewing patches easier, which in turns improves the > + chances of your patch being accepted in a timely fashion. > + > +Single Patches: > + > + (a) When you add a patch to the queue you have an idea of where you're > + going with it, and the commit message should reflect that. Be > + specific. Avoid just saying something like, "Various fixes to > + AllocationCapabilities." Add a list of what was actually fixed, > + like, "Add EnumInstanceNames support," and, "Eliminate duplicate > + instances." > + > + (b) The first line of your commit message will be the subject of the > + patch email when you send it out, so write it like a subject. Keep > + it short and to the point, then start a new line and feel free to be > + as verbose as you need to be. The entire commit message will be > + included in the patch. > + > + (c) Stay on task with a patch. If you notice other problems while you > + are working on patch, and they are not most definitely specific to > + your patch, they should be another patch. The same goes for > + nitpicking. While it might be only a line or two here and there > + that is off track, this is actually one of the easiest ways to make > + a patch difficult to review. All the trivial changes hide what is > + really going on. Make the unrelated changes a new patch or don't > + make them at all. > + > + (d) Before you email, export. If you have a patch called "alloc_fixes", > + which would be emailed with "hg email alloc_fixes", you should first > + run "hg export alloc_fixes". This lets you review your patch. Does > + it have any typos in the comments? Did you accidentally include an > + irrelevant change? Is your commit message still accurate and useful? > + This is the single biggest step in ensuring you have a good patch. > + > + (e) If your patch needs to be reworked and resent, prepend a "version > + number" to the first line of the commit message. For example, "Add > + EnumInstance to RASD," becomes "(#2) Add EnumInstance to RASD." > + This helps mail readers thread discussions correctly and helps > + maintainers know they are applying the right version of your patch. > + At the end of the commit message, explain what is different from one > + version to the next. Nobody likes having to diff a diff. > + > + (f) If your patch depends on a patch that exists on the mailing list but > + not in the tree, it is okay to send your patch to the list as long > + as your commit message mentions the dependency. It is also a good > + idea to import the patch into your tree before you make your patch. > + For example, a new patch called "cu_statusf API change" is on the > + list, and your patch needs the new API. Save the email (no need to > + trim headers) as api_change.eml, then do "hg qimport api_change.eml" > + and "hg qpush" so that the patch is applied to your tree. Now write > + your patch on top of it. You should still indicate the dependency > + in your commit message. > + > + > +Patchsets: > + > + (a) When you send a group of patches, Mercurial's email extension will > + create a "header" email. Make the subject and body of that email > + meaningful, so we know how the patches relate. It's easy to say, > + "Each patch has a commit message, it's obvious how they work > + together," but the rest of the list usually won't agree with that. > + If the commit messages for each patch are good, you shouldn't need > + more than a sentence or two to tie them all together, but you do > + need it. > + > + (b) If any of your patches are rejected and you rework them, resend the > + entire set. This prevents things like, "So use patch 1 of 4 from > + the set I sent yesterday, 2 and 3 of 4 from the patch I sent an hour > + later, and patch 4 of 4 from today." > + > + (c) If you resend a patchset, apply part (e) of the Single Patches > + guidelines to your "Patch [0 of 3]" header email, for all the same > + reasons. > + > +Questions/Comments on the Guidelines should be directed to: > + Kaitlin Rupert > > _______________________________________________ > 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 Tue Jan 20 02:54:10 2009 From: yunguol at cn.ibm.com (Guo Lian Yun) Date: Tue, 20 Jan 2009 10:54:10 +0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add CodyingSystem and SubmittingPatches files In-Reply-To: <4974B1D9.7060508@linux.vnet.ibm.com> Message-ID: libvirt-cim-bounces at redhat.com wrote on 2009-01-20 01:01:13: > > Good. When this patch is applied, I think we should check all the > > libraries and test cases > > present to make them follow this coding style. Then we can cook up new > > tc. > > > > Sure. Daisy, if you'd like to look into this, that would be great. Thanks! I'd like to do this. But Spring Festival (Traditional Chinese New Year) is coming and I will have a vacation from Jan 21 to Feb 03. If it isn't tight on time, I will look into this when I'm back. 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 deeptik at linux.vnet.ibm.com Tue Jan 20 07:06:28 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 20 Jan 2009 12:36:28 +0530 Subject: [Libvirt-cim] Test Run Summary (Jan 20 2009): Xen on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) with Pegasus Message-ID: <497577F4.60206@linux.vnet.ibm.com> ================================================= Test Run Summary (Jan 20 2009): Xen on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) with Pegasus ================================================= Distro: Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) Kernel: 2.6.18-88.el5xen libvirt: 0.3.3 Hypervisor: Xen 3.1.0 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 800 Libvirt-cim changeset: 611757263edd Cimtest revision: 598 Cimtest changeset: 32645e444b32 ================================================= FAIL : 3 XFAIL : 1 SKIP : 3 PASS : 134 ----------------- Total : 141 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL RASD - 01_verify_rasd_fields.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 - In fn cim_state_change() ERROR - Failed to change state of the domain 'test_domain' ERROR - Exception: (7, u'CIM_ERR_NOT_SUPPORTED: State not supported') ERROR - Exception: Unable Suspend dom 'test_domain' InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported Bug:<00012> -------------------------------------------------------------------- ComputerSystem - 35_start_reset.py: PASS -------------------------------------------------------------------- ComputerSystem - 40_RSC_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 41_cs_to_settingdefinestate.py: PASS -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: 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: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: PASS -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: 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: PASS -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: PASS -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: 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: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL ERROR - EnabledState is 9 instead of 2. ERROR - Try to increase the timeout and run the test again ERROR - Error start domain dom_migrate -------------------------------------------------------------------- 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 Jan 20 07:17:29 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 20 Jan 2009 12:47:29 +0530 Subject: [Libvirt-cim] Re: Test Run Summary (Jan 20 2009): Xen on Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) with Pegasus In-Reply-To: <497577F4.60206@linux.vnet.ibm.com> References: <497577F4.60206@linux.vnet.ibm.com> Message-ID: <49757A89.6090404@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > ================================================= > Test Run Summary (Jan 20 2009): Xen on Red Hat Enterprise Linux Server > release 5.2 Beta (Tikanga) with Pegasus > ================================================= > Distro: Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) > Kernel: 2.6.18-88.el5xen > libvirt: 0.3.3 > Hypervisor: Xen 3.1.0 > CIMOM: Pegasus 2.7.0 > Libvirt-cim revision: 800 > Libvirt-cim changeset: 611757263edd > Cimtest revision: 598 > Cimtest changeset: 32645e444b32 > ================================================= > FAIL : 3 > XFAIL : 1 > SKIP : 3 > PASS : 134 > ----------------- > Total : 141 > ================================================= > FAIL Test Summary: > ElementConforms - 01_forward.py: FAIL > RASD - 01_verify_rasd_fields.py: FAIL This tc passed when run manually. > VirtualSystemMigrationService - 02_host_migrate_type.py: FAIL > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Jan 20 10:06:55 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 20 Jan 2009 15:36:55 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Fix verify_rasds() and verify_devices() in SD 02_reverse.py In-Reply-To: <1f401b57daf5ef20dda2.1232391552@localhost.localdomain> References: <1f401b57daf5ef20dda2.1232391552@localhost.localdomain> Message-ID: <4975A23F.90104@linux.vnet.ibm.com> In the main fn: can you remove the cxml.undefine() from the following : status, cxml = setup_env(options.ip, virt) if status != PASS: cxml.undefine(options.ip) return status Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232391542 28800 > # Node ID 1f401b57daf5ef20dda27f391a4eaff3d15f72d8 > # Parent 1313971a3554942a538a2c322f29a2321d0f4e08 > [TEST] Fix verify_rasds() and verify_devices() in SD 02_reverse.py > > Since VSSDC should return RASDs that all correspond to the guest, there's > no need to parse the InstanceID to see if the guest name matches the guest > we've created. > > Also, fix the logic of the verify functions to be a little cleaner. Compare > all the properties of the instances, not just the InstanceIDs/DeviceIDs. > > Remove parse_instance_id() from verify_devices(); guest and dev_id were not > being used in the function. > > Signed-off-by: Kaitlin Rupert > > diff -r 1313971a3554 -r 1f401b57daf5 suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py > --- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Mon Jan 19 10:51:08 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Mon Jan 19 10:59:02 2009 -0800 > @@ -55,7 +55,7 @@ > from CimTest.Globals import logger > from CimTest.ReturnCodes import PASS, FAIL > from XenKvmLib.const import do_main > -from XenKvmLib.assoc import AssociatorNames > +from XenKvmLib.assoc import AssociatorNames, compare_all_prop > from XenKvmLib.vxml import get_class > from XenKvmLib.classes import get_typed_class > from XenKvmLib.rasd import enum_rasds > @@ -135,7 +135,7 @@ > > return dev_insts, PASS > > -def verify_rasd(virt, enum_list, rasds, guest_name): > +def verify_rasd(virt, enum_list, rasds): > proc_rasd_cn = get_typed_class(virt, "ProcResourceAllocationSettingData") > > for rasd in enum_list: > @@ -143,48 +143,40 @@ > enum_list.remove(rasd) > continue > > - guest, dev, status = parse_instance_id(rasd['InstanceID']) > + exp_rasd = rasds[rasd.classname] > + > + if rasd['InstanceID'] != exp_rasd.InstanceID: > + logger.error("Got %s instead of %s", rasd['InstanceID'], > + exp_rasd.InstanceID) > + return FAIL > + > + status = compare_all_prop(rasd, exp_rasd) > if status != PASS: > - logger.error("Unable to parse InstanceID: %s", rasd['InstanceID']) > return status > > - if guest != guest_name: > - continue > - > - exp_rasd = rasds[rasd.classname] > - > - if rasd['InstanceID'] == exp_rasd.InstanceID: > - status = PASS > - else: > - logger.info("Got %s instead of %s" % (rasd['InstanceID'], > - exp_rasd.InstanceID)) > - status = FAIL > - > - if status != PASS: > - logger.error("RASD with id %s not returned", exp_rasd.InstanceID) > + if len(enum_list) != len(rasds): > + logger.error("Got %d RASDs, expected %d", len(enum_list), len(rasds)) > return FAIL > Can you move this check before the for loop. > return PASS > > def verify_devices(enum_list, devs): > - for dev in enum_list: > - guest, dev_id, status = parse_instance_id(dev['DeviceID']) > - if status != PASS: > - logger.error("Unable to parse InstanceID: %s", dev['DeviceID']) > - return status > + dev = enum_list[0] > + dev_cn = dev.classname > > - exp_dev = devs[dev.classname] > + if len(enum_list) != 1: > + logger.error("Got %d %s devices, expected 1", len(enum_list), dev_cn) > + return FAIL > > - if dev['DeviceID'] == exp_dev.DeviceID: > - status = PASS > - else: > - logger.info("Got %s instead of %s" % (dev['DeviceID'], > - exp_dev.DeviceID)) > - status = FAIL > + exp_dev = devs[dev_cn] > > + if dev['DeviceID'] != exp_dev.DeviceID: > + logger.error("Got %s instead of %s", dev['DeviceID'], exp_dev.DeviceID) > + return FAIL > + > + status = compare_all_prop(dev, exp_dev) > if status != PASS: > - logger.error("Device with id %s not returned", exp_dev.DeviceID) > - return FAIL > + return status > > return PASS > You can print the error message when status != PASS, and then return status instead of two return statements. > @@ -217,13 +209,10 @@ > assoc = AssociatorNames(options.ip, vssdc_cn, vssd_cn, > InstanceID = instIdval) > > - status = verify_rasd(virt, assoc, rasds, test_dom) > + status = verify_rasd(virt, assoc, rasds) > if status != PASS: > raise Exception("Failed to verify RASDs") > > - if len(assoc) != len(rasds): > - raise Exception("Got %d RASDs, exp %d" % (len(assoc), len(rasds))) > - > sds_cn = get_typed_class(virt, 'SettingsDefineState') > > devs, status = init_device_list(virt, options.ip, 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 ugopalak at in.ibm.com Tue Jan 20 10:25:05 2009 From: ugopalak at in.ibm.com (U Gopalakrishnan) Date: Tue, 20 Jan 2009 15:55:05 +0530 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: <49749C12.5010906@linux.vnet.ibm.com> Message-ID: I did a clean install of Pegasus 2.7.0-2 that is shipped with RHEL 5.2 and followed the libvirt wiki installation instructions, still see the CIM_ERR_INVALID_SUPERCLASS error during the post install step. Parsing error: parse error: Error adding class Xen_HostedResourcePool to the repository: CIM_ERR_INVALID_SUPERCLASS: CIM_HostedResourcePool I still don't see CIM_HostedResourcePool in root/cimv2 namespace but it is present in root/virt namespace. I see CIM_SystemComponent class in both namespaces. Here is relevant output # ls /var/lib/Pegasus/repository/root#cimv2/classes | grep CIM_SystemComponent CIM_AccountOnSystem.CIM_SystemComponent CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent CIM_ASBGPEndpoints.CIM_SystemComponent CIM_ComponentCS.CIM_SystemComponent CIM_Confederation.CIM_SystemComponent CIM_ContainedDomain.CIM_SystemComponent CIM_FilterEntryInSystem.CIM_SystemComponent CIM_FilterListInSystem.CIM_SystemComponent CIM_HostedFileSystem.CIM_SystemComponent CIM_HostedStoragePool.CIM_SystemComponent CIM_InstalledOS.CIM_SystemComponent CIM_J2eeApplicationModule.CIM_SystemComponent CIM_J2eeServerInDomain.CIM_SystemComponent CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent CIM_ResourceOfSystem.CIM_SystemComponent CIM_RoutersInAS.CIM_SystemComponent CIM_SystemBIOS.CIM_SystemComponent CIM_SystemComponent.CIM_Component CIM_SystemDevice.CIM_SystemComponent # ls /var/lib/Pegasus/repository/root#virt/classes | grep CIM_SystemComponent CIM_AccountOnSystem.CIM_SystemComponent CIM_ApplicationSystemSoftwareFeature.CIM_SystemComponent CIM_ASBGPEndpoints.CIM_SystemComponent CIM_ComponentCS.CIM_SystemComponent CIM_Confederation.CIM_SystemComponent CIM_ContainedDomain.CIM_SystemComponent CIM_FilterEntryInSystem.CIM_SystemComponent CIM_FilterListInSystem.CIM_SystemComponent CIM_HostedFileSystem.CIM_SystemComponent CIM_HostedResourcePool.CIM_SystemComponent CIM_InstalledOS.CIM_SystemComponent CIM_J2eeApplicationModule.CIM_SystemComponent CIM_J2eeServerInDomain.CIM_SystemComponent CIM_PolicyContainerInPolicyContainer.CIM_SystemComponent CIM_PolicyRepositoryInPolicyRepository.CIM_SystemComponent CIM_ResourceOfSystem.CIM_SystemComponent CIM_RoutersInAS.CIM_SystemComponent CIM_SystemBIOS.CIM_SystemComponent CIM_SystemComponent.CIM_Component CIM_SystemDevice.CIM_SystemComponent I have captured output form make install and make postinstall. I didn't notice any thing wrong in the make install output, let me know if you want to take a look. Thanks Gopal Kaitlin Rupert Sent by: libvirt-cim-bounces at redhat.com 01/19/2009 20:58 Please respond to List for discussion and development of libvirt CIM To List for discussion and development of libvirt CIM cc Subject Re: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim U Gopalakrishnan wrote: > > > Oh! I am not sure why Pegasus 2.8.0-1 is not working. > > Since Kaitlin was able to work with tog-pegasus-2.7.0-1 version and you > > are finding problems with the Pegasus 2.8.0-1 can you try to install the > > Pegasus 2.7.0-1 and try. The make preinstall step will add CIM_HostedResourcePool to the root/cimv2 namespace. CIM_HostedResourcePool is a subclass of CIM_SystemComponent, so CIM_SystemComponent needs to be present in the repository before CIM_HostedResourcePool can be added. Gopal, after rebuilding the Pegasus repository, have you tried running "make preinstall" again? After "make preinstall", be sure to restart Pegasus before running "make install" and "make postinstall" > > I could manage to get only pegasus 2.7.0-2 source. I built it and > installed, > but still don't see CIM_HostedResourcePool class in root/cimv2 namespace :( > > Do you think there could be difference between 2.7.0-2 and 2.7.0-1 that > could be breaking us? I don't think there should be much difference between the versions. > > Also do you have a 2.7.0-1 binary/source rpm or source zip? > I am using the Pegasus rpm from the RedHat 5.2 iso. -- 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 rmaciel at linux.vnet.ibm.com Tue Jan 20 15:36:23 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 20 Jan 2009 13:36:23 -0200 Subject: [Libvirt-cim] [PATCH] Update build produce in README In-Reply-To: References: Message-ID: <4975EF77.3090307@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232144345 28800 > # Node ID ddb4e1368c0919dd310c1cd3b8fa4c104caf18df > # Parent 2409abcca2b26accdb8529a0951b42446ddcc1f0 > Update build produce in README > > Signed-off-by: Kaitlin Rupert > > diff -r 2409abcca2b2 -r ddb4e1368c09 README > --- a/README Fri Jan 16 10:19:08 2009 -0800 > +++ b/README Fri Jan 16 14:19:05 2009 -0800 > @@ -29,8 +29,13 @@ > > Procedure: > > - $ ./autoconfiscate.sh > + -If building a tree cloned from the hg repository, run this step first: > + $ ./autoconfiscate.sh > + > $ ./configure > $ make > + $ make preinstall > + $ Restart Pegasus or SFCB > $ sudo make install > $ sudo make postinstall > + $ Restart Pegasus or SFCB > > _______________________________________________ > 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 dayne.medlyn at hp.com Tue Jan 20 17:45:20 2009 From: dayne.medlyn at hp.com (Medlyn, Dayne (VSL - Ft Collins)) Date: Tue, 20 Jan 2009 17:45:20 +0000 Subject: [Libvirt-cim] What is the current state of VM guest creation/modification, storage pools, and metrics in Libvirt-CIM? Message-ID: Hi, We have been looking into what some of the Libvirt-CIM wholes might be for our needs and possibly how we can help close some of those wholes. I recently sat in on Dan Smiths presentation on the Libvirt-CIM and need a little bit of clarification. >From Dan's presentation it sounds like the ability to create a VM configuration (currently we are most interested in Xen) already exists. Can someone help me understand what that looks like right now? I presume it involves something like establishing a configuration, adding components to it (such as memory, CPUs, storage, network, etc.), posting that configuration to host (the xenstore for Xen?), then starting the VM guest. Does this include configuring to boot from install media? How about configuring for a network boot from which to do an install? Does this interface also support modifying this configuration, either live or off-line? Is there mechanism to validate new configurations before committing them? Another aspect Dan talked about was Resource Pools. I realize there is work going on to enhance Resource Pools. Is the current implementation of Resource Pools limited to storage pools? What type of storage is supported (iSCSI, NFS, Fibrechannel?, etc.)? An area we are looking to help augment is around guest metrics, at least those that can be collected from the host. Of particular interest are counters. Is there anyone currently working on this that I should collaborate with? I am beginning to dig into the code but I could use some quick answers. Thanks for the help. Dayne Medlyn Software Engineer Hewlett Packard From kaitlin at linux.vnet.ibm.com Tue Jan 20 18:12:31 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 20 Jan 2009 10:12:31 -0800 Subject: [Libvirt-cim] [PATCH] Add cimv216-cimv2_mof to Makefile and rpm spec Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232467565 28800 # Node ID a11d338bf11012e5ba9ce7e4dc7fd1c545702c95 # Parent 7e217546017c8b0f6fbb20a644c9fd3dcdaafb9c Add cimv216-cimv2_mof to Makefile and rpm spec. Right now, the rpm and make dist process isn't including this file. Signed-off-by: Kaitlin Rupert diff -r 7e217546017c -r a11d338bf110 base_schema/Makefile.am --- a/base_schema/Makefile.am Fri Jan 16 15:03:38 2009 -0800 +++ b/base_schema/Makefile.am Tue Jan 20 08:06:05 2009 -0800 @@ -2,7 +2,8 @@ CIM_SCHEMA_REL = $(CIM_SCHEMA_VER)Experimental CIM_SCHEMA_ZIP = cimv$(CIM_SCHEMA_REL)-MOFs.zip -dist_pkgdata_DATA = $(CIM_SCHEMA_ZIP) fix_schema.patch cimv216-interop_mof +dist_pkgdata_DATA = $(CIM_SCHEMA_ZIP) fix_schema.patch cimv216-interop_mof \ + cimv216-cimv2_mof dist_pkgdata_SCRIPTS = install_base_schema.sh $(CIM_SCHEMA_ZIP): diff -r 7e217546017c -r a11d338bf110 libvirt-cim.spec.in --- a/libvirt-cim.spec.in Fri Jan 16 15:03:38 2009 -0800 +++ b/libvirt-cim.spec.in Tue Jan 20 08:06:05 2009 -0800 @@ -84,6 +84,7 @@ %{_datadir}/libvirt-cim/*.sh %{_datadir}/libvirt-cim/*.mof %{_datadir}/libvirt-cim/cimv*-interop_mof +%{_datadir}/libvirt-cim/cimv*-cimv2_mof %{_datadir}/libvirt-cim/*.registration %{_datadir}/libvirt-cim/fix_schema.patch %{_datadir}/libvirt-cim/cimv*-MOFs.zip From rmaciel at linux.vnet.ibm.com Tue Jan 20 18:47:26 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 20 Jan 2009 16:47:26 -0200 Subject: [Libvirt-cim] [PATCH] Add cimv216-cimv2_mof to Makefile and rpm spec In-Reply-To: References: Message-ID: <49761C3E.5010507@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232467565 28800 > # Node ID a11d338bf11012e5ba9ce7e4dc7fd1c545702c95 > # Parent 7e217546017c8b0f6fbb20a644c9fd3dcdaafb9c > Add cimv216-cimv2_mof to Makefile and rpm spec. > > Right now, the rpm and make dist process isn't including this file. > > Signed-off-by: Kaitlin Rupert > > diff -r 7e217546017c -r a11d338bf110 base_schema/Makefile.am > --- a/base_schema/Makefile.am Fri Jan 16 15:03:38 2009 -0800 > +++ b/base_schema/Makefile.am Tue Jan 20 08:06:05 2009 -0800 > @@ -2,7 +2,8 @@ > CIM_SCHEMA_REL = $(CIM_SCHEMA_VER)Experimental > CIM_SCHEMA_ZIP = cimv$(CIM_SCHEMA_REL)-MOFs.zip > > -dist_pkgdata_DATA = $(CIM_SCHEMA_ZIP) fix_schema.patch cimv216-interop_mof > +dist_pkgdata_DATA = $(CIM_SCHEMA_ZIP) fix_schema.patch cimv216-interop_mof \ > + cimv216-cimv2_mof > dist_pkgdata_SCRIPTS = install_base_schema.sh > > $(CIM_SCHEMA_ZIP): > diff -r 7e217546017c -r a11d338bf110 libvirt-cim.spec.in > --- a/libvirt-cim.spec.in Fri Jan 16 15:03:38 2009 -0800 > +++ b/libvirt-cim.spec.in Tue Jan 20 08:06:05 2009 -0800 > @@ -84,6 +84,7 @@ > %{_datadir}/libvirt-cim/*.sh > %{_datadir}/libvirt-cim/*.mof > %{_datadir}/libvirt-cim/cimv*-interop_mof > +%{_datadir}/libvirt-cim/cimv*-cimv2_mof > %{_datadir}/libvirt-cim/*.registration > %{_datadir}/libvirt-cim/fix_schema.patch > %{_datadir}/libvirt-cim/cimv*-MOFs.zip > > _______________________________________________ > 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 Tue Jan 20 19:14:05 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 20 Jan 2009 11:14:05 -0800 Subject: [Libvirt-cim] What is the current state of VM guest creation/modification, storage pools, and metrics in Libvirt-CIM? In-Reply-To: References: Message-ID: <4976227D.8040903@linux.vnet.ibm.com> Medlyn, Dayne (VSL - Ft Collins) wrote: > Hi, Hi Dayne, welcome to the list. > > We have been looking into what some of the Libvirt-CIM wholes might be for our needs and possibly how we can help close some of those wholes. I recently sat in on Dan Smiths presentation on the Libvirt-CIM and need a little bit of clarification. > >>From Dan's presentation it sounds like the ability to create a VM configuration (currently we are most interested in Xen) already exists. Can someone help me understand what that looks like right now? I presume it involves something like establishing a > configuration, adding components to it (such as memory, CPUs, storage, network, etc.), posting that configuration to host (the xenstore for Xen?), then starting the VM guest. The define procedure is done using the DefineSystem() call of the Virt_VirtualSystemManagementService provider. The DefineSystem() call takes the following parameters: SystemSettings - an instance of the Xen_VirtualSystemSettingData class ResourceSettings - an array of Xen_ResourceAllocationSettingData (RASDs) instances ReferenceConfiguration - a reference to an existing Xen_VirtualSystemSettingData instance The RASDs represent the various resources (disk, CPU, etc) you would like your guest to have. The provider then generates an XML that it passes to libvirt, and libvirt handles defining the guest. The libvirt-cim providers don't talk to the Xen components directly; everything is handled through libvirt. > Does this include configuring to boot from install media? How about configuring for a network boot from which to do an install? With fully virtualized Xen guests, you can specify the "BootDevice" attribute of the Xen_VirtualSystemSettingData instance that is passed in for the SystemSettings parameter. The available options are "fd", "hd", "cdrom" or "network". For paravirtualized guests, the "Bootloader" and "BootloaderArgs" are used to specify which bootloader to use and what arguments to pass. For more info: http://libvirt.org/formatdomain.html#elementsOS > Does this interface also support modifying this configuration, either live or off-line? Yes, you can add/remove/modify resources of a guest while it is running or while it is offline - as supported by the underlying virtualization platform (Xen, KVM, etc). > Is there mechanism to validate new configurations before committing them? We don't do any validation as such. The DefineSystem() call tells libvirt to define a guest with the specified options. If libvirt is unable to define the guest, we return an error to the user accordingly. > > Another aspect Dan talked about was Resource Pools. I realize there is work going on to enhance Resource Pools. Is the current implementation of Resource Pools limited to storage pools? What type of storage is supported (iSCSI, NFS, Fibrechannel?, etc.)? We currently represent the following pools: disk, network, processor, memory, graphics device, and input device pools. Only disk and network represent actual virtual pools (as defined by libvirt). Libvirt supports the following storage types: dir, fs,netfs,disk,iscsi, logical. All of these pools show up as an instance of the DiskPool class. libvirt-cim doesn't currently support creation/deletion/modification of pools, so a user must create a pool using libvirt tools. Once the pool has been created, libvirt-cim will generate and instance of the DiskPool class to represent that pool. More info on libvirt storage pools: http://libvirt.org/formatstorage.html > > An area we are looking to help augment is around guest metrics, at least those that can be collected from the host. Of particular interest are counters. Is there anyone currently working on this that I should collaborate with? No one is currently working on metrics. There was some prior work done with Xen metrics for the sblim data-gatherer. I'm not sure the current status of these plugins though. We definitely haven't given it much thought as to whether it would be better to work with the existing data-gatherer framework, or if it would be better to develop a set of metrics providers for the libvirt-cim project itself. This is definitely a good topic for additional discussion =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Tue Jan 20 19:49:21 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 20 Jan 2009 11:49:21 -0800 Subject: [Libvirt-cim] 'Parsing error' during make postinstall step of installing libvirt-cim In-Reply-To: References: Message-ID: <49762AC1.9070101@linux.vnet.ibm.com> U Gopalakrishnan wrote: > > I did a clean install of Pegasus 2.7.0-2 that is shipped with RHEL 5.2 > and followed the libvirt wiki > installation instructions, still see the CIM_ERR_INVALID_SUPERCLASS > error during the post install step. > > Parsing error: parse error: Error adding class Xen_HostedResourcePool to > the repository: CIM_ERR_INVALID_SUPERCLASS: CIM_HostedResourcePool > > I still don't see CIM_HostedResourcePool in root/cimv2 namespace but it > is present in root/virt namespace. I see CIM_SystemComponent class in > both namespaces. Looks like the cimv216-cimv2_mof was missing from the tarball and the spec file. I submitted a patch to fix this problem. Thanks for reporting this issue! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From dayne.medlyn at hp.com Tue Jan 20 21:02:17 2009 From: dayne.medlyn at hp.com (Medlyn, Dayne (VSL - Ft Collins)) Date: Tue, 20 Jan 2009 21:02:17 +0000 Subject: [Libvirt-cim] What is the current state of VM guest creation/modification, storage pools, and metrics in Libvirt-CIM? In-Reply-To: <4976227D.8040903@linux.vnet.ibm.com> References: <4976227D.8040903@linux.vnet.ibm.com> Message-ID: Kaitlan > The define procedure is done using the DefineSystem() call of > the Virt_VirtualSystemManagementService provider. The > DefineSystem() call takes the following parameters: > > SystemSettings - an instance of the > Xen_VirtualSystemSettingData class ResourceSettings - an > array of Xen_ResourceAllocationSettingData (RASDs) instances > ReferenceConfiguration - a reference to an existing > Xen_VirtualSystemSettingData instance > > The RASDs represent the various resources (disk, CPU, etc) > you would like your guest to have. > > The provider then generates an XML that it passes to libvirt, > and libvirt handles defining the guest. The libvirt-cim > providers don't talk to the Xen components directly; > everything is handled through libvirt. This sounds as if it is just what we are looking for . Thanks for the detail. > > Does this include configuring to boot from install media? > How about configuring for a network boot from which to do an install? > > With fully virtualized Xen guests, you can specify the "BootDevice" > attribute of the Xen_VirtualSystemSettingData instance that > is passed in for the SystemSettings parameter. The available > options are "fd", "hd", "cdrom" or "network". > > For paravirtualized guests, the "Bootloader" and > "BootloaderArgs" are used to specify which bootloader to use > and what arguments to pass. > > For more info: http://libvirt.org/formatdomain.html#elementsOS I am still a little fuzzy on network booting a paravirt guest, but I believe the details will come out as we get a bit further. > > Does this interface also support modifying this > configuration, either live or off-line? > > Yes, you can add/remove/modify resources of a guest while it > is running or while it is offline - as supported by the > underlying virtualization platform (Xen, KVM, etc). Great! > > Is there mechanism to validate new configurations before > committing them? > > We don't do any validation as such. The DefineSystem() call > tells libvirt to define a guest with the specified options. > If libvirt is unable to define the guest, we return an error > to the user accordingly. This seems pretty reasonable. > > Another aspect Dan talked about was Resource Pools. I > realize there is work going on to enhance Resource Pools. Is > the current implementation of Resource Pools limited to > storage pools? What type of storage is supported (iSCSI, > NFS, Fibrechannel?, etc.)? > > We currently represent the following pools: disk, network, > processor, memory, graphics device, and input device pools. > Only disk and network represent actual virtual pools (as > defined by libvirt). > > Libvirt supports the following storage types: dir, > fs,netfs,disk,iscsi, logical. All of these pools show up as > an instance of the DiskPool class. > > libvirt-cim doesn't currently support > creation/deletion/modification of pools, so a user must > create a pool using libvirt tools. Once the pool has been > created, libvirt-cim will generate and instance of the > DiskPool class to represent that pool. > > More info on libvirt storage pools: > http://libvirt.org/formatstorage.html Thanks again for the detail. > > An area we are looking to help augment is around guest > metrics, at least those that can be collected from the host. > Of particular interest are counters. Is there anyone > currently working on this that I should collaborate with? > > No one is currently working on metrics. There was some prior > work done > with Xen metrics for the sblim data-gatherer. I'm not sure > the current > status of these plugins though. > > We definitely haven't given it much thought as to whether it > would be better to work with the existing data-gatherer > framework, or if it would be better to develop a set of > metrics providers for the libvirt-cim project itself. This > is definitely a good topic for additional discussion =) This is what I had come to understand. As we get a little farther we will make some proposals and see how the rest of the community feels about them. Basically, I see a need for some sort of marriage between Libvirt-CIM and possible the sblim data-gatherer. Libvirt-CIM may need to gather the guest data from the host, but feed it to the sblim data-gatherer for consumption. This will take a bit more thought though. Dan suggested something similar. One more question. Daniel Veillard mentioned someone may be working on VM cloning capability. Do you know any details about it or who might be working on it? Thanks again for all your help. Dayne From kaitlin at linux.vnet.ibm.com Wed Jan 21 02:18:38 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 20 Jan 2009 18:18:38 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add CodyingSystem and SubmittingPatches files In-Reply-To: References: Message-ID: <497685FE.7040108@linux.vnet.ibm.com> Guo Lian Yun wrote: > > libvirt-cim-bounces at redhat.com wrote on 2009-01-20 01:01:13: > > > > Good. When this patch is applied, I think we should check all the > > > libraries and test cases > > > present to make them follow this coding style. Then we can cook > up new > > > tc. > > > > > > > Sure. Daisy, if you'd like to look into this, that would be great. > Thanks! > > I'd like to do this. But Spring Festival (Traditional Chinese New > Year) is coming and I will > have a vacation from Jan 21 to Feb 03. If it isn't tight on time, I > will look > into this when I'm back. No problem - sounds like a good plan to me. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 21 02:31:03 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 20 Jan 2009 18:31:03 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix verify_rasds() and verify_devices() in SD 02_reverse.py Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232505043 28800 # Node ID c9633428563c23db5154195f9a5fe645a0b4a3eb # Parent c48f4ad82a02ab19ff0d30d77d492060d0a30145 [TEST] #2 Fix verify_rasds() and verify_devices() in SD 02_reverse.py Since VSSDC should return RASDs that all correspond to the guest, there's no need to parse the InstanceID to see if the guest name matches the guest we've created. Also, fix the logic of the verify functions to be a little cleaner. Compare all the properties of the instances, not just the InstanceIDs/DeviceIDs. Remove parse_instance_id() from verify_devices(); guest and dev_id were not being used in the function. Updates: -Removed unnecessary undefine() call -Moved the verification of the number of RASDs before the for loop - in the case of LXC, we remove one of the RASDs from this list so we don't verify it, but we still want to verify the appropriate number of RASDs was returned. -Print an error message if comparing all the instance properties fails. Signed-off-by: Kaitlin Rupert diff -r c48f4ad82a02 -r c9633428563c suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Tue Jan 20 18:24:05 2009 -0800 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Tue Jan 20 18:30:43 2009 -0800 @@ -55,7 +55,7 @@ from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.const import do_main -from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.assoc import AssociatorNames, compare_all_prop from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class from XenKvmLib.rasd import enum_rasds @@ -135,56 +135,50 @@ return dev_insts, PASS -def verify_rasd(virt, enum_list, rasds, guest_name): +def verify_rasd(virt, enum_list, rasds): proc_rasd_cn = get_typed_class(virt, "ProcResourceAllocationSettingData") + if len(enum_list) != len(rasds): + logger.error("Got %d RASDs, expected %d", len(enum_list), len(rasds)) + return FAIL + + status = FAIL + for rasd in enum_list: if virt == "LXC" and rasd.classname == proc_rasd_cn: enum_list.remove(rasd) continue - guest, dev, status = parse_instance_id(rasd['InstanceID']) - if status != PASS: - logger.error("Unable to parse InstanceID: %s", rasd['InstanceID']) - return status - - if guest != guest_name: - continue - exp_rasd = rasds[rasd.classname] - if rasd['InstanceID'] == exp_rasd.InstanceID: - status = PASS - else: - logger.info("Got %s instead of %s" % (rasd['InstanceID'], - exp_rasd.InstanceID)) - status = FAIL + if rasd['InstanceID'] != exp_rasd.InstanceID: + logger.error("Got %s instead of %s", rasd['InstanceID'], + exp_rasd.InstanceID) + return FAIL - if status != PASS: - logger.error("RASD with id %s not returned", exp_rasd.InstanceID) + status = compare_all_prop(rasd, exp_rasd) + if status != PASS: + logger.error("Verifying instance properties failed.") + + return status + +def verify_devices(enum_list, devs): + dev = enum_list[0] + dev_cn = dev.classname + + if len(enum_list) != 1: + logger.error("Got %d %s devices, expected 1", len(enum_list), dev_cn) return FAIL - return PASS + exp_dev = devs[dev_cn] -def verify_devices(enum_list, devs): - for dev in enum_list: - guest, dev_id, status = parse_instance_id(dev['DeviceID']) - if status != PASS: - logger.error("Unable to parse InstanceID: %s", dev['DeviceID']) - return status + if dev['DeviceID'] != exp_dev.DeviceID: + logger.error("Got %s instead of %s", dev['DeviceID'], exp_dev.DeviceID) + return FAIL - exp_dev = devs[dev.classname] - - if dev['DeviceID'] == exp_dev.DeviceID: - status = PASS - else: - logger.info("Got %s instead of %s" % (dev['DeviceID'], - exp_dev.DeviceID)) - status = FAIL - + status = compare_all_prop(dev, exp_dev) if status != PASS: - logger.error("Device with id %s not returned", exp_dev.DeviceID) - return FAIL + return status return PASS @@ -196,7 +190,6 @@ status, cxml = setup_env(options.ip, virt) if status != PASS: - cxml.undefine(options.ip) return status if virt == 'XenFV': @@ -217,13 +210,10 @@ assoc = AssociatorNames(options.ip, vssdc_cn, vssd_cn, InstanceID = instIdval) - status = verify_rasd(virt, assoc, rasds, test_dom) + status = verify_rasd(virt, assoc, rasds) if status != PASS: raise Exception("Failed to verify RASDs") - if len(assoc) != len(rasds): - raise Exception("Got %d RASDs, exp %d" % (len(assoc), len(rasds))) - sds_cn = get_typed_class(virt, 'SettingsDefineState') devs, status = init_device_list(virt, options.ip, test_dom) From deeptik at linux.vnet.ibm.com Wed Jan 21 10:07:13 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Wed, 21 Jan 2009 15:37:13 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Fix verify_rasds() and verify_devices() in SD 02_reverse.py In-Reply-To: References: Message-ID: <4976F3D1.1040309@linux.vnet.ibm.com> In the setup_env(), line no 83 we have misspelled name, we have cmxl instead of cxml. Sorry for not reporting this in the first review. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 21 18:32:29 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 21 Jan 2009 10:32:29 -0800 Subject: [Libvirt-cim] [PATCH] Replace CBGetInstance() with CBEnumInstances() in Virt_HostSystem Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232562000 28800 # Node ID a7074d59e1e34398b8785bf218bbdbea56db0945 # Parent 62dbae6f50a56ee2d603503a704b8cd083788131 Replace CBGetInstance() with CBEnumInstances() in Virt_HostSystem This is a work around to deal with the way the SBLIM provider determines the FQDN of a host system. The value the SBLIM provider returns can depend on how the /etc/hosts file is formatted, as well as other factors (running dnsdomainname caused the provider to print two different values on my system). Signed-off-by: Kaitlin Rupert diff -r 62dbae6f50a5 -r a7074d59e1e3 src/Virt_HostSystem.c --- a/src/Virt_HostSystem.c Tue Jan 20 22:27:01 2009 -0800 +++ b/src/Virt_HostSystem.c Wed Jan 21 10:20:00 2009 -0800 @@ -144,16 +144,10 @@ CMPIInstance **inst) { CMPIObjectPath *path; + CMPIEnumeration *en = NULL; + CMPIData data; CMPIStatus s; const char *cn = "Linux_ComputerSystem"; - char name[256]; - - if (get_fqdn(name, sizeof(name)) != 0) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Unable to get hostname: %m"); - return s; - } path = CMNewObjectPath(broker, "root/cimv2", cn, &s); if ((path == NULL) || (s.rc != CMPI_RC_OK)) { @@ -163,11 +157,33 @@ return s; } - CMAddKey(path, "CreationClassName", cn, CMPI_chars); - CMAddKey(path, "Name", name, CMPI_chars); + /* FIXME: This approach may return the wrong instance if more than + one SBLIM Linux_ComputerSystem instance exists on the system. + This isn't likely to happen in most cases, but a better approach + should be used here. + */ + en = CBEnumInstances(broker, context, path, NULL, &s); + if (en == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Upcall EnumInstances of %s class failed", + cn); + goto out; + } - *inst = CBGetInstance(broker, context, path, NULL, &s); + if (CMHasNext(en, &s)) { + data = CMGetNext(en, &s); + if (CMIsNullObject(data.value.inst)) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Failed to retrieve enumeration entry"); + goto out; + } + *inst = data.value.inst; + } + + out: if (s.rc != CMPI_RC_OK) { CU_DEBUG("SBLIM: %i %s", s.rc, CMGetCharPtr(s.msg)); } else { From danms at us.ibm.com Wed Jan 21 18:44:52 2009 From: danms at us.ibm.com (Dan Smith) Date: Wed, 21 Jan 2009 10:44:52 -0800 Subject: [Libvirt-cim] What is the current state of VM guest creation/modification, storage pools, and metrics in Libvirt-CIM? In-Reply-To: (Dayne Medlyn's message of "Tue, 20 Jan 2009 21:02:17 +0000") References: <4976227D.8040903@linux.vnet.ibm.com> Message-ID: <87skncbisb.fsf@caffeine.danplanet.com> DM> I am still a little fuzzy on network booting a paravirt guest, but DM> I believe the details will come out as we get a bit further. I would imagine it would be done via some cheating in dom0, which would fake the PXE client action, download the kernel and ramdisk as specified and then launch the guest out of body (i.e. without a bootloader). DM> This is what I had come to understand. As we get a little farther DM> we will make some proposals and see how the rest of the community DM> feels about them. Basically, I see a need for some sort of DM> marriage between Libvirt-CIM and possible the sblim data-gatherer. DM> Libvirt-CIM may need to gather the guest data from the host, but DM> feed it to the sblim data-gatherer for consumption. This will DM> take a bit more thought though. Dan suggested something similar. I'm not really familiar with either (a) the implementation of the data gatherer or (b) the profiles and classes needed to support metrics for a CIM client. Regarding the former, I would hope that the modules in the data gatherer can be loaded as dynamic plugins, which would mean that we could implement and maintain a data gatherer plugin in the libvirt-cim tree, and "marry" it to some of our other infrastructure. We would install it in the proper location on a system when libvirt-cim is installed, and the data gatherer would start to expose those bits. Regarding the latter, we could just implement the metrics ourselves as regular providers and not be dependent on the data gatherer at all. As always, I'd be hesitant to do something other than use a pre-existing framework for something like that, so we'd need to come up with a good justification for going this route. DM> One more question. Daniel Veillard mentioned someone may be DM> working on VM cloning capability. Do you know any details about DM> it or who might be working on it? I'm not sure what you mean exactly, which probably means my answer to your question is "no" :)... However, you should probably ask the libvirt mailing list[1]. Thanks! 1: https://www.redhat.com/mailman/listinfo/libvir-list -- Dan Smith IBM Linux Technology Center email: danms at us.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 21 22:46:27 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 21 Jan 2009 14:46:27 -0800 Subject: [Libvirt-cim] [PATCH] Add interop and cimv2 ns registrations to spec Message-ID: <29c0ffe73355b4461eff.1232577987@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232577959 28800 # Node ID 29c0ffe73355b4461eff24a3ba5263bea61e0e7a # Parent 818470c2d36f7f573491be79cb8b414cc638da61 Add interop and cimv2 ns registrations to spec. Signed-off-by: Kaitlin Rupert diff -r 818470c2d36f -r 29c0ffe73355 libvirt-cim.spec.in --- a/libvirt-cim.spec.in Tue Jan 20 08:06:05 2009 -0800 +++ b/libvirt-cim.spec.in Wed Jan 21 14:45:59 2009 -0800 @@ -51,6 +51,12 @@ %define REGISTRATION %{_datadir}/%{name}/*.registration %define SCHEMA %{_datadir}/%{name}/*.mof +%define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration +%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.mof + +%define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.registration +%define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof + %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ -n @CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true @@ -65,6 +71,15 @@ %{_datadir}/%{name}/provider-register.sh -t pegasus \ -n @CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -t pegasus \ + -n @CIM_VIRT_NS@ \ + -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -t pegasus \ + -n root/interop \ + -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -t pegasus \ + -n root/cimv2\ + -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true %preun %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ From kaitlin at linux.vnet.ibm.com Wed Jan 21 23:31:19 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 21 Jan 2009 15:31:19 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix verify_rasds() and verify_devices() in SD 02_reverse.py Message-ID: <6e23c06353a1529f2951.1232580679@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232580651 28800 # Node ID 6e23c06353a1529f295109cd79858cdea4dbf0be # Parent c48f4ad82a02ab19ff0d30d77d492060d0a30145 [TEST] #3 Fix verify_rasds() and verify_devices() in SD 02_reverse.py Since VSSDC should return RASDs that all correspond to the guest, there's no need to parse the InstanceID to see if the guest name matches the guest we've created. Also, fix the logic of the verify functions to be a little cleaner. Compare all the properties of the instances, not just the InstanceIDs/DeviceIDs. Remove parse_instance_id() from verify_devices(); guest and dev_id were not being used in the function. Updates from 2 to 3: -Fix typo in setup_env(). cmxl should be cxml -Fixed bug in cim_define() that was causing this to fail with LXC Updates from 1 to 2: -Removed unnecessary undefine() call -Moved the verification of the number of RASDs before the for loop - in the case of LXC, we remove one of the RASDs from this list so we don't verify it, but we still want to verify the appropriate number of RASDs was returned. -Print an error message if comparing all the instance properties fails. Signed-off-by: Kaitlin Rupert diff -r c48f4ad82a02 -r 6e23c06353a1 suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py --- a/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Tue Jan 20 18:24:05 2009 -0800 +++ b/suites/libvirt-cim/cimtest/SettingsDefine/02_reverse.py Wed Jan 21 15:30:51 2009 -0800 @@ -55,7 +55,7 @@ from CimTest.Globals import logger from CimTest.ReturnCodes import PASS, FAIL from XenKvmLib.const import do_main -from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.assoc import AssociatorNames, compare_all_prop from XenKvmLib.vxml import get_class from XenKvmLib.classes import get_typed_class from XenKvmLib.rasd import enum_rasds @@ -80,7 +80,7 @@ ret = cxml.cim_define(server) if not ret: logger.error("Failed to Create the dom: %s", test_dom) - return FAIL, cmxl + return FAIL, cxml status = cxml.cim_start(server) if status != PASS: @@ -101,9 +101,6 @@ return rasd_insts, status for rasd_cn, rasd_list in rasds.iteritems(): - if virt == "LXC" and rasd_cn == proc_rasd_cn: - continue - for rasd in rasd_list: guest, dev, status = parse_instance_id(rasd.InstanceID) if status != PASS: @@ -135,56 +132,44 @@ return dev_insts, PASS -def verify_rasd(virt, enum_list, rasds, guest_name): - proc_rasd_cn = get_typed_class(virt, "ProcResourceAllocationSettingData") +def verify_rasd(virt, enum_list, rasds): + if len(enum_list) != len(rasds): + logger.error("Got %d RASDs, expected %d", len(enum_list), len(rasds)) + return FAIL + + status = FAIL for rasd in enum_list: - if virt == "LXC" and rasd.classname == proc_rasd_cn: - enum_list.remove(rasd) - continue - - guest, dev, status = parse_instance_id(rasd['InstanceID']) - if status != PASS: - logger.error("Unable to parse InstanceID: %s", rasd['InstanceID']) - return status - - if guest != guest_name: - continue - exp_rasd = rasds[rasd.classname] - if rasd['InstanceID'] == exp_rasd.InstanceID: - status = PASS - else: - logger.info("Got %s instead of %s" % (rasd['InstanceID'], - exp_rasd.InstanceID)) - status = FAIL + if rasd['InstanceID'] != exp_rasd.InstanceID: + logger.error("Got %s instead of %s", rasd['InstanceID'], + exp_rasd.InstanceID) + return FAIL - if status != PASS: - logger.error("RASD with id %s not returned", exp_rasd.InstanceID) + status = compare_all_prop(rasd, exp_rasd) + if status != PASS: + logger.error("Verifying instance properties failed.") + + return status + +def verify_devices(enum_list, devs): + dev = enum_list[0] + dev_cn = dev.classname + + if len(enum_list) != 1: + logger.error("Got %d %s devices, expected 1", len(enum_list), dev_cn) return FAIL - return PASS + exp_dev = devs[dev_cn] -def verify_devices(enum_list, devs): - for dev in enum_list: - guest, dev_id, status = parse_instance_id(dev['DeviceID']) - if status != PASS: - logger.error("Unable to parse InstanceID: %s", dev['DeviceID']) - return status + if dev['DeviceID'] != exp_dev.DeviceID: + logger.error("Got %s instead of %s", dev['DeviceID'], exp_dev.DeviceID) + return FAIL - exp_dev = devs[dev.classname] - - if dev['DeviceID'] == exp_dev.DeviceID: - status = PASS - else: - logger.info("Got %s instead of %s" % (dev['DeviceID'], - exp_dev.DeviceID)) - status = FAIL - + status = compare_all_prop(dev, exp_dev) if status != PASS: - logger.error("Device with id %s not returned", exp_dev.DeviceID) - return FAIL + return status return PASS @@ -196,7 +181,6 @@ status, cxml = setup_env(options.ip, virt) if status != PASS: - cxml.undefine(options.ip) return status if virt == 'XenFV': @@ -217,21 +201,24 @@ assoc = AssociatorNames(options.ip, vssdc_cn, vssd_cn, InstanceID = instIdval) - status = verify_rasd(virt, assoc, rasds, test_dom) + status = verify_rasd(virt, assoc, rasds) if status != PASS: raise Exception("Failed to verify RASDs") - if len(assoc) != len(rasds): - raise Exception("Got %d RASDs, exp %d" % (len(assoc), len(rasds))) - sds_cn = get_typed_class(virt, 'SettingsDefineState') devs, status = init_device_list(virt, options.ip, test_dom) if status != PASS: raise Exception("Unable to build device instance list") + proc_cn = get_typed_class(virt, 'ProcResourceAllocationSettingData') for rasd in assoc: rasd_cn = rasd.classname + + # LXC guests don't have proc devices + if virt == "LXC" and rasd_cn == proc_cn: + continue + sdc_assoc = AssociatorNames(options.ip, sds_cn, rasd_cn, InstanceID = rasd['InstanceID']) diff -r c48f4ad82a02 -r 6e23c06353a1 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Jan 20 18:24:05 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Jan 21 15:30:51 2009 -0800 @@ -501,9 +501,11 @@ res_settings.append(str(self.pasd)) if self.masd is not None: res_settings.append(str(self.masd)) - if self.nasd is not None or \ - (self.virt == 'LXC' and const.LXC_netns_support is False): - res_settings.append(str(self.nasd)) + if self.nasd is not None: + if self.virt == 'LXC' and const.LXC_netns_support is False: + pass + else: + res_settings.append(str(self.nasd)) if ref_conf is None: ref_conf = ' ' From kaitlin at linux.vnet.ibm.com Wed Jan 21 23:30:45 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 21 Jan 2009 15:30:45 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add some error checking when detecting hypervisor version In-Reply-To: References: Message-ID: <4977B025.7080303@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232382714 28800 > # Node ID a5a4d35749d1d9ed8604ea4879e12828c7f5b169 > # Parent 57f3bc7c3105bb779b41e19b1c03a1e5f214cec1 > [TEST] #2 Add some error checking when detecting hypervisor version > > Updates: > -In libvirt or hypervisior version cannot be determined, print error message > to console. > > Signed-off-by: Kaitlin Rupert > Can someone take a look at this patch? I think it got lost among the other patches. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 21 23:55:03 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 21 Jan 2009 15:55:03 -0800 Subject: [Libvirt-cim] [PATCH] Add a migration_tester.py tool Message-ID: <6fa1f52dc8298b4d643f.1232582103@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232519221 28800 # Node ID 6fa1f52dc8298b4d643fc94bb3f91715cc40dd58 # Parent e4f4e7c64325395494355516d4c111977f5b451a Add a migration_tester.py tool. This can be used to drive migration between two different hosts. How to call the tester: python tools/migrate_tester.py -u user -p pass -s fqdn:port -t fqdn guest_name Ex: python tools/migrate_tester.py -u root -p mypass -s my_host.my_domain.com:5988 -t my_target.my_domain.com my_guest Signed-off-by: Kaitlin Rupert diff -r e4f4e7c64325 -r 6fa1f52dc829 tools/migration_tester.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/migration_tester.py Tue Jan 20 22:27:01 2009 -0800 @@ -0,0 +1,301 @@ +#!/usr/bin/python +# +# 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 +# + +import sys +import time +from optparse import OptionParser +from pywbem import WBEMConnection, CIMInstanceName, CIMInstance, CIMError + +CIM_MIGRATE_OTHER=1 +CIM_MIGRATE_LIVE=2 +CIM_MIGRATE_RESUME=3 +CIM_MIGRATE_RESTART=4 + +CIM_MIGRATE_URI_OTHER=1 +CIM_MIGRATE_URI_SSH=2 +CIM_MIGRATE_URI_TLS=3 +CIM_MIGRATE_URI_TLS_STRICT=4 +CIM_MIGRATE_URI_TCP=5 +CIM_MIGRATE_URI_UNIX=6 + +CIM_JOBSTATE_COMPLETE=7 + +class CIMClassMOF: + + __supported_types = [int, str, bool] + + def __init__(self, attrs = None): + """attrs should be dict + """ + + if attrs != None: + self.__dict__.update(attrs) + + def mof(self): + """mof() + + Return value is a string, containing the mof representation of the + object. + + Attribute types supported are : int, str, bool. + + Attributes with unsupported types will be silently ignored when + converting to mof representation. + """ + + mof_str = "instance of " + self.__class__.__name__ + " {\n" + for key, value in self.__dict__.items(): + value_type = type(value) + if value_type not in self.__supported_types: + continue + + mof_str += "%s = " % key + if value_type == int: + mof_str += "%d" % value + elif value_type == bool: + mof_str += str(value).lower() + else: + mof_str += '"%s"' % value + mof_str += ";\n" + + mof_str += "};" + return mof_str + + def __str__(self): + return self.mof() + +class CIM_VirtualSystemMigrationSettingData(CIMClassMOF): + def __init__(self, type, priority): + self.InstanceID = 'MigrationSettingData' + self.CreationClassName = self.__class__.__name__ + self.MigrationType = type + self.Priority = priority + +class Xen_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): + def __init__(self, type, priority): + CIM_VirtualSystemMigrationSettingData.__init__(self, type, priority) + +class KVM_VirtualSystemMigrationSettingData(CIM_VirtualSystemMigrationSettingData): + def __init__(self, type, priority): + CIM_VirtualSystemMigrationSettingData.__init__(self, type, priority) + +def get_guest_ref(guest, virt): + guest_cn = "%s_ComputerSystem" % virt + + keys = { 'Name' : guest, + 'CreationClassName' : guest_cn + } + + try: + cs_ref = CIMInstanceName(guest_cn, keybindings=keys) + + except CIMError, (err_no, desc): + print err_no, desc + return None + + return cs_ref + +def get_msd(mtype, virt): + if mtype == "live": + mtype = CIM_MIGRATE_LIVE + elif mtype == "resume": + mtype = CIM_MIGRATE_RESUME + elif mtype == "restart": + mtype = CIM_MIGRATE_RESTART + else: + mtype = CIM_MIGRATE_OTHER + + try: + vsmsd_cn_base = "_VirtualSystemMigrationSettingData" + msd = eval(virt + vsmsd_cn_base)(type=mtype, priority=0) + + except CIMError, (err_no, desc): + print err_no, desc + return None + + return msd.mof() + +def check_migrate(s_conn, cs_ref, ip, msd, virt): + vsms_cn = "%s_VirtualSystemMigrationService" % virt + try: + if msd == None: + res = s_conn.InvokeMethod("CheckVirtualSystemIsMigratableToHost", + vsms_cn, + ComputerSystem=cs_ref, + DestinationHost=ip) + else: + res = s_conn.InvokeMethod("CheckVirtualSystemIsMigratableToHost", + vsms_cn, + ComputerSystem=cs_ref, + DestinationHost=ip, + MigrationSettingData=msd) + + if res == None or res[1]['IsMigratable'] != True: + print "Migration check failed." + return 1 + + except CIMError, (err_no, desc): + print err_no, desc + return 1 + + return 0 + +def get_job_inst(s_conn, job_ref): + try: + inst = s_conn.GetInstance(job_ref) + + except CIMError, (err_no, desc): + print err_no, desc + return None + + return inst + +def poll_for_job_status(s_conn, job_ref): + + job_inst = get_job_inst(s_conn, job_ref) + if not job_inst: + print "Unable to get job instance" + return 1 + + try: + while job_inst['JobState'] != CIM_JOBSTATE_COMPLETE: + time.sleep(3) + job_inst = get_job_inst(s_conn, job_ref) + if not job_inst: + print "Unable to get job instance" + return 1 + + if job_inst['Status'] != "Completed": + print "Migrate job failed: %s" % job_inst['Status'] + return 1 + except KeyboardInterrupt: + print "Migrate job took too long" + return 1 + + print "Migrate job succeeded: %s" % job_inst['Status'] + return 0 + +def migrate_host(s_conn, cs_ref, dest, msd, virt): + vsms_cn = "%s_VirtualSystemMigrationService" % virt + + try: + if msd == None: + job = s_conn.InvokeMethod("MigrateVirtualSystemToHost", + vsms_cn, + ComputerSystem=cs_ref, + DestinationHost=dest) + else: + job = s_conn.InvokeMethod("MigrateVirtualSystemToHost", + vsms_cn, + ComputerSystem=cs_ref, + DestinationHost=dest, + MigrationSettingData=msd) + + if len(job) < 1: + print "No job returned from migrate call" + return 1 + + status = poll_for_job_status(s_conn, job[1]['Job']) + + except CIMError, (err_no, desc): + print err_no, desc + return 1 + + return 0 + +def main(): + usage = "usage: %prog [options] \nex: %prog my.target.com" + parser = OptionParser(usage) + + parser.add_option("-s", "--src-url", dest="s_url", default="localhost:5988", + help="URL of CIMOM to connect to (host:port)") + parser.add_option("-t", "--target-url", dest="t_url", + default="localhost:5988", + help="URL of CIMOM to connect to (host:port)") + parser.add_option("-N", "--ns", dest="ns", default="root/virt", + help="Namespace (default is root/virt)") + parser.add_option("-u", "--user", dest="username", default=None, + help="HTTP Auth username") + parser.add_option("-p", "--pass", dest="password", default=None, + help="HTTP Auth password") + parser.add_option("-v", "--virt-type", dest="virt", default=None, + help="Virtualization type [ Xen | KVM ]") + parser.add_option("--migration-type", dest="type", default=None, + help="Migration type: [ live | resume | restart ]") + parser.add_option("--disable-check", dest="disable_ck", action="store_true", + help="Disable migration pre-check") + + (options, args) = parser.parse_args() + + if len(args) == 0: + print "Fatal: no guest specified." + sys.exit(1) + + guest_name = args[0] + + if ":" in options.s_url: + (sysname, port) = options.s_url.split(":") + else: + sysname = options.s_url + + if ":" in options.t_url: + (t_sysname, port) = options.t_url.split(":") + else: + t_sysname = options.t_url + + src_conn = WBEMConnection('http://%s' % sysname, + (options.username, options.password), options.ns) + + guest_ref = get_guest_ref(guest_name, options.virt) + if guest_ref == None: + return 1 + + if options.virt == None: + print "Must specify virtualization type" + return 1 + + if options.virt != "Xen": + print "Only Xen migration is currently supported" + return 1 + + if options.type != None: + msd = get_msd(options.type, options.virt) + if msd == None: + return 1 + else: + print "Using default MigrationSettingData" + msd = None + + if not options.disable_ck: + status = check_migrate(src_conn, guest_ref, t_sysname, msd, + options.virt) + if status == 1: + return 1 + + print "Migrating %s.. this will take some time." % guest_name + status = migrate_host(src_conn, guest_ref, t_sysname, msd, options.virt) + return status + +if __name__=="__main__": + sys.exit(main()) + + From kaitlin at linux.vnet.ibm.com Thu Jan 22 00:50:52 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 21 Jan 2009 16:50:52 -0800 Subject: [Libvirt-cim] [PATCH] Remove fopen() from out in KVMRedirectionSAP Message-ID: <1efa2d18e09bb7851ca7.1232585452@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232584945 28800 # Node ID 1efa2d18e09bb7851ca70ca0112d8363190e81d1 # Parent 6fa1f52dc8298b4d643fc94bb3f91715cc40dd58 Remove fopen() from out in KVMRedirectionSAP The file is already open, we just need to close it. Signed-off-by: Kaitlin Rupert diff -r 6fa1f52dc829 -r 1efa2d18e09b src/Virt_KVMRedirectionSAP.c --- a/src/Virt_KVMRedirectionSAP.c Tue Jan 20 22:27:01 2009 -0800 +++ b/src/Virt_KVMRedirectionSAP.c Wed Jan 21 16:42:25 2009 -0800 @@ -213,7 +213,6 @@ } out: - tcp_info = fopen(path, "r"); fclose(tcp_info); return s; } From deeptik at linux.vnet.ibm.com Thu Jan 22 06:47:19 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 22 Jan 2009 12:17:19 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Fix verify_rasds() and verify_devices() in SD 02_reverse.py In-Reply-To: <6e23c06353a1529f2951.1232580679@localhost.localdomain> References: <6e23c06353a1529f2951.1232580679@localhost.localdomain> Message-ID: <49781677.6060302@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 Jan 22 08:22:54 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Thu, 22 Jan 2009 13:52:54 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add some error checking when detecting hypervisor version In-Reply-To: References: Message-ID: <49782CDE.8090905@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232382714 28800 > # Node ID a5a4d35749d1d9ed8604ea4879e12828c7f5b169 > # Parent 57f3bc7c3105bb779b41e19b1c03a1e5f214cec1 > [TEST] #2 Add some error checking when detecting hypervisor version > > Updates: > -In libvirt or hypervisior version cannot be determined, print error message > to console. > > Signed-off-by: Kaitlin Rupert > > diff -r 57f3bc7c3105 -r a5a4d35749d1 suites/libvirt-cim/lib/XenKvmLib/reporting.py > --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Fri Jan 16 11:51:26 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Mon Jan 19 08:31:54 2009 -0800 > @@ -50,8 +50,17 @@ > libvirt_ver = virsh_ver.splitlines()[0].split()[4] > > if virsh_ver.splitlines()[3].find("hypervisor"): > - hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] > - hyp_ver = hyp_ver.split(": ")[1] > + tok = virsh_ver.splitlines()[3].split("hypervisor") > + if len(tok) > 1: > + tok = tok[1].split(": ") > + if len(tok) > 1: > + hyp_ver = tok[1] > Using splitlines() so many times and then subscripting it is a little confusing. Any specific reason for using it like this ? Here is an alternative for above: if virsh_ver != "Unknown": libvirt, l2, l3, hyper = virsh_ver.splitlines() if libvirt.find("libvir"): libvirt_ver = libvirt.split()[4] if hyper.find("hypervisor"): tok1 = hyper.split(":") hyp_ver = tok1[1] > + > + if libvirt_ver == "Unknown": > + print "\nUnable to determine libvirt version\n" > + > + if hyp_ver == "Unknown": > + print "\nUnable to determine hypervisior version\n" > > return libvirt_ver, hyp_ver > > > _______________________________________________ > 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 Jan 22 16:02:48 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 22 Jan 2009 08:02:48 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Add some error checking when detecting hypervisor version In-Reply-To: <49782CDE.8090905@linux.vnet.ibm.com> References: <49782CDE.8090905@linux.vnet.ibm.com> Message-ID: <497898A8.7000400@linux.vnet.ibm.com> >> libvirt_ver = virsh_ver.splitlines()[0].split()[4] >> >> if virsh_ver.splitlines()[3].find("hypervisor"): >> - hyp_ver = >> virsh_ver.splitlines()[3].split("hypervisor")[1] >> - hyp_ver = hyp_ver.split(": ")[1] >> + tok = virsh_ver.splitlines()[3].split("hypervisor") >> + if len(tok) > 1: >> + tok = tok[1].split(": ") >> + if len(tok) > 1: >> + hyp_ver = tok[1] >> > Using splitlines() so many times and then subscripting it is a little > confusing. Agreed - it is confusing. > Any specific reason for using it like this ? > > Here is an alternative for above: > > if virsh_ver != "Unknown": > libvirt, l2, l3, hyper = virsh_ver.splitlines() > if libvirt.find("libvir"): > libvirt_ver = libvirt.split()[4] > if hyper.find("hypervisor"): > tok1 = hyper.split(":") > hyp_ver = tok1[1] This approach is much cleaner. Will update the patch and resend. Thanks! -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 22 16:55:25 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 22 Jan 2009 08:55:25 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Add some error checking when detecting hypervisor version Message-ID: <9436d51e3f6f699ccba1.1232643325@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1232643309 28800 # Node ID 9436d51e3f6f699ccba16cb6183095f0f4dabdfc # Parent 79d847b2acf889cc83d62003e9cbf8617b1272aa [TEST] #3 Add some error checking when detecting hypervisor version Updates from 2 to 3: -Simplfy the splitline logic. Updates from 1 to 2: -In libvirt or hypervisior version cannot be determined, print error message to console. Signed-off-by: Kaitlin Rupert diff -r 79d847b2acf8 -r 9436d51e3f6f suites/libvirt-cim/lib/XenKvmLib/reporting.py --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Mon Jan 19 09:10:19 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Thu Jan 22 08:55:09 2009 -0800 @@ -45,13 +45,24 @@ cmd = "virsh version" virsh_ver = get_cmd_val(cmd, ip) if virsh_ver != "Unknown": - if len(virsh_ver.splitlines()) == 4: - if virsh_ver.splitlines()[0].find("libvir"): - libvirt_ver = virsh_ver.splitlines()[0].split()[4] + libvirt, tok1, tok2, hypervisor = virsh_ver.splitlines() + if libvirt.find("libvir"): + libvirt_ver = libvirt.split()[4] - if virsh_ver.splitlines()[3].find("hypervisor"): - hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] - hyp_ver = hyp_ver.split(": ")[1] + if hypervisor.find("hypervisor"): + tok = hypervisor.split("hypervisor") + #We need these checks here, because sometimes hypervisor is found, + #but the rest of the version info isn't available + if len(tok) > 1: + tok = tok[1].split(": ") + if len(tok) > 1: + hyp_ver = tok[1] + + if libvirt_ver == "Unknown": + print "\nUnable to determine libvirt version\n" + + if hyp_ver == "Unknown": + print "\nUnable to determine hypervisior version\n" return libvirt_ver, hyp_ver From rmaciel at linux.vnet.ibm.com Thu Jan 22 17:07:02 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Thu, 22 Jan 2009 15:07:02 -0200 Subject: [Libvirt-cim] [PATCH] Remove fopen() from out in KVMRedirectionSAP In-Reply-To: <1efa2d18e09bb7851ca7.1232585452@localhost.localdomain> References: <1efa2d18e09bb7851ca7.1232585452@localhost.localdomain> Message-ID: <4978A7B6.7060801@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232584945 28800 > # Node ID 1efa2d18e09bb7851ca70ca0112d8363190e81d1 > # Parent 6fa1f52dc8298b4d643fc94bb3f91715cc40dd58 > Remove fopen() from out in KVMRedirectionSAP > > The file is already open, we just need to close it. > > Signed-off-by: Kaitlin Rupert > > diff -r 6fa1f52dc829 -r 1efa2d18e09b src/Virt_KVMRedirectionSAP.c > --- a/src/Virt_KVMRedirectionSAP.c Tue Jan 20 22:27:01 2009 -0800 > +++ b/src/Virt_KVMRedirectionSAP.c Wed Jan 21 16:42:25 2009 -0800 > @@ -213,7 +213,6 @@ > } > > out: > - tcp_info = fopen(path, "r"); > fclose(tcp_info); > return s; > } > > _______________________________________________ > 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 Jan 22 19:29:38 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 22 Jan 2009 11:29:38 -0800 Subject: [Libvirt-cim] [PATCH] Update README so instructions to restart Pegasus / sfcb are comments Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232652569 28800 # Node ID e91ea7a0cecb9449ae5b415f50944ca97b4d3126 # Parent 42c9ad8b71cf38acc2e968d6fdf255b5715b6ae2 Update README so instructions to restart Pegasus / sfcb are comments And don't look like instructions that should be entered on the command line Signed-off-by: Kaitlin Rupert diff -r 42c9ad8b71cf -r e91ea7a0cecb README --- a/README Wed Jan 21 10:20:00 2009 -0800 +++ b/README Thu Jan 22 11:29:29 2009 -0800 @@ -35,7 +35,10 @@ $ ./configure $ make $ make preinstall - $ Restart Pegasus or SFCB + + # Restart Pegasus or SFCB + $ sudo make install $ sudo make postinstall - $ Restart Pegasus or SFCB + + # Restart Pegasus or SFCB From kaitlin at linux.vnet.ibm.com Thu Jan 22 19:33:36 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 22 Jan 2009 11:33:36 -0800 Subject: [Libvirt-cim] [PATCH] [CU] Update README - indicate autogen.sh is run when building from a cloned tree Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232652800 28800 # Node ID d4a9e07d6738f76780bcb1ada5b7c0dbc57e4e0f # Parent 0ef95d18e20c364966938676a8023c9bca167724 [CU] Update README - indicate autogen.sh is run when building from a cloned tree Signed-off-by: Kaitlin Rupert diff -r 0ef95d18e20c -r d4a9e07d6738 README --- a/README Tue Dec 02 09:09:48 2008 -0800 +++ b/README Thu Jan 22 11:33:20 2009 -0800 @@ -29,7 +29,9 @@ Procedure: - $ ./autogen.sh + -If building a tree cloned from the hg repository, run this step first: + $ ./autogen.sh + $ # You probably want the EO parser enabled $ ./configure --enable-eoparser $ make From deeptik at linux.vnet.ibm.com Fri Jan 23 05:23:43 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 23 Jan 2009 10:53:43 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Add some error checking when detecting hypervisor version In-Reply-To: <9436d51e3f6f699ccba1.1232643325@localhost.localdomain> References: <9436d51e3f6f699ccba1.1232643325@localhost.localdomain> Message-ID: <4979545F.4000508@linux.vnet.ibm.com> +1 for me. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232643309 28800 > # Node ID 9436d51e3f6f699ccba16cb6183095f0f4dabdfc > # Parent 79d847b2acf889cc83d62003e9cbf8617b1272aa > [TEST] #3 Add some error checking when detecting hypervisor version > > Updates from 2 to 3: > -Simplfy the splitline logic. > > Updates from 1 to 2: > -In libvirt or hypervisior version cannot be determined, print error message > to console. > > Signed-off-by: Kaitlin Rupert > > diff -r 79d847b2acf8 -r 9436d51e3f6f suites/libvirt-cim/lib/XenKvmLib/reporting.py > --- a/suites/libvirt-cim/lib/XenKvmLib/reporting.py Mon Jan 19 09:10:19 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/reporting.py Thu Jan 22 08:55:09 2009 -0800 > @@ -45,13 +45,24 @@ > cmd = "virsh version" > virsh_ver = get_cmd_val(cmd, ip) > if virsh_ver != "Unknown": > - if len(virsh_ver.splitlines()) == 4: > - if virsh_ver.splitlines()[0].find("libvir"): > - libvirt_ver = virsh_ver.splitlines()[0].split()[4] > + libvirt, tok1, tok2, hypervisor = virsh_ver.splitlines() > + if libvirt.find("libvir"): > + libvirt_ver = libvirt.split()[4] > > - if virsh_ver.splitlines()[3].find("hypervisor"): > - hyp_ver = virsh_ver.splitlines()[3].split("hypervisor")[1] > - hyp_ver = hyp_ver.split(": ")[1] > + if hypervisor.find("hypervisor"): > + tok = hypervisor.split("hypervisor") > + #We need these checks here, because sometimes hypervisor is found, > + #but the rest of the version info isn't available > + if len(tok) > 1: > + tok = tok[1].split(": ") > + if len(tok) > 1: > + hyp_ver = tok[1] > + > + if libvirt_ver == "Unknown": > + print "\nUnable to determine libvirt version\n" > + > + if hyp_ver == "Unknown": > + print "\nUnable to determine hypervisior version\n" > > return libvirt_ver, hyp_ver > > > _______________________________________________ > 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 Fri Jan 23 10:57:39 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 23 Jan 2009 08:57:39 -0200 Subject: [Libvirt-cim] [PATCH] Update README so instructions to restart Pegasus / sfcb are comments In-Reply-To: References: Message-ID: <4979A2A3.8050207@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232652569 28800 > # Node ID e91ea7a0cecb9449ae5b415f50944ca97b4d3126 > # Parent 42c9ad8b71cf38acc2e968d6fdf255b5715b6ae2 > Update README so instructions to restart Pegasus / sfcb are comments > > And don't look like instructions that should be entered on the command line > > Signed-off-by: Kaitlin Rupert > > diff -r 42c9ad8b71cf -r e91ea7a0cecb README > --- a/README Wed Jan 21 10:20:00 2009 -0800 > +++ b/README Thu Jan 22 11:29:29 2009 -0800 > @@ -35,7 +35,10 @@ > $ ./configure > $ make > $ make preinstall > - $ Restart Pegasus or SFCB > + > + # Restart Pegasus or SFCB > + > $ sudo make install > $ sudo make postinstall > - $ Restart Pegasus or SFCB > + > + # Restart Pegasus or SFCB > > _______________________________________________ > 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 Fri Jan 23 10:59:10 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 23 Jan 2009 08:59:10 -0200 Subject: [Libvirt-cim] [PATCH] [CU] Update README - indicate autogen.sh is run when building from a cloned tree In-Reply-To: References: Message-ID: <4979A2FE.3050203@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232652800 28800 > # Node ID d4a9e07d6738f76780bcb1ada5b7c0dbc57e4e0f > # Parent 0ef95d18e20c364966938676a8023c9bca167724 > [CU] Update README - indicate autogen.sh is run when building from a cloned tree > > Signed-off-by: Kaitlin Rupert > > diff -r 0ef95d18e20c -r d4a9e07d6738 README > --- a/README Tue Dec 02 09:09:48 2008 -0800 > +++ b/README Thu Jan 22 11:33:20 2009 -0800 > @@ -29,7 +29,9 @@ > > Procedure: > > - $ ./autogen.sh > + -If building a tree cloned from the hg repository, run this step first: > + $ ./autogen.sh > + > $ # You probably want the EO parser enabled > $ ./configure --enable-eoparser > $ make > > _______________________________________________ > 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 Fri Jan 23 11:54:24 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 23 Jan 2009 09:54:24 -0200 Subject: [Libvirt-cim] [PATCH] Add interop and cimv2 ns registrations to spec In-Reply-To: <29c0ffe73355b4461eff.1232577987@localhost.localdomain> References: <29c0ffe73355b4461eff.1232577987@localhost.localdomain> Message-ID: <4979AFF0.1070003@linux.vnet.ibm.com> INTEROP_MOF variable misses some values when compared to the INTEROP_MOFS variable in Makefile.am. Follows the correct variable assignment: %define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile}.mof Variable CIMV2_REG also has different values from the CIMV2_REGS from Makefile.am. This time, the .spec variable includes a value which is not included by the Makefile.am variable .spec {HostedResourcePool,ElementCapabilities,HostedService,HostedDependency, ---->RegisteredProfile<------,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.registration Makefile.am CIMV2_REGS = \ schema/HostedResourcePool.registration \ schema/ElementCapabilities.registration \ schema/HostedService.registration \ schema/HostedDependency.registration \ schema/ElementConformsToProfile.registration \ schema/HostedAccessPoint.registration Since the values of CIMV2_MOFS (Makefile.am) and CIMV2_MOF (.spec) are equal, the RegisteredProfile value should be included in the CIMV2_REGS (Makefile.am) too. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232577959 28800 > # Node ID 29c0ffe73355b4461eff24a3ba5263bea61e0e7a > # Parent 818470c2d36f7f573491be79cb8b414cc638da61 > Add interop and cimv2 ns registrations to spec. > > Signed-off-by: Kaitlin Rupert > > diff -r 818470c2d36f -r 29c0ffe73355 libvirt-cim.spec.in > --- a/libvirt-cim.spec.in Tue Jan 20 08:06:05 2009 -0800 > +++ b/libvirt-cim.spec.in Wed Jan 21 14:45:59 2009 -0800 > @@ -51,6 +51,12 @@ > %define REGISTRATION %{_datadir}/%{name}/*.registration > %define SCHEMA %{_datadir}/%{name}/*.mof > > +%define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration > +%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.mof > + > +%define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.registration > +%define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof > + > %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ > -n @CIM_VIRT_NS@ \ > -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true > @@ -65,6 +71,15 @@ > %{_datadir}/%{name}/provider-register.sh -t pegasus \ > -n @CIM_VIRT_NS@ \ > -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true > +%{_datadir}/%{name}/provider-register.sh -t pegasus \ > + -n @CIM_VIRT_NS@ \ > + -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true > +%{_datadir}/%{name}/provider-register.sh -t pegasus \ > + -n root/interop \ > + -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true > +%{_datadir}/%{name}/provider-register.sh -t pegasus \ > + -n root/cimv2\ > + -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true > > %preun > %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ > > _______________________________________________ > 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 Fri Jan 23 12:36:44 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 23 Jan 2009 04:36:44 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding new tc to verify KVMRedirectionSAP Message-ID: # HG changeset patch # User Deepti B. Kalakeri # Date 1232714174 28800 # Node ID a2ecb7430c50fcf6df6019625ee1a8b8ae24dfd9 # Parent ef20310648bc1d22c4c6aa23bcc092a01a49e340 [TEST] #2 Adding new tc to verify KVMRedirectionSAP. Updates from patch 1 to 2: -------------------------- Added GRASD support in the call to DefineSytem(). Modified necessary places for GRASD. Tested with KVM/Xen/LXC on current sources and KVM with F9 rpm. This tc will fail with LXC, Xen with current sources. Signed-off-by: Deepti B. Kalakeri diff -r ef20310648bc -r a2ecb7430c50 suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Jan 22 01:15:12 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Jan 23 04:36:14 2009 -0800 @@ -46,6 +46,15 @@ # Default TimeoutPeriod param for CS.RequestedStateChange() TIME = "00000000000000.000000:000" + +#KVMRedirectionSAP protocol values +KVMRedSAP_proto = { 'raw' : 2, 'rdp' : 3, 'vnc' : 4 } + +# CIM values for KVMRedirectionSAP.EnabledState +CIM_SAP_ACTIVE_STATE = 2 +CIM_SAP_INACTIVE_STATE = 3 +CIM_SAP_AVAILABLE_STATE = 6 + # vxml.NetXML default_bridge_name = 'testbridge' diff -r ef20310648bc -r a2ecb7430c50 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Thu Jan 22 01:15:12 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri Jan 23 04:36:14 2009 -0800 @@ -33,6 +33,7 @@ RASD_TYPE_NET_ETHER = 10 RASD_TYPE_NET_OTHER = 11 RASD_TYPE_DISK = 17 +RASD_TYPE_GRAPHICS = 24 VSSD_RECOVERY_NONE = 2 VSSD_RECOVERY_RESTART = 3 @@ -232,6 +233,36 @@ def get_masd_class(virt): pass + +class CIM_GraphicsResourceAllocationSettingData(CIMClassMOF): + def __init__(self, name, res_sub_type="vnc", ip="127.0.0.1", + lport='-1', keymap="en-us"): + self.InstanceID = '%s/graphics' %name + self.ResourceType = RASD_TYPE_GRAPHICS + + if res_sub_type != None: + self.ResourceSubType = res_sub_type + + if ip != None and lport != None: + self.Address = '%s:%s' % (ip, lport) + + if keymap != None: + self.KeyMap = keymap + + +class Xen_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData): + pass + +class KVM_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData): + pass + +class LXC_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData): + pass + + at eval_cls('GraphicsResourceAllocationSettingData') +def get_gasd_class(virt): + pass + def default_vssd_rasd_str(dom_name='test_domain', disk_dev='xvda', disk_source=const.Xen_disk_path, @@ -272,9 +303,12 @@ mallocunits=malloc_units, name=dom_name) + class_gasd = get_gasd_class(virt) + g = class_gasd(name=dom_name) + # LXC only takes disk and memory device for now. if virt == 'LXC': - return vssd, [d.mof(), m.mof()] + return vssd, [d.mof(), m.mof()], g.mof() class_nasd = get_nasd_class(virt) if net_mac != const.Xen_default_mac: @@ -293,5 +327,5 @@ p = class_pasd(vcpu=proc_vcpu, name=dom_name) - return vssd, [d.mof(), n.mof(), p.mof(), m.mof()] + return vssd, [d.mof(), n.mof(), p.mof(), m.mof(), g.mof()] diff -r ef20310648bc -r a2ecb7430c50 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 22 01:15:12 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Jan 23 04:36:14 2009 -0800 @@ -413,7 +413,6 @@ '/domain/devices/interface/source/@network') return networkStr - def dumpxml(self, ip): cmd = 'virsh -c %s dumpxml %s' % (self.vuri, self.dname) s, o = utils.run_remote(ip, cmd) @@ -467,7 +466,8 @@ class VirtCIM: def __init__(self, virt, dom_name, disk_dev, disk_source, net_type, net_name, net_mac, vcpus, mem, - mem_allocunits, emu_type): + mem_allocunits, emu_type, grstype, ip, + port_num, kmap): self.virt = virt self.domain_name = dom_name self.err_rc = None @@ -488,7 +488,9 @@ self.masd = vsms.get_masd_class(virt)(megabytes=mem, mallocunits=mem_allocunits, name=dom_name) - + self.gasd = vsms.get_gasd_class(virt)(name=dom_name, + res_sub_type=grstype, ip=ip, + lport=port_num, keymap=kmap) def cim_define(self, ip, ref_conf=None): service = vsms.get_vsms_class(self.virt)(ip) @@ -506,6 +508,8 @@ pass else: res_settings.append(str(self.nasd)) + if self.gasd is not None: + res_settings.append(str(self.gasd)) if ref_conf is None: ref_conf = ' ' @@ -657,6 +661,8 @@ self.dasd = rasd elif cn.find("NetResourceAllocationSettingData") >= 0: self.nasd = rasd + elif cn.find("GraphicsResourceAllocationSettingData") >= 0: + self.gasd = rasd def verify_error_msg(self, exp_rc, exp_desc): try: @@ -688,7 +694,8 @@ disk=const.Xen_default_disk_dev, ntype=const.default_net_type, net_name=const.default_network_name, - emu_type=None): + emu_type=None, grstype="vnc", address="127.0.0.1", + port_num='-1', keymap="en-us"): if not (os.path.exists(const.Xen_kernel_path) \ and os.path.exists(const.Xen_init_path)): logger.error('ERROR: Either the kernel image ' @@ -700,7 +707,7 @@ VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path, ntype, net_name, mac, vcpus, mem, mem_allocunits, - emu_type) + emu_type, grstype, address, port_num, keymap) def _os(self, os_kernel, os_initrd): os = self.get_node('/domain/os') @@ -750,14 +757,16 @@ disk=const.KVM_default_disk_dev, ntype=const.default_net_type, net_name=const.default_network_name, - emu_type=None): + emu_type=None, grstype="vnc", address="127.0.0.1", + port_num='-1', keymap="en-us"): if not os.path.exists(disk_file_path): logger.error('Error: Disk image does not exist') sys.exit(1) VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus) VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path, ntype, net_name, mac, vcpus, mem, - mem_allocunits, emu_type) + mem_allocunits, emu_type, grstype, address, + port_num, keymap) self._os() self._devices(const.KVM_default_emulator, ntype, disk_file_path, disk, mac, net_name) @@ -802,14 +811,15 @@ disk=const.XenFV_default_disk_dev, ntype=const.default_net_type, net_name=const.default_network_name, - emu_type=None): + emu_type=None, grstype="vnc", + address="127.0.0.1", port_num='-1', keymap="en-us"): if not os.path.exists(disk_file_path): logger.error('Error: Disk image does not exist') sys.exit(1) VirtXML.__init__(self, 'xenfv', test_dom, set_uuid(), mem, vcpus) VirtCIM.__init__(self, 'XenFV', test_dom, disk, disk_file_path, ntype, net_name, mac, vcpus, mem, mem_allocunits, - emu_type) + emu_type, grstype, address, port_num, keymap) self._features() self._os(const.XenFV_default_loader) self._devices(const.XenFV_default_emulator, @@ -856,11 +866,13 @@ mac=const.LXC_default_mac, ntype=const.default_net_type, net_name=const.default_network_name, - tty=const.LXC_default_tty): + tty=const.LXC_default_tty, grstype="vnc", + address="127.0.0.1", port_num='-1', keymap="en-us"): VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus) VirtCIM.__init__(self, 'LXC', test_dom, const.LXC_default_mp, const.LXC_default_source, ntype, net_name, mac, vcpus, - mem, const.default_mallocunits, None) + mem, const.default_mallocunits, None, grstype, + address, port_num, keymap) self._os(const.LXC_init_path) self._devices(mac, ntype, net_name, const.LXC_default_tty) self.create_lxc_file(CIM_IP, const.LXC_init_path) From deeptik at linux.vnet.ibm.com Fri Jan 23 13:56:04 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Fri, 23 Jan 2009 05:56:04 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP Message-ID: <7279b969bfff758c7b24.1232718964@xen.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1232718867 28800 # Node ID 7279b969bfff758c7b24fc2223826fe7ffafb3f2 # Parent a2ecb7430c50fcf6df6019625ee1a8b8ae24dfd9 [TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP. Signed-off-by: Deepti B. Kalakeri diff -r a2ecb7430c50 -r 7279b969bfff suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Fri Jan 23 05:54:27 2009 -0800 @@ -0,0 +1,171 @@ +#!/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 test case is used to verify the KVMRedirectionSAP properties in detail. +# This test case verifies the following: +# +# When the domain is defined: +# KVMRedirectionSAP.Enabled = 3 and +# KVMRedirectionSAP.[ElementName, Name] = port used in the GRASD:-1 +# +# When the defined domain is started: +# KVMRedirectionSAP.Enabled = 6 and +# KVMRedirectionSAP.[ElementName, Name] = port used in the GRASD:0 +# +# Date : 15-01-2009 +# + +import sys +import random +from XenKvmLib.vxml import get_class +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.enumclass import EnumInstances +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.const import KVMRedSAP_proto, CIM_SAP_AVAILABLE_STATE, \ + CIM_SAP_INACTIVE_STATE + +sup_types = ['Xen', 'KVM', 'LXC'] +libvirtcim_redSAP_changes = 716 +test_dom = 'test_kvmredsap_dom' + +def enum_redsap(server, virt, classname): + redsap_insts = { } + status = FAIL + + try: + redsap_list = EnumInstances(server, classname) + for redsap in redsap_list: + guest = redsap.SystemName + if guest == test_dom: + if redsap.Classname not in redsap_insts.keys(): + redsap_insts[redsap.Classname] = redsap + status = PASS + else: + raise Exception("Got more than one record for: %s" \ + % test_dom) + except Exception, details: + logger.error(CIM_ERROR_ENUMERATE, classname) + logger.error("Exception details: %s", details) + + return status, redsap_insts + + +def verify_redsap_values(val_list, redsap_inst, classname): + try: + for key in val_list.keys(): + redsap = redsap_inst[classname] + ret_val = eval('redsap.' + key) + if ret_val != val_list[key]: + raise Exception("'%s' Value Mismatch, Expected %s, Got %s" \ + % (key, val_list[key], ret_val)) + except Exception, details: + logger.error("Exception details: %s", details) + return FAIL + + return PASS + + at do_main(sup_types) +def main(): + virt = main.options.virt + server = main.options.ip + + cname = 'KVMRedirectionSAP' + classname = get_typed_class(virt, cname) + + # This check is required for libivirt-cim providers which do not have + # REDSAP changes in it and the REDSAP provider is available with + # revision >= 716. + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev < libvirtcim_redSAP_changes: + logger.info("'%s' provider not supported, hence skipping the tc ....", + classname) + return SKIP + + vsxml = None + action_start = False + + try: + virt_xml = get_class(virt) + lport = random.randrange(5900, 5999) + vsxml = virt_xml(test_dom, port_num=str(lport)) + + # Define the VS, and verify the KVMRedirectionSAP values. + ret = vsxml.cim_define(server) + if not ret: + raise Exception("Failed to define the dom: %s" % test_dom) + + # val_list that will be used for comparing with enum of + # KVMRedirectionSAP values + sccn = get_typed_class(virt, 'ComputerSystem') + val_list = { + 'SystemCreationClassName' : sccn, + 'SystemName' : test_dom, + 'CreationClassName' : classname, + 'KVMProtocol' : KVMRedSAP_proto["vnc"], + 'EnabledState' : CIM_SAP_INACTIVE_STATE + } + val_list['ElementName'] = val_list['Name'] = "%s:-1" % lport + + status, redsap_inst = enum_redsap(server, virt, classname) + if status != PASS: + raise Exception("Failed to get information on the defined dom:%s" \ + % test_dom) + + status = verify_redsap_values(val_list, redsap_inst, classname) + if status != PASS: + raise Exception("Failed to verify information for the defined "\ + "dom:%s" % test_dom) + + # start the guest and verify the KVMRedirectionSAP values + status = vsxml.cim_start(server) + if not ret: + raise Exception("Failed to start the dom: %s" % test_dom) + + status, redsap_inst = enum_redsap(server, virt, classname) + if status != PASS: + action_start = True + raise Exception("Failed to get information for running dom:%s" \ + % test_dom) + + val_list['ElementName'] = val_list['Name'] = "%s:0" % lport + val_list['EnabledState'] = CIM_SAP_AVAILABLE_STATE + + status = verify_redsap_values(val_list, redsap_inst, classname) + if status != PASS: + action_start = True + raise Exception("Failed to verify information for running dom:%s" \ + % test_dom) + + except Exception, detail: + logger.error("Exception: %s", detail) + status = FAIL + + if action_start == True: + vsxml.cim_destroy(server) + + vsxml.undefine(server) + + return status + +if __name__ == "__main__": + sys.exit(main()) From deeptik at linux.vnet.ibm.com Fri Jan 23 13:56:50 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 23 Jan 2009 19:26:50 +0530 Subject: [Libvirt-cim] Difference in the value assigned to port field for Xen, KVM, LXC Message-ID: <4979CCA2.2020207@linux.vnet.ibm.com> Hi, I am trying to verify the KVMRedirectionSAP. I am seeing difference in the way the port value is getting assigned. I am trying to create a guest using DefineSystem(). Here is the Details of the GraphicsRASD I am passing as part of the ResourceSetting Parameter. KVM_GraphicsResourceAllocationSettingData { InstanceID = "test_redsap_dom/graphics"; ResourceType = 24; KeyMap = "en-us"; ResourceSubType = "vnc"; Address = "127.0.0.1:5931"; }; My intention is to create a guest whose vnc port has a specific value, ex: 5931 in the above case. Though the guest is getting created, the dumpxml of the guest shows that the port value is getting assigned to -1. Hence the port part of the Address field in GraphicsRASD is set to -1. Hence the port value in the ElementName/Name is supplied as -1. PS: I have used values between 5900 - 5999 for the port field in the graphics part. Here is the Xen XML details obtained from the debug statement. test_redsap_dom destroy destroy 125f39c4-e0f0-4b2d-bb84-891700639af0 linux /tmp/default-xen-kernel /tmp/default-xen-initrd 131072 131072 1 But I am able to create a guest with a port of my desired value for KVM. For KVM I am able to get appropriate value for the port in the Address and the ElementName/Name field of the GraphicsRASD/KVMRedirectionSAP. Here is the XML used for creating KVM guest. test_redsap_dom destroy destroy c1c5c50b-52ce-4ba3-868e-dee42708063a hvm 131072 131072 1 In case of LXC I am able to assign port value of choice and able to get the desired value in the Address and the ElementName/Name fields for the defined guest. But the problem with the LXC is that value of the rport in the ElementName/Name and Address is getting set to -1 even when guest is started. Also, though the virsh shows the guest as running the EnabledState value for Xen and LXC guest is still set to 3 instead of setting a value of 6. LXC: test_redsap_dom 05e67d5e-7702-46c4-a90b-2f416001f95b 131072 131072 0 exe /tmp/cimtest_lxc_init destroy restart destroy Please let me know if there is something which I have missed. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Fri Jan 23 13:58:37 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 23 Jan 2009 19:28:37 +0530 Subject: [Fwd: [Libvirt-cim] [PATCH] [TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP] Message-ID: <4979CD0D.9090002@linux.vnet.ibm.com> Please use these two patches for reviewing the 01_enum_KVMredSAP.py of KVMRedirectionSAP tc. Sorry for the confusion. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com -------------- next part -------------- An embedded message was scrubbed... From: "Deepti B. Kalakeri" Subject: [Libvirt-cim] [PATCH] [TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP Date: Fri, 23 Jan 2009 05:56:04 -0800 Size: 12858 URL: -------------- next part -------------- An embedded message was scrubbed... From: "Deepti B. Kalakeri" Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding new tc to verify KVMRedirectionSAP Date: Fri, 23 Jan 2009 04:36:44 -0800 Size: 15144 URL: From rmaciel at linux.vnet.ibm.com Fri Jan 23 17:19:37 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 23 Jan 2009 15:19:37 -0200 Subject: [Libvirt-cim] [PATCH] Add support for EmulatedType 1 to SDC In-Reply-To: <2409abcca2b26accdb85.1232129955@localhost.localdomain> References: <2409abcca2b26accdb85.1232129955@localhost.localdomain> Message-ID: <4979FC29.1030103@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232129948 28800 > # Node ID 2409abcca2b26accdb8529a0951b42446ddcc1f0 > # Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8 > Add support for EmulatedType 1 to SDC. > > Also fix a bug with the if statement in set_disk_props() and a spacing bug. > > Signed-off-by: Kaitlin Rupert > > diff -r 8c56ab06aeb9 -r 2409abcca2b2 src/Virt_SettingsDefineCapabilities.c > --- a/src/Virt_SettingsDefineCapabilities.c Wed Jan 14 08:41:52 2009 -0800 > +++ b/src/Virt_SettingsDefineCapabilities.c Fri Jan 16 10:19:08 2009 -0800 > @@ -611,13 +611,13 @@ > const CMPIObjectPath *ref, > const char *id, > uint64_t disk_size, > + uint16_t emu_type, > struct inst_list *list) > { > const char *addr; > const char *dev; > CMPIInstance *inst; > CMPIStatus s = {CMPI_RC_OK, NULL}; > - uint16_t emu_type = 0; > > if (type == DOMAIN_LXC) { > addr = "/tmp"; > @@ -646,7 +646,7 @@ > dev = "xvda"; > CMSetProperty(inst, "Caption", > (CMPIValue *)"PV disk", CMPI_chars); > - } else if (type, DOMAIN_XENFV) { > + } else if (type == DOMAIN_XENFV) { > CMSetProperty(inst, "Caption", > (CMPIValue *)"FV disk", CMPI_chars); > } > @@ -671,6 +671,7 @@ > char *pfx; > const char *id; > uint64_t disk_size; > + uint16_t emu_type = 0; > CMPIStatus s = {CMPI_RC_OK, NULL}; > > switch(template_type) { > @@ -702,16 +703,54 @@ > pfx = class_prefix_name(CLASSNAME(ref)); > > if (STREQ(pfx, "Xen")) { > - s = set_disk_props(DOMAIN_XENPV, ref, id, disk_size, list); > - > + int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV}; > + int i = 0; > + > + for (; i < 2; i++) { > + emu_type = 0; > + s = set_disk_props(xen_type[i], > + ref, > + id, > + disk_size, > + emu_type, > + list); > + if (s.rc != CMPI_RC_OK) > + goto out; > + > + emu_type = 1; > + s = set_disk_props(xen_type[i], > + ref, > + id, > + disk_size, > + emu_type, > + list); > + if (s.rc != CMPI_RC_OK) > + goto out; > + } > + } else if (STREQ(pfx, "KVM")) { > + s = set_disk_props(DOMAIN_KVM, > + ref, > + id, > + disk_size, > + emu_type, > + list); > if (s.rc != CMPI_RC_OK) > - goto out; > + goto out; > > - s = set_disk_props(DOMAIN_XENFV, ref, id, disk_size, list); > - } else if (STREQ(pfx, "KVM")) { > - s = set_disk_props(DOMAIN_KVM, ref, id, disk_size, list); > + emu_type = 1; > + s = set_disk_props(DOMAIN_KVM, > + ref, > + id, > + disk_size, > + emu_type, > + list); > } else if (STREQ(pfx, "LXC")) { > - s = set_disk_props(DOMAIN_LXC, ref, id, disk_size, list); > + s = set_disk_props(DOMAIN_LXC, > + ref, > + id, > + disk_size, > + emu_type, > + list); > } else { > cu_statusf(_BROKER, &s, > CMPI_RC_ERR_FAILED, > > _______________________________________________ > 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 Fri Jan 23 18:58:09 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 23 Jan 2009 10:58:09 -0800 Subject: [Libvirt-cim] Difference in the value assigned to port field for Xen, KVM, LXC In-Reply-To: <4979CCA2.2020207@linux.vnet.ibm.com> References: <4979CCA2.2020207@linux.vnet.ibm.com> Message-ID: <497A1341.7010101@linux.vnet.ibm.com> Deepti B Kalakeri wrote: > Hi, > > I am trying to verify the KVMRedirectionSAP. I am seeing difference in > the way the port value is getting assigned. > I am trying to create a guest using DefineSystem(). Here is the Details > of the GraphicsRASD I am passing as part of the ResourceSetting Parameter. > > > KVM_GraphicsResourceAllocationSettingData { > InstanceID = "test_redsap_dom/graphics"; > ResourceType = 24; > KeyMap = "en-us"; > ResourceSubType = "vnc"; > Address = "127.0.0.1:5931"; > }; > > My intention is to create a guest whose vnc port has a specific value, > ex: 5931 in the above case. > Though the guest is getting created, the dumpxml of the guest shows that > the port value is getting assigned to -1. > Hence the port part of the Address field in GraphicsRASD is set to -1. > Hence the port value in the ElementName/Name is supplied as -1. Hi Deepti, I'm not clear which virt type you are seeing this issue on. Is this with LXC only? I wasn't able to reproduce this use. See below for the steps I followed. Let me know if these steps don't work for you. > Also, though the virsh shows the guest as running the EnabledState value > for Xen and LXC guest is still set to 3 instead of setting a value of 6. > The EnabledState of the KVMRedirectionSAP changes whenever the connection is available. In this case, you'll need to be running a VNC server on your guest in order for the EnabledState to active/available. Otherwise, the KVMRedirectionSAP is offline. =================================== Steps to define an LXC guest with vnc graphics console: 1) Open file and define XML with the following: LXC_VirtualSystemManagementService hostname instance of LXC_VirtualSystemSettingData { CreationClassName = "LXC_VirtualSystemSettingData"; VirtualSystemIdentifier = "test"; ElementName = "test"; VirtualSystemType = "LXC"; AutomaticShutdownAction = 2; AutomaticRecoveryAction = 3; BootDevice = "hd"; }; instance of LXC_GraphicsResourceAllocationSettingData { InstanceID = "test/graphics"; ResourceType = 24; KeyMap = "en-us"; ResourceSubType = "vnc"; Address = "127.0.0.1:5931"; }; 2) Check the defined guest: $ virsh -c lxc:///system dumpxml test test 46c027c3-d143-4b37-97c3-ac86c9c3bca6 0 0 0 exe /bin/false destroy restart restart -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Fri Jan 23 19:43:28 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 23 Jan 2009 11:43:28 -0800 Subject: [Libvirt-cim] [PATCH] Add interop and cimv2 ns registrations to spec In-Reply-To: <4979AFF0.1070003@linux.vnet.ibm.com> References: <29c0ffe73355b4461eff.1232577987@localhost.localdomain> <4979AFF0.1070003@linux.vnet.ibm.com> Message-ID: <497A1DE0.50006@linux.vnet.ibm.com> Richard Maciel wrote: > INTEROP_MOF variable misses some values when compared to the > INTEROP_MOFS variable in Makefile.am. Follows the correct variable > assignment: > > %define INTEROP_MOF > %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile}.mof > > > Variable CIMV2_REG also has different values from the CIMV2_REGS from > Makefile.am. This time, the .spec variable includes a value which is not > included by the Makefile.am variable > > .spec > {HostedResourcePool,ElementCapabilities,HostedService,HostedDependency, > ---->RegisteredProfile<------,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.registration > > My mistake here - RegisteredProfile and ComputerSystem shouldn't be in the CIMV2_REG list. The list in Makefile.am is correct. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 26 23:05:35 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 26 Jan 2009 15:05:35 -0800 Subject: [Libvirt-cim] [PATCH] (#2) Add interop and cimv2 ns registrations to spec Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1232740126 28800 # Node ID eb2df7761596b0fdb38c02aa741c00592e8ddf08 # Parent c87e67c92f7ceaf556e8be90547de324026f315b (#2) Add interop and cimv2 ns registrations to spec. Updates: -Fix the REG and MOF values to reflext the values in Makefile.am Signed-off-by: Kaitlin Rupert diff -r c87e67c92f7c -r eb2df7761596 libvirt-cim.spec.in --- a/libvirt-cim.spec.in Fri Jan 16 10:19:08 2009 -0800 +++ b/libvirt-cim.spec.in Fri Jan 23 11:48:46 2009 -0800 @@ -51,6 +51,12 @@ %define REGISTRATION %{_datadir}/%{name}/*.registration %define SCHEMA %{_datadir}/%{name}/*.mof +%define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration +%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile}.mof + +%define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,ElementConformsToProfile,HostedAccessPoint}.registration +%define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof + %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ -n @CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true @@ -65,6 +71,15 @@ %{_datadir}/%{name}/provider-register.sh -t pegasus \ -n @CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -t pegasus \ + -n @CIM_VIRT_NS@ \ + -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -t pegasus \ + -n root/interop \ + -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -t pegasus \ + -n root/cimv2\ + -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true %preun %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ From kaitlin at linux.vnet.ibm.com Mon Jan 26 23:31:28 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 26 Jan 2009 15:31:28 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding new tc to verify KVMRedirectionSAP In-Reply-To: References: Message-ID: <497E47D0.3090604@linux.vnet.ibm.com> > if virt == 'LXC': > - return vssd, [d.mof(), m.mof()] > + return vssd, [d.mof(), m.mof()], g.mof() g.mof() should be included in the list. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Mon Jan 26 23:31:15 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Mon, 26 Jan 2009 15:31:15 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP In-Reply-To: <7279b969bfff758c7b24.1232718964@xen.beaverton.ibm.com> References: <7279b969bfff758c7b24.1232718964@xen.beaverton.ibm.com> Message-ID: <497E47C3.3030706@linux.vnet.ibm.com> Deepti B. Kalakeri wrote: > # HG changeset patch > # User Deepti B. Kalakeri > # Date 1232718867 28800 > # Node ID 7279b969bfff758c7b24fc2223826fe7ffafb3f2 > # Parent a2ecb7430c50fcf6df6019625ee1a8b8ae24dfd9 > [TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP. > > Signed-off-by: Deepti B. Kalakeri On my system with LXC, I got the following error: KVMRedirectionSAP - 01_enum_KVMredSAP.py: FAIL ERROR - Exception details: 'ElementName' Value Mismatch, Expected 5967:0, Got 5967:-1 ERROR - Exception: Failed to verify information for running dom:test_kvmredsap_dom Container's guests don't really have the proper support for graphics. For now, I would just verify this for a defined guest. > +import sys > +import random This should be: from random import randrange > + > +def enum_redsap(server, virt, classname): > + redsap_insts = { } > + status = FAIL > + > + try: > + redsap_list = EnumInstances(server, classname) > + for redsap in redsap_list: > + guest = redsap.SystemName > + if guest == test_dom: You don't use guest anywhere else but here, so just do: if redsap.SystemName == test_dom -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Jan 27 05:14:50 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 27 Jan 2009 10:44:50 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Adding new tc to verify KVMRedirectionSAP In-Reply-To: <497E47D0.3090604@linux.vnet.ibm.com> References: <497E47D0.3090604@linux.vnet.ibm.com> Message-ID: <497E984A.3080401@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> if virt == 'LXC': >> - return vssd, [d.mof(), m.mof()] >> + return vssd, [d.mof(), m.mof()], g.mof() > > g.mof() should be included in the list. Oops! thats a nice catch.. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Jan 27 08:39:38 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 27 Jan 2009 00:39:38 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #3 Adding new tc to verify KVMRedirectionSAP Message-ID: <4ad705c27d10d7be718e.1233045578@xen.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1233045430 28800 # Node ID 4ad705c27d10d7be718ee92a9d0bdfb60563a4b5 # Parent a9dd0a50858aa1c382278393d863b213c8c5b565 [TEST] #3 Adding new tc to verify KVMRedirectionSAP. Changes: -------- >From Patch 2 to 3: ------------------ 1) Changed the import stmt for randrange. 2) Changes to verify KVMRedirectionSAP for defined guest in case of LXC. 3) Included g.mof() in the RASD list returned by default_vssd_rasd_str(). Updates from patch 1 to 2: -------------------------- Added GRASD support in the call to DefineSytem(). Modified vxml.py , vsms.py and const.py to support GRASD. Tested with KVM/Xen/LXC on current sources and KVM with F9 rpm. This tc will fail for Xen with current sources. Signed-off-by: Deepti B. Kalakeri diff -r a9dd0a50858a -r 4ad705c27d10 suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Tue Jan 27 00:37:10 2009 -0800 @@ -0,0 +1,178 @@ +#!/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 test case is used to verify the KVMRedirectionSAP properties in detail. +# This test case verifies the following: +# +# When the domain is defined: +# KVMRedirectionSAP.Enabled = 3 and +# KVMRedirectionSAP.[ElementName, Name] = port used in the GRASD:-1 +# +# When the defined domain is started: +# KVMRedirectionSAP.Enabled = 6 and +# KVMRedirectionSAP.[ElementName, Name] = port used in the GRASD:0 +# +# Date : 15-01-2009 +# + +import sys +from random import randrange +from XenKvmLib.vxml import get_class +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.enumclass import EnumInstances +from CimTest.Globals import logger, CIM_ERROR_ENUMERATE +from CimTest.ReturnCodes import PASS, FAIL, SKIP +from XenKvmLib.const import KVMRedSAP_proto, CIM_SAP_AVAILABLE_STATE, \ + CIM_SAP_INACTIVE_STATE + +sup_types = ['Xen', 'KVM', 'LXC'] +libvirtcim_redSAP_changes = 716 +test_dom = 'test_kvmredsap_dom' + +def enum_redsap(server, virt, classname): + redsap_insts = { } + status = FAIL + + try: + redsap_list = EnumInstances(server, classname) + for redsap in redsap_list: + if redsap.SystemName == test_dom: + if redsap.Classname not in redsap_insts.keys(): + redsap_insts[redsap.Classname] = redsap + status = PASS + else: + raise Exception("Got more than one record for: %s" \ + % test_dom) + except Exception, details: + logger.error(CIM_ERROR_ENUMERATE, classname) + logger.error("Exception details: %s", details) + + return status, redsap_insts + + +def verify_redsap_values(val_list, redsap_inst, classname): + try: + for key in val_list.keys(): + redsap = redsap_inst[classname] + ret_val = eval('redsap.' + key) + if ret_val != val_list[key]: + raise Exception("'%s' Value Mismatch, Expected %s, Got %s" \ + % (key, val_list[key], ret_val)) + except Exception, details: + logger.error("Exception details: %s", details) + return FAIL + + return PASS + + at do_main(sup_types) +def main(): + virt = main.options.virt + server = main.options.ip + + cname = 'KVMRedirectionSAP' + classname = get_typed_class(virt, cname) + + # This check is required for libivirt-cim providers which do not have + # REDSAP changes in it and the REDSAP provider is available with + # revision >= 716. + curr_cim_rev, changeset = get_provider_version(virt, server) + if curr_cim_rev < libvirtcim_redSAP_changes: + logger.info("'%s' provider not supported, hence skipping the tc ....", + classname) + return SKIP + + vsxml = None + action_start = False + + try: + virt_xml = get_class(virt) + lport = randrange(5900, 5999) + vsxml = virt_xml(test_dom, port_num=str(lport)) + + # Define the VS, and verify the KVMRedirectionSAP values. + ret = vsxml.cim_define(server) + if not ret: + raise Exception("Failed to define the dom: %s" % test_dom) + + # val_list that will be used for comparing with enum of + # KVMRedirectionSAP values + sccn = get_typed_class(virt, 'ComputerSystem') + val_list = { + 'SystemCreationClassName' : sccn, + 'SystemName' : test_dom, + 'CreationClassName' : classname, + 'KVMProtocol' : KVMRedSAP_proto["vnc"], + 'EnabledState' : CIM_SAP_INACTIVE_STATE + } + val_list['ElementName'] = val_list['Name'] = "%s:-1" % lport + + status, redsap_inst = enum_redsap(server, virt, classname) + if status != PASS: + raise Exception("Failed to get information on the defined dom:%s" \ + % test_dom) + + status = verify_redsap_values(val_list, redsap_inst, classname) + if status != PASS: + raise Exception("Failed to verify information for the defined "\ + "dom:%s" % test_dom) + + # For now verifying KVMRedirectoinSAP only for a defined LXC guest. + # Once complete Graphics support for LXC is in, we need to verify the + # KVMRedirectionSAP for a running guest. + if virt == 'LXC': + logger.error("DEBUG") + vsxml.undefine(server) + return status + + # start the guest and verify the KVMRedirectionSAP values + status = vsxml.cim_start(server) + if not ret: + raise Exception("Failed to start the dom: %s" % test_dom) + + status, redsap_inst = enum_redsap(server, virt, classname) + if status != PASS: + action_start = True + raise Exception("Failed to get information for running dom:%s" \ + % test_dom) + + val_list['ElementName'] = val_list['Name'] = "%s:0" % lport + val_list['EnabledState'] = CIM_SAP_AVAILABLE_STATE + + status = verify_redsap_values(val_list, redsap_inst, classname) + if status != PASS: + action_start = True + raise Exception("Failed to verify information for running dom:%s" \ + % test_dom) + + except Exception, detail: + logger.error("Exception: %s", detail) + status = FAIL + + if action_start == True: + vsxml.cim_destroy(server) + + vsxml.undefine(server) + + return status + +if __name__ == "__main__": + sys.exit(main()) diff -r a9dd0a50858a -r 4ad705c27d10 suites/libvirt-cim/lib/XenKvmLib/const.py --- a/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Jan 22 08:55:09 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Jan 27 00:37:10 2009 -0800 @@ -46,6 +46,15 @@ # Default TimeoutPeriod param for CS.RequestedStateChange() TIME = "00000000000000.000000:000" + +#KVMRedirectionSAP protocol values +KVMRedSAP_proto = { 'raw' : 2, 'rdp' : 3, 'vnc' : 4 } + +# CIM values for KVMRedirectionSAP.EnabledState +CIM_SAP_ACTIVE_STATE = 2 +CIM_SAP_INACTIVE_STATE = 3 +CIM_SAP_AVAILABLE_STATE = 6 + # vxml.NetXML default_bridge_name = 'testbridge' diff -r a9dd0a50858a -r 4ad705c27d10 suites/libvirt-cim/lib/XenKvmLib/vsms.py --- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Thu Jan 22 08:55:09 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jan 27 00:37:10 2009 -0800 @@ -33,6 +33,7 @@ RASD_TYPE_NET_ETHER = 10 RASD_TYPE_NET_OTHER = 11 RASD_TYPE_DISK = 17 +RASD_TYPE_GRAPHICS = 24 VSSD_RECOVERY_NONE = 2 VSSD_RECOVERY_RESTART = 3 @@ -232,6 +233,36 @@ def get_masd_class(virt): pass + +class CIM_GraphicsResourceAllocationSettingData(CIMClassMOF): + def __init__(self, name, res_sub_type="vnc", ip="127.0.0.1", + lport='-1', keymap="en-us"): + self.InstanceID = '%s/graphics' %name + self.ResourceType = RASD_TYPE_GRAPHICS + + if res_sub_type != None: + self.ResourceSubType = res_sub_type + + if ip != None and lport != None: + self.Address = '%s:%s' % (ip, lport) + + if keymap != None: + self.KeyMap = keymap + + +class Xen_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData): + pass + +class KVM_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData): + pass + +class LXC_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData): + pass + + at eval_cls('GraphicsResourceAllocationSettingData') +def get_gasd_class(virt): + pass + def default_vssd_rasd_str(dom_name='test_domain', disk_dev='xvda', disk_source=const.Xen_disk_path, @@ -272,9 +303,12 @@ mallocunits=malloc_units, name=dom_name) + class_gasd = get_gasd_class(virt) + g = class_gasd(name=dom_name) + # LXC only takes disk and memory device for now. if virt == 'LXC': - return vssd, [d.mof(), m.mof()] + return vssd, [d.mof(), m.mof(), g.mof()] class_nasd = get_nasd_class(virt) if net_mac != const.Xen_default_mac: @@ -293,5 +327,5 @@ p = class_pasd(vcpu=proc_vcpu, name=dom_name) - return vssd, [d.mof(), n.mof(), p.mof(), m.mof()] + return vssd, [d.mof(), n.mof(), p.mof(), m.mof(), g.mof()] diff -r a9dd0a50858a -r 4ad705c27d10 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 22 08:55:09 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Jan 27 00:37:10 2009 -0800 @@ -413,7 +413,6 @@ '/domain/devices/interface/source/@network') return networkStr - def dumpxml(self, ip): cmd = 'virsh -c %s dumpxml %s' % (self.vuri, self.dname) s, o = utils.run_remote(ip, cmd) @@ -467,7 +466,8 @@ class VirtCIM: def __init__(self, virt, dom_name, disk_dev, disk_source, net_type, net_name, net_mac, vcpus, mem, - mem_allocunits, emu_type): + mem_allocunits, emu_type, grstype, ip, + port_num, kmap): self.virt = virt self.domain_name = dom_name self.err_rc = None @@ -488,7 +488,9 @@ self.masd = vsms.get_masd_class(virt)(megabytes=mem, mallocunits=mem_allocunits, name=dom_name) - + self.gasd = vsms.get_gasd_class(virt)(name=dom_name, + res_sub_type=grstype, ip=ip, + lport=port_num, keymap=kmap) def cim_define(self, ip, ref_conf=None): service = vsms.get_vsms_class(self.virt)(ip) @@ -506,6 +508,8 @@ pass else: res_settings.append(str(self.nasd)) + if self.gasd is not None: + res_settings.append(str(self.gasd)) if ref_conf is None: ref_conf = ' ' @@ -657,6 +661,8 @@ self.dasd = rasd elif cn.find("NetResourceAllocationSettingData") >= 0: self.nasd = rasd + elif cn.find("GraphicsResourceAllocationSettingData") >= 0: + self.gasd = rasd def verify_error_msg(self, exp_rc, exp_desc): try: @@ -688,7 +694,8 @@ disk=const.Xen_default_disk_dev, ntype=const.default_net_type, net_name=const.default_network_name, - emu_type=None): + emu_type=None, grstype="vnc", address="127.0.0.1", + port_num='-1', keymap="en-us"): if not (os.path.exists(const.Xen_kernel_path) \ and os.path.exists(const.Xen_init_path)): logger.error('ERROR: Either the kernel image ' @@ -700,7 +707,7 @@ VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path, ntype, net_name, mac, vcpus, mem, mem_allocunits, - emu_type) + emu_type, grstype, address, port_num, keymap) def _os(self, os_kernel, os_initrd): os = self.get_node('/domain/os') @@ -750,14 +757,16 @@ disk=const.KVM_default_disk_dev, ntype=const.default_net_type, net_name=const.default_network_name, - emu_type=None): + emu_type=None, grstype="vnc", address="127.0.0.1", + port_num='-1', keymap="en-us"): if not os.path.exists(disk_file_path): logger.error('Error: Disk image does not exist') sys.exit(1) VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus) VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path, ntype, net_name, mac, vcpus, mem, - mem_allocunits, emu_type) + mem_allocunits, emu_type, grstype, address, + port_num, keymap) self._os() self._devices(const.KVM_default_emulator, ntype, disk_file_path, disk, mac, net_name) @@ -802,14 +811,15 @@ disk=const.XenFV_default_disk_dev, ntype=const.default_net_type, net_name=const.default_network_name, - emu_type=None): + emu_type=None, grstype="vnc", + address="127.0.0.1", port_num='-1', keymap="en-us"): if not os.path.exists(disk_file_path): logger.error('Error: Disk image does not exist') sys.exit(1) VirtXML.__init__(self, 'xenfv', test_dom, set_uuid(), mem, vcpus) VirtCIM.__init__(self, 'XenFV', test_dom, disk, disk_file_path, ntype, net_name, mac, vcpus, mem, mem_allocunits, - emu_type) + emu_type, grstype, address, port_num, keymap) self._features() self._os(const.XenFV_default_loader) self._devices(const.XenFV_default_emulator, @@ -856,11 +866,13 @@ mac=const.LXC_default_mac, ntype=const.default_net_type, net_name=const.default_network_name, - tty=const.LXC_default_tty): + tty=const.LXC_default_tty, grstype="vnc", + address="127.0.0.1", port_num='-1', keymap="en-us"): VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus) VirtCIM.__init__(self, 'LXC', test_dom, const.LXC_default_mp, const.LXC_default_source, ntype, net_name, mac, vcpus, - mem, const.default_mallocunits, None) + mem, const.default_mallocunits, None, grstype, + address, port_num, keymap) self._os(const.LXC_init_path) self._devices(mac, ntype, net_name, const.LXC_default_tty) self.create_lxc_file(CIM_IP, const.LXC_init_path) From deeptik at linux.vnet.ibm.com Tue Jan 27 08:41:26 2009 From: deeptik at linux.vnet.ibm.com (Deepti B. Kalakeri) Date: Tue, 27 Jan 2009 00:41:26 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Removed the unnecessary debug stmt in the 01_enum_KVMredSAP.py tc Message-ID: <1ecdff1c152eaf2019ad.1233045686@xen.beaverton.ibm.com> # HG changeset patch # User Deepti B. Kalakeri # Date 1233045681 28800 # Node ID 1ecdff1c152eaf2019ad9d3460f3fa5f68d54992 # Parent 4ad705c27d10d7be718ee92a9d0bdfb60563a4b5 [TEST] Removed the unnecessary debug stmt in the 01_enum_KVMredSAP.py tc. Signed-off-by: Deepti B. Kalakeri diff -r 4ad705c27d10 -r 1ecdff1c152e suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py --- a/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Tue Jan 27 00:37:10 2009 -0800 +++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Tue Jan 27 00:41:21 2009 -0800 @@ -139,7 +139,6 @@ # Once complete Graphics support for LXC is in, we need to verify the # KVMRedirectionSAP for a running guest. if virt == 'LXC': - logger.error("DEBUG") vsxml.undefine(server) return status From deeptik at linux.vnet.ibm.com Tue Jan 27 08:42:36 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 27 Jan 2009 14:12:36 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP In-Reply-To: <497E47C3.3030706@linux.vnet.ibm.com> References: <7279b969bfff758c7b24.1232718964@xen.beaverton.ibm.com> <497E47C3.3030706@linux.vnet.ibm.com> Message-ID: <497EC8FC.9000800@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B. Kalakeri wrote: >> # HG changeset patch >> # User Deepti B. Kalakeri >> # Date 1232718867 28800 >> # Node ID 7279b969bfff758c7b24fc2223826fe7ffafb3f2 >> # Parent a2ecb7430c50fcf6df6019625ee1a8b8ae24dfd9 >> [TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP. >> >> Signed-off-by: Deepti B. Kalakeri > > On my system with LXC, I got the following error: > > KVMRedirectionSAP - 01_enum_KVMredSAP.py: FAIL > ERROR - Exception details: 'ElementName' Value Mismatch, Expected > 5967:0, Got 5967:-1 > ERROR - Exception: Failed to verify information for running > dom:test_kvmredsap_dom > > Container's guests don't really have the proper support for graphics. > For now, I would just verify this for a defined guest. Yes this test fails for LXC as of now. I had sent a separate mail regarding this behavior to the mailing list. > > >> +import sys >> +import random > > This should be: > > from random import randrange > Changed. > >> + >> +def enum_redsap(server, virt, classname): >> + redsap_insts = { } >> + status = FAIL >> + >> + try: >> + redsap_list = EnumInstances(server, classname) >> + for redsap in redsap_list: >> + guest = redsap.SystemName >> + if guest == test_dom: > > You don't use guest anywhere else but here, so just do: > > if redsap.SystemName == test_dom > done. Submitted a new patch with all these changes. -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Jan 27 10:10:59 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 27 Jan 2009 15:40:59 +0530 Subject: [Libvirt-cim] Test Run Summary (Jan 27 2009): KVM on Fedora release 9 (Sulphur) with Pegasus Message-ID: <497EDDB3.3010808@linux.vnet.ibm.com> ================================================= Test Run Summary (Jan 27 2009): KVM on Fedora release 9 (Sulphur) with Pegasus ================================================= Distro: Fedora release 9 (Sulphur) Kernel: 2.6.25.14-108.fc9.x86_64 libvirt: 0.4.4 Hypervisor: QEMU 0.9.1 CIMOM: Pegasus 2.7.0 Libvirt-cim revision: 613 Libvirt-cim changeset: 1fcf330fadf8+ Cimtest revision: 602 Cimtest changeset: a9dd0a50858a ================================================= FAIL : 0 XFAIL : 3 SKIP : 8 PASS : 130 ----------------- Total : 141 ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: 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 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: Domain Operation Failed with return code 1 ERROR - Exception: Unable reboot dom 'cs_test_domain' InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed 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 -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: PASS -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: PASS -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: PASS -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: PASS -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: PASS -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: PASS -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: PASS -------------------------------------------------------------------- Processor - 01_processor.py: PASS -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: PASS -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: PASS -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: PASS -------------------------------------------------------------------- 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 -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00010> -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Jan 27 10:13:32 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 27 Jan 2009 15:43:32 +0530 Subject: [Libvirt-cim] Test Run Summary (Jan 27 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb Message-ID: <497EDE4C.5050403@linux.vnet.ibm.com> ================================================= Test Run Summary (Jan 27 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb ================================================= Distro: Fedora release 9.90.1 (Rawhide) Kernel: 2.6.27-0.323.rc6.fc10.x86_64 libvirt: 0.4.5 Hypervisor: QEMU 0.9.1 CIMOM: sfcb sfcbd 1.3.3preview Libvirt-cim revision: 805 Libvirt-cim changeset: c87e67c92f7c Cimtest revision: 602 Cimtest changeset: a9dd0a50858a ================================================= FAIL : 1 XFAIL : 8 SKIP : 32 PASS : 100 ----------------- Total : 141 ================================================= FAIL Test Summary: ElementConforms - 01_forward.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 06_paused_active_suspend.py: XFAIL ComputerSystem - 23_pause_pause.py: XFAIL ComputerSystem - 32_start_reboot.py: XFAIL ComputerSystem - 33_suspend_reboot.py: XFAIL HostSystem - 02_hostsystem_to_rasd.py: XFAIL HostedDependency - 03_enabledstate.py: XFAIL VSSD - 04_vssd_to_rasd.py: XFAIL VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP ComputerSystemIndication - 01_created_indication.py: SKIP ElementAllocatedFromPool - 03_reverse_errs.py: SKIP ElementAllocatedFromPool - 04_forward_errs.py: SKIP LogicalDisk - 01_disk.py: SKIP LogicalDisk - 02_nodevs.py: SKIP LogicalDisk - 03_ld_gi_errs.py: SKIP NetworkPort - 01_netport.py: SKIP NetworkPort - 02_np_gi_errors.py: SKIP NetworkPort - 03_user_netport.py: SKIP Processor - 01_processor.py: SKIP Processor - 02_definesys_get_procs.py: SKIP Processor - 03_proc_gi_errs.py: SKIP RASD - 04_disk_rasd_size.py: SKIP RASD - 05_disk_rasd_emu_type.py: SKIP ResourceAllocationFromPool - 05_RAPF_err.py: SKIP ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP VSSD - 02_bootldr.py: SKIP VirtualSystemManagementService - 06_addresource.py: SKIP VirtualSystemManagementService - 08_modifyresource.py: SKIP VirtualSystemManagementService - 09_procrasd_persist.py: SKIP VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP VirtualSystemManagementService - 12_referenced_config.py: SKIP VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP ================================================= Full report: -------------------------------------------------------------------- AllocationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- AllocationCapabilities - 02_alloccap_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 01_enum.py: PASS -------------------------------------------------------------------- ComputerSystem - 02_nosystems.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- ComputerSystem - 03_defineVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 04_defineStartVS.py: PASS -------------------------------------------------------------------- ComputerSystem - 05_activate_defined_start.py: PASS -------------------------------------------------------------------- ComputerSystem - 06_paused_active_suspend.py: XFAIL ERROR - Got CIM error Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend with return code 1 ERROR - Exception variable: Unable pause dom 'DomST1' InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 22_define_suspend.py: PASS -------------------------------------------------------------------- ComputerSystem - 23_pause_pause.py: XFAIL ERROR - Got CIM error Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend with return code 1 ERROR - Exception: 'Unable pause dom 'cs_test_domain'' InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- ComputerSystem - 27_define_pause_errs.py: PASS -------------------------------------------------------------------- ComputerSystem - 32_start_reboot.py: XFAIL ERROR - 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: SKIP -------------------------------------------------------------------- ComputerSystem - 42_cs_gi_errs.py: PASS -------------------------------------------------------------------- ComputerSystemIndication - 01_created_indication.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ElementAllocatedFromPool - 03_reverse_errs.py: SKIP -------------------------------------------------------------------- ElementAllocatedFromPool - 04_forward_errs.py: SKIP -------------------------------------------------------------------- ElementCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- ElementCapabilities - 02_reverse.py: PASS -------------------------------------------------------------------- ElementCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ElementCapabilities - 05_hostsystem_cap.py: PASS -------------------------------------------------------------------- ElementConforms - 01_forward.py: FAIL ERROR - verify_fields() exception: u'LXC_AllocationCapabilities' ERROR - Exception: Failed to verify instance Class not found -------------------------------------------------------------------- ElementConforms - 02_reverse.py: PASS -------------------------------------------------------------------- ElementConforms - 03_ectp_fwd_errs.py: PASS -------------------------------------------------------------------- ElementConforms - 04_ectp_rev_errs.py: PASS -------------------------------------------------------------------- ElementSettingData - 01_forward.py: PASS -------------------------------------------------------------------- ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 01_enum.py: PASS -------------------------------------------------------------------- HostSystem - 02_hostsystem_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned CrossClass_GuestDom/mouse:xen instead of CrossClass_GuestDom/mouse:usb Class not found Bug:<00009> -------------------------------------------------------------------- HostSystem - 03_hs_to_settdefcap.py: PASS -------------------------------------------------------------------- HostSystem - 04_hs_to_EAPF.py: PASS -------------------------------------------------------------------- HostSystem - 05_hs_gi_errs.py: PASS -------------------------------------------------------------------- HostSystem - 06_hs_to_vsms.py: PASS -------------------------------------------------------------------- HostedDependency - 01_forward.py: PASS -------------------------------------------------------------------- HostedDependency - 02_reverse.py: PASS -------------------------------------------------------------------- HostedDependency - 03_enabledstate.py: XFAIL ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend') ERROR - Failed to suspend the dom: hd_domain1 InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend Bug:<00011> -------------------------------------------------------------------- HostedDependency - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 01_forward.py: PASS -------------------------------------------------------------------- HostedResourcePool - 02_reverse.py: PASS -------------------------------------------------------------------- HostedResourcePool - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedResourcePool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- HostedService - 01_forward.py: PASS -------------------------------------------------------------------- HostedService - 02_reverse.py: PASS -------------------------------------------------------------------- HostedService - 03_forward_errs.py: PASS -------------------------------------------------------------------- HostedService - 04_reverse_errs.py: PASS -------------------------------------------------------------------- LogicalDisk - 01_disk.py: SKIP -------------------------------------------------------------------- LogicalDisk - 02_nodevs.py: SKIP ERROR - System has defined domains; unable to run -------------------------------------------------------------------- LogicalDisk - 03_ld_gi_errs.py: SKIP -------------------------------------------------------------------- Memory - 01_memory.py: PASS -------------------------------------------------------------------- Memory - 02_defgetmem.py: PASS -------------------------------------------------------------------- Memory - 03_mem_gi_errs.py: PASS -------------------------------------------------------------------- NetworkPort - 01_netport.py: SKIP -------------------------------------------------------------------- NetworkPort - 02_np_gi_errors.py: SKIP -------------------------------------------------------------------- NetworkPort - 03_user_netport.py: SKIP -------------------------------------------------------------------- Processor - 01_processor.py: SKIP -------------------------------------------------------------------- Processor - 02_definesys_get_procs.py: SKIP -------------------------------------------------------------------- Processor - 03_proc_gi_errs.py: SKIP -------------------------------------------------------------------- Profile - 01_enum.py: PASS -------------------------------------------------------------------- Profile - 02_profile_to_elec.py: PASS -------------------------------------------------------------------- Profile - 03_rprofile_gi_errs.py: PASS -------------------------------------------------------------------- RASD - 01_verify_rasd_fields.py: PASS -------------------------------------------------------------------- RASD - 02_enum.py: PASS -------------------------------------------------------------------- RASD - 03_rasd_errs.py: PASS -------------------------------------------------------------------- RASD - 04_disk_rasd_size.py: SKIP -------------------------------------------------------------------- RASD - 05_disk_rasd_emu_type.py: SKIP -------------------------------------------------------------------- RedirectionService - 01_enum_crs.py: PASS -------------------------------------------------------------------- RedirectionService - 02_enum_crscap.py: PASS -------------------------------------------------------------------- RedirectionService - 03_RedirectionSAP_errs.py: PASS -------------------------------------------------------------------- ReferencedProfile - 01_verify_refprof.py: PASS -------------------------------------------------------------------- ReferencedProfile - 02_refprofile_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 01_forward.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 02_reverse.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 03_forward_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 04_reverse_errs.py: PASS -------------------------------------------------------------------- ResourceAllocationFromPool - 05_RAPF_err.py: SKIP -------------------------------------------------------------------- ResourcePool - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePool - 02_rp_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 01_enum.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS -------------------------------------------------------------------- ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP -------------------------------------------------------------------- ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP -------------------------------------------------------------------- SettingsDefine - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefine - 02_reverse.py: PASS -------------------------------------------------------------------- SettingsDefine - 03_sds_fwd_errs.py: PASS -------------------------------------------------------------------- SettingsDefine - 04_sds_rev_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 01_forward.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 03_forward_errs.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS -------------------------------------------------------------------- SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS -------------------------------------------------------------------- SystemDevice - 01_forward.py: PASS -------------------------------------------------------------------- SystemDevice - 02_reverse.py: PASS -------------------------------------------------------------------- SystemDevice - 03_fwderrs.py: PASS -------------------------------------------------------------------- VSSD - 01_enum.py: PASS -------------------------------------------------------------------- VSSD - 02_bootldr.py: SKIP -------------------------------------------------------------------- VSSD - 03_vssd_gi_errs.py: PASS -------------------------------------------------------------------- VSSD - 04_vssd_to_rasd.py: XFAIL ERROR - InstanceID Mismatch ERROR - Returned VSSDC_dom/mouse:xen instead of VSSDC_dom/mouse:usb Bug:<00009> -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 01_definesystem_name.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 02_destroysystem.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 03_definesystem_ess.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 04_definesystem_ers.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 05_destroysystem_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 06_addresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 07_addresource_neg.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 08_modifyresource.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 09_procrasd_persist.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 10_hv_version.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 12_referenced_config.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP -------------------------------------------------------------------- VirtualSystemManagementService - 14_define_sys_disk.py: PASS -------------------------------------------------------------------- VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL ERROR - rstest_domain not updated properly. ERROR - Exp AutomaticRecoveryAction=3, got 2 Bug:<00008> -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationService - 01_migratable_host.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 01_forward.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 02_reverse.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS -------------------------------------------------------------------- VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS -------------------------------------------------------------------- -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From deeptik at linux.vnet.ibm.com Tue Jan 27 10:28:20 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Tue, 27 Jan 2009 15:58:20 +0530 Subject: [Libvirt-cim] Difference in the value assigned to port field for Xen, KVM, LXC In-Reply-To: <497A1341.7010101@linux.vnet.ibm.com> References: <4979CCA2.2020207@linux.vnet.ibm.com> <497A1341.7010101@linux.vnet.ibm.com> Message-ID: <497EE1C4.6030507@linux.vnet.ibm.com> Kaitlin Rupert wrote: > Deepti B Kalakeri wrote: >> Hi, >> >> I am trying to verify the KVMRedirectionSAP. I am seeing difference >> in the way the port value is getting assigned. >> I am trying to create a guest using DefineSystem(). Here is the >> Details of the GraphicsRASD I am passing as part of the >> ResourceSetting Parameter. >> >> >> KVM_GraphicsResourceAllocationSettingData { >> InstanceID = "test_redsap_dom/graphics"; >> ResourceType = 24; >> KeyMap = "en-us"; >> ResourceSubType = "vnc"; >> Address = "127.0.0.1:5931"; >> }; >> >> My intention is to create a guest whose vnc port has a specific >> value, ex: 5931 in the above case. >> Though the guest is getting created, the dumpxml of the guest shows >> that the port value is getting assigned to -1. >> Hence the port part of the Address field in GraphicsRASD is set to >> -1. Hence the port value in the ElementName/Name is supplied as -1. > > Hi Deepti, > > I'm not clear which virt type you are seeing this issue on. Is this > with LXC only? Nopes this is not LXC only issue. I am seeing different problems for different virt types. For Xen & LXC: Though the virsh shows the guest as running the EnabledState value for Xen and LXC guest is still set to 3 instead of setting a value of 6. For Xen: I am not able to create a guest of desired port num for Graphics information. And the KVMRedirectionSAP's ElementName/Name is set to -1. For KVM: I am able to create a guest of desired port num for Graphics information. And the KVMRedirectionSAP's ElementName/Name is set to the portnum supplied to the graphics tag. Also, the EnabledState value is set appropriately. For ex: when the guest is running but the vnc session not in active use, it is getting set to 6 [PS: I did not find the vncserver running on the host]. > I wasn't able to reproduce this use. See below for the steps I > followed. Let me know if these steps don't work for you. > > >> Also, though the virsh shows the guest as running the EnabledState >> value for Xen and LXC guest is still set to 3 instead of setting a >> value of 6. >> > > The EnabledState of the KVMRedirectionSAP changes whenever the > connection is available. In this case, you'll need to be running a > VNC server on your guest in order for the EnabledState to > active/available. Otherwise, the KVMRedirectionSAP is offline. What steps will you follow to verify the EnabledState in the available state value ? > > =================================== > > Steps to define an LXC guest with vnc graphics console: > > 1) Open file and define XML with the following: > > > > > > > > > > > > > VALUETYPE="string">LXC_VirtualSystemManagementService > > > hostname > > > > > > instance of LXC_VirtualSystemSettingData { > CreationClassName = "LXC_VirtualSystemSettingData"; > VirtualSystemIdentifier = "test"; > ElementName = "test"; > VirtualSystemType = "LXC"; > AutomaticShutdownAction = 2; > AutomaticRecoveryAction = 3; > BootDevice = "hd"; > }; > > > > > > instance of LXC_GraphicsResourceAllocationSettingData { > InstanceID = "test/graphics"; > ResourceType = 24; > KeyMap = "en-us"; > ResourceSubType = "vnc"; > Address = "127.0.0.1:5931"; > }; > > > > > > > > With what command did you execute the above XML. > > 2) Check the defined guest: > > $ virsh -c lxc:///system dumpxml test > > > test > 46c027c3-d143-4b37-97c3-ac86c9c3bca6 > 0 > 0 > 0 > > exe > /bin/false > > > destroy > restart > restart > > > > > > keymap='en-us'/> > > > -- Thanks and Regards, Deepti B. Kalakeri IBM Linux Technology Center deeptik at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Tue Jan 27 13:27:29 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 27 Jan 2009 11:27:29 -0200 Subject: [Libvirt-cim] [PATCH] (#2) Add interop and cimv2 ns registrations to spec In-Reply-To: References: Message-ID: <497F0BC1.3010502@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232740126 28800 > # Node ID eb2df7761596b0fdb38c02aa741c00592e8ddf08 > # Parent c87e67c92f7ceaf556e8be90547de324026f315b > (#2) Add interop and cimv2 ns registrations to spec. > > Updates: > -Fix the REG and MOF values to reflext the values in Makefile.am > > Signed-off-by: Kaitlin Rupert > > diff -r c87e67c92f7c -r eb2df7761596 libvirt-cim.spec.in > --- a/libvirt-cim.spec.in Fri Jan 16 10:19:08 2009 -0800 > +++ b/libvirt-cim.spec.in Fri Jan 23 11:48:46 2009 -0800 > @@ -51,6 +51,12 @@ > %define REGISTRATION %{_datadir}/%{name}/*.registration > %define SCHEMA %{_datadir}/%{name}/*.mof > > +%define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration > +%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile}.mof > + > +%define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,ElementConformsToProfile,HostedAccessPoint}.registration > +%define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof > + > %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ > -n @CIM_VIRT_NS@ \ > -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true > @@ -65,6 +71,15 @@ > %{_datadir}/%{name}/provider-register.sh -t pegasus \ > -n @CIM_VIRT_NS@ \ > -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true > +%{_datadir}/%{name}/provider-register.sh -t pegasus \ > + -n @CIM_VIRT_NS@ \ > + -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true > +%{_datadir}/%{name}/provider-register.sh -t pegasus \ > + -n root/interop \ > + -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true > +%{_datadir}/%{name}/provider-register.sh -t pegasus \ > + -n root/cimv2\ > + -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true > > %preun > %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ > > _______________________________________________ > 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 Tue Jan 27 13:59:53 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Tue, 27 Jan 2009 11:59:53 -0200 Subject: [Libvirt-cim] [PATCH] Replace CBGetInstance() with CBEnumInstances() in Virt_HostSystem In-Reply-To: References: Message-ID: <497F1359.3040701@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1232562000 28800 > # Node ID a7074d59e1e34398b8785bf218bbdbea56db0945 > # Parent 62dbae6f50a56ee2d603503a704b8cd083788131 > Replace CBGetInstance() with CBEnumInstances() in Virt_HostSystem > > This is a work around to deal with the way the SBLIM provider determines the > FQDN of a host system. The value the SBLIM provider returns can depend on > how the /etc/hosts file is formatted, as well as other factors (running > dnsdomainname caused the provider to print two different values on my system). > > Signed-off-by: Kaitlin Rupert > > diff -r 62dbae6f50a5 -r a7074d59e1e3 src/Virt_HostSystem.c > --- a/src/Virt_HostSystem.c Tue Jan 20 22:27:01 2009 -0800 > +++ b/src/Virt_HostSystem.c Wed Jan 21 10:20:00 2009 -0800 > @@ -144,16 +144,10 @@ > CMPIInstance **inst) > { > CMPIObjectPath *path; > + CMPIEnumeration *en = NULL; > + CMPIData data; > CMPIStatus s; > const char *cn = "Linux_ComputerSystem"; > - char name[256]; > - > - if (get_fqdn(name, sizeof(name)) != 0) { > - cu_statusf(broker, &s, > - CMPI_RC_ERR_FAILED, > - "Unable to get hostname: %m"); > - return s; > - } > > path = CMNewObjectPath(broker, "root/cimv2", cn, &s); > if ((path == NULL) || (s.rc != CMPI_RC_OK)) { > @@ -163,11 +157,33 @@ > return s; > } > > - CMAddKey(path, "CreationClassName", cn, CMPI_chars); > - CMAddKey(path, "Name", name, CMPI_chars); > + /* FIXME: This approach may return the wrong instance if more than > + one SBLIM Linux_ComputerSystem instance exists on the system. > + This isn't likely to happen in most cases, but a better approach > + should be used here. > + */ > + en = CBEnumInstances(broker, context, path, NULL, &s); > + if (en == NULL) { > + cu_statusf(broker, &s, > + CMPI_RC_ERR_FAILED, > + "Upcall EnumInstances of %s class failed", > + cn); > + goto out; > + } > > - *inst = CBGetInstance(broker, context, path, NULL, &s); > + if (CMHasNext(en, &s)) { > + data = CMGetNext(en, &s); > + if (CMIsNullObject(data.value.inst)) { > + cu_statusf(broker, &s, > + CMPI_RC_ERR_FAILED, > + "Failed to retrieve enumeration entry"); > + goto out; > + } > > + *inst = data.value.inst; > + } > + > + out: > if (s.rc != CMPI_RC_OK) { > CU_DEBUG("SBLIM: %i %s", s.rc, CMGetCharPtr(s.msg)); > } 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 kaitlin at linux.vnet.ibm.com Tue Jan 27 17:31:17 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Tue, 27 Jan 2009 09:31:17 -0800 Subject: [Libvirt-cim] Difference in the value assigned to port field for Xen, KVM, LXC In-Reply-To: <497EE1C4.6030507@linux.vnet.ibm.com> References: <4979CCA2.2020207@linux.vnet.ibm.com> <497A1341.7010101@linux.vnet.ibm.com> <497EE1C4.6030507@linux.vnet.ibm.com> Message-ID: <497F44E5.4090905@linux.vnet.ibm.com> > Nopes this is not LXC only issue. I am seeing different problems for > different virt types. > > For Xen & LXC: > Though the virsh shows the guest as running the EnabledState value for > Xen and LXC guest is still set to 3 instead of setting a value of 6. I wouldn't worry about LXC for now. > > For Xen: > I am not able to create a guest of desired port num for Graphics > information. > And the KVMRedirectionSAP's ElementName/Name is set to -1. -1 isn't a valid port, so when the guest is created, the VNC won't listen on -1. So you won't see the EnabledState as 6. What XML are you using to define your Xen guest? I was about to define a guest with a port: localhost:5988/root/virt:Xen_KVMRedirectionSAP.CreationClassName="Xen_KVMRedirectionSAP",Name="5900:0",SystemCreationClassName="Xen_ComputerSystem",SystemName="rstest_domain" I have a RHEL 5.2 with an older version of libvirt - I can't seem to define a Xen guest with a specific port number. But when the guest is started, an appropriate port is assigned. It might worth trying with an updated version of libvirt. Either way, this behavior is with libvirt itself, not something within the provider. >> =================================== >> >> Steps to define an LXC guest with vnc graphics console: >> >> 1) Open file and define XML with the following: >> > With what command did you execute the above XML. wbemexec (Pegasus) or wbemcat (sfcb) >> >> 2) Check the defined guest: >> >> $ virsh -c lxc:///system dumpxml test -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From rmaciel at linux.vnet.ibm.com Wed Jan 28 21:09:40 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 28 Jan 2009 19:09:40 -0200 Subject: [Libvirt-cim] [PATCH 2 of 2] Created reverse test (KVMRedirectionSAP -> HostSystem) test In-Reply-To: References: Message-ID: <2477dd32ff854fab47f1.1233176980@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1233174674 7200 # Node ID 2477dd32ff854fab47f14f34a9b62f407603ec22 # Parent 0f78b79e607ef59529d68d8100e447f2dc4ecd29 Created reverse test (KVMRedirectionSAP -> HostSystem) test Signed-off-by: Richard Maciel diff -r 0f78b79e607e -r 2477dd32ff85 suites/libvirt-cim/cimtest/HostedAccessPoint/02_reverse.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/HostedAccessPoint/02_reverse.py Wed Jan 28 18:31:14 2009 -0200 @@ -0,0 +1,171 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Richard Maciel +# +# 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 CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class +from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.rasd import enum_rasds +from XenKvmLib.common_util import parse_instance_id +from XenKvmLib.vsms import enumerate_instances +from XenKvmLib.test_doms import virdomid_list +from XenKvmLib.common_util import get_host_info +from XenKvmLib.enumclass import EnumInstances + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] + +test_dom = "domu1" + +def setup_env(server, virt): + if virt == 'Xen': + test_disk = 'xvda' + else: + test_disk = 'hda' + virt_xml = get_class(virt) + if virt == 'LXC': + cxml = virt_xml(test_dom) + else: + cxml = virt_xml(test_dom, disk = test_disk) + + ret = cxml.cim_define(server) + if not ret: + logger.error("Failed to Create the dom: %s", test_dom) + return FAIL, cmxl + + status = cxml.cim_start(server) + if status != PASS: + logger.error("Unable start dom '%s'", test_dom) + cxml.undefine(server) + return status, cxml + + return PASS, cxml + +def enum_kvmrsaps(virt, ip): + kvmrsap_insts = {} + + try: + kvmrsap_cn = get_typed_class(virt, 'KVMRedirectionSAP') + enum_list = EnumInstances(ip, kvmrsap_cn) + + if enum_list < 1: + logger.error("No KVM Redirection SAP instances returned") + return kvmrsap_insts, FAIL + + for kvmrsap in enum_list: + if kvmrsap.Classname not in kvmrsap_insts.keys(): + kvmrsap_insts[kvmrsap.Classname] = [] + kvmrsap_insts[kvmrsap.Classname].append(kvmrsap) + + except Exception, details: + logger.error(details) + return kvmrsap_insts, FAIL + + return kvmrsap_insts, PASS + +def get_kvmrsap_inst(virt, ip, guest_name): + kvmrsap_inst = None + + kvmrsaps, status = enum_kvmrsaps(virt, ip) + if status != PASS: + logger.error("Get KVMRSAPs failed") + return kvmrsap_inst, status + + for kvmrsap_cn, kvmrsap_list in kvmrsaps.iteritems(): + for kvmrsap in kvmrsap_list: + guest = kvmrsap.SystemName + + if guest == guest_name: + kvmrsap_inst = kvmrsap + + return kvmrsap_inst, PASS + +def verify_host(enum_list, host_inst): + status = FAIL + + for item in enum_list: + if item.classname != host_inst.Classname: + print "Returned class name (%s) is not correct", item.classname + return status + + host = item.keybindings['Name'] + + print "Iteration host name: ", host_inst.Name + + if host == host_inst.Name: + status = PASS + break + + return status + + + at do_main(sup_types) +def main(): + options = main.options + status = FAIL + server = options.ip + virt = options.virt + + status, cxml = setup_env(options.ip, options.virt) + if status != PASS: + cxml.undefine(options.ip) + return status + + try: + status, host_inst = get_host_info(server, virt) + if status != PASS: + raise Exception("Failed to get host info.") + + kvmrsap_inst, status = get_kvmrsap_inst(options.virt, options.ip, test_dom) + if status != PASS: + raise Exception("Unable to fetch kvmrsap instance (domain: %s)", test_dom) + + an = get_typed_class(options.virt, 'HostedAccessPoint') + + + kvm_ccn = kvmrsap_inst.CreationClassName + name = kvmrsap_inst.Name + sys_ccn = kvmrsap_inst.SystemCreationClassName + + assoc_info = AssociatorNames(options.ip, an, kvm_ccn, + CreationClassName = kvm_ccn, + Name = kvmrsap_inst.Name, + SystemCreationClassName = sys_ccn, + SystemName = test_dom) + + status = verify_host(assoc_info, host_inst) + + if status != PASS: + raise Exception("Failed to verify KVMRedirectionSAPs") + + except Exception, details: + logger.error(details) + status = FAIL + + cxml.cim_destroy(options.ip) + cxml.undefine(options.ip) + return status + +if __name__ == "__main__": + sys.exit(main()) From rmaciel at linux.vnet.ibm.com Wed Jan 28 21:09:38 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 28 Jan 2009 19:09:38 -0200 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] Added testcases for the HostedAccessPoint association Message-ID: From rmaciel at linux.vnet.ibm.com Wed Jan 28 21:09:39 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 28 Jan 2009 19:09:39 -0200 Subject: [Libvirt-cim] [PATCH 1 of 2] Created testcases for the forward HostedAccessPoint association (HostSystem -> KVMRedirectionSAP In-Reply-To: References: Message-ID: <0f78b79e607ef59529d6.1233176979@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1233174668 7200 # Node ID 0f78b79e607ef59529d68d8100e447f2dc4ecd29 # Parent 6cb990930f0c3e82c85d4e3437d7b9b5e0d0037a Created testcases for the forward HostedAccessPoint association (HostSystem -> KVMRedirectionSAP Signed-off-by: Richard Maciel diff -r 6cb990930f0c -r 0f78b79e607e suites/libvirt-cim/cimtest/HostedAccessPoint/01_forward.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/HostedAccessPoint/01_forward.py Wed Jan 28 18:31:08 2009 -0200 @@ -0,0 +1,184 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Richard Maciel +# +# 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 CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class +from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.rasd import enum_rasds +from XenKvmLib.common_util import parse_instance_id +from XenKvmLib.vsms import enumerate_instances +from XenKvmLib.test_doms import virdomid_list +from XenKvmLib.common_util import get_host_info +from XenKvmLib.enumclass import EnumInstances + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] + +test_dom = "domu1" + +def setup_env(server, virt): + if virt == 'Xen': + test_disk = 'xvda' + else: + test_disk = 'hda' + virt_xml = get_class(virt) + if virt == 'LXC': + cxml = virt_xml(test_dom) + else: + cxml = virt_xml(test_dom, disk = test_disk) + + ret = cxml.cim_define(server) + if not ret: + logger.error("Failed to Create the dom: %s", test_dom) + return FAIL, cmxl + + status = cxml.cim_start(server) + if status != PASS: + logger.error("Unable start dom '%s'", test_dom) + cxml.undefine(server) + return status, cxml + + return PASS, cxml + +def enum_kvmrsaps(virt, ip): + kvmrsap_insts = {} + + try: + kvmrsap_cn = get_typed_class(virt, 'KVMRedirectionSAP') + enum_list = EnumInstances(ip, kvmrsap_cn) + + if enum_list < 1: + logger.error("No KVM Redirection SAP instances returned") + return kvmrsap_insts, FAIL + + for kvmrsap in enum_list: + if kvmrsap.Classname not in kvmrsap_insts.keys(): + kvmrsap_insts[kvmrsap.Classname] = [] + kvmrsap_insts[kvmrsap.Classname].append(kvmrsap) + + except Exception, details: + logger.error(details) + return kvmrsap_insts, FAIL + + return kvmrsap_insts, PASS + +def get_kvmrsap_inst(virt, ip, guest_name): + kvmrsap_inst = None + + kvmrsaps, status = enum_kvmrsaps(virt, ip) + if status != PASS: + logger.error("Get KVMRSAPs failed") + return kvmrsap_inst, status + + for kvmrsap_cn, kvmrsap_list in kvmrsaps.iteritems(): + for kvmrsap in kvmrsap_list: + guest = kvmrsap.SystemName + + if guest == guest_name: + kvmrsap_inst = kvmrsap + + return kvmrsap_inst, PASS + +def init_kvmrsap_list(virt, ip, guest_name): + kvmrsap_insts = {} + + kvmrsaps, status = enum_kvmrsaps(virt, ip) + if status != PASS: + logger.error("Enum KVMRSAPs failed") + return kvmrsap_insts, status + + for kvmrsap_cn, kvmrsap_list in kvmrsaps.iteritems(): + for kvmrsap in kvmrsap_list: + guest = kvmrsap.SystemName + + if guest == guest_name: + kvmrsap_insts[kvmrsap.Classname] = kvmrsap + + return kvmrsap_insts, PASS + +def verify_kvmrsap(enum_list, kvmrsap_inst): + status = FAIL + + for item in enum_list: + if item.classname != kvmrsap_inst.Classname: + print "Returned class name (%s) is not correct", item.classname + return status + + guest = item.keybindings['SystemName'] + + print "Iteration guest name: ", guest + print "Iteration host name: ", item.host + + if guest == kvmrsap_inst.SystemName: + status = PASS + break + + return status + + + at do_main(sup_types) +def main(): + options = main.options + status = FAIL + server = options.ip + virt = options.virt + + status, cxml = setup_env(options.ip, options.virt) + if status != PASS: + cxml.undefine(options.ip) + return status + + try: + status, host_inst = get_host_info(server, virt) + if status != PASS: + raise Exception("Failed to get host info.") + + kvmrsap_inst, status = get_kvmrsap_inst(options.virt, options.ip, test_dom) + if status != PASS: + raise Exception("Unable to fetch kvmrsap instance (domain: %s)", test_dom) + + an = get_typed_class(options.virt, 'HostedAccessPoint') + + host_ccn = host_inst.CreationClassName + + assoc_info = AssociatorNames(options.ip, an, host_ccn, + CreationClassName = host_ccn, + Name = host_inst.Name) + + status = verify_kvmrsap(assoc_info, kvmrsap_inst) + + if status != PASS: + raise Exception("Failed to verify KVMRedirectionSAPs") + + except Exception, details: + logger.error(details) + status = FAIL + + cxml.cim_destroy(options.ip) + cxml.undefine(options.ip) + return status + +if __name__ == "__main__": + sys.exit(main()) From rmaciel at linux.vnet.ibm.com Wed Jan 28 21:13:56 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 28 Jan 2009 19:13:56 -0200 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Created testcases for the forward HostedAccessPoint association (HostSystem -> KVMRedirectionSAP In-Reply-To: References: Message-ID: <767d1922190f08c2343c.1233177236@localhost.localdomain> # HG changeset patch # User Richard Maciel # Date 1233177214 7200 # Node ID 767d1922190f08c2343c1b2110bd025c89124d55 # Parent 6cb990930f0c3e82c85d4e3437d7b9b5e0d0037a [TEST] Created testcases for the forward HostedAccessPoint association (HostSystem -> KVMRedirectionSAP Signed-off-by: Richard Maciel diff -r 6cb990930f0c -r 767d1922190f suites/libvirt-cim/cimtest/HostedAccessPoint/01_forward.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/HostedAccessPoint/01_forward.py Wed Jan 28 19:13:34 2009 -0200 @@ -0,0 +1,184 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Richard Maciel +# +# 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 CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class +from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.rasd import enum_rasds +from XenKvmLib.common_util import parse_instance_id +from XenKvmLib.vsms import enumerate_instances +from XenKvmLib.test_doms import virdomid_list +from XenKvmLib.common_util import get_host_info +from XenKvmLib.enumclass import EnumInstances + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] + +test_dom = "domu1" + +def setup_env(server, virt): + if virt == 'Xen': + test_disk = 'xvda' + else: + test_disk = 'hda' + virt_xml = get_class(virt) + if virt == 'LXC': + cxml = virt_xml(test_dom) + else: + cxml = virt_xml(test_dom, disk = test_disk) + + ret = cxml.cim_define(server) + if not ret: + logger.error("Failed to Create the dom: %s", test_dom) + return FAIL, cmxl + + status = cxml.cim_start(server) + if status != PASS: + logger.error("Unable start dom '%s'", test_dom) + cxml.undefine(server) + return status, cxml + + return PASS, cxml + +def enum_kvmrsaps(virt, ip): + kvmrsap_insts = {} + + try: + kvmrsap_cn = get_typed_class(virt, 'KVMRedirectionSAP') + enum_list = EnumInstances(ip, kvmrsap_cn) + + if enum_list < 1: + logger.error("No KVM Redirection SAP instances returned") + return kvmrsap_insts, FAIL + + for kvmrsap in enum_list: + if kvmrsap.Classname not in kvmrsap_insts.keys(): + kvmrsap_insts[kvmrsap.Classname] = [] + kvmrsap_insts[kvmrsap.Classname].append(kvmrsap) + + except Exception, details: + logger.error(details) + return kvmrsap_insts, FAIL + + return kvmrsap_insts, PASS + +def get_kvmrsap_inst(virt, ip, guest_name): + kvmrsap_inst = None + + kvmrsaps, status = enum_kvmrsaps(virt, ip) + if status != PASS: + logger.error("Get KVMRSAPs failed") + return kvmrsap_inst, status + + for kvmrsap_cn, kvmrsap_list in kvmrsaps.iteritems(): + for kvmrsap in kvmrsap_list: + guest = kvmrsap.SystemName + + if guest == guest_name: + kvmrsap_inst = kvmrsap + + return kvmrsap_inst, PASS + +def init_kvmrsap_list(virt, ip, guest_name): + kvmrsap_insts = {} + + kvmrsaps, status = enum_kvmrsaps(virt, ip) + if status != PASS: + logger.error("Enum KVMRSAPs failed") + return kvmrsap_insts, status + + for kvmrsap_cn, kvmrsap_list in kvmrsaps.iteritems(): + for kvmrsap in kvmrsap_list: + guest = kvmrsap.SystemName + + if guest == guest_name: + kvmrsap_insts[kvmrsap.Classname] = kvmrsap + + return kvmrsap_insts, PASS + +def verify_kvmrsap(enum_list, kvmrsap_inst): + status = FAIL + + for item in enum_list: + if item.classname != kvmrsap_inst.Classname: + print "Returned class name (%s) is not correct", item.classname + return status + + guest = item.keybindings['SystemName'] + + print "Iteration guest name: ", guest + print "Iteration host name: ", item.host + + if guest == kvmrsap_inst.SystemName: + status = PASS + break + + return status + + + at do_main(sup_types) +def main(): + options = main.options + status = FAIL + server = options.ip + virt = options.virt + + status, cxml = setup_env(options.ip, options.virt) + if status != PASS: + cxml.undefine(options.ip) + return status + + try: + status, host_inst = get_host_info(server, virt) + if status != PASS: + raise Exception("Failed to get host info.") + + kvmrsap_inst, status = get_kvmrsap_inst(options.virt, options.ip, test_dom) + if status != PASS: + raise Exception("Unable to fetch kvmrsap instance (domain: %s)", test_dom) + + an = get_typed_class(options.virt, 'HostedAccessPoint') + + host_ccn = host_inst.CreationClassName + + assoc_info = AssociatorNames(options.ip, an, host_ccn, + CreationClassName = host_ccn, + Name = host_inst.Name) + + status = verify_kvmrsap(assoc_info, kvmrsap_inst) + + if status != PASS: + raise Exception("Failed to verify KVMRedirectionSAPs") + + except Exception, details: + logger.error(details) + status = FAIL + + cxml.cim_destroy(options.ip) + cxml.undefine(options.ip) + return status + +if __name__ == "__main__": + sys.exit(main()) From rmaciel at linux.vnet.ibm.com Wed Jan 28 21:13:57 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 28 Jan 2009 19:13:57 -0200 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Created reverse test (KVMRedirectionSAP -> HostSystem) test In-Reply-To: References: Message-ID: # HG changeset patch # User Richard Maciel # Date 1233177219 7200 # Node ID f33c1c9e02ce795ea273ebe4098a2dd3692155d6 # Parent 767d1922190f08c2343c1b2110bd025c89124d55 [TEST] Created reverse test (KVMRedirectionSAP -> HostSystem) test Signed-off-by: Richard Maciel diff -r 767d1922190f -r f33c1c9e02ce suites/libvirt-cim/cimtest/HostedAccessPoint/02_reverse.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/suites/libvirt-cim/cimtest/HostedAccessPoint/02_reverse.py Wed Jan 28 19:13:39 2009 -0200 @@ -0,0 +1,171 @@ +#!/usr/bin/python +# +# Copyright 2009 IBM Corp. +# +# Authors: +# Richard Maciel +# +# 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 CimTest.Globals import logger +from CimTest.ReturnCodes import PASS, FAIL +from XenKvmLib.vxml import get_class +from XenKvmLib.assoc import AssociatorNames +from XenKvmLib.classes import get_typed_class +from XenKvmLib.const import do_main, get_provider_version +from XenKvmLib.rasd import enum_rasds +from XenKvmLib.common_util import parse_instance_id +from XenKvmLib.vsms import enumerate_instances +from XenKvmLib.test_doms import virdomid_list +from XenKvmLib.common_util import get_host_info +from XenKvmLib.enumclass import EnumInstances + +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] + +test_dom = "domu1" + +def setup_env(server, virt): + if virt == 'Xen': + test_disk = 'xvda' + else: + test_disk = 'hda' + virt_xml = get_class(virt) + if virt == 'LXC': + cxml = virt_xml(test_dom) + else: + cxml = virt_xml(test_dom, disk = test_disk) + + ret = cxml.cim_define(server) + if not ret: + logger.error("Failed to Create the dom: %s", test_dom) + return FAIL, cmxl + + status = cxml.cim_start(server) + if status != PASS: + logger.error("Unable start dom '%s'", test_dom) + cxml.undefine(server) + return status, cxml + + return PASS, cxml + +def enum_kvmrsaps(virt, ip): + kvmrsap_insts = {} + + try: + kvmrsap_cn = get_typed_class(virt, 'KVMRedirectionSAP') + enum_list = EnumInstances(ip, kvmrsap_cn) + + if enum_list < 1: + logger.error("No KVM Redirection SAP instances returned") + return kvmrsap_insts, FAIL + + for kvmrsap in enum_list: + if kvmrsap.Classname not in kvmrsap_insts.keys(): + kvmrsap_insts[kvmrsap.Classname] = [] + kvmrsap_insts[kvmrsap.Classname].append(kvmrsap) + + except Exception, details: + logger.error(details) + return kvmrsap_insts, FAIL + + return kvmrsap_insts, PASS + +def get_kvmrsap_inst(virt, ip, guest_name): + kvmrsap_inst = None + + kvmrsaps, status = enum_kvmrsaps(virt, ip) + if status != PASS: + logger.error("Get KVMRSAPs failed") + return kvmrsap_inst, status + + for kvmrsap_cn, kvmrsap_list in kvmrsaps.iteritems(): + for kvmrsap in kvmrsap_list: + guest = kvmrsap.SystemName + + if guest == guest_name: + kvmrsap_inst = kvmrsap + + return kvmrsap_inst, PASS + +def verify_host(enum_list, host_inst): + status = FAIL + + for item in enum_list: + if item.classname != host_inst.Classname: + print "Returned class name (%s) is not correct", item.classname + return status + + host = item.keybindings['Name'] + + print "Iteration host name: ", host_inst.Name + + if host == host_inst.Name: + status = PASS + break + + return status + + + at do_main(sup_types) +def main(): + options = main.options + status = FAIL + server = options.ip + virt = options.virt + + status, cxml = setup_env(options.ip, options.virt) + if status != PASS: + cxml.undefine(options.ip) + return status + + try: + status, host_inst = get_host_info(server, virt) + if status != PASS: + raise Exception("Failed to get host info.") + + kvmrsap_inst, status = get_kvmrsap_inst(options.virt, options.ip, test_dom) + if status != PASS: + raise Exception("Unable to fetch kvmrsap instance (domain: %s)", test_dom) + + an = get_typed_class(options.virt, 'HostedAccessPoint') + + + kvm_ccn = kvmrsap_inst.CreationClassName + name = kvmrsap_inst.Name + sys_ccn = kvmrsap_inst.SystemCreationClassName + + assoc_info = AssociatorNames(options.ip, an, kvm_ccn, + CreationClassName = kvm_ccn, + Name = kvmrsap_inst.Name, + SystemCreationClassName = sys_ccn, + SystemName = test_dom) + + status = verify_host(assoc_info, host_inst) + + if status != PASS: + raise Exception("Failed to verify KVMRedirectionSAPs") + + except Exception, details: + logger.error(details) + status = FAIL + + cxml.cim_destroy(options.ip) + cxml.undefine(options.ip) + return status + +if __name__ == "__main__": + sys.exit(main()) From rmaciel at linux.vnet.ibm.com Wed Jan 28 21:13:55 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Wed, 28 Jan 2009 19:13:55 -0200 Subject: [Libvirt-cim] [PATCH 0 of 2] [TEST] #2 Added testcases for the HostedAccessPoint association Message-ID: #2 added [TEST] on all patch headers From kaitlin at linux.vnet.ibm.com Wed Jan 28 22:52:47 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 28 Jan 2009 14:52:47 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Created testcases for the forward HostedAccessPoint association (HostSystem -> KVMRedirectionSAP In-Reply-To: <767d1922190f08c2343c.1233177236@localhost.localdomain> References: <767d1922190f08c2343c.1233177236@localhost.localdomain> Message-ID: <4980E1BF.9030208@linux.vnet.ibm.com> > +from XenKvmLib.const import do_main, get_provider_version > +from XenKvmLib.rasd import enum_rasds > +from XenKvmLib.common_util import parse_instance_id > +from XenKvmLib.vsms import enumerate_instances > +from XenKvmLib.test_doms import virdomid_list This test doesn't include these functions, no need to import them. > +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > + > +test_dom = "domu1" > + > +def setup_env(server, virt): > + if virt == 'Xen': > + test_disk = 'xvda' > + else: > + test_disk = 'hda' > + virt_xml = get_class(virt) > + if virt == 'LXC': > + cxml = virt_xml(test_dom) > + else: > + cxml = virt_xml(test_dom, disk = test_disk) > + > + ret = cxml.cim_define(server) > + if not ret: > + logger.error("Failed to Create the dom: %s", test_dom) This should be "define" instead of "create" - there's a slight difference between libvirt's notion of define and create, so it'd be good to use "define" here. > + return FAIL, cmxl This should be cxml, not cmxl. > + > +def enum_kvmrsaps(virt, ip): > + kvmrsap_insts = {} > + > + try: > + kvmrsap_cn = get_typed_class(virt, 'KVMRedirectionSAP') > + enum_list = EnumInstances(ip, kvmrsap_cn) > + > + if enum_list < 1: > + logger.error("No KVM Redirection SAP instances returned") > + return kvmrsap_insts, FAIL > + > + for kvmrsap in enum_list: > + if kvmrsap.Classname not in kvmrsap_insts.keys(): > + kvmrsap_insts[kvmrsap.Classname] = [] > + kvmrsap_insts[kvmrsap.Classname].append(kvmrsap) All of the instances returned by EnunmInstances will have the same classname. There's no need to build a dictionary. This function isn't really necessary. Just call the EnumInstances() call in get_kvmrsap_inst(). Then loop through the list returned by EnumInstances() to kind the instance that corresponds to your guest. > + > + except Exception, details: > + logger.error(details) > + return kvmrsap_insts, FAIL > + > + return kvmrsap_insts, PASS > + > +def get_kvmrsap_inst(virt, ip, guest_name): > + kvmrsap_inst = None > + > + kvmrsaps, status = enum_kvmrsaps(virt, ip) > + if status != PASS: > + logger.error("Get KVMRSAPs failed") > + return kvmrsap_inst, status > + > + for kvmrsap_cn, kvmrsap_list in kvmrsaps.iteritems(): > + for kvmrsap in kvmrsap_list: > + guest = kvmrsap.SystemName You don't use the guest param for anything else, so you can just do: if kvmrsap.SystemName == guest_name > + > + if guest == guest_name: > + kvmrsap_inst = kvmrsap You want to make sure the expected number of KVMRedirectionSAPs are returned before returning from the function. If kvmrsap_inst is None, return an error. > + > + return kvmrsap_inst, PASS > + > +def init_kvmrsap_list(virt, ip, guest_name): This function isn't being used. It should be removed. > + kvmrsap_insts = {} > + > + kvmrsaps, status = enum_kvmrsaps(virt, ip) > + if status != PASS: > + logger.error("Enum KVMRSAPs failed") > + return kvmrsap_insts, status > + > + for kvmrsap_cn, kvmrsap_list in kvmrsaps.iteritems(): > + for kvmrsap in kvmrsap_list: > + guest = kvmrsap.SystemName > + > + if guest == guest_name: > + kvmrsap_insts[kvmrsap.Classname] = kvmrsap > + > + return kvmrsap_insts, PASS > + > +def verify_kvmrsap(enum_list, kvmrsap_inst): > + status = FAIL > + > + for item in enum_list: Also, you need to verify that enum_list has the proper number of KVMRedirectionSAP instances. Since you are not connecting to the guest's console, there should only be one instance. Because of this, the loop isn't needed here. > + if item.classname != kvmrsap_inst.Classname: > + print "Returned class name (%s) is not correct", item.classname > + return status > + > + guest = item.keybindings['SystemName'] > + > + print "Iteration guest name: ", guest > + print "Iteration host name: ", item.host Remove print statements. > + > + if guest == kvmrsap_inst.SystemName: > + status = PASS > + break This function should verify all the properties of the instance. Take a look at compare_all_prop() for this. > + > + return status > + > + > + at do_main(sup_types) > +def main(): > + options = main.options > + status = FAIL > + server = options.ip > + virt = options.virt > + > + status, cxml = setup_env(options.ip, options.virt) > + if status != PASS: > + cxml.undefine(options.ip) > + return status > + > + try: > + status, host_inst = get_host_info(server, virt) > + if status != PASS: > + raise Exception("Failed to get host info.") > + > + kvmrsap_inst, status = get_kvmrsap_inst(options.virt, options.ip, test_dom) This line needs to be 80 characters. > + if status != PASS: > + raise Exception("Unable to fetch kvmrsap instance (domain: %s)", test_dom) This line needs to be 80 characters. Also, the format for Exception is to use a % for args, not a comma: raise Exception("Unable to fetch kvmrsap instance (domain: %s)" % test_dom) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 28 22:55:31 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 28 Jan 2009 14:55:31 -0800 Subject: [Libvirt-cim] [PATCH 1 of 2] [TEST] Created testcases for the forward HostedAccessPoint association (HostSystem -> KVMRedirectionSAP In-Reply-To: <4980E1BF.9030208@linux.vnet.ibm.com> References: <767d1922190f08c2343c.1233177236@localhost.localdomain> <4980E1BF.9030208@linux.vnet.ibm.com> Message-ID: <4980E263.1010208@linux.vnet.ibm.com> Kaitlin Rupert wrote: >> +from XenKvmLib.const import do_main, get_provider_version >> +from XenKvmLib.rasd import enum_rasds >> +from XenKvmLib.common_util import parse_instance_id >> +from XenKvmLib.vsms import enumerate_instances >> +from XenKvmLib.test_doms import virdomid_list > > This test doesn't include these functions, no need to import them. > Correction - you need to keep the do_main import, just remove the get_provider_version. I failed to see do_main in the list when I responded originally. -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Wed Jan 28 23:10:04 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Wed, 28 Jan 2009 15:10:04 -0800 Subject: [Libvirt-cim] [PATCH 2 of 2] [TEST] Created reverse test (KVMRedirectionSAP -> HostSystem) test In-Reply-To: References: Message-ID: <4980E5CC.3070802@linux.vnet.ibm.com> > +from XenKvmLib.const import do_main, get_provider_version You don't use get_provider_version, however - you probably should (and on the other HAP test as well). Because these tests won't work with older versions of the providers. > +from XenKvmLib.rasd import enum_rasds > +from XenKvmLib.common_util import parse_instance_id > +from XenKvmLib.vsms import enumerate_instances > +from XenKvmLib.test_doms import virdomid_list These aren't used; they should be removed. > +from XenKvmLib.common_util import get_host_info > +from XenKvmLib.enumclass import EnumInstances > + > +sup_types = ['Xen', 'KVM', 'XenFV', 'LXC'] > + > +test_dom = "domu1" > + > +def setup_env(server, virt): > + if virt == 'Xen': > + test_disk = 'xvda' > + else: > + test_disk = 'hda' > + virt_xml = get_class(virt) > + if virt == 'LXC': > + cxml = virt_xml(test_dom) > + else: > + cxml = virt_xml(test_dom, disk = test_disk) > + > + ret = cxml.cim_define(server) > + if not ret: > + logger.error("Failed to Create the dom: %s", test_dom) This should be "define" instead of "create" - there's a slight difference between libvirt's notion of define and create, so it'd be good to use "define" here. > + return FAIL, cmxl This should be cxml, not cmxl. > + > + status = cxml.cim_start(server) > + if status != PASS: > + logger.error("Unable start dom '%s'", test_dom) > + cxml.undefine(server) > + return status, cxml > + > + return PASS, cxml > + > +def enum_kvmrsaps(virt, ip): > + kvmrsap_insts = {} > + > + try: > + kvmrsap_cn = get_typed_class(virt, 'KVMRedirectionSAP') > + enum_list = EnumInstances(ip, kvmrsap_cn) > + > + if enum_list < 1: > + logger.error("No KVM Redirection SAP instances returned") > + return kvmrsap_insts, FAIL > + > + for kvmrsap in enum_list: > + if kvmrsap.Classname not in kvmrsap_insts.keys(): > + kvmrsap_insts[kvmrsap.Classname] = [] > + kvmrsap_insts[kvmrsap.Classname].append(kvmrsap) All of the instances returned by EnunmInstances will have the same classname. There's no need to build a dictionary. This function isn't really necessary. Just call the EnumInstances() call in get_kvmrsap_inst(). Then loop through the list returned by EnumInstances() to kind the instance that corresponds to your guest. > + > + except Exception, details: > + logger.error(details) > + return kvmrsap_insts, FAIL > + > + return kvmrsap_insts, PASS > + > +def get_kvmrsap_inst(virt, ip, guest_name): > + kvmrsap_inst = None > + > + kvmrsaps, status = enum_kvmrsaps(virt, ip) > + if status != PASS: > + logger.error("Get KVMRSAPs failed") > + return kvmrsap_inst, status > + > + for kvmrsap_cn, kvmrsap_list in kvmrsaps.iteritems(): > + for kvmrsap in kvmrsap_list: > + guest = kvmrsap.SystemName > + > + if guest == guest_name: > + kvmrsap_inst = kvmrsap You don't use the guest param for anything else, so you can just do: if kvmrsap.SystemName == guest_name > + > + return kvmrsap_inst, PASS You want to make sure the expected number of KVMRedirectionSAPs are returned before returning from the function. If kvmrsap_inst is None, return an error. > + > +def verify_host(enum_list, host_inst): > + status = FAIL > + > + for item in enum_list: > + if item.classname != host_inst.Classname: > + print "Returned class name (%s) is not correct", item.classname > + return status > + > + host = item.keybindings['Name'] > + > + print "Iteration host name: ", host_inst.Name Remove print statement. > + > + if host == host_inst.Name: > + status = PASS > + break > This function should verify all the properties of the instance. Take a look at compare_all_prop() for this. > + > + return status > + > + > + at do_main(sup_types) > +def main(): > + options = main.options > + status = FAIL > + server = options.ip > + virt = options.virt > + > + status, cxml = setup_env(options.ip, options.virt) > + if status != PASS: > + cxml.undefine(options.ip) > + return status > + > + try: > + status, host_inst = get_host_info(server, virt) > + if status != PASS: > + raise Exception("Failed to get host info.") > + > + kvmrsap_inst, status = get_kvmrsap_inst(options.virt, options.ip, test_dom) This line needs to be 80 characters. > + if status != PASS: > + raise Exception("Unable to fetch kvmrsap instance (domain: %s)", test_dom) This line needs to be 80 characters. Also, the format for Exception is to use a % for args, not a comma: raise Exception("Unable to fetch kvmrsap instance (domain: %s)" % test_dom) -- Kaitlin Rupert IBM Linux Technology Center kaitlin at linux.vnet.ibm.com From kaitlin at linux.vnet.ibm.com Thu Jan 29 16:38:47 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 29 Jan 2009 08:38:47 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSMS 11_define_memrasdunits.py to use cim_define() Message-ID: <5c3e489b2d2996556824.1233247127@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1233247097 28800 # Node ID 5c3e489b2d299655682443c263a2f74ec84561f2 # Parent fd464f0d24d0f4173cefd9d7ee8d27e6fc48ac55 [TEST] Update VSMS 11_define_memrasdunits.py to use cim_define() Use template RASD when defining guest. Some minor changes so that the test fits with the style conventions of other test cases. Removed some extraneous debug from assoc.py Signed-off-by: Kaitlin Rupert diff -r fd464f0d24d0 -r 5c3e489b2d29 suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Jan 29 08:37:46 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Jan 29 08:38:17 2009 -0800 @@ -21,17 +21,14 @@ # import sys -import pywbem -from VirtLib import live -from XenKvmLib import vsms -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib import rasd -from XenKvmLib.classes import get_typed_class +from pywbem.cim_types import Uint64 +from XenKvmLib.classes import get_typed_class, inst_to_mof from XenKvmLib import enumclass from XenKvmLib.const import do_main from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.vxml import get_class +from XenKvmLib.rasd import get_default_rasds sup_types = ['Xen', 'XenFV', 'KVM'] default_dom = "memrasd_test" @@ -45,30 +42,38 @@ ("GigaBytes", 30), ] -def try_define(options, vssd, units, value): - mrasd_class = vsms.get_masd_class(options.virt) - mrasd = mrasd_class(megabytes=value, mallocunits=units, - name=default_dom) +def try_define(options, units, value, cxml): + mrasd_cn = get_typed_class(options.virt, "MemResourceAllocationSettingData") - params = { - "vssd" : vssd, - "rasd" : [mrasd.mof()], - } + rasds = get_default_rasds(options.ip, options.virt) - logger.info("Defining with %s = %i" % (units, value)) - rc = create_using_definesystem(default_dom, - options.ip, - params=params, - virt=options.virt) - - if rc != PASS: - logger.error("DefineSystem (%s) failed" % units) - return False + rasd_list = {} - return True + for rasd in rasds: + if rasd.classname == mrasd_cn: + rasd['VirtualQuantity'] = Uint64(value) + rasd['AllocationUnits'] = units + rasd_list[mrasd_cn] = inst_to_mof(rasd) + else: + rasd_list[rasd.classname] = None + + if rasd_list[mrasd_cn] is None: + logger.error("Unable to get template MemRASD") + return FAIL + + cxml.set_res_settings(rasd_list) + + logger.info("Defining with %s = %i", units, value) + + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("DefineSystem with (%s) units failed" % units) + return FAIL + + return PASS def check_value(options): - mrasd_cn = get_typed_class(options.virt, rasd.masd_cn) + mrasd_cn = get_typed_class(options.virt, "MemResourceAllocationSettingData") rasds = enumclass.EnumInstances(options.ip, mrasd_cn, ret_cim_inst=True) the_rasd = None @@ -80,46 +85,45 @@ if not the_rasd: logger.error("Did not find test RASD on server") - return False + return FAIL if the_rasd["AllocationUnits"] != "KiloBytes": logger.error("MRASD units are not kilobytes?") - return False + return FAIL cim_kb = int(the_rasd["VirtualQuantity"]) if cim_kb != mem_kb: logger.error("CIM reports %i KB instead of %i KB" % (cim_kb, mem_kb)) - return False + return FAIL logger.info("Verified %i KB" % mem_kb) - return True + return PASS @do_main(sup_types) def main(): options = main.options - vssd = vsms.get_vssd_mof(options.virt, default_dom) + cxml = get_class(options.virt)(default_dom) - status = PASS + status = FAIL for units, shift in values: value = mem_bytes >> shift - if not try_define(options, vssd, units, value): - status = FAIL + status = try_define(options, units, value, cxml) + if status != PASS: break - if not check_value(options): - status = FAIL + status = check_value(options) + if status != PASS: break - undefine_test_domain(default_dom, options.ip, virt=options.virt) + cxml.undefine(options.ip) - undefine_test_domain(default_dom, options.ip, virt=options.virt) - + cxml.undefine(options.ip) return status diff -r fd464f0d24d0 -r 5c3e489b2d29 suites/libvirt-cim/lib/XenKvmLib/assoc.py --- a/suites/libvirt-cim/lib/XenKvmLib/assoc.py Thu Jan 29 08:37:46 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/assoc.py Thu Jan 29 08:38:17 2009 -0800 @@ -49,7 +49,6 @@ names = [] try: - logger.info("DEBUG instanceref, is %s", instanceref) names = conn.AssociatorNames(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] @@ -79,7 +78,6 @@ names = [] try: - logger.info("DEBUG instanceref, is %s", instanceref) names = conn.Associators(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] From kaitlin at linux.vnet.ibm.com Thu Jan 29 16:38:01 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Thu, 29 Jan 2009 08:38:01 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Don't pass graphics RASD for older provider versions Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1233247066 28800 # Node ID fd464f0d24d0f4173cefd9d7ee8d27e6fc48ac55 # Parent 86b52969f91d69a1460f13326b05ca3357ad0599 [TEST] Don't pass graphics RASD for older provider versions. GraphicsRASD support was added in provider version 763. Signed-off-by: Kaitlin Rupert diff -r 86b52969f91d -r fd464f0d24d0 suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Jan 27 00:41:21 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 29 08:37:46 2009 -0800 @@ -47,6 +47,9 @@ from CimTest.ReturnCodes import SKIP, PASS, FAIL from XenKvmLib.classes import virt_types, get_typed_class from XenKvmLib.enumclass import GetInstance +from XenKvmLib.const import get_provider_version + +vsms_graphics_sup = 763 class XMLClass: xml_string = "" @@ -508,8 +511,11 @@ pass else: res_settings.append(str(self.nasd)) - if self.gasd is not None: - res_settings.append(str(self.gasd)) + + curr_cim_rev, changeset = get_provider_version(self.virt, ip) + if curr_cim_rev >= vsms_graphics_sup: + if self.gasd is not None: + res_settings.append(str(self.gasd)) if ref_conf is None: ref_conf = ' ' From deeptik at linux.vnet.ibm.com Fri Jan 30 11:55:07 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 30 Jan 2009 17:25:07 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Don't pass graphics RASD for older provider versions In-Reply-To: References: Message-ID: <4982EA9B.1050807@linux.vnet.ibm.com> +1 for me. Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1233247066 28800 > # Node ID fd464f0d24d0f4173cefd9d7ee8d27e6fc48ac55 > # Parent 86b52969f91d69a1460f13326b05ca3357ad0599 > [TEST] Don't pass graphics RASD for older provider versions. > > GraphicsRASD support was added in provider version 763. > > Signed-off-by: Kaitlin Rupert > > diff -r 86b52969f91d -r fd464f0d24d0 suites/libvirt-cim/lib/XenKvmLib/vxml.py > --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Jan 27 00:41:21 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 29 08:37:46 2009 -0800 > @@ -47,6 +47,9 @@ > from CimTest.ReturnCodes import SKIP, PASS, FAIL > from XenKvmLib.classes import virt_types, get_typed_class > from XenKvmLib.enumclass import GetInstance > +from XenKvmLib.const import get_provider_version > + > +vsms_graphics_sup = 763 > > class XMLClass: > xml_string = "" > @@ -508,8 +511,11 @@ > pass > else: > res_settings.append(str(self.nasd)) > - if self.gasd is not None: > - res_settings.append(str(self.gasd)) > + > + curr_cim_rev, changeset = get_provider_version(self.virt, ip) > + if curr_cim_rev >= vsms_graphics_sup: > + if self.gasd is not None: > + res_settings.append(str(self.gasd)) > > if ref_conf is None: > ref_conf = ' ' > > _______________________________________________ > 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 Jan 30 17:49:56 2009 From: deeptik at linux.vnet.ibm.com (Deepti B Kalakeri) Date: Fri, 30 Jan 2009 23:19:56 +0530 Subject: [Libvirt-cim] [PATCH] [TEST] Update VSMS 11_define_memrasdunits.py to use cim_define() In-Reply-To: <5c3e489b2d2996556824.1233247127@localhost.localdomain> References: <5c3e489b2d2996556824.1233247127@localhost.localdomain> Message-ID: <49833DC4.6090909@linux.vnet.ibm.com> Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1233247097 28800 > # Node ID 5c3e489b2d299655682443c263a2f74ec84561f2 > # Parent fd464f0d24d0f4173cefd9d7ee8d27e6fc48ac55 > [TEST] Update VSMS 11_define_memrasdunits.py to use cim_define() > > Use template RASD when defining guest. Some minor changes so that the test > fits with the style conventions of other test cases. > > Removed some extraneous debug from assoc.py > > Signed-off-by: Kaitlin Rupert > > diff -r fd464f0d24d0 -r 5c3e489b2d29 suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py > --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Jan 29 08:37:46 2009 -0800 > +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Jan 29 08:38:17 2009 -0800 > @@ -21,17 +21,14 @@ > # > > import sys > -import pywbem > -from VirtLib import live > -from XenKvmLib import vsms > -from XenKvmLib.test_doms import undefine_test_domain > -from XenKvmLib.common_util import create_using_definesystem > -from XenKvmLib import rasd > -from XenKvmLib.classes import get_typed_class > +from pywbem.cim_types import Uint64 > +from XenKvmLib.classes import get_typed_class, inst_to_mof > from XenKvmLib import enumclass > from XenKvmLib.const import do_main > from CimTest.Globals import logger > from CimTest.ReturnCodes import FAIL, PASS > +from XenKvmLib.vxml import get_class > +from XenKvmLib.rasd import get_default_rasds > > sup_types = ['Xen', 'XenFV', 'KVM'] > default_dom = "memrasd_test" > @@ -45,30 +42,38 @@ > ("GigaBytes", 30), > ] > > -def try_define(options, vssd, units, value): > - mrasd_class = vsms.get_masd_class(options.virt) > - mrasd = mrasd_class(megabytes=value, mallocunits=units, > - name=default_dom) > +def try_define(options, units, value, cxml): > + mrasd_cn = get_typed_class(options.virt, "MemResourceAllocationSettingData") > > - params = { > - "vssd" : vssd, > - "rasd" : [mrasd.mof()], > - } > + rasds = get_default_rasds(options.ip, options.virt) > > - logger.info("Defining with %s = %i" % (units, value)) > - rc = create_using_definesystem(default_dom, > - options.ip, > - params=params, > - virt=options.virt) > - > - if rc != PASS: > - logger.error("DefineSystem (%s) failed" % units) > - return False > + rasd_list = {} > > - return True > + for rasd in rasds: > + if rasd.classname == mrasd_cn: > + rasd['VirtualQuantity'] = Uint64(value) > + rasd['AllocationUnits'] = units > + rasd_list[mrasd_cn] = inst_to_mof(rasd) > + else: > + rasd_list[rasd.classname] = None > + > + if rasd_list[mrasd_cn] is None: > + logger.error("Unable to get template MemRASD") > + return FAIL > + > + cxml.set_res_settings(rasd_list) > + > + logger.info("Defining with %s = %i", units, value) > + > + ret = cxml.cim_define(options.ip) > + if not ret: > + logger.error("DefineSystem with (%s) units failed" % units) > + return FAIL > + > + return PASS > > def check_value(options): > - mrasd_cn = get_typed_class(options.virt, rasd.masd_cn) > + mrasd_cn = get_typed_class(options.virt, "MemResourceAllocationSettingData") > rasds = enumclass.EnumInstances(options.ip, mrasd_cn, ret_cim_inst=True) > > the_rasd = None > @@ -80,46 +85,45 @@ > > if not the_rasd: > logger.error("Did not find test RASD on server") > - return False > + return FAIL > > if the_rasd["AllocationUnits"] != "KiloBytes": > logger.error("MRASD units are not kilobytes?") > - return False > + return FAIL > > cim_kb = int(the_rasd["VirtualQuantity"]) > > if cim_kb != mem_kb: > logger.error("CIM reports %i KB instead of %i KB" % (cim_kb, mem_kb)) > - return False > + return FAIL > > logger.info("Verified %i KB" % mem_kb) > > - return True > + return PASS > > > @do_main(sup_types) > def main(): > options = main.options > > - vssd = vsms.get_vssd_mof(options.virt, default_dom) > + cxml = get_class(options.virt)(default_dom) > > - status = PASS > + status = FAIL > > for units, shift in values: > value = mem_bytes >> shift > > - if not try_define(options, vssd, units, value): > - status = FAIL > + status = try_define(options, units, value, cxml) > + if status != PASS: > break > > - if not check_value(options): > - status = FAIL > + status = check_value(options) > + if status != PASS: > break > > - undefine_test_domain(default_dom, options.ip, virt=options.virt) > + cxml.undefine(options.ip) > > - undefine_test_domain(default_dom, options.ip, virt=options.virt) > - > + cxml.undefine(options.ip) > WE would require to undefine the guest outside the for loop only when status != PASS otherwise it would have already been defined. Can you make that check before calling undefine(). > return status > > diff -r fd464f0d24d0 -r 5c3e489b2d29 suites/libvirt-cim/lib/XenKvmLib/assoc.py > --- a/suites/libvirt-cim/lib/XenKvmLib/assoc.py Thu Jan 29 08:37:46 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/assoc.py Thu Jan 29 08:38:17 2009 -0800 > @@ -49,7 +49,6 @@ > names = [] > > try: > - logger.info("DEBUG instanceref, is %s", instanceref) > names = conn.AssociatorNames(instanceref, AssocClass=assoc_cn) > except pywbem.CIMError, arg: > print arg[1] > @@ -79,7 +78,6 @@ > names = [] > > try: > - logger.info("DEBUG instanceref, is %s", instanceref) > names = conn.Associators(instanceref, AssocClass=assoc_cn) > except pywbem.CIMError, arg: > print arg[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 kaitlin at linux.vnet.ibm.com Fri Jan 30 21:05:45 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 30 Jan 2009 13:05:45 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] Add compare functions to CIM_Instance class Message-ID: <0612bccec10e0221328d.1233349545@localhost.localdomain> # HG changeset patch # User Kaitlin Rupert # Date 1233349527 28800 # Node ID 0612bccec10e0221328decb12d435d0c611e732b # Parent d86fcc1592a36d5a1c246009dbcb472e35cf87ba [TEST] Add compare functions to CIM_Instance class. These functions allow you to compare a CIM_Instance class object in the following ways: rasd_inst == None rasd_inst != None The following aren't supported: <, >, <=, >=. Also, return a mof version of the CIM_Instance class when printing. This allows the caller to print the return values from EnumInstances() (etc) without encountering an error. Signed-off-by: Kaitlin Rupert diff -r d86fcc1592a3 -r 0612bccec10e suites/libvirt-cim/lib/XenKvmLib/enumclass.py --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Jan 30 13:02:15 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Jan 30 13:05:27 2009 -0800 @@ -34,12 +34,47 @@ def __init__(self, inst): self.inst = inst + def __eq__(self, other): + if self is other: + return True + else: + return False + + def __ne__(self, other): + if self is other: + return False + else: + return True + + def __coerce__(self, other): + logger.error("__coerce__ function not implemented") + return NotImplemented + + def __cmp__(self, other): + logger.error("__cmp__ function not implemented") + return NotImplemented + + def __gt__(self, other): + logger.error("__gt__ function not implemented") + return NotImplemented + + def __lt__(self, other): + logger.error("__gt__ function not implemented") + return NotImplemented + + def __ge__(self, other): + logger.error("__gt__ function not implemented") + return NotImplemented + + def __le__(self, other): + logger.error("__gt__ function not implemented") + return NotImplemented def __getattr__(self, attr): return self.inst[attr] def __str__(self): - print self.inst.items() + return self.inst.tomof() class CIM_CimtestClass(CIM_Instance): def __init__(self, host, ref): From kaitlin at linux.vnet.ibm.com Fri Jan 30 21:23:37 2009 From: kaitlin at linux.vnet.ibm.com (Kaitlin Rupert) Date: Fri, 30 Jan 2009 13:23:37 -0800 Subject: [Libvirt-cim] [PATCH] [TEST] #2 Update VSMS 11_define_memrasdunits.py to use cim_define() Message-ID: # HG changeset patch # User Kaitlin Rupert # Date 1233350611 28800 # Node ID d1443d4847e3f9711b2db016d20676ca35f57243 # Parent fd464f0d24d0f4173cefd9d7ee8d27e6fc48ac55 [TEST] #2 Update VSMS 11_define_memrasdunits.py to use cim_define() Use template RASD when defining guest. Some minor changes so that the test fits with the style conventions of other test cases. Removed some extraneous debug from assoc.py Updates: -Only undefine the guest if hasn't been done so already Signed-off-by: Kaitlin Rupert diff -r fd464f0d24d0 -r d1443d4847e3 suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Thu Jan 29 08:37:46 2009 -0800 +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/11_define_memrasdunits.py Fri Jan 30 13:23:31 2009 -0800 @@ -21,17 +21,14 @@ # import sys -import pywbem -from VirtLib import live -from XenKvmLib import vsms -from XenKvmLib.test_doms import undefine_test_domain -from XenKvmLib.common_util import create_using_definesystem -from XenKvmLib import rasd -from XenKvmLib.classes import get_typed_class +from pywbem.cim_types import Uint64 +from XenKvmLib.classes import get_typed_class, inst_to_mof from XenKvmLib import enumclass from XenKvmLib.const import do_main from CimTest.Globals import logger from CimTest.ReturnCodes import FAIL, PASS +from XenKvmLib.vxml import get_class +from XenKvmLib.rasd import get_default_rasds sup_types = ['Xen', 'XenFV', 'KVM'] default_dom = "memrasd_test" @@ -45,30 +42,38 @@ ("GigaBytes", 30), ] -def try_define(options, vssd, units, value): - mrasd_class = vsms.get_masd_class(options.virt) - mrasd = mrasd_class(megabytes=value, mallocunits=units, - name=default_dom) +def try_define(options, units, value, cxml): + mrasd_cn = get_typed_class(options.virt, "MemResourceAllocationSettingData") - params = { - "vssd" : vssd, - "rasd" : [mrasd.mof()], - } + rasds = get_default_rasds(options.ip, options.virt) - logger.info("Defining with %s = %i" % (units, value)) - rc = create_using_definesystem(default_dom, - options.ip, - params=params, - virt=options.virt) - - if rc != PASS: - logger.error("DefineSystem (%s) failed" % units) - return False + rasd_list = {} - return True + for rasd in rasds: + if rasd.classname == mrasd_cn: + rasd['VirtualQuantity'] = Uint64(value) + rasd['AllocationUnits'] = units + rasd_list[mrasd_cn] = inst_to_mof(rasd) + else: + rasd_list[rasd.classname] = None + + if rasd_list[mrasd_cn] is None: + logger.error("Unable to get template MemRASD") + return FAIL + + cxml.set_res_settings(rasd_list) + + logger.info("Defining with %s = %i", units, value) + + ret = cxml.cim_define(options.ip) + if not ret: + logger.error("DefineSystem with (%s) units failed" % units) + return FAIL + + return PASS def check_value(options): - mrasd_cn = get_typed_class(options.virt, rasd.masd_cn) + mrasd_cn = get_typed_class(options.virt, "MemResourceAllocationSettingData") rasds = enumclass.EnumInstances(options.ip, mrasd_cn, ret_cim_inst=True) the_rasd = None @@ -80,46 +85,50 @@ if not the_rasd: logger.error("Did not find test RASD on server") - return False + return FAIL if the_rasd["AllocationUnits"] != "KiloBytes": logger.error("MRASD units are not kilobytes?") - return False + return FAIL cim_kb = int(the_rasd["VirtualQuantity"]) if cim_kb != mem_kb: logger.error("CIM reports %i KB instead of %i KB" % (cim_kb, mem_kb)) - return False + return FAIL logger.info("Verified %i KB" % mem_kb) - return True + return PASS @do_main(sup_types) def main(): options = main.options - vssd = vsms.get_vssd_mof(options.virt, default_dom) + cxml = get_class(options.virt)(default_dom) - status = PASS + status = FAIL + guest_is_undefined = None for units, shift in values: + guest_is_undefined = False + value = mem_bytes >> shift - if not try_define(options, vssd, units, value): - status = FAIL + status = try_define(options, units, value, cxml) + if status != PASS: break - if not check_value(options): - status = FAIL + status = check_value(options) + if status != PASS: break - undefine_test_domain(default_dom, options.ip, virt=options.virt) + cxml.undefine(options.ip) + guest_is_undefined = True - undefine_test_domain(default_dom, options.ip, virt=options.virt) - + if guest_is_undefined != True: + cxml.undefine(options.ip) return status diff -r fd464f0d24d0 -r d1443d4847e3 suites/libvirt-cim/lib/XenKvmLib/assoc.py --- a/suites/libvirt-cim/lib/XenKvmLib/assoc.py Thu Jan 29 08:37:46 2009 -0800 +++ b/suites/libvirt-cim/lib/XenKvmLib/assoc.py Fri Jan 30 13:23:31 2009 -0800 @@ -49,7 +49,6 @@ names = [] try: - logger.info("DEBUG instanceref, is %s", instanceref) names = conn.AssociatorNames(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] @@ -79,7 +78,6 @@ names = [] try: - logger.info("DEBUG instanceref, is %s", instanceref) names = conn.Associators(instanceref, AssocClass=assoc_cn) except pywbem.CIMError, arg: print arg[1] From rmaciel at linux.vnet.ibm.com Fri Jan 30 21:39:02 2009 From: rmaciel at linux.vnet.ibm.com (Richard Maciel) Date: Fri, 30 Jan 2009 19:39:02 -0200 Subject: [Libvirt-cim] [PATCH] [TEST] Add compare functions to CIM_Instance class In-Reply-To: <0612bccec10e0221328d.1233349545@localhost.localdomain> References: <0612bccec10e0221328d.1233349545@localhost.localdomain> Message-ID: <49837376.4070407@linux.vnet.ibm.com> +1 Kaitlin Rupert wrote: > # HG changeset patch > # User Kaitlin Rupert > # Date 1233349527 28800 > # Node ID 0612bccec10e0221328decb12d435d0c611e732b > # Parent d86fcc1592a36d5a1c246009dbcb472e35cf87ba > [TEST] Add compare functions to CIM_Instance class. > > These functions allow you to compare a CIM_Instance class object in the > following ways: > > rasd_inst == None > rasd_inst != None > > The following aren't supported: <, >, <=, >=. > > Also, return a mof version of the CIM_Instance class when printing. This > allows the caller to print the return values from EnumInstances() (etc) without > encountering an error. > > Signed-off-by: Kaitlin Rupert > > diff -r d86fcc1592a3 -r 0612bccec10e suites/libvirt-cim/lib/XenKvmLib/enumclass.py > --- a/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Jan 30 13:02:15 2009 -0800 > +++ b/suites/libvirt-cim/lib/XenKvmLib/enumclass.py Fri Jan 30 13:05:27 2009 -0800 > @@ -34,12 +34,47 @@ > def __init__(self, inst): > self.inst = inst > > + def __eq__(self, other): > + if self is other: > + return True > + else: > + return False > + > + def __ne__(self, other): > + if self is other: > + return False > + else: > + return True > + > + def __coerce__(self, other): > + logger.error("__coerce__ function not implemented") > + return NotImplemented > + > + def __cmp__(self, other): > + logger.error("__cmp__ function not implemented") > + return NotImplemented > + > + def __gt__(self, other): > + logger.error("__gt__ function not implemented") > + return NotImplemented > + > + def __lt__(self, other): > + logger.error("__gt__ function not implemented") > + return NotImplemented > + > + def __ge__(self, other): > + logger.error("__gt__ function not implemented") > + return NotImplemented > + > + def __le__(self, other): > + logger.error("__gt__ function not implemented") > + return NotImplemented > > def __getattr__(self, attr): > return self.inst[attr] > > def __str__(self): > - print self.inst.items() > + return self.inst.tomof() > > class CIM_CimtestClass(CIM_Instance): > def __init__(self, host, ref): > > _______________________________________________ > 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