Onteon CLI - General Options¶
Version¶
You can check version of your OnteonCLI by executing onteoncli --version
or onteoncli -V
.
root@de8f7a95da2e:/opt/onteon# onteoncli --version
1.3.1 (449c1edbec7e9c16840c2c158cab0f1ba5c0159f)
Help¶
To check available commands or options you can use --help
or -h
flag.
Check list of commands¶
root@de8f7a95da2e:/opt/onteon# onteoncli --help
Usage: onteoncli [-hV] [--output=<output>] [-v=<level>] [COMMAND]
The onteoncli program allows to manage Onteon cluster.
-h, --help Show this help message and exit.
--output=<output> Output format. Supported values: text, json.
-v, --verbose=<level> Verbose mode. Helpful for troubleshooting. Supports
multiple levels (from 1 to 7).
-V, --version Print version information and exit.
Commands:
login The login command authorizes access to cluster.
token The token command returns valid JWT access token.
node The node command groups node commands.
script The script command groups script commands.
application-instance The application-instance command groups application
instance commands.
zone The zone command groups zone commands.
application The application command groups application commands.
distribution The distribution command groups distribution commands.
role The role command groups role commands.
completion The completion command generates completion script for
bash or zsh.
application-registry The application-registry command groups application
registry commands.
upgrade The upgrade command groups upgrade commands.
upgrade-registry The upgrade-registry command groups upgrade registry
commands.
application-change The application-change command groups application
change commands.
root@de8f7a95da2e:/opt/onteon# onteoncli node --help
Usage: onteoncli node [-h] [COMMAND]
The node command groups node commands.
-h, --help Show this help message and exit.
Commands:
disconnect The disconnect command disconnects node by id.
get The get command finds node by id.
details The details command shows node's details.
list The list command lists all nodes with pagination.
set-zone-id The set-zone-id command updates node with new zone id.
Check command arguments¶
root@de8f7a95da2e:/opt/onteon# onteoncli node get --help
Usage: onteoncli node get [-h] [--output=<output>] [-v=<level>] <id>
The get command finds node by id.
<id> Node's id.
-h, --help Show this help message and exit.
--output=<output> Output format. Supported values: text, json.
-v, --verbose=<level> Verbose mode. Helpful foradd ` troubleshooting. Supports
multiple levels (from 1 to 7).
Output¶
You can choose the output format by using the --output <format>
flag.
Possible formats: text (default), json.
Text¶
root@de8f7a95da2e:/opt/onteon# onteoncli node list --output text
id createdAt updatedAt ipAddress nodeApiPort zoneId status
93278db669741ffcbe3f8e07 2022-03-18T07:42:12.957Z 2022-03-18T10:44:40.524Z 172.27.0.5 8030 null available
870a3d0661e97132a6441db5 2022-03-18T07:42:12.957Z 2022-03-18T10:44:40.553Z 172.27.0.4 8030 null available
Json¶
root@de8f7a95da2e:/opt/onteon# onteoncli node list --output json | jq
[
{
"createdAt": "2022-03-18T07:42:12.957Z",
"ipAddress": "172.27.0.5",
"nodeApiPort": 8030,
"zoneId": null,
"id": "93278db669741ffcbe3f8e07",
"updatedAt": "2022-03-18T10:44:50.536Z",
"status": "available"
},
{
"createdAt": "2022-03-18T07:42:12.957Z",
"ipAddress": "172.27.0.4",
"nodeApiPort": 8030,
"zoneId": null,
"id": "870a3d0661e97132a6441db5",
"updatedAt": "2022-03-18T10:44:50.58Z",
"status": "available"
}
]
Verbose¶
To set level of verbosity use -v
or --verbose
flag with level value between 1 and 7.
root@de8f7a95da2e:/opt/onteon# onteoncli node list -v 1
id createdAt updatedAt ipAddress nodeApiPort zoneId status
690295573732e0f478073a92 2021-10-22T09:03:08.269Z 2021-10-22T09:18:50.525Z 172.31.0.4 8030 null available
befe09ac815e19890f83cb71 2021-10-22T09:03:08.269Z 2021-10-22T09:18:50.546Z 172.31.0.3 8030 null available
root@de8f7a95da2e:/opt/onteon# onteoncli node list -v 5
--------------------------------------------------------------------------------
HTTP Request: GET http://onteoncc-master:8050/onteon-api-access/api/nodes?page=1&perPage=10
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
HTTP Response: 200
--------------------------------------------------------------------------------
id createdAt updatedAt ipAddress nodeApiPort zoneId status
690295573732e0f478073a92 2021-10-22T09:03:08.269Z 2021-10-22T09:17:30.537Z 172.31.0.4 8030 null available
befe09ac815e19890f83cb71 2021-10-22T09:03:08.269Z 2021-10-22T09:17:30.557Z 172.31.0.3 8030 null available