# keystone.catalog.backends.base module

class keystone.catalog.backends.base.CatalogDriverBase

  Bases: `ProviderAPIMixin`

  Interface description for the Catalog driver.

  abstractmethod add_endpoint_group_to_project(endpoint_group_id, project_id)

    Add an endpoint group to project association.

    Parameters:

      - endpoint_group_id (string) – identity of endpoint to associate

      - project_id (string) – identity of project to associate

    Raises:

      keystone.exception.Conflict – If the endpoint group was already added to the project.

    Returns:

      None.

  abstractmethod add_endpoint_to_project(endpoint_id, project_id)

    Create an endpoint to project association.

    Parameters:

      - endpoint_id (string) – identity of endpoint to associate

      - project_id (string) – identity of the project to be associated with

    Raises:

      keystone.exception.Conflict: If the endpoint was already added to project.

    Returns:

      None.

  abstractmethod check_endpoint_in_project(endpoint_id, project_id)

    Check if an endpoint is associated with a project.

    Parameters:

      - endpoint_id (string) – identity of endpoint to check

      - project_id (string) – identity of the project associated with

    Raises:

      keystone.exception.NotFound – If the endpoint was not found in the project.

    Returns:

      None.

  abstractmethod create_endpoint(endpoint_id, endpoint_ref)

    Create a new endpoint for a service.

    Raises:

      - keystone.exception.Conflict – If a duplicate endpoint exists.

      - keystone.exception.ServiceNotFound – If the service doesn’t exist.

  abstractmethod create_endpoint_group(endpoint_group)

    Create an endpoint group.

    Parameters:

      endpoint_group (dictionary) – endpoint group to create

    Raises:

      keystone.exception.Conflict: If a duplicate endpoint group already exists.

    Returns:

      an endpoint group representation.

  abstractmethod create_region(region_ref)

    Create a new region.

    Raises:

      - keystone.exception.Conflict – If the region already exists.

      - keystone.exception.RegionNotFound – If the parent region is invalid.

  abstractmethod create_service(service_id, service_ref)

    Create a new service.

    Raises:

      keystone.exception.Conflict – If a duplicate service exists.

  abstractmethod delete_association_by_endpoint(endpoint_id)

    Remove all the endpoints to project association with endpoint.

    Parameters:

      endpoint_id (string) – identity of endpoint to check

    Returns:

      None

  abstractmethod delete_association_by_project(project_id)

    Remove all the endpoints to project association with project.

    Parameters:

      project_id (string) – identity of the project to check

    Returns:

      None

  abstractmethod delete_endpoint(endpoint_id)

    Delete an endpoint for a service.

    Raises:

      keystone.exception.EndpointNotFound – If the endpoint doesn’t exist.

  abstractmethod delete_endpoint_group(endpoint_group_id)

    Delete an endpoint group.

    Parameters:

      endpoint_group_id (string) – identity of endpoint group to delete

    Raises:

      keystone.exception.NotFound – If the endpoint group was not found.

    Returns:

      None.

  abstractmethod delete_endpoint_group_association_by_project(project_id)

    Remove endpoint group to project associations.

    Parameters:

      project_id (string) – identity of the project to check

    Returns:

      None

  abstractmethod delete_region(region_id)

    Delete an existing region.

    Raises:

      keystone.exception.RegionNotFound – If the region doesn’t exist.

  abstractmethod delete_service(service_id)

    Delete an existing service.

    Raises:

      keystone.exception.ServiceNotFound – If the service doesn’t exist.

  abstractmethod get_catalog(user_id, project_id)

    Retrieve and format the current service catalog.

    Example:

        { 'RegionOne':
            {'compute': {
                'adminURL': u'http://host:8774/v1.1/project_id',
                'internalURL': u'http://host:8774/v1.1/project_id',
                'name': 'Compute Service',
                'publicURL': u'http://host:8774/v1.1/project_id'},
             'ec2': {
                'adminURL': 'http://host:8773/services/Admin',
                'internalURL': 'http://host:8773/services/Cloud',
                'name': 'EC2 Service',
                'publicURL': 'http://host:8773/services/Cloud'}}

    Returns:

      A nested dict representing the service catalog or an empty dict.

    Raises:

      keystone.exception.NotFound – If the endpoint doesn’t exist.

  abstractmethod get_endpoint(endpoint_id)

    Get endpoint by id.

    Returns:

      endpoint_ref dict

    Raises:

      keystone.exception.EndpointNotFound – If the endpoint doesn’t exist.

  abstractmethod get_endpoint_group(endpoint_group_id)

    Get an endpoint group.

    Parameters:

      endpoint_group_id (string) – identity of endpoint group to retrieve

    Raises:

      keystone.exception.NotFound – If the endpoint group was not found.

    Returns:

      an endpoint group representation.

  abstractmethod get_endpoint_group_in_project(endpoint_group_id, project_id)

    Get endpoint group to project association.

    Parameters:

      - endpoint_group_id (string) – identity of endpoint group to retrieve

      - project_id (string) – identity of project to associate

    Raises:

      keystone.exception.NotFound – If the endpoint group to the project association was not found.

    Returns:

      a project endpoint group representation.

  abstractmethod get_region(region_id)

    Get region by id.

    Returns:

      region_ref dict

    Raises:

      keystone.exception.RegionNotFound – If the region doesn’t exist.

  abstractmethod get_service(service_id)

    Get service by id.

    Returns:

      service_ref dict

    Raises:

      keystone.exception.ServiceNotFound – If the service doesn’t exist.

  get_v3_catalog(user_id, project_id)

    Retrieve and format the current V3 service catalog.

    Example:

        [
            {
                "endpoints": [
                    {
                        "interface": "public",
                        "id": "--endpoint-id--",
                        "region": "RegionOne",
                        "url": "http://external:8776/v1/--project-id--",
                    },
                    {
                        "interface": "internal",
                        "id": "--endpoint-id--",
                        "region": "RegionOne",
                        "url": "http://internal:8776/v1/--project-id--",
                    },
                ],
                "id": "--service-id--",
                "type": "volume",
            }
        ]

    Returns:

      A list representing the service catalog or an empty list

    Raises:

      keystone.exception.NotFound – If the endpoint doesn’t exist.

  abstractmethod list_endpoint_groups(hints)

    List all endpoint groups.

    Returns:

      None.

  abstractmethod list_endpoint_groups_for_project(project_id)

    List all endpoint group to project associations for a project.

    Parameters:

      project_id (string) – identity of project to associate

    Returns:

      None.

  abstractmethod list_endpoints(hints)

    List all endpoints.

    Parameters:

      hints – contains the list of filters yet to be satisfied. Any filters satisfied here will be removed so that the caller will know if any filters remain.

    Returns:

      list of endpoint_refs or an empty list.

  abstractmethod list_endpoints_for_project(project_id)

    List all endpoints associated with a project.

    Parameters:

      project_id (string) – identity of the project to check

    Returns:

      a list of identity endpoint ids or an empty list.

  abstractmethod list_projects_associated_with_endpoint_group(endpoint_group_id)

    List all projects associated with endpoint group.

    Parameters:

      endpoint_group_id (string) – identity of endpoint to associate

    Returns:

      None.

  abstractmethod list_projects_for_endpoint(endpoint_id)

    List all projects associated with an endpoint.

    Parameters:

      endpoint_id (string) – identity of endpoint to check

    Returns:

      a list of projects or an empty list.

  abstractmethod list_regions(hints)

    List all regions.

    Parameters:

      hints – contains the list of filters yet to be satisfied. Any filters satisfied here will be removed so that the caller will know if any filters remain.

    Returns:

      list of region_refs or an empty list.

  abstractmethod list_services(hints)

    List all services.

    Parameters:

      hints – contains the list of filters yet to be satisfied. Any filters satisfied here will be removed so that the caller will know if any filters remain.

    Returns:

      list of service_refs or an empty list.

  abstractmethod remove_endpoint_from_project(endpoint_id, project_id)

    Remove an endpoint to project association.

    Parameters:

      - endpoint_id (string) – identity of endpoint to remove

      - project_id (string) – identity of the project associated with

    Raises:

      keystone.exception.NotFound – If the endpoint was not found in the project.

    Returns:

      None.

  abstractmethod remove_endpoint_group_from_project(endpoint_group_id, project_id)

    Remove an endpoint to project association.

    Parameters:

      - endpoint_group_id (string) – identity of endpoint to associate

      - project_id (string) – identity of project to associate

    Raises:

      keystone.exception.NotFound – If endpoint group project association was not found.

    Returns:

      None.

  abstractmethod update_endpoint(endpoint_id, endpoint_ref)

    Get endpoint by id.

    Returns:

      endpoint_ref dict

    Raises:

      - keystone.exception.EndpointNotFound – If the endpoint doesn’t exist.

      - keystone.exception.ServiceNotFound – If the service doesn’t exist.

  abstractmethod update_endpoint_group(endpoint_group_id, endpoint_group)

    Update an endpoint group.

    Parameters:

      - endpoint_group_id (string) – identity of endpoint group to retrieve

      - endpoint_group (dictionary) – A full or partial endpoint_group

    Raises:

      keystone.exception.NotFound – If the endpoint group was not found.

    Returns:

      an endpoint group representation.

  abstractmethod update_region(region_id, region_ref)

    Update region by id.

    Returns:

      region_ref dict

    Raises:

      keystone.exception.RegionNotFound – If the region doesn’t exist.

  abstractmethod update_service(service_id, service_ref)

    Update service by id.

    Returns:

      service_ref dict

    Raises:

      keystone.exception.ServiceNotFound – If the service doesn’t exist.

this page last updated: 2026-04-01 20:09:17

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug