From: Keith Busch Date: Mon, 10 Oct 2016 20:29:07 +0000 (-0600) Subject: Add json format to list command X-Git-Tag: v1.0~22 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8effd356d4897bceb06e6ae4501ac10ae5a51fa2;p=users%2Fsagi%2Fnvme-cli.git Add json format to list command Updating man page with new options. Signed-off-by: Keith Busch --- diff --git a/Documentation/nvme-connect.1 b/Documentation/nvme-connect.1 index 35a8f422..c819a4ec 100644 --- a/Documentation/nvme-connect.1 +++ b/Documentation/nvme-connect.1 @@ -2,12 +2,12 @@ .\" Title: nvme-connect .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 09/30/2016 +.\" Date: 10/10/2016 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-CONNECT" "1" "09/30/2016" "NVMe" "NVMe Manual" +.TH "NVME\-CONNECT" "1" "10/10/2016" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/Documentation/nvme-discover.1 b/Documentation/nvme-discover.1 index 566816e3..0eacb03e 100644 --- a/Documentation/nvme-discover.1 +++ b/Documentation/nvme-discover.1 @@ -2,12 +2,12 @@ .\" Title: nvme-discover .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 09/30/2016 +.\" Date: 10/10/2016 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-DISCOVER" "1" "09/30/2016" "NVMe" "NVMe Manual" +.TH "NVME\-DISCOVER" "1" "10/10/2016" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -147,8 +147,13 @@ command using a /etc/nvme/discovery\&.conf file: .RS 4 .\} .nf -# Machine default\&. Note currently only works for single command: -\-t rdma \-a 192\&.168\&.1\&.4 \-s 4420 \-q nqn\&.2014\-08\&.com\&.example:nvme:nvm\-subsystem\-sn\-d78432 +# Machine default \*(Aqnvme discover\*(Aq commands\&. Query the +# Discovery Controller\*(Aqs two ports (some resources may only +# be accessible on a single port)\&. Note an official +# nqn (Host) name defined in the NVMe specification is being used +# in this example\&. +\-t rdma \-a 192\&.168\&.69\&.33 \-s 4420 \-q nqn\&.2014\-08\&.com\&.example:nvme:nvm\-subsystem\-sn\-d78432 +\-t rdma \-a 192\&.168\&.1\&.4 \-s 4420 \-q nqn\&.2014\-08\&.com\&.example:nvme:nvm\-subsystem\-sn\-d78432 At the prompt type "nvme discover"\&. .fi diff --git a/Documentation/nvme-discover.html b/Documentation/nvme-discover.html index 3ff786db..9b63c3ca 100644 --- a/Documentation/nvme-discover.html +++ b/Documentation/nvme-discover.html @@ -912,8 +912,13 @@ Issue a nvme discover command using a /etc/nvme/discovery.conf file:
-
# Machine default. Note currently only works for single command:
--t rdma -a 192.168.1.4 -s 4420 -q nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432
+
# Machine default 'nvme discover' commands.  Query the
+# Discovery Controller's two ports (some resources may only
+# be accessible on a single port).  Note an official
+# nqn (Host) name defined in the NVMe specification is being used
+# in this example.
+-t rdma -a 192.168.69.33 -s 4420 -q nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432
+-t rdma -a 192.168.1.4   -s 4420 -q nqn.2014-08.com.example:nvme:nvm-subsystem-sn-d78432
 
 At the prompt type "nvme discover".
@@ -950,7 +955,7 @@ before merging to https://githu

diff --git a/Documentation/nvme-list.1 b/Documentation/nvme-list.1 index c9ee0bfc..ef1f8d81 100644 --- a/Documentation/nvme-list.1 +++ b/Documentation/nvme-list.1 @@ -1,13 +1,13 @@ '\" t .\" Title: nvme-list .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] -.\" Generator: DocBook XSL Stylesheets v1.78.1 -.\" Date: 09/29/2016 +.\" Generator: DocBook XSL Stylesheets v1.76.1 +.\" Date: 10/10/2016 .\" Manual: NVMe Manual .\" Source: NVMe .\" Language: English .\" -.TH "NVME\-LIST" "1" "09/29/2016" "NVMe" "NVMe Manual" +.TH "NVME\-LIST" "1" "10/10/2016" "NVMe" "NVMe Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -32,14 +32,20 @@ nvme-list \- List all recognized NVMe devices .SH "SYNOPSIS" .sp .nf -\fInvme list\fR +\fInvme list\fR [\-o | \-\-output\-format=] .fi .SH "DESCRIPTION" .sp Scan the sysfs tree for NVM Express devices and return the /dev node for those devices as well as some pertinent information about them\&. .SH "OPTIONS" -.sp -No options yet\&. +.PP +\-o , \-\-output\-format= +.RS 4 +Set the reporting format to +\fInormal\fR +or +\fIjson\fR\&. Only one output format can be used at a time\&. +.RE .SH "EXAMPLES" .sp No examples yet\&. diff --git a/Documentation/nvme-list.html b/Documentation/nvme-list.html index cdc4170d..7487fc47 100644 --- a/Documentation/nvme-list.html +++ b/Documentation/nvme-list.html @@ -752,7 +752,7 @@ nvme-list(1) Manual Page

SYNOPSIS

-
nvme list
+
nvme list [-o <fmt> | --output-format=<fmt>]
@@ -767,7 +767,20 @@ for those devices as well as some pertinent information about them.

OPTIONS

-

No options yet.

+
+
+-o <format> +
+
+--output-format=<format> +
+
+

+ Set the reporting format to normal or json. Only one output + format can be used at a time. +

+
+
@@ -786,7 +799,7 @@ for those devices as well as some pertinent information about them.


diff --git a/Documentation/nvme-list.txt b/Documentation/nvme-list.txt index ae69f8a4..a0326f5e 100644 --- a/Documentation/nvme-list.txt +++ b/Documentation/nvme-list.txt @@ -8,7 +8,7 @@ nvme-list - List all recognized NVMe devices SYNOPSIS -------- [verse] -'nvme list' +'nvme list' [-o | --output-format=] DESCRIPTION ----------- @@ -17,7 +17,10 @@ for those devices as well as some pertinent information about them. OPTIONS ------- -No options yet. +-o :: +--output-format=:: + Set the reporting format to 'normal' or 'json'. Only one output + format can be used at a time. EXAMPLES --------