def get_availability_zone(vm_):
 avz = config.get_cloud_config_value('availability_zone', vm_, __opts__, search_global=False)
 if (avz is None):
  return None
 zones = _list_availability_zones(vm_)
 if (avz not in zones):
  raise SaltCloudException("The specified availability zone isn't valid in this region: {0}\n".format(avz))
 elif (zones[avz] != 'available'):
  raise SaltCloudException("The specified availability zone isn't currently available: {0}\n".format(avz))
 return avz

def get_availability_zone ( vm_ ) : avz = config . get_cloud_config_value ( 'availability_zone' , vm_ , __opts__ , search_global = False ) if ( avz is None ) : return None zones = _list_availability_zones ( vm_ ) if ( avz not in zones ) : raise SaltCloudException ( "The specified availability zone isn't valid in this region: {0}\n" . format ( avz ) ) elif ( zones [ avz ] != 'available' ) : raise SaltCloudException ( "The specified availability zone isn't currently available: {0}\n" . format ( avz ) ) return avz
return the availability zone to use .