KVM on sfcb Test Run Summary for Oct 29 2008
by Guo Lian Yun
=================================================
KVM on sfcb Test Run Summary for Oct 29 2008
=================================================
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: 727
Libvirt-cim changeset: 2df4433a1060
=================================================
FAIL : 5
XFAIL : 2
SKIP : 4
PASS : 127
-----------------
Total : 138
=================================================
FAIL Test Summary:
ComputerSystemIndication - 01_created_indication.py: FAIL
HostSystem - 02_hostsystem_to_rasd.py: FAIL
RedirectionService - 01_enum_crs.py: FAIL
RedirectionService - 02_enum_crscap.py: FAIL
SettingsDefineCapabilities - 03_forward_errs.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'Domain Operation Failed')
ERROR - Unable to 'Reboot' dom 'cs_test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Exception: (1, u'Domain Operation Failed')
ERROR - Unable to 'Reboot' dom 'test_domain' using
RequestedStateChange()
InvokeMethod(RequestStateChange): Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: FAIL
ERROR - Exception: not enough arguments for format string
Got indication: KVM_ComputerSystemCreatedIndication
ERROR - Received indication error: 256
ERROR - Exception: not enough arguments for format string
Got indication: KVM_ComputerSystemCreatedIndication
ERROR - Received indication error: 256
--------------------------------------------------------------------
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: FAIL
ERROR - KVM_SettingsDefineState returned 0
KVM_DisplayController objects
Class not found
--------------------------------------------------------------------
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: FAIL
ERROR - 'KVM_ConsoleRedirectionService' returned 0 records,
expected 1
Class not found
*** Inconsistent provider registration for Virt_ConsoleRedirectionService
(2)
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: FAIL
ERROR - 'KVM_ConsoleRedirectionServiceCapabilities' returned 0
records, expected 1
*** Inconsistent provider registration for
Virt_ConsoleRedirectionServiceCapabilities (2)
--------------------------------------------------------------------
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: FAIL
ERROR - Unexpected rc code 6 and description No such instance
(INVALID_InstID_KeyValue) - resource pool type mismatch
ERROR - ------ FAILED: Invalid InstanceID Key Value.------
--------------------------------------------------------------------
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
--------------------------------------------------------------------
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
--------------------------------------------------------------------
16 years, 1 month
LXC on sfcb Test Run Summary for Oct 30 2008
by Guo Lian Yun
=================================================
LXC on sfcb Test Run Summary for Oct 30 2008
=================================================
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: 728
Libvirt-cim changeset: 7e87289dbb29
=================================================
FAIL : 19
XFAIL : 0
SKIP : 38
PASS : 81
-----------------
Total : 138
=================================================
FAIL Test Summary:
ComputerSystem - 03_defineVS.py: FAIL
ComputerSystem - 05_activate_defined_start.py: FAIL
ElementCapabilities - 01_forward.py: FAIL
ElementCapabilities - 02_reverse.py: FAIL
ElementConforms - 01_forward.py: FAIL
ElementSettingData - 01_forward.py: FAIL
HostSystem - 02_hostsystem_to_rasd.py: FAIL
HostSystem - 03_hs_to_settdefcap.py: FAIL
HostSystem - 04_hs_to_EAPF.py: FAIL
HostedDependency - 02_reverse.py: FAIL
Memory - 01_memory.py: FAIL
RASD - 02_enum.py: FAIL
RedirectionService - 01_enum_crs.py: FAIL
RedirectionService - 02_enum_crscap.py: FAIL
ResourceAllocationFromPool - 01_forward.py: FAIL
SettingsDefineCapabilities - 03_forward_errs.py: FAIL
SystemDevice - 01_forward.py: FAIL
VSSD - 04_vssd_to_rasd.py: FAIL
VirtualSystemManagementService - 12_referenced_config.py: FAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
ComputerSystem - 06_paused_active_suspend.py: SKIP
ComputerSystem - 23_suspend_suspend.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: 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
HostedDependency - 03_enabledstate.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 - 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 - 02_profile_to_elec.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
SettingsDefineCapabilities - 05_reverse_vsmcap.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 - 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: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to define a domain with the name domU1 from
virsh
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - ERROR: VS DomST1 was not defined
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_suspend_suspend.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 27_define_suspend_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: SKIP
--------------------------------------------------------------------
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: FAIL
ERROR - 'LXC_ElementCapabilities' association classname error
Class not found
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to define the dom: dom_elecap
Class not found
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Unable to define domain domU
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
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 - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to define the dom: esd_dom
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
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: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to define the dom: CrossClass_GuestDom
Class not found
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to define the dom: domgst_test
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to define the dom: 'CrossClass_GuestDom'
Class not found
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to define the dom: hd_domain
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: SKIP
--------------------------------------------------------------------
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: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - AttributeError : 'NoneType' object has no attribute
'ConsumableBlocks'
Traceback (most recent call last):
File "./lib/XenKvmLib/const.py", line 116, in do_try
File "01_memory.py", line 59, in main
if dev.ConsumableBlocks > dev.NumberOfBlocks:
AttributeError: 'NoneType' object has no attribute 'ConsumableBlocks'
ERROR - None
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
No such instance (no domain for test_domain/mem)
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: SKIP
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
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: SKIP
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to Define the domain: VSSDC_dom
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: SKIP
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: FAIL
ERROR - 'LXC_ConsoleRedirectionService' returned 0 records,
expected 1
Class not found
*** Inconsistent provider registration for Virt_ConsoleRedirectionService
(2)
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: FAIL
ERROR - 'LXC_ConsoleRedirectionServiceCapabilities' returned 0
records, expected 1
*** Inconsistent provider registration for
Virt_ConsoleRedirectionServiceCapabilities (2)
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to Define the domain: RAFP_dom
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
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: FAIL
ERROR - Unexpected rc code 6 and description No such instance
(INVALID_InstID_KeyValue) - resource pool type mismatch
ERROR - ------ FAILED: Invalid InstanceID Key Value.------
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: SKIP
--------------------------------------------------------------------
SystemDevice - 01_forward.py: FAIL
ERROR - NameError : name 'LXC_Memory' is not defined
Traceback (most recent call last):
File "./lib/XenKvmLib/const.py", line 116, in do_try
File "01_forward.py", line 92, in main
device = devices.device_of(options.ip, key_list)
File "./lib/XenKvmLib/devices.py", line 48, in device_of
File "<string>", line 1, in <module>
NameError: name 'LXC_Memory' is not defined
ERROR - None
--------------------------------------------------------------------
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: FAIL
ERROR - Got CIM error ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC with return code 1
ERROR - Failed to Define the domain: VSSDC_dom
InvokeMethod(DefineSystem): ResourceSettings Error: ProcRASD field
VirtualQuantity not valid for LXC
--------------------------------------------------------------------
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: FAIL
ERROR - Unable to build VSSD and RASD instances for
rstest_domain2
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.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
--------------------------------------------------------------------
16 years, 1 month
[PATCH] [TEST] Update get_vssd_mof() to include a bootloader param
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1224607344 25200
# Node ID 912c63b6033764917aa5a5438e2e12ce1d12ea99
# Parent f35b3e65944d83f758656717a903eee38b7d5b19
[TEST] Update get_vssd_mof() to include a bootloader param.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r f35b3e65944d -r 912c63b60337 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Sun Oct 19 19:28:33 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Oct 21 09:42:24 2008 -0700
@@ -89,7 +89,7 @@
# classes to define VSSD parameters
class CIM_VirtualSystemSettingData(CIMClassMOF):
- def __init__(self, name, virt):
+ def __init__(self, name, virt, bldr=None):
type = get_class_type(self.__class__.__name__)
self.InstanceID = '%s:%s' % (type, name)
self.Caption = self.Description = 'Virtual System'
@@ -107,6 +107,9 @@
else:
self.Kernel = const.Xen_kernel_path
self.Ramdisk = const.Xen_init_path
+
+ if bldr is not None:
+ self.Bootloader = bldr
class Xen_VirtualSystemSettingData(CIM_VirtualSystemSettingData):
pass
@@ -117,9 +120,9 @@
class LXC_VirtualSystemSettingData(CIM_VirtualSystemSettingData):
pass
-def get_vssd_mof(virt, dom_name):
+def get_vssd_mof(virt, dom_name, bldr=None):
vssd_cn = eval(get_typed_class(virt, "VirtualSystemSettingData"))
- vssd = vssd_cn(dom_name, virt)
+ vssd = vssd_cn(dom_name, virt, bldr)
return vssd.mof()
# classes to define RASD parameters
diff -r f35b3e65944d -r 912c63b60337 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Sun Oct 19 19:28:33 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Oct 21 09:42:24 2008 -0700
@@ -564,7 +564,7 @@
def set_bootloader(self, ip, gtype=0):
bldr = live.bootloader(ip, gtype)
self.add_sub_node('/domain', 'bootloader', bldr)
- self.vssd.Bootloader = bldr
+ self.vssd = vsms.get_vssd_mof(self.virt, self.domain_name, bldr)
return bldr
def set_bridge(self, ip):
16 years, 1 month
[PATCH] [TEST] Move some functions from live.py to common_util.py and update related tc
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1225259900 25200
# Node ID 5b2b14ed9401ac6398b3cdbefa290553570ff195
# Parent 0f340004e1cd48f5ede60a68283a850ae60c9ebe
[TEST] Move some functions from live.py to common_util.py and update related tc
On the next, I will delete the removed functions in live.py and update other tests
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Tue Oct 28 22:58:20 2008 -0700
@@ -56,8 +56,7 @@
from VirtLib import utils
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
from CimTest.ReturnCodes import PASS, SKIP, FAIL
-from XenKvmLib.common_util import try_getinstance
-from VirtLib.live import net_list
+from XenKvmLib.common_util import try_getinstance, net_list
from XenKvmLib.test_xml import netxml
from XenKvmLib.test_doms import create_vnet
from XenKvmLib.const import do_main, platform_sup, default_pool_name
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Tue Oct 28 22:58:20 2008 -0700
@@ -25,7 +25,7 @@
import sys
from XenKvmLib.const import do_main
from XenKvmLib import enumclass
-from VirtLib import live
+from XenKvmLib.common_util import domain_list
from XenKvmLib.classes import get_typed_class
from VirtLib import utils
from CimTest import Globals
@@ -41,7 +41,7 @@
cs_class = get_typed_class(options.virt, 'ComputerSystem')
try:
cs = enumclass.EnumInstances(options.ip, cs_class)
- live_cs = live.domain_list(options.ip, options.virt)
+ live_cs = domain_list(options.ip, options.virt)
for system in cs:
name = system.name
try:
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Tue Oct 28 22:58:20 2008 -0700
@@ -25,7 +25,7 @@
import sys
import pywbem
from XenKvmLib import enumclass
-from VirtLib import live
+from XenKvmLib.common_util import domain_list
from VirtLib import utils
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
@@ -35,7 +35,7 @@
sup_types = ['KVM', 'LXC']
def clean_system(host, virt):
- l = live.domain_list(host, virt)
+ l = domain_list(host, virt)
if len(l) > 0:
return False
else:
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Tue Oct 28 22:58:20 2008 -0700
@@ -22,7 +22,6 @@
import sys
from VirtLib import utils
-from VirtLib import live
from XenKvmLib import vxml
from XenKvmLib import assoc
from XenKvmLib import enumclass
@@ -31,7 +30,7 @@
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL, SKIP, XFAIL_RC
from XenKvmLib.enumclass import EnumInstances
-from XenKvmLib.common_util import get_host_info
+from XenKvmLib.common_util import get_host_info, domain_list
sup_types = ['Xen', 'XenFV', 'KVM', 'LXC']
test_dom = "dom_elecap"
@@ -114,7 +113,7 @@
logger.error("Failed to define the dom: %s", test_dom)
return FAIL
- cs = live.domain_list(server, virt)
+ cs = domain_list(server, virt)
ccn = get_typed_class(virt, "ComputerSystem")
for system in cs:
try:
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Tue Oct 28 22:58:20 2008 -0700
@@ -23,13 +23,12 @@
import sys
from VirtLib import utils
-from VirtLib import live
from XenKvmLib import assoc
from XenKvmLib import enumclass
from XenKvmLib import vxml
from XenKvmLib.classes import get_typed_class
from XenKvmLib.classes import get_class_basename
-from XenKvmLib.common_util import get_host_info
+from XenKvmLib.common_util import get_host_info, domain_list
from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, \
CIM_ERROR_ASSOCIATORNAMES
from XenKvmLib.const import do_main
@@ -154,7 +153,7 @@
logger.error("Failed to define the dom: %s" % test_dom)
return FAIL
- cs = live.domain_list(options.ip, options.virt)
+ cs = domain_list(options.ip, options.virt)
for system in cs:
cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities")
status, elec_cs = call_assoc(options.ip, cn, system, options.virt)
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Tue Oct 28 22:58:20 2008 -0700
@@ -26,7 +26,7 @@
from XenKvmLib.classes import get_typed_class
from CimTest import Globals
from XenKvmLib.const import do_main
-from VirtLib import live
+from XenKvmLib.common_util import domain_list
from VirtLib import utils
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -44,7 +44,7 @@
return 1
- names = live.domain_list(options.ip, options.virt)
+ names = domain_list(options.ip, options.virt)
if len(elec) != len(names):
Globals.logger.error("Get domain list error, the number of domains is not equal")
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/Processor/01_processor.py
--- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Tue Oct 28 22:58:20 2008 -0700
@@ -25,7 +25,7 @@
import sys
import pywbem
from VirtLib import utils
-from VirtLib import live
+from XenKvmLib.common_util import active_domain_list
from XenKvmLib import devices
from XenKvmLib.test_xml import testxml
from XenKvmLib.classes import get_typed_class
@@ -48,7 +48,7 @@
vsxml.start(options.ip)
# Processor instance enumerate need the domain to be active
- domlist = live.active_domain_list(options.ip, options.virt)
+ domlist = active_domain_list(options.ip, options.virt)
if test_dom not in domlist:
status = FAIL
logger.error("Domain not started, we're not able to check vcpu")
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ResourcePool/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Tue Oct 28 22:58:20 2008 -0700
@@ -34,7 +34,7 @@
from CimTest.Globals import logger
from XenKvmLib.const import do_main, default_pool_name
from CimTest.ReturnCodes import PASS, FAIL, SKIP
-from VirtLib.live import net_list
+from XenKvmLib.common_util import net_list
from XenKvmLib.vsms import RASD_TYPE_PROC, RASD_TYPE_MEM, RASD_TYPE_NET_ETHER, \
RASD_TYPE_DISK
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Tue Oct 28 22:58:20 2008 -0700
@@ -28,10 +28,9 @@
import os
import sys
import pywbem
-from VirtLib.live import net_list
from XenKvmLib import assoc
from XenKvmLib import vxml
-from XenKvmLib.common_util import try_getinstance
+from XenKvmLib.common_util import try_getinstance, net_list
from XenKvmLib.classes import get_typed_class
from distutils.file_util import move_file
from CimTest.ReturnCodes import PASS, SKIP
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Tue Oct 28 22:58:20 2008 -0700
@@ -57,12 +57,11 @@
from distutils.file_util import move_file
from XenKvmLib import assoc
from XenKvmLib import enumclass
-from VirtLib.live import virsh_version
from CimTest.ReturnCodes import PASS, FAIL, SKIP
from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS
from XenKvmLib.const import do_main, default_pool_name, default_network_name
from XenKvmLib.classes import get_typed_class
-from XenKvmLib.common_util import print_field_error
+from XenKvmLib.common_util import print_field_error, virsh_version
platform_sup = ['Xen', 'KVM', 'XenFV', 'LXC']
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/VSSD/01_enum.py
--- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Tue Oct 28 22:58:20 2008 -0700
@@ -27,7 +27,7 @@
# Date : 25-10-2007
import sys
-from VirtLib import live
+from XenKvmLib.common_util import domain_list
from XenKvmLib import enumclass
from XenKvmLib.classes import get_typed_class
from XenKvmLib.test_doms import destroy_and_undefine_all
@@ -53,7 +53,7 @@
status = FAIL
try:
- live_cs = live.domain_list(options.ip, options.virt)
+ live_cs = domain_list(options.ip, options.virt)
vssd_class = get_typed_class(options.virt, "VirtualSystemSettingData")
syslst = enumclass.EnumInstances(options.ip, vssd_class)
found = 0
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Tue Oct 28 22:58:20 2008 -0700
@@ -25,7 +25,7 @@
import pywbem
from pywbem.cim_obj import CIMInstanceName
from VirtLib import utils
-from VirtLib.live import domain_list, active_domain_list
+from XenKvmLib.common_util import domain_list, active_domain_list
from XenKvmLib import vsms, vxml
from XenKvmLib.classes import get_typed_class
from XenKvmLib.const import do_main
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Tue Oct 28 22:58:20 2008 -0700
@@ -26,7 +26,7 @@
import pywbem
from pywbem.cim_obj import CIMInstanceName
from VirtLib import utils
-from VirtLib.live import network_by_bridge
+from XenKvmLib.common_util import network_by_bridge
from XenKvmLib import vsms
from XenKvmLib import vxml
from CimTest.Globals import logger
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Tue Oct 28 22:58:20 2008 -0700
@@ -22,7 +22,7 @@
import sys
import pywbem
-from VirtLib import live
+from XenKvmLib import common_util
from XenKvmLib import vsms
from XenKvmLib.const import do_main
from CimTest.Globals import logger
@@ -47,7 +47,7 @@
try:
cim_ver = service["Caption"]
- local_ver = live.get_hv_ver(options.ip, options.virt)
+ local_ver = common_util.get_hv_ver(options.ip, options.virt)
if cim_ver != local_ver:
logger.error("CIM says version is `%s', but libvirt says `%s'" \
diff -r 0f340004e1cd -r 5b2b14ed9401 suites/libvirt-cim/lib/XenKvmLib/common_util.py
--- a/suites/libvirt-cim/lib/XenKvmLib/common_util.py Fri Oct 24 01:04:38 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/common_util.py Tue Oct 28 22:58:20 2008 -0700
@@ -36,7 +36,6 @@
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE, \
CIM_ERROR_GETINSTANCE
from CimTest.ReturnCodes import PASS, FAIL, XFAIL_RC
-from VirtLib.live import diskpool_list, virsh_version, net_list, domain_list
from XenKvmLib.vxml import PoolXML, NetXML
from VirtLib import utils
from XenKvmLib.const import default_pool_name, default_network_name
@@ -512,4 +511,215 @@
logger.error("Exception: %s", detail)
Globals.CIM_NS = 'root/virt'
- return status, linux_cs
+ return status, linux_cs
+
+def xm_domname(ip, domid):
+
+ cmd = "xm domname %s" % domid
+
+ rc, out = utils.run_remote(ip, cmd)
+ if rc != 0:
+ return None
+
+ return out
+
+def list_guests_on_bridge(ip, bridge):
+ """Returns a list of domU names that have vifs in the
+ specified bridge.
+ """
+
+ cmd = "brctl show %s | grep 'vif' | grep -v vif0.*" % bridge
+
+ rc, out = utils.run_remote(ip, cmd)
+ if rc != 0:
+ return []
+
+ ret = []
+ lines = out.splitlines()
+ for l in lines:
+ vif = l.split()[-1]
+ domid = vif.replace('vif', '').split('.')[0]
+ domname = xm_domname(ip, domid)
+ if domname != None:
+ ret.append(domname)
+
+ return ret
+
+def disk_list(ip, vs_name):
+ """Returns the list of disk of the specified VS
+ """
+
+ guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' "
+ rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd)
+
+ if rc != 0:
+ return None
+
+ return out
+
+def max_free_mem(server):
+ """Function to get max free mem on dom0.
+
+ Returns an int containing the value in MB.
+ """
+
+ xm_ret, mfm = utils.run_remote(server,
+ "xm info | awk -F ': ' '/max_free_memory/ {print \$2}'")
+ if xm_ret != 0:
+ return None
+
+ return int(mfm)
+
+def domain_list(server, virt="Xen"):
+ """Function to list all domains"""
+ if virt == "XenFV":
+ virt = "Xen"
+
+ cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return None
+ names = []
+ lines = out.split("\n")
+ for line in lines:
+ dinfo = line.split()
+ if len(dinfo) > 1:
+ names.append(dinfo[1])
+
+ return names
+
+def active_domain_list(server, virt="Xen"):
+ """Function to list all active domains"""
+ if virt == "XenFV":
+ virt = "Xen"
+
+ cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return None
+ names = []
+ lines = out.split("\n")
+ for line in lines:
+ dinfo = line.split()
+ if len(dinfo) > 1:
+ names.append(dinfo[1])
+
+ return names
+
+def bootloader(server, gtype = 0):
+ """
+ Function to find the bootloader to be used.
+ It uses the following steps to determine the bootloader.
+ 1) The function checks if the machine is full virt or para virt.
+ 2) Checks if a Full virt guest option is set
+ NOTE : gtype = 1 for FV and gtype = 0 for PV
+ i) If yes, then verifies if the machine has the support to
+ create the full virt guest. If both options are true then
+ bootloader is set to 'hvmloader'
+ ii) Otherwise, a paravirt guest creation is requested.
+ a) Verfies the OS on which it is running is Red hat/Fedora/SLES.
+ b) sets the bootloader to pygrub for Red hat/Fedora
+ or domUloader.py for SLES.
+ 3) returns the bootloader.
+ """
+ if fv_cap(server) and gtype == 1:
+ bootloader = "/usr/lib/xen/boot/hvmloader"
+ else:
+ cmd = "cat /etc/issue | grep -v ^$ | egrep 'Red Hat|Fedora'"
+ ret, out = utils.run_remote(server,cmd)
+ if ret != 0:
+ # For SLES
+ bootloader = "/usr/lib/xen/boot/domUloader.py"
+ else:
+ # For Red Hat or Fedora
+ bootloader = "/usr/bin/pygrub"
+ return bootloader
+
+def net_list(server, virt="Xen"):
+ """Function to list active network"""
+ names = []
+ cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return names
+ lines = out.split("\n")
+ for line in lines:
+ virt_network = line.split()
+ if len(virt_network) >= 1 and virt_network[1] == "active":
+ names.append(virt_network[0])
+
+ return names
+
+def get_bridge_from_network_xml(network, server, virt="Xen"):
+ """Function returns bridge name for a given virtual network"""
+
+ cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \
+ (utils.virt2uri(virt), network)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return None
+ bridge = out.split("'")
+ if len(bridge) > 1:
+ return bridge[1]
+
+def network_by_bridge(bridge, server, virt="Xen"):
+ """Function returns virtual network for a given bridge"""
+
+ networks = net_list(server, virt)
+ if len(networks) == 0:
+ return None
+
+ for network in networks:
+ if bridge == get_bridge_from_network_xml(network, server, virt):
+ return network
+
+ return None
+
+def virsh_version(server, virt="KVM"):
+ cmd = "virsh -c %s -v " % utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+ if ret != 0:
+ return None
+ return out
+
+def diskpool_list(server, virt="KVM"):
+ """Function to list active DiskPool list"""
+ names = []
+ cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return names
+
+ lines = out.split("\n")
+ for line in lines:
+ disk_pool = line.split()
+ if len(disk_pool) >= 1 and disk_pool[1] == "active":
+ names.append(disk_pool[0])
+
+ return names
+
+def virsh_vcpuinfo(server, dom, virt="Xen"):
+ cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt),
+ dom)
+ ret, out = utils.run_remote(server, cmd)
+ if out.isdigit():
+ return out
+ return None
+
+def get_hv_ver(server, virt="Xen"):
+ cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+ if ret == 0:
+ return out
+ else:
+ return None
+
16 years, 1 month
[PATCH] [TEST] #2 Create a new module of xm_virt_util.py in ../lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1225337240 25200
# Node ID eacab11799791c45e1ed35a5934b6ed7fe407bb3
# Parent 408dbb3a61b43bd0def587a9ea7e648105def002
[TEST] #2 Create a new module of xm_virt_util.py in ../lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Wed Oct 29 20:27:20 2008 -0700
@@ -57,7 +57,7 @@
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
from CimTest.ReturnCodes import PASS, SKIP, FAIL
from XenKvmLib.common_util import try_getinstance
-from VirtLib.live import net_list
+from XenKvmLib.xm_virt_util import net_list
from XenKvmLib.test_xml import netxml
from XenKvmLib.test_doms import create_vnet
from XenKvmLib.const import do_main, platform_sup, default_pool_name
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Wed Oct 29 20:27:20 2008 -0700
@@ -25,7 +25,7 @@
import sys
from XenKvmLib.const import do_main
from XenKvmLib import enumclass
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from XenKvmLib.classes import get_typed_class
from VirtLib import utils
from CimTest import Globals
@@ -41,7 +41,7 @@
cs_class = get_typed_class(options.virt, 'ComputerSystem')
try:
cs = enumclass.EnumInstances(options.ip, cs_class)
- live_cs = live.domain_list(options.ip, options.virt)
+ live_cs = domain_list(options.ip, options.virt)
for system in cs:
name = system.name
try:
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Wed Oct 29 20:27:20 2008 -0700
@@ -25,7 +25,7 @@
import sys
import pywbem
from XenKvmLib import enumclass
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from VirtLib import utils
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
@@ -35,7 +35,7 @@
sup_types = ['KVM', 'LXC']
def clean_system(host, virt):
- l = live.domain_list(host, virt)
+ l = domain_list(host, virt)
if len(l) > 0:
return False
else:
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 29 20:27:20 2008 -0700
@@ -22,7 +22,7 @@
import sys
from VirtLib import utils
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from XenKvmLib import vxml
from XenKvmLib import assoc
from XenKvmLib import enumclass
@@ -114,7 +114,7 @@
logger.error("Failed to define the dom: %s", test_dom)
return FAIL
- cs = live.domain_list(server, virt)
+ cs = domain_list(server, virt)
ccn = get_typed_class(virt, "ComputerSystem")
for system in cs:
try:
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Oct 29 20:27:20 2008 -0700
@@ -23,7 +23,7 @@
import sys
from VirtLib import utils
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from XenKvmLib import assoc
from XenKvmLib import enumclass
from XenKvmLib import vxml
@@ -154,7 +154,7 @@
logger.error("Failed to define the dom: %s" % test_dom)
return FAIL
- cs = live.domain_list(options.ip, options.virt)
+ cs = domain_list(options.ip, options.virt)
for system in cs:
cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities")
status, elec_cs = call_assoc(options.ip, cn, system, options.virt)
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Wed Oct 29 20:27:20 2008 -0700
@@ -26,7 +26,7 @@
from XenKvmLib.classes import get_typed_class
from CimTest import Globals
from XenKvmLib.const import do_main
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from VirtLib import utils
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -44,7 +44,7 @@
return 1
- names = live.domain_list(options.ip, options.virt)
+ names = domain_list(options.ip, options.virt)
if len(elec) != len(names):
Globals.logger.error("Get domain list error, the number of domains is not equal")
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/Processor/01_processor.py
--- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Wed Oct 29 20:27:20 2008 -0700
@@ -25,7 +25,7 @@
import sys
import pywbem
from VirtLib import utils
-from VirtLib import live
+from XenKvmLib.xm_virt_util import active_domain_list
from XenKvmLib.enumclass import GetInstance
from XenKvmLib.test_xml import testxml
from XenKvmLib.classes import get_typed_class
@@ -48,7 +48,7 @@
vsxml.start(options.ip)
# Processor instance enumerate need the domain to be active
- domlist = live.active_domain_list(options.ip, options.virt)
+ domlist = active_domain_list(options.ip, options.virt)
proc_class = get_typed_class(options.virt, "Processor")
if test_dom not in domlist:
status = FAIL
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ResourcePool/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Wed Oct 29 20:27:20 2008 -0700
@@ -34,7 +34,7 @@
from CimTest.Globals import logger
from XenKvmLib.const import do_main, default_pool_name
from CimTest.ReturnCodes import PASS, FAIL, SKIP
-from VirtLib.live import net_list
+from XenKvmLib.xm_virt_util import net_list
from XenKvmLib.vsms import RASD_TYPE_PROC, RASD_TYPE_MEM, RASD_TYPE_NET_ETHER, \
RASD_TYPE_DISK
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Wed Oct 29 20:27:20 2008 -0700
@@ -28,7 +28,7 @@
import os
import sys
import pywbem
-from VirtLib.live import net_list
+from XenKvmLib.xm_virt_util import net_list
from XenKvmLib import assoc
from XenKvmLib import vxml
from XenKvmLib.common_util import try_getinstance
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 29 20:27:20 2008 -0700
@@ -57,7 +57,7 @@
from distutils.file_util import move_file
from XenKvmLib import assoc
from XenKvmLib import enumclass
-from VirtLib.live import virsh_version
+from XenKvmLib.xm_virt_util import virsh_version
from CimTest.ReturnCodes import PASS, FAIL, SKIP
from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS
from XenKvmLib.const import do_main, default_pool_name, default_network_name
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Wed Oct 29 20:27:20 2008 -0700
@@ -25,7 +25,7 @@
import pywbem
from pywbem.cim_obj import CIMInstanceName
from VirtLib import utils
-from VirtLib.live import domain_list, active_domain_list
+from XenKvmLib.xm_virt_util import domain_list, active_domain_list
from XenKvmLib import vsms, vxml
from XenKvmLib.classes import get_typed_class
from XenKvmLib.const import do_main
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Wed Oct 29 20:27:20 2008 -0700
@@ -26,7 +26,7 @@
import pywbem
from pywbem.cim_obj import CIMInstanceName
from VirtLib import utils
-from VirtLib.live import network_by_bridge
+from XenKvmLib.xm_virt_util import network_by_bridge
from XenKvmLib import vsms
from XenKvmLib import vxml
from CimTest.Globals import logger
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Wed Oct 29 20:27:20 2008 -0700
@@ -22,7 +22,7 @@
import sys
import pywbem
-from VirtLib import live
+from XenKvmLib.xm_virt_util import get_hv_ver
from XenKvmLib import vsms
from XenKvmLib.const import do_main
from CimTest.Globals import logger
@@ -47,7 +47,7 @@
try:
cim_ver = service["Caption"]
- local_ver = live.get_hv_ver(options.ip, options.virt)
+ local_ver = get_hv_ver(options.ip, options.virt)
if cim_ver != local_ver:
logger.error("CIM says version is `%s', but libvirt says `%s'" \
diff -r 408dbb3a61b4 -r eacab1179979 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Oct 29 20:27:20 2008 -0700
@@ -0,0 +1,238 @@
+#
+# Copyright 2008 IBM Corp.
+#
+# Authors:
+# Dan Smith <danms(a)us.ibm.com>
+# Deepti B. Kalakeri <dkalaker(a)in.ibm.com>
+# Kaitlin Rupert <karupert(a)us.ibm.com>
+# Veerendra Chandrappa <vechandr(a)in.ibm.com>
+# Zhengang Li <lizg(a)cn.ibm.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+import os
+from VirtLib import utils
+import socket
+
+def xm_domname(ip, domid):
+
+ cmd = "xm domname %s" % domid
+
+ rc, out = utils.run_remote(ip, cmd)
+ if rc != 0:
+ return None
+
+ return out
+
+def list_guests_on_bridge(ip, bridge):
+ """Returns a list of domU names that have vifs in the
+ specified bridge.
+ """
+
+ cmd = "brctl show %s | grep 'vif' | grep -v vif0.*" % bridge
+
+ rc, out = utils.run_remote(ip, cmd)
+ if rc != 0:
+ return []
+
+ ret = []
+ lines = out.splitlines()
+ for l in lines:
+ vif = l.split()[-1]
+ domid = vif.replace('vif', '').split('.')[0]
+ domname = xm_domname(ip, domid)
+ if domname != None:
+ ret.append(domname)
+
+ return ret
+
+def disk_list(ip, vs_name):
+ """Returns the list of disk of the specified VS
+ """
+
+ guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' "
+ rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd)
+
+ if rc != 0:
+ return None
+
+ return out
+
+def max_free_mem(server):
+ """Function to get max free mem on dom0.
+
+ Returns an int containing the value in MB.
+ """
+
+ xm_ret, mfm = utils.run_remote(server,
+ "xm info | awk -F ': ' '/max_free_memory/ {print \$2}'")
+ if xm_ret != 0:
+ return None
+
+ return int(mfm)
+
+def domain_list(server, virt="Xen"):
+ """Function to list all domains"""
+ if virt == "XenFV":
+ virt = "Xen"
+
+ cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return None
+ names = []
+ lines = out.split("\n")
+ for line in lines:
+ dinfo = line.split()
+ if len(dinfo) > 1:
+ names.append(dinfo[1])
+
+ return names
+
+def active_domain_list(server, virt="Xen"):
+ """Function to list all active domains"""
+ if virt == "XenFV":
+ virt = "Xen"
+
+ cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return None
+ names = []
+ lines = out.split("\n")
+ for line in lines:
+ dinfo = line.split()
+ if len(dinfo) > 1:
+ names.append(dinfo[1])
+
+ return names
+
+def bootloader(server, gtype = 0):
+ """
+ Function to find the bootloader to be used.
+ It uses the following steps to determine the bootloader.
+ 1) The function checks if the machine is full virt or para virt.
+ 2) Checks if a Full virt guest option is set
+ NOTE : gtype = 1 for FV and gtype = 0 for PV
+ i) If yes, then verifies if the machine has the support to
+ create the full virt guest. If both options are true then
+ bootloader is set to 'hvmloader'
+ ii) Otherwise, a paravirt guest creation is requested.
+ a) Verfies the OS on which it is running is Red hat/Fedora/SLES.
+ b) sets the bootloader to pygrub for Red hat/Fedora
+ or domUloader.py for SLES.
+ 3) returns the bootloader.
+ """
+ if fv_cap(server) and gtype == 1:
+ bootloader = "/usr/lib/xen/boot/hvmloader"
+ else:
+ cmd = "cat /etc/issue | grep -v ^$ | egrep 'Red Hat|Fedora'"
+ ret, out = utils.run_remote(server,cmd)
+ if ret != 0:
+ # For SLES
+ bootloader = "/usr/lib/xen/boot/domUloader.py"
+ else:
+ # For Red Hat or Fedora
+ bootloader = "/usr/bin/pygrub"
+ return bootloader
+
+def net_list(server, virt="Xen"):
+ """Function to list active network"""
+ names = []
+ cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return names
+ lines = out.split("\n")
+ for line in lines:
+ virt_network = line.split()
+ if len(virt_network) >= 1 and virt_network[1] == "active":
+ names.append(virt_network[0])
+
+ return names
+
+def get_bridge_from_network_xml(network, server, virt="Xen"):
+ """Function returns bridge name for a given virtual network"""
+
+ cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \
+ (utils.virt2uri(virt), network)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return None
+ bridge = out.split("'")
+ if len(bridge) > 1:
+ return bridge[1]
+
+def network_by_bridge(bridge, server, virt="Xen"):
+ """Function returns virtual network for a given bridge"""
+
+ networks = net_list(server, virt)
+ if len(networks) == 0:
+ return None
+
+ for network in networks:
+ if bridge == get_bridge_from_network_xml(network, server, virt):
+ return network
+
+ return None
+
+def virsh_version(server, virt="KVM"):
+ cmd = "virsh -c %s -v " % utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+ if ret != 0:
+ return None
+ return out
+
+def diskpool_list(server, virt="KVM"):
+ """Function to list active DiskPool list"""
+ names = []
+ cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return names
+
+ lines = out.split("\n")
+ for line in lines:
+ disk_pool = line.split()
+ if len(disk_pool) >= 1 and disk_pool[1] == "active":
+ names.append(disk_pool[0])
+
+ return names
+
+def virsh_vcpuinfo(server, dom, virt="Xen"):
+ cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt),
+ dom)
+ ret, out = utils.run_remote(server, cmd)
+ if out.isdigit():
+ return out
+ return None
+
+def get_hv_ver(server, virt="Xen"):
+ cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+ if ret == 0:
+ return out
+ else:
+ return None
+
16 years, 1 month
[PATCH] [TEST] Update helper function when remove some function in live.py
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1225336307 25200
# Node ID fa88d86bab22a44ea4c1ce221b326c8f020437c0
# Parent 408dbb3a61b43bd0def587a9ea7e648105def002
[TEST] Update helper function when remove some function in live.py
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/test_doms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/test_doms.py Wed Oct 29 20:11:47 2008 -0700
@@ -24,7 +24,7 @@
import tempfile
import os
from VirtLib import utils
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from CimTest.Globals import CIM_FUUID
try:
@@ -127,7 +127,7 @@
"""Destroy and undefine all domain to keep a
clean env for next testcase"""
- names = live.domain_list(server, virt)
+ names = domain_list(server, virt)
ids = virdomid_list(server, virt)
names.extend(ids)
uuid_list = get_uuid_list()
diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/test_xml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/test_xml.py Wed Oct 29 20:11:47 2008 -0700
@@ -29,12 +29,13 @@
import sys
import random
from VirtLib import utils
-from VirtLib import live
from xml import xpath
from xml.dom import minidom, Node
from CimTest.Globals import logger
from XenKvmLib.test_doms import set_uuid, create_vnet
-from VirtLib.live import net_list, available_bridges, get_bridge_from_network_xml
+from VirtLib.live import available_bridges
+from XenKvmLib.xm_virt_util import net_list, get_bridge_from_network_xml, \
+bootloader
from CimTest.ReturnCodes import SKIP
image_dir = "/tmp"
@@ -116,7 +117,7 @@
</disk>
</devices>
</domain>
- """ % ( test_dom, set_uuid(), live.bootloader(server, gtype), \
+ """ % ( test_dom, set_uuid(), bootloader(server, gtype), \
kernel_path, init_path, mem*1024, vcpus, mac, disk_file_path, disk )
return test_xml
diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Oct 29 20:11:47 2008 -0700
@@ -25,7 +25,6 @@
import pywbem
from CimTest.CimExt import CIMMethodClass, CIMClassMOF
from CimTest import Globals
-from VirtLib import live
from XenKvmLib import const
from XenKvmLib.classes import get_typed_class, get_class_type, virt_types
diff -r 408dbb3a61b4 -r fa88d86bab22 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Oct 29 20:11:47 2008 -0700
@@ -38,6 +38,7 @@
from xml.dom import minidom, Node
from xml import xpath
from VirtLib import utils, live
+from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader
from XenKvmLib.test_doms import set_uuid, viruuid
from XenKvmLib import vsms
from XenKvmLib import const
@@ -436,7 +437,7 @@
return br
def _set_vbridge(self, ip, virt_type, net_name):
- vbr = live.get_bridge_from_network_xml(net_name, ip, virt=virt_type)
+ vbr = get_bridge_from_network_xml(net_name, ip, virt=virt_type)
interface = self.get_node('/domain/devices/interface')
interface.setAttribute('type', 'bridge')
@@ -562,7 +563,7 @@
self.set_interface_details(devices, net_mac, net_type, net_name, 'Xen')
def set_bootloader(self, ip, gtype=0):
- bldr = live.bootloader(ip, gtype)
+ bldr = bootloader(ip, gtype)
self.add_sub_node('/domain', 'bootloader', bldr)
self.vssd.Bootloader = bldr
return bldr
16 years, 1 month
[PATCH] [TEST] #2 Create a new module of xm_virt_util.py in ../lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it
by yunguol@cn.ibm.com
# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1225335207 25200
# Node ID 91f9a0bed4667b6b30a241569ef70a93b8bc0b2b
# Parent 408dbb3a61b43bd0def587a9ea7e648105def002
[TEST] #2 Create a new module of xm_virt_util.py in ../lib/XenKvmLib, move some functions from live.py under lib/XenKvmLib to it
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py
--- a/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/AllocationCapabilities/02_alloccap_gi_errs.py Wed Oct 29 19:53:27 2008 -0700
@@ -57,7 +57,7 @@
from CimTest.Globals import logger, CIM_USER, CIM_PASS, CIM_NS
from CimTest.ReturnCodes import PASS, SKIP, FAIL
from XenKvmLib.common_util import try_getinstance
-from VirtLib.live import net_list
+from XenKvmLib.xm_virt_util import net_list
from XenKvmLib.test_xml import netxml
from XenKvmLib.test_doms import create_vnet
from XenKvmLib.const import do_main, platform_sup, default_pool_name
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Wed Oct 29 19:53:27 2008 -0700
@@ -25,7 +25,7 @@
import sys
from XenKvmLib.const import do_main
from XenKvmLib import enumclass
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from XenKvmLib.classes import get_typed_class
from VirtLib import utils
from CimTest import Globals
@@ -41,7 +41,7 @@
cs_class = get_typed_class(options.virt, 'ComputerSystem')
try:
cs = enumclass.EnumInstances(options.ip, cs_class)
- live_cs = live.domain_list(options.ip, options.virt)
+ live_cs = domain_list(options.ip, options.virt)
for system in cs:
name = system.name
try:
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/02_nosystems.py Wed Oct 29 19:53:27 2008 -0700
@@ -25,7 +25,7 @@
import sys
import pywbem
from XenKvmLib import enumclass
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from VirtLib import utils
from XenKvmLib.classes import get_typed_class
from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
@@ -35,7 +35,7 @@
sup_types = ['KVM', 'LXC']
def clean_system(host, virt):
- l = live.domain_list(host, virt)
+ l = domain_list(host, virt)
if len(l) > 0:
return False
else:
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/01_forward.py Wed Oct 29 19:53:27 2008 -0700
@@ -22,7 +22,7 @@
import sys
from VirtLib import utils
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from XenKvmLib import vxml
from XenKvmLib import assoc
from XenKvmLib import enumclass
@@ -114,7 +114,7 @@
logger.error("Failed to define the dom: %s", test_dom)
return FAIL
- cs = live.domain_list(server, virt)
+ cs = domain_list(server, virt)
ccn = get_typed_class(virt, "ComputerSystem")
for system in cs:
try:
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py
--- a/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ElementCapabilities/02_reverse.py Wed Oct 29 19:53:27 2008 -0700
@@ -23,7 +23,7 @@
import sys
from VirtLib import utils
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from XenKvmLib import assoc
from XenKvmLib import enumclass
from XenKvmLib import vxml
@@ -154,7 +154,7 @@
logger.error("Failed to define the dom: %s" % test_dom)
return FAIL
- cs = live.domain_list(options.ip, options.virt)
+ cs = domain_list(options.ip, options.virt)
for system in cs:
cn = get_typed_class(options.virt, "EnabledLogicalElementCapabilities")
status, elec_cs = call_assoc(options.ip, cn, system, options.virt)
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py
--- a/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/EnabledLogicalElementCapabilities/01_enum.py Wed Oct 29 19:53:27 2008 -0700
@@ -26,7 +26,7 @@
from XenKvmLib.classes import get_typed_class
from CimTest import Globals
from XenKvmLib.const import do_main
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from VirtLib import utils
sup_types = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -44,7 +44,7 @@
return 1
- names = live.domain_list(options.ip, options.virt)
+ names = domain_list(options.ip, options.virt)
if len(elec) != len(names):
Globals.logger.error("Get domain list error, the number of domains is not equal")
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/Processor/01_processor.py
--- a/suites/libvirt-cim/cimtest/Processor/01_processor.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/Processor/01_processor.py Wed Oct 29 19:53:27 2008 -0700
@@ -25,7 +25,7 @@
import sys
import pywbem
from VirtLib import utils
-from VirtLib import live
+from XenKvmLib.xm_virt_util import active_domain_list
from XenKvmLib.enumclass import GetInstance
from XenKvmLib.test_xml import testxml
from XenKvmLib.classes import get_typed_class
@@ -48,7 +48,7 @@
vsxml.start(options.ip)
# Processor instance enumerate need the domain to be active
- domlist = live.active_domain_list(options.ip, options.virt)
+ domlist = active_domain_list(options.ip, options.virt)
proc_class = get_typed_class(options.virt, "Processor")
if test_dom not in domlist:
status = FAIL
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ResourcePool/01_enum.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePool/01_enum.py Wed Oct 29 19:53:27 2008 -0700
@@ -34,7 +34,7 @@
from CimTest.Globals import logger
from XenKvmLib.const import do_main, default_pool_name
from CimTest.ReturnCodes import PASS, FAIL, SKIP
-from VirtLib.live import net_list
+from XenKvmLib.xm_virt_util import net_list
from XenKvmLib.vsms import RASD_TYPE_PROC, RASD_TYPE_MEM, RASD_TYPE_NET_ETHER, \
RASD_TYPE_DISK
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py
--- a/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/ResourcePool/02_rp_gi_errors.py Wed Oct 29 19:53:27 2008 -0700
@@ -28,7 +28,7 @@
import os
import sys
import pywbem
-from VirtLib.live import net_list
+from XenKvmLib.xm_virt_util import net_list
from XenKvmLib import assoc
from XenKvmLib import vxml
from XenKvmLib.common_util import try_getinstance
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py
--- a/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/SettingsDefineCapabilities/01_forward.py Wed Oct 29 19:53:27 2008 -0700
@@ -57,7 +57,7 @@
from distutils.file_util import move_file
from XenKvmLib import assoc
from XenKvmLib import enumclass
-from VirtLib.live import virsh_version
+from XenKvmLib.xm_virt_util import virsh_version
from CimTest.ReturnCodes import PASS, FAIL, SKIP
from CimTest.Globals import logger, CIM_ERROR_GETINSTANCE, CIM_ERROR_ASSOCIATORS
from XenKvmLib.const import do_main, default_pool_name, default_network_name
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/VSSD/01_enum.py
--- a/suites/libvirt-cim/cimtest/VSSD/01_enum.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VSSD/01_enum.py Wed Oct 29 19:53:27 2008 -0700
@@ -27,7 +27,7 @@
# Date : 25-10-2007
import sys
-from VirtLib import live
+from XenKvmLib.xm_virt_util import domain_list
from XenKvmLib import enumclass
from XenKvmLib.classes import get_typed_class
from XenKvmLib.test_doms import destroy_and_undefine_all
@@ -53,7 +53,7 @@
status = FAIL
try:
- live_cs = live.domain_list(options.ip, options.virt)
+ live_cs = domain_list(options.ip, options.virt)
vssd_class = get_typed_class(options.virt, "VirtualSystemSettingData")
syslst = enumclass.EnumInstances(options.ip, vssd_class)
found = 0
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/02_destroysystem.py Wed Oct 29 19:53:27 2008 -0700
@@ -25,7 +25,7 @@
import pywbem
from pywbem.cim_obj import CIMInstanceName
from VirtLib import utils
-from VirtLib.live import domain_list, active_domain_list
+from XenKvmLib.xm_virt_util import domain_list, active_domain_list
from XenKvmLib import vsms, vxml
from XenKvmLib.classes import get_typed_class
from XenKvmLib.const import do_main
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/08_modifyresource.py Wed Oct 29 19:53:27 2008 -0700
@@ -26,7 +26,7 @@
import pywbem
from pywbem.cim_obj import CIMInstanceName
from VirtLib import utils
-from VirtLib.live import network_by_bridge
+from XenKvmLib.xm_virt_util import network_by_bridge
from XenKvmLib import vsms
from XenKvmLib import vxml
from CimTest.Globals import logger
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Mon Oct 27 20:03:31 2008 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/10_hv_version.py Wed Oct 29 19:53:27 2008 -0700
@@ -22,7 +22,7 @@
import sys
import pywbem
-from VirtLib import live
+from XenKvmLib.xm_virt_util import get_hv_ver
from XenKvmLib import vsms
from XenKvmLib.const import do_main
from CimTest.Globals import logger
@@ -47,7 +47,7 @@
try:
cim_ver = service["Caption"]
- local_ver = live.get_hv_ver(options.ip, options.virt)
+ local_ver = get_hv_ver(options.ip, options.virt)
if cim_ver != local_ver:
logger.error("CIM says version is `%s', but libvirt says `%s'" \
diff -r 408dbb3a61b4 -r 91f9a0bed466 suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/lib/XenKvmLib/xm_virt_util.py Wed Oct 29 19:53:27 2008 -0700
@@ -0,0 +1,238 @@
+#
+# Copyright 2008 IBM Corp.
+#
+# Authors:
+# Dan Smith <danms(a)us.ibm.com>
+# Deepti B. Kalakeri <dkalaker(a)in.ibm.com>
+# Kaitlin Rupert <karupert(a)us.ibm.com>
+# Veerendra Chandrappa <vechandr(a)in.ibm.com>
+# Zhengang Li <lizg(a)cn.ibm.com>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+import os
+from VirtLib import utils
+import socket
+
+def xm_domname(ip, domid):
+
+ cmd = "xm domname %s" % domid
+
+ rc, out = utils.run_remote(ip, cmd)
+ if rc != 0:
+ return None
+
+ return out
+
+def list_guests_on_bridge(ip, bridge):
+ """Returns a list of domU names that have vifs in the
+ specified bridge.
+ """
+
+ cmd = "brctl show %s | grep 'vif' | grep -v vif0.*" % bridge
+
+ rc, out = utils.run_remote(ip, cmd)
+ if rc != 0:
+ return []
+
+ ret = []
+ lines = out.splitlines()
+ for l in lines:
+ vif = l.split()[-1]
+ domid = vif.replace('vif', '').split('.')[0]
+ domname = xm_domname(ip, domid)
+ if domname != None:
+ ret.append(domname)
+
+ return ret
+
+def disk_list(ip, vs_name):
+ """Returns the list of disk of the specified VS
+ """
+
+ guest_cmd = "cat /proc/partitions | awk '/^ /{ print $4 } ' "
+ rc, out = utils.run_remote_guest(ip, vs_name, guest_cmd)
+
+ if rc != 0:
+ return None
+
+ return out
+
+def max_free_mem(server):
+ """Function to get max free mem on dom0.
+
+ Returns an int containing the value in MB.
+ """
+
+ xm_ret, mfm = utils.run_remote(server,
+ "xm info | awk -F ': ' '/max_free_memory/ {print \$2}'")
+ if xm_ret != 0:
+ return None
+
+ return int(mfm)
+
+def domain_list(server, virt="Xen"):
+ """Function to list all domains"""
+ if virt == "XenFV":
+ virt = "Xen"
+
+ cmd = "virsh -c %s list --all | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return None
+ names = []
+ lines = out.split("\n")
+ for line in lines:
+ dinfo = line.split()
+ if len(dinfo) > 1:
+ names.append(dinfo[1])
+
+ return names
+
+def active_domain_list(server, virt="Xen"):
+ """Function to list all active domains"""
+ if virt == "XenFV":
+ virt = "Xen"
+
+ cmd = "virsh -c %s list | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return None
+ names = []
+ lines = out.split("\n")
+ for line in lines:
+ dinfo = line.split()
+ if len(dinfo) > 1:
+ names.append(dinfo[1])
+
+ return names
+
+def bootloader(server, gtype = 0):
+ """
+ Function to find the bootloader to be used.
+ It uses the following steps to determine the bootloader.
+ 1) The function checks if the machine is full virt or para virt.
+ 2) Checks if a Full virt guest option is set
+ NOTE : gtype = 1 for FV and gtype = 0 for PV
+ i) If yes, then verifies if the machine has the support to
+ create the full virt guest. If both options are true then
+ bootloader is set to 'hvmloader'
+ ii) Otherwise, a paravirt guest creation is requested.
+ a) Verfies the OS on which it is running is Red hat/Fedora/SLES.
+ b) sets the bootloader to pygrub for Red hat/Fedora
+ or domUloader.py for SLES.
+ 3) returns the bootloader.
+ """
+ if fv_cap(server) and gtype == 1:
+ bootloader = "/usr/lib/xen/boot/hvmloader"
+ else:
+ cmd = "cat /etc/issue | grep -v ^$ | egrep 'Red Hat|Fedora'"
+ ret, out = utils.run_remote(server,cmd)
+ if ret != 0:
+ # For SLES
+ bootloader = "/usr/lib/xen/boot/domUloader.py"
+ else:
+ # For Red Hat or Fedora
+ bootloader = "/usr/bin/pygrub"
+ return bootloader
+
+def net_list(server, virt="Xen"):
+ """Function to list active network"""
+ names = []
+ cmd = "virsh -c %s net-list | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return names
+ lines = out.split("\n")
+ for line in lines:
+ virt_network = line.split()
+ if len(virt_network) >= 1 and virt_network[1] == "active":
+ names.append(virt_network[0])
+
+ return names
+
+def get_bridge_from_network_xml(network, server, virt="Xen"):
+ """Function returns bridge name for a given virtual network"""
+
+ cmd = "virsh -c %s net-dumpxml %s | awk '/bridge name/ { print $2 }'" % \
+ (utils.virt2uri(virt), network)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return None
+ bridge = out.split("'")
+ if len(bridge) > 1:
+ return bridge[1]
+
+def network_by_bridge(bridge, server, virt="Xen"):
+ """Function returns virtual network for a given bridge"""
+
+ networks = net_list(server, virt)
+ if len(networks) == 0:
+ return None
+
+ for network in networks:
+ if bridge == get_bridge_from_network_xml(network, server, virt):
+ return network
+
+ return None
+
+def virsh_version(server, virt="KVM"):
+ cmd = "virsh -c %s -v " % utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+ if ret != 0:
+ return None
+ return out
+
+def diskpool_list(server, virt="KVM"):
+ """Function to list active DiskPool list"""
+ names = []
+ cmd = "virsh -c %s pool-list | sed -e '1,2 d' -e '$ d'" % \
+ utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+
+ if ret != 0:
+ return names
+
+ lines = out.split("\n")
+ for line in lines:
+ disk_pool = line.split()
+ if len(disk_pool) >= 1 and disk_pool[1] == "active":
+ names.append(disk_pool[0])
+
+ return names
+
+def virsh_vcpuinfo(server, dom, virt="Xen"):
+ cmd = "virsh -c %s vcpuinfo %s | grep VCPU | wc -l" % (utils.virt2uri(virt),
+ dom)
+ ret, out = utils.run_remote(server, cmd)
+ if out.isdigit():
+ return out
+ return None
+
+def get_hv_ver(server, virt="Xen"):
+ cmd = "virsh -c %s version | grep ^Running | cut -d ' ' -f 3,4" % utils.virt2uri(virt)
+ ret, out = utils.run_remote(server, cmd)
+ if ret == 0:
+ return out
+ else:
+ return None
+
16 years, 1 month
[PATCH] Fix schema for CRS, CRSC, and KVMRedirectionSAP
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1225318631 25200
# Node ID aa18184a3460b78e96353fd103443a3965317571
# Parent e53b108e82fc54142208dd48a6edd07c2eae0a68
Fix schema for CRS, CRSC, and KVMRedirectionSAP
These aren't method providers currently. Pegasus doesn't complain if the registration include the method designation, but sfcb will.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r e53b108e82fc -r aa18184a3460 schema/ConsoleRedirectionService.registration
--- a/schema/ConsoleRedirectionService.registration Wed Oct 22 09:24:16 2008 -0700
+++ b/schema/ConsoleRedirectionService.registration Wed Oct 29 15:17:11 2008 -0700
@@ -1,5 +1,5 @@
# Copyright IBM Corp. 2007
# Classname Namespace ProviderName ProviderModule ProviderTypes
-Xen_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService method instance
-KVM_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService method instance
-LXC_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService method instance
+Xen_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService instance
+KVM_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService instance
+LXC_ConsoleRedirectionService root/virt Virt_ConsoleRedirectionService Virt_ConsoleRedirectionService instance
diff -r e53b108e82fc -r aa18184a3460 schema/ConsoleRedirectionServiceCapabilities.registration
--- a/schema/ConsoleRedirectionServiceCapabilities.registration Wed Oct 22 09:24:16 2008 -0700
+++ b/schema/ConsoleRedirectionServiceCapabilities.registration Wed Oct 29 15:17:11 2008 -0700
@@ -1,5 +1,5 @@
# Copyright IBM Corp. 2007
# Classname Namespace ProviderName ProviderModule ProviderTypes
-Xen_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities method instance
-KVM_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities method instance
-LXC_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities method instance
+Xen_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities instance
+KVM_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities instance
+LXC_ConsoleRedirectionServiceCapabilities root/virt Virt_ConsoleRedirectionServiceCapabilities Virt_ConsoleRedirectionServiceCapabilities instance
diff -r e53b108e82fc -r aa18184a3460 schema/KVMRedirectionSAP.registration
--- a/schema/KVMRedirectionSAP.registration Wed Oct 22 09:24:16 2008 -0700
+++ b/schema/KVMRedirectionSAP.registration Wed Oct 29 15:17:11 2008 -0700
@@ -1,5 +1,5 @@
# Copyright IBM Corp. 2007
# Classname Namespace ProviderName ProviderModule ProviderTypes
-Xen_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP method instance
-KVM_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP method instance
-LXC_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP method instance
+Xen_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP instance
+KVM_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP instance
+LXC_KVMRedirectionSAP root/virt Virt_KVMRedirectionSAP Virt_KVMRedirectionSAP instance
16 years, 1 month