Package ganeti :: Package cmdlib :: Package cluster :: Class LUClusterDestroy
[hide private]
[frames] | no frames]

Class LUClusterDestroy

source code


Logical unit for destroying the cluster.

Instance Methods [hide private]
dict
BuildHooksEnv(self)
Build hooks env.
source code
tuple; (list, list)
BuildHooksNodes(self)
Build hooks nodes.
source code
 
CheckPrereq(self)
Check prerequisites.
source code
 
Exec(self, feedback_fn)
Destroys the cluster.
source code

Inherited from base.LogicalUnit: AssertReleasedLocks, CheckArguments, DeclareLocks, ExpandNames, HooksCallBack, PreparePostHookNodes, 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 = "cluster-destroy"
hash(x)
  HTYPE = constants.HTYPE_CLUSTER
hash(x)
  clusterHasBeenDestroyed = False

Inherited from base.LogicalUnit: REQ_BGL

Instance Variables [hide private]

Inherited from base.LogicalUnit: dry_run_result

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

BuildHooksEnv(self)

source code 

Build hooks env.

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: base.LogicalUnit.BuildHooksEnv

BuildHooksNodes(self)

source code 

Build hooks nodes.

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: base.LogicalUnit.BuildHooksNodes

CheckPrereq(self)

source code 

Check prerequisites.

This checks whether the cluster is empty.

Any errors are signaled by raising errors.OpPrereqError.

Overrides: base.LogicalUnit.CheckPrereq

Exec(self, feedback_fn)

source code 

Destroys the cluster.

Overrides: base.LogicalUnit.Exec