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
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

_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: