def get_lb_endpoints():
    '\n    Return all load-balancer endpoints, whether from manual config or via\n    relation.\n    '
    external_lb_endpoints = get_external_lb_endpoints()
    loadbalancer = endpoint_from_flag('loadbalancer.available')
    if external_lb_endpoints:
        return external_lb_endpoints
    elif loadbalancer:
        lb_addresses = loadbalancer.get_addresses_ports()
        return [(host.get('public-address'), host.get('port')) for host in lb_addresses]
    else:
        return []
Return all load-balancer endpoints, whether from manual config or via
relation.
def get_lb_endpoints():
    '\n    Return all load-balancer endpoints, whether from manual config or via\n    relation.\n    '
    external_lb_endpoints = get_external_lb_endpoints()
    loadbalancer = endpoint_from_flag('loadbalancer.available')
    if external_lb_endpoints:
        return external_lb_endpoints
    elif loadbalancer:
        lb_addresses = loadbalancer.get_addresses_ports()
        return [(host.get('public-address'), host.get('port')) for host in lb_addresses]
    else:
        return []