[Libvirt-cim] [PATCH 1 of 2] Add property filtering to RASD provider

Heidi Eckhart heidieck at linux.vnet.ibm.com
Tue Feb 26 09:34:26 UTC 2008


Kaitlin Rupert wrote:
>>> +
>>> +        if (properties != NULL) {
>>> +                const char *keys[] = {"InstanceID", NULL};
>>> +                s = CMSetPropertyFilter(inst, properties, keys);
>>> +                /* FIXME - in case of an error, should we continue 
>>> on? */
>>> +                if (s.rc != CMPI_RC_OK)
>>> +                        CU_DEBUG("Unable to set property filter: 
>>> %d", s.rc);
>>> +        }
>>>   
>> That's a very good point to enable the provider interfaces for the 
>> property filtering :). I think it makes sense to move this code into 
>> get_typed_instance() of libxkutil, to avoid implementing these lines 
>> for every provider. What's then only necessary is routing the 
>> properties list through the interfaces. But you will now think ... 
>> and how about the keys ? Well, that's an interesting thing. The CMPI 
>> 2.0 spec tells the following about the keys:
>> CMPI 2.0 Spec; "The keyList argument shall be ignored by the MB; it 
>> is here to maintain binary compatibility with previous 
>> specifications. Providers should explicitly set the key names and 
>> values via the CMPIInstanceMI.setObjectPath() function."
>> Translated I think this means, that we can ignore the keys by setting 
>> it to NULL. Do you agree ?
>
> I tried using NULL for the keys based on the same line from the CMPI 
> spec, but this crashed the provider.  I might be missing something 
> though.
I've tested it with Pegasus and sfcb:
Pegasus returns with FAILED and does not set the propertylist
sfcb is crashing
So my interpretation of this description seem to be wrong and the 
keyList is needed. Thanks for evaluating this.

-- 
Regards

Heidi Eckhart
Software Engineer
IBM Linux Technology Center - Open Hypervisor




More information about the Libvirt-cim mailing list