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

Class IAllocator

source code


IAllocator framework.

An IAllocator instance has three sets of attributes:

Instance Methods [hide private]
 
__init__(self, cfg, rpc_runner, req)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
_ComputeClusterData(self)
Compute the generic allocator input data.
source code
 
_BuildInputData(self, req)
Build input data structures.
source code
 
Run(self, name, validate=True, call_fn=None)
Run an instance allocator and return the results.
source code
 
_ValidateResult(self)
Process the allocator results.
source code

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

Static Methods [hide private]
 
_ComputeNodeGroupData(cfg)
Compute node groups data.
source code
dict
_ComputeBasicNodeData(cfg, node_cfg, node_whitelist)
Compute global node data.
source code
 
_ComputeDynamicNodeData(node_cfg, node_data, node_iinfo, i_list, node_results, has_lvm)
Compute global node data.
source code
 
_ComputeInstanceData(cluster_info, i_list)
Compute global instance data.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, cfg, rpc_runner, req)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

_ComputeClusterData(self)

source code 

Compute the generic allocator input data.

This is the data that is independent of the actual operation.

_ComputeBasicNodeData(cfg, node_cfg, node_whitelist)
Static Method

source code 

Compute global node data.

Returns: dict
a dict of name: (node dict, node config)

_ComputeDynamicNodeData(node_cfg, node_data, node_iinfo, i_list, node_results, has_lvm)
Static Method

source code 

Compute global node data.

Parameters:
  • node_results - the basic node structures as filled from the config

_ValidateResult(self)

source code 

Process the allocator results.

This will process and if successful save the result in self.out_data and the other parameters.