[PATCH] [TEST] #2 Update get_exp_template_rasd_len() based on template RASD additions
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1246489133 25200
# Node ID d5f1540750c4dbe483ec90e1b278be90d76de1b9
# Parent a8b01b9726bf386defc29540e33f81e0850ac3a6
[TEST] #2 Update get_exp_template_rasd_len() based on template RASD additions
The providers now return template RASDs for both "bridge" and "network"
interface types. In addition to that, the providers now return template
DiskPoolRASDs for iSCSI pools
Updates:
-Be sure not to overwrite expected len value.
-Changes related to recent NetRASD and DiskRASD updates
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r a8b01b9726bf -r d5f1540750c4 suites/libvirt-cim/lib/XenKvmLib/rasd.py
--- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Jul 01 11:23:00 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py Wed Jul 01 15:58:53 2009 -0700
@@ -320,7 +320,7 @@
exp_len = exp_base_num
if id == "DiskPool/0":
- pool_types = 5
+ pool_types = 7
return exp_base_num * pool_types
if virt == 'Xen' or virt == 'XenFV':
@@ -333,10 +333,11 @@
exp_len = exp_base_num + exp_cdrom
elif rev >= libvirt_rasd_dpool_changes and libvirt_ver >= '0.4.1':
- volumes = enum_volumes(virt, ip)
- exp_len = ((volumes * exp_base_num) + exp_cdrom) * xen_multi
+ volumes = enum_volumes(virt, ip)
+ exp_len = ((volumes * exp_base_num) + exp_cdrom) * xen_multi
- exp_len = (exp_base_num + exp_cdrom) * xen_multi
+ else:
+ exp_len = (exp_base_num + exp_cdrom) * xen_multi
elif virt == 'KVM':
if rev >= libvirt_rasd_new_changes and \
@@ -363,8 +364,9 @@
if rev >= net_rasd_template_changes:
dev_types = 2
+ net_types = 3
- return exp_base_num * dev_types
+ return exp_base_num * dev_types * net_types
def get_exp_template_rasd_len(virt, ip, id):
curr_cim_rev, changeset = get_provider_version(virt, ip)
15 years, 4 months
Test Run Summary (Jul 08 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus
by Deepti B Kalakeri
=================================================
Test Run Summary (Jul 08 2009): KVM on Fedora release 10.90 (Rawhide) with Pegasus
=================================================
Distro: Fedora release 10.90 (Rawhide)
Kernel: 2.6.29-0.38.rc1.git4.fc11.x86_64
libvirt: 0.6.2
Hypervisor: QEMU 0.10.0
CIMOM: Pegasus 2.7.2
Libvirt-cim revision: 921
Libvirt-cim changeset: 0fb4613252c1
Cimtest revision: 710
Cimtest changeset: 75e1ba2b6c20
=================================================
FAIL : 7
XFAIL : 3
SKIP : 6
PASS : 142
-----------------
Total : 158
=================================================
FAIL Test Summary:
ComputerSystemIndication - 01_created_indication.py: FAIL
HostSystem - 03_hs_to_settdefcap.py: FAIL
RASD - 07_parent_disk_pool.py: FAIL
SettingsDefineCapabilities - 01_forward.py: FAIL
VirtualSystemManagementService - 15_mod_system_settings.py: FAIL
VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
VirtualSystemManagementService - 16_removeresource.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_FAILED: 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): CIM_ERR_FAILED: Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - 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: FAIL
ERROR - Waited too long for destroy indication
--------------------------------------------------------------------
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 24 RASD objects instead of 8 for NetworkPool/cimtest-networkpool
CIM_ERR_INVALID_CLASS: Linux_ComputerSystem
--------------------------------------------------------------------
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: FAIL
07_parent_disk_pool.py:47: DeprecationWarning: the sets module is deprecated
from sets import Set
ERROR - Exception details: Got 7 recs instead of 3
--------------------------------------------------------------------
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 24 ResourcePool objects instead of 8
--------------------------------------------------------------------
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: FAIL
ERROR - CIMError : (1, u'CIM_ERR_FAILED: Unable to parse embedded object')
Traceback (most recent call last):
File "./lib/XenKvmLib/const.py", line 139, in do_try
File "15_mod_system_settings.py", line 103, in main
ret = service.ModifySystemSettings(SystemSettings=vssd)
File "/data/users/deepti/F10_runs/cimtest/lib/CimTest/CimExt.py", line 32, in __call__
return self.__invoker(self.__name, args)
File "/data/users/deepti/F10_runs/cimtest/lib/CimTest/CimExt.py", line 44, in __invoke
return self.conn.InvokeMethod(method, self.inst, **params)
File "/usr/lib/python2.6/site-packages/pywbem/cim_operations.py", line 801, in InvokeMethod
result = self.methodcall(MethodName, obj, **params)
File "/usr/lib/python2.6/site-packages/pywbem/cim_operations.py", line 362, in methodcall
raise CIMError(code, tt[0][1]['DESCRIPTION'])
CIMError: (1, u'CIM_ERR_FAILED: Unable to parse embedded object')
ERROR - None
InvokeMethod(ModifySystemSettings): CIM_ERR_FAILED: Unable to parse embedded object
--------------------------------------------------------------------
VirtualSystemManagementService - 16_removeresource.py: XFAIL
ERROR - 0 RASD insts for domain/mouse:ps2
CIM_ERR_NOT_FOUND: No such instance (no device domain/mouse:ps2)
Bug:<00014>
--------------------------------------------------------------------
VirtualSystemManagementService - 17_removeresource_neg.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: FAIL
ERROR - JobStatus for dom 'VM_frm_elm3a148.beaverton.ibm.com' has 'Migration Failed: Error 0' instead of 'Completed'
--------------------------------------------------------------------
VirtualSystemMigrationService - 07_remote_offline_migration.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL
ERROR - JobStatus for dom 'VM_frm_elm3a148.beaverton.ibm.com' has 'Migration Failed: Error 0' instead of 'Completed'
ERROR - Cleanup failed after 'resume' migration
--------------------------------------------------------------------
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, 4 months
[PATCH 0 of 3] Add support for SCSI (host bus adapter) type pools
by Kaitlin Rupert
This set of changes is for scsi pools that are based on a host bus adapter. These types of sotrage include FiberChannel attached storage devices, as well as
SANs. There's two different ways to define these pools:
FiberChannel connected devices:
<pool type="scsi">
<name>hba0</name>
<source>
<adapter name="host4"/>
</source>
<target>
<path>/dev/disk/by-id</path>
</target>
</pool>
SAN devices:
<pool type="scsi">
<name>npiv</name>
<source>
<adapter name="host6" wwpn="0000111122223333" wwnn="4444555566667777"/>
</source>
<target>
<path>/dev/disk/by-id</path>
</target>
</pool>
15 years, 4 months
[PATCH] Change DevicePath to DevicePaths in SettingsDefineCapabilities
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1246490192 25200
# Node ID 7bbb36258bf14bcf5ae40ad54356ac977620b569
# Parent 4ea22198d1848b0097e81268dcedc940f2fb9be5
Change DevicePath to DevicePaths in SettingsDefineCapabilities
Due to the logical pool changes, DevicePath changed to DevicePaths. It's now
also an array type attribute.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 4ea22198d184 -r 7bbb36258bf1 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Wed Jul 01 13:39:52 2009 -0700
+++ b/src/Virt_SettingsDefineCapabilities.c Wed Jul 01 16:16:32 2009 -0700
@@ -1256,6 +1256,7 @@
{
const char *id;
CMPIInstance *inst;
+ CMPIArray *array;
CMPIStatus s = {CMPI_RC_OK, NULL};
const char *path = "/dev/null";
int type[7] = {DISK_POOL_DIR,
@@ -1332,9 +1333,30 @@
break;
}
- if (dev_path != NULL)
- CMSetProperty(inst, "DevicePath",
- (CMPIValue *)dev_path, CMPI_chars);
+ if (dev_path != NULL) {
+ CMPIString *str = NULL;
+
+ array = CMNewArray(_BROKER, 1, CMPI_string, &s);
+ if ((s.rc != CMPI_RC_OK) || (CMIsNullObject(array))) {
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create new array");
+ goto out;
+ }
+
+ str = CMNewString(_BROKER, dev_path, &s);
+ if ((s.rc = CMPI_RC_OK) || (CMIsNullObject(str))) {
+ cu_statusf(_BROKER, &s,
+ CMPI_RC_ERR_FAILED,
+ "Unable to create new string");
+ goto out;
+ }
+
+ CMSetArrayElementAt(array, 0, &str, CMPI_string);
+
+ CMSetProperty(inst, "DevicePaths",
+ (CMPIValue *)&array, CMPI_stringA);
+ }
if (host != NULL)
CMSetProperty(inst, "Host",
15 years, 4 months
[PATCH] Be sure to support "user" type interfaces
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1246480792 25200
# Node ID 4ea22198d1848b0097e81268dcedc940f2fb9be5
# Parent b1a29661b142f455bcbb9b4d21ae2cb7c038f5e8
Be sure to support "user" type interfaces
This patch is to fix a regression found by running the NetworkPort -
03_user_netport.py test.
Also be sure to generate a template NetRASD for the user type.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r b1a29661b142 -r 4ea22198d184 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Tue Jun 30 14:33:31 2009 -0700
+++ b/src/Virt_SettingsDefineCapabilities.c Wed Jul 01 13:39:52 2009 -0700
@@ -578,9 +578,9 @@
const char *id;
CMPIStatus s = {CMPI_RC_OK, NULL};
int i,j;
- const char *type[] = {"network", "bridge"};
+ const char *type[] = {"network", "bridge", "user"};
const char *model[] = {"e1000", NULL};
- const char *name[] = {NULL, "br0"};
+ const char *name[] = {NULL, "br0", NULL};
switch (template_type) {
case SDC_RASD_MIN:
@@ -609,7 +609,7 @@
}
- for (i = 0; i < 2; i++) {
+ for (i = 0; i < 3; i++) {
for (j = 0; j < 2; j++) {
s = set_net_props(template_type,
ref,
diff -r b1a29661b142 -r 4ea22198d184 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Tue Jun 30 14:33:31 2009 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Wed Jul 01 13:39:52 2009 -0700
@@ -61,6 +61,7 @@
#define DEFAULT_XEN_WEIGHT 1024
#define BRIDGE_TYPE "bridge"
#define NETWORK_TYPE "network"
+#define USER_TYPE "user"
const static CMPIBroker *_BROKER;
@@ -585,7 +586,8 @@
}
dev->dev.net.source = strdup(network);
-
+ } else if (STREQC(val, USER_TYPE)) {
+ dev->dev.net.type = strdup(USER_TYPE);
} else
return "Invalid Network Type specified";
free(dev->dev.net.model);
15 years, 4 months
[PATCH] (#3) Add check to ensure PoolID specified in NetRASD has valid format
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1246064238 25200
# Node ID dd7ce21f085b956aa412af6f0665ab7e4eacfe07
# Parent 2f7ac06918f55d89f099447972b48d06b0140669
(#3) Add check to ensure PoolID specified in NetRASD has valid format
Updated from 2 t 3:
-Rebase patch based on current sources
Updates from 1 to 2:
-Add a proper subject and commit log to patch
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 2f7ac06918f5 -r dd7ce21f085b src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Wed Jun 24 10:27:16 2009 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Fri Jun 26 17:57:18 2009 -0700
@@ -539,6 +539,7 @@
{
const char *val = NULL;
const char *msg = NULL;
+ char *network = NULL;
if (cu_get_str_prop(inst, "Address", &val) != CMPI_RC_OK) {
val = _net_rand_mac();
@@ -577,7 +578,14 @@
return "No NetworkPool specified no default available";
free(dev->dev.net.source);
- dev->dev.net.source = name_from_pool_id(val);
+ network = name_from_pool_id(val);
+ if (network == NULL) {
+ msg = "PoolID specified is not formatted properly";
+ goto out;
+ }
+
+ dev->dev.net.source = strdup(network);
+
} else
return "Invalid Network Type specified";
free(dev->dev.net.model);
@@ -587,6 +595,7 @@
else
dev->dev.net.model = strdup(val);
out:
+ free(network);
return msg;
}
15 years, 4 months
[PATCH] Verify specified UUID is not in use by existing guest
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1245863542 25200
# Node ID 7417f62e29eb8b37acb66e616e49f51901f610c6
# Parent 76be9533b5bab87a55c14ab68640c82cfd400b7b
Verify specified UUID is not in use by existing guest
Before generating the XML needed to define a guest, make sure a guest with
the same UUID is not already defined.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 76be9533b5ba -r 7417f62e29eb src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Wed Jun 24 09:06:46 2009 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Wed Jun 24 10:12:22 2009 -0700
@@ -1243,6 +1243,8 @@
CMPIInstance *inst = NULL;
char *xml = NULL;
const char *msg = NULL;
+ virConnectPtr conn = NULL;
+ virDomainPtr dom = NULL;
struct domain *domain = NULL;
@@ -1268,6 +1270,26 @@
goto out;
}
+ if (domain->uuid != NULL) {
+ conn = connect_by_classname(_BROKER, CLASSNAME(ref), NULL);
+ if (conn == NULL) {
+ cu_statusf(_BROKER, s,
+ CMPI_RC_ERR_FAILED,
+ "Error connecting to libvirt");
+ goto out;
+ }
+
+ dom = virDomainLookupByUUIDString(conn, domain->uuid);
+ if (dom != NULL) {
+ cu_statusf(_BROKER, s,
+ CMPI_RC_ERR_FAILED,
+ "Guest '%s' is already defined with UUID %s",
+ virDomainGetName(dom),
+ domain->uuid);
+ goto out;
+ }
+ }
+
msg = classify_resources(resources, NAMESPACE(ref), domain);
if (msg != NULL) {
CU_DEBUG("Failed to classify resources: %s", msg);
@@ -1295,6 +1317,8 @@
out:
cleanup_dominfo(&domain);
free(xml);
+ virDomainFree(dom);
+ virConnectClose(conn);
return inst;
}
15 years, 4 months