'Get every gre endpoints from database.'

def get_endpoints(self):

    gre_endpoints = self._get_endpoints()
    return [{'ip_address': gre_endpoint.ip_address, 'host': gre_endpoint.host} for gre_endpoint in gre_endpoints]
