Package ganeti :: Module cli :: Class _RunWhileDaemonsStoppedHelper
[hide private]
[frames] | no frames]

Class _RunWhileDaemonsStoppedHelper

source code


Helper class for RunWhileDaemonsStopped to simplify state management

Instance Methods [hide private]
 
__init__(self, feedback_fn, cluster_name, master_node, online_nodes, ssh_ports, exclude_daemons, debug, verbose)
Initializes this class.
source code
 
_RunCmd(self, node_name, cmd)
Runs a command on the local or a remote machine.
source code
 
Call(self, fn, *args)
Call function while all daemons are stopped.
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, feedback_fn, cluster_name, master_node, online_nodes, ssh_ports, exclude_daemons, debug, verbose)
(Constructor)

source code 

Initializes this class.

Parameters:
  • feedback_fn (callable) - Feedback function
  • cluster_name (string) - Cluster name
  • online_nodes (list) - List of names of online nodes
  • ssh_ports (list) - List of SSH ports of online nodes
  • exclude_daemons (list of string) - list of daemons that will be restarted on master after all others are shutdown
  • debug (boolean) - show debug output
  • verbose (boolesn) - show verbose output
  • master_node (string @param master_node Master node name)
Overrides: object.__init__

_RunCmd(self, node_name, cmd)

source code 

Runs a command on the local or a remote machine.

Parameters:
  • node_name (string) - Machine name
  • cmd (list) - Command

Call(self, fn, *args)

source code 

Call function while all daemons are stopped.

Parameters:
  • fn (callable) - Function to be called