# keystone.assignment.role_backends.base module

class keystone.assignment.role_backends.base.RoleDriverBase

  Bases: `object`

  abstractmethod create_implied_role(prior_role_id, implied_role_id)

    Create a role inference rule.

    Raises:

      keystone.exception.RoleNotFound: If the role doesn’t exist.

  abstractmethod create_role(role_id, role)

    Create a new role.

    Raises:

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

  abstractmethod delete_implied_role(prior_role_id, implied_role_id)

    Delete a role inference rule.

    Raises:

      keystone.exception.ImpliedRoleNotFound – If the implied role doesn’t exist.

  abstractmethod delete_role(role_id)

    Delete an existing role.

    Raises:

      keystone.exception.RoleNotFound – If the role doesn’t exist.

  abstractmethod get_implied_role(prior_role_id, implied_role_id)

    Get a role inference rule.

    Raises:

      keystone.exception.ImpliedRoleNotFound – If the implied role doesn’t exist.

  abstractmethod get_role(role_id)

    Get a role by ID.

    Returns:

      role_ref

    Raises:

      keystone.exception.RoleNotFound – If the role doesn’t exist.

  abstractmethod list_implied_roles(prior_role_id)

    List roles implied from the prior role ID.

  abstractmethod list_role_inference_rules()

    List all the rules used to imply one role from another.

  abstractmethod list_roles(hints)

    List roles in the system.

    Parameters:

      hints – filter hints which the driver should implement if at all possible.

    Returns:

      a list of role_refs or an empty list.

  abstractmethod list_roles_from_ids(role_ids)

    List roles for the provided list of ids.

    Parameters:

      role_ids – list of ids

    Returns:

      a list of role_refs.

    This method is used internally by the assignment manager to bulk read a set of roles given their ids.

  abstractmethod update_role(role_id, role)

    Update an existing role.

    Raises:

      - keystone.exception.RoleNotFound – If the role doesn’t exist.

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

this page last updated: 2026-08-17 12:45:24

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