CIM events

Krzysztof Kwaśniewski krzykwas at gmail.com
Fri Nov 30 17:46:40 UTC 2012


Hello!

I have encountered several problems when trying to implement support for cim events in PyAgent, my gsoc project to which I'd like to still contribute. I'd like to ask you for help. I try to subscribe to a tog-pegasus instance to be informed about occurences of some specific events. In the end, what events exactly I'll be interested in is going to depend on the user and that is why the solution needs to be generic. I know I need to create instances of CIM_IndicationHandlerCIMXML and CIM_IndicationFilter, then an instance of CIM_IndicationSubscription. Apart from that I'll need to have an „listener” that will receive the notifications over http (basically it's going to be a small http server). I have a simple listener implementation, but for now I'd like to make a subscription.

To have more cim classes at hand I've installed all the openlmi-* packages. I've found - for instance - CIM_J2eeNotification, let's make an example on its base (it's the same with all the classes). Currently PyAgent subscribes in a following way:
1. Removes old handler, filter and subscription, if only they exist.
2. Creates a handler. From yawn:
Instance of CIM_IndicationHandlerCIMXML
Host: Null
Namespace: root/PG_InterOp


Type Name Value
	string 	CreationClassName 	CIM_IndicationHandlerCIMXML
	string 	Name 	PyAgentIndication
	string 	SystemCreationClassName 	CIM_ComputerSystem
	string 	SystemName 	fedora
	string 	Caption 	Null
	string 	Description 	Null
	string 	Destination 	http://192.168.0.102
	string 	ElementName 	Null
	string 	InstanceID 	Null
	string 	OtherPersistenceType 	Null
	string 	OtherProtocol 	Null
	string 	Owner 	Null
	uint16 	PersistenceType 	2 (Permanent)
	uint16 	Protocol 	2 (CIM-XML)

3. Creates a filter:
Instance of CIM_IndicationFilter
Host: Null
Namespace: root/PG_InterOp

	Delete
Modify 	View Objects Associated with this Instance
(With Filters)
Type Name Value
	string 	CreationClassName 	CIM_IndicationFilter
	string 	Name 	PyAgentIndication
	string 	SystemCreationClassName 	CIM_ComputerSystem
	string 	SystemName 	fedora
	string 	Caption 	Null
	string 	Description 	Null
	string 	ElementName 	Null
	boolean 	IndividualSubscriptionSupported 	True
	string 	InstanceID 	Null
	string 	Query 	SELECT * FROM CIM_J2eeNotification
	string 	QueryLanguage 	WQL
	string 	SourceNamespace 	root/cimv2
	string [ ] 	SourceNamespaces 	Null
4. I try to create a subscription in root/PG_InterOp that would refer to the existing handler and filter. When creating a subscription, an error occurs and no subscription instance is created. The returned message reads: „CIM_ERR_NOT_SUPPORTED: No providers are capable of servicing the subscription.” Well, it's more less self-explanatory why it fails. But why does it happen with all the CIM_Indication subclasses I can find in my tog-pegasus? This is the list of them:

	CIM_Indication 	Instance Names 	Instances
	|--- CIM_ClassIndication 	Instance Names 	Instances
	| |--- CIM_ClassCreation 	Instance Names 	Instances
	| |--- CIM_ClassDeletion 	Instance Names 	Instances
	| |--- CIM_ClassModification 	Instance Names 	Instances
	|--- CIM_InstIndication 	Instance Names 	Instances
	| |--- CIM_InstCreation 	Instance Names 	Instances
	| |--- CIM_InstDeletion 	Instance Names 	Instances
	| |--- CIM_InstMethodCall 	Instance Names 	Instances
	| |--- CIM_InstModification 	Instance Names 	Instances
	| |--- CIM_InstRead 	Instance Names 	Instances
	|--- CIM_ProcessIndication 	Instance Names 	Instances
	| |--- CIM_AlertIndication 	Instance Names 	Instances
	| | |--- CIM_AlertInstIndication 	Instance Names 	Instances
	| | |--- CIM_ThresholdIndication 	Instance Names 	Instances
	| |--- CIM_J2eeNotification 	Instance Names 	Instances
	| |--- CIM_SNMPTrapIndication 	Instance Names 	Instances
	| |--- Linux_MetricIndication 	Instance Names 	Instances
Why there are no providers? Where to get them from? Do you have any idea why it works like that?


Cheers

Krzysiek



More information about the openlmi-devel mailing list