Orchestra Device Manager¶
The following commands are used for operations on the devices on the Orchestra Device Manager. Currently, it supports the following operation:
Commands get, get-many and update require specifying which device_id to get, the specific operation can be found by calling --help
on those commands. All available commands have a not-required option -m/--mode
which specifies how to print the result. It can be set to 'normal'/'json'/'csv'
and the result will print in the desired format. The 'normal'
mode pretty-prints results in the form of a table, it is the default option.
get¶
This command is used to get information about one device with a specified id.
You have to specify the device_id as an argument at the end of the command. Option -m/--mode
specifies how to print the result. It can be set to 'normal'/'json'/'csv'
and the result will print in the desired format. The 'normal'
mode pretty-prints results in the form of a table, it is the default option.
This command can fail if it fails to get data from Orchestra, in a such situation it will display such a message: "Error from orchestra. Status code {response.status_code}"
$ ocli device get <DEVICE_ID>
Use option -m json
to get output in a json:
$ ocli device get <DEVICE_ID> -m json
get-many¶
This command is used to get information about the list of devices with specified ids.
You have to specify the filepath to a file containing list of device ids separated by newlines in option -f/--device_list_file
. Option -m/--mode
specifies how to print the result. It can be set to 'normal'/'json'/'csv'
and the result will print in the desired format. The 'normal'
mode pretty-prints results in the form of a table, it is the default option.
This command can fail in three ways:
- If it fails to get data from Orchestra, in such a situation it will display such a message: "Error from orchestra. Status code {response.status_code}"
- If the fail does not exist: "File {device_list_file} not found"
- If there are no device_ids in the file: "No device IDs to get"
$ ocli device get-many -f <input_file>
Example input file:
list¶
This command is used to get information about all devices of a specified tenant.
It does not have any arguments or options to specify . Option -m/--mode
specifies how to print the result. It can be set to 'normal'/'json'/'csv'
and the result will print in the desired format. The 'normal'
mode pretty-prints results in the form of a table, it is the default option.
This command can fail if it fails to get data from Orchestra, in such a situation it will display such message: "Error from orchestra. Status code {response.status_code}"
$ ocli device list
update¶
This command is used to update the name of a specified device.
You have to specify the device_id as an argument at the end of the command. Option -n/--new_name
is required and specifies the new name of the device. Option -m/--mode
specifies how to print the result. It can be set to 'normal'/'json'/'csv'
and the result will print in the desired format. The 'normal'
mode pretty-prints results in the form of a table, it is the default option.
This command can fail if it fails to get data from Orchestra, in such situation it will display such message: "Error from orchestra. Status code {response.status_code}"
$ ocli device update -n "Madagascarian Anura" <DEVICE_ID>
Use option -m json
to get output in a json format:
$ ocli device update -m json -n Triadobatrachus <DEVICE_ID>
Terminal plugin¶
The terminal plugin is used to connect to the devices’ terminal using Orchestra. It supports only one operation - start
:
The -u/--url
option is not required so the only thing that is required is to specify the DEVICE_ID
at the end of the command. The command starts the device terminal in another command line. When you are done close the window to stop the connection.
$ ocli ssh start <DEVICE_ID>
