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

Heidi Eckhart heidieck at linux.vnet.ibm.com
Thu Nov 29 12:15:01 UTC 2007


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1196340286 -3600
# Node ID 3b849faf8ee17556ff39993a43ca3759f8604859
# Parent  0f6cf316d454a485c3cc965305dd353664873d1f
RAFP: 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 0f6cf316d454 -r 3b849faf8ee1 src/Virt_ResourceAllocationFromPool.c
--- a/src/Virt_ResourceAllocationFromPool.c	Thu Nov 29 13:41:20 2007 +0100
+++ b/src/Virt_ResourceAllocationFromPool.c	Thu Nov 29 13:44:46 2007 +0100
@@ -243,23 +243,51 @@ static CMPIInstance *make_ref(const CMPI
         return refinst;
 }
 
+char* antecedent[] = {
+        "Xen_ProcessorPool",
+        "Xen_MemoryPool",
+        "Xen_NetworkPool",
+        "Xen_DiskPool",
+        "KVM_ProcessorPool",
+        "KVM_MemoryPool",
+        "KVM_NetworkPool",
+        "KVM_DiskPool",
+        NULL
+};
+
+char* dependent[] = {
+        "Xen_ResourceAllocationSettingData",
+        "KVM_ResourceAllocationSettingData",
+        NULL
+};
+
+char* assoc_classname[] = {
+        "Xen_ResourceAllocationFromPool",
+        "KVM_ResourceAllocationFromPool",        
+        NULL
+};
+
 static struct std_assoc _rasd_to_pool = {
-        .source_class = "CIM_ResourceAllocationSettingData",
+        .source_class = (char**)&dependent,
         .source_prop = "Dependent",
-
-        .target_class = "CIM_ResourcePool",
+        
+        .target_class = (char**)&antecedent,
         .target_prop = "Antecedent",
+
+        .assoc_class = (char**)&assoc_classname,
 
         .handler = rasd_to_pool,
         .make_ref = make_ref
 };
 
 static struct std_assoc _pool_to_rasd = {
-        .source_class = "CIM_ResourcePool",
+        .source_class = (char**)&antecedent,
         .source_prop = "Antecedent",
 
-        .target_class = "CIM_ResourceAllocationSettingData",
+        .target_class = (char**)&dependent,
         .target_prop = "Dependent",
+
+        .assoc_class = (char**)&assoc_classname,
 
         .handler = pool_to_rasd,
         .make_ref = make_ref




More information about the Libvirt-cim mailing list