Identity API v2¶
For details on how to use identity, see Using OpenStack Identity
The Identity v2 Class¶
The identity high-level interface is available through the identity
member of a Connection object. The
identity member will only be added if the service is detected.
-
class
openstack.identity.v2._proxy.Proxy(session)¶ -
create_role(**attrs)¶ Create a new role from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Role, comprised of the properties on the Role class.Returns: The results of role creation Return type: Role
-
delete_role(role, ignore_missing=True)¶ Delete a role
Parameters: - role – The value can be either the ID of a role or a
Roleinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the role does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent role.
Returns: None- role – The value can be either the ID of a role or a
-
find_role(name_or_id, ignore_missing=True)¶ Find a single role
Parameters: - name_or_id – The name or ID of a role.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Roleor None
-
get_role(role)¶ Get a single role
Parameters: role – The value can be the ID of a role or a Roleinstance.Returns: One RoleRaises: ResourceNotFoundwhen no resource can be found.
-
roles(**query)¶ Retrieve a generator of roles
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of role instances. Return type: Role
-
update_role(role, **attrs)¶ Update a role
Parameters: role – Either the ID of a role or a Roleinstance.Attrs kwargs: The attributes to update on the role represented by value.Returns: The updated role Return type: Role
-
create_tenant(**attrs)¶ Create a new tenant from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Tenant, comprised of the properties on the Tenant class.Returns: The results of tenant creation Return type: Tenant
-
delete_tenant(tenant, ignore_missing=True)¶ Delete a tenant
Parameters: - tenant – The value can be either the ID of a tenant or a
Tenantinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the tenant does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent tenant.
Returns: None- tenant – The value can be either the ID of a tenant or a
-
find_tenant(name_or_id, ignore_missing=True)¶ Find a single tenant
Parameters: - name_or_id – The name or ID of a tenant.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Tenantor None
-
get_tenant(tenant)¶ Get a single tenant
Parameters: tenant – The value can be the ID of a tenant or a Tenantinstance.Returns: One TenantRaises: ResourceNotFoundwhen no resource can be found.
-
tenants(**query)¶ Retrieve a generator of tenants
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of tenant instances. Return type: Tenant
-
update_tenant(tenant, **attrs)¶ Update a tenant
Parameters: tenant – Either the ID of a tenant or a Tenantinstance.Attrs kwargs: The attributes to update on the tenant represented by value.Returns: The updated tenant Return type: Tenant
-
create_user(**attrs)¶ Create a new user from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a User, comprised of the properties on the User class.Returns: The results of user creation Return type: User
-
delete_user(user, ignore_missing=True)¶ Delete a user
Parameters: - user – The value can be either the ID of a user or a
Userinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the user does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent user.
Returns: None- user – The value can be either the ID of a user or a
-
find_user(name_or_id, ignore_missing=True)¶ Find a single user
Parameters: - name_or_id – The name or ID of a user.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Useror None
-
get_user(user)¶ Get a single user
Parameters: user – The value can be the ID of a user or a Userinstance.Returns: One UserRaises: ResourceNotFoundwhen no resource can be found.
-
Identity API v3¶
For details on how to use identity, see Using OpenStack Identity
The Identity v3 Class¶
The identity high-level interface is available through the identity
member of a Connection object. The
identity member will only be added if the service is detected.
-
class
openstack.identity.v3._proxy.Proxy(session)¶ -
create_credential(**attrs)¶ Create a new credential from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Credential, comprised of the properties on the Credential class.Returns: The results of credential creation Return type: Credential
-
delete_credential(credential, ignore_missing=True)¶ Delete a credential
Parameters: - credential – The value can be either the ID of a credential or a
Credentialinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the credential does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent credential.
Returns: None- credential – The value can be either the ID of a credential or a
-
find_credential(name_or_id, ignore_missing=True)¶ Find a single credential
Parameters: - name_or_id – The name or ID of a credential.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Credentialor None
-
get_credential(credential)¶ Get a single credential
Parameters: credential – The value can be the ID of a credential or a Credentialinstance.Returns: One CredentialRaises: ResourceNotFoundwhen no resource can be found.
-
credentials(**query)¶ Retrieve a generator of credentials
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of credentials instances. Return type: Credential
-
update_credential(credential, **attrs)¶ Update a credential
Parameters: credential – Either the ID of a credential or a Credentialinstance.Attrs kwargs: The attributes to update on the credential represented by value.Returns: The updated credential Return type: Credential
-
create_domain(**attrs)¶ Create a new domain from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Domain, comprised of the properties on the Domain class.Returns: The results of domain creation Return type: Domain
-
delete_domain(domain, ignore_missing=True)¶ Delete a domain
Parameters: - domain – The value can be either the ID of a domain or a
Domaininstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the domain does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent domain.
Returns: None- domain – The value can be either the ID of a domain or a
-
find_domain(name_or_id, ignore_missing=True)¶ Find a single domain
Parameters: - name_or_id – The name or ID of a domain.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Domainor None
-
get_domain(domain)¶ Get a single domain
Parameters: domain – The value can be the ID of a domain or a Domaininstance.Returns: One DomainRaises: ResourceNotFoundwhen no resource can be found.
-
domains(**query)¶ Retrieve a generator of domains
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of domain instances. Return type: Domain
-
update_domain(domain, **attrs)¶ Update a domain
Parameters: domain – Either the ID of a domain or a Domaininstance.Attrs kwargs: The attributes to update on the domain represented by value.Returns: The updated domain Return type: Domain
-
create_endpoint(**attrs)¶ Create a new endpoint from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Endpoint, comprised of the properties on the Endpoint class.Returns: The results of endpoint creation Return type: Endpoint
-
delete_endpoint(endpoint, ignore_missing=True)¶ Delete an endpoint
Parameters: - endpoint – The value can be either the ID of an endpoint or a
Endpointinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the endpoint does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent endpoint.
Returns: None- endpoint – The value can be either the ID of an endpoint or a
-
find_endpoint(name_or_id, ignore_missing=True)¶ Find a single endpoint
Parameters: - name_or_id – The name or ID of a endpoint.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Endpointor None
-
get_endpoint(endpoint)¶ Get a single endpoint
Parameters: endpoint – The value can be the ID of an endpoint or a Endpointinstance.Returns: One EndpointRaises: ResourceNotFoundwhen no resource can be found.
-
endpoints(**query)¶ Retrieve a generator of endpoints
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of endpoint instances. Return type: Endpoint
-
update_endpoint(endpoint, **attrs)¶ Update a endpoint
Parameters: endpoint – Either the ID of a endpoint or a Endpointinstance.Attrs kwargs: The attributes to update on the endpoint represented by value.Returns: The updated endpoint Return type: Endpoint
-
create_group(**attrs)¶ Create a new group from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Group, comprised of the properties on the Group class.Returns: The results of group creation Return type: Group
-
delete_group(group, ignore_missing=True)¶ Delete a group
Parameters: - group – The value can be either the ID of a group or a
Groupinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the group does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent group.
Returns: None- group – The value can be either the ID of a group or a
-
find_group(name_or_id, ignore_missing=True)¶ Find a single group
Parameters: - name_or_id – The name or ID of a group.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Groupor None
-
get_group(group)¶ Get a single group
Parameters: group – The value can be the ID of a group or a Groupinstance.Returns: One GroupRaises: ResourceNotFoundwhen no resource can be found.
-
groups(**query)¶ Retrieve a generator of groups
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of group instances. Return type: Group
-
update_group(group, **attrs)¶ Update a group
Parameters: group – Either the ID of a group or a Groupinstance.Attrs kwargs: The attributes to update on the group represented by value.Returns: The updated group Return type: Group
-
create_policy(**attrs)¶ Create a new policy from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Policy, comprised of the properties on the Policy class.Returns: The results of policy creation Return type: Policy
-
delete_policy(policy, ignore_missing=True)¶ Delete a policy
Parameters: - policy – The value can be either the ID of a policy or a
Policyinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the policy does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent policy.
Returns: None- policy – The value can be either the ID of a policy or a
-
find_policy(name_or_id, ignore_missing=True)¶ Find a single policy
Parameters: - name_or_id – The name or ID of a policy.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Policyor None
-
get_policy(policy)¶ Get a single policy
Parameters: policy – The value can be the ID of a policy or a Policyinstance.Returns: One PolicyRaises: ResourceNotFoundwhen no resource can be found.
-
policies(**query)¶ Retrieve a generator of policies
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of policy instances. Return type: Policy
-
update_policy(policy, **attrs)¶ Update a policy
Parameters: policy – Either the ID of a policy or a Policyinstance.Attrs kwargs: The attributes to update on the policy represented by value.Returns: The updated policy Return type: Policy
-
create_project(**attrs)¶ Create a new project from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Project, comprised of the properties on the Project class.Returns: The results of project creation Return type: Project
-
delete_project(project, ignore_missing=True)¶ Delete a project
Parameters: - project – The value can be either the ID of a project or a
Projectinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the project does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent project.
Returns: None- project – The value can be either the ID of a project or a
-
find_project(name_or_id, ignore_missing=True)¶ Find a single project
Parameters: - name_or_id – The name or ID of a project.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Projector None
-
get_project(project)¶ Get a single project
Parameters: project – The value can be the ID of a project or a Projectinstance.Returns: One ProjectRaises: ResourceNotFoundwhen no resource can be found.
-
projects(**query)¶ Retrieve a generator of projects
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of project instances. Return type: Project
-
update_project(project, **attrs)¶ Update a project
Parameters: project – Either the ID of a project or a Projectinstance.Attrs kwargs: The attributes to update on the project represented by value.Returns: The updated project Return type: Project
-
create_service(**attrs)¶ Create a new service from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Service, comprised of the properties on the Service class.Returns: The results of service creation Return type: Service
-
delete_service(service, ignore_missing=True)¶ Delete a service
Parameters: - service – The value can be either the ID of a service or a
Serviceinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the service does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent service.
Returns: None- service – The value can be either the ID of a service or a
-
find_service(name_or_id, ignore_missing=True)¶ Find a single service
Parameters: - name_or_id – The name or ID of a service.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Serviceor None
-
get_service(service)¶ Get a single service
Parameters: service – The value can be the ID of a service or a Serviceinstance.Returns: One ServiceRaises: ResourceNotFoundwhen no resource can be found.
-
services(**query)¶ Retrieve a generator of services
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of service instances. Return type: Service
-
update_service(service, **attrs)¶ Update a service
Parameters: service – Either the ID of a service or a Serviceinstance.Attrs kwargs: The attributes to update on the service represented by value.Returns: The updated service Return type: Service
-
create_user(**attrs)¶ Create a new user from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a User, comprised of the properties on the User class.Returns: The results of user creation Return type: User
-
delete_user(user, ignore_missing=True)¶ Delete a user
Parameters: - user – The value can be either the ID of a user or a
Userinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the user does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent user.
Returns: None- user – The value can be either the ID of a user or a
-
find_user(name_or_id, ignore_missing=True)¶ Find a single user
Parameters: - name_or_id – The name or ID of a user.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Useror None
-
get_user(user)¶ Get a single user
Parameters: user – The value can be the ID of a user or a Userinstance.Returns: One UserRaises: ResourceNotFoundwhen no resource can be found.
-
users(**query)¶ Retrieve a generator of users
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of user instances. Return type: User
-
update_user(user, **attrs)¶ Update a user
Parameters: user – Either the ID of a user or a Userinstance.Attrs kwargs: The attributes to update on the user represented by value.Returns: The updated user Return type: User
-
create_trust(**attrs)¶ Create a new trust from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Trust, comprised of the properties on the Trust class.Returns: The results of trust creation Return type: Trust
-
delete_trust(trust, ignore_missing=True)¶ Delete a trust
Parameters: - trust – The value can be either the ID of a trust or a
Trustinstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the credential does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent credential.
Returns: None- trust – The value can be either the ID of a trust or a
-
find_trust(name_or_id, ignore_missing=True)¶ Find a single trust
Parameters: - name_or_id – The name or ID of a trust.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
Returns: One
Trustor None
-
get_trust(trust)¶ Get a single trust
Parameters: trust – The value can be the ID of a trust or a Trustinstance.Returns: One TrustRaises: ResourceNotFoundwhen no resource can be found.
-
trusts(**query)¶ Retrieve a generator of trusts
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the resources being returned. Returns: A generator of trust instances. Return type: Trust
-
update_trust(trust, **attrs)¶ Update a trust
Parameters: trust – Either the ID of a trust or a Trustinstance.Attrs kwargs: The attributes to update on the trust represented by value.Returns: The updated trust Return type: Trust
-
create_region(**attrs)¶ Create a new region from attributes
Parameters: attrs (dict) – Keyword arguments which will be used to create a Region, comprised of the properties on the Region class.Returns: The results of region creation. Return type: Region
-
delete_region(region, ignore_missing=True)¶ Delete a region
Parameters: - region – The value can be either the ID of a region or a
Regioninstance. - ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the region does not exist. When set toTrue, no exception will be thrown when attempting to delete a nonexistent region.
Returns: None- region – The value can be either the ID of a region or a
-
find_region(name_or_id, ignore_missing=True)¶ Find a single region
Parameters: - name_or_id – The name or ID of a region.
- ignore_missing (bool) – When set to
FalseResourceNotFoundwill be raised when the region does not exist. When set toTrue, None will be returned when attempting to find a nonexistent region.
Returns: One
Regionor None
-
get_region(region)¶ Get a single region
Parameters: region – The value can be the ID of a region or a Regioninstance.Returns: One RegionRaises: ResourceNotFoundwhen no matching region can be found.
-
regions(**query)¶ Retrieve a generator of regions
Parameters: **query (kwargs) – Optional query parameters to be sent to limit the regions being returned. Returns: A generator of region instances. Return type: Region
-
update_region(region, **attrs)¶ Update a region
Parameters: region – Either the ID of a region or a Regioninstance.Attrs kwargs: The attributes to update on the region represented by value.Returns: The updated region. Return type: Region
-