(tenant_id, entry_generator, prefix_for_endpoint)
return {"endpoints": result}
Canned response for Identity's get endpoints call.  This returns endpoints
    only for the services implemented by Mimic.

    :param entry_generator: A callable, like :func:`canned_entries`, which
        takes a datetime and returns an iterable of Entry.
Canned response for Identity's get endpoints call.  This returns endpoints
    only for the services implemented by Mimic.
Canned response for Identity s get endpoints call . This returns endpoints only for the services implemented by Mimic .
def get_endpoints(tenant_id, entry_generator, prefix_for_endpoint):
    """
    Canned response for Identity's get endpoints call.  This returns endpoints
    only for the services implemented by Mimic.

    :param entry_generator: A callable, like :func:`canned_entries`, which
        takes a datetime and returns an iterable of Entry.
    """
    result = []
    for entry in entry_generator(tenant_id):
        for endpoint in entry.endpoints:
            result.append({
                "region": endpoint.region,
                "tenantId": endpoint.tenant_id,
                "internalURL": endpoint.url_with_prefix(
                    prefix_for_endpoint(endpoint),
                    internal_url=True
                ),
                "publicURL": endpoint.url_with_prefix(
                    prefix_for_endpoint(endpoint)
                ),
                "name": entry.name,
                "type": entry.type,
                "id": endpoint.endpoint_id,
            })
    return {"endpoints": result}
def get_endpoints ( tenant_id , entry_generator , prefix_for_endpoint ) : result = [ ] for entry in entry_generator ( tenant_id ) : for endpoint in entry . endpoints : result . append ( { "region" : endpoint . region , "tenantId" : endpoint . tenant_id , "internalURL" : endpoint . url_with_prefix ( prefix_for_endpoint ( endpoint ) , internal_url = True ) , "publicURL" : endpoint . url_with_prefix ( prefix_for_endpoint ( endpoint ) ) , "name" : entry . name , "type" : entry . type , "id" : endpoint . endpoint_id , } ) return { "endpoints" : result }