Package ganeti :: Module cmdlib :: Class LUPowercycleNode
[hide private]
[frames] | no frames]

Class LUPowercycleNode

source code


Powercycles a node.

Instance Methods [hide private]
 
CheckArguments(self)
Check syntactic validity for the opcode arguments.
source code
 
ExpandNames(self)
Locking for PowercycleNode.
source code
 
Exec(self, feedback_fn)
Reboots a node.
source code

Inherited from NoHooksLU: BuildHooksEnv

Inherited from LogicalUnit: CheckPrereq, DeclareLocks, HooksCallBack, __init__

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

Class Variables [hide private]
  _OP_PARAMS = [_PNodeName, _PForce,]
a list of opcode attributes, their defaults values they should get if not already defined, and types they must match
  REQ_BGL = False

Inherited from NoHooksLU: HPATH, HTYPE

Inherited from LogicalUnit: ssh

Instance Variables [hide private]

Inherited from LogicalUnit: dry_run_result

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

CheckArguments(self)

source code 

Check syntactic validity for the opcode arguments.

This method is for doing a simple syntactic check and ensure validity of opcode parameters, without any cluster-related checks. While the same can be accomplished in ExpandNames and/or CheckPrereq, doing these separate is better because:

  • ExpandNames is left as as purely a lock-related function
  • CheckPrereq is run after we have acquired locks (and possible waited for them)

The function is allowed to change the self.op attribute so that later methods can no longer worry about missing parameters.

Overrides: LogicalUnit.CheckArguments
(inherited documentation)

ExpandNames(self)

source code 

Locking for PowercycleNode.

This is a last-resort option and shouldn't block on other jobs. Therefore, we grab no locks.

Overrides: LogicalUnit.ExpandNames

Exec(self, feedback_fn)

source code 

Reboots a node.

Overrides: LogicalUnit.Exec