[PATCH] ESD does not support specific result clases properly

# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1196448217 28800 # Node ID 6515e4a1c90bba936fa1a15ddf2f501491e16fb5 # Parent a10df58ddd0ed7f8e905ce21a28a5e585fd304ff ESD does not support specific result clases properly. Specifying a result class of Xen_VirtualSystemSettingData does not work (see query below), however a result class of CIM_ManagedElement does work. This is because I tried to make this provider accept both generic and specific result classes. Heidi's libcmpiutil API update makes it so that the providers don't need to be concerned with handling more generic cases (CIM_ManagedElement, CIM_VirtualSystemSettingData, etc). Also, I missed this during Heidi's patch review - instead of using Xen_ResourceAllocationSettingData / KVM_ResourceAllocationSettingData in the resource_allocation_setting_data list, we should use specific RASD class names so that specifying a specific RASD class as a result class is supported. See below for failing query. Failing queries: wbemcli ain -ac Xen_ElementSettingData -arc Xen_VirtualSystemSettingData 'http://root:elm3b41@localhost/root/virt:Xen_VirtualSystemSettingData.InstanceID="Xen:Domain-0"' wbemcli ain -ac Xen_ElementSettingData -arc Xen_ProcResourceAllocationSettingData 'http://root:elm3b41@localhost/root/virt:Xen_ProcResourceAllocationSettingData.InstanceID="Domain-0/3"' Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r a10df58ddd0e -r 6515e4a1c90b src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Fri Nov 30 11:40:21 2007 +0100 +++ b/src/Virt_ElementSettingData.c Fri Nov 30 10:43:37 2007 -0800 @@ -178,13 +178,14 @@ char* virtual_system_setting_data[] = { }; char* resource_allocation_setting_data[] = { - "Xen_ResourceAllocationSettingData", - "KVM_ResourceAllocationSettingData", - NULL -}; - -char* managed_element[] = { - "CIM_ManagedElement", + "Xen_DiskResourceAllocationSettingData", + "Xen_MemResourceAllocationSettingData", + "Xen_NetResourceAllocationSettingData", + "Xen_ProcResourceAllocationSettingData", + "KVM_DiskResourceAllocationSettingData", + "KVM_MemResourceAllocationSettingData", + "KVM_NetResourceAllocationSettingData", + "KVM_ProcResourceAllocationSettingData", NULL }; @@ -198,7 +199,7 @@ static struct std_assoc _vssd_to_vssd = .source_class = (char**)&virtual_system_setting_data, .source_prop = "ManagedElement", - .target_class = (char**)&managed_element, + .target_class = (char**)&virtual_system_setting_data, .target_prop = "SettingData", .assoc_class = (char**)&assoc_classname, @@ -211,7 +212,7 @@ static struct std_assoc _rasd_to_rasd = .source_class = (char**)&resource_allocation_setting_data, .source_prop = "ManagedElement", - .target_class = (char**)&managed_element, + .target_class = (char**)&resource_allocation_setting_data, .target_prop = "SettingData", .assoc_class = (char**)&assoc_classname,

KR> # HG changeset patch KR> # User Kaitlin Rupert <karupert@us.ibm.com> KR> # Date 1196448217 28800 KR> # Node ID 6515e4a1c90bba936fa1a15ddf2f501491e16fb5 KR> # Parent a10df58ddd0ed7f8e905ce21a28a5e585fd304ff KR> ESD does not support specific result clases properly. Looks pretty straightforward to me. Thanks! -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com

Kaitlin Rupert wrote:
# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1196448217 28800 # Node ID 6515e4a1c90bba936fa1a15ddf2f501491e16fb5 # Parent a10df58ddd0ed7f8e905ce21a28a5e585fd304ff ESD does not support specific result clases properly.
Specifying a result class of Xen_VirtualSystemSettingData does not work (see query below), however a result class of CIM_ManagedElement does work.
This is because I tried to make this provider accept both generic and specific result classes. Heidi's libcmpiutil API update makes it so that the providers don't need to be concerned with handling more generic cases (CIM_ManagedElement, CIM_VirtualSystemSettingData, etc).
Also, I missed this during Heidi's patch review - instead of using Xen_ResourceAllocationSettingData / KVM_ResourceAllocationSettingData in the resource_allocation_setting_data list, we should use specific RASD class names so that specifying a specific RASD class as a result class is supported. See below for failing query.
Failing queries: wbemcli ain -ac Xen_ElementSettingData -arc Xen_VirtualSystemSettingData 'http://root:elm3b41@localhost/root/virt:Xen_VirtualSystemSettingData.InstanceID="Xen:Domain-0"'
wbemcli ain -ac Xen_ElementSettingData -arc Xen_ProcResourceAllocationSettingData 'http://root:elm3b41@localhost/root/virt:Xen_ProcResourceAllocationSettingData.InstanceID="Domain-0/3"'
Great Kaitlin :). You got me. When changing this association, I was really confused about the given references, but forgot to add this comment to the mail. This makes it now clear, how the association works :). Good work ! -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck@linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294
participants (3)
-
Dan Smith
-
Heidi Eckhart
-
Kaitlin Rupert