From: <jc...@us...> - 2007-12-06 21:06:15
|
Revision: 411 http://pywbem.svn.sourceforge.net/pywbem/?rev=411&view=rev Author: jcarey Date: 2007-12-06 13:06:19 -0800 (Thu, 06 Dec 2007) Log Message: ----------- adjusted to indication provider interface changes Modified Paths: -------------- pyprovifc/test/trunk/UpcallAtom-peg.mof pyprovifc/test/trunk/UpcallAtomProvider.py Modified: pyprovifc/test/trunk/UpcallAtom-peg.mof =================================================================== --- pyprovifc/test/trunk/UpcallAtom-peg.mof 2007-12-06 19:18:48 UTC (rev 410) +++ pyprovifc/test/trunk/UpcallAtom-peg.mof 2007-12-06 21:06:19 UTC (rev 411) @@ -1,3 +1,4 @@ +/* [ Description("Testing up-calls into the CIMOM from a provider")] class UpcallAtom { @@ -24,7 +25,7 @@ CreationClassName = "CIM_IndicationFilter"; Name = "UpcallAtom_Indication_Filter"; SystemCreationClassName = "CIM_ComputerSystem"; - SystemName = "127.0.0.1"; + SystemName = "jmc2.provo.novell.com"; SourceNamespace = "root/cimv2"; Query = "select * from UpcallAtom_Indication"; QueryLanguage = "WQL"; @@ -35,14 +36,14 @@ CreationClassName = "CIM_IndicationHandlerCIMXML"; Name = "UpcallAtom_Indication_Handler"; SystemCreationClassName = "CIM_ComputerSystem"; - SystemName = "127.0.0.1"; + SystemName = "jmc2.provo.novell.com"; Destination = "localhost/cimlistener/UpcallAtom"; }; +*/ INSTANCE OF CIM_IndicationSubscription { Filter = $filter; Handler = $dest; - AlertOnStateChange = false; }; Modified: pyprovifc/test/trunk/UpcallAtomProvider.py =================================================================== --- pyprovifc/test/trunk/UpcallAtomProvider.py 2007-12-06 19:18:48 UTC (rev 410) +++ pyprovifc/test/trunk/UpcallAtomProvider.py 2007-12-06 21:06:19 UTC (rev 411) @@ -35,8 +35,10 @@ # Note: consume_indication is called on OpenPegasus because this is an # indication consumer in that environment. def consume_indication(env, destinationPath, indicationInstance): + print '#### consume_indication called' global _indication_names if indicationInstance['Description'] in _indication_names.keys(): + print '#### consume_indication: My Indication :-)!' _indication_names[indicationInstance['Description']] = True ################################################################################ @@ -280,7 +282,7 @@ _inst_paths = [] ############################################################################## -def activate_filter(env, filter, eventType, namespace, classes, firstActivation): +def activate_filter(env, filter, namespace, classes, firstActivation): print '#### Python activate_filter called. filter: %s' % filter print '#### Python firstActivation: %d' % firstActivation @@ -295,7 +297,7 @@ ############################################################################## -def deactivate_filter(env, filter, eventType, namespace, classes, lastActivation): +def deactivate_filter(env, filter, namespace, classes, lastActivation): print '#### Python deactivate_filter called. filter: %s' % filter print '#### Python lastActivation: %d' % lastActivation @@ -309,7 +311,7 @@ # theIndicationThread = None ############################################################################## -def authorize_filter(env, filter, eventType, namespace, classes, owner): +def authorize_filter(env, filter, namespace, classes, owner): print '#### Python authorize_filter called. filter: %s' % filter print '#### Python authorize_filter owner: %s' % owner logger = env.get_logger() @@ -325,6 +327,7 @@ """ def __init__ (self, env): + print '#### UpcallAtomProvider CTOR' logger = env.get_logger() logger.log_debug('Initializing provider %s from %s' \ % (self.__class__.__name__, __file__)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |