[PATCH] SDC doesn't support specific RASD classes
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1196451201 28800
# Node ID d5af3e219c22e8b32de64c69a29aea970ab6a9a4
# Parent 6515e4a1c90bba936fa1a15ddf2f501491e16fb5
SDC doesn't support specific RASD classes.
Instead of using Xen_ResourceAllocationSettingData / KVM_ResourceAllocationSettingData in the resource_allocation_setting_data list, we should use specific RASD class names so that specifying a specific RASD class as a result class is supported.
I also missed this one while reviewing Heidi's patches.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 6515e4a1c90b -r d5af3e219c22 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Fri Nov 30 10:43:37 2007 -0800
+++ b/src/Virt_SettingsDefineCapabilities.c Fri Nov 30 11:33:21 2007 -0800
@@ -847,8 +847,14 @@ char* group_component[] = {
};
char* part_component[] = {
- "Xen_ResourceAllocationSettingData",
- "KVM_ResourceAllocationSettingData",
+ "Xen_DiskResourceAllocationSettingData",
+ "Xen_MemResourceAllocationSettingData",
+ "Xen_NetResourceAllocationSettingData",
+ "Xen_ProcResourceAllocationSettingData",
+ "KVM_DiskResourceAllocationSettingData",
+ "KVM_MemResourceAllocationSettingData",
+ "KVM_NetResourceAllocationSettingData",
+ "KVM_ProcResourceAllocationSettingData",
NULL
};
16 years, 11 months
[PATCH] ESD does not support specific result clases properly
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1196448217 28800
# Node ID 6515e4a1c90bba936fa1a15ddf2f501491e16fb5
# Parent a10df58ddd0ed7f8e905ce21a28a5e585fd304ff
ESD does not support specific result clases properly.
Specifying a result class of Xen_VirtualSystemSettingData does not work (see query below), however a result class of CIM_ManagedElement does work.
This is because I tried to make this provider accept both generic and specific result classes. Heidi's libcmpiutil API update makes it so that the providers don't need to be concerned with handling more generic cases (CIM_ManagedElement, CIM_VirtualSystemSettingData, etc).
Also, I missed this during Heidi's patch review - instead of using Xen_ResourceAllocationSettingData / KVM_ResourceAllocationSettingData in the resource_allocation_setting_data list, we should use specific RASD class names so that specifying a specific RASD class as a result class is supported. See below for failing query.
Failing queries:
wbemcli ain -ac Xen_ElementSettingData -arc Xen_VirtualSystemSettingData 'http://root:elm3b41@localhost/root/virt:Xen_VirtualSystemSettingData.Inst..."Xen:Domain-0"'
wbemcli ain -ac Xen_ElementSettingData -arc Xen_ProcResourceAllocationSettingData 'http://root:elm3b41@localhost/root/virt:Xen_ProcResourceAllocationSetting..."Domain-0/3"'
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r a10df58ddd0e -r 6515e4a1c90b src/Virt_ElementSettingData.c
--- a/src/Virt_ElementSettingData.c Fri Nov 30 11:40:21 2007 +0100
+++ b/src/Virt_ElementSettingData.c Fri Nov 30 10:43:37 2007 -0800
@@ -178,13 +178,14 @@ char* virtual_system_setting_data[] = {
};
char* resource_allocation_setting_data[] = {
- "Xen_ResourceAllocationSettingData",
- "KVM_ResourceAllocationSettingData",
- NULL
-};
-
-char* managed_element[] = {
- "CIM_ManagedElement",
+ "Xen_DiskResourceAllocationSettingData",
+ "Xen_MemResourceAllocationSettingData",
+ "Xen_NetResourceAllocationSettingData",
+ "Xen_ProcResourceAllocationSettingData",
+ "KVM_DiskResourceAllocationSettingData",
+ "KVM_MemResourceAllocationSettingData",
+ "KVM_NetResourceAllocationSettingData",
+ "KVM_ProcResourceAllocationSettingData",
NULL
};
@@ -198,7 +199,7 @@ static struct std_assoc _vssd_to_vssd =
.source_class = (char**)&virtual_system_setting_data,
.source_prop = "ManagedElement",
- .target_class = (char**)&managed_element,
+ .target_class = (char**)&virtual_system_setting_data,
.target_prop = "SettingData",
.assoc_class = (char**)&assoc_classname,
@@ -211,7 +212,7 @@ static struct std_assoc _rasd_to_rasd =
.source_class = (char**)&resource_allocation_setting_data,
.source_prop = "ManagedElement",
- .target_class = (char**)&managed_element,
+ .target_class = (char**)&resource_allocation_setting_data,
.target_prop = "SettingData",
.assoc_class = (char**)&assoc_classname,
16 years, 11 months
[PATCH] ELEC cleanup - remove get_fq_devid()
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1196468209 28800
# Node ID 069db51711b5089167809cecc193b700aa2c6814
# Parent 075b7c91e9729f9705af3a2f4726e6883be29b59
ELEC cleanup - remove get_fq_devid().
Removing get_fq_devid() since it's not necessary for building an InstanceID. Since this change causes error1 to be removed, I also renamed error2 to out, which conforms to the style of the other of the providers. Also, having an error2 without an error1 seemed silly.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 075b7c91e972 -r 069db51711b5 src/Virt_EnabledLogicalElementCapabilities.c
--- a/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 14:16:17 2007 -0800
+++ b/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 16:16:49 2007 -0800
@@ -30,7 +30,6 @@
#include "std_instance.h"
#include "misc_util.h"
-#include "device_parsing.h"
#include "cs_util.h"
#include "Virt_EnabledLogicalElementCapabilities.h"
@@ -58,24 +57,15 @@ static CMPIStatus set_inst_properties(co
CMPIArray *array;
uint16_t element;
int edit_name = 0;
- char *devid;
CMSetProperty(inst, "CreationClassName",
(CMPIValue *)classname, CMPI_chars);
- devid = get_fq_devid((char *)sys_name, "0");
- if (devid == NULL) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Could not get full ID");
- goto error1;
- }
-
- CMSetProperty(inst, "InstanceID", (CMPIValue *)devid, CMPI_chars);
+ CMSetProperty(inst, "InstanceID", (CMPIValue *)sys_name, CMPI_chars);
array = CMNewArray(broker, 5, CMPI_uint16, &s);
if ((s.rc != CMPI_RC_OK) || CMIsNullObject(array))
- goto error2;
+ goto out;
element = (uint16_t)ENABLED;
CMSetArrayElementAt(array, 0, &element, CMPI_uint16);
@@ -97,9 +87,7 @@ static CMPIStatus set_inst_properties(co
CMSetProperty(inst, "ElementNameEditSupported",
(CMPIValue *)&edit_name, CMPI_boolean);
- error2:
- free(devid);
- error1:
+ out:
return s;
}
16 years, 11 months