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

Class LUNodePowercycle

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, BuildHooksNodes

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]
  REQ_BGL = False

Inherited from NoHooksLU: HPATH, HTYPE

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