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

Class LUTestAllocator

source code


Run allocator tests.

This LU runs the allocator tests

Instance Methods [hide private]
 
CheckPrereq(self)
Check prerequisites.
source code
 
Exec(self, feedback_fn)
Run the allocator test.
source code

Inherited from NoHooksLU: BuildHooksEnv

Inherited from LogicalUnit: CheckArguments, DeclareLocks, ExpandNames, HooksCallBack, __init__

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

Class Variables [hide private]
  _OP_PARAMS = [("direction", ht.NoDefault, ht.TElemOf(constants...
a list of opcode attributes, their defaults values they should get if not already defined, and types they must match

Inherited from NoHooksLU: HPATH, HTYPE

Inherited from LogicalUnit: REQ_BGL, ssh

Instance Variables [hide private]

Inherited from LogicalUnit: dry_run_result

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

CheckPrereq(self)

source code 

Check prerequisites.

This checks the opcode parameters depending on the director and mode test.

Overrides: LogicalUnit.CheckPrereq

Exec(self, feedback_fn)

source code 

Run the allocator test.

Overrides: LogicalUnit.Exec

Class Variable Details [hide private]

_OP_PARAMS

a list of opcode attributes, their defaults values they should get if not already defined, and types they must match
Value:
[("direction", ht.NoDefault, ht.TElemOf(constants.VALID_IALLOCATOR_DIR\
ECTIONS)), ("mode", ht.NoDefault, ht.TElemOf(constants.VALID_IALLOCATO\
R_MODES)), ("name", ht.NoDefault, ht.TNonEmptyString), ("nics", ht.NoD\
efault, ht.TOr(ht.TNone, ht.TListOf(ht.TDictOf(ht.TElemOf(["mac", "ip"\
, "bridge"]), ht.TOr(ht.TNone, ht.TNonEmptyString))))), ("disks", ht.N\
oDefault, ht.TOr(ht.TNone, ht.TList)), ("hypervisor", None, ht.TMaybeS\
tring), ("allocator", None, ht.TMaybeString), ("tags", ht.EmptyList, h\
t.TListOf(ht.TNonEmptyString)), ("mem_size", None, ht.TOr(ht.TNone, ht\
...