The nova.scheduler.host_manager Module

Manage hosts in the current zone.

class HostManager

Bases: object

Base HostManager class.

filter_hosts(hosts, filter_properties, filters=None)

Filter hosts and return only ones passing all filters

get_all_host_states(context, topic)

Returns a dict of all the hosts the HostManager knows about. Also, each of the consumable resources in HostState are pre-populated and adjusted based on data in the db.

For example: {‘192.168.1.100’: HostState(), ...}

Note: this can be very slow with a lot of instances. InstanceType table isn’t required since a copy is stored with the instance (in case the InstanceType changed since the instance was created).

host_state_cls

alias of HostState

update_service_capabilities(service_name, host, capabilities)

Update the per-service capabilities based on this notification.

class HostState(host, topic, capabilities=None, service=None)

Bases: object

Mutable and immutable information tracked for a host. This is an attempt to remove the ad-hoc data structures previously used and lock down access.

consume_from_instance(instance)

Incrementally update host state from an instance

passes_filters(filter_fns, filter_properties)

Return whether or not this host passes filters.

update_from_compute_node(compute)

Update information about a host from its compute_node info.

class ReadOnlyDict(source=None)

Bases: UserDict.IterableUserDict

A read-only dict.

clear()
pop(key, *args)
popitem()
update(source=None)

Previous topic

The nova.scheduler.filters.type_filter Module

Next topic

The nova.scheduler.least_cost Module

This Page