[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:43:37 UTC 2007


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1196419032 -3600
# Node ID bd0565db204f6352a131f8bae8d51bea4e37646c
# 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 bd0565db204f 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 11:37:12 2007 +0100
@@ -243,23 +243,57 @@ 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_DiskResourceAllocationSettingData",
+        "Xen_MemResourceAllocationSettingData",
+        "Xen_NetResourceAllocationSettingData",
+        "Xen_ProcResourceAllocationSettingData",
+        "KVM_DiskResourceAllocationSettingData",
+        "KVM_MemResourceAllocationSettingData",
+        "KVM_NetResourceAllocationSettingData",
+        "KVM_ProcResourceAllocationSettingData",
+        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