Least Cost Scheduler is a mechanism for choosing which host machines to provision a set of resources to. The input of the least-cost-scheduler is a set of objective-functions, called the ‘cost-functions’, a weight for each cost-function, and a list of candidate hosts (gathered via FilterHosts).
The cost-function and weights are tabulated, and the host with the least cost is then selected for provisioning.
Bases: nova.scheduler.base_scheduler.BaseScheduler
Returns a list of tuples containing weights and cost functions to use for weighing hosts
Returns a list of dictionaries of form: [ {weight: weight, hostname: hostname, capabilities: capabs} ]
Prefer hosts that have less ram available, filter_hosts will exclude hosts that don’t have enough ram.
Return a pre-weight cost of 1 for each host
Normalize an array of numbers such that each element satisfies: 0 <= e <= 1
Use the weighted-sum method to compute a score for an array of objects. Normalize the results of the objective-functions so that the weights are meaningful regardless of objective-function’s range.
domain - input to be scored weighted_fns - list of weights and functions like:
[(weight, objective-functions)]