[dm-devel] [PATCH v5 0/1] add option to output JSON for multipathd command

2016-05-24 Thread Todd Gill
;host_wwnn" : "0x50014380120d8425", "target_wwnn" : "0x500a098080ba5a64", "host_wwpn" : "0x50014380120d8424", "target_wwpn" : "0x500a098180ba5a64", "host_adapter" : &q

[dm-devel] [PATCH v5 1/1] add display of map information in JSON format

2016-05-24 Thread Todd Gill
x the size of the "show maps topology" text. Multiplying by the map count helps decrease the number of realloc calls. Signed-off-by: Todd Gill <tg...@redhat.com> Signed-off-by: Gris Ge <f...@redhat.com> --- libmultipath/print.c | 222

[dm-devel] [PATCH v4 1/1] add display of map information in JSON format

2016-05-18 Thread Todd Gill
the "show maps topology" text. v3: Added format specifiers at the map level to split out vend/prod/rev. A user can now specify the following with: multipathd show map(s) format %v - vend %p - prod %e - rev v4: removed space in major_version and minor_version keys. Signed-o

[dm-devel] [PATCH v4 0/1] add option to output JSON for multipathd command

2016-05-18 Thread Todd Gill
x5000c50088682019", "host WWPN" : "[undef]", "target WWPN" : "[undef]", "host adapter" : ":00:07.0" }] },{ "selector" : "service-time 0",

[dm-devel] [PATCH v3 1/1] add display of map information in JSON format

2016-05-13 Thread Todd Gill
the "show maps topology" text. v3: Added format specifiers at the map level to split out vend/prod/rev. A user can now specify the following with: multipathd show map(s) format %v - vend %p - prod %e - rev Signed-off-by: Todd Gill <tg...@redhat.com> --- libmu

[dm-devel] [PATCH v2 1/1] add display of map information in JSON format

2016-05-10 Thread Todd Gill
the "show maps topology" text. Signed-off-by: Todd Gill <tg...@redhat.com> --- libmultipath/print.c | 163 ++ libmultipath/print.h | 63 ++ multipathd/cli.c | 3 + multipathd/cli.h | 2 +

Re: [dm-devel] [PATCH 0/1] add option to output JSON for multipathd command

2016-05-06 Thread Todd Gill
On 05/04/2016 09:17 PM, Bart Van Assche wrote: > On 05/04/16 13:23, Todd Gill wrote: >> I had earlier sent an email to dm-devel proposing we add a feature >> in multipathd to output multipath map topology in JSON format. This >> patch contains to the code for that feature. &

Re: [dm-devel] [PATCH 0/1] add option to output JSON for multipathd command

2016-05-04 Thread Todd Gill
On 05/04/2016 07:22 PM, Alasdair G Kergon wrote: > On Wed, May 04, 2016 at 04:23:47PM -0400, Todd Gill wrote: >> I had earlier sent an email to dm-devel proposing we add a feature >> in multipathd to output multipath map topology in JSON format. This >> patch contains to the

[dm-devel] [PATCH 1/1] add display of map information in JSON format

2016-05-04 Thread Todd Gill
topology" text. Signed-off-by: Todd Gill <tg...@redhat.com> --- libmultipath/print.c | 122 ++ libmultipath/print.h | 50 +++ multipathd/cli.c | 3 ++ multipathd/cli.h | 2 + multi

[dm-devel] [PATCH 0/1] add option to output JSON for multipathd command

2016-05-04 Thread Todd Gill
/manage multipath. I thought it was best to take advantage of some of the existing snprintf_xxx functions rather than adding a library dependency to multipathd. Will add code for groups next if this is accepted. Thanks, Todd Todd Gill (1): add display of map information in JSON format

[dm-devel] [PATCH 1/3] add %g format specifier to 'multipathd show paths format' command

2016-02-01 Thread Todd Gill
The %g specifier will print the group number of the path when used with multipathd show paths format. Signed-off-by: Todd Gill <tg...@redhat.com> --- libmultipath/print.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libmultipath/print.c b/libmultipath/print.c index 6215d0b..3

Re: [dm-devel] [PATCH] Introducing multipath C API

2016-02-01 Thread Todd Gill
On 01/28/2016 04:15 AM, Hannes Reinecke wrote: > > I would very much advocate to use the IPC interface into multipathd; > we can easily define a stable ABI for that. Do you have a preference for the format of the API? Are you thinking JSON, JSON-RPC, YAML, XML, XML-RPC? The user of the API