# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1196419221 -3600
# Node ID b04cad2f19903e872d08c0af80a1d5e9905f7534
# Parent 504aece866fe3012cc9aaf64f8f1225dc76ab5e0
SD: 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 504aece866fe -r b04cad2f1990 src/Virt_SystemDevice.c
--- a/src/Virt_SystemDevice.c Fri Nov 30 11:40:13 2007 +0100
+++ b/src/Virt_SystemDevice.c Fri Nov 30 11:40:21 2007 +0100
@@ -244,23 +244,51 @@ static CMPIStatus dev_to_sys(const CMPIO
return s;
}
+char* group_component[] = {
+ "Xen_ComputerSystem",
+ "KVM_ComputerSystem",
+ NULL
+};
+
+char* part_component[] = {
+ "Xen_Processor",
+ "Xen_Memory",
+ "Xen_Network",
+ "Xen_Disk",
+ "KVM_Processor",
+ "KVM_Memory",
+ "KVM_Network",
+ "KVM_Disk",
+ NULL
+};
+
+char* assoc_classname[] = {
+ "Xen_SystemDevice",
+ "KVM_SystemDevice",
+ NULL
+};
+
static struct std_assoc forward = {
- .source_class = "CIM_System",
+ .source_class = (char**)&group_component,
.source_prop = "GroupComponent",
- .target_class = "CIM_LogicalDevice",
+ .target_class = (char**)&part_component,
.target_prop = "PartComponent",
+
+ .assoc_class = (char**)&assoc_classname,
.handler = sys_to_dev,
.make_ref = make_ref
};
static struct std_assoc backward = {
- .source_class = "CIM_LogicalDevice",
+ .source_class = (char**)&part_component,
.source_prop = "PartComponent",
- .target_class = "CIM_System",
+ .target_class = (char**)&group_component,
.target_prop = "GroupComponent",
+
+ .assoc_class = (char**)&assoc_classname,
.handler = dev_to_sys,
.make_ref = make_ref