Package ganeti :: Package masterd :: Module iallocator :: Class IAReqInstanceAlloc
[hide private]
[frames] | no frames]

Class IAReqInstanceAlloc

source code


An instance allocation request.

Nested Classes [hide private]

Inherited from IARequestBase: __metaclass__

Instance Methods [hide private]
 
REQ_RESULT(val)
Checks if the given value is a list.
source code
 
RequiredNodes(self)
Calculates the required nodes based on the disk_template.
source code
 
GetRequest(self, cfg)
Requests a new instance.
source code
 
ValidateResult(self, ia, result)
Validates an single instance allocation request.
source code

Inherited from IARequestBase: Validate, __init__

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

Class Methods [hide private]

Inherited from outils.ValidatedSlots: GetAllSlots

Class Variables [hide private]
  MODE = constants.IALLOCATOR_MODE_ALLOC
  REQ_PARAMS = [_INST_NAME, ("memory", ht.TNonNegativeInt), ("sp...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

REQ_RESULT(val)

source code 

Checks if the given value is a list.

Decorators:
  • @WithDesc("List")
Overrides: REQ_RESULT

GetRequest(self, cfg)

source code 

Requests a new instance.

The checks for the completeness of the opcode must have already been done.

Parameters:
  • cfg - The configuration instance
Overrides: IARequestBase.GetRequest

ValidateResult(self, ia, result)

source code 

Validates an single instance allocation request.

Parameters:
  • ia - The IAllocator instance
  • result - The IAllocator run result
Raises:
Overrides: IARequestBase.ValidateResult

Class Variable Details [hide private]

REQ_PARAMS

Value:
[_INST_NAME, ("memory", ht.TNonNegativeInt), ("spindle_use", ht.TNonNe\
gativeInt), ("disks", ht.TListOf(ht.TDict)), ("disk_template", ht.TStr\
ing), ("os", ht.TString), ("tags", _STRING_LIST), ("nics", ht.TListOf(\
ht.TDict)), ("vcpus", ht.TInt), ("hypervisor", ht.TString), ("node_whi\
telist", ht.TMaybeListOf(ht.TNonEmptyString)),]