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

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