Test Run Summary (Jul 27 2009): KVM on SUSE Linux Enterprise Server 11 (i586) with sfcb
by Deepti B Kalakeri
=================================================
Test Run Summary (Jul 27 2009): KVM on SUSE Linux Enterprise Server 11 (i586) with sfcb
=================================================
Distro: SUSE Linux Enterprise Server 11 (i586)
Kernel: 2.6.27.19-5-pae
libvirt: 0.4.6
Hypervisor: QEMU 0.9.1
CIMOM: sfcb sfcbd 1.3.2
Libvirt-cim revision: 934
Libvirt-cim changeset: ba165481b932+
Cimtest revision: 739
Cimtest changeset: ad67e5d20ee2
=================================================
FAIL : 4
XFAIL : 5
SKIP : 10
PASS : 146
-----------------
Total : 165
=================================================
FAIL Test Summary:
ComputerSystemIndication - 01_created_indication.py: FAIL
HostSystem - 03_hs_to_settdefcap.py: FAIL
SettingsDefineCapabilities - 01_forward.py: FAIL
VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL
VirtualSystemManagementService - 16_removeresource.py: XFAIL
VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP
VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Got CIM error Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot with return code 1
ERROR - Exception: Unable reboot dom 'cs_test_domain'
InvokeMethod(RequestStateChange): Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Got CIM error State not supported with return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: FAIL
ERROR - Waited too long for define indication
ERROR - Waited too long for start indication
ERROR - Waited too long for destroy indication
--------------------------------------------------------------------
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: PASS
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: FAIL
ERROR - KVM_SettingsDefineCapabilities returned 52 RASD objects instead of 48 for DiskPool/cimtest-diskpool
Class not found
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
HostedAccessPoint - 01_forward.py: PASS
--------------------------------------------------------------------
HostedAccessPoint - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: PASS
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: PASS
--------------------------------------------------------------------
RASD - 06_parent_net_pool.py: PASS
--------------------------------------------------------------------
RASD - 07_parent_disk_pool.py: PASS
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 08_CreateDiskResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 09_DeleteDiskPool.py: PASS
--------------------------------------------------------------------
ServiceAccessBySAP - 01_forward.py: PASS
--------------------------------------------------------------------
ServiceAccessBySAP - 02_reverse.py: PASS
--------------------------------------------------------------------
ServiceAffectsElement - 01_forward.py: PASS
--------------------------------------------------------------------
ServiceAffectsElement - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: FAIL
ERROR - KVM_SettingsDefineCapabilities returned 48 ResourcePool objects instead of 44
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL
ERROR - Got CIM error ResourceSettings Error: Conflicting MAC Addresses with return code 1
ERROR - Unable define domain rstest_domain2
ERROR - Unable to define rstest_domain2
InvokeMethod(DefineSystem): ResourceSettings Error: Conflicting MAC Addresses
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 16_removeresource.py: XFAIL
ERROR - 0 RASD insts for domain/mouse:ps2
No such instance (no device domain/mouse:ps2)
Bug:<00014>
--------------------------------------------------------------------
VirtualSystemManagementService - 17_removeresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 18_define_sys_bridge.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 19_definenetwork_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 20_verify_vnc_password.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 21_createVS_verifyMAC.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL
ERROR - Error invoking AddRS: add_net_res
ERROR - (1, u'Unable to change (0) device: Error 0')
ERROR - Failed to destroy Virtual Network 'my_network1'
InvokeMethod(AddResourceSettings): Unable to change (0) device: Error 0
Bug:<00015>
--------------------------------------------------------------------
VirtualSystemManagementService - 23_verify_duplicate_mac_err.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: SKIP
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 03_create_snapshot.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, 3 months
[PATCH] Initialize const char * in parse_disk_pool()
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1248994766 25200
# Node ID 02bb726b1ed329000ea329aac36e954f8f81f432
# Parent 88cccd3d8ef6d1e8e7c797c30ca027bce4db053f
Initialize const char * in parse_disk_pool()
Otherwise newer versions of gcc will throw a compile warning.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 88cccd3d8ef6 -r 02bb726b1ed3 libxkutil/pool_parsing.c
--- a/libxkutil/pool_parsing.c Wed Jul 29 15:05:20 2009 -0700
+++ b/libxkutil/pool_parsing.c Thu Jul 30 15:59:26 2009 -0700
@@ -147,8 +147,8 @@
{
xmlNode **nodes = nsv->nodeTab;
xmlNode *child;
- const char *type_str;
- const char *name;
+ const char *type_str = NULL;
+ const char *name = NULL;
int type = 0;
type_str = get_attr_value(nodes[0], "type");
15 years, 3 months
[PATCH] [TEST] #2 Fixed indications.py to import sleep()
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1249018839 25200
# Node ID c1d8168e6ff0a7883fac582d19af5e68ad979bbc
# Parent e4d3d6799e9c73a7a68393782a4292187b777b01
[TEST] #2 Fixed indications.py to import sleep()
Patch 2:
--------
corrected the typo
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r e4d3d6799e9c -r c1d8168e6ff0 suites/libvirt-cim/lib/XenKvmLib/indications.py
--- a/suites/libvirt-cim/lib/XenKvmLib/indications.py Thu Jul 30 04:40:58 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/indications.py Thu Jul 30 22:40:39 2009 -0700
@@ -22,6 +22,7 @@
#
from signal import SIGKILL
+from time import sleep
from CimTest.Globals import logger
from XenKvmLib.indication_tester import CIMIndicationSubscription
from XenKvmLib.vxml import set_default
15 years, 3 months
[PATCH] [TEST] Fixed indications.py to import sleep()
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1248954666 25200
# Node ID b01abd8b9002071cb796b0a5023ac6ce13696262
# Parent e4d3d6799e9c73a7a68393782a4292187b777b01
[TEST] Fixed indications.py to import sleep()
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r e4d3d6799e9c -r b01abd8b9002 suites/libvirt-cim/lib/XenKvmLib/indications.py
--- a/suites/libvirt-cim/lib/XenKvmLib/indications.py Thu Jul 30 04:40:58 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/indications.py Thu Jul 30 04:51:06 2009 -0700
@@ -22,6 +22,7 @@
#
from signal import SIGKILL
+from time import slepp
from CimTest.Globals import logger
from XenKvmLib.indication_tester import CIMIndicationSubscription
from XenKvmLib.vxml import set_default
15 years, 3 months
[PATCH] Fix possible seg fault in resource_add() and resource_mod()
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1248905120 25200
# Node ID d7f583a37de4224d6c74bab3c36caee1c0dc6216
# Parent b9c58e6a654f29fcc49a12457ed12fc57ec15953
Fix possible seg fault in resource_add() and resource_mod()
If a user attempts to add a virtual NIC with a MAC that is already in use, the
provider doesn't current check the return from rasd_to_vdev(). This means
the net device struct isn't properly filled out and will result in a seg fault.
To fix this, be sure to check the return of rast_to_vdev() and return an error
accordingly.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r b9c58e6a654f -r d7f583a37de4 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Wed Jul 29 11:26:26 2009 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Wed Jul 29 15:05:20 2009 -0700
@@ -1869,6 +1869,7 @@
struct virt_device *list;
struct virt_device *dev;
int *count = NULL;
+ const char *msg = NULL;
op = CMGetObjectPath(rasd, &s);
if ((op == NULL) || (s.rc != CMPI_RC_OK))
@@ -1915,7 +1916,14 @@
dev = &list[*count];
dev->type = type;
- rasd_to_vdev(rasd, dominfo, dev, ns);
+ msg = rasd_to_vdev(rasd, dominfo, dev, ns);
+ if (msg != NULL) {
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Add resource failed: %s",
+ msg);
+ goto out;
+ }
if ((type == CIM_RES_TYPE_GRAPHICS) || (type == CIM_RES_TYPE_INPUT)) {
(*count)++;
@@ -1948,6 +1956,7 @@
struct virt_device *list;
int *count;
int i;
+ const char *msg = NULL;
if (devid == NULL) {
cu_statusf(_BROKER, &s,
@@ -1978,7 +1987,14 @@
struct virt_device *dev = &list[i];
if (STREQ(dev->id, devid)) {
- rasd_to_vdev(rasd, dominfo, dev, ns);
+ msg = rasd_to_vdev(rasd, dominfo, dev, ns);
+ if (msg != NULL) {
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Modify resource failed: %s",
+ msg);
+ goto out;
+ }
if ((type == CIM_RES_TYPE_GRAPHICS) ||
(type == CIM_RES_TYPE_INPUT))
15 years, 3 months
[PATCH] If the useer specifies a ReferencedConfiguration, be sure to generate a new
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1248812402 25200
# Node ID cd7e42dad453bf6b0269274dd43e354b89c1734d
# Parent ba165481b932c372b13e0cf458e99f86bd843282
If the useer specifies a ReferencedConfiguration, be sure to generate a new...
MAC address since MACs cannot collide.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r ba165481b932 -r cd7e42dad453 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Mon Jul 20 13:27:37 2009 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Tue Jul 28 13:20:02 2009 -0700
@@ -1276,6 +1276,7 @@
virDomainPtr dom = NULL;
char *name = NULL;
const char *iid;
+ const char *mac;
CMPIStatus s;
int ret;
@@ -1336,6 +1337,18 @@
(*domain)->name = NULL;
free((*domain)->uuid);
(*domain)->uuid = NULL;
+ free((*domain)->dev_net->dev.net.mac);
+ (*domain)->dev_net->dev.net.mac = NULL;
+
+ mac = _net_rand_mac();
+ if (mac == NULL) {
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_INVALID_PARAMETER,
+ "Unable to generate a MAC address for guest %s",
+ name);
+ goto out;
+ }
+ (*domain)->dev_net->dev.net.mac = strdup(mac);
out:
virDomainFree(dom);
15 years, 3 months
[PATCH] [TEST] #2 Added disk backed pool support
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1248954058 25200
# Node ID e4d3d6799e9c73a7a68393782a4292187b777b01
# Parent 0abff40a58a5d1d9ee4963355aec56bed87e5400
[TEST] #2 Added disk backed pool support
Tested with KVM on SLES11 and current sources.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 0abff40a58a5 -r e4d3d6799e9c suites/libvirt-cim/misc_cimtests/create_verify_storagepool.py
--- a/suites/libvirt-cim/misc_cimtests/create_verify_storagepool.py Wed Jul 29 04:07:07 2009 -0700
+++ b/suites/libvirt-cim/misc_cimtests/create_verify_storagepool.py Thu Jul 30 04:40:58 2009 -0700
@@ -28,7 +28,12 @@
# the following command:
# For Fs pool type:
# ----------------
-# python create_verify_storagepool.py -t fs -d /dev/sda4 -m /tmp/mnt -n diskfs
+# python create_verify_storagepool.py -t fs -d /dev/sda4 -m /tmp/mnt -n fs_pool
+# -v Xen -u <username> -p <passwd>
+#
+# For disk pool type:
+# -------------------
+# python create_verify_storagepool.py -t fs -d /dev/sda -m /tmp/ -n disk_pool
# -v Xen -u <username> -p <passwd>
#
# For logical pool type:
@@ -39,11 +44,12 @@
# For scsi pool type with HBA's:
# ------------------------------
# python create_verify_storagepool.py -t scsi -v KVM -u <username> -p <passwd>
-# -n myscsi_pool -a host2
+# -n scsi_pool -a host2
#
# Where t can be :
-# 2 - FileSystem
-# 6 - Logical
+# 2 - fs [ FileSystem ]
+# 4 - disk [ Disk ]
+# 6 - logical [ Logical ]
# 7 - scsi
#
#
@@ -68,13 +74,14 @@
TEST_LOG="cimtest.log"
libvirt_cim_fs_changes = 857
+libvirt_cim_disk_changes = 872
libvirt_cim_logical_changes = 906
libvirt_cim_scsi_changes = 921
supp_types = [ 'Xen', 'KVM' , 'LXC' ]
-pool_types = { 'DISK_POOL_FS' : 2 , 'DISK_POOL_LOGICAL' : 6 ,
- 'DISK_POOL_SCSI' : 7 }
+pool_types = { 'DISK_POOL_FS' : 2 , 'DISK_POOL_DISK' : 4,
+ 'DISK_POOL_LOGICAL' : 6 , 'DISK_POOL_SCSI' : 7 }
def verify_cmd_options(options, parser):
try:
@@ -88,9 +95,10 @@
raise Exception("Must specify pool type to be tested")
if options.part_dev == None and options.pool_type != 'scsi':
- raise Exception("Free Partition to be mounted not specified")
+ raise Exception("Free Partition/disk to be mounted not specified")
- if options.mnt_pt == None and options.pool_type == 'fs':
+ if options.mnt_pt == None and (options.pool_type == 'fs' or \
+ options.pool_type == 'disk'):
raise Exception("Mount points to be used not specified")
if options.adap_name == None and options.pool_type == 'scsi':
@@ -124,6 +132,8 @@
if pooltype == "fs":
pool_type = pool_types['DISK_POOL_FS']
+ elif pooltype == "disk":
+ pool_type = pool_types['DISK_POOL_DISK']
elif pooltype == "logical":
pool_type = pool_types['DISK_POOL_LOGICAL']
elif pooltype == "scsi":
@@ -138,7 +148,17 @@
del_dir = False
- if pool_type == pool_types['DISK_POOL_FS']:
+ if pool_type == pool_types['DISK_POOL_FS'] or \
+ pool_type == pool_types['DISK_POOL_DISK']:
+
+ if pool_type == pool_types['DISK_POOL_DISK']:
+ # Make sure part_dev is a disk and not a partition
+ cmd = "fdisk -l | grep -w '%s'" % part_dev
+ status, disk_info = getstatusoutput(cmd)
+ if status != PASS:
+ logger.error("'%s' does not seem like a disk", part_dev)
+ return FAIL, del_dir
+
cmd = "mount"
status, mount_info = getstatusoutput(cmd)
if status != PASS:
@@ -151,8 +171,8 @@
part_name = line.split()[0]
if part_dev == part_name:
logger.error("[%s] already mounted", part_dev)
- raise Exception("Please specify free partition other than "\
- "[%s]" % part_dev)
+ raise Exception("Please specify free partition/disk other "
+ "than [%s]" % part_dev)
# Check if mount point is already used for mounting
mount_name = line.split()[2]
@@ -234,9 +254,10 @@
dp_pid = "%s/%s" % ("DiskPool", pool_name)
dpool_rasd['PoolID'] = dpool_rasd['InstanceID'] = dp_pid
- if pooltype == pool_types['DISK_POOL_FS']:
+ if pooltype == pool_types['DISK_POOL_FS'] or \
+ pooltype == pool_types['DISK_POOL_DISK']:
+ dpool_rasd['DevicePaths'] = [part_dev]
dpool_rasd['Path'] = mount_pt
- dpool_rasd['DevicePaths'] = [part_dev]
elif pooltype == pool_types['DISK_POOL_LOGICAL']:
dpool_rasd['Path'] = part_dev
@@ -307,11 +328,12 @@
parser.add_option("-v", "--virt-type", dest="virt", default=None,
help="Virtualization type [ Xen | KVM ]")
parser.add_option("-t", "--pool-type", dest="pool_type", default=None,
- help="Pool type:[ fs | logical | scsi ]")
+ help="Pool type:[ fs | logical | scsi | disk ]")
parser.add_option("-d", "--part-dev", dest="part_dev", default=None,
help="specify the free partition to be used for " \
"fs pool type or the predefined Vol Group" \
- " for logical pool type")
+ " for logical pool type or empty disk like" \
+ " /dev/sda for disk type pools")
parser.add_option("-m", "--mnt_pt", dest="mnt_pt", default=None,
help="Mount point to be used")
parser.add_option("-n", "--pool-name", dest="pool_name", default=None,
@@ -368,6 +390,13 @@
libvirt_cim_fs_changes)
return SKIP
+ elif curr_cim_rev < libvirt_cim_disk_changes and \
+ pooltype == pool_types['DISK_POOL_DISK']:
+ logger.info("Test Skipped for '%s' pool type, Support for disk Pool"
+ " is available in revision '%s'", options.pool_type,
+ libvirt_cim_disk_changes)
+ return SKIP
+
elif curr_cim_rev < libvirt_cim_logical_changes and \
pooltype == pool_types['DISK_POOL_LOGICAL']:
logger.info("Test Skipped for '%s' pool type, Support for Logical Pool"
15 years, 3 months
[PATCH] [TEST] Added disk backked pool support
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1248856464 25200
# Node ID 72508ebffdece413437b820de84e0c69bc577405
# Parent f7cbecb195e3800513372d4466393538809923e3
[TEST] Added disk backked pool support
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r f7cbecb195e3 -r 72508ebffdec suites/libvirt-cim/misc_cimtests/create_verify_storagepool.py
--- a/suites/libvirt-cim/misc_cimtests/create_verify_storagepool.py Wed Jul 29 00:02:45 2009 -0700
+++ b/suites/libvirt-cim/misc_cimtests/create_verify_storagepool.py Wed Jul 29 01:34:24 2009 -0700
@@ -28,7 +28,12 @@
# the following command:
# For Fs pool type:
# ----------------
-# python create_verify_storagepool.py -t fs -d /dev/sda4 -m /tmp/mnt -n diskfs
+# python create_verify_storagepool.py -t fs -d /dev/sda4 -m /tmp/mnt -n fs_pool
+# -v Xen -u <username> -p <passwd>
+#
+# For disk pool type:
+# -------------------
+# python create_verify_storagepool.py -t fs -d /dev/sda -m /tmp/ -n disk_pool
# -v Xen -u <username> -p <passwd>
#
# For logical pool type:
@@ -39,11 +44,12 @@
# For scsi pool type with HBA's:
# ------------------------------
# python create_verify_storagepool.py -t scsi -v KVM -u <username> -p <passwd>
-# -n myscsi_pool -a host2
+# -n scsi_pool -a host2
#
# Where t can be :
-# 2 - FileSystem
-# 6 - Logical
+# 2 - fs [ FileSystem ]
+# 4 - disk [ Disk ]
+# 6 - logical [ Logical ]
# 7 - scsi
#
#
@@ -68,13 +74,14 @@
TEST_LOG="cimtest.log"
libvirt_cim_fs_changes = 857
+libvirt_cim_disk_changes = 872
libvirt_cim_logical_changes = 906
libvirt_cim_scsi_changes = 921
supp_types = [ 'Xen', 'KVM' , 'LXC' ]
-pool_types = { 'DISK_POOL_FS' : 2 , 'DISK_POOL_LOGICAL' : 6 ,
- 'DISK_POOL_SCSI' : 7 }
+pool_types = { 'DISK_POOL_FS' : 2 , 'DISK_POOL_DISK' : 4,
+ 'DISK_POOL_LOGICAL' : 6 , 'DISK_POOL_SCSI' : 7 }
def verify_cmd_options(options, parser):
try:
@@ -88,9 +95,10 @@
raise Exception("Must specify pool type to be tested")
if options.part_dev == None and options.pool_type != 'scsi':
- raise Exception("Free Partition to be mounted not specified")
+ raise Exception("Free Partition/disk to be mounted not specified")
- if options.mnt_pt == None and options.pool_type == 'fs':
+ if options.mnt_pt == None and (options.pool_type == 'fs' or \
+ options.pool_type == 'disk'):
raise Exception("Mount points to be used not specified")
if options.adap_name == None and options.pool_type == 'scsi':
@@ -124,6 +132,8 @@
if pooltype == "fs":
pool_type = pool_types['DISK_POOL_FS']
+ elif pooltype == "disk":
+ pool_type = pool_types['DISK_POOL_DISK']
elif pooltype == "logical":
pool_type = pool_types['DISK_POOL_LOGICAL']
elif pooltype == "scsi":
@@ -151,8 +161,8 @@
part_name = line.split()[0]
if part_dev == part_name:
logger.error("[%s] already mounted", part_dev)
- raise Exception("Please specify free partition other than "\
- "[%s]" % part_dev)
+ raise Exception("Please specify free partition/disk other "
+ "than [%s]" % part_dev)
# Check if mount point is already used for mounting
mount_name = line.split()[2]
@@ -234,9 +244,10 @@
dp_pid = "%s/%s" % ("DiskPool", pool_name)
dpool_rasd['PoolID'] = dpool_rasd['InstanceID'] = dp_pid
- if pooltype == pool_types['DISK_POOL_FS']:
+ if pooltype == pool_types['DISK_POOL_FS'] or \
+ pooltype == pool_types['DISK_POOL_DISK']:
+ dpool_rasd['DevicePaths'] = [part_dev]
dpool_rasd['Path'] = mount_pt
- dpool_rasd['DevicePaths'] = [part_dev]
elif pooltype == pool_types['DISK_POOL_LOGICAL']:
dpool_rasd['Path'] = part_dev
@@ -307,11 +318,12 @@
parser.add_option("-v", "--virt-type", dest="virt", default=None,
help="Virtualization type [ Xen | KVM ]")
parser.add_option("-t", "--pool-type", dest="pool_type", default=None,
- help="Pool type:[ fs | logical | scsi ]")
+ help="Pool type:[ fs | logical | scsi | disk ]")
parser.add_option("-d", "--part-dev", dest="part_dev", default=None,
help="specify the free partition to be used for " \
"fs pool type or the predefined Vol Group" \
- " for logical pool type")
+ " for logical pool type or empty disk like" \
+ " /dev/sda for disk type pools")
parser.add_option("-m", "--mnt_pt", dest="mnt_pt", default=None,
help="Mount point to be used")
parser.add_option("-n", "--pool-name", dest="pool_name", default=None,
@@ -368,6 +380,13 @@
libvirt_cim_fs_changes)
return SKIP
+ elif curr_cim_rev < libvirt_cim_disk_changes and \
+ pooltype == pool_types['DISK_POOL_DISK']:
+ logger.info("Test Skipped for '%s' pool type, Support for disk Pool"
+ " is available in revision '%s'", options.pool_type,
+ libvirt_cim_disk_changes)
+ return SKIP
+
elif curr_cim_rev < libvirt_cim_logical_changes and \
pooltype == pool_types['DISK_POOL_LOGICAL']:
logger.info("Test Skipped for '%s' pool type, Support for Logical Pool"
15 years, 3 months
[PATCH] [TEST] Fixing VSMS/13_refconfig_additional_devs.py tc
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1248865627 25200
# Node ID 6574dbb104ed097c8750a1826bb7c287965aaf16
# Parent 78496dff7dce6045c687d66bd60a066dcf78aca7
[TEST] Fixing VSMS/13_refconfig_additional_devs.py tc
Tested with KVM on F10 and sles11.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 78496dff7dce -r 6574dbb104ed suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Mon Jul 27 06:54:44 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/13_refconfig_additional_devs.py Wed Jul 29 04:07:07 2009 -0700
@@ -37,6 +37,8 @@
sup_types = ['Xen', 'XenFV', 'KVM']
test_dom = 'rstest_domain'
test_dom2 = 'rstest_domain2'
+mac1 = '99:aa:bb:cc:ee:ff'
+mac2 = '99:aa:bb:cc:ee:aa'
REQUESTED_STATE = 2
TIME = "00000000000000.000000:000"
@@ -117,8 +119,8 @@
options = main.options
virt_xml = get_class(options.virt)
- cxml = virt_xml(test_dom)
- cxml2 = virt_xml(test_dom2)
+ cxml = virt_xml(test_dom, mac=mac1)
+ cxml2 = virt_xml(test_dom2, mac=mac2)
try:
rc = cxml.cim_define(options.ip)
15 years, 3 months
[PATCH] [TEST]#2 Added scsi pool support
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1248850965 25200
# Node ID f7cbecb195e3800513372d4466393538809923e3
# Parent ad67e5d20ee2a268c8f2016004c35bbb890ae94c
[TEST]#2 Added scsi pool support
Patch 2:
--------
Indented few lines to be follow 80 column length
Interchanged the if-elif order in verify_inputs()
Tested with current sources on F10 and KVM.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r ad67e5d20ee2 -r f7cbecb195e3 suites/libvirt-cim/misc_cimtests/create_verify_storagepool.py
--- a/suites/libvirt-cim/misc_cimtests/create_verify_storagepool.py Thu Jul 23 06:29:14 2009 -0700
+++ b/suites/libvirt-cim/misc_cimtests/create_verify_storagepool.py Wed Jul 29 00:02:45 2009 -0700
@@ -36,9 +36,15 @@
# python create_verify_storagepool.py -t logical -d /dev/VolGroup01
# -n VolGroup01 -v Xen -u <username> -p <passwd>
#
+# For scsi pool type with HBA's:
+# ------------------------------
+# python create_verify_storagepool.py -t scsi -v KVM -u <username> -p <passwd>
+# -n myscsi_pool -a host2
+#
# Where t can be :
# 2 - FileSystem
-# 4 - Logical etc
+# 6 - Logical
+# 7 - scsi
#
#
# Date : 27.06.2009
@@ -63,16 +69,15 @@
TEST_LOG="cimtest.log"
libvirt_cim_fs_changes = 857
libvirt_cim_logical_changes = 906
+libvirt_cim_scsi_changes = 921
supp_types = [ 'Xen', 'KVM' , 'LXC' ]
-pool_types = { 'DISK_POOL_FS' : 2 , 'DISK_POOL_LOGICAL' : 6 }
+pool_types = { 'DISK_POOL_FS' : 2 , 'DISK_POOL_LOGICAL' : 6 ,
+ 'DISK_POOL_SCSI' : 7 }
def verify_cmd_options(options, parser):
try:
- if options.part_dev == None:
- raise Exception("Free Partition to be mounted not specified")
-
if options.pool_name == None:
raise Exception("Must specify the Pool Name to be created")
@@ -82,9 +87,15 @@
if options.pool_type == None:
raise Exception("Must specify pool type to be tested")
- if options.mnt_pt == None and options.pool_type != 'logical':
+ if options.part_dev == None and options.pool_type != 'scsi':
+ raise Exception("Free Partition to be mounted not specified")
+
+ if options.mnt_pt == None and options.pool_type == 'fs':
raise Exception("Mount points to be used not specified")
+ if options.adap_name == None and options.pool_type == 'scsi':
+ raise Exception("Adapter name used not specified")
+
except Exception, details:
print "\nFATAL: ", details , "\n"
print parser.print_help()
@@ -110,19 +121,68 @@
return PASS
def get_pooltype(pooltype, virt):
+
if pooltype == "fs":
pool_type = pool_types['DISK_POOL_FS']
elif pooltype == "logical":
pool_type = pool_types['DISK_POOL_LOGICAL']
+ elif pooltype == "scsi":
+ pool_type = pool_types['DISK_POOL_SCSI']
else:
logger.error("Invalid pool type ....")
return None, None
+
return PASS, pool_type
-def verify_inputs(part_dev, mount_pt, pool_type, pool_name):
+def verify_inputs(part_dev, mount_pt, pool_type, pool_name, adap_name):
+
del_dir = False
- if pool_type == pool_types['DISK_POOL_LOGICAL']:
+ if pool_type == pool_types['DISK_POOL_FS']:
+ cmd = "mount"
+ status, mount_info = getstatusoutput(cmd)
+ if status != PASS:
+ logger.error("Failed to get mount info.. ")
+ return FAIL, del_dir
+
+ for line in mount_info.split('\n'):
+ try:
+ # Check if the specified partition is mounted before using it
+ part_name = line.split()[0]
+ if part_dev == part_name:
+ logger.error("[%s] already mounted", part_dev)
+ raise Exception("Please specify free partition other than "\
+ "[%s]" % part_dev)
+
+ # Check if mount point is already used for mounting
+ mount_name = line.split()[2]
+ if mount_pt == mount_name:
+ logger.error("[%s] already mounted", mount_pt)
+ raise Exception("Please specify dir other than [%s]" \
+ % mount_pt)
+
+ except Exception, details:
+ logger.error("%s", details)
+ return FAIL, del_dir
+
+ # Check if the mount point specified already exist, if not create it..
+ if not os.path.exists(mount_pt):
+ os.mkdir(mount_pt)
+
+ # set del_dir=True so that we remove it before exiting from the tc.
+ del_dir = True
+ else:
+ # Check if the mount point specified is a dir
+ if not os.path.isdir(mount_pt):
+ logger.error("The mount point [%s] should be a dir", mount_pt)
+ return FAIL, del_dir
+
+ files = os.listdir(mount_pt)
+ if len(files) != 0:
+ logger.info("The mount point [%s] given is not empty",
+ mount_pt)
+
+ elif pool_type == pool_types['DISK_POOL_LOGICAL']:
if not os.path.exists("/sbin/lvm"):
logger.error("LVM support does not exist on the machine")
return FAIL, del_dir
@@ -143,46 +203,13 @@
return PASS, del_dir
- cmd = "mount"
- status, mount_info = getstatusoutput(cmd)
- if status != PASS:
- logger.error("Failed to get mount info.. ")
- return FAIL, del_dir
-
- for line in mount_info.split('\n'):
- try:
- # Check if the specified partition is mounted before using it
- part_name = line.split()[0]
- if part_dev == part_name:
- logger.error("[%s] already mounted", part_dev)
- raise Exception("Please specify free partition other than " \
- "[%s]" % part_dev)
-
- # Check if mount point is already used for mounting
- mount_name = line.split()[2]
- if mount_pt == mount_name:
- logger.error("[%s] already mounted", mount_pt)
- raise Exception("Please specify dir other than [%s]" %mount_pt)
-
- except Exception, details:
- logger.error("%s", details)
- return FAIL, del_dir
-
- # Check if the mount point specified already exist, if not then create it..
- if not os.path.exists(mount_pt):
- os.mkdir(mount_pt)
-
- # set del_dir to True so that we remove it before exiting from the tc.
- del_dir = True
- else:
- # Check if the mount point specified is a dir
- if not os.path.isdir(mount_pt):
- logger.error("The mount point [%s] should be a dir", mount_pt)
- return FAIL, del_dir
-
- files = os.listdir(mount_pt)
- if len(files) != 0:
- logger.info("The mount point [%s] given is not empty", mount_pt)
+ elif pool_type == pool_types['DISK_POOL_SCSI']:
+ hba_path = "/sys/class/scsi_host/"
+ adap_path = "%s%s" % (hba_path, adap_name)
+ if not os.path.exists(adap_path):
+ logger.error("HBA '%s' does not exist on the machine, specify "\
+ "one present in '%s' path", adap_path, hba_path)
+ return FAIL, del_dir
return PASS, del_dir
@@ -195,18 +222,28 @@
vuri = 'lxc:///system'
return vuri
-def get_pool_settings(dp_rasds, pooltype, part_dev, mount_pt, pool_name):
+def get_pool_settings(dp_rasds, pooltype, part_dev, mount_pt,
+ pool_name, adap_name):
pool_settings = None
+
for dpool_rasd in dp_rasds:
+
if dpool_rasd['Type'] == pooltype and \
dpool_rasd['InstanceID'] == 'Default':
+
dp_pid = "%s/%s" % ("DiskPool", pool_name)
dpool_rasd['PoolID'] = dpool_rasd['InstanceID'] = dp_pid
+
if pooltype == pool_types['DISK_POOL_FS']:
dpool_rasd['Path'] = mount_pt
dpool_rasd['DevicePaths'] = [part_dev]
+
elif pooltype == pool_types['DISK_POOL_LOGICAL']:
dpool_rasd['Path'] = part_dev
+
+ elif pooltype == pool_types['DISK_POOL_SCSI']:
+ dpool_rasd['AdapterName'] = adap_name
+ dpool_rasd['Path'] = "/dev/disk/by-id"
break
if not pool_name in dpool_rasd['InstanceID']:
@@ -270,7 +307,7 @@
parser.add_option("-v", "--virt-type", dest="virt", default=None,
help="Virtualization type [ Xen | KVM ]")
parser.add_option("-t", "--pool-type", dest="pool_type", default=None,
- help="Pool type:[ fs | logical ]")
+ help="Pool type:[ fs | logical | scsi ]")
parser.add_option("-d", "--part-dev", dest="part_dev", default=None,
help="specify the free partition to be used for " \
"fs pool type or the predefined Vol Group" \
@@ -279,6 +316,9 @@
help="Mount point to be used")
parser.add_option("-n", "--pool-name", dest="pool_name", default=None,
help="Pool to be created")
+ parser.add_option("-a", "--adap_name", dest="adap_name", default=None,
+ help="Adap name to be used Ex: specify one of the host" \
+ "in /sys/class/scsi_host/ like host0")
parser.add_option("-c", "--clean-log", action="store_true", dest="clean",
help="Will remove existing log files before test run")
parser.add_option("-l", "--debug-output", action="store_true", dest="debug",
@@ -294,6 +334,7 @@
part_dev = options.part_dev
mount_pt = options.mnt_pt
pool_name = options.pool_name
+ adap_name = options.adap_name
virt = options.virt
if ":" in options.h_url:
@@ -301,7 +342,7 @@
else:
sysname = options.h_url
- # Verify if the CIMOM is running, clean cimtest.log if requested
+ # Verify if the CIMOM is running, if requested clean cimtest.log.
# Set Debug option if requested
status = env_setup(sysname, virt, options.clean, options.debug)
if status != PASS:
@@ -322,20 +363,29 @@
curr_cim_rev, changeset = get_provider_version(virt, sysname)
if curr_cim_rev < libvirt_cim_fs_changes and \
pooltype == pool_types['DISK_POOL_FS']:
- logger.info("Test Skipped for %s pool type, Support for File System "\
- "Pool is available in revision %s", options.pool_type,
+ logger.info("Test Skipped for '%s' pool type, Support for File System "
+ "Pool is available in revision '%s'", options.pool_type,
libvirt_cim_fs_changes)
return SKIP
+
elif curr_cim_rev < libvirt_cim_logical_changes and \
pooltype == pool_types['DISK_POOL_LOGICAL']:
- logger.info("Test Skipped for %s pool type, Support for Logical Pool" \
- " is available in revision %s", options.pool_type, \
+ logger.info("Test Skipped for '%s' pool type, Support for Logical Pool"
+ " is available in revision '%s'", options.pool_type,
libvirt_cim_logical_changes)
return SKIP
+
+ elif curr_cim_rev < libvirt_cim_scsi_changes and \
+ pooltype == pool_types['DISK_POOL_SCSI']:
+ logger.info("Test Skipped for '%s' pool type, Support for scsi Pool"
+ " is available in revision '%s'", options.pool_type,
+ libvirt_cim_scsi_changes)
+ return SKIP
pooltype = cim_types.Uint16(pooltype)
- status, del_dir = verify_inputs(part_dev, mount_pt, pooltype, pool_name)
+ status, del_dir = verify_inputs(part_dev, mount_pt, pooltype, pool_name,
+ adap_name)
if status != PASS:
if del_dir == True:
cmd ="rm -rf %s" % mount_pt
@@ -370,7 +420,7 @@
# Get the DiskPoolRASD mof with appropriate values of diskpool
# to be created....
pool_settings = get_pool_settings(dp_rasds, pooltype, part_dev,
- mount_pt, pool_name)
+ mount_pt, pool_name, adap_name)
if pool_settings == None:
raise Exception("Did not get the required pool settings ...")
15 years, 3 months