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

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


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1196339597 -3600
# Node ID 8a75970ed83c888e50b7b83360078c8ab32316db
# Parent  69f4e34c1187ac9013cf779f78c2831544b4a5a4
HRP: 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 69f4e34c1187 -r 8a75970ed83c src/Virt_HostedResourcePool.c
--- a/src/Virt_HostedResourcePool.c	Thu Nov 29 13:28:40 2007 +0100
+++ b/src/Virt_HostedResourcePool.c	Thu Nov 29 13:33:17 2007 +0100
@@ -119,27 +119,51 @@ static CMPIInstance *make_ref(const CMPI
         return refinst;
 }
 
+char* group_component[] = {
+        "Xen_HostSystem",
+        "KVM_HostSystem",
+        NULL
+};
+
+char* part_component[] = {
+        "Xen_ProcessorPool",
+        "Xen_MemoryPool",
+        "Xen_NetworkPool",
+        "Xen_DiskPool",
+        "KVM_ProcessorPool",
+        "KVM_MemoryPool",
+        "KVM_NetworkPool",
+        "KVM_DiskPool",
+        NULL
+};
+
+char* assoc_classname[] = {
+        "Xen_HostedResourcePool",
+        "KVM_HostedResourcePool",        
+        NULL
+};
+
 struct std_assoc forward = {
-        .source_class = "CIM_ResourcePool",
+        .source_class = (char**)&part_component,
         .source_prop = "PartComponent",
 
-        .target_class = "CIM_System",
+        .target_class = (char**)&group_component,
         .target_prop = "GroupComponent",
 
-        .assoc_class = NULL,
+        .assoc_class = (char**)&assoc_classname,
 
         .handler = pool_to_sys,
         .make_ref = make_ref
 };
 
 struct std_assoc backward = {
-        .source_class = "CIM_System",
+        .source_class = (char**)&group_component,
         .source_prop = "GroupComponent",
 
-        .target_class = "CIM_ResourcePool",
+        .target_class = (char**)&part_component,
         .target_prop = "PartComponent",
 
-        .assoc_class = NULL,
+        .assoc_class = (char**)&assoc_classname,
 
         .handler = sys_to_pool,
         .make_ref = make_ref




More information about the Libvirt-cim mailing list