The nova.scheduler.filters.type_filter Module

class AggregateTypeAffinityFilter

Bases: nova.scheduler.filters.BaseHostFilter

AggregateTypeAffinityFilter limits instance_type by aggregate

return True if no instance_type key is set or if the aggregate metadata key ‘instance_type’ has the instance_type name as a value

host_passes(host_state, spec_obj)
run_filter_once_per_request = True
class TypeAffinityFilter

Bases: nova.scheduler.filters.BaseHostFilter

TypeAffinityFilter doesn’t allow more than one VM type per host.

Note: this works best with ram_weight_multiplier (spread) set to 1 (default).

host_passes(host_state, spec_obj)

Dynamically limits hosts to one instance type

Return False if host has any instance types other than the requested type. Return True if all instance types match or if host is empty.

Previous topic

The nova.scheduler.filters.trusted_filter Module

Next topic

The nova.scheduler.filters.utils Module

Project Source

This Page