Previous topic

The nova.scheduler.filters.ram_filter Module

Next topic

The nova.scheduler.least_cost Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.scheduler.host_manager Module

Manage hosts in the current zone.

class HostManager

Bases: object

Base HostManager class.

delete_expired_host_services(host_services_dict)

Delete all the inactive host services information.

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).

get_host_list()

Returns a list of dicts for each host that the Zone Manager knows about. Each dict contains the host_name and the service for that host.

get_service_capabilities()

Roll up all the individual host info to generic ‘service’ capabilities. Each capability is aggregated into <cap>_min and <cap>_max values.

host_service_caps_stale(host, service)

Check if host service capabilites are not recent enough.

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)

Update information about a host from instance info.

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)