class documentation
class _RunWhenNodesReachableHelper(object):
Helper class to make shared internal state sharing easier.
Method | __call__ |
When called we run action_cb. |
Method | __init__ |
Init the object. |
Method |
|
Checks if a host is up or waits remaining seconds. |
Instance Variable | action |
Undocumented |
Instance Variable | down |
Undocumented |
Instance Variable | feedback |
Undocumented |
Instance Variable | node2ip |
Undocumented |
Instance Variable | port |
Undocumented |
Instance Variable | success |
Indicates if all action_cb calls were successful |
Instance Variable | up |
Undocumented |
Instance Variable | _ping |
Undocumented |
Instance Variable | _sleep |
Undocumented |
def __init__(self, node_list, action_cb, node2ip, port, feedback_fn, _ping_fn=netutils.TcpPing, _sleep_fn=time.sleep):
¶
Init the object.
Parameters | |
node | The list of nodes to be reachable |
action | Callback called when a new host is reachable |
node2ip:dict | Node to ip mapping |
port | The port to use for the TCP ping |
feedback | The function used for feedback |
_ping | Function to check reachabilty (for unittest use only) |
_sleep | Function to sleep (for unittest use only) |