[Libvirt-cim] [PATCH 11 of 12] SD: Adoption of changes to std_assoc struct in std_association

Heidi Eckhart heidieck at linux.vnet.ibm.com
Fri Nov 30 09:03:10 UTC 2007


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1196416069 -3600
# Node ID 4c6aa1b13c0b8297ff8637c97b3d8c1bf7b8dac8
# Parent  c77b0bf8966e23f20c3dd1391dffeaee0d16d170
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 at linux.vnet.ibm.com>

diff -r c77b0bf8966e -r 4c6aa1b13c0b src/Virt_SystemDevice.c
--- a/src/Virt_SystemDevice.c	Fri Nov 30 10:47:48 2007 +0100
+++ b/src/Virt_SystemDevice.c	Fri Nov 30 10:47:49 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




More information about the Libvirt-cim mailing list