
# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1196334170 -3600 # Node ID d8dbe141c0b4a99c4ee0d380c8bcfe6abb6d8d66 # Parent af7ce48b18bed937d49df9d4073cac564c391971 EAFP: 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@linux.vnet.ibm.com> diff -r af7ce48b18be -r d8dbe141c0b4 src/Virt_ElementAllocatedFromPool.c --- a/src/Virt_ElementAllocatedFromPool.c Thu Nov 29 11:52:08 2007 +0100 +++ b/src/Virt_ElementAllocatedFromPool.c Thu Nov 29 12:02:50 2007 +0100 @@ -264,23 +264,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_Processor", + "Xen_Memory", + "Xen_Network", + "Xen_Disk", + "KVM_Processor", + "KVM_Memory", + "KVM_Network", + "KVM_Disk", + NULL +}; + +char* assoc_classname[] = { + "Xen_ElementAllocatedFromPool", + "KVM_ElementAllocatedFromPool", + NULL +}; + static struct std_assoc _vdev_to_pool = { - .source_class = "CIM_LogicalDevice", + .source_class = (char**)&dependent, .source_prop = "Dependent", - .target_class = "CIM_ResourcePool", + .target_class = (char**)&antecedent, .target_prop = "Antecedent", + + .assoc_class = (char**)&assoc_classname, .handler = vdev_to_pool, .make_ref = make_ref }; static struct std_assoc _pool_to_vdev = { - .source_class = "CIM_ResourcePool", + .source_class = (char**)&antecedent, .source_prop = "Antecedent", - .target_class = "CIM_LogicalDevice", + .target_class = (char**)&dependent, .target_prop = "Dependent", + + .assoc_class = (char**)&assoc_classname, .handler = pool_to_vdev, .make_ref = make_ref