The nova.availability_zones Module

Availability zone helper functions.

get_availability_zones(context, get_only_available=False, with_hosts=False)

Return available and unavailable zones on demand.

  • get_only_available – flag to determine whether to return available zones only, default False indicates return both available zones and not available zones, True indicates return available zones only
  • with_hosts (bool) – whether to return hosts part of the AZs
get_host_availability_zone(context, host)
get_instance_availability_zone(context, instance)

Return availability zone of specified instance.


Reset the cache, mainly for testing purposes and update availability_zone for host aggregate

set_availability_zones(context, services)
update_host_availability_zone_cache(context, host, availability_zone=None)

Previous topic

The nova.api.validator Module

Next topic

The nova.baserpc Module

Project Source

This Page