The openstack_dashboard.api.keystone ModuleΒΆ

class openstack_dashboard.api.keystone.IdentityAPIVersionManager(service_type, preferred_version=None)[source]

Bases: openstack_dashboard.api.base.APIVersionManager

get_project_manager(*args, **kwargs)[source]
upgrade_v2_user(user)[source]
class openstack_dashboard.api.keystone.Service(service, region, *args, **kwargs)[source]

Bases: openstack_dashboard.api.base.APIDictWrapper

Wrapper for a dict based on the service data from keystone.

openstack_dashboard.api.keystone.add_domain_user_role(request, user, role, domain)[source]

Adds a role for a user on a domain.

openstack_dashboard.api.keystone.add_group_role(request, role, group, domain=None, project=None)[source]

Adds a role for a group on a domain or project.

openstack_dashboard.api.keystone.add_group_user(request, group_id, user_id)[source]
openstack_dashboard.api.keystone.add_tenant_user_role(request, project=None, user=None, role=None, group=None, domain=None)[source]

Adds a role for a user on a tenant.

openstack_dashboard.api.keystone.create_ec2_credentials(request, user_id, tenant_id)[source]
openstack_dashboard.api.keystone.delete_user_ec2_credentials(request, user_id, access_token)[source]
openstack_dashboard.api.keystone.domain_create(request, name, description=None, enabled=None)[source]
openstack_dashboard.api.keystone.domain_delete(request, domain_id)[source]
openstack_dashboard.api.keystone.domain_get(request, domain_id)[source]
openstack_dashboard.api.keystone.domain_list(request)[source]
openstack_dashboard.api.keystone.domain_lookup(request)[source]
openstack_dashboard.api.keystone.domain_update(request, domain_id, name=None, description=None, enabled=None)[source]
openstack_dashboard.api.keystone.ec2_manager(request)[source]
openstack_dashboard.api.keystone.get_default_domain(request, get_name=True)[source]

Gets the default domain object to use when creating Identity object.

Returns the domain context if is set, otherwise return the domain of the logon user.

Parameters:get_name – Whether to get the domain name from Keystone if the context isn’t set. Setting this to False prevents an unnecessary call to Keystone if only the domain ID is needed.
openstack_dashboard.api.keystone.get_default_role(request)[source]

Gets the default role object from Keystone and saves it as a global.

Since this is configured in settings and should not change from request to request. Supports lookup by name or id.

openstack_dashboard.api.keystone.get_domain_users_roles(request, domain)[source]
openstack_dashboard.api.keystone.get_effective_domain_id(request)[source]

Gets the id of the default domain to use when creating Identity objects. If the requests default domain is the same as DEFAULT_DOMAIN, return None.

openstack_dashboard.api.keystone.get_project_groups_roles(request, project)[source]

Gets the groups roles in a given project.

Parameters:
  • request – the request entity containing the login user information
  • project – the project to filter the groups roles. It accepts both project object resource or project ID
Returns group_roles:
 

a dictionary mapping the groups and their roles in given project

openstack_dashboard.api.keystone.get_project_users_roles(request, project)[source]
openstack_dashboard.api.keystone.get_user_ec2_credentials(request, user_id, access_token)[source]
openstack_dashboard.api.keystone.get_version()[source]
openstack_dashboard.api.keystone.group_create(request, domain_id, name, description=None)[source]
openstack_dashboard.api.keystone.group_delete(request, group_id)[source]
openstack_dashboard.api.keystone.group_get(request, group_id, admin=True)[source]
openstack_dashboard.api.keystone.group_list(request, domain=None, project=None, user=None)[source]
openstack_dashboard.api.keystone.group_update(request, group_id, name=None, description=None)[source]
openstack_dashboard.api.keystone.identity_provider_create(request, idp_id, description=None, enabled=False, remote_ids=None)[source]
openstack_dashboard.api.keystone.identity_provider_delete(request, idp_id)[source]
openstack_dashboard.api.keystone.identity_provider_get(request, idp_id)[source]
openstack_dashboard.api.keystone.identity_provider_list(request)[source]
openstack_dashboard.api.keystone.identity_provider_update(request, idp_id, description=None, enabled=False, remote_ids=None)[source]
openstack_dashboard.api.keystone.is_cloud_admin(request)[source]
openstack_dashboard.api.keystone.is_domain_admin(request)[source]
openstack_dashboard.api.keystone.is_federation_management_enabled()[source]
openstack_dashboard.api.keystone.is_multi_domain_enabled()[source]
openstack_dashboard.api.keystone.keystone_backend_name()[source]
openstack_dashboard.api.keystone.keystone_can_edit_domain()[source]
openstack_dashboard.api.keystone.keystone_can_edit_group()[source]
openstack_dashboard.api.keystone.keystone_can_edit_project()[source]
openstack_dashboard.api.keystone.keystone_can_edit_role()[source]
openstack_dashboard.api.keystone.keystone_can_edit_user()[source]
openstack_dashboard.api.keystone.keystoneclient(request, admin=False)[source]

Returns a client connected to the Keystone backend.

Several forms of authentication are supported:

  • Username + password -> Unscoped authentication
  • Username + password + tenant id -> Scoped authentication
  • Unscoped token -> Unscoped authentication
  • Unscoped token + tenant id -> Scoped authentication
  • Scoped token -> Scoped authentication

Available services and data from the backend will vary depending on whether the authentication was scoped or unscoped.

Lazy authentication if an endpoint parameter is provided.

Calls requiring the admin endpoint should have admin=True passed in as a keyword argument.

The client is cached so that subsequent API calls during the same request/response cycle don’t have to be re-authenticated.

openstack_dashboard.api.keystone.list_ec2_credentials(request, user_id)[source]
openstack_dashboard.api.keystone.mapping_create(request, mapping_id, rules)[source]
openstack_dashboard.api.keystone.mapping_delete(request, mapping_id)[source]
openstack_dashboard.api.keystone.mapping_get(request, mapping_id)[source]
openstack_dashboard.api.keystone.mapping_list(request)[source]
openstack_dashboard.api.keystone.mapping_update(request, mapping_id, rules)[source]
openstack_dashboard.api.keystone.protocol_create(request, protocol_id, identity_provider, mapping)[source]
openstack_dashboard.api.keystone.protocol_delete(request, identity_provider, protocol)[source]
openstack_dashboard.api.keystone.protocol_get(request, identity_provider, protocol)[source]
openstack_dashboard.api.keystone.protocol_list(request, identity_provider)[source]
openstack_dashboard.api.keystone.protocol_update(request, identity_provider, protocol, mapping)[source]
openstack_dashboard.api.keystone.remove_domain_user_role(request, user, role, domain=None)[source]

Removes a given single role for a user from a domain.

openstack_dashboard.api.keystone.remove_group_role(request, role, group, domain=None, project=None)[source]

Removes a given single role for a group from a domain or project.

openstack_dashboard.api.keystone.remove_group_roles(request, group, domain=None, project=None)[source]

Removes all roles from a group on a domain or project.

openstack_dashboard.api.keystone.remove_group_user(request, group_id, user_id)[source]
openstack_dashboard.api.keystone.remove_tenant_user(request, project=None, user=None, domain=None)[source]

Removes all roles from a user on a tenant, removing them from it.

openstack_dashboard.api.keystone.remove_tenant_user_role(request, project=None, user=None, role=None, group=None, domain=None)[source]

Removes a given single role for a user from a tenant.

openstack_dashboard.api.keystone.role_assignments_list(request, project=None, user=None, role=None, group=None, domain=None, effective=False, include_subtree=True)[source]
openstack_dashboard.api.keystone.role_create(request, name)[source]
openstack_dashboard.api.keystone.role_delete(request, role_id)[source]
openstack_dashboard.api.keystone.role_get(request, role_id)[source]
openstack_dashboard.api.keystone.role_list(request)[source]

Returns a global list of available roles.

openstack_dashboard.api.keystone.role_update(request, role_id, name=None)[source]
openstack_dashboard.api.keystone.roles_for_group(request, group, domain=None, project=None)[source]
openstack_dashboard.api.keystone.roles_for_user(request, user, project=None, domain=None)[source]

Returns a list of user roles scoped to a project or domain.

openstack_dashboard.api.keystone.tenant_create(request, name, description=None, enabled=None, domain=None, **kwargs)[source]
openstack_dashboard.api.keystone.tenant_delete(request, project)[source]
openstack_dashboard.api.keystone.tenant_get(request, project, admin=True)[source]
openstack_dashboard.api.keystone.tenant_list(request, paginate=False, marker=None, domain=None, user=None, admin=True, filters=None)[source]
openstack_dashboard.api.keystone.tenant_update(request, project, name=None, description=None, enabled=None, domain=None, **kwargs)[source]
openstack_dashboard.api.keystone.user_create(request, name=None, email=None, password=None, project=None, enabled=None, domain=None, description=None)[source]
openstack_dashboard.api.keystone.user_delete(request, user_id)[source]
openstack_dashboard.api.keystone.user_get(request, user_id, admin=True)[source]
openstack_dashboard.api.keystone.user_list(request, project=None, domain=None, group=None, filters=None)[source]
openstack_dashboard.api.keystone.user_update(request, user, **data)[source]
openstack_dashboard.api.keystone.user_update_enabled(request, user, enabled)[source]
openstack_dashboard.api.keystone.user_update_own_password(request, origpassword, password)[source]
openstack_dashboard.api.keystone.user_update_password(request, user, password, admin=True)[source]
openstack_dashboard.api.keystone.user_update_tenant(request, user, project, admin=True)[source]
openstack_dashboard.api.keystone.user_verify_admin_password(request, admin_password)[source]

Previous topic

The openstack_dashboard.api Module

Next topic

The openstack_dashboard.api.glance Module

Project Source

This Page