
# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1196341011 -3600 # Node ID 06cf0d4357cbfc21a051f26659f5c64dc2cc0c16 # Parent 559a1c5a58401f7437037cb54219dda6914e3c81 SDS: 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 559a1c5a5840 -r 06cf0d4357cb src/Virt_SettingsDefineState.c --- a/src/Virt_SettingsDefineState.c Thu Nov 29 13:50:36 2007 +0100 +++ b/src/Virt_SettingsDefineState.c Thu Nov 29 13:56:51 2007 +0100 @@ -301,33 +301,73 @@ static CMPIInstance *make_ref(const CMPI return refinst; } +char* logical_device[] = { + "Xen_Processor", + "Xen_Memory", + "Xen_Network", + "Xen_Disk", + "KVM_Processor", + "KVM_Memory", + "KVM_Network", + "KVM_Disk", + NULL +}; + +char* resource_allocation_setting_data[] = { + "Xen_ResourceAllocationSettingData", + "KVM_ResourceAllocationSettingData", + NULL +}; + +char* computer_system[] = { + "Xen_ComputerSystem", + "KVM_ComputerSystem", + NULL +}; + +char* virtual_system_setting_data[] = { + "Xen_VirtualSystemSettingData", + "KVM_VirtualSystemSettingData", + NULL +}; + +char* assoc_classname[] = { + "Xen_SettingsDefineState", + "KVM_SettingsDefineState", + NULL +}; + static struct std_assoc _dev_to_rasd = { - .source_class = "CIM_LogicalDevice", + .source_class = (char**)&logical_device, .source_prop = "ManagedElement", - .target_class = "CIM_ResourceAllocationSettingData", + .target_class = (char**)&resource_allocation_setting_data, .target_prop = "SettingData", + + .assoc_class = (char**)&assoc_classname, .handler = dev_to_rasd, .make_ref = make_ref }; static struct std_assoc _rasd_to_dev = { - .source_class = "CIM_ResourceAllocationSettingData", + .source_class = (char**)&resource_allocation_setting_data, .source_prop = "SettingData", - .target_class = "CIM_LogicalDevice", + .target_class = (char**)&logical_device, .target_prop = "ManagedElement", + + .assoc_class = (char**)&assoc_classname, .handler = rasd_to_dev, .make_ref = make_ref }; static struct std_assoc _vs_to_vssd = { - .source_class = "CIM_ComputerSystem", + .source_class = (char**)&computer_system, .source_prop = "ManagedElement", - .target_class = "CIM_VirtualSystemSettingData", + .target_class = (char**)&virtual_system_setting_data, .target_prop = "SettingData", .handler = vs_to_vssd, @@ -335,10 +375,10 @@ static struct std_assoc _vs_to_vssd = { }; static struct std_assoc _vssd_to_vs = { - .source_class = "CIM_VirtualSystemSettingData", + .source_class = (char**)&virtual_system_setting_data, .source_prop = "SettingData", - .target_class = "CIM_ComputerSystem", + .target_class = (char**)&computer_system, .target_prop = "ManagedElement", .handler = vssd_to_vs,