
# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1196341254 -3600 # Node ID 357d15061ef722c1e01936f2a3faeed638526938 # Parent 06cf0d4357cbfc21a051f26659f5c64dc2cc0c16 SD: 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 06cf0d4357cb -r 357d15061ef7 src/Virt_SystemDevice.c --- a/src/Virt_SystemDevice.c Thu Nov 29 13:56:51 2007 +0100 +++ b/src/Virt_SystemDevice.c Thu Nov 29 14:00:54 2007 +0100 @@ -244,23 +244,51 @@ static CMPIStatus dev_to_sys(const CMPIO return s; } +char* group_component[] = { + "Xen_HostSystem", + "KVM_HostSystem", + NULL +}; + +char* part_component[] = { + "Xen_Processor", + "Xen_Memory", + "Xen_Network", + "Xen_Disk", + "KVM_Processor", + "KVM_Memory", + "KVM_Network", + "KVM_Disk", + NULL +}; + +char* assoc_classname[] = { + "Xen_SystemDevice", + "KVM_SystemDevice", + NULL +}; + static struct std_assoc forward = { - .source_class = "CIM_System", + .source_class = (char**)&group_component, .source_prop = "GroupComponent", - .target_class = "CIM_LogicalDevice", + .target_class = (char**)&part_component, .target_prop = "PartComponent", + + .assoc_class = (char**)&assoc_classname, .handler = sys_to_dev, .make_ref = make_ref }; static struct std_assoc backward = { - .source_class = "CIM_LogicalDevice", + .source_class = (char**)&part_component, .source_prop = "PartComponent", - .target_class = "CIM_System", + .target_class = (char**)&group_component, .target_prop = "GroupComponent", + + .assoc_class = (char**)&assoc_classname, .handler = dev_to_sys, .make_ref = make_ref