Package ganeti :: Package cmdlib :: Module node :: 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 base.NoHooksLU: BuildHooksEnv, BuildHooksNodes, PreparePostHookNodes

Inherited from base.LogicalUnit: AssertReleasedLocks, CheckPrereq, DeclareLocks, HooksCallBack, PrepareRetry, WConfdClient, __init__, owned_locks, release_request

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 base.NoHooksLU: HPATH, HTYPE

Instance Variables [hide private]

Inherited from base.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: base.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: base.LogicalUnit.ExpandNames

Exec(self, feedback_fn)

source code 

Reboots a node.

Overrides: base.LogicalUnit.Exec