keystone.identity.backends.sql.
Identity
(conf=None)[source]¶Bases: keystone.identity.backends.base.IdentityDriverBase
add_user_to_group
(user_id, group_id)[source]¶Add a user to a group.
Parameters: |
|
---|---|
Raises: |
|
authenticate
(user_id, password)[source]¶Authenticate a given user and password.
Parameters: |
|
---|---|
Returns: | user. See user schema in |
Return type: | dict |
Raises: | AssertionError – If user or password is invalid. |
change_password
(user_id, new_password)[source]¶Self-service password change.
Parameters: |
|
---|---|
Raises: |
|
check_user_in_group
(user_id, group_id)[source]¶Check if a user is a member of a group.
Parameters: |
|
---|---|
Raises: |
|
create_group
(**kwargs)[source]¶Create a new group.
Parameters: |
|
---|---|
Returns: | group, matching the group schema. |
Return type: | dict |
Raises: | keystone.exception.Conflict – If a duplicate group exists. |
create_user
(**kwargs)[source]¶Create a new user.
Parameters: |
|
---|---|
Returns: | user, matching the user schema. The driver should not return the password. |
Return type: | dict |
Raises: | keystone.exception.Conflict – If a duplicate user exists. |
delete_group
(group_id)[source]¶Delete an existing group.
Parameters: | group_id (str) – Group ID. |
---|---|
Raises: | keystone.exception.GroupNotFound – If the group doesn’t exist. |
delete_user
(**kwargs)[source]¶Delete an existing user.
Raises: | keystone.exception.UserNotFound – If the user doesn’t exist. |
---|
get_group
(group_id)[source]¶Get a group by ID.
Parameters: | group_id (str) – group ID. |
---|---|
Returns: | group info. See group schema in IdentityDriverBase |
Return type: | dict |
Raises: | keystone.exception.GroupNotFound – If the group doesn’t exist. |
get_group_by_name
(group_name, domain_id)[source]¶Get a group by name.
Parameters: |
|
---|---|
Returns: | group info. See group schema in
|
Return type: | dict |
Raises: | keystone.exception.GroupNotFound – If the group doesn’t exist. |
get_user
(user_id)[source]¶Get a user by ID.
Parameters: | user_id (str) – User ID. |
---|---|
Returns: | user. See user schema in IdentityDriverBase . |
Return type: | dict |
Raises: | keystone.exception.UserNotFound – If the user doesn’t exist. |
get_user_by_name
(user_name, domain_id)[source]¶Get a user by name.
Returns: | user_ref |
---|---|
Raises: | keystone.exception.UserNotFound – If the user doesn’t exist. |
is_sql
¶list_groups
(hints, *args, **kwargs)[source]¶List groups in the system.
Parameters: | hints (keystone.common.driver_hints.Hints) – filter hints which the driver should implement if at all possible. |
---|---|
Returns: | a list of group_refs or an empty list. See group schema in
IdentityDriverBase . |
list_groups_for_user
(user_id, hints)[source]¶List groups a user is in.
Parameters: |
|
---|---|
Returns: | a list of group_refs or an empty list. See group schema in
|
Raises: | keystone.exception.UserNotFound – If the user doesn’t exist. |
list_users
(hints, *args, **kwargs)[source]¶List users in the system.
Parameters: | hints (keystone.common.driver_hints.Hints) – filter hints which the driver should implement if at all possible. |
---|---|
Returns: | a list of users or an empty list. See user schema in
IdentityDriverBase . |
Return type: | list of dict |
list_users_in_group
(group_id, hints)[source]¶List users in a group.
Parameters: |
|
---|---|
Returns: | a list of users or an empty list. See user schema in
|
Return type: | list of dict |
Raises: | keystone.exception.GroupNotFound – If the group doesn’t exist. |
remove_user_from_group
(user_id, group_id)[source]¶Remove a user from a group.
Parameters: |
|
---|---|
Raises: | keystone.exception.NotFound – If the user is not in the group. |
unset_default_project_id
(project_id)[source]¶Unset a user’s default project given a specific project ID.
Parameters: | project_id (str) – project ID |
---|
update_group
(**kwargs)[source]¶Update an existing group.
Parameters: |
|
---|---|
Returns: | group, matching the group schema. |
Return type: | dict |
Raises: |
|
update_user
(**kwargs)[source]¶Update an existing user.
Parameters: |
|
---|---|
Returns: | user. See user schema in |
Raises: |
|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.