Package ClusterShell :: Module Propagation :: Class PropagationChannel
[hide private]
[frames] | no frames]

Class PropagationChannel

source code


Admin node propagation logic. Instances are able to handle incoming messages from a directly connected gateway, process them and reply.

In order to take decisions, the instance acts as a finite states machine, whose current state evolves according to received data.

-- INTERNALS -- Instance can be in one of the 4 different states:

Instance Methods [hide private]
 
__init__(self, task, gateway)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
send_queued(self, ctl)
helper used to send a message, using msg queue if needed
source code
 
send_dequeue(self)
helper used to send one queued message (if any)
source code
 
start(self)
start propagation channel
source code
 
recv(self, msg)
process incoming messages
source code
 
shell(self, nodes, command, worker, timeout, stderr, gw_invoke_cmd, remote)
command execution through channel
source code
 
write(self, nodes, buf, worker)
write buffer through channel to nodes on standard input
source code
 
set_write_eof(self, nodes, worker)
send EOF through channel to specified nodes
source code
 
recv_cfg(self, msg)
handle incoming messages for state 'propagate configuration'
source code
 
recv_ctl(self, msg)
handle incoming messages for state 'control'
source code
 
ev_hup(self, worker)
Channel command is closing
source code
 
ev_close(self, worker)
Channel is closing
source code

Inherited from Communication.Channel: ev_read, ev_start, send

Inherited from Communication.Channel (private): _close, _init, _open

Inherited from Event.EventHandler: ev_error, ev_msg, ev_pickup, ev_timeout, ev_timer, ev_written

Inherited from Event.EventHandler (private): _ev_routing

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

Class Variables [hide private]

Inherited from Communication.Channel: SNAME_ERROR, SNAME_READER, SNAME_WRITER

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, task, gateway)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

start(self)

source code 

start propagation channel

Overrides: Communication.Channel.start

recv(self, msg)

source code 

process incoming messages

Overrides: Communication.Channel.recv

ev_hup(self, worker)

source code 

Channel command is closing

Overrides: Event.EventHandler.ev_hup

ev_close(self, worker)

source code 

Channel is closing

Overrides: Event.EventHandler.ev_close