Tenant Manager and Tenants

class keystoneclient.v2_0.tenants.Tenant(manager, info, loaded=False)

Represents a Keystone tenant

Attributes:
  • id: a uuid that identifies the tenant
  • name: tenant name
  • description: tenant description
  • enabled: boolean to indicate if tenant is enabled
class keystoneclient.v2_0.tenants.TenantManager(api)

Manager class for manipulating Keystone tenants

add_user(tenant, user, role)

Add a user to a tenant with the given role.

create(tenant_name, description=None, enabled=True)

Create a new tenant.

delete(tenant)

Delete a tenant.

list(limit=None, marker=None)

Get a list of tenants.

Parameters:
  • limit (integer) – maximum number to return. (optional)
  • marker (string) – use when specifying a limit and making multiple calls for querying. (optional)
Return type:

list of Tenant

list_users(tenant)

List users for a tenant.

remove_user(tenant, user, role)

Remove the specified role from the user on the tenant.

resource_class

alias of Tenant

update(tenant_id, tenant_name=None, description=None, enabled=None)

Update a tenant with a new name and description.

Previous topic

Generic client

Next topic

User Manager and Users

This Page