2.1. Managing Tokens

2.1.1. Showing Token Details

2.1.1.1. Syntax

usage: vinfra node token show [-h] [-f {json,table,value,yaml}] [-c COLUMN]

Display the backend token.
...

2.1.1.2. Sample Output

This command shows the details of the current token.

# vinfra node token show
+-------+---------------+
| Field | Value         |
+-------+---------------+
| host  | 10.37.130.101 |
| token | dc56d4d2      |
| ttl   | 86398         |
+-------+---------------+

2.1.2. Creating a New Token

2.1.2.1. Syntax

usage: vinfra node token create [-h] [-f {json,table,value,yaml}] [-c COLUMN]
                                [--ttl <ttl>]

Create the backend token.

optional arguments:
  -h, --help            show this help message and exit
  --ttl <ttl>           Token TTL, in seconds
...

2.1.2.2. Sample Output

This command creates a new token with the time to live (TTL) of 86400 seconds.

# vinfra node token create --ttl 86400
+-------+---------------+
| Field | Value         |
+-------+---------------+
| host  | 10.37.130.101 |
| token | dc56d4d2      |
| ttl   | 86398         |
+-------+---------------+

2.1.3. Validating the Token

2.1.3.1. Syntax

usage: vinfra node token validate [-h] [-f {json,table,value,yaml}]
                                  [-c COLUMN]
                                  token

Validate the backend token.

positional arguments:
  token                 Token value
...

2.1.3.2. Sample Output

This command validates the token dc56d4d2.

# vinfra node token validate dc56d4d2
+--------+-------+
| Field  | Value |
+--------+-------+
| status | valid |
+--------+-------+