[Libvirt-cim] [PATCH] Fix indication_tester's filter deletion issue
Heidi Eckhart
heidieck at linux.vnet.ibm.com
Wed Mar 12 15:52:33 UTC 2008
Jay Gagnon wrote:
> Dan Smith wrote:
>>
>> Can you explain why the XML was wrong and why this fixes it?
>>
>>
> Sure. I used -d to see what xml was actually going across for the
> filter. The create xml started off like this:
> <?xml version="1.0" encoding="utf-8"?>
> <CIM CIMVERSION="2.0" DTDVERSION="2.0">
> <MESSAGE ID="4711" PROTOCOLVERSION="1.0">
> <SIMPLEREQ>
> <IMETHODCALL NAME="CreateInstance">
> <LOCALNAMESPACEPATH>
> <NAMESPACE NAME="root"/>
> <NAMESPACE NAME="PG_InterOp"/>
> </LOCALNAMESPACEPATH>
> <IPARAMVALUE NAME="NewInstance">
> <INSTANCE CLASSNAME="CIM_IndicationFilter">
>
> And then the corresponding delete xml started off like this:
> <?xml version="1.0" encoding="utf-8"?>
> <CIM CIMVERSION="2.0" DTDVERSION="2.0">
> <MESSAGE ID="4711" PROTOCOLVERSION="1.0">
> <SIMPLEREQ>
> <IMETHODCALL NAME="DeleteInstance">
> <LOCALNAMESPACEPATH>
> <NAMESPACE NAME="root"/>
> <NAMESPACE NAME="PG_InterOp"/>
> </LOCALNAMESPACEPATH>
> <IPARAMVALUE NAME="InstanceName">
> <INSTANCENAME CLASSNAME="CIM_IndicationFilterCIMXML">
>
> The classnames don't match up, so when we make the delete request the
> CIMOM can't find the right instance to delete. Both handler and
> subscription have the classnames properly matched, so they get created
> and deleted properly. Now the one other thing I noticed is that
> handler and subscription have the CIMXML suffix on both create and
> delete, so maybe the more correct solution is to add it to the filter
> create, not remove it from the filter delete. Do we have anything
> official that can answer that for us?
>
The reason is defined within the CIM model: There exists only the one
class CIM_IndicationHandlerCIMXML with the CIMXML suffix.
CIM_IndicationHandler is the parent of this class and abstract, which
means that no instances of this class are allowed. So instances of the
Handler are CIM_IndicationHandlerCIMXML.
For CIM_IndicationFilter and CIM_IndicationSubscription no class with
the CIMXML suffix exists. In this cases the CIMXML suffix is a typo.
ls /var/lib/Pegasus/repository/root#PG_InterOp/classes
...
-rw-r----- 1 root pegasus 2599 2008-01-10 12:07 CIM_Indication.#
-rw-r----- 1 root pegasus 5699 2008-01-10 12:07
CIM_IndicationFilter.CIM_ManagedElement
-rw-r----- 1 root pegasus 6679 2008-01-10 12:07
CIM_IndicationHandler.CIM_ListenerDestination
-rw-r----- 1 root pegasus 7045 2008-01-10 12:07
CIM_IndicationHandlerCIMXML.CIM_IndicationHandler
-rw-r----- 1 root pegasus 11290 2008-01-10 12:07
CIM_IndicationSubscription.#
...
--
Regards
Heidi Eckhart
Software Engineer
IBM Linux Technology Center - Open Hypervisor
More information about the Libvirt-cim
mailing list