[PATCH 0 of 2] Update ECTP to support filtering by result class.

# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1221078400 25200 # Node ID bf0c9fa34906c28cfd049d4785ee5a54fcf7b30b # Parent e4e78fce79575db03c1629d625a53ec13f33992b Update cimv216-interop_mof and Makefile to install classes needed for ECTP. In order to filter ECTP queries using a result class, the central class mofs need to be added to root/interop. Some of those classes have dependencies - those need to be added to cimv216-interop_mof. Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r e4e78fce7957 -r bf0c9fa34906 Makefile.am --- a/Makefile.am Fri Sep 05 11:55:57 2008 -0700 +++ b/Makefile.am Wed Sep 10 13:26:40 2008 -0700 @@ -48,6 +48,11 @@ schema/ComputerSystem.mof \ schema/HostSystem.mof \ schema/RegisteredProfile.mof \ + schema/DiskPool.mof \ + schema/MemoryPool.mof \ + schema/NetPool.mof \ + schema/ProcessorPool.mof \ + schema/VSMigrationService.mof \ schema/ElementConformsToProfile.mof \ schema/ReferencedProfile.mof diff -r e4e78fce7957 -r bf0c9fa34906 base_schema/cimv216-interop_mof --- a/base_schema/cimv216-interop_mof Fri Sep 05 11:55:57 2008 -0700 +++ b/base_schema/cimv216-interop_mof Wed Sep 10 13:26:40 2008 -0700 @@ -13,3 +13,12 @@ #pragma include ("Interop/CIM_ElementConformsToProfile.mof") #pragma include ("Interop/CIM_ReferencedProfile.mof") #pragma include ("Interop/CIM_SubProfileRequiresProfile.mof") +#pragma include ("Core/CIM_Service.mof") +#pragma include ("Core/CIM_SettingData.mof") +#pragma include ("Core/CIM_VirtualSystemSettingData.mof") +#pragma include ("Core/CIM_LogicalDevice.mof") +#pragma include ("Core/CIM_ResourceAllocationSettingData.mof") +#pragma include ("Interop/CIM_Error.mof") +#pragma include ("Core/CIM_Job.mof") +#pragma include ("Core/CIM_ConcreteJob.mof") +#pragma include ("Core/CIM_ResourcePool.mof")

# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1221078423 25200 # Node ID 2a9fb589cd7ab6bd83ec132f8defb3e05af2d6c1 # Parent bf0c9fa34906c28cfd049d4785ee5a54fcf7b30b Fix ECTP elem_to_prof() to work with central class. Also, add pools and VSMigrationService to the managed_element[] struct so that filtering by result class is possible. Sample query: wbemcli ain -arc KVM_NetworkPool 'http://localhost/root/interop:KVM_RegisteredProfile.InstanceID="CIM:DSP1059-GenericDeviceResourceVirtualization-1.0.0_n"' Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r bf0c9fa34906 -r 2a9fb589cd7a src/Virt_ElementConformsToProfile.c --- a/src/Virt_ElementConformsToProfile.c Wed Sep 10 13:26:40 2008 -0700 +++ b/src/Virt_ElementConformsToProfile.c Wed Sep 10 13:27:03 2008 -0700 @@ -185,11 +185,14 @@ } for (i = 0; profiles[i] != NULL; i++) { - if (profiles[i]->scoping_class == NULL) + + if ((profiles[i]->scoping_class == NULL) || + (!STREQC(profiles[i]->scoping_class, classname))) { + + if ((profiles[i]->central_class == NULL) || + (!STREQC(profiles[i]->central_class, classname))) continue; - - if (!STREQC(profiles[i]->scoping_class, classname)) - continue; + } s = get_profile(_BROKER, ref, @@ -222,10 +225,25 @@ static char* managed_element[] = { "Xen_HostSystem", "Xen_ComputerSystem", + "Xen_DiskPool", + "Xen_MemoryPool", + "Xen_NetworkPool", + "Xen_ProcessorPool", + "Xen_VirtualSystemMigrationService", "KVM_HostSystem", "KVM_ComputerSystem", + "KVM_DiskPool", + "KVM_MemoryPool", + "KVM_NetworkPool", + "KVM_ProcessorPool", + "KVM_VirtualSystemMigrationService", "LXC_HostSystem", "LXC_ComputerSystem", + "LXC_DiskPool", + "LXC_MemoryPool", + "LXC_NetworkPool", + "LXC_ProcessorPool", + "LXC_VirtualSystemMigrationService", NULL };
participants (1)
-
Kaitlin Rupert