[PATCH] Replace CBGetInstance() with CBEnumInstances() in Virt_HostSystem
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1232562000 28800
# Node ID a7074d59e1e34398b8785bf218bbdbea56db0945
# Parent 62dbae6f50a56ee2d603503a704b8cd083788131
Replace CBGetInstance() with CBEnumInstances() in Virt_HostSystem
This is a work around to deal with the way the SBLIM provider determines the
FQDN of a host system. The value the SBLIM provider returns can depend on
how the /etc/hosts file is formatted, as well as other factors (running
dnsdomainname caused the provider to print two different values on my system).
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 62dbae6f50a5 -r a7074d59e1e3 src/Virt_HostSystem.c
--- a/src/Virt_HostSystem.c Tue Jan 20 22:27:01 2009 -0800
+++ b/src/Virt_HostSystem.c Wed Jan 21 10:20:00 2009 -0800
@@ -144,16 +144,10 @@
CMPIInstance **inst)
{
CMPIObjectPath *path;
+ CMPIEnumeration *en = NULL;
+ CMPIData data;
CMPIStatus s;
const char *cn = "Linux_ComputerSystem";
- char name[256];
-
- if (get_fqdn(name, sizeof(name)) != 0) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Unable to get hostname: %m");
- return s;
- }
path = CMNewObjectPath(broker, "root/cimv2", cn, &s);
if ((path == NULL) || (s.rc != CMPI_RC_OK)) {
@@ -163,11 +157,33 @@
return s;
}
- CMAddKey(path, "CreationClassName", cn, CMPI_chars);
- CMAddKey(path, "Name", name, CMPI_chars);
+ /* FIXME: This approach may return the wrong instance if more than
+ one SBLIM Linux_ComputerSystem instance exists on the system.
+ This isn't likely to happen in most cases, but a better approach
+ should be used here.
+ */
+ en = CBEnumInstances(broker, context, path, NULL, &s);
+ if (en == NULL) {
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Upcall EnumInstances of %s class failed",
+ cn);
+ goto out;
+ }
- *inst = CBGetInstance(broker, context, path, NULL, &s);
+ if (CMHasNext(en, &s)) {
+ data = CMGetNext(en, &s);
+ if (CMIsNullObject(data.value.inst)) {
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to retrieve enumeration entry");
+ goto out;
+ }
+ *inst = data.value.inst;
+ }
+
+ out:
if (s.rc != CMPI_RC_OK) {
CU_DEBUG("SBLIM: %i %s", s.rc, CMGetCharPtr(s.msg));
} else {
15 years, 9 months
[PATCH] (#2) Add interop and cimv2 ns registrations to spec
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1232740126 28800
# Node ID eb2df7761596b0fdb38c02aa741c00592e8ddf08
# Parent c87e67c92f7ceaf556e8be90547de324026f315b
(#2) Add interop and cimv2 ns registrations to spec.
Updates:
-Fix the REG and MOF values to reflext the values in Makefile.am
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r c87e67c92f7c -r eb2df7761596 libvirt-cim.spec.in
--- a/libvirt-cim.spec.in Fri Jan 16 10:19:08 2009 -0800
+++ b/libvirt-cim.spec.in Fri Jan 23 11:48:46 2009 -0800
@@ -51,6 +51,12 @@
%define REGISTRATION %{_datadir}/%{name}/*.registration
%define SCHEMA %{_datadir}/%{name}/*.mof
+%define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration
+%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile}.mof
+
+%define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,ElementConformsToProfile,HostedAccessPoint}.registration
+%define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof
+
%{_datadir}/%{name}/provider-register.sh -d -t pegasus \
-n @CIM_VIRT_NS@ \
-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
@@ -65,6 +71,15 @@
%{_datadir}/%{name}/provider-register.sh -t pegasus \
-n @CIM_VIRT_NS@ \
-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t pegasus \
+ -n @CIM_VIRT_NS@ \
+ -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t pegasus \
+ -n root/interop \
+ -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t pegasus \
+ -n root/cimv2\
+ -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true
%preun
%{_datadir}/%{name}/provider-register.sh -d -t pegasus \
15 years, 9 months
Test Run Summary (Jan 27 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb
by Deepti B Kalakeri
=================================================
Test Run Summary (Jan 27 2009): LXC on Fedora release 9.90.1 (Rawhide) with sfcb
=================================================
Distro: Fedora release 9.90.1 (Rawhide)
Kernel: 2.6.27-0.323.rc6.fc10.x86_64
libvirt: 0.4.5
Hypervisor: QEMU 0.9.1
CIMOM: sfcb sfcbd 1.3.3preview
Libvirt-cim revision: 805
Libvirt-cim changeset: c87e67c92f7c
Cimtest revision: 602
Cimtest changeset: a9dd0a50858a
=================================================
FAIL : 1
XFAIL : 8
SKIP : 32
PASS : 100
-----------------
Total : 141
=================================================
FAIL Test Summary:
ElementConforms - 01_forward.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 06_paused_active_suspend.py: XFAIL
ComputerSystem - 23_pause_pause.py: XFAIL
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
HostSystem - 02_hostsystem_to_rasd.py: XFAIL
HostedDependency - 03_enabledstate.py: XFAIL
VSSD - 04_vssd_to_rasd.py: XFAIL
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
ComputerSystemIndication - 01_created_indication.py: SKIP
ElementAllocatedFromPool - 03_reverse_errs.py: SKIP
ElementAllocatedFromPool - 04_forward_errs.py: SKIP
LogicalDisk - 01_disk.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
LogicalDisk - 03_ld_gi_errs.py: SKIP
NetworkPort - 01_netport.py: SKIP
NetworkPort - 02_np_gi_errors.py: SKIP
NetworkPort - 03_user_netport.py: SKIP
Processor - 01_processor.py: SKIP
Processor - 02_definesys_get_procs.py: SKIP
Processor - 03_proc_gi_errs.py: SKIP
RASD - 04_disk_rasd_size.py: SKIP
RASD - 05_disk_rasd_emu_type.py: SKIP
ResourceAllocationFromPool - 05_RAPF_err.py: SKIP
ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemManagementService - 06_addresource.py: SKIP
VirtualSystemManagementService - 08_modifyresource.py: SKIP
VirtualSystemManagementService - 09_procrasd_persist.py: SKIP
VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP
VirtualSystemManagementService - 12_referenced_config.py: SKIP
VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: XFAIL
ERROR - Got CIM error Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend with return code 1
ERROR - Exception variable: Unable pause dom 'DomST1'
InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: XFAIL
ERROR - Got CIM error Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend with return code 1
ERROR - Exception: 'Unable pause dom 'cs_test_domain''
InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Got CIM error Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot with return code 1
ERROR - Exception: Unable reboot dom 'cs_test_domain'
InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Got CIM error State not supported with return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: SKIP
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: SKIP
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: SKIP
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: SKIP
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: FAIL
ERROR - verify_fields() exception: u'LXC_AllocationCapabilities'
ERROR - Exception: Failed to verify instance
Class not found
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: XFAIL
ERROR - InstanceID Mismatch
ERROR - Returned CrossClass_GuestDom/mouse:xen instead of CrossClass_GuestDom/mouse:usb
Class not found
Bug:<00009>
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: XFAIL
ERROR - Exception: (1, u'Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend')
ERROR - Failed to suspend the dom: hd_domain1
InvokeMethod(RequestStateChange): Unable to pause domain: this function is not supported by the hypervisor: virDomainSuspend
Bug:<00011>
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: SKIP
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: SKIP
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: SKIP
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: SKIP
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: SKIP
--------------------------------------------------------------------
Processor - 01_processor.py: SKIP
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: SKIP
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: SKIP
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: SKIP
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: SKIP
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: SKIP
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: SKIP
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: SKIP
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: XFAIL
ERROR - InstanceID Mismatch
ERROR - Returned VSSDC_dom/mouse:xen instead of VSSDC_dom/mouse:usb
Bug:<00009>
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: SKIP
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
ERROR - rstest_domain not updated properly.
ERROR - Exp AutomaticRecoveryAction=3, got 2
Bug:<00008>
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS
--------------------------------------------------------------------
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com
15 years, 9 months
Test Run Summary (Jan 27 2009): KVM on Fedora release 9 (Sulphur) with Pegasus
by Deepti B Kalakeri
=================================================
Test Run Summary (Jan 27 2009): KVM on Fedora release 9 (Sulphur) with Pegasus
=================================================
Distro: Fedora release 9 (Sulphur)
Kernel: 2.6.25.14-108.fc9.x86_64
libvirt: 0.4.4
Hypervisor: QEMU 0.9.1
CIMOM: Pegasus 2.7.0
Libvirt-cim revision: 613
Libvirt-cim changeset: 1fcf330fadf8+
Cimtest revision: 602
Cimtest changeset: a9dd0a50858a
=================================================
FAIL : 0
XFAIL : 3
SKIP : 8
PASS : 130
-----------------
Total : 141
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
=================================================
SKIP Test Summary:
RASD - 05_disk_rasd_emu_type.py: SKIP
RedirectionService - 01_enum_crs.py: SKIP
RedirectionService - 02_enum_crscap.py: SKIP
RedirectionService - 03_RedirectionSAP_errs.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: PASS
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_FAILED: Domain Operation Failed with return code 1
ERROR - Exception: Unable reboot dom 'cs_test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Domain Operation Failed
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: PASS
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: PASS
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: PASS
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: SKIP
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: SKIP
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: SKIP
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: SKIP
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: XFAIL
ERROR - rstest_domain not updated properly.
ERROR - Exp AutomaticRecoveryAction=3, got 2
Bug:<00010>
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS
--------------------------------------------------------------------
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com
15 years, 9 months
[PATCH] [TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1232718867 28800
# Node ID 7279b969bfff758c7b24fc2223826fe7ffafb3f2
# Parent a2ecb7430c50fcf6df6019625ee1a8b8ae24dfd9
[TEST] Adding 01_enum_KVMredSAP.py of KVMRedirectionSAP.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r a2ecb7430c50 -r 7279b969bfff suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Fri Jan 23 05:54:27 2009 -0800
@@ -0,0 +1,171 @@
+#!/usr/bin/python
+#
+# Copyright 2008 IBM Corp.
+#
+# Authors:
+# Deepti B. Kalakeri <dkalaker(a)in.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
+#
+# This test case is used to verify the KVMRedirectionSAP properties in detail.
+# This test case verifies the following:
+#
+# When the domain is defined:
+# KVMRedirectionSAP.Enabled = 3 and
+# KVMRedirectionSAP.[ElementName, Name] = port used in the GRASD:-1
+#
+# When the defined domain is started:
+# KVMRedirectionSAP.Enabled = 6 and
+# KVMRedirectionSAP.[ElementName, Name] = port used in the GRASD:0
+#
+# Date : 15-01-2009
+#
+
+import sys
+import random
+from XenKvmLib.vxml import get_class
+from XenKvmLib.classes import get_typed_class
+from XenKvmLib.const import do_main, get_provider_version
+from XenKvmLib.enumclass import EnumInstances
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
+from CimTest.ReturnCodes import PASS, FAIL, SKIP
+from XenKvmLib.const import KVMRedSAP_proto, CIM_SAP_AVAILABLE_STATE, \
+ CIM_SAP_INACTIVE_STATE
+
+sup_types = ['Xen', 'KVM', 'LXC']
+libvirtcim_redSAP_changes = 716
+test_dom = 'test_kvmredsap_dom'
+
+def enum_redsap(server, virt, classname):
+ redsap_insts = { }
+ status = FAIL
+
+ try:
+ redsap_list = EnumInstances(server, classname)
+ for redsap in redsap_list:
+ guest = redsap.SystemName
+ if guest == test_dom:
+ if redsap.Classname not in redsap_insts.keys():
+ redsap_insts[redsap.Classname] = redsap
+ status = PASS
+ else:
+ raise Exception("Got more than one record for: %s" \
+ % test_dom)
+ except Exception, details:
+ logger.error(CIM_ERROR_ENUMERATE, classname)
+ logger.error("Exception details: %s", details)
+
+ return status, redsap_insts
+
+
+def verify_redsap_values(val_list, redsap_inst, classname):
+ try:
+ for key in val_list.keys():
+ redsap = redsap_inst[classname]
+ ret_val = eval('redsap.' + key)
+ if ret_val != val_list[key]:
+ raise Exception("'%s' Value Mismatch, Expected %s, Got %s" \
+ % (key, val_list[key], ret_val))
+ except Exception, details:
+ logger.error("Exception details: %s", details)
+ return FAIL
+
+ return PASS
+
+@do_main(sup_types)
+def main():
+ virt = main.options.virt
+ server = main.options.ip
+
+ cname = 'KVMRedirectionSAP'
+ classname = get_typed_class(virt, cname)
+
+ # This check is required for libivirt-cim providers which do not have
+ # REDSAP changes in it and the REDSAP provider is available with
+ # revision >= 716.
+ curr_cim_rev, changeset = get_provider_version(virt, server)
+ if curr_cim_rev < libvirtcim_redSAP_changes:
+ logger.info("'%s' provider not supported, hence skipping the tc ....",
+ classname)
+ return SKIP
+
+ vsxml = None
+ action_start = False
+
+ try:
+ virt_xml = get_class(virt)
+ lport = random.randrange(5900, 5999)
+ vsxml = virt_xml(test_dom, port_num=str(lport))
+
+ # Define the VS, and verify the KVMRedirectionSAP values.
+ ret = vsxml.cim_define(server)
+ if not ret:
+ raise Exception("Failed to define the dom: %s" % test_dom)
+
+ # val_list that will be used for comparing with enum of
+ # KVMRedirectionSAP values
+ sccn = get_typed_class(virt, 'ComputerSystem')
+ val_list = {
+ 'SystemCreationClassName' : sccn,
+ 'SystemName' : test_dom,
+ 'CreationClassName' : classname,
+ 'KVMProtocol' : KVMRedSAP_proto["vnc"],
+ 'EnabledState' : CIM_SAP_INACTIVE_STATE
+ }
+ val_list['ElementName'] = val_list['Name'] = "%s:-1" % lport
+
+ status, redsap_inst = enum_redsap(server, virt, classname)
+ if status != PASS:
+ raise Exception("Failed to get information on the defined dom:%s" \
+ % test_dom)
+
+ status = verify_redsap_values(val_list, redsap_inst, classname)
+ if status != PASS:
+ raise Exception("Failed to verify information for the defined "\
+ "dom:%s" % test_dom)
+
+ # start the guest and verify the KVMRedirectionSAP values
+ status = vsxml.cim_start(server)
+ if not ret:
+ raise Exception("Failed to start the dom: %s" % test_dom)
+
+ status, redsap_inst = enum_redsap(server, virt, classname)
+ if status != PASS:
+ action_start = True
+ raise Exception("Failed to get information for running dom:%s" \
+ % test_dom)
+
+ val_list['ElementName'] = val_list['Name'] = "%s:0" % lport
+ val_list['EnabledState'] = CIM_SAP_AVAILABLE_STATE
+
+ status = verify_redsap_values(val_list, redsap_inst, classname)
+ if status != PASS:
+ action_start = True
+ raise Exception("Failed to verify information for running dom:%s" \
+ % test_dom)
+
+ except Exception, detail:
+ logger.error("Exception: %s", detail)
+ status = FAIL
+
+ if action_start == True:
+ vsxml.cim_destroy(server)
+
+ vsxml.undefine(server)
+
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
15 years, 9 months
[PATCH] [TEST] Removed the unnecessary debug stmt in the 01_enum_KVMredSAP.py tc
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1233045681 28800
# Node ID 1ecdff1c152eaf2019ad9d3460f3fa5f68d54992
# Parent 4ad705c27d10d7be718ee92a9d0bdfb60563a4b5
[TEST] Removed the unnecessary debug stmt in the 01_enum_KVMredSAP.py tc.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 4ad705c27d10 -r 1ecdff1c152e suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py
--- a/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Tue Jan 27 00:37:10 2009 -0800
+++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Tue Jan 27 00:41:21 2009 -0800
@@ -139,7 +139,6 @@
# Once complete Graphics support for LXC is in, we need to verify the
# KVMRedirectionSAP for a running guest.
if virt == 'LXC':
- logger.error("DEBUG")
vsxml.undefine(server)
return status
15 years, 9 months
[PATCH] [TEST] #3 Adding new tc to verify KVMRedirectionSAP
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1233045430 28800
# Node ID 4ad705c27d10d7be718ee92a9d0bdfb60563a4b5
# Parent a9dd0a50858aa1c382278393d863b213c8c5b565
[TEST] #3 Adding new tc to verify KVMRedirectionSAP.
Changes:
--------
>From Patch 2 to 3:
------------------
1) Changed the import stmt for randrange.
2) Changes to verify KVMRedirectionSAP for defined guest in case of LXC.
3) Included g.mof() in the RASD list returned by default_vssd_rasd_str().
Updates from patch 1 to 2:
--------------------------
Added GRASD support in the call to DefineSytem().
Modified vxml.py , vsms.py and const.py to support GRASD.
Tested with KVM/Xen/LXC on current sources and KVM with F9 rpm.
This tc will fail for Xen with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r a9dd0a50858a -r 4ad705c27d10 suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/01_enum_KVMredSAP.py Tue Jan 27 00:37:10 2009 -0800
@@ -0,0 +1,178 @@
+#!/usr/bin/python
+#
+# Copyright 2008 IBM Corp.
+#
+# Authors:
+# Deepti B. Kalakeri <dkalaker(a)in.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
+#
+# This test case is used to verify the KVMRedirectionSAP properties in detail.
+# This test case verifies the following:
+#
+# When the domain is defined:
+# KVMRedirectionSAP.Enabled = 3 and
+# KVMRedirectionSAP.[ElementName, Name] = port used in the GRASD:-1
+#
+# When the defined domain is started:
+# KVMRedirectionSAP.Enabled = 6 and
+# KVMRedirectionSAP.[ElementName, Name] = port used in the GRASD:0
+#
+# Date : 15-01-2009
+#
+
+import sys
+from random import randrange
+from XenKvmLib.vxml import get_class
+from XenKvmLib.classes import get_typed_class
+from XenKvmLib.const import do_main, get_provider_version
+from XenKvmLib.enumclass import EnumInstances
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
+from CimTest.ReturnCodes import PASS, FAIL, SKIP
+from XenKvmLib.const import KVMRedSAP_proto, CIM_SAP_AVAILABLE_STATE, \
+ CIM_SAP_INACTIVE_STATE
+
+sup_types = ['Xen', 'KVM', 'LXC']
+libvirtcim_redSAP_changes = 716
+test_dom = 'test_kvmredsap_dom'
+
+def enum_redsap(server, virt, classname):
+ redsap_insts = { }
+ status = FAIL
+
+ try:
+ redsap_list = EnumInstances(server, classname)
+ for redsap in redsap_list:
+ if redsap.SystemName == test_dom:
+ if redsap.Classname not in redsap_insts.keys():
+ redsap_insts[redsap.Classname] = redsap
+ status = PASS
+ else:
+ raise Exception("Got more than one record for: %s" \
+ % test_dom)
+ except Exception, details:
+ logger.error(CIM_ERROR_ENUMERATE, classname)
+ logger.error("Exception details: %s", details)
+
+ return status, redsap_insts
+
+
+def verify_redsap_values(val_list, redsap_inst, classname):
+ try:
+ for key in val_list.keys():
+ redsap = redsap_inst[classname]
+ ret_val = eval('redsap.' + key)
+ if ret_val != val_list[key]:
+ raise Exception("'%s' Value Mismatch, Expected %s, Got %s" \
+ % (key, val_list[key], ret_val))
+ except Exception, details:
+ logger.error("Exception details: %s", details)
+ return FAIL
+
+ return PASS
+
+@do_main(sup_types)
+def main():
+ virt = main.options.virt
+ server = main.options.ip
+
+ cname = 'KVMRedirectionSAP'
+ classname = get_typed_class(virt, cname)
+
+ # This check is required for libivirt-cim providers which do not have
+ # REDSAP changes in it and the REDSAP provider is available with
+ # revision >= 716.
+ curr_cim_rev, changeset = get_provider_version(virt, server)
+ if curr_cim_rev < libvirtcim_redSAP_changes:
+ logger.info("'%s' provider not supported, hence skipping the tc ....",
+ classname)
+ return SKIP
+
+ vsxml = None
+ action_start = False
+
+ try:
+ virt_xml = get_class(virt)
+ lport = randrange(5900, 5999)
+ vsxml = virt_xml(test_dom, port_num=str(lport))
+
+ # Define the VS, and verify the KVMRedirectionSAP values.
+ ret = vsxml.cim_define(server)
+ if not ret:
+ raise Exception("Failed to define the dom: %s" % test_dom)
+
+ # val_list that will be used for comparing with enum of
+ # KVMRedirectionSAP values
+ sccn = get_typed_class(virt, 'ComputerSystem')
+ val_list = {
+ 'SystemCreationClassName' : sccn,
+ 'SystemName' : test_dom,
+ 'CreationClassName' : classname,
+ 'KVMProtocol' : KVMRedSAP_proto["vnc"],
+ 'EnabledState' : CIM_SAP_INACTIVE_STATE
+ }
+ val_list['ElementName'] = val_list['Name'] = "%s:-1" % lport
+
+ status, redsap_inst = enum_redsap(server, virt, classname)
+ if status != PASS:
+ raise Exception("Failed to get information on the defined dom:%s" \
+ % test_dom)
+
+ status = verify_redsap_values(val_list, redsap_inst, classname)
+ if status != PASS:
+ raise Exception("Failed to verify information for the defined "\
+ "dom:%s" % test_dom)
+
+ # For now verifying KVMRedirectoinSAP only for a defined LXC guest.
+ # Once complete Graphics support for LXC is in, we need to verify the
+ # KVMRedirectionSAP for a running guest.
+ if virt == 'LXC':
+ logger.error("DEBUG")
+ vsxml.undefine(server)
+ return status
+
+ # start the guest and verify the KVMRedirectionSAP values
+ status = vsxml.cim_start(server)
+ if not ret:
+ raise Exception("Failed to start the dom: %s" % test_dom)
+
+ status, redsap_inst = enum_redsap(server, virt, classname)
+ if status != PASS:
+ action_start = True
+ raise Exception("Failed to get information for running dom:%s" \
+ % test_dom)
+
+ val_list['ElementName'] = val_list['Name'] = "%s:0" % lport
+ val_list['EnabledState'] = CIM_SAP_AVAILABLE_STATE
+
+ status = verify_redsap_values(val_list, redsap_inst, classname)
+ if status != PASS:
+ action_start = True
+ raise Exception("Failed to verify information for running dom:%s" \
+ % test_dom)
+
+ except Exception, detail:
+ logger.error("Exception: %s", detail)
+ status = FAIL
+
+ if action_start == True:
+ vsxml.cim_destroy(server)
+
+ vsxml.undefine(server)
+
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
diff -r a9dd0a50858a -r 4ad705c27d10 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Jan 22 08:55:09 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Tue Jan 27 00:37:10 2009 -0800
@@ -46,6 +46,15 @@
# Default TimeoutPeriod param for CS.RequestedStateChange()
TIME = "00000000000000.000000:000"
+
+#KVMRedirectionSAP protocol values
+KVMRedSAP_proto = { 'raw' : 2, 'rdp' : 3, 'vnc' : 4 }
+
+# CIM values for KVMRedirectionSAP.EnabledState
+CIM_SAP_ACTIVE_STATE = 2
+CIM_SAP_INACTIVE_STATE = 3
+CIM_SAP_AVAILABLE_STATE = 6
+
# vxml.NetXML
default_bridge_name = 'testbridge'
diff -r a9dd0a50858a -r 4ad705c27d10 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Thu Jan 22 08:55:09 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jan 27 00:37:10 2009 -0800
@@ -33,6 +33,7 @@
RASD_TYPE_NET_ETHER = 10
RASD_TYPE_NET_OTHER = 11
RASD_TYPE_DISK = 17
+RASD_TYPE_GRAPHICS = 24
VSSD_RECOVERY_NONE = 2
VSSD_RECOVERY_RESTART = 3
@@ -232,6 +233,36 @@
def get_masd_class(virt):
pass
+
+class CIM_GraphicsResourceAllocationSettingData(CIMClassMOF):
+ def __init__(self, name, res_sub_type="vnc", ip="127.0.0.1",
+ lport='-1', keymap="en-us"):
+ self.InstanceID = '%s/graphics' %name
+ self.ResourceType = RASD_TYPE_GRAPHICS
+
+ if res_sub_type != None:
+ self.ResourceSubType = res_sub_type
+
+ if ip != None and lport != None:
+ self.Address = '%s:%s' % (ip, lport)
+
+ if keymap != None:
+ self.KeyMap = keymap
+
+
+class Xen_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData):
+ pass
+
+class KVM_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData):
+ pass
+
+class LXC_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData):
+ pass
+
+@eval_cls('GraphicsResourceAllocationSettingData')
+def get_gasd_class(virt):
+ pass
+
def default_vssd_rasd_str(dom_name='test_domain',
disk_dev='xvda',
disk_source=const.Xen_disk_path,
@@ -272,9 +303,12 @@
mallocunits=malloc_units,
name=dom_name)
+ class_gasd = get_gasd_class(virt)
+ g = class_gasd(name=dom_name)
+
# LXC only takes disk and memory device for now.
if virt == 'LXC':
- return vssd, [d.mof(), m.mof()]
+ return vssd, [d.mof(), m.mof(), g.mof()]
class_nasd = get_nasd_class(virt)
if net_mac != const.Xen_default_mac:
@@ -293,5 +327,5 @@
p = class_pasd(vcpu=proc_vcpu,
name=dom_name)
- return vssd, [d.mof(), n.mof(), p.mof(), m.mof()]
+ return vssd, [d.mof(), n.mof(), p.mof(), m.mof(), g.mof()]
diff -r a9dd0a50858a -r 4ad705c27d10 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 22 08:55:09 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Jan 27 00:37:10 2009 -0800
@@ -413,7 +413,6 @@
'/domain/devices/interface/source/@network')
return networkStr
-
def dumpxml(self, ip):
cmd = 'virsh -c %s dumpxml %s' % (self.vuri, self.dname)
s, o = utils.run_remote(ip, cmd)
@@ -467,7 +466,8 @@
class VirtCIM:
def __init__(self, virt, dom_name, disk_dev, disk_source,
net_type, net_name, net_mac, vcpus, mem,
- mem_allocunits, emu_type):
+ mem_allocunits, emu_type, grstype, ip,
+ port_num, kmap):
self.virt = virt
self.domain_name = dom_name
self.err_rc = None
@@ -488,7 +488,9 @@
self.masd = vsms.get_masd_class(virt)(megabytes=mem,
mallocunits=mem_allocunits,
name=dom_name)
-
+ self.gasd = vsms.get_gasd_class(virt)(name=dom_name,
+ res_sub_type=grstype, ip=ip,
+ lport=port_num, keymap=kmap)
def cim_define(self, ip, ref_conf=None):
service = vsms.get_vsms_class(self.virt)(ip)
@@ -506,6 +508,8 @@
pass
else:
res_settings.append(str(self.nasd))
+ if self.gasd is not None:
+ res_settings.append(str(self.gasd))
if ref_conf is None:
ref_conf = ' '
@@ -657,6 +661,8 @@
self.dasd = rasd
elif cn.find("NetResourceAllocationSettingData") >= 0:
self.nasd = rasd
+ elif cn.find("GraphicsResourceAllocationSettingData") >= 0:
+ self.gasd = rasd
def verify_error_msg(self, exp_rc, exp_desc):
try:
@@ -688,7 +694,8 @@
disk=const.Xen_default_disk_dev,
ntype=const.default_net_type,
net_name=const.default_network_name,
- emu_type=None):
+ emu_type=None, grstype="vnc", address="127.0.0.1",
+ port_num='-1', keymap="en-us"):
if not (os.path.exists(const.Xen_kernel_path) \
and os.path.exists(const.Xen_init_path)):
logger.error('ERROR: Either the kernel image '
@@ -700,7 +707,7 @@
VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path,
ntype, net_name, mac, vcpus, mem, mem_allocunits,
- emu_type)
+ emu_type, grstype, address, port_num, keymap)
def _os(self, os_kernel, os_initrd):
os = self.get_node('/domain/os')
@@ -750,14 +757,16 @@
disk=const.KVM_default_disk_dev,
ntype=const.default_net_type,
net_name=const.default_network_name,
- emu_type=None):
+ emu_type=None, grstype="vnc", address="127.0.0.1",
+ port_num='-1', keymap="en-us"):
if not os.path.exists(disk_file_path):
logger.error('Error: Disk image does not exist')
sys.exit(1)
VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus)
VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path,
ntype, net_name, mac, vcpus, mem,
- mem_allocunits, emu_type)
+ mem_allocunits, emu_type, grstype, address,
+ port_num, keymap)
self._os()
self._devices(const.KVM_default_emulator, ntype,
disk_file_path, disk, mac, net_name)
@@ -802,14 +811,15 @@
disk=const.XenFV_default_disk_dev,
ntype=const.default_net_type,
net_name=const.default_network_name,
- emu_type=None):
+ emu_type=None, grstype="vnc",
+ address="127.0.0.1", port_num='-1', keymap="en-us"):
if not os.path.exists(disk_file_path):
logger.error('Error: Disk image does not exist')
sys.exit(1)
VirtXML.__init__(self, 'xenfv', test_dom, set_uuid(), mem, vcpus)
VirtCIM.__init__(self, 'XenFV', test_dom, disk, disk_file_path,
ntype, net_name, mac, vcpus, mem, mem_allocunits,
- emu_type)
+ emu_type, grstype, address, port_num, keymap)
self._features()
self._os(const.XenFV_default_loader)
self._devices(const.XenFV_default_emulator,
@@ -856,11 +866,13 @@
mac=const.LXC_default_mac,
ntype=const.default_net_type,
net_name=const.default_network_name,
- tty=const.LXC_default_tty):
+ tty=const.LXC_default_tty, grstype="vnc",
+ address="127.0.0.1", port_num='-1', keymap="en-us"):
VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus)
VirtCIM.__init__(self, 'LXC', test_dom, const.LXC_default_mp,
const.LXC_default_source, ntype, net_name, mac, vcpus,
- mem, const.default_mallocunits, None)
+ mem, const.default_mallocunits, None, grstype,
+ address, port_num, keymap)
self._os(const.LXC_init_path)
self._devices(mac, ntype, net_name, const.LXC_default_tty)
self.create_lxc_file(CIM_IP, const.LXC_init_path)
15 years, 9 months
[PATCH] [TEST] #2 Adding new tc to verify KVMRedirectionSAP
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1232714174 28800
# Node ID a2ecb7430c50fcf6df6019625ee1a8b8ae24dfd9
# Parent ef20310648bc1d22c4c6aa23bcc092a01a49e340
[TEST] #2 Adding new tc to verify KVMRedirectionSAP.
Updates from patch 1 to 2:
--------------------------
Added GRASD support in the call to DefineSytem().
Modified necessary places for GRASD.
Tested with KVM/Xen/LXC on current sources and KVM with F9 rpm.
This tc will fail with LXC, Xen with current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r ef20310648bc -r a2ecb7430c50 suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py Thu Jan 22 01:15:12 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py Fri Jan 23 04:36:14 2009 -0800
@@ -46,6 +46,15 @@
# Default TimeoutPeriod param for CS.RequestedStateChange()
TIME = "00000000000000.000000:000"
+
+#KVMRedirectionSAP protocol values
+KVMRedSAP_proto = { 'raw' : 2, 'rdp' : 3, 'vnc' : 4 }
+
+# CIM values for KVMRedirectionSAP.EnabledState
+CIM_SAP_ACTIVE_STATE = 2
+CIM_SAP_INACTIVE_STATE = 3
+CIM_SAP_AVAILABLE_STATE = 6
+
# vxml.NetXML
default_bridge_name = 'testbridge'
diff -r ef20310648bc -r a2ecb7430c50 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Thu Jan 22 01:15:12 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri Jan 23 04:36:14 2009 -0800
@@ -33,6 +33,7 @@
RASD_TYPE_NET_ETHER = 10
RASD_TYPE_NET_OTHER = 11
RASD_TYPE_DISK = 17
+RASD_TYPE_GRAPHICS = 24
VSSD_RECOVERY_NONE = 2
VSSD_RECOVERY_RESTART = 3
@@ -232,6 +233,36 @@
def get_masd_class(virt):
pass
+
+class CIM_GraphicsResourceAllocationSettingData(CIMClassMOF):
+ def __init__(self, name, res_sub_type="vnc", ip="127.0.0.1",
+ lport='-1', keymap="en-us"):
+ self.InstanceID = '%s/graphics' %name
+ self.ResourceType = RASD_TYPE_GRAPHICS
+
+ if res_sub_type != None:
+ self.ResourceSubType = res_sub_type
+
+ if ip != None and lport != None:
+ self.Address = '%s:%s' % (ip, lport)
+
+ if keymap != None:
+ self.KeyMap = keymap
+
+
+class Xen_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData):
+ pass
+
+class KVM_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData):
+ pass
+
+class LXC_GraphicsResourceAllocationSettingData(CIM_GraphicsResourceAllocationSettingData):
+ pass
+
+@eval_cls('GraphicsResourceAllocationSettingData')
+def get_gasd_class(virt):
+ pass
+
def default_vssd_rasd_str(dom_name='test_domain',
disk_dev='xvda',
disk_source=const.Xen_disk_path,
@@ -272,9 +303,12 @@
mallocunits=malloc_units,
name=dom_name)
+ class_gasd = get_gasd_class(virt)
+ g = class_gasd(name=dom_name)
+
# LXC only takes disk and memory device for now.
if virt == 'LXC':
- return vssd, [d.mof(), m.mof()]
+ return vssd, [d.mof(), m.mof()], g.mof()
class_nasd = get_nasd_class(virt)
if net_mac != const.Xen_default_mac:
@@ -293,5 +327,5 @@
p = class_pasd(vcpu=proc_vcpu,
name=dom_name)
- return vssd, [d.mof(), n.mof(), p.mof(), m.mof()]
+ return vssd, [d.mof(), n.mof(), p.mof(), m.mof(), g.mof()]
diff -r ef20310648bc -r a2ecb7430c50 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Thu Jan 22 01:15:12 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Jan 23 04:36:14 2009 -0800
@@ -413,7 +413,6 @@
'/domain/devices/interface/source/@network')
return networkStr
-
def dumpxml(self, ip):
cmd = 'virsh -c %s dumpxml %s' % (self.vuri, self.dname)
s, o = utils.run_remote(ip, cmd)
@@ -467,7 +466,8 @@
class VirtCIM:
def __init__(self, virt, dom_name, disk_dev, disk_source,
net_type, net_name, net_mac, vcpus, mem,
- mem_allocunits, emu_type):
+ mem_allocunits, emu_type, grstype, ip,
+ port_num, kmap):
self.virt = virt
self.domain_name = dom_name
self.err_rc = None
@@ -488,7 +488,9 @@
self.masd = vsms.get_masd_class(virt)(megabytes=mem,
mallocunits=mem_allocunits,
name=dom_name)
-
+ self.gasd = vsms.get_gasd_class(virt)(name=dom_name,
+ res_sub_type=grstype, ip=ip,
+ lport=port_num, keymap=kmap)
def cim_define(self, ip, ref_conf=None):
service = vsms.get_vsms_class(self.virt)(ip)
@@ -506,6 +508,8 @@
pass
else:
res_settings.append(str(self.nasd))
+ if self.gasd is not None:
+ res_settings.append(str(self.gasd))
if ref_conf is None:
ref_conf = ' '
@@ -657,6 +661,8 @@
self.dasd = rasd
elif cn.find("NetResourceAllocationSettingData") >= 0:
self.nasd = rasd
+ elif cn.find("GraphicsResourceAllocationSettingData") >= 0:
+ self.gasd = rasd
def verify_error_msg(self, exp_rc, exp_desc):
try:
@@ -688,7 +694,8 @@
disk=const.Xen_default_disk_dev,
ntype=const.default_net_type,
net_name=const.default_network_name,
- emu_type=None):
+ emu_type=None, grstype="vnc", address="127.0.0.1",
+ port_num='-1', keymap="en-us"):
if not (os.path.exists(const.Xen_kernel_path) \
and os.path.exists(const.Xen_init_path)):
logger.error('ERROR: Either the kernel image '
@@ -700,7 +707,7 @@
VirtCIM.__init__(self, 'Xen', test_dom, disk, disk_file_path,
ntype, net_name, mac, vcpus, mem, mem_allocunits,
- emu_type)
+ emu_type, grstype, address, port_num, keymap)
def _os(self, os_kernel, os_initrd):
os = self.get_node('/domain/os')
@@ -750,14 +757,16 @@
disk=const.KVM_default_disk_dev,
ntype=const.default_net_type,
net_name=const.default_network_name,
- emu_type=None):
+ emu_type=None, grstype="vnc", address="127.0.0.1",
+ port_num='-1', keymap="en-us"):
if not os.path.exists(disk_file_path):
logger.error('Error: Disk image does not exist')
sys.exit(1)
VirtXML.__init__(self, 'kvm', test_dom, set_uuid(), mem, vcpus)
VirtCIM.__init__(self, 'KVM', test_dom, disk, disk_file_path,
ntype, net_name, mac, vcpus, mem,
- mem_allocunits, emu_type)
+ mem_allocunits, emu_type, grstype, address,
+ port_num, keymap)
self._os()
self._devices(const.KVM_default_emulator, ntype,
disk_file_path, disk, mac, net_name)
@@ -802,14 +811,15 @@
disk=const.XenFV_default_disk_dev,
ntype=const.default_net_type,
net_name=const.default_network_name,
- emu_type=None):
+ emu_type=None, grstype="vnc",
+ address="127.0.0.1", port_num='-1', keymap="en-us"):
if not os.path.exists(disk_file_path):
logger.error('Error: Disk image does not exist')
sys.exit(1)
VirtXML.__init__(self, 'xenfv', test_dom, set_uuid(), mem, vcpus)
VirtCIM.__init__(self, 'XenFV', test_dom, disk, disk_file_path,
ntype, net_name, mac, vcpus, mem, mem_allocunits,
- emu_type)
+ emu_type, grstype, address, port_num, keymap)
self._features()
self._os(const.XenFV_default_loader)
self._devices(const.XenFV_default_emulator,
@@ -856,11 +866,13 @@
mac=const.LXC_default_mac,
ntype=const.default_net_type,
net_name=const.default_network_name,
- tty=const.LXC_default_tty):
+ tty=const.LXC_default_tty, grstype="vnc",
+ address="127.0.0.1", port_num='-1', keymap="en-us"):
VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus)
VirtCIM.__init__(self, 'LXC', test_dom, const.LXC_default_mp,
const.LXC_default_source, ntype, net_name, mac, vcpus,
- mem, const.default_mallocunits, None)
+ mem, const.default_mallocunits, None, grstype,
+ address, port_num, keymap)
self._os(const.LXC_init_path)
self._devices(mac, ntype, net_name, const.LXC_default_tty)
self.create_lxc_file(CIM_IP, const.LXC_init_path)
15 years, 9 months
[PATCH] Add interop and cimv2 ns registrations to spec
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1232577959 28800
# Node ID 29c0ffe73355b4461eff24a3ba5263bea61e0e7a
# Parent 818470c2d36f7f573491be79cb8b414cc638da61
Add interop and cimv2 ns registrations to spec.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 818470c2d36f -r 29c0ffe73355 libvirt-cim.spec.in
--- a/libvirt-cim.spec.in Tue Jan 20 08:06:05 2009 -0800
+++ b/libvirt-cim.spec.in Wed Jan 21 14:45:59 2009 -0800
@@ -51,6 +51,12 @@
%define REGISTRATION %{_datadir}/%{name}/*.registration
%define SCHEMA %{_datadir}/%{name}/*.mof
+%define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration
+%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.mof
+
+%define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.registration
+%define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof
+
%{_datadir}/%{name}/provider-register.sh -d -t pegasus \
-n @CIM_VIRT_NS@ \
-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
@@ -65,6 +71,15 @@
%{_datadir}/%{name}/provider-register.sh -t pegasus \
-n @CIM_VIRT_NS@ \
-r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t pegasus \
+ -n @CIM_VIRT_NS@ \
+ -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t pegasus \
+ -n root/interop \
+ -r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t pegasus \
+ -n root/cimv2\
+ -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true
%preun
%{_datadir}/%{name}/provider-register.sh -d -t pegasus \
15 years, 9 months
[PATCH] Add support for EmulatedType 1 to SDC
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1232129948 28800
# Node ID 2409abcca2b26accdb8529a0951b42446ddcc1f0
# Parent 8c56ab06aeb9b89f419f1befe6182c92ad5edbb8
Add support for EmulatedType 1 to SDC.
Also fix a bug with the if statement in set_disk_props() and a spacing bug.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 8c56ab06aeb9 -r 2409abcca2b2 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Wed Jan 14 08:41:52 2009 -0800
+++ b/src/Virt_SettingsDefineCapabilities.c Fri Jan 16 10:19:08 2009 -0800
@@ -611,13 +611,13 @@
const CMPIObjectPath *ref,
const char *id,
uint64_t disk_size,
+ uint16_t emu_type,
struct inst_list *list)
{
const char *addr;
const char *dev;
CMPIInstance *inst;
CMPIStatus s = {CMPI_RC_OK, NULL};
- uint16_t emu_type = 0;
if (type == DOMAIN_LXC) {
addr = "/tmp";
@@ -646,7 +646,7 @@
dev = "xvda";
CMSetProperty(inst, "Caption",
(CMPIValue *)"PV disk", CMPI_chars);
- } else if (type, DOMAIN_XENFV) {
+ } else if (type == DOMAIN_XENFV) {
CMSetProperty(inst, "Caption",
(CMPIValue *)"FV disk", CMPI_chars);
}
@@ -671,6 +671,7 @@
char *pfx;
const char *id;
uint64_t disk_size;
+ uint16_t emu_type = 0;
CMPIStatus s = {CMPI_RC_OK, NULL};
switch(template_type) {
@@ -702,16 +703,54 @@
pfx = class_prefix_name(CLASSNAME(ref));
if (STREQ(pfx, "Xen")) {
- s = set_disk_props(DOMAIN_XENPV, ref, id, disk_size, list);
-
+ int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV};
+ int i = 0;
+
+ for (; i < 2; i++) {
+ emu_type = 0;
+ s = set_disk_props(xen_type[i],
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ emu_type = 1;
+ s = set_disk_props(xen_type[i],
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+ }
+ } else if (STREQ(pfx, "KVM")) {
+ s = set_disk_props(DOMAIN_KVM,
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
if (s.rc != CMPI_RC_OK)
- goto out;
+ goto out;
- s = set_disk_props(DOMAIN_XENFV, ref, id, disk_size, list);
- } else if (STREQ(pfx, "KVM")) {
- s = set_disk_props(DOMAIN_KVM, ref, id, disk_size, list);
+ emu_type = 1;
+ s = set_disk_props(DOMAIN_KVM,
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
} else if (STREQ(pfx, "LXC")) {
- s = set_disk_props(DOMAIN_LXC, ref, id, disk_size, list);
+ s = set_disk_props(DOMAIN_LXC,
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
} else {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
15 years, 9 months