From 220dedc67723a6e4119b468112fdcf2f2f04fafd Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Sun, 19 Sep 2021 15:32:04 -0700 Subject: [PATCH] Adding help. --- test_scripts/curl/cli | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/test_scripts/curl/cli b/test_scripts/curl/cli index ce58346..917c620 100755 --- a/test_scripts/curl/cli +++ b/test_scripts/curl/cli @@ -219,17 +219,34 @@ systeminfo() { } reloadsubsystem() { - payload="{ \"command\" : \"reload\", \"subsystems\" : [ \"OUIServer\" , \"CommandManager\" ] }" + payload="{ \"command\" : \"reload\", \"subsystems\" : [ \"$1\" ] }" curl ${FLAGS} -X POST "https://${OWFMS}/api/v1/system" \ -H "accept: application/json" \ -H "Authorization: Bearer ${token}" \ -d "$payload" } - help() { - echo - echo + + echo "Usage: cli [args]" + echo + echo "getfirmwares Get a lit of firmwares" + echo "latestfirmware Get the latest firmware for the device_type specified" + echo "revisions Get a list of revisions available." + echo "devicetypes Get the list of device types supported." + echo "firmwareage Calculate how out of date a specific release it." + echo "gethistory Get the device firmware history." + echo "connecteddevice Get the device status." + echo "connectedDevices Get the list of connected devices." + echo "devicereport Get the dashboard." + echo "setloglevel Set the log level for s specific subsystem." + echo "getloglevels Get the current log levels for all subsystems." + echo "getloglevelnames Get the log level names available." + echo "getsubsystemnames Get the list of subsystems." + echo "systeminfo Get basic system information." + echo "reloadsubsystem Reload the configuration for a subsystem." + echo + echo } shopt -s nocasematch @@ -248,7 +265,7 @@ case "$1" in "getloglevels") login; getloglevels; logout ;; "getloglevelnames") login; getloglevelnames; logout ;; "getsubsystemnames") login; getsubsystemnames; logout ;; - "reloadsubsystem") login; reloadsubsystem; logout ;; + "reloadsubsystem") login; reloadsubsystem "$2"; logout ;; "systeminfo") login; systeminfo ; logout;; *) help ;; esac