4.2. Managing Users¶
4.2.1. Listing User Roles¶
4.2.1.1. Syntax¶
usage: vinfra cluster user list-available-roles [-h]
[-f {json,table,value,yaml}]
[-c COLUMN]
List available user roles.
...
4.2.1.2. Sample Output¶
This command lists user roles available in Virtuozzo Infrastructure Platform.
# vinfra cluster user list-available-roles
+-------------------------------------------------------------------+---------+---------------+
| description | id | name |
+-------------------------------------------------------------------+---------+---------------+
| Can add and remove SSH keys for cluster nodes access. | ssh | SSH |
| Can modify network settings and roles. | network | Network |
| Can perform all management operations. | admin | Administrator |
| Can create and manage NFS. | nfs | NFS |
| Can create and manage iSCSI targets and LUNs. | iscsi | iSCSI |
| Can create cluster, join nodes to cluster, and manage (assign and | cluster | Cluster |
| release) disks. | | |
| Can create and manage S3 cluster. | s3 | S3 |
| Can install updates. | updates | Updates |
| Can create and manage Backup Gateway. | abgw | ABGW |
| Can create and manage compute cluster. | compute | Compute |
| Guest role (read only) | guest | Guest |
+-------------------------------------------------------------------+---------+---------------+
4.2.2. Creating Users¶
4.2.2.1. Syntax¶
usage: vinfra cluster user create [-h] [-f {json,table,value,yaml}]
[-c COLUMN] [--description <description>]
[--enable | --disable] [--roles <roles>]
<name>
Add an admin panel user.
positional arguments:
<name> User name
optional arguments:
-h, --help show this help message and exit
--description <description>
User description
--enable Enable user
--disable Disable user
--roles <roles> A comma-separated list of user roles
...
4.2.2.2. Sample Output¶
This command creates and enables the user user1
, assigns it the role Guest
, and sets its password and description.
# vinfra cluster user create user1 --password 12345 \
--description "A guest user" --roles guest --enable
+-------------------+---------------------------------------+
| Field | Value |
+-------------------+---------------------------------------+
| description | A guest user |
| external_id | |
| external_provider | |
| id | 8e724de7a55e48d49a6199ffd8cdec9b |
| is_enabled | True |
| is_group | False |
| is_superuser | False |
| name | user1 |
| roles | - description: Guest role (read only) |
| | id: guest |
| | name: Guest |
+-------------------+---------------------------------------+
4.2.3. Listing Users¶
4.2.3.1. Syntax¶
usage: vinfra cluster user list [-h] [-f {json,table,value,yaml}] [-c COLUMN]
List all admin panel users.
...
4.2.3.2. Sample Output¶
This command lists users registered in Virtuozzo Infrastructure Platform.
# vinfra cluster user list
+----------------------------------+-----------------------+------------+--------------+-------+
| id | name | is_enabled | is_superuser | roles |
+----------------------------------+-----------------------+------------+--------------+-------+
| 5d6f888fd4ec4b4ea8383c9347b59514 | vstorage-service-user | True | True | |
| 60b67333c545442f98c084a56db7a06d | admin | True | True | |
+----------------------------------+-----------------------+------------+--------------+-------+
4.2.4. Showing User Details¶
4.2.4.1. Syntax¶
usage: vinfra cluster user show [-h] [-f {json,table,value,yaml}] [-c COLUMN]
<user>
Show details of an admin panel user.
positional arguments:
<user> User ID or name
...
4.2.4.2. Sample Output¶
This command shows the details of the user admin
.
# vinfra cluster user show admin
+-------------------+----------------------------------+
| Field | Value |
+-------------------+----------------------------------+
| description | |
| external_id | |
| external_provider | |
| id | 60b67333c545442f98c084a56db7a06d |
| is_enabled | True |
| is_group | False |
| is_superuser | True |
| name | admin |
| roles | |
+-------------------+----------------------------------+
4.2.5. Changing User Details¶
4.2.5.1. Syntax¶
usage: vinfra cluster user set [-h] [-f {json,table,value,yaml}] [-c COLUMN]
[--description <description>]
[--enable | --disable]
[--set-roles <roles> | --add-roles <roles> | --del-roles <roles>]
[--password] [--name <name>]
<user>
Modify admin panel user parameters.
positional arguments:
<user> User ID or name
optional arguments:
-h, --help show this help message and exit
--description <description>
User description
--enable Enable user
--disable Disable user
--set-roles <roles> A comma-separated list of user roles to set
(overwrites the current user roles)
--add-roles <roles> A comma-separated list of user roles to add
--del-roles <roles> A comma separated list of user roles to remove
--password User password
--name <name> A new name for the user
...
4.2.5.2. Sample Output¶
This command adds a description for the user admin
.
# vinfra cluster user set admin --description "The admin"
+-------------------+----------------------------------+
| Field | Value |
+-------------------+----------------------------------+
| description | The admin |
| external_id | |
| external_provider | |
| id | 60b67333c545442f98c084a56db7a06d |
| is_enabled | True |
| is_group | False |
| is_superuser | True |
| name | admin |
| roles | |
+-------------------+----------------------------------+
4.2.6. Changing Current User Password¶
4.2.6.1. Syntax¶
usage: vinfra cluster user change-password [-h] [-f {json,table,value,yaml}]
[-c COLUMN]
Change password of an admin panel user.
...
4.2.6.2. Sample Output¶
This command changes the password of the current user.
# vinfra cluster user change-password
Current password:
New password:
Confirm password:
Version 2.5.0 — Dec 22, 2018