def avail_locations(conn=None, call=None):
    '''
    List available locations for Azure
    '''
    if call == 'action':
        raise SaltCloudSystemExit(
            'The avail_locations function must be called with '
            '-f or --function, or with the --list-locations option'
        )

    if not conn:
        conn = get_conn()

    ret = {}
    locations = conn.list_locations()
    for location in locations:
        ret[location.name] = {
            'name': location.name,
            'display_name': location.display_name,
            'available_services': location.available_services,
        }
    return ret
def avail_locations ( conn = None , call = None ) : if call == 'action' : raise SaltCloudSystemExit ( 'The avail_locations function must be called with ' '-f or --function, or with the --list-locations option' ) if not conn : conn = get_conn ( ) ret = { } locations = conn . list_locations ( ) for location in locations : ret [ location . name ] = { 'name' : location . name , 'display_name' : location . display_name , 'available_services' : location . available_services , } return ret
List available locations for Azure