# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1196416068 -3600
# Node ID c77b0bf8966e23f20c3dd1391dffeaee0d16d170
# Parent 2c0219a348890f647293a75b2c62fb2a7074f8f9
SDS: Adoption of changes to std_assoc struct in std_association
This is the follow up patch to the API changes made in
std_association. The struct std_assoc does now take lists
for source, target and assoc classnames.
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 2c0219a34889 -r c77b0bf8966e src/Virt_SettingsDefineState.c
--- a/src/Virt_SettingsDefineState.c Fri Nov 30 10:47:48 2007 +0100
+++ b/src/Virt_SettingsDefineState.c Fri Nov 30 10:47:48 2007 +0100
@@ -301,33 +301,73 @@ static CMPIInstance *make_ref(const CMPI
return refinst;
}
+char* logical_device[] = {
+ "Xen_Processor",
+ "Xen_Memory",
+ "Xen_Network",
+ "Xen_Disk",
+ "KVM_Processor",
+ "KVM_Memory",
+ "KVM_Network",
+ "KVM_Disk",
+ NULL
+};
+
+char* resource_allocation_setting_data[] = {
+ "Xen_ResourceAllocationSettingData",
+ "KVM_ResourceAllocationSettingData",
+ NULL
+};
+
+char* computer_system[] = {
+ "Xen_ComputerSystem",
+ "KVM_ComputerSystem",
+ NULL
+};
+
+char* virtual_system_setting_data[] = {
+ "Xen_VirtualSystemSettingData",
+ "KVM_VirtualSystemSettingData",
+ NULL
+};
+
+char* assoc_classname[] = {
+ "Xen_SettingsDefineState",
+ "KVM_SettingsDefineState",
+ NULL
+};
+
static struct std_assoc _dev_to_rasd = {
- .source_class = "CIM_LogicalDevice",
+ .source_class = (char**)&logical_device,
.source_prop = "ManagedElement",
- .target_class = "CIM_ResourceAllocationSettingData",
+ .target_class = (char**)&resource_allocation_setting_data,
.target_prop = "SettingData",
+
+ .assoc_class = (char**)&assoc_classname,
.handler = dev_to_rasd,
.make_ref = make_ref
};
static struct std_assoc _rasd_to_dev = {
- .source_class = "CIM_ResourceAllocationSettingData",
+ .source_class = (char**)&resource_allocation_setting_data,
.source_prop = "SettingData",
- .target_class = "CIM_LogicalDevice",
+ .target_class = (char**)&logical_device,
.target_prop = "ManagedElement",
+
+ .assoc_class = (char**)&assoc_classname,
.handler = rasd_to_dev,
.make_ref = make_ref
};
static struct std_assoc _vs_to_vssd = {
- .source_class = "CIM_ComputerSystem",
+ .source_class = (char**)&computer_system,
.source_prop = "ManagedElement",
- .target_class = "CIM_VirtualSystemSettingData",
+ .target_class = (char**)&virtual_system_setting_data,
.target_prop = "SettingData",
.handler = vs_to_vssd,
@@ -335,10 +375,10 @@ static struct std_assoc _vs_to_vssd = {
};
static struct std_assoc _vssd_to_vs = {
- .source_class = "CIM_VirtualSystemSettingData",
+ .source_class = (char**)&virtual_system_setting_data,
.source_prop = "SettingData",
- .target_class = "CIM_ComputerSystem",
+ .target_class = (char**)&computer_system,
.target_prop = "ManagedElement",
.handler = vssd_to_vs,