Control CLI
RADKit Control will allow you to programmatically retrieve, modify and update RADKit service components. That is, if you have a running RADKit Service, RADKit Control can make it manageable over the network, as an alternative to the WebUI.
RADKit Control provides two different interfaces - a CLI and a Python API. This document will describe how to use the Control CLI to remotely manage RADKit Service over the network. For details on the Control Python API, see Control API reference.
When you are done here, you will be able to use RADKit Control cli to have control over the components below individually and in bulk:
Devices, remote users, labels, admins can be managed (added, updated, deleted).
The Service itself can be managed.
Command structure
% radkit-control [OPTIONS] COMMAND [ARGS]
Control CLI is based on a single entry point, radkit-control
that provides access to a
number of commands. Each command consists of one or more command keywords (e.g. device create
).
A single command can be run at a time. Each command accepts specific arguments and there is a number of top-level options that are common to all commands.
The input data provided to Control in the arguments is validated before it is sent to RADKit Service. If the data model rejects some values in the input, an error is raised without the data being sent to the Service.
Warning
When passing values that contain whitespace (e.g. a description string) on the CLI, please pay attention to the quoting rules of your shell (e.g. use single or double quotes as needed).
--help
option guide
You can view a quick summary of all possible arguments and the available options by running --help
after any command.
(e.g. radkit-control device create --help
). This also works at the top level (i.e. radkit-control --help
).
The help for each command is divided into three sections:
Usage: Basic syntax for using the command and its arguments and a description of the API operation that the command invokes on the Service.
Options: A description of each of the options available for that command.
Commands: A list of subcommand keywords available under this command, if any.
Top-level help
% radkit-control --help
Usage: radkit-control [OPTIONS] COMMAND [ARGS]...
Control a remote or local RADKit Service
Options:
--version Display version and exit
--service-certificate FILE Path to a certificate file identifying the
Service.
--service-fingerprint TEXT Service certificate fingerprint used to verify
TLS connection. The fingerprint should use
SHA256 hash.
--debug Enable debugging
--trace Enable trace logging
--radkit-directory DIRECTORY Root of the RADKit directories
--settings-file FILE Path to the custom settings file (can be both
absolute and relative to current working
directory)
-s, --setting TEXT... Override a specific setting
--tracebacks Enables full tracebacks for all exceptions
--help Show this message and exit.
Commands:
admin setup RADKit Service
device Operate on devices
label Operate on labels
system RADKit Service system-level control
user Operate on users
Command help (example)
% radkit-control admin --help
Usage: radkit-control admin [OPTIONS] COMMAND [ARGS]...
setup RADKit Service
Options:
--help Show this message and exit.
Commands:
bulk-create Create multiple admins using JSON.
bulk-delete Delete multiple admins using JSON.
bulk-update Update multiple admins using JSON.
create create an admin user
delete Delete admin.
list list users
update update an admin user
Command output
A successful Control command will produce some JSON output and yield a zero return status.
A command is considered successful if it was delivered and processed by the RADKit Service.
Notice that the Service may still return an API error, such as “device not found”, but the command
was still processed successfully. Errors are printed on stderr
, JSON output is printed
on stdout
.
Other possible outcomes for a command are:
Usage error: the syntax for the command is invalid. Return status will be nonzero.
% radkit-control admin foo Usage: radkit-control admin [OPTIONS] COMMAND [ARGS]... Try 'radkit-control admin --help' for help. Error: No such command 'foo'.
Validation errors: some of the values provided were invalid as per the data model. Return status will be nonzero.
% radkit-control label create foo --color red Validation error: 1 validation error for NewLabel color Color 'red' is not of the form "#789abc" (type=value_error) Please check if you provided correct data.
Control CLI reference
This section contains the detailed help content for Control CLI commands with examples.
Top-level Options
Note
Only the most important options are documented here.
--version
Display the Control version and exit. Since Control is installed as part of RADKit Service, this version is the same as that of the locally installed Service. It should also be the same as the Service instance(s) being remotely controlled, to ensure API compatibility.
% radkit-control --version RADKit Control - version 1.5.0
--service-certificate PEM_FILE
The path to a copy of the Service Webserver certificate in PEM format. This is used to authenticate the TLS connection to the Service API.
If neither
--service-certificate
nor--service-fingerprint
is provided, Control will not verify the Service certificate.# Use this to securely connect to a RADKit Service running locally % radkit-control --service-certificate ~/.radkit/service/webserver.pem
--service-fingerprint FINGERPRINT
The SHA256 fingerprint of the Service Webserver certificate. This is used to authenticate the TLS connection to the Service API.
If neither
--service-certificate
nor--service-fingerprint
is provided, Control will not verify the Service certificate.The fingerprint can be found in several places on the host running the Service:
in the WebUI, under Direct RPC connectivity;
in the Service logs, just after startup;
on the Service console (controlling terminal), in the extended panel visible with
Ctrl-F
.Warning
Be sure to get the fingerprint of the Webserver certificate and not the E2EE certificate. The latter is used for Client to Service end-to-end encryption.
Alternatively, the fingerprint can be computed directly from the certificate using:
# Adjust the path depending on your Service installation openssl x509 -noout -fingerprint -sha256 -inform pem -in ~/.radkit/service/webserver.pem
--radkit-directory RADKIT_DIRECTORY
The root of the RADKit directory hierarchy. This is where Control will look for its TOML configuration file under
control/settings.toml
relative toRADKIT_DIRECTORY
.For details, see Special settings.
--settings-file TOML_FILE
The path to the TOML settings file, absolute or relative to the current directory.
For details, see Special settings.
--setting KEY VALUE
Change a run-time setting without using the TOML file. This can also be done through an environment variable.
For details, see Settings management.
--debug
Enables debug logging for RADKit Control. Logs and debugs are shown on
stderr
, while JSON output goes tostdout
, allowing you to redirect the output to one file and the logs to another.% radkit-control --debug system status 2023-07-11T17:42:38.614Z INFO | internal | MainThread <main> [AUDIT] Logging configured [root_level=ERROR level=DEBUG con_level=TRACE con_json=False file_level=TRACE file_json=False file_name=None file_rotate=True with_rate_limiting=False] 2023-07-11T17:42:38.614Z INFO | internal | MainThread <main> [] RADKit Control [version='1.5.0'] 2023-07-11T17:42:38.615Z DEBUG | internal | MainThread deserialize_response [RSRV] Executing service API method [api_method='AsyncBaseControlAPI.get_service_status'] 2023-07-11T17:42:41.720Z DEBUG | internal | MainThread radkit_service.control_api [RSRV] Request [method='POST' url='https://localhost:8081/api/v1/auth/login' headers={'accept-encoding': 'gzip, deflate', 'connection': 'keep-alive', 'referer': 'https://localhost:8081/api/v1', 'user-agent': 'radkit_control/1.5.0', 'accept': 'application/json'} params=None timeout=None] ... { "success": true, "result": {...} }
Note
Much of RADKit Control power comes from following a Pydantic model. When data is validated against a Pydantic model, if any errors or inconsistencies are detected, Pydantic raises detailed validation errors that clearly indicate the problems and their locations.
Note
Some functions require a component id
or uuid
, if you are not sure about any user, device, label identifier for carrying out a certain operation, list
function and its cli equivalent can show you the needed ids.
Labels
radkit-control label list
:This command will have radkit-control list all the labels existing on the RADKit service.
% radkit-control label list superadmin's password: { "success": true, "result": [ { "id": 1, "name": "Example Label", "color": "#789abc" } ] }
radkit-control label create <name> [--color <color>]
:This command will have radkit-control create a new label on the RADKit service. Your input is validated with pydantic model and clear error messages are shown if there is a validation error.
name
: A string representing a name for the label that will be added to the Service (mandatory).--color
: This option needs to be followed by a color for the label in HEX code format (mandatory).
Example:
% radkit-control label create "Example Label" --color "#789abc" superadmin's password: { "results": [ { "success": true, "result": { "id": 1, "name": "Example Label", "color": "#789abc" } } ], "success": true, "count": 1, "success_count": 1 }
radkit-control label update <id> [--name <name>] [--color <color>]
:This command will have radkit-control update a specific remote user on the RADKit service identified by its id.
id
: An integer argument representing the ID of the label to be updated (mandatory).--name
: This option needs to be followed by an optional string representing the new name for the label that will take place instead of the original. It will not be updated if nothing is provided(optional).--color
: This option needs to be followed by an optional string in HEX code format representing the new color for the label that will take place instead of the original. It will not be updated if nothing is provided(optional).
Example:
% radkit-control label update 1 --name "New Label Name" --color "#789abc" superadmin's password: { "results": [ { "success": true, "result": { "id": 1, "name": "New Label Name", "color": "#789abc" } } ], "success": true, "count": 1, "success_count": 1 }
radkit-control label delete <label-id>
:This command will have radkit-control delete a certain label existing on the RADKit service identified by its id.
label-id
: An integer argument representing the ID of the label to be deleted.
% radkit-control label delete superadmin's password: { "results": [ { "success": true, "result": { "id": 1, "name": "New Label Name", "color": "#789abc" } } ], "success": true, "count": 1, "success_count": 1 }
Users
radkit-control user list
This command will have radkit-control list all the remote users existing on the RADKit service.
% radkit-control user list superadmin's password: { "success": true, "result": [ { "username": "test@cisco.com", "fullname": "", "description": "", "timeSliceMinutes": null, "expirationTimestamp": "1970-01-01T00:00:00", "labels": [] } ] }
radkit-control user create <username> [--full-name <fullname>] [--description <descr>] [--inactive] [--expiration <expiration timestamp>]
:This command will have radkit-control create a new remote user on the RADKit service. Your input is validated with pydantic model and clear error messages are shown if there is a validation error.
username
: A string argument representing the email of the remote user that will be created on the RADKit service (mandatory).--full_name
: This option needs to be followed by an optional string representing the full name of the remote user that will be created (mandatory).--description
: This option needs to be followed by an optional string representing a description of the remote user that will be created (mandatory).--label
: This option needs to be followed by an optional list of string options representing labels to be added to the remote user. Multiple labels can be specified by using the label option multiple times (optional).--active
: This option needs to be followed by an optional argument representing the activation status of the remote user (optional). It has a default value of “inactive” and can take values like: “inactive”, “forever”, “2h”, “1w,3d”, or “30min”.
% radkit-control user create test@cisco.com --full-name TEST --active forever superadmin's password: { "success": true, "result": { "username": "test@cisco.com", "fullname": "TEST", "description": "", "timeSliceMinutes": null, "expirationTimestamp": null, "labels": [] } }
radkit-control user update <username> [--new-username <newname>] [--full-name <fullname>] [--mode {manual,time-slice}] [--time-slice-hours TIME_SLICE_HOURS] [--active] username
This command will have radkit-control update a specific remote user on the RADKit service identified by the username.
username
: A mandatory string argument representing the username of the remote user to be updated (mandatory).--new_username
: This option needs to be followed by an optional string representing the new username for the remote user. It will not be updated if nothing is provided(optional).--full_name
: This option needs to be followed by an optional string representing the new full name for the remote user. It will not be updated if nothing is provided(optional).--description
: This option needs to be followed by an optional string representing the new description for the remote user. It will not be updated if nothing is provided(optional).--clear_labels
: This option needs to be followed by a boolean that, when specified, clears the existing labels of the remote user. Labels will not be cleared if nothing is provided(optional).--add_label
: This option needs to be followed by an optional list of string representing labels to be added to the remote user. Labels will not be updated if nothing is provided(optional).--remove_label
: This option needs to be followed by an optional list of string representing labels to be removed from the remote user. Labels will not be updated if nothing is provided(optional).--active
: This option needs to be followed by an optional argument representing the updated activation status of the remote user. It can take values like “inactive”, “forever”,“2h”, “1w,3d”, or “30min”. Activation status will not be updated if nothing is provided(optional).
% radkit-control user update test@cisco.com --full-name "Rey Reynolds" --description "Updated description" --clear-labels superadmin's password: { "success": true, "result": { "username": "test@cisco.com", "fullname": "Rey Reynolds", "description": "Updated description", "timeSliceMinutes": null, "expirationTimestamp": null, "labels": [] } }
radkit-control user delete <username>
:This command will have radkit-control delete a specific remote user on the RADKit service identified by the username.
username
: A mandatory string argument representing the username/email of the remote user.
% radkit-control user delete test@cisco.com superadmin's password: { "success": true, "result": "test@cisco.com" }
radkit-control user bulk-create [--input bulk_users] [--json-data] [--json-template]
This command will have radkit-control create multiple users based on a JSON input. You can provide the data in a json file with the option
-–input
followed by the file path, or directly with--json-data
. The--json-template
option will make radkit-control show you how the Service is expecting the data with a JSON template. Your input is validated with pydantic model and clear error messages are shown if there is a validation error.% radkit-control user bulk-create --json-template [ { "username": "user1@host.com", "fullname": "user1", "description": "user1", "timeSliceMinutes": null, "expirationTimestamp": null, "labels": [] }, { "username": "user2@host.com", "fullname": "user2", "description": "user2", "timeSliceMinutes": null, "expirationTimestamp": null, "labels": [] } ]
radkit-control user bulk-update [--input bulk_users.json] [--json-data] [--json-template]
This command will have radkit-control update multiple users based on a JSON input. You can provide the data in a json file with the option
-–input
followed by the file path, or directly with--json-data
. The--json-template
option will make radkit-control show you how the Service is expecting the data with a JSON template.% radkit-control user bulk-update --json-template [ { "username": "user1@host.com", "newUsername": "user5@host.com", "fullname": "user1", "description": "user1", "expirationTimestamp": { "dontUpdate": true }, "timeSliceMinutes": { "dontUpdate": true }, "labelUpdate": { "replace": null, "add": [], "remove": [] } }, { "username": "user2@host.com", "newUsername": { "dontUpdate": true }, "fullname": "user2", "description": "user2", "expirationTimestamp": { "dontUpdate": true }, "timeSliceMinutes": { "dontUpdate": true }, "labelUpdate": { "replace": null, "add": [], "remove": [] } } ]
radkit-control user bulk-delete [--input bulk_users.json] [--json-data] [--json-template]
:This command will have radkit-control delete multiple users based on a JSON input. You can provide the data in a json file with the option
-–input
followed by the file path, or directly with--json-data
. The--json-template
option will make radkit-control show you how we are expecting the data with a JSON template.% radkit-control user bulk-delete --json-template [ "user1@host.com", "user2@host.com" ]
Admins
radkit-control admin list
:This command will have radkit-control list all the admin users existing on the RADKit service.
% radkit-control admin list superadmin's password: { "success": true, "result": [ { "username": "superadmin", "email": "", "fullname": "", "description": "" } ] }
radkit-control admin create [-h] [--password PASSWORD] [--email EMAIL] [--full-name FULL_NAME] [--description DESCRIPTION] [--initial [INITIAL]] username
:This command will have radkit-control create a new admin user on the RADKit service. Your input is validated with pydantic model and clear error messages are shown if there is a validation error.
username
: This option needs to be followed by a string argument representing the username of the admin user to be created (mandatory).--password
: This option needs to be followed by an option for specifying the password for the admin user. If not provided, the script prompts for the password using the getpass library(optional).--email
: This option needs to be followed by an option for specifying the email address of the admin user. It will not be added if nothing is provided(optional).--full-name
: This option needs to be followed by an option for specifying the full name of the admin user. It will not be added if nothing is provided(optional).--description
: This option needs to be followed by an option for specifying a description for the admin user. It will not be added if nothing is provided(optional).--initial
: This option Identifies the very first admin user. Must be done before other commands can be executed. Authentication not required. It will not be added if nothing is provided(optional).
% radkit-control admin create myadmin --email myadmin@cisco.com --full-name "Rey Reynolds" --description "Administrator" Provide a password for myadmin: superadmin's password: { "success": true, "result": { "username": "myadmin", "email": "myadmin@cisco.com", "fullname": "Rey Reynolds", "description": "Administrator" } }
radkit-control admin update <username> [-h] [--email EMAIL] [--full-name FULL_NAME] [--description DESCRIPTION]
:This command will have radkit-control update a specific admin user on the RADKit service identified by the username.
username
: This option needs to be followed by a string argument representing the username of the admin user to be updated (mandatory).email
: This option needs to be followed by an option for specifying the updated email address of the admin user. It will not be updated if nothing is provided (optional).full-name
: This option needs to be followed by an option for specifying the updated full name of the admin user. It will not be updated if nothing is provided (optional).description
: This option needs to be followed by an option for specifying the updated description for the admin user. It will not be updated if nothing is provided (optional).
% radkit-control admin update myadmin --full-name "Noor Z" superadmin's password: { "success": true, "result": { "username": "myadmin", "email": "myadmin@cisco.com", "fullname": "Noor Z", "description": "Administrator" } }
Note
There is no password update and no username update for an Admin using
update
through Control.radkit-control admin delete <username>
This command will have radkit-control delete a certain admin existing on the RADKit service identified its username except
superadmin
user.% radkit-control admin delete "myadmin" superadmin's password: { "success": true, "result": "myadmin" }
radkit-control admin bulk-create [--input bulk_admins.json] [--json-template]
This command will have radkit-control create multiple admins based on a JSON input. You can provide the data in a json file with the option
-–input
followed by the file path, or directly with--json-data
. The--json-template
option will make radkit-control show you how the Service is expecting the data with a JSON template. Input is validated with pydantic model and clear error messages are shown if there is a validation error.% radkit-control admin bulk-create --json-template [ { "username": "user1", "email": "user1@host.com", "fullname": "user1", "description": "user1", "password": "Pa$$word123" }, { "username": "user2", "email": "user2@host.com", "fullname": "user2", "description": "user2", "password": "Pa$$word123" } ]
radkit-control admin bulk-update [--input bulk_admins.json] [--json-template]
This command will have radkit-control update multiple admins based on a JSON input. You can provide the data in a json file with the option
-–input
followed by the file path, or directly with--json-data
. The--json-template
option will make radkit-control show you how the Service is expecting the data with a JSON template.% radkit-control admin bulk-update --json-template [ { "username": "user1", "email": "user1@host.com", "fullname": "user1", "description": "user1" }, { "username": "user2", "email": "user2@host.com", "fullname": "user2", "description": "user2" } ]
Note
You can not update admins’ passwords in bulk from cli radkit-control as there is no password update and no username update for Admins using
bulk-update
through Control.radkit-control admin bulk-delete [--input bulk_admins.json] [--json-template]
This command will have radkit-control delete multiple admins based on a JSON input. You can provide the data in a json file with the option
-–input
followed by the file path, or directly with--json-data
. The--json-template
option will make radkit-control show you how we are expecting the data with a JSON template.superadmin
user cannot be included for deleting.% radkit-control admin bulk-delete --json-template [ "user1", "user2" ]
radkit-control admin change-password [--new-password PASSWORD] [--old-password PASSWORD] username
username
(required): This option needs to be followed by a string argument representing the username of the admin user to be updated (mandatory).new-password
(optional): An option for specifying the new password to be assigned to the username. If not provided, the script prompts for the password using the getpass library.old-password
(optional): An option for specifying the old password for the username. (optional)
% radkit-control admin change-password --new-password 'MyPassword!123' --old-password 'MyOldPassword!123' myadmin superadmin's password: { "success": true, "result": { "username": "myadmin", "email": "myadmin@cisco.com", "fullname": "Noor Z", "description": "Administrator" } }
Devices
radkit-control device list
:This command will have radkit-control list all the devices existing on the RADKit service with their associated parameters.
% radkit-control device list superadmin's password: { "success": true, "result": [ { "uuid": "ddaa67d5-7cbb-4896-8317-36241cb29fae", "name": "my-device", "host": "192.168.1.2", "deviceType": "IOS_XE", "description": "This is a production router", "labels": [], "jumphostUuid": null, "sourceKey": null, "sourceDevUuid": null, "metaData": [], "enabled": true, "terminal": { "port": 22, "connectionMethod": "SSH", "username": "", "enableSet": false, "useInsecureAlgorithms": false, "useTunnelingIfJumphost": true, "provisioningVariant": "DEFAULT" }, "netconf": null, "snmp": null, "swagger": null, "http": null, "forwardedTcpPorts": "" } ] }
radkit-control device get [OPTIONS] DEVICEUUID
:This command will have radkit-control get a certain device existing on the RADKit service with its associated parameters identified by its UUID.
% radkit-control device get "ddaa67d5-7cbb-4896-8317-36241cb29fae" superadmin's password: { "success": true, "result": [ { "uuid": "ddaa67d5-7cbb-4896-8317-36241cb29fae", "name": "my-device", "host": "192.168.1.2", "deviceType": "IOS_XE", "description": "This is a production router", "labels": [], "jumphostUuid": null, "sourceKey": null, "sourceDevUuid": null, "metaData": [], "enabled": true, "terminal": { "port": 22, "connectionMethod": "SSH", "username": "", "enableSet": false, "useInsecureAlgorithms": false, "useTunnelingIfJumphost": true, "provisioningVariant": "DEFAULT" }, "netconf": null, "snmp": null, "swagger": null, "http": null, "forwardedTcpPorts": "" } ] }
radkit-control device create <device name> [...]
:This command will have radkit-control create a new device on the RADKit service. Your input is validated with pydantic model and clear error messages are shown if there is a validation error.
Note
Since the list of parameters in a device is quite longish and easy to miss, it is recommended to create a template device with the help of
--csv-template
or--json-template
options and populate the fields.Note
Some options have default values specified. These options will take their default values if not provided by the user. Other options, such as devicename, host, devicetype, and label, are required and must be provided by the user when invoking the command.
% radkit-control device create my-device "192.168.1.2" "IOS_XE" --description "This is a production router" --terminal-enable-set false --active true superadmin's password: { "success": true, "result": { "uuid": "ddaa67d5-7cbb-4896-8317-36241cb29fae", "name": "my-device", "host": "192.168.1.2", "deviceType": "IOS_XE", "description": "This is a production router", "labels": [], "jumphostUuid": null, "sourceKey": null, "sourceDevUuid": null, "metaData": [], "enabled": true, "terminal": { "port": 22, "connectionMethod": "SSH", "username": "", "enableSet": false, "useInsecureAlgorithms": false, "useTunnelingIfJumphost": true, "provisioningVariant": "DEFAULT" }, "netconf": null, "snmp": null, "swagger": null, "http": null, "forwardedTcpPorts": "" } }
radkit-control device update <uuid> [...]
:This command will have radkit-control update a specific device on the RADKit service identified by its UUID.
deviceuuid
: The UUID of the device to be updated (mandatory).
Note
Since the list of parameters in a device is quite longish and easy to miss, it is recommended to create a template device with the help of
--csv-template
or--json-template
options and populate the fields.% radkit-control device update --http-username admin --active false ddaa67d5-7cbb-4896-8317-36241cb29fae superadmin's password: { "success": true, "result": { "uuid": "ddaa67d5-7cbb-4896-8317-36241cb29fae", "name": "my-device", "host": "192.168.1.2", "deviceType": "IOS_XE", "description": "This is a production router", "labels": [], "jumphostUuid": null, "sourceKey": null, "sourceDevUuid": null, "metaData": [], "enabled": false, "terminal": { "port": 22, "connectionMethod": "SSH", "username": "", "enableSet": false, "useInsecureAlgorithms": false, "useTunnelingIfJumphost": true, "provisioningVariant": "DEFAULT" }, "netconf": null, "snmp": null, "swagger": null, "http": { "username": "admin", "port": 443, "protocol": "HTTPS", "verify": true, "useInsecureAlgorithms": false, "authenticationExtra": None }, "forwardedTcpPorts": "" } }
radkit-control device delete <uuid>
:This command will have radkit-control delete a certain device existing on the RADKit service identified by its UUID.
% radkit-control device delete ddaa67d5-7cbb-4896-8317-36241cb29fae superadmin's password: { "success": true, "result": "ddaa67d5-7cbb-4896-8317-36241cb29fae" }
radkit-control device bulk-create [--json-input bulk_devices.json] [--json-data '..'] [--json-template] [--csv-input bulk_devices.csv] [--csv-data '..']
:This command will have radkit-control create multiple devices using JSON or CSV. Provide json in a file with
-–json-input
or--json-data
, or directly with--csv-input
or--csv-data
. Check the template for more help and useterminal
,http
,swagger
,netconf
,snmp
orlabels
to generate substructures.% radkit-control device bulk-create --csv-template terminal name(mandatory),host(mandatory),deviceType(mandatory),description,jumphostUuid,sourceKey,sourceDevUuid,metaData,enabled,snmp,forwardedTcpPorts,terminal.port,terminal.connectionMethod, terminal.username,terminal.enableSet,terminal.useInsecureAlgorithms,terminal.useTunnelingIfJumphost,terminal.password,terminal.enable,terminal.privateKey,terminal.privateKeyPassword
% radkit-control device bulk-create --csv-data 'name,host,deviceType,description test-router1,1.1.1.1,IOS_XE,test router1 test-router2,1.1.1.2,IOS_XE,test router2' superadmin's password: { "results": [ { "success": true, "result": { "uuid": "248ed2b1-4972-4fbe-8a10-a6e50f8289d4", "name": "test-router1", "host": "1.1.1.1", "deviceType": "IOS_XE", "description": "test router1", "labels": [], "jumphostUuid": null, "sourceKey": null, "sourceDevUuid": null, "metaData": [], "enabled": true, "terminal": null, "netconf": null, "snmp": null, "swagger": null, "http": null, "forwardedTcpPorts": "" } }, { "success": true, "result": { "uuid": "212d5458-563f-41ce-81c4-e5bbd51c5cd9", "name": "test-router2", "host": "1.1.1.2", "deviceType": "IOS_XE", "description": "test router2", "labels": [], "jumphostUuid": null, "sourceKey": null, "sourceDevUuid": null, "metaData": [], "enabled": true, "terminal": null, "netconf": null, "snmp": null, "swagger": null, "http": null, "forwardedTcpPorts": "" } } ], "success": true, "count": 2, "success_count": 2 }
radkit-control device bulk-update [--input bulk_devices.json] [--json-template]
:This command will have radkit-control update multiple devices using JSON or CSV. Provide json in a file with
-–input
or--json-data
. Check the template for more help and useterminal
,http
,swagger
,netconf
,snmp
orlabels
to generate substructures.% radkit-control device bulk-update --json-template terminal [ { "uuid": "266bd85a-3480-4d3c-b941-d9729b33219f", "name": "name-of-device", "host": "hostname", "deviceType": "LINUX", "description": { "dontUpdate": true }, "labelUpdate": { "replace": null, "add": [], "remove": [] }, "jumphostUuid": { "dontUpdate": true }, "sourceKey": { "dontUpdate": true }, "sourceDevUuid": { "dontUpdate": true }, "metaData": { .......} ]
radkit-control device bulk-delete [--input bulk_devices.json] [--json-template]
:This command will have radkit-control create multiple devices using JSON or CSV. Provide json in a file with
--input
or--json-data
, or directly with--csv-input
or--csv-data
. Check the template for more help and useterminal
,http
,swagger
,netconf
,snmp
orlabels
to generate substructures.elete multiple devices UUIDs using JSON. Provide json or csv in a file with–-input
, or directly with--json-data
.% radkit-control device bulk-delete --json-template [ "b6d3a1b1-ae1b-465d-bef6-60e260de33ec", "88a298a2-4d21-4c2e-b48a-0c3957cffe1f" ]
device import <uuid> [--tag]
:This command will import all the devices from external source. Optionally a tag might be provided to filter the devices (if given device supports it).
% radkit-control device import c2dd8dee-aeae-4e59-8f3d-976c1aac3011 superadmin's password: { "success": true, "result": 16 }
System
radkit-control system version
:This command will have radkit-control display the version of the service.
% radkit-control system version { "success": true, "result": "1.5.0b14" }
radkit-control system serial [--reset]
:This command will have radkit-control set or retrieve serial number. The reset option resets RADKit Service serial number and erases credentials (reprovisioning required).
% radkit-control system serial superadmin's password: { "success": true, "result": "kadc-r3i5-ncmp" }
radkit-control system status
:This command will have radkit-control display provisioning and connectivity status.
% radkit-control system status superadmin's password: { "success": true, "result": { "version": "...", "username": "superadmin", "bootstrapped": true, "cloud_rpc_enabled": true, "direct_rpc_enabled": true, "cloud": { "domain": "PROD", "base_url": "https://prod.radkit-cloud.cisco.com", "enrolled": false, "service_id": null, "connected": false, "connected_message": "DISCONNECTED" }, "e2ee_sha256_fingerprint": "...", "webserver_sha256_fingerprint": "..." } }
radkit-control system bootstrap
:This command will have radkit-control bootstrap service by creating the superadmin user. Fails if superadmin user already exists
% radkit-control system bootstrap Provide a password for superadmin: Confirm: { "success": true, "result": { "username": "superadmin", "email": "", "fullname": "superadmin", "description": "admin with full privileges" } }
radkit-control system enroll [OPTIONS]
:This command will have radkit-control start RADKit Service enrollment.
% radkit-control system enroll PROD:1234-2345-3456 superadmin's password: { "success": true, "result": "Service successfully enrolled and started" }
radkit-control system stop [OPTIONS]
:This command will have radkit-control stop the RADKit Service.
radkit-control system settings get
:This command will have radkit-control retrieve the current settings of the RADKit Service, and returns the result as an APIResult object with a dictionary containing setting information:
setting
: setting path, separated by periodsvalue
: setting valuedescription
: short descriptionapi_writable
: if false, setting cannot be set via the APIapi_persistent
: if false, setting cannot be saved to disk via the APIwebui_visible
: if true, the settings web interface will show this settingpedigrees
: how the setting was set
radkit-control system settings set
:This command will have radkit-control set a setting to a value. You can pass multiple setting/value pairs, one after the other.
radkit-control system settings set service.rbac.device_access_control on