Device to Cloud Command Line Interface Basics
The Device to Cloud Command Line Interface (d2c) is a tool to support system administrators and to help command line based automation. d2c provides a set of command line functions to access the Device to Cloud system via the API of DMO (Device Management Orchestrator).
Synopsis
d2c [-h | --help] [command] [-h | --help] [command-options ...]
Global Options
--help or -h
Displays available commands of d2c.
--info
Turn on info logging.
--debug
Turn on debug logging.
--outfile <filepath>
File into which the info or debug outputs shall be written additionaly.
--profile-file <file> or -p <file>
Path to the DMO access profile file.
If --profile is not defined the configuration of the active profile in the configuration file $HOME/.d2c/config.json is used instead by default.
{
"activeProfileFile": "TST_d2c-dev-1.profile",
"profilesDir": "/Users/ubuntu/.d2c/profiles"
}
--config-directory <directory>
Path to the directory within which the file config.json can be found. By default this directory is $HOME/.d2c.
--config-file <file>
Path to the configuration file. By default this path is $HOME/.d2c/config.json.
d2c -h
d2c -h
usage: d2c [-h] [command] [command-options ...]
command line interface
positional arguments:
command CONFIGURATION
create-configuration, cc: Creates a new configuration in a directory or in ~/.d2c.
PROFILE
list-profiles, lp: Lists the profiles in the configuration.
print-profile, pp: Prints a profile of the configuration.
add-profile, ap: Creates a new profile by collecting required infos from user input.
modify-profile, mp: Modifies profile by collecting user input from console.
activate-profile, acp: Acticates a profile to be used as default.
print-active-profile, pap: Prints the current activated profile.
profile-manager, pm: Starts the profile manager gui.
DMO
get-resources, gr: Returns resources.
add-resource, ar: Adds an object of a specific resource type.
update-resource, ar: Updates a resource object.
delete-resource, dr: Deletes a resource object.
get-device-provisioning-requests, gdpreq: Returns the device provisioning requests.
get-device-provisioning-responses, gdpres: Returns the device provisioning requests.
Device Management
add-device, ad: Adds a device.
add-lwm2m-device, alwm2md: Adds a lwm2m device.
get-devices, gd: Returns the details of a single device or a list of devices.
update-device, ud: Updates the attributes of a device.
delete-device, dd: Deletes a device object.
inject-uplink-message, ium: Injects an uplink message for a device to d2c.
inject-downlink-message, idm: Injects a downlink message for a device to d2c.
get-device-messages, gdms: Returns the messages related to a device.
delete-device-message, ddm: Deletes a device message from a mesage store.
Application Management
add-application, aa: Creates a new application.
get-applications, ga: Returns the applications.
update-application, ua: Updates an application.
delete-application, da: Deletes an application.
Device Group Management
add-device-group, adg: Creates a new device group.
get-device-groups, gdgs: Returns the device groups.
update-device-group, udg: Updates a device group.
delete-device-group, ddg: Deletes a device group.
Admin
add-d2ccli-application: Creates the application for the d2c command line interface it-self.
version: Prints the version infos.
command-options Command options.
options:
-h, --help show this help message and exit