Manage hosts in the current zone.
Bases: object
Base HostManager class.
Delete all the inactive host services information.
Filter hosts and return only ones passing all filters
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).
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.
Roll up all the individual host info to generic ‘service’ capabilities. Each capability is aggregated into <cap>_min and <cap>_max values.
Check if host service capabilites are not recent enough.
Update the per-service capabilities based on this notification.
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.
Update information about a host from instance info.
Return whether or not this host passes filters.
Update information about a host from its compute_node info.