[TEST] test cases fix list and assignment for the next week
by Guo Lian Yun
Hi Zhengang and Deepti,
I've list the failing test cases during our discussion yesterday.
I've assigned and names listed as well, it's be great to shoot for
completion before May 4th. =)
Thanks!
1) CS.40 --- maybe provider issue -- Deepti
InvokeMethod(DefineSystem): *** Provider
Virt_VirtualSystemManagementService(27073) exiting due to a SIGSEGV signal
2) EAFP.01 & 02 ----- still in working --Daisy
3) ElementConfroms.02 & 04: -- Deepti
4) ElementSettingData.03 --- make sure clean the vs before running --
Zhengang
5) HostSystem.02 -- the difference of rpm and source provider in memory.
"kilobyte" vs "megabyte", we have to add branch here -- Daisy
6) Memory 02 --- InvokeMethod(DefineSystem): *** Provider
Virt_VirtualSystemManagementService(5492) --Daisy
exiting due to a SIGSEGV signal
7) NetworkPort 03 ---- known bug
8) Processor 02 --- InvokeMethod(DefineSystem): *** Provider
Virt_VirtualSystemManagementService(15585) exiting due to a SIGSEGV signal
-- Deepti
9) RASD.01 & 02 --- "kilobyte" vs "megabyte", we have to add branch here
--Zhengang
10) ReferenceProfile.01 & 02 --- also add branch --Deepti
11) ResourceAllocatedFromPool.01~04 --- rpm vs latest with different report
message, we have to add branch here -- Daisy
12) ResourcePoolConfigurationService.03 04 06 07 -- CIM_ERR_NOT_SUPPORTED
in rpm, we have to add message here -- Deepti
13) SettingsDefine 02 ---- Because of InstanceID, "Domain-0/0" vs
"Domain-0/proc", Jay looked into this issue
14) VSSD.04 --- fail on rpm, pass on src, we have to add branch -- Daisy
15) VSMS.01 -- InvokeMethod(DefineSystem): -- Zhengang
.02 -- destroy and undefine rpm: destroy branch "rpm" vs "latest"
-- Zhengang
.06 -- InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Failed to
create domain -- Zhengang
16) VSSDataComponent.03 -- we have to add branch for "error code" --
Daisy
Best,
Regards
Daisy Guo Lian Yun
E-mail: yunguol(a)cn.ibm.com
IBM China Development Lab, Shanghai, China
TEL: (86)-21-61008057
16 years, 5 months
KVM test report on Fedora 9 (4/30)
by Zhengang Li
Distro: Fedora 9 Beta
Kernel: 2.6.25-0.121.rc5.git4.fc9
Libvirt: 0.4.1-7.fc9
CIMOM: 2.7.0-6.fc9
PyWBEM: 0.6-1
libcmpiutil: 0.3-1.fc9
libvirt-cim: 0.3-4.fc9
cimtest: changeset-127
========PASS(83)=SKIP(17)=XFAIL(7)=FAIL(16)=================
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: XFAIL Bug: 85769
ComputerSystem - 06_paused_active_suspend.py: XFAIL Bug: 85769
ComputerSystem - 22_define_suspend.py: PASS
ComputerSystem - 23_suspend_suspend.py: SKIP
ComputerSystem - 27_define_suspend_errs.py: SKIP
ComputerSystem - 32_start_reboot.py: SKIP
ComputerSystem - 33_suspend_reboot.py: SKIP
ComputerSystem - 35_start_reset.py: SKIP
ComputerSystem - 40_RSC_start.py: XFAIL Bug: 91410
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystem - 42_cs_gi_errs.py: PASS
ComputerSystemIndication - 01_created_indication.py: FAIL
ElementAllocatedFromPool - 01_forward.py: SKIP
ElementAllocatedFromPool - 02_reverse.py: SKIP
ElementAllocatedFromPool - 03_reverse_errs.py: FAIL
ElementAllocatedFromPool - 04_forward_errs.py: XFAIL Bug: 88651
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: FAIL
ElementConforms - 03_ectp_fwd_errs.py: XFAIL Bug: 92642
ElementConforms - 04_ectp_rev_errs.py: FAIL
ElementSettingData - 01_forward.py: PASS
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: FAIL
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: SKIP
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: FAIL
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: SKIP
Profile - 03_rprofile_gi_errs.py: SKIP
RASD - 01_verify_rasd_fields.py: PASS
RASD - 02_enum.py: PASS
RASD - 03_rasd_errs.py: PASS
ReferencedProfile - 01_verify_refprof.py: FAIL
ReferencedProfile - 02_refprofile_errs.py: FAIL
ResourceAllocationFromPool - 01_forward.py: PASS
ResourceAllocationFromPool - 02_reverse.py: PASS
ResourceAllocationFromPool - 03_forward_errs.py: FAIL
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: FAIL
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py:
XFAIL Bug: 92173
ResourcePoolConfigurationService -
06_RemoveResourcesFromResourcePool.py: FAIL
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
SettingsDefine - 01_forward.py: PASS
SettingsDefine - 02_reverse.py: FAIL
SettingsDefine - 03_sds_fwd_errs.py: PASS
SettingsDefine - 04_sds_rev_errs.py: PASS
SettingsDefineCapabilities - 01_forward.py: SKIP
SettingsDefineCapabilities - 03_forward_errs.py: PASS
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
SystemDevice - 01_forward.py: PASS
SystemDevice - 02_reverse.py: PASS
SystemDevice - 03_fwderrs.py: PASS
VSSD - 01_enum.py: PASS
VSSD - 02_bootldr.py: SKIP
VSSD - 03_vssd_gi_errs.py: PASS
VSSD - 04_vssd_to_rasd.py: PASS
VirtualSystemManagementCapabilities - 01_enum.py: PASS
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
VirtualSystemManagementService - 01_definesystem_name.py: PASS
VirtualSystemManagementService - 02_destroysystem.py: PASS
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
VirtualSystemManagementService - 06_addresource.py: FAIL
VirtualSystemManagementService - 07_addresource_neg.py: PASS
VirtualSystemManagementService - 08_modifyresource.py: XFAIL Bug: 90853
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: SKIP
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: FAIL
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
--
- Zhengang
16 years, 6 months
CimTest Report for KVM on F9 30-04-2008
by Deepti B Kalakeri
========================================================================
CIM Test Report for KVM on F9 with latest libvirt-cim and libcmpiutil
========================================================================
Distro : Fedora 9 Beta
Kernel : 2.6.25-0.121.rc5.git4.fc9
Libvirt : libvirt-0.4.2-1.fc9.x86_64
CIMOM : pegasus
PyWBEM : pywbem-0.6
CIM Schema : cimv216Experimental
LibCMPIutil : 74
LibVirtCIM : 565
CIMTEST : 127
=======================================================
PASS : 90
FAIL : 18
XFAIL : 4
SKIP : 17
-----------------
Total : 129
=======================================================
List of tc that are failing
ComputerSystem - 40_RSC_start.py: FAIL
ComputerSystemIndication - 01_created_indication.py: FAIL
ElementAllocatedFromPool - 04_forward_errs.py: FAIL
----Submitted fix for this
ElementCapabilities - 01_forward.py: FAIL
ElementSettingData - 01_forward.py: FAIL
Memory - 02_defgetmem.py: FAIL
NetworkPort - 03_user_netport.py: FAIL
Processor - 02_definesys_get_procs.py: FAIL
ResourcePoolConfigurationService - 03_CreateResourcePool.py: FAIL
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL
ResourcePoolConfigurationService -
06_RemoveResourcesFromResourcePool.py: FAIL
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
SettingsDefine - 02_reverse.py: FAIL
VSSD - 03_vssd_gi_errs.py: FAIL
ERROR - Unexpected rc code 0 and description The web server returned a
bad status line: ''
ERROR - ------ FAILED: INVALID_InstID_Keyval ------
-------------------------------------------------------------------------
cimserver o/p when run in the background
misc_util.c(72): Connecting to libvirt with uri `qemu:///system'
misc_util.c(199): URI of connection is: qemu:///system
misc_util.c(72): Connecting to libvirt with uri `qemu:///system'
misc_util.c(199): URI of connection is: qemu:///system
Segmentation fault
-------------------------------------------------------------------------
The segmentation fault occurs the InstanceID does not contain the VSType.
The segmentation does not occur when the InstanceID contains something
like "KVM:Invaid"
VirtualSystemManagementService - 01_definesystem_name.py: FAIL
VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL
VirtualSystemManagementService - 06_addresource.py: FAIL
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL
ERROR - Unexpected rc code 0 and description The web server returned a
bad status line: ''
ERROR - ------ FAILED: KVM_VirtualSystemSettingData
INVALID_InstID_Keyval------
-------------------------------------------------------------------------
cimserver o/p when run in the background
misc_util.c(72): Connecting to libvirt with uri `qemu:///system'
misc_util.c(199): URI of connection is: qemu:///system
misc_util.c(72): Connecting to libvirt with uri `qemu:///system'
misc_util.c(199): URI of connection is: qemu:///system
std_association.c(288): Getting handler ...
std_association.c(151): Calling Provider: 'associationVirt_VSSDComponent'
std_association.c(167): Check client's assocClass:
'KVM_VirtualSystemSettingDataComponent'
std_association.c(178): AssocClass valid.
std_association.c(294): Getting handler succeeded.
std_association.c(298): Calling handler ...
std_association.c(301): Handler did not return CMPI_RC_OK.
std_association.c(288): Getting handler ...
std_association.c(151): Calling Provider: 'associationVirt_VSSDComponent'
std_association.c(167): Check client's assocClass:
'KVM_VirtualSystemSettingDataComponent'
std_association.c(178): AssocClass valid.
std_association.c(294): Getting handler succeeded.
std_association.c(298): Calling handler ...
std_association.c(301): Handler did not return CMPI_RC_OK.
Segmentation fault
-------------------------------------------------------------------------
The segmentation fault occurs the InstanceID does not contain the VSType.
The segmentation does not occur when the InstanceID contains something
like "KVM:Invaid"
Please find the complete report attached with the mail.
Thanks and Regards,
Deepti.
Starting test suite: libvirt-cim
Cleaned log files.
Testing KVM hypervisor
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: XFAIL Bug: 85769
ERROR - ERROR: VS DomST1 transition from Defined State to Activate state was not Successful
Bug:<85769>
ComputerSystem - 06_paused_active_suspend.py: XFAIL Bug: 85769
ERROR - ERROR: VS DomST1 transition from suspend State to Activate state was not Successful
Bug:<85769>
ComputerSystem - 22_define_suspend.py: PASS
ComputerSystem - 23_suspend_suspend.py: SKIP
ComputerSystem - 27_define_suspend_errs.py: SKIP
ComputerSystem - 32_start_reboot.py: SKIP
ComputerSystem - 33_suspend_reboot.py: SKIP
ComputerSystem - 35_start_reset.py: SKIP
ComputerSystem - 40_RSC_start.py: FAIL
ERROR - Unexpected rc code 1 and description:
CIM_ERR_FAILED: ResourceSettings Error: Resource type not supported on this platform
ERROR - Exception: ('Unable create domain %s using DefineSystem()', 'test_domain')
InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Resource type not supported on this platform
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystem - 42_cs_gi_errs.py: PASS
ComputerSystemIndication - 01_created_indication.py: FAIL
ERROR - error : (110, 'Connection timed out')
ElementAllocatedFromPool - 01_forward.py: SKIP
ElementAllocatedFromPool - 02_reverse.py: SKIP
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
ElementAllocatedFromPool - 04_forward_errs.py: FAIL
ERROR - Unexpected rc code 4 and description CIM_ERR_INVALID_PARAMETER: InvalidClassName.CreationClassName="KVM_LogicalDisk",DeviceID="hd_domain/hda",SystemCreationClassName="KVM_ComputerSystem",SystemName="hd_domain"
ERROR - ------FAILED: Invalid classnameKeyname.------
ElementCapabilities - 01_forward.py: FAIL
ERROR - ElementCapabilities association classname error
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: FAIL
ERROR - ElementSettingData returned 0 ProcResourceAllocationSettingData instances
ERROR - Unable to get associated ResourceAllocationSettingData from ElementSettingData
CIM_ERR_NOT_FOUND: No such instance (domu/proc)
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: SKIP
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: FAIL
ERROR - Unexpected rc code 1 and description:
CIM_ERR_FAILED: ResourceSettings Error: Resource type not supported on this platform
ERROR - Exception: Unable to create domain domu using DefineSys()
InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Resource type not supported on this platform
Memory - 03_mem_gi_errs.py: PASS
NetworkPort - 01_netport.py: PASS
NetworkPort - 02_np_gi_errors.py: PASS
NetworkPort - 03_user_netport.py: FAIL
ERROR - Exception: (6, u'CIM_ERR_NOT_FOUND: No such instance (test_domain/00:11:22:33:44:55)')
Processor - 01_processor.py: PASS
Processor - 02_definesys_get_procs.py: FAIL
ERROR - Unexpected rc code 1 and description:
CIM_ERR_FAILED: ResourceSettings Error: Resource type not supported on this platform
ERROR - Exception: Unable create domain test_domain using DefineSystem()
InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Resource type not supported on this platform
Processor - 03_proc_gi_errs.py: PASS
Profile - 01_enum.py: PASS
Profile - 02_profile_to_elec.py: SKIP
Profile - 03_rprofile_gi_errs.py: SKIP
RASD - 01_verify_rasd_fields.py: PASS
RASD - 02_enum.py: PASS
RASD - 03_rasd_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: FAIL
ERROR - Unexpected rc code 7 and description CIM_ERR_NOT_SUPPORTED
InvokeMethod(CreateResourcePool): CIM_ERR_NOT_SUPPORTED
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: FAIL
ERROR - Unexpected rc code 7 and description CIM_ERR_NOT_SUPPORTED
InvokeMethod(CreateChildResourcePool): CIM_ERR_NOT_SUPPORTED
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: XFAIL Bug: 92173
ERROR - Unexpected rc code 1 and description CIM_ERR_FAILED: Unknown Method
InvokeMethod(AddResourcesToResourcePool): CIM_ERR_FAILED: Unknown Method
Bug:<92173>
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: FAIL
ERROR - Unexpected rc code 7 and description CIM_ERR_NOT_SUPPORTED
InvokeMethod(RemoveResourcesFromResourcePool): CIM_ERR_NOT_SUPPORTED
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
ERROR - Unexpected rc code 7 and description CIM_ERR_NOT_SUPPORTED
InvokeMethod(DeleteResourcePool): CIM_ERR_NOT_SUPPORTED
SettingsDefine - 01_forward.py: PASS
SettingsDefine - 02_reverse.py: FAIL
ERROR - Mistmatching value for VSSDComponent association
CIM_ERR_NOT_FOUND: No such instance (virtgst/proc)
SettingsDefine - 03_sds_fwd_errs.py: PASS
SettingsDefine - 04_sds_rev_errs.py: PASS
SettingsDefineCapabilities - 01_forward.py: SKIP
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 - 04_vssd_to_rasd.py: PASS
VSSD - 03_vssd_gi_errs.py: FAIL
ERROR - Unexpected rc code 0 and description The web server returned a bad status line: ''
ERROR - ------ FAILED: INVALID_InstID_Keyval ------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
VirtualSystemManagementService - 01_definesystem_name.py: FAIL
ERROR - Unexpected rc code 1 and description:
CIM_ERR_FAILED: ResourceSettings Error: Resource type not supported on this platform
InvokeMethod(DefineSystem): CIM_ERR_FAILED: ResourceSettings Error: Resource type not supported on this platform
VirtualSystemManagementService - 02_destroysystem.py: PASS
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
VirtualSystemManagementService - 05_destroysystem_neg.py: FAIL
ERROR - destroy_fail>>noname: Error executing DestroySystem, exception details below
ERROR - (1, u'CIM_ERR_FAILED: Unable to retrieve domain name.')
ERROR - destroy_fail>>nonexistent: Error executing DestroySystem, exception details below
ERROR - (1, u'CIM_ERR_FAILED: Failed to find domain')
InvokeMethod(DestroySystem): CIM_ERR_FAILED: Unable to retrieve domain name.
InvokeMethod(DestroySystem): CIM_ERR_FAILED: Failed to find domain
VirtualSystemManagementService - 06_addresource.py: FAIL
ERROR - Error invoking AddRS
ERROR - (1, u'CIM_ERR_FAILED: Failed to create domain')
InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Failed to create domain
VirtualSystemManagementService - 07_addresource_neg.py: PASS
VirtualSystemManagementService - 08_modifyresource.py: XFAIL Bug: 90853
ERROR - Error invoking ModifyRS
ERROR - (1, u'CIM_ERR_FAILED: Failed to create domain')
InvokeMethod(ModifyResourceSettings): CIM_ERR_FAILED: Failed to create domain
Bug:<90853>
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: SKIP
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: FAIL
ERROR - Unexpected rc code 0 and description The web server returned a bad status line: ''
ERROR - ------ FAILED: KVM_VirtualSystemSettingData INVALID_InstID_Keyval------
VirtualSystemSnapshotService - 01_enum.py: PASS
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS
16 years, 6 months
[PATCH] [TEST] modified the changeset number and add branch of err exp in RAFP.03
by Guo Lian Yun
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1209518087 25200
# Node ID 4262862cb05d918bc8516e4528918a0b65f5232a
# Parent b3969776fb077e2575effe7cd3c914778d86b63c
[TEST] modified the changeset number and add branch of err exp in RAFP.03
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b3969776fb07 -r 4262862cb05d suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Tue Apr 29 01:44:18 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourceAllocationFromPool/03_forward_errs.py Tue Apr 29 18:14:47 2008 -0700
@@ -28,12 +28,10 @@ from CimTest import Globals
from CimTest import Globals
from CimTest.Globals import logger, do_main
from CimTest.ReturnCodes import PASS, FAIL, XFAIL
+from XenKvmLib.const import CIM_REV
sup_types = ['Xen', 'XenFV', 'KVM']
-
-exp_rc = 6 #CIM_ERR_NOT_FOUND
-exp_desc = "No such instance (wrong) - resource pool type mismatch"
-
+rev = 417
@do_main(sup_types)
def main():
@@ -47,6 +45,13 @@ def main():
conn = assoc.myWBEMConnection('http://%s' % options.ip,
(Globals.CIM_USER, Globals.CIM_PASS),
Globals.CIM_NS)
+
+ exp_rc = 6 #CIM_ERR_NOT_FOUND
+ exp_desc = "No such instance (wrong) - resource pool type mismatch"
+ if CIM_REV < rev:
+ exp_rc = 1 # CIM_ERR_FAILED
+ exp_desc = "Invalid InstanceID or unsupported pool type"
+
for k, v in poollist.items():
instanceref = CIMInstanceName(k,
keybindings = {"InstanceID" : v})
16 years, 6 months
[PATCH] [TEST] Making use of the lib fn conf_file(), cleanup_restore() and create_diskpool_file()
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1208960298 -19800
# Node ID 70e13e2a2abf57a666c8e4d5029d06ecd017ea69
# Parent 0123ff5809dc099c0b7840fce65eca5bce0921e6
[TEST] Making use of the lib fn conf_file(), cleanup_restore() and create_diskpool_file().
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 0123ff5809dc -r 70e13e2a2abf suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Wed Apr 23 19:40:48 2008 +0530
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/02_reverse.py Wed Apr 23 19:48:18 2008 +0530
@@ -59,6 +59,9 @@ from XenKvmLib.test_xml import testxml_b
from XenKvmLib.test_xml import testxml_bridge
from XenKvmLib.test_doms import test_domain_function, destroy_and_undefine_all
from VirtLib.live import network_by_bridge
+from XenKvmLib.common_util import cleanup_restore, test_dpath, \
+create_diskpool_file
+
sup_types = ['Xen']
@@ -68,42 +71,9 @@ test_mem = 128
test_mem = 128
test_vcpus = 4
test_disk = "xvdb"
-test_dpath = "foo"
-disk_file = '/tmp/diskpool.conf'
-back_disk_file = disk_file + "." + "02_reverse"
diskid = "%s/%s" % ("DiskPool", test_dpath)
memid = "%s/%s" % ("MemoryPool", 0)
procid = "%s/%s" % ("ProcessorPool", 0)
-
-def conf_file():
- """
- Creating diskpool.conf file.
- """
- try:
- f = open(disk_file, 'w')
- f.write('%s %s' % (test_dpath, '/'))
- f.close()
- except Exception,detail:
- Globals.logger.error("Exception: %s", detail)
- status = SKIP
- sys.exit(status)
-
-def clean_up_restore(ip):
- """
- Restoring back the original diskpool.conf
- file.
- """
- try:
- if os.path.exists(back_disk_file):
- os.remove(disk_file)
- move_file(back_disk_file, disk_file)
- except Exception, detail:
- Globals.logger.error("Exception: %s", detail)
- status = SKIP
- ret = test_domain_function(test_dom, ip, \
- cmd = "destroy")
- sys.exit(status)
-
def get_or_bail(ip, id, pool_class):
"""
@@ -116,10 +86,9 @@ def get_or_bail(ip, id, pool_class):
except Exception, detail:
Globals.logger.error(Globals.CIM_ERROR_GETINSTANCE, '%s', pool_class)
Globals.logger.error("Exception: %s", detail)
- clean_up_restore(ip)
+ cleanup_restore()
status = FAIL
- ret = test_domain_function(test_dom, ip, \
- cmd = "destroy")
+ ret = test_domain_function(test_dom, ip, cmd = "destroy")
sys.exit(status)
return instance
@@ -133,19 +102,19 @@ def init_list(ip, disk, mem, net, proc):
"""
pllist = {
- "Xen_DiskPool" : disk.InstanceID, \
- "Xen_MemoryPool" : mem.InstanceID, \
- "Xen_NetworkPool" : net.InstanceID, \
+ "Xen_DiskPool" : disk.InstanceID,
+ "Xen_MemoryPool" : mem.InstanceID,
+ "Xen_NetworkPool" : net.InstanceID,
"Xen_ProcessorPool": proc.InstanceID
}
cllist = [
- "Xen_LogicalDisk", \
- "Xen_Memory", \
- "Xen_NetworkPort", \
+ "Xen_LogicalDisk",
+ "Xen_Memory",
+ "Xen_NetworkPort",
"Xen_Processor"
]
- prop_list = ["%s/%s" % (test_dom, test_disk), test_disk, \
- "%s/%s" % (test_dom, "mem"), test_mem, \
+ prop_list = ["%s/%s" % (test_dom, test_disk), test_disk,
+ "%s/%s" % (test_dom, "mem"), test_mem,
"%s/%s" % (test_dom, test_mac), test_mac
]
proc_prop = []
@@ -166,8 +135,8 @@ def get_spec_fields_list(inst_list, fiel
global status
specific_fields = { }
if (len(inst_list)) != 1:
- Globals.logger.error("Got %s record for Memory/Network/LogicalDisk instead of \
-1", len(inst_list))
+ Globals.logger.error("Got %s record for Memory/Network/LogicalDisk \
+ instead of 1", len(inst_list))
status = FAIL
return
# verifying the Name field for LogicalDisk
@@ -181,7 +150,7 @@ 1", len(inst_list))
else:
field_value = ((int(inst_list[0]['NumberOfBlocks'])*4096)/1024)
specific_fields = {
- "field_name" : field_name,\
+ "field_name" : field_name,
"field_value" : field_value
}
except Exception, detail:
@@ -254,43 +223,39 @@ def main():
Globals.logger.error("Failed to Create the dom: %s", test_dom)
return FAIL
- # Taking care of already existing diskconf file
- # Creating diskpool.conf if it does not exist
- # Otherwise backing up the prev file and create new one.
- os.system("rm -f %s" % back_disk_file )
- if not (os.path.exists(disk_file)):
- conf_file()
- else:
- move_file(disk_file, back_disk_file)
- conf_file()
+ # Verify DiskPool on machine
+ status = create_diskpool_file()
+ if status != PASS:
+ ret = test_domain_function(test_dom, server, cmd = "destroy")
+ return status
+
try :
- disk = get_or_bail(server, id=diskid, \
- pool_class=enumclass.Xen_DiskPool)
- mem = get_or_bail(server, id = memid, \
+ disk = get_or_bail(server, id=diskid, pool_class=enumclass.Xen_DiskPool)
+ mem = get_or_bail(server, id = memid,
pool_class=enumclass.Xen_MemoryPool)
netid = "%s/%s" % ("NetworkPool", virt_network)
- net = get_or_bail(server, id = netid, \
+ net = get_or_bail(server, id = netid,
pool_class=enumclass.Xen_NetworkPool)
- proc = get_or_bail(server, id = procid, \
+ proc = get_or_bail(server, id = procid,
pool_class=enumclass.Xen_ProcessorPool)
except Exception, detail:
Globals.logger.error("Exception: %s", detail)
- clean_up_restore(server)
+ cleanup_restore()
status = FAIL
- ret = test_domain_function(test_dom, server, \
- cmd = "destroy")
+ ret = test_domain_function(test_dom, server, cmd = "destroy")
return status
- pllist, cllist, prop_list, proc_prop = init_list(server, disk, mem, net, proc)
+ pllist, cllist, prop_list, proc_prop = init_list(server, disk, mem, net,
+ proc)
# Looping through the pllist to get association for various pools.
for cn, instid in sorted(pllist.items()):
try:
- assoc_info = assoc.Associators(server, \
- "Xen_ElementAllocatedFromPool", \
- cn, \
- InstanceID = instid)
+ assoc_info = assoc.Associators(server,
+ "Xen_ElementAllocatedFromPool",
+ cn,
+ InstanceID = instid)
# Verifying the Creation Class name for all the records returned for each
# pool class queried
inst_list = get_inst_for_dom(assoc_info)
@@ -300,16 +265,16 @@ the specified domain: %s", test_dom)
status = FAIL
break
- assoc_values(assoc_list=inst_list, field="CreationClassName", \
- list=cllist, \
- index=loop)
+ assoc_values(assoc_list=inst_list, field="CreationClassName",
+ list=cllist,
+ index=loop)
# verifying the DeviceID
if inst_list[0]['CreationClassName'] == 'Xen_Processor':
# The DeviceID for the processor varies from 0 to (vcpu - 1 )
list_index = 0
- assoc_values(assoc_list=inst_list, field="DeviceID", \
- list=proc_prop, \
- index=list_index)
+ assoc_values(assoc_list=inst_list, field="DeviceID",
+ list=proc_prop,
+ index=list_index)
else:
# For LogicalDisk, Memory and NetworkPort
if inst_list[0]['CreationClassName'] == 'Xen_LogicalDisk':
@@ -318,40 +283,41 @@ the specified domain: %s", test_dom)
list_index = 2
else:
list_index = 4 # NetworkPort
- assoc_values(assoc_list=inst_list, field="DeviceID", \
- list=prop_list, \
- index=list_index)
+ assoc_values(assoc_list=inst_list, field="DeviceID",
+ list=prop_list,
+ index=list_index)
if inst_list[0]['CreationClassName'] == 'Xen_LogicalDisk':
# verifying the Name field for LogicalDisk
- specific_fields = get_spec_fields_list(inst_list,field_name="Name")
+ specific_fields = get_spec_fields_list(inst_list, field_name="Name")
list_index = 1
elif inst_list[0]['CreationClassName'] == 'Xen_Memory':
# verifying the NumberOfBlocks allocated for Memory
- specific_fields = get_spec_fields_list(inst_list,field_name="NumberOfBlocks")
+ specific_fields = get_spec_fields_list(inst_list,
+ field_name="NumberOfBlocks")
list_index = 3
else:
# verifying the NetworkAddresses for the NetworkPort
- specific_fields = get_spec_fields_list(inst_list,field_name="NetworkAddresses")
+ specific_fields = get_spec_fields_list(inst_list,
+ field_name="NetworkAddresses")
list_index = 5 # NetworkPort
- assoc_values(assoc_list=inst_list, field="Other", \
- list=prop_list, \
- index=list_index, \
- specific_fields_list=specific_fields)
+ assoc_values(assoc_list=inst_list, field="Other",
+ list=prop_list,
+ index=list_index,
+ specific_fields_list=specific_fields)
if status != PASS:
break
else:
# The loop variable is used to index the cllist to verify the creationclassname
loop = loop + 1
except Exception, detail:
- Globals.logger.error(Globals.CIM_ERROR_ASSOCIATORS, \
+ Globals.logger.error(Globals.CIM_ERROR_ASSOCIATORS,
'Xen_ElementAllocatedFromPool')
Globals.logger.error("Exception: %s", detail)
- clean_up_restore(server)
+ cleanup_restore()
status = FAIL
- ret = test_domain_function(test_dom, server, \
- cmd = "destroy")
- clean_up_restore(server)
+ ret = test_domain_function(test_dom, server, cmd = "destroy")
+ cleanup_restore()
return status
if __name__ == "__main__":
sys.exit(main())
diff -r 0123ff5809dc -r 70e13e2a2abf suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Wed Apr 23 19:40:48 2008 +0530
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Wed Apr 23 19:48:18 2008 +0530
@@ -40,18 +40,17 @@ from CimTest.Globals import do_main, pla
from CimTest.Globals import do_main, platform_sup
from XenKvmLib.vxml import get_class
from XenKvmLib.classes import get_typed_class
+from XenKvmLib.common_util import cleanup_restore, test_dpath, \
+create_diskpool_file
bug_no = "88651"
test_dom = "hd_domain"
test_mac = "00:11:22:33:44:aa"
test_vcpus = 1
-id1 = "DiskPool/foo"
+id1 = "DiskPool/test_dpath"
id2 = "MemoryPool/0"
id3 = "NetworkPool/xenbr0"
id4 = "ProcessorPool/0"
-test_dpath = "foo"
-disk_file = '/tmp/diskpool.conf'
-back_disk_file = disk_file + "." + "02_reverse"
expr_values = {
"invalid_keyname" : {
'rc' : pywbem.CIM_ERR_FAILED, \
@@ -62,34 +61,6 @@ expr_values = {
'desc' : 'No such instance'
}
}
-
-def conf_file():
- """
- Creating diskpool.conf file.
- """
- try:
- f = open(disk_file, 'w')
- f.write('%s %s' % (test_dpath, '/'))
- f.close()
- except Exception,detail:
- Globals.logger.error("Exception: %s", detail)
- status = FAIL
- sys.exit(status)
-
-def clean_up_restore(ip):
- """
- Restoring back the original diskpool.conf
- file.
- """
- try:
- if os.path.exists(back_disk_file):
- os.remove(disk_file)
- move_file(back_disk_file, disk_file)
- except Exception, detail:
- Globals.logger.error("Exception: %s", detail)
- status = FAIL
- vsxml.undefine(ip)
- sys.exit(status)
def err_invalid_ccname():
# This is used to verify the that the
@@ -212,14 +183,12 @@ def main():
vsxml = get_class(virt)(test_dom, vcpus = test_vcpus, mac = test_mac, \
disk = test_disk)
- if (os.path.exists(back_disk_file)):
- os.unlink(back_disk_file)
+ # Verify DiskPool on machine
+ status = create_diskpool_file()
+ if status != PASS:
+ ret = test_domain_function(test_dom, server, cmd = "destroy")
+ return status
- if not (os.path.exists(disk_file)):
- conf_file()
- else:
- move_file(disk_file, back_disk_file)
- conf_file()
ret = vsxml.define(options.ip)
if not ret:
Globals.logger.error("Failed to define the dom: %s", test_dom)
@@ -240,7 +209,7 @@ def main():
if ret:
Globals.logger.error("------FAILED: Invalid CCName.------")
return ret
- clean_up_restore(options.ip)
+ cleanup_restore()
vsxml.undefine(options.ip)
return PASS
if __name__ == "__main__":
diff -r 0123ff5809dc -r 70e13e2a2abf suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Wed Apr 23 19:40:48 2008 +0530
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Wed Apr 23 19:48:18 2008 +0530
@@ -41,6 +41,8 @@ from CimTest.Globals import do_main, pla
from CimTest.Globals import do_main, platform_sup
from XenKvmLib.vxml import get_class
from XenKvmLib.classes import get_typed_class
+from XenKvmLib.common_util import cleanup_restore, test_dpath, \
+create_diskpool_file
sup_types = ['Xen', 'KVM', 'XenFV']
bug_no = "88651"
@@ -49,49 +51,16 @@ test_mac = "00:11:22:33:44:aa"
test_mac = "00:11:22:33:44:aa"
test_vcpus = 1
exp_list = [
- {'desc' : "No such instance (SystemName)", 'rc' : pywbem.CIM_ERR_NOT_FOUND}, \
- {'desc' : "No DeviceID specified", 'rc' : pywbem.CIM_ERR_FAILED}, \
- {'desc' : "No such instance", 'rc' : pywbem.CIM_ERR_NOT_FOUND}, \
- {'desc' : "One or more parameter values passed to the method were invalid", \
- 'rc' : pywbem.CIM_ERR_INVALID_PARAMETER}, \
- {'desc' : "No such instance (CreationClassName)", 'rc' : pywbem.CIM_ERR_NOT_FOUND }, \
- {'desc' : "No such instance (SystemCreationClassName)", 'rc' : \
- pywbem.CIM_ERR_NOT_FOUND },
+ {'desc' : "No such instance (SystemName)", 'rc' : pywbem.CIM_ERR_NOT_FOUND},
+ {'desc' : "No DeviceID specified", 'rc' : pywbem.CIM_ERR_FAILED},
+ {'desc' : "No such instance", 'rc' : pywbem.CIM_ERR_NOT_FOUND},
+ {'desc' : "CIM_ERR_INVALID_PARAMETER",
+ 'rc' : pywbem.CIM_ERR_INVALID_PARAMETER},
+ {'desc' : "No such instance (CreationClassName)",
+ 'rc' : pywbem.CIM_ERR_NOT_FOUND },
+ {'desc' : "No such instance (SystemCreationClassName)",
+ 'rc' : pywbem.CIM_ERR_NOT_FOUND },
]
-
-
-test_dpath = "foo"
-disk_file = '/tmp/diskpool.conf'
-back_disk_file = disk_file + "." + "02_reverse"
-
-
-def conf_file():
- """
- Creating diskpool.conf file.
- """
- try:
- f = open(disk_file, 'w')
- f.write('%s %s' % (test_dpath, '/'))
- f.close()
- except Exception,detail:
- Globals.logger.error("Exception: %s", detail)
- status = FAIL
- sys.exit(status)
-
-def clean_up_restore(ip):
- """
- Restoring back the original diskpool.conf
- file.
- """
- try:
- if os.path.exists(back_disk_file):
- os.remove(disk_file)
- move_file(back_disk_file, disk_file)
- except Exception, detail:
- Globals.logger.error("Exception: %s", detail)
- status = FAIL
- vsxml.undefine(ip)
- sys.exit(status)
def try_assoc(conn, exp_ret, dev_dom_name, invalid_keyname_list, test_vals, log_msg):
@@ -102,9 +71,9 @@ def try_assoc(conn, exp_ret, dev_dom_nam
procid = "%s/%s" % (dev_dom_name, 0)
lelist = {
- get_typed_class(virt, "LogicalDisk") : diskid, \
- get_typed_class(virt, "NetworkPort") : netid, \
- get_typed_class(virt, "Memory" ) : memid, \
+ get_typed_class(virt, "LogicalDisk") : diskid,
+ get_typed_class(virt, "NetworkPort") : netid,
+ get_typed_class(virt, "Memory" ) : memid,
get_typed_class(virt, "Processor" ) : procid
}
@@ -125,9 +94,9 @@ def try_assoc(conn, exp_ret, dev_dom_nam
else:
snkeyname = "SystemName"
- test_keys = { devkeyname : devkeyname, \
- ccnkeyname : ccnkeyname, \
- sccnkeyname : sccnkeyname, \
+ test_keys = { devkeyname : devkeyname,
+ ccnkeyname : ccnkeyname,
+ sccnkeyname : sccnkeyname,
snkeyname : snkeyname
}
for cn, devid in sorted(lelist.items()):
@@ -142,10 +111,10 @@ def try_assoc(conn, exp_ret, dev_dom_nam
else:
ccn = cn
- keys = { test_keys[devkeyname] : dev_id, \
- test_keys[ccnkeyname] : ccn, \
- test_keys[sccnkeyname] : test_vals['sccn'], \
- test_keys[snkeyname] : test_vals['sn']
+ keys = { test_keys[devkeyname] : dev_id,
+ test_keys[ccnkeyname] : ccn,
+ test_keys[sccnkeyname] : test_vals['sccn'],
+ test_keys[snkeyname] : test_vals['sn']
}
if test_vals['cn'] != "valid":
@@ -154,8 +123,8 @@ def try_assoc(conn, exp_ret, dev_dom_nam
inst_cn = cn
instanceref = CIMInstanceName(inst_cn, keybindings=keys)
try:
- assoc_info = conn.AssociatorNames(instanceref, \
- AssocClass=assoc_classname)
+ assoc_info = conn.AssociatorNames(instanceref,
+ AssocClass=assoc_classname)
except pywbem.CIMError, (err_no, desc):
if err_no == exp_ret['rc'] and desc.find(exp_ret['desc']) >= 0:
logger.info("Got expected exception where ")
@@ -196,22 +165,21 @@ def err_invalid_sysname_keyname(conn, ex
#
#
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "invalid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "invalid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid SystemName Key Name was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_sysname_keyvalue(conn, exp_ret):
@@ -232,22 +200,21 @@ def err_invalid_sysname_keyvalue(conn, e
#
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : "invalid", \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : "invalid",
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Non-existing SystemName was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_devid_keyname(conn, exp_ret):
# This is used to verify the that the
@@ -271,22 +238,21 @@ def err_invalid_devid_keyname(conn, exp_
#
#
- test_keys = { 'DeviceID' : "invalid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "invalid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid deviceid keyname was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_devid_keyvalue(conn, exp_ret):
@@ -309,22 +275,22 @@ def err_invalid_devid_keyvalue(conn, exp
# Similarly we check for Network.
#
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "invalid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "invalid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid deviceid keyvalue was supplied."
- return try_assoc(conn, exp_ret, test_dom_invalid, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom_invalid, test_keys, test_vals,
+ log_msg)
def err_invalid_classname(conn, exp_ret):
@@ -348,22 +314,21 @@ def err_invalid_classname(conn, exp_ret)
# Similarly we check for Memory,Network,Processor.
#
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "invalid"
}
log_msg = "Invalid classname value was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_creationclassname_keyname(conn, exp_ret):
@@ -388,22 +353,21 @@ def err_invalid_creationclassname_keynam
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "invalid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "invalid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid creationclassname keyname was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_creationclassname_keyvalue(conn, exp_ret):
@@ -426,22 +390,21 @@ def err_invalid_creationclassname_keyval
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "invalid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "invalid",
'cn' : "valid"
}
log_msg = "Invalid creatioclassname keyvalue was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_syscreationclassname_keyname(conn, exp_ret):
@@ -464,22 +427,21 @@ def err_invalid_syscreationclassname_key
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "invalid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "invalid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid system creatioclassname keyvalue was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_syscreationclassname_keyvalue(conn, exp_ret):
@@ -502,22 +464,21 @@ def err_invalid_syscreationclassname_key
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : "invalid", \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : "invalid",
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid system creatioclassname keyvalue was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
@do_main(platform_sup)
def main():
@@ -539,14 +500,11 @@ def main():
destroy_and_undefine_all(options.ip)
vsxml = get_class(virt)(test_dom, vcpus = test_vcpus, mac = test_mac, \
disk = test_disk)
- if (os.path.exists(back_disk_file)):
- os.unlink(back_disk_file)
+ # Verify DiskPool on machine
+ status = create_diskpool_file()
+ if status != PASS:
+ return status
- if not (os.path.exists(disk_file)):
- conf_file()
- else:
- move_file(disk_file, back_disk_file)
- conf_file()
bridge = vsxml.set_vbridge(options.ip)
ret = vsxml.define(options.ip)
if not ret:
@@ -599,7 +557,7 @@ Keyname.------")
Globals.logger.error("------FAILED: Invalid System creationclassname\
Keyvalue.------")
return ret
- clean_up_restore(options.ip)
+ cleanup_restore()
vsxml.undefine(options.ip)
return PASS
if __name__ == "__main__":
16 years, 6 months
[PATCH] [TEST] #2 updating 03_reverse_errs.py, 04_forward_errs.py
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1209557135 25200
# Node ID e6d5ae1eac5c3b25441f77ecb40c074efacee1a3
# Parent b3969776fb077e2575effe7cd3c914778d86b63c
[TEST] #2 updating 03_reverse_errs.py, 04_forward_errs.py
1) To use lib fn conf_file(), cleanup_restore() and create_diskpool_file()
2) Addressed Indentation.
3) Tested on latest source for Xen, XenFV, KVM.
4) Tested with binary rpm on F9 and include the revision string for 03_reverse_errs.py.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r b3969776fb07 -r e6d5ae1eac5c suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Tue Apr 29 01:44:18 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/03_reverse_errs.py Wed Apr 30 05:05:35 2008 -0700
@@ -29,67 +29,38 @@
# Date : 30-12-2007
import sys
-import os
-from distutils.file_util import move_file
import pywbem
from XenKvmLib import assoc
from CimTest import Globals
from XenKvmLib.test_doms import destroy_and_undefine_all
from XenKvmLib.common_util import try_assoc
+from XenKvmLib.const import CIM_REV
from CimTest.ReturnCodes import PASS, FAIL
-from CimTest.Globals import do_main, platform_sup
+from CimTest.Globals import do_main, platform_sup, logger
from XenKvmLib.vxml import get_class
from XenKvmLib.classes import get_typed_class
+from XenKvmLib.common_util import cleanup_restore, test_dpath, \
+create_diskpool_file
bug_no = "88651"
test_dom = "hd_domain"
test_mac = "00:11:22:33:44:aa"
test_vcpus = 1
-id1 = "DiskPool/foo"
+id1 = "DiskPool/%s" %test_dpath
id2 = "MemoryPool/0"
id3 = "NetworkPool/xenbr0"
id4 = "ProcessorPool/0"
-test_dpath = "foo"
-disk_file = '/tmp/diskpool.conf'
-back_disk_file = disk_file + "." + "02_reverse"
expr_values = {
"invalid_keyname" : {
- 'rc' : pywbem.CIM_ERR_FAILED, \
+ 'rc' : pywbem.CIM_ERR_FAILED,
'desc' : 'Missing InstanceID'
- }, \
+ },
"invalid_keyvalue" : {
- 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
+ 'rc' : pywbem.CIM_ERR_NOT_FOUND,
'desc' : 'No such instance'
}
}
-
-def conf_file():
- """
- Creating diskpool.conf file.
- """
- try:
- f = open(disk_file, 'w')
- f.write('%s %s' % (test_dpath, '/'))
- f.close()
- except Exception,detail:
- Globals.logger.error("Exception: %s", detail)
- status = FAIL
- sys.exit(status)
-
-def clean_up_restore(ip):
- """
- Restoring back the original diskpool.conf
- file.
- """
- try:
- if os.path.exists(back_disk_file):
- os.remove(disk_file)
- move_file(back_disk_file, disk_file)
- except Exception, detail:
- Globals.logger.error("Exception: %s", detail)
- status = FAIL
- vsxml.undefine(ip)
- sys.exit(status)
+libvirt_rev = 393
def err_invalid_ccname():
# This is used to verify the that the
@@ -118,9 +89,9 @@ def err_invalid_ccname():
for classname, instdid in sorted(lelist.items()):
keys = { "InstanceID" : instdid}
- field = "ClassName"
- status = try_assoc(conn, classname, assoc_classname, keys, field_name=field, \
- expr_values=expr_values['invalid_keyvalue'], bug_no="")
+ field = "InvalidClassName"
+ status = try_assoc(conn, classname, assoc_classname, keys, field_name=field,
+ expr_values=expr_values['invalid_keyvalue'],bug_no=bug_no)
if status != PASS:
break
return status
@@ -153,8 +124,8 @@ def err_invalid_keyname():
for classname, instdid in sorted(lelist.items()):
keys = { "InvalidID" : instdid }
field = "InstanceID_KeyName"
- status = try_assoc(conn, classname, assoc_classname, keys, field_name=field, \
- expr_values=expr_values['invalid_keyname'], bug_no="")
+ status = try_assoc(conn, classname, assoc_classname, keys, field_name=field,
+ expr_values=expr_values['invalid_keyname'], bug_no="")
if status != PASS:
break
return status
@@ -186,14 +157,23 @@ def err_invalid_keyvalue():
get_typed_class(virt, "ProcessorPool")
]
+ if CIM_REV < libvirt_rev:
+ expr_values['invalid_keyvalue']['desc'] = 'Invalid InstanceID or unsupported pool type'
+ expr_values['invalid_keyvalue']['rc'] = pywbem.CIM_ERR_FAILED
+
for classname in sorted(lelist):
keys = { "InstanceID" : "InvalidKeyValue" }
field = "InstanceID_KeyValue"
- status = try_assoc(conn, classname, assoc_classname, keys, field_name=field, \
- expr_values=expr_values['invalid_keyvalue'], bug_no="")
+ status = try_assoc(conn, classname, assoc_classname, keys, field_name=field,
+ expr_values=expr_values['invalid_keyvalue'], bug_no="")
if status != PASS:
break
return status
+
+def clean_and_exit(server, msg):
+ logger.error("------FAILED: Invalid %s.------", msg)
+ cleanup_restore()
+ vsxml.undefine(server)
@do_main(platform_sup)
def main():
@@ -209,38 +189,38 @@ def main():
test_disk = "xvda"
else:
test_disk = "hda"
+ virt_type = get_class(virt)
+ vsxml = virt_type (test_dom, vcpus = test_vcpus, mac = test_mac,
+ disk = test_disk)
- vsxml = get_class(virt)(test_dom, vcpus = test_vcpus, mac = test_mac, \
- disk = test_disk)
- if (os.path.exists(back_disk_file)):
- os.unlink(back_disk_file)
-
- if not (os.path.exists(disk_file)):
- conf_file()
- else:
- move_file(disk_file, back_disk_file)
- conf_file()
+ # Verify DiskPool on machine
+ status = create_diskpool_file()
+ if status != PASS:
+ return status
ret = vsxml.define(options.ip)
if not ret:
- Globals.logger.error("Failed to define the dom: %s", test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
conn = assoc.myWBEMConnection('http://%s' % options.ip,
- (Globals.CIM_USER, Globals.CIM_PASS),
- Globals.CIM_NS)
+ (Globals.CIM_USER, Globals.CIM_PASS),
+ Globals.CIM_NS)
assoc_classname = get_typed_class(virt, "ElementAllocatedFromPool")
ret = err_invalid_keyname()
- if ret:
- Globals.logger.error("------FAILED: Invalid KeyName.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "KeyName")
return ret
+
ret = err_invalid_keyvalue()
- if ret:
- Globals.logger.error("------FAILED: Invalid KeyValue.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "KeyValue")
return ret
+
ret = err_invalid_ccname()
- if ret:
- Globals.logger.error("------FAILED: Invalid CCName.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "CCName")
return ret
- clean_up_restore(options.ip)
+
+ cleanup_restore()
vsxml.undefine(options.ip)
return PASS
if __name__ == "__main__":
diff -r b3969776fb07 -r e6d5ae1eac5c suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py
--- a/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Tue Apr 29 01:44:18 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementAllocatedFromPool/04_forward_errs.py Wed Apr 30 05:05:35 2008 -0700
@@ -29,8 +29,6 @@
#
import sys
-import os
-from distutils.file_util import move_file
import pywbem
from pywbem.cim_obj import CIMInstanceName
from XenKvmLib import assoc
@@ -41,6 +39,8 @@ from CimTest.Globals import do_main, pla
from CimTest.Globals import do_main, platform_sup
from XenKvmLib.vxml import get_class
from XenKvmLib.classes import get_typed_class
+from XenKvmLib.common_util import cleanup_restore, test_dpath, \
+create_diskpool_file
sup_types = ['Xen', 'KVM', 'XenFV']
bug_no = "88651"
@@ -49,49 +49,16 @@ test_mac = "00:11:22:33:44:aa"
test_mac = "00:11:22:33:44:aa"
test_vcpus = 1
exp_list = [
- {'desc' : "No such instance (SystemName)", 'rc' : pywbem.CIM_ERR_NOT_FOUND}, \
- {'desc' : "No DeviceID specified", 'rc' : pywbem.CIM_ERR_FAILED}, \
- {'desc' : "No such instance", 'rc' : pywbem.CIM_ERR_NOT_FOUND}, \
- {'desc' : "One or more parameter values passed to the method were invalid", \
- 'rc' : pywbem.CIM_ERR_INVALID_PARAMETER}, \
- {'desc' : "No such instance (CreationClassName)", 'rc' : pywbem.CIM_ERR_NOT_FOUND }, \
- {'desc' : "No such instance (SystemCreationClassName)", 'rc' : \
- pywbem.CIM_ERR_NOT_FOUND },
+ {'desc' : "No such instance (SystemName)", 'rc' : pywbem.CIM_ERR_NOT_FOUND},
+ {'desc' : "No DeviceID specified", 'rc' : pywbem.CIM_ERR_FAILED},
+ {'desc' : "No such instance", 'rc' : pywbem.CIM_ERR_NOT_FOUND},
+ {'desc' : "CIM_ERR_INVALID_PARAMETER",
+ 'rc' : pywbem.CIM_ERR_INVALID_PARAMETER},
+ {'desc' : "No such instance (CreationClassName)",
+ 'rc' : pywbem.CIM_ERR_NOT_FOUND },
+ {'desc' : "No such instance (SystemCreationClassName)",
+ 'rc' : pywbem.CIM_ERR_NOT_FOUND },
]
-
-
-test_dpath = "foo"
-disk_file = '/tmp/diskpool.conf'
-back_disk_file = disk_file + "." + "02_reverse"
-
-
-def conf_file():
- """
- Creating diskpool.conf file.
- """
- try:
- f = open(disk_file, 'w')
- f.write('%s %s' % (test_dpath, '/'))
- f.close()
- except Exception,detail:
- Globals.logger.error("Exception: %s", detail)
- status = FAIL
- sys.exit(status)
-
-def clean_up_restore(ip):
- """
- Restoring back the original diskpool.conf
- file.
- """
- try:
- if os.path.exists(back_disk_file):
- os.remove(disk_file)
- move_file(back_disk_file, disk_file)
- except Exception, detail:
- Globals.logger.error("Exception: %s", detail)
- status = FAIL
- vsxml.undefine(ip)
- sys.exit(status)
def try_assoc(conn, exp_ret, dev_dom_name, invalid_keyname_list, test_vals, log_msg):
@@ -102,9 +69,9 @@ def try_assoc(conn, exp_ret, dev_dom_nam
procid = "%s/%s" % (dev_dom_name, 0)
lelist = {
- get_typed_class(virt, "LogicalDisk") : diskid, \
- get_typed_class(virt, "NetworkPort") : netid, \
- get_typed_class(virt, "Memory" ) : memid, \
+ get_typed_class(virt, "LogicalDisk") : diskid,
+ get_typed_class(virt, "NetworkPort") : netid,
+ get_typed_class(virt, "Memory" ) : memid,
get_typed_class(virt, "Processor" ) : procid
}
@@ -125,9 +92,9 @@ def try_assoc(conn, exp_ret, dev_dom_nam
else:
snkeyname = "SystemName"
- test_keys = { devkeyname : devkeyname, \
- ccnkeyname : ccnkeyname, \
- sccnkeyname : sccnkeyname, \
+ test_keys = { devkeyname : devkeyname,
+ ccnkeyname : ccnkeyname,
+ sccnkeyname : sccnkeyname,
snkeyname : snkeyname
}
for cn, devid in sorted(lelist.items()):
@@ -142,20 +109,19 @@ def try_assoc(conn, exp_ret, dev_dom_nam
else:
ccn = cn
- keys = { test_keys[devkeyname] : dev_id, \
- test_keys[ccnkeyname] : ccn, \
- test_keys[sccnkeyname] : test_vals['sccn'], \
- test_keys[snkeyname] : test_vals['sn']
+ keys = { test_keys[devkeyname] : dev_id,
+ test_keys[ccnkeyname] : ccn,
+ test_keys[sccnkeyname] : test_vals['sccn'],
+ test_keys[snkeyname] : test_vals['sn']
}
-
if test_vals['cn'] != "valid":
inst_cn = "InvalidClassName"
else:
inst_cn = cn
instanceref = CIMInstanceName(inst_cn, keybindings=keys)
try:
- assoc_info = conn.AssociatorNames(instanceref, \
- AssocClass=assoc_classname)
+ assoc_info = conn.AssociatorNames(instanceref,
+ AssocClass=assoc_classname)
except pywbem.CIMError, (err_no, desc):
if err_no == exp_ret['rc'] and desc.find(exp_ret['desc']) >= 0:
logger.info("Got expected exception where ")
@@ -196,22 +162,21 @@ def err_invalid_sysname_keyname(conn, ex
#
#
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "invalid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "invalid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid SystemName Key Name was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_sysname_keyvalue(conn, exp_ret):
@@ -232,22 +197,21 @@ def err_invalid_sysname_keyvalue(conn, e
#
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : "invalid", \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : "invalid",
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Non-existing SystemName was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_devid_keyname(conn, exp_ret):
# This is used to verify the that the
@@ -271,22 +235,21 @@ def err_invalid_devid_keyname(conn, exp_
#
#
- test_keys = { 'DeviceID' : "invalid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "invalid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid deviceid keyname was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_devid_keyvalue(conn, exp_ret):
@@ -309,22 +272,22 @@ def err_invalid_devid_keyvalue(conn, exp
# Similarly we check for Network.
#
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "invalid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "invalid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid deviceid keyvalue was supplied."
- return try_assoc(conn, exp_ret, test_dom_invalid, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom_invalid, test_keys, test_vals,
+ log_msg)
def err_invalid_classname(conn, exp_ret):
@@ -348,22 +311,21 @@ def err_invalid_classname(conn, exp_ret)
# Similarly we check for Memory,Network,Processor.
#
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "invalid"
}
log_msg = "Invalid classname value was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_creationclassname_keyname(conn, exp_ret):
@@ -388,22 +350,21 @@ def err_invalid_creationclassname_keynam
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "invalid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "invalid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid creationclassname keyname was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_creationclassname_keyvalue(conn, exp_ret):
@@ -426,22 +387,21 @@ def err_invalid_creationclassname_keyval
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "invalid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "invalid",
'cn' : "valid"
}
log_msg = "Invalid creatioclassname keyvalue was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_syscreationclassname_keyname(conn, exp_ret):
@@ -464,22 +424,21 @@ def err_invalid_syscreationclassname_key
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "invalid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "invalid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : get_typed_class(virt, "ComputerSystem"), \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : get_typed_class(virt, "ComputerSystem"),
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid system creatioclassname keyvalue was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
def err_invalid_syscreationclassname_keyvalue(conn, exp_ret):
@@ -502,22 +461,26 @@ def err_invalid_syscreationclassname_key
# Similarly we check for Memory,Network,Processor.
#
- test_keys = { 'DeviceID' : "valid", \
- 'CreationClassName' : "valid", \
- 'SystemCreationClassName' : "valid", \
- 'SystemName' : "valid" \
+ test_keys = { 'DeviceID' : "valid",
+ 'CreationClassName' : "valid",
+ 'SystemCreationClassName' : "valid",
+ 'SystemName' : "valid"
}
- test_vals = { 'devid' : "valid", \
- 'sccn' : "invalid", \
- 'sn' : test_dom, \
- 'ccn' : "valid", \
+ test_vals = { 'devid' : "valid",
+ 'sccn' : "invalid",
+ 'sn' : test_dom,
+ 'ccn' : "valid",
'cn' : "valid"
}
log_msg = "Invalid system creatioclassname keyvalue was supplied."
- return try_assoc(conn, exp_ret, test_dom, test_keys, \
- test_vals, log_msg)
+ return try_assoc(conn, exp_ret, test_dom, test_keys, test_vals, log_msg)
+
+def clean_and_exit(server, msg):
+ logger.error("------FAILED: Invalid %s.------", msg)
+ cleanup_restore()
+ vsxml.undefine(server)
@do_main(platform_sup)
def main():
@@ -539,67 +502,67 @@ def main():
destroy_and_undefine_all(options.ip)
vsxml = get_class(virt)(test_dom, vcpus = test_vcpus, mac = test_mac, \
disk = test_disk)
- if (os.path.exists(back_disk_file)):
- os.unlink(back_disk_file)
+ # Verify DiskPool on machine
+ status = create_diskpool_file()
+ if status != PASS:
+ return status
- if not (os.path.exists(disk_file)):
- conf_file()
- else:
- move_file(disk_file, back_disk_file)
- conf_file()
bridge = vsxml.set_vbridge(options.ip)
ret = vsxml.define(options.ip)
if not ret:
- Globals.logger.error("Failed to define the dom: %s", test_dom)
+ logger.error("Failed to define the dom: %s", test_dom)
return FAIL
conn = assoc.myWBEMConnection('http://%s' % options.ip,
(Globals.CIM_USER, Globals.CIM_PASS),
Globals.CIM_NS)
assoc_classname = get_typed_class(virt, "ElementAllocatedFromPool")
+
ret = err_invalid_sysname_keyname(conn, exp_list[0])
- if ret:
- Globals.logger.error("------FAILED: Invalid SystemName Key Name.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "SystemName KeyName")
return ret
+
ret = err_invalid_sysname_keyvalue(conn, exp_list[0])
- if ret:
- Globals.logger.error("------FAILED: Invalid SystemName Key Value.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "SystemName Key Value")
return ret
+
ret = err_invalid_devid_keyname(conn, exp_list[1])
- if ret:
- Globals.logger.error("------FAILED: Invalid DeviceID \
-Keyname.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "DeviceID Keyname")
return ret
+
ret = err_invalid_devid_keyvalue(conn, exp_list[2])
- if ret:
- Globals.logger.error("------FAILED: Invalid DeviceID \
-Keyvalue.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "DeviceID Keyvalue")
return ret
+
ret = err_invalid_classname(conn, exp_list[3])
- if ret:
- Globals.logger.error("------FAILED: Invalid classname\
-Keyname.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "classname Keyname")
return ret
+
ret = err_invalid_creationclassname_keyname(conn, exp_list[4])
- if ret:
- Globals.logger.error("------FAILED: Invalid creationclassname\
-Keyname.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "creationclassname Keyname")
return ret
+
ret = err_invalid_creationclassname_keyvalue(conn, exp_list[4])
- if ret:
- Globals.logger.error("------FAILED: Invalid creationclassname\
-Keyvalue.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "creationclassname Keyvalue")
return ret
+
ret = err_invalid_syscreationclassname_keyname(conn, exp_list[5])
- if ret:
- Globals.logger.error("------FAILED: Invalid System creationclassname\
-Keyname.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "System creationclassname Keyname")
return ret
+
ret = err_invalid_syscreationclassname_keyvalue(conn, exp_list[5])
- if ret:
- Globals.logger.error("------FAILED: Invalid System creationclassname\
-Keyvalue.------")
+ if ret != PASS:
+ clean_and_exit(options.ip, "System creationclassname Keyvalue")
return ret
- clean_up_restore(options.ip)
+
+ cleanup_restore()
vsxml.undefine(options.ip)
return PASS
if __name__ == "__main__":
16 years, 6 months
[PATCH] [TEST] resent the patch for indication_tester.py to reflect the recent changes of libcmpiutil vesion
by Guo Lian Yun
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1209517619 25200
# Node ID 16f8e0e2e062dba78ac06d5226f0d620a152e5e1
# Parent b3969776fb077e2575effe7cd3c914778d86b63c
[TEST] resent the patch for indication_tester.py to reflect the recent changes of libcmpiutil vesion
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b3969776fb07 -r 16f8e0e2e062 suites/libvirt-cim/lib/XenKvmLib/indication_tester.py
--- a/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py Tue Apr 29 01:44:18 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py Tue Apr 29 18:06:59 2008 -0700
@@ -395,9 +395,9 @@ def main():
action="store_true",
help="Print received indications to stdout.")
parser.add_option("-U", "--user", dest="username", default=None,
- help="HTTP Auth username", dest="username")
+ help="HTTP Auth username")
parser.add_option("-P", "--pass", dest="password", default=None,
- help="HTTP Auth password", dest="password")
+ help="HTTP Auth password")
(options, args) = parser.parse_args()
16 years, 6 months
[PATCH] [TEST] modified the revision number to 417 and resent the patch of VSSDC.03
by Guo Lian Yun
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1209517323 25200
# Node ID cced18eccc5a4fde264f973d14dce154b6a750da
# Parent b3969776fb077e2575effe7cd3c914778d86b63c
[TEST] modified the revision number to 417 and resent the patch of VSSDC.03
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r b3969776fb07 -r cced18eccc5a suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Tue Apr 29 01:44:18 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/03_vssdc_fwd_errs.py Tue Apr 29 18:02:03 2008 -0700
@@ -62,12 +62,14 @@ from CimTest.ReturnCodes import PASS, FA
from CimTest.ReturnCodes import PASS, FAIL
from CimTest.Globals import do_main, logger
from CimTest.Globals import CIM_USER, CIM_PASS, CIM_NS
+from XenKvmLib.const import CIM_REV
sup_types = ['Xen', 'XenFV', 'KVM']
test_dom = "domu1"
test_mac = "00:11:22:33:44:aa"
test_vcpus = 1
+rev = 417
expr_values = {
"INVALID_InstID_Keyname" : { 'rc' : pywbem.CIM_ERR_FAILED, \
@@ -75,6 +77,10 @@ expr_values = {
"INVALID_InstID_Keyval" : { 'rc' : pywbem.CIM_ERR_NOT_FOUND, \
'desc' : 'No such instance (INVALID_InstID_Keyval)'}
}
+
+if CIM_REV < rev:
+ expr_values['INVALID_InstID_Keyval'] = {'rc' : pywbem.CIM_ERR_FAILED, \
+ 'desc' : 'Invalid InstanceID'}
def try_invalid_assoc(classname, name_val, i, field, virt="Xen"):
ac_classname = get_typed_class(virt, "VirtualSystemSettingDataComponent")
16 years, 6 months