keystoneclient.v3.application_credentials.
ApplicationCredential
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity application credential.
keystoneclient.v3.application_credentials.
ApplicationCredentialManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity application credentials.
collection_key
= 'application_credentials'¶create
(name, user=None, secret=None, description=None, expires_at=None, roles=None, unrestricted=False, **kwargs)¶Create a credential.
Parameters: |
|
---|---|
Returns: | the created application credential |
Return type: |
|
delete
(application_credential, user=None)¶Delete an application credential.
Parameters: | application_credential – the application credential to be deleted |
---|---|
Returns: | response object with 204 status |
Return type: | requests.models.Response |
find
(user=None, **kwargs)¶Find an application credential with attributes matching **kwargs
.
Parameters: | user (string) – User ID |
---|---|
Returns: | a list of matching application credentials |
Return type: | list of
keystoneclient.v3.application_credentials.ApplicationCredential |
get
(application_credential, user=None)¶Retrieve an application credential.
Parameters: | application_credential – the credential to be retrieved from the server |
---|---|
Returns: | the specified application credential |
Return type: | keystoneclient.v3.application_credentials.ApplicationCredential |
key
= 'application_credential'¶list
(user=None, **kwargs)¶List application credentials.
Parameters: | user (string) – User ID |
---|---|
Returns: | a list of application credentials |
Return type: | list of
keystoneclient.v3.application_credentials.ApplicationCredential |
resource_class
¶alias of ApplicationCredential
update
()¶keystoneclient.v3.auth.
AuthManager
(client)¶Bases: keystoneclient.base.Manager
Retrieve auth context specific information.
The information returned by the auth routes is entirely dependent on the authentication information provided by the user.
domains
()¶List Domains that the specified token can be rescoped to.
Returns: | a list of domains. |
---|---|
Return type: | list of keystoneclient.v3.domains.Domain . |
projects
()¶List projects that the specified token can be rescoped to.
Returns: | a list of projects. |
---|---|
Return type: | list of keystoneclient.v3.projects.Project |
keystoneclient.v3.client.
Client
(**kwargs)¶Bases: keystoneclient.httpclient.HTTPClient
Client for the OpenStack Identity API v3.
Parameters: |
|
---|
Warning
Constructing an instance of this class without a session is deprecated as of the 1.7.0 release and will be removed in the 2.0.0 release.
Example:
>>> from keystoneauth1.identity import v3
>>> from keystoneauth1 import session
>>> from keystoneclient.v3 import client
>>> auth = v3.Password(user_domain_name=DOMAIN_NAME,
... username=USER,
... password=PASS,
... project_domain_name=PROJECT_DOMAIN_NAME,
... project_name=PROJECT_NAME,
... auth_url=KEYSTONE_URL)
>>> sess = session.Session(auth=auth)
>>> keystone = client.Client(session=sess)
>>> keystone.projects.list()
...
>>> user = keystone.users.get(USER_ID)
>>> user.delete()
Instances of this class have the following managers:
credentials
¶domain_configs
¶endpoint_filter
¶keystoneclient.v3.contrib.endpoint_filter.EndpointFilterManager
endpoint_groups
¶endpoint_policy
¶keystoneclient.v3.contrib.endpoint_policy.EndpointPolicyManager
role_assignments
¶get_raw_token_from_identity_service
(auth_url, user_id=None, username=None, user_domain_id=None, user_domain_name=None, password=None, domain_id=None, domain_name=None, project_id=None, project_name=None, project_domain_id=None, project_domain_name=None, token=None, trust_id=None, **kwargs)¶Authenticate against the v3 Identity API.
If password and token methods are both provided then both methods will be used in the request.
Returns: | access.AccessInfo if authentication was successful. |
---|---|
Return type: | |
Raises: |
|
process_token
(**kwargs)¶Extract and process information from the new auth_ref.
And set the relevant authentication information.
serialize
(entity)¶version
= 'v3'¶keystoneclient.v3.credentials.
Credential
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity credential.
keystoneclient.v3.credentials.
CredentialManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity credentials.
collection_key
= 'credentials'¶create
(user, type, blob, project=None, **kwargs)¶Create a credential.
Parameters: |
|
---|---|
Returns: | the created credential |
Return type: |
delete
(credential)¶Delete a credential.
Parameters: | credential (str or
keystoneclient.v3.credentials.Credential ) – the credential to be deleted |
---|---|
Returns: | response object with 204 status |
Return type: | requests.models.Response |
get
(credential)¶Retrieve a credential.
Parameters: | credential (str or
keystoneclient.v3.credentials.Credential ) – the credential to be retrieved from the server |
---|---|
Returns: | the specified credential |
Return type: | keystoneclient.v3.credentials.Credential |
key
= 'credential'¶list
(**kwargs)¶List credentials.
Parameters: | kwargs – If user_id or type is specified then credentials will be filtered accordingly. |
---|---|
Returns: | a list of credentials |
Return type: | list of keystoneclient.v3.credentials.Credential |
resource_class
¶alias of Credential
update
(credential, user, type=None, blob=None, project=None, **kwargs)¶Update a credential.
Parameters: |
|
---|---|
Returns: | the updated credential |
Return type: |
keystoneclient.v3.domain_configs.
DomainConfig
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
An object representing a domain config association.
This resource object does not necessarily contain fixed attributes, as new attributes are added in the server, they are supported here directly. The currently supported configs are identity and ldap.
keystoneclient.v3.domain_configs.
DomainConfigManager
(client)¶Bases: keystoneclient.base.Manager
Manager class for manipulating domain config associations.
build_url
(domain)¶create
(domain, config)¶Create a config for a domain.
Parameters: |
|
---|
Example of the config
parameter:
{
"identity": {
"driver": "ldap"
},
"ldap": {
"url": "ldap://myldap.com:389/",
"user_tree_dn": "ou=Users,dc=my_new_root,dc=org"
}
}
Returns: | the created domain config returned from server. |
---|---|
Return type: | keystoneclient.v3.domain_configs.DomainConfig |
delete
(domain)¶Delete a config for a domain.
Parameters: | domain (str or keystoneclient.v3.domains.Domain ) – the domain which the config will be deleted on
the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
find
(**kwargs)¶get
(domain)¶Get a config for a domain.
Parameters: | domain (str or keystoneclient.v3.domains.Domain ) – the domain for which the config is defined. |
---|---|
Returns: | the domain config returned from server. |
Return type: | keystoneclient.v3.domain_configs.DomainConfig |
key
= 'config'¶list
(**kwargs)¶resource_class
¶alias of DomainConfig
update
(domain, config)¶Update a config for a domain.
Parameters: |
|
---|
Example of the config
parameter:
{
"identity": {
"driver": "ldap"
},
"ldap": {
"url": "ldap://myldap.com:389/",
"user_tree_dn": "ou=Users,dc=my_new_root,dc=org"
}
}
Returns: | the updated domain config returned from server. |
---|---|
Return type: | keystoneclient.v3.domain_configs.DomainConfig |
keystoneclient.v3.domains.
Domain
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity domain.
keystoneclient.v3.domains.
DomainManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity domains.
collection_key
= 'domains'¶create
(name, description=None, enabled=True, **kwargs)¶Create a domain.
Parameters: | |
---|---|
Returns: | the created domain returned from server. |
Return type: |
delete
(domain)¶“Delete a domain.
Parameters: | domain (str or keystoneclient.v3.domains.Domain ) – the domain to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
get
(domain)¶Retrieve a domain.
Parameters: | domain (str or keystoneclient.v3.domains.Domain ) – the domain to be retrieved from the server. |
---|---|
Returns: | the specified domain returned from server. |
Return type: | keystoneclient.v3.domains.Domain |
key
= 'domain'¶list
(**kwargs)¶List domains.
Parameters: | kwargs – allows filter criteria to be passed where supported by the server. |
---|---|
Returns: | a list of domains. |
Return type: | list of keystoneclient.v3.domains.Domain . |
update
(domain, name=None, description=None, enabled=None, **kwargs)¶Update a domain.
Parameters: |
|
---|---|
Returns: | the updated domain returned from server. |
Return type: |
keystoneclient.v3.ec2.
EC2
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an EC2 resource.
keystoneclient.v3.ec2.
EC2Manager
(client)¶Bases: keystoneclient.base.ManagerWithFind
create
(user_id, project_id)¶Create a new access/secret pair.
Parameters: |
|
---|---|
Returns: | the created access/secret pair returned from server. |
Return type: |
delete
(user_id, access)¶Delete an access/secret pair.
Parameters: |
|
---|---|
Returns: | Response object with 204 status. |
Return type: |
|
get
(user_id, access)¶Retrieve an access/secret pair for a given access key.
Parameters: |
|
---|---|
Returns: | the specified access/secret pair returned from server. |
Return type: |
list
(user_id)¶List access/secret pairs for a given user.
Parameters: | user_id (str) – the ID of the user having access/secret pairs will be listed. |
---|---|
Returns: | a list of access/secret pairs. |
Return type: | list of keystoneclient.v3.ec2.EC2 |
keystoneclient.v3.endpoint_groups.
EndpointGroup
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an identity endpoint group.
keystoneclient.v3.endpoint_groups.
EndpointGroupManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for Endpoint Groups.
base_url
= 'OS-EP-FILTER'¶check
(endpoint_group)¶Check if an endpoint group exists.
Parameters: | endpoint_group (str or keystoneclient.v3.endpoint_groups.EndpointGroup ) – the endpoint group to be checked against the
server. |
---|---|
Returns: | none if the specified endpoint group exists. |
collection_key
= 'endpoint_groups'¶create
(name, filters, description=None, **kwargs)¶Create an endpoint group.
Parameters: | |
---|---|
Returns: | the created endpoint group returned from server. |
Return type: |
delete
(endpoint_group)¶Delete an endpoint group.
Parameters: | endpoint_group (str or keystoneclient.v3.endpoint_groups.EndpointGroup ) – the endpoint group to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
get
(endpoint_group)¶Retrieve an endpoint group.
Parameters: | endpoint_group (str or keystoneclient.v3.endpoint_groups.EndpointGroup ) – the endpoint group to be retrieved from the
server. |
---|---|
Returns: | the specified endpoint group returned from server. |
Return type: | keystoneclient.v3.endpoint_groups.EndpointGroup |
key
= 'endpoint_group'¶list
(**kwargs)¶List endpoint groups.
Any parameter provided will be passed to the server.
Returns: | a list of endpoint groups. |
---|---|
Return type: | list of
keystoneclient.v3.endpoint_groups.EndpointGroup . |
resource_class
¶alias of EndpointGroup
update
(endpoint_group, name=None, filters=None, description=None, **kwargs)¶Update an endpoint group.
Parameters: |
|
---|---|
Returns: | the updated endpoint group returned from server. |
Return type: |
keystoneclient.v3.endpoints.
Endpoint
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity endpoint.
keystoneclient.v3.endpoints.
EndpointManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity endpoints.
collection_key
= 'endpoints'¶create
(service, url, interface=None, region=None, enabled=True, **kwargs)¶Create an endpoint.
Parameters: |
|
---|---|
Returns: | the created endpoint returned from server. |
Return type: |
delete
(endpoint)¶Delete an endpoint.
Parameters: | endpoint (str or keystoneclient.v3.endpoints.Endpoint ) – the endpoint to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
get
(endpoint)¶Retrieve an endpoint.
Parameters: | endpoint (str or keystoneclient.v3.endpoints.Endpoint ) – the endpoint to be retrieved from the server. |
---|---|
Returns: | the specified endpoint returned from server. |
Return type: | keystoneclient.v3.endpoints.Endpoint |
key
= 'endpoint'¶list
(service=None, interface=None, region=None, enabled=None, region_id=None, **kwargs)¶List endpoints.
Parameters: |
|
---|---|
Returns: | a list of endpoints. |
Return type: |
update
(endpoint, service=None, url=None, interface=None, region=None, enabled=None, **kwargs)¶Update an endpoint.
Parameters: |
|
---|---|
Returns: | the updated endpoint returned from server. |
Return type: |
keystoneclient.v3.groups.
Group
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity user group.
update
(name=None, description=None)¶keystoneclient.v3.groups.
GroupManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity groups.
collection_key
= 'groups'¶create
(name, domain=None, description=None, **kwargs)¶Create a group.
Parameters: |
|
---|---|
Returns: | the created group returned from server. |
Return type: |
delete
(group)¶Delete a group.
Parameters: | group (str or keystoneclient.v3.groups.Group ) – the group to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
get
(group)¶Retrieve a group.
Parameters: | group (str or keystoneclient.v3.groups.Group ) – the group to be retrieved from the server. |
---|---|
Returns: | the specified group returned from server. |
Return type: | keystoneclient.v3.groups.Group |
key
= 'group'¶list
(user=None, domain=None, **kwargs)¶List groups.
Parameters: |
|
---|---|
Returns: | a list of groups. |
Return type: | list of |
update
(group, name=None, description=None, **kwargs)¶Update a group.
Parameters: |
|
---|---|
Returns: | the updated group returned from server. |
Return type: |
keystoneclient.v3.policies.
Policy
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity policy.
update
(blob=None, type=None)¶keystoneclient.v3.policies.
PolicyManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity policies.
collection_key
= 'policies'¶create
(blob, type='application/json', **kwargs)¶Create a policy.
Parameters: | |
---|---|
Returns: | the created policy returned from server. |
Return type: |
delete
(policy)¶“Delete a policy.
Parameters: | policy (str or keystoneclient.v3.policies.Policy ) – the policy to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
get
(policy)¶Retrieve a policy.
Parameters: | policy (str or keystoneclient.v3.policies.Policy ) – the policy to be retrieved from the server. |
---|---|
Returns: | the specified policy returned from server. |
Return type: | keystoneclient.v3.policies.Policy |
key
= 'policy'¶list
(**kwargs)¶List policies.
Parameters: | kwargs – allows filter criteria to be passed where supported by the server. |
---|---|
Returns: | a list of policies. |
Return type: | list of keystoneclient.v3.policies.Policy . |
update
(policy, blob=None, type=None, **kwargs)¶Update a policy.
Parameters: |
|
---|---|
Returns: | the updated policy returned from server. |
Return type: |
keystoneclient.v3.projects.
Project
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity project.
add_tag
(tag)¶check_tag
(tag)¶delete_tag
(tag)¶update
(name=None, description=None, enabled=None)¶keystoneclient.v3.projects.
ProjectManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity projects.
add_tag
(project, tag)¶Add a tag to a project.
Parameters: |
|
---|
check_tag
(project, tag)¶Check if tag is associated with project.
Parameters: |
|
---|---|
Returns: | true if tag is associated, false otherwise |
collection_key
= 'projects'¶create
(name, domain, description=None, enabled=True, parent=None, **kwargs)¶Create a project.
Parameters: |
|
---|---|
Returns: | the created project returned from server. |
Return type: |
delete
(project)¶Delete a project.
Parameters: | project (str or keystoneclient.v3.projects.Project ) – the project to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
delete_tag
(project, tag)¶Remove tag from project.
Parameters: |
|
---|
find
(**kwargs)¶get
(project, subtree_as_list=False, parents_as_list=False, subtree_as_ids=False, parents_as_ids=False)¶Retrieve a project.
Parameters: |
|
---|---|
Returns: | the specified project returned from server. |
Return type: | |
Raises: | keystoneclient.exceptions.ValidationError – if subtree_as_list and subtree_as_ids or parents_as_list and parents_as_ids are included at the same time in the call. |
key
= 'project'¶list
(domain=None, user=None, **kwargs)¶List projects.
Parameters: |
|
---|---|
Returns: | a list of projects. |
Return type: |
List tags associated with project.
Parameters: | project – project to list tags for. |
---|---|
Returns: | list of str tag names |
update
(project, name=None, domain=None, description=None, enabled=None, **kwargs)¶Update a project.
Parameters: |
|
---|---|
Returns: | the updated project returned from server. |
Return type: |
Update tag list of a project.
Replaces current tag list with list specified in tags parameter.
Parameters: |
|
---|---|
Returns: | list of tags |
keystoneclient.v3.regions.
Region
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents a Catalog region.
keystoneclient.v3.regions.
RegionManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity regions.
collection_key
= 'regions'¶create
(id=None, description=None, enabled=True, parent_region=None, **kwargs)¶Create a region.
Parameters: |
|
---|---|
Returns: | the created region returned from server. |
Return type: |
delete
(region)¶Delete a region.
Parameters: | region (str or keystoneclient.v3.regions.Region ) – the region to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
get
(region)¶Retrieve a region.
Parameters: | region (str or keystoneclient.v3.regions.Region ) – the region to be retrieved from the server. |
---|---|
Returns: | the specified region returned from server. |
Return type: | keystoneclient.v3.regions.Region |
key
= 'region'¶list
(**kwargs)¶List regions.
Parameters: | kwargs – any attributes provided will filter regions on. |
---|---|
Returns: | a list of regions. |
Return type: | list of keystoneclient.v3.regions.Region . |
update
(region, description=None, enabled=None, parent_region=None, **kwargs)¶Update a region.
Parameters: |
|
---|---|
Returns: | the updated region returned from server. |
Return type: |
keystoneclient.v3.role_assignments.
RoleAssignment
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity role assignment.
keystoneclient.v3.role_assignments.
RoleAssignmentManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity roles assignments.
collection_key
= 'role_assignments'¶create
(**kwargs)¶delete
(**kwargs)¶find
(**kwargs)¶get
(**kwargs)¶key
= 'role_assignment'¶list
(user=None, group=None, project=None, domain=None, system=False, role=None, effective=False, os_inherit_extension_inherited_to=None, include_subtree=False, include_names=False)¶List role assignments.
If no arguments are provided, all role assignments in the system will be listed.
If both user and group are provided, a ValidationError will be raised. If both domain and project are provided, it will also raise a ValidationError.
Parameters: |
|
---|
put
(**kwargs)¶resource_class
¶alias of RoleAssignment
update
(**kwargs)¶keystoneclient.v3.roles.
InferenceRule
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents a rule that states one role implies another.
keystoneclient.v3.roles.
InferenceRuleManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity inference rules.
check
(prior_role, implied_role)¶Check if an inference rule exists.
Valid HTTP return codes:
- 204: The rule inference exists
- 404: A role cannot be found
Parameters: |
|
---|---|
Returns: | response object with 204 status returned from server. |
Return type: |
|
collection_key
= 'role_inferences'¶create
(prior_role, implied_role)¶Create an inference rule.
An inference rule is comprised of two roles, a prior role and an implied role. The prior role will imply the implied role.
Valid HTTP return codes:
- 201: Resource is created successfully
- 404: A role cannot be found
- 409: The inference rule already exists
Parameters: |
|
---|---|
Returns: | a newly created role inference returned from server. |
Return type: |
delete
(prior_role, implied_role)¶Delete an inference rule.
When deleting an inference rule, both roles are required. Note that neither role is deleted, only the inference relationship is dissolved.
Valid HTTP return codes:
- 204: Delete request is accepted
- 404: A role cannot be found
Parameters: |
|
---|---|
Returns: | Response object with 204 status. |
Return type: |
|
find
(**kwargs)¶get
(prior_role, implied_role)¶Retrieve an inference rule.
Valid HTTP return codes:
- 200: Inference rule is returned
- 404: A role cannot be found
Parameters: |
|
---|---|
Returns: | the specified role inference returned from server. |
Return type: |
key
= 'role_inference'¶list
(prior_role)¶List all roles that a role may imply.
Valid HTTP return codes:
- 200: List of inference rules are returned
- 404: A role cannot be found
Parameters: | prior_role – the role which implies implied_role . |
---|---|
Returns: | the specified role inference returned from server. |
Return type: | keystoneclient.v3.roles.InferenceRule |
list_inference_roles
()¶List all rule inferences.
Valid HTTP return codes:
- 200: All inference rules are returned
Parameters: | kwargs – attributes provided will be passed to the server. |
---|---|
Returns: | a list of inference rules. |
Return type: | list of keystoneclient.v3.roles.InferenceRule |
put
(**kwargs)¶resource_class
¶alias of InferenceRule
update
(**kwargs)¶keystoneclient.v3.roles.
Role
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity role.
keystoneclient.v3.roles.
RoleManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity roles.
check
(role, user=None, group=None, system=None, domain=None, project=None, os_inherit_extension_inherited=False, **kwargs)¶Check if a user or group has a role on a domain or project.
Parameters: |
|
---|---|
Returns: | the specified role returned from server if it exists. |
Return type: | |
Returns: | Response object with 204 status if specified role doesn’t exist. |
Return type: |
|
check_implied
(prior_role, implied_role, **kwargs)¶collection_key
= 'roles'¶create
(name, domain=None, **kwargs)¶Create a role.
Parameters: |
|
---|---|
Returns: | the created role returned from server. |
Return type: |
create_implied
(prior_role, implied_role, **kwargs)¶delete
(role)¶Delete a role.
When a role is deleted all the role inferences that have deleted role as prior role will be deleted as well.
Parameters: | role (str or keystoneclient.v3.roles.Role ) – the role to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
delete_implied
(prior_role, implied_role, **kwargs)¶deprecation_msg
= 'keystoneclient.v3.roles.InferenceRuleManager'¶get
(role)¶Retrieve a role.
Parameters: | role (str or keystoneclient.v3.roles.Role ) – the role to be retrieved from the server. |
---|---|
Returns: | the specified role returned from server. |
Return type: | keystoneclient.v3.roles.Role |
get_implied
(prior_role, implied_role, **kwargs)¶grant
(role, user=None, group=None, system=None, domain=None, project=None, os_inherit_extension_inherited=False, **kwargs)¶Grant a role to a user or group on a domain or project.
Parameters: |
|
---|---|
Returns: | the granted role returned from server. |
Return type: |
key
= 'role'¶list
(user=None, group=None, system=None, domain=None, project=None, os_inherit_extension_inherited=False, **kwargs)¶List roles and role grants.
Parameters: |
|
---|---|
Returns: | a list of roles. |
Return type: | list of |
list_role_inferences
(**kwargs)¶revoke
(role, user=None, group=None, system=None, domain=None, project=None, os_inherit_extension_inherited=False, **kwargs)¶Revoke a role from a user or group on a domain or project.
Parameters: |
|
---|---|
Returns: | the revoked role returned from server. |
Return type: | list of |
update
(role, name=None, **kwargs)¶Update a role.
Parameters: |
|
---|---|
Returns: | the updated role returned from server. |
Return type: |
keystoneclient.v3.services.
Service
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity service.
keystoneclient.v3.services.
ServiceManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity services.
collection_key
= 'services'¶create
(name, type=None, enabled=True, description=None, **kwargs)¶Create a service.
Parameters: | |
---|---|
Returns: | the created service returned from server. |
Return type: |
delete
(service=None, id=None)¶Delete a service.
Parameters: | service (str or keystoneclient.v3.services.Service ) – the service to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
get
(service)¶Retrieve a service.
Parameters: | service (str or keystoneclient.v3.services.Service ) – the service to be retrieved from the server. |
---|---|
Returns: | the specified service returned from server. |
Return type: | keystoneclient.v3.services.Service |
key
= 'service'¶list
(name=None, type=None, **kwargs)¶List services.
Parameters: | |
---|---|
Returns: | a list of services. |
Return type: |
update
(service, name=None, type=None, enabled=None, description=None, **kwargs)¶Update a service.
Parameters: |
|
---|---|
Returns: | the updated service returned from server. |
Return type: |
keystoneclient.v3.tokens.
TokenManager
(client)¶Bases: object
Manager class for manipulating Identity tokens.
get_revoked
(audit_id_only=False)¶Get revoked tokens list.
Parameters: | audit_id_only (bool) – If true, the server is requested to not send token IDs, but only audit IDs instead. New in version 2.2.0. |
---|---|
Returns: | A dict containing signed which is a CMS formatted string
if the server signed the response. If audit_id_only is true
then the response may be a dict containing revoked which
is the list of token audit IDs and expiration times. |
Return type: | dict |
get_token_data
(token, include_catalog=True, allow_expired=False)¶Fetch the data about a token from the identity server.
Parameters: | |
---|---|
Return type: |
revoke_token
(token)¶Revoke a token.
Parameters: | token (str or keystoneclient.access.AccessInfo ) – The token to be revoked. |
---|
validate
(token, include_catalog=True, allow_expired=False)¶Validate a token.
Parameters: |
|
---|---|
Return type: |
keystoneclient.v3.users.
User
(manager, info, loaded=False)¶Bases: keystoneclient.base.Resource
Represents an Identity user.
keystoneclient.v3.users.
UserManager
(client)¶Bases: keystoneclient.base.CrudManager
Manager class for manipulating Identity users.
add_to_group
(user, group)¶Add the specified user as a member of the specified group.
Parameters: |
|
---|---|
Returns: | Response object with 204 status. |
Return type: |
|
check_in_group
(user, group)¶Check if the specified user is a member of the specified group.
Parameters: |
|
---|---|
Returns: | Response object with 204 status. |
Return type: |
|
collection_key
= 'users'¶create
(name, domain=None, project=None, password=None, email=None, description=None, enabled=True, default_project=None, **kwargs)¶Create a user.
Parameters: |
|
---|---|
Returns: | the created user returned from server. |
Return type: |
Warning
The project argument is deprecated as of the 1.7.0 release in favor of default_project and may be removed in the 2.0.0 release.
If both default_project and project is provided, the default_project will be used.
delete
(user)¶Delete a user.
Parameters: | user (str or keystoneclient.v3.users.User ) – the user to be deleted on the server. |
---|---|
Returns: | Response object with 204 status. |
Return type: | requests.models.Response |
get
(user)¶Retrieve a user.
Parameters: | user (str or keystoneclient.v3.users.User ) – the user to be retrieved from the server. |
---|---|
Returns: | the specified user returned from server. |
Return type: | keystoneclient.v3.users.User |
key
= 'user'¶list
(project=None, domain=None, group=None, default_project=None, **kwargs)¶List users.
Parameters: |
|
---|---|
Returns: | a list of users. |
Return type: | list of |
Warning
The project argument is deprecated as of the 1.7.0 release in favor of default_project and may be removed in the 2.0.0 release.
If both default_project and project is provided, the default_project will be used.
remove_from_group
(user, group)¶Remove the specified user from the specified group.
Parameters: |
|
---|---|
Returns: | Response object with 204 status. |
Return type: |
|
update
(user, name=None, domain=None, project=None, password=None, email=None, description=None, enabled=None, default_project=None, **kwargs)¶Update a user.
Parameters: |
|
---|---|
Returns: | the updated user returned from server. |
Return type: |
Warning
The project argument is deprecated as of the 1.7.0 release in favor of default_project and may be removed in the 2.0.0 release.
If both default_project and project is provided, the default_project will be used.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.