tenants

The cfy tenants command is used to create and manage tenants on the Cloudify Manager.
You can run commands on a tenant other than the one that you are logged into by specifying the name of the tenant to which the command applies. For example, cfy tenants add-user USERNAME -t TENANT_NAME can be used to add a user to a different tenant.

Requirements

Optional flags

These commands support the common CLI flags.

Commands

Each of the tenants related commands are detailed below in alphabetical order.

add-user

Usage

cfy tenants add-user [OPTIONS] USERNAME

Add an individual user to a tenant.
If your system is integrated with LDAP/AD, ensure that the username matches that specified in LDAP.

USERNAME is the name of the user to add to the tenant.

Required flag

Valid tenant roles are:

 

Example

$ cfy tenants add-user my-user -t my-tenant -r user
...

User `my-user` added successfully to tenant `my-tenant`

...

add-user-group

Usage

cfy tenants add-user-group [OPTIONS] USER_GROUP_NAME

Add a user group to a tenant.
USER_GROUP_NAME is the name of the user group to add to the tenant.

If your system is integrated with LDAP/AD, ensure that the group name matches that specified in LDAP.

Required flags

Valid tenant roles are:

 

Example

$ cfy tenants add-user-group my-user-group -t my-tenant -r user
...

User group `my-user-group` added successfully to tenant `my-tenant`

...

create

Usage

cfy tenants create [OPTIONS] TENANT_NAME

Add a tenant to the Cloudify Manager.
TENANT_NAME is the name of the new tenant

The tenant name must be unique.

Required flag

 

Example

$ cfy tenants create my-tenant
...

Tenant `my-tenant` created

...

delete

Usage

cfy tenants delete [OPTIONS] TENANT_NAME

Delete a tenant from the Cloudify Manager. TENANT_NAME is the name of the tenant

 

Example

$ cfy tenants delete my-tenant
...

Deleting tenant `my-tenant`...
Tenant removed

...

get

Usage

cfy tenants get [OPTIONS] TENANT_NAME

View information for a specific tenant, including its users.
TENANT_NAME is the name of the tenant

Optional flag

 

Example

$ cfy tenants get my-tenant
...

Getting info for tenant `my-tenant`...

Requested tenant info:
+-----------+--------+-------+
|    name   | groups | users |
+-----------+--------+-------+
| my-tenant |   1    |   2   |
+-----------+--------+-------+

...

list

Usage

cfy tenants list [OPTIONS]

Provides a list of all tenants in this Cloudify Manager instance.
By default, when you generate the list of tenants, only the number of linked resources is displayed. You can retrieve full details with the use of a --get-data flag.

Optional flags

 

Example

$ cfy tenants list
...

Listing all tenants...

Tenants:
+----------------+--------+-------+
|      name      | groups | users |
+----------------+--------+-------+
| default_tenant |        |   1   |
|   my-tenant    |   1    |   2   |
+----------------+--------+-------+

...

remove-user

Usage

cfy tenants remove-user [OPTIONS] USERNAME

Remove an individual user from a tenant.
USERNAME is the name of the user to remove from the tenant.

Required flags

 

Example

$ cfy tenants remove-user my-user -t my-tenant
...

User `my-user` removed successfully from tenant `my-tenant`

...

remove-user-group

Usage

cfy tenants remove-user-group [OPTIONS] USER_GROUP_NAME

Remove a user group from a tenant.
USER_GROUP_NAME is the name of the user group to remove from the tenant.

Required flags

 

Example

$ cfy tenants remove-user-group my-user-group -t my-tenant
...

User group `my-user-group` removed successfully from tenant `my-tenant`

...

update-user

Usage

cfy tenants update-user [OPTIONS] USERNAME

Update the user role in a tenant.

USERNAME is the name of the user for which the role needs to be updated.

Required flags

Example

$ cfy tenants update-user my-user -t my-tenant -r viewer
User `my-user` updated successfully in tenant `my-tenant`

update-user-group

Usage

cfy tenants update-user-group [OPTIONS] USERNAME

Update the user role in a tenant.

USERNAME is the name of the user for which the role needs to be updated.

Required flags

Example

$ cfy tenants update-user-group my-user-group -t my-tenant -r viewer
Group `my-user-group` updated successfully in tenant `my-tenant`