[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
Fri Nov 30 09:03:07 UTC 2007


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1196416066 -3600
# Node ID e6c901ef8a7f82d8bec41a646d0faf87d1d5ee81
# Parent  7ed5aecb4249c6d18b412262ab0362c220b4f95e
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 7ed5aecb4249 -r e6c901ef8a7f src/Virt_ResourceAllocationFromPool.c
--- a/src/Virt_ResourceAllocationFromPool.c	Fri Nov 30 10:47:26 2007 +0100
+++ b/src/Virt_ResourceAllocationFromPool.c	Fri Nov 30 10:47: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