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

Class _RunWhileClusterStoppedHelper

source code

Helper class for RunWhileClusterStopped to simplify state management

Instance Methods [hide private]
 
__init__(self, feedback_fn, cluster_name, master_node, online_nodes)
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
Method Details [hide private]

__init__(self, feedback_fn, cluster_name, master_node, online_nodes)
(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
  • master_node (string @param master_node Master node name)

_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