'Format a list of endpoints according to Identity API v2.
The v2.0 API wants an endpoint list to look like::
\'endpoints\': [
\'id\': $endpoint_id,
\'name\': $SERVICE[name],
\'type\': $SERVICE,
\'tenantId\': $tenant_id,
\'region\': $REGION,
\'endpoints_links\': [],'

@classmethod
def format_endpoint_list(cls, catalog_ref):

    if (not catalog_ref):
        return {}
    endpoints = []
    for (region_name, region_ref) in catalog_ref.items():
        for (service_type, service_ref) in region_ref.items():
            endpoints.append({'id': service_ref.get('id'), 'name': service_ref.get('name'), 'type': service_type, 'region': region_name, 'publicURL': service_ref.get('publicURL'), 'internalURL': service_ref.get('internalURL'), 'adminURL': service_ref.get('adminURL')})
    return {'endpoints': endpoints, 'endpoints_links': []}
