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

Class NoHooksLU

source code


Simple LU which runs no hooks.

This LU is intended as a parent for other LogicalUnits which will run no hooks, in order to reduce duplicate code.

Instance Methods [hide private]
dict
BuildHooksEnv(self)
Empty BuildHooksEnv for NoHooksLu.
source code
tuple; (list, list)
BuildHooksNodes(self)
Empty BuildHooksNodes for NoHooksLU.
source code
list
PreparePostHookNodes(self, post_hook_node_uuids)
Empty PreparePostHookNodes for NoHooksLU.
source code

Inherited from LogicalUnit: AssertReleasedLocks, CheckArguments, CheckPrereq, DeclareLocks, Exec, ExpandNames, 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]
  HPATH = None
hash(x)
  HTYPE = None
hash(x)

Inherited from LogicalUnit: REQ_BGL

Instance Variables [hide private]

Inherited from LogicalUnit: dry_run_result

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

BuildHooksEnv(self)

source code 

Empty BuildHooksEnv for NoHooksLu.

This just raises an error.

Returns: dict
Dictionary containing the environment that will be used for running the hooks for this LU. The keys of the dict must not be prefixed with "GANETI_"--that'll be added by the hooks runner. The hooks runner will extend the environment with additional variables. If no environment should be defined, an empty dictionary should be returned (not None).
Overrides: LogicalUnit.BuildHooksEnv

BuildHooksNodes(self)

source code 

Empty BuildHooksNodes for NoHooksLU.

Returns: tuple; (list, list)
Tuple containing a list of node UUIDs on which the hook should run before the execution and a list of node UUIDs on which the hook should run after the execution. No nodes should be returned as an empty list (and not None).
Overrides: LogicalUnit.BuildHooksNodes

PreparePostHookNodes(self, post_hook_node_uuids)

source code 

Empty PreparePostHookNodes for NoHooksLU.

Parameters:
  • post_hook_node_uuids - The initial list of node UUIDs to run the post hook on, as returned by BuildHooksNodes.
Returns: list
list of node UUIDs on which the post hook should run. The default implementation returns the passed in post_hook_node_uuids, but custom implementations can choose to alter the list.
Overrides: LogicalUnit.PreparePostHookNodes