The "softnas-cmd" command line interface utility facilitates integration with the REST API as a CLI (command line interface). softnas-cmd is written in CURL and is cross-platform code. It may also be useful as example code for how to use the API, for those who wish to explore it in more detail as a working example. This document has been produced by running `softnas-cmd --help`.
...
As with all SoftNAS API applications, softnas-cmd requires that you first authenticate with the SoftNAS server using the "login" command. Once you are logged in, softnas-cmd maintains a simulated cookie jar that emulates how a browser interacts with a web server to maintain session security (required by the SoftNAS server). Subsequent commands issued via the softnas-cmd CLI make use of the login session (which expires after 30 minutes).
Usage:
softnas-cmd [-h | --help] | [[-b | --base_url URL] [-s | --session_id SESSION_ID] [-i | --insecure] | [-t | --pretty_print] COMMAND [OPTIONS]]
OPTIONS:
-h [command name], --help [command name]
...
Display json result with indentation.
Commands:
Table of Contents | ||||
---|---|---|---|---|
|
login
Login into SoftNAS Application.
COMMAND OPTIONS:
username
password
EXAMPLE:
softnas-cmd login softnas Pass4W0rd
logout
Logout from SoftNAS Application.
EXAMPLE:
softnas-cmd logout
resetsessiontimer
This command is used to keep session active. By default session timeout is set to 30 minutes. if you want to keep session from being expired just call this function.
EXAMPLE:
softnas-cmd resetsessiontimer
licenseinfo
Returns the current license information.
EXAMPLE:
softnas-cmd licenseinfo
licenseactivate
Activate a license key for use with SoftNAS
COMMAND OPTIONS:
licencekey: the licence key; i.e., "softnas"
...
hardware id: can be obtained from "licenseinfo" in amazon the hardware id is the instance id
EXAMPLE:
softnas-cmd licenseactivate CEAASA-BESNJA-8MEED6-AHAZZN-XHWB8X-A2NUK3 RBLLC i-0b06fe44
internallicense
Force SoftNAS to use its built-in, default license.
EXAMPLE:
softnas-cmd internallicense
ackagreement
Acknowledge the license agreement (to enable use of the product).
EXAMPLE:
softnas-cmd ackagreement
...
...
checkupdate
check Check to see if new software updates are available.
EXAMPLE:
softnas-cmd internallicense
...
...
executeupdate
execute Execute and apply software updates.
EXAMPLE:
softnas-cmd executeupdate
...
...
statusupdate
return Return the status of an update that is in-progress (started by executeupdate).
EXAMPLE:
softnas-cmd statusupdate
...
availabledisks
returns Returns list of available disk devices.
EXAMPLE:
softnas-cmd availabledisks
...
pools
pools lists Lists available storage pools. Command Options
COMMAND OPTIONS:
start start: position to start from (used for pagination)
limit limit: number of items to get
EXAMPLE:
softnas-cmd pools 1 10
...
pooldetails
list List a storage pool's detailed attributes. Command Options
COMMAND OPTIONS:
pool name name: the pool name
EXAMPLE:
softnas-cmd pooldetails pool1
poolcommand
issue a command to control a storage pool
Command OptionsCOMMAND OPTIONS:
command name : zpool command name (startscrub, stopscrub, setonline, setoffline, removedevice, replacedevice)
...
delete pool storage
Command OptionsCOMMAND OPTIONS:
pool name : the pool name
...
volumes list available storage volumes
Command OptionsCOMMAND OPTIONS:
start : position to start from (used for pagination)
...
create volume
Command OptionsCOMMAND OPTIONS:
vol_name : name of volume
...
delete volume
Command OptionsCOMMAND OPTIONS:
volume name : name of volume
...
list available snapshots
Command OptionsCOMMAND OPTIONS:
pool name : pool name i.e 'pool3/vol1'
...
issue a volume snapshot control command
Command OptionsCOMMAND OPTIONS:
command : possible values
...
list of available iSCSI targets
Command OptionsCOMMAND OPTIONS:
start : position to start from (used for pagination)
...
issue a disk management command
Command OptionsCOMMAND OPTIONS:
command : possible values
...
issue a disk partitioning command
Command OptionsCOMMAND OPTIONS:
command : possible values
...
issue SnapReplicate command
Command OptionsCOMMAND OPTIONS:
command : possible values
...
issue ha command
Command OptionsCOMMAND OPTIONS:
command : possible values
...
creates new storage pool
Command OptionsCOMMAND OPTIONS:
disk devices : list of diskdevices separated by comma ":"
...
create cache disk devices for pool storage
Command OptionsCOMMAND OPTIONS:
disk devices : list of diskdevices separated by comma ":"
...
create log disk devices for pool storage
Command OptionsCOMMAND OPTIONS:
disk devices : list of diskdevices separated by comma ":"
...
add spare disk to storage pool
Command Options COMMAND OPTIONS:
disk devices : list of diskdevices separated by comma ":"
...
import deleted or foreign pools
Command OptionsCOMMAND OPTIONS:
pool name : the pool name
...
issue a EBS snapshots backup command
Command OptionsCOMMAND OPTIONS:
command : possible values
...
mark tiered storage device as enabled (but do not import it)
Command OptionsCOMMAND OPTIONS:
name : human-readable tier name (ex. tierA)
...
mark tiered storage device as disabled (but do not export it)
Command OptionsCOMMAND OPTIONS:
name : human-readable tier name (ex. tierA)
...
stop tiered storage device if it is not in use without marking as disabled (will auto-import on reboot or takeover)
Command OptionsCOMMAND OPTIONS:
name : human-readable tier name (ex. tierA)
...
activate an exported tier storage device
Command OptionsCOMMAND OPTIONS:
name : human-readable tier name (ex. tierA)
...
display current storage migration policy JSON document
Command OptionsCOMMAND OPTIONS:
name : human-readable tier name (ex. tierA)
...
apply new storage migration policy
Command OptionsCOMMAND OPTIONS:
name : human-readable tier name (ex. tierA)
...
expand tiered storage device when underlying volumes have grown
Command OptionsCOMMAND OPTIONS:
name : human-readable tier name (ex. tierA)
...
Display help text
Command OptionsCOMMAND OPTIONS:
command name : Optional. You can add softnas command name to get the only help of it
...