'Return a list of projects associated with the endpoint.'

@controller.protected()
def list_projects_for_endpoint(self, request, endpoint_id):

    self.catalog_api.get_endpoint(endpoint_id)
    refs = self.catalog_api.list_projects_for_endpoint(endpoint_id)
    projects = [self.resource_api.get_project(ref['project_id']) for ref in refs]
    return resource.controllers.ProjectV3.wrap_collection(request.context_dict, projects)
