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.
Extension Operations¶
User Operations¶
-
class
openstack.identity.v2._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_user(**attrs)¶ Create a new user from attributes
-
update_user(user, **attrs)¶ Update a 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
-
get_user(user)¶ Get a single user
-
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
-
Role Operations¶
-
class
openstack.identity.v2._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_role(**attrs)¶ Create a new role from attributes
-
update_role(role, **attrs)¶ Update a 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
-
get_role(role)¶ Get a single role
-
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
-
Tenant Operations¶
-
class
openstack.identity.v2._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_tenant(**attrs)¶ Create a new tenant from attributes
-
update_tenant(tenant, **attrs)¶ Update a 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
-
get_tenant(tenant)¶ Get a single tenant
-
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
-