Mode

Support for couple of different output modes is available both for the interactive shell and when the CLI is invoked directly. Some custom format options are available only for some operations.

The available modes are:

csv

Semicolon-separated values for some commands.

json

Processed JSON output for some commands.

pass

Pass the JSON response through.

raw

Raw output (display the HTTP request and response).

text

Human-readable output (default).

Example with switching to csv mode in the interactive shell:

StorPool> mode csv
OK
StorPool> net list
nodeId;flags;net 1;net 2
23;uU + AJ;22:60:00:00:F0:17;26:60:00:00:F0:17
24;uU + AJ;2A:60:00:00:00:18;2E:60:00:00:00:18
25;uU + AJ;F6:52:14:76:9C:C0;F6:52:14:76:9C:C1
26;uU + AJ;2A:60:00:00:00:1A;2E:60:00:00:00:1A
29;uU + AJ;52:6B:4B:44:02:FE;52:6B:4B:44:02:FF

The same applies when using the CLI directly:

# storpool -f csv net list # the output is the same as above
[snip]