Package ganeti :: Package confd :: Module client :: Class ConfdCountingCallback
[hide private]
[frames] | no frames]

Class ConfdCountingCallback

source code


Callback that calls another callback, and counts the answers

Instance Methods [hide private]
 
__init__(self, callback, logger=None)
Constructor for ConfdCountingCallback
source code
 
RegisterQuery(self, salt) source code
 
AllAnswered(self)
Have all the registered queries received at least an answer?
source code
 
_HandleExpire(self, up) source code
boolean
_HandleReply(self, up)
Handle a single confd reply, and decide whether to filter it.
source code
 
__call__(self, up)
Filtering callback
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, callback, logger=None)
(Constructor)

source code 

Constructor for ConfdCountingCallback

Parameters:
  • callback (f(ConfdUpcallPayload)) - function to call when getting answers
  • logger (logging.Logger) - optional logger for internal conditions
Overrides: object.__init__

_HandleReply(self, up)

source code 

Handle a single confd reply, and decide whether to filter it.

Returns: boolean
True if the reply should be filtered, False if it should be passed on to the up-callback

__call__(self, up)
(Call operator)

source code 

Filtering callback

Parameters: