# keystone.limit.backends.sql module

class keystone.limit.backends.sql.LimitModel(*args, **kwargs)

  Bases: `Base`, `ModelDictMixin`

  attributes = ['internal_id', 'id', 'project_id', 'domain_id', 'service_id', 'region_id', 'resource_name', 'resource_limit', 'description', 'registered_limit_id']
  description
  domain_id
  id
  internal_id
  project_id
  region_id
  registered_limit
  registered_limit_id
  resource_limit
  resource_name
  service_id
  to_dict()

    Return the model’s attributes as a dictionary.

class keystone.limit.backends.sql.RegisteredLimitModel(*args, **kwargs)

  Bases: `Base`, `ModelDictMixin`

  attributes = ['internal_id', 'id', 'service_id', 'region_id', 'resource_name', 'default_limit', 'description']
  default_limit
  description
  id
  internal_id
  region_id
  resource_name
  service_id
  to_dict()

    Return the model’s attributes as a dictionary.

class keystone.limit.backends.sql.UnifiedLimit

  Bases: `UnifiedLimitDriverBase`

  create_limits(limits)

    Create new limits.

    Parameters:

      limits – a list of dictionaries representing limits to create.

    Returns:

      all the newly created limits.

    Raises:

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

      - keystone.exception.NoLimitReference – If no reference registered limit exists.

  create_registered_limits(registered_limits)

    Create new registered limits.

    Parameters:

      registered_limits – a list of dictionaries representing limits to create.

    Returns:

      all the newly created registered limits.

    Raises:

      keystone.exception.Conflict – If a duplicate registered limit exists.

  delete_limit(limit_id)

    Delete an existing limit.

    Parameters:

      limit_id – the limit id to delete.

    Raises:

      keystone.exception.LimitNotFound – If limit doesn’t exist.

  delete_limits_for_project(project_id)

    Delete the existing limits which belong to the specified project.

    Parameters:

      project_id – the limits’ project id.

    Returns:

      a dictionary representing the deleted limits id. Used for cache invalidating.

  delete_registered_limit(registered_limit_id)

    Delete an existing registered limit.

    Parameters:

      registered_limit_id – the registered limit id to delete.

    Raises:

      keystone.exception.RegisteredLimitNotFound – If registered limit doesn’t exist.

  get_limit(limit_id)

    Get a limit.

    Parameters:

      limit_id – the limit id to get.

    Returns:

      a dictionary representing a limit reference.

    Raises:

      keystone.exception.LimitNotFound – If limit doesn’t exist.

  get_registered_limit(registered_limit_id)

    Get a registered limit.

    Parameters:

      registered_limit_id – the registered limit id to get.

    Returns:

      a dictionary representing a registered limit reference.

    Raises:

      keystone.exception.RegisteredLimitNotFound – If registered limit doesn’t exist.

  list_limits(hints)

    List all limits.

    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:

      a list of dictionaries or an empty list.

  list_registered_limits(hints)

    List all registered limits.

    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:

      a list of dictionaries or an empty registered limit.

  update_limit(limit_id, limit)

    Update existing limits.

    Parameters:

      - limit_id – the id of the limit.

      - limit – a dict containing the limit attributes to update.

    Returns:

      the updated limit.

    Raises:

      - keystone.exception.LimitNotFound – If limit doesn’t exist.

      - keystone.exception.Conflict – If update to a duplicate limit.

  update_registered_limit(registered_limit_id, registered_limit)

    Update existing registered limits.

    Parameters:

      - registered_limit_id – the id of the registered limit.

      - registered_limit – a dict containing the registered limit attributes to update.

    Returns:

      the updated registered limit.

    Raises:

      - keystone.exception.RegisteredLimitNotFound – If registered limit doesn’t exist.

      - keystone.exception.Conflict – If update to a duplicate registered limit.

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