Pluggable Weighing support
Bases: object
Base class for pluggable weighers.
The attributes maxval and minval can be specified to set up the maximum and minimum values for the weighed objects. These values will then be taken into account in the normalization step, instead of taking the values from the calculated weights.
Weigh multiple objects.
Override in a subclass if you need access to all objects in order to calculate weights. Do not modify the weight of an object here, just return a list of weights.
How weighted this weigher should be.
Override this method in a subclass, so that the returned value is read from a configuration option to permit operators specify a multiplier for the weigher.
Bases: nova.loadables.BaseLoader
Return a sorted (descending), normalized list of WeighedObjects.
alias of WeighedObject
Bases: object
Object with weight information.
Normalize the values in a list between 0 and 1.0.
The normalization is made regarding the lower and upper values present in weight_list. If the minval and/or maxval parameters are set, these values will be used instead of the minimum and maximum from the list.
If all the values are equal, they are normalized to 0.