netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roopa Prabhu <roopa@cumulusnetworks.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev <netdev@vger.kernel.org>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Julien Fortin <julien@cumulusnetworks.com>,
	David Ahern <dsahern@gmail.com>
Subject: Re: [PATCH v2 iproute2-next 2/5] bridge: colorize output and use JSON print library
Date: Tue, 28 Aug 2018 18:17:37 -0700	[thread overview]
Message-ID: <CAJieiUhE1p-RuoauB4cae=3gomDvVVZjw3xCe7EDT9W8s7d0Dw@mail.gmail.com> (raw)
In-Reply-To: <CAJieiUi3BZPmaEJP6AK14zUwo20ssTNMz6eUfjFS0ZExizK9ng@mail.gmail.com>

On Sat, Jul 14, 2018 at 6:41 PM, Roopa Prabhu <roopa@cumulusnetworks.com> wrote:
> On Tue, Feb 20, 2018 at 11:24 AM, Stephen Hemminger
> <stephen@networkplumber.org> wrote:
>> From: Stephen Hemminger <sthemmin@microsoft.com>
>>
>> Use new functions from json_print to simplify code.
>> Provide standard flag for colorizing output.
>>
>> The shortened -c flag is ambiguous it could mean color or
>> compressvlan; it is now changed to mean color for consistency
>> with other iproute2 commands.
>>
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
>> ---

[snip]

>
> Stephen, this seems to have broken both json and non-json output.
>
> Here is some output before and after the patch (same thing for tunnelshow):
>
> before:
> $bridge vlan show
> port    vlan ids
> hostbond4        1000
>          1001 PVID Egress Untagged
>          1002
>          1003
>          1004
>
> hostbond3        1000 PVID Egress Untagged
>          1001
>          1002
>          1003
>          1004
>
> bridge   1 PVID Egress Untagged
>          1000
>          1001
>          1002
>          1003
>          1004
>
> vxlan0   1 PVID Egress Untagged
>          1000
>          1001
>          1002
>          1003
>          1004
>
>
> $ bridge -j -c vlan show
> {
>     "hostbond4": [{
>             "vlan": 1000
>         },{
>             "vlan": 1001,
>             "flags": ["PVID","Egress Untagged"
>             ]
>         },{
>             "vlan": 1002,
>             "vlanEnd": 1004
>         }
>     ],
>     "hostbond3": [{
>             "vlan": 1000,
>             "flags": ["PVID","Egress Untagged"
>             ]
>         },{
>             "vlan": 1001,
>             "vlanEnd": 1004
>         }
>     ],
>     "bridge": [{
>             "vlan": 1,
>             "flags": ["PVID","Egress Untagged"
>             ]
>         },{
>             "vlan": 1000,
>             "vlanEnd": 1004
>         }
>     ],
>         "vxlan0": [{
>             "vlan": 1,
>             "flags": ["PVID","Egress Untagged"
>             ]
>         },{
>             "vlan": 1000,
>             "vlanEnd": 1004
>         }
>     ]
> }
>
>
> after:
> ====
>
> $bridge vlan show
> port    vlan ids
> hostbond4
>          1000    1001 PVID untagged      1002    1003    1004
> hostbond3
>          1000 PVID untagged      1001    1002    1003    1004
> bridge
>          1 PVID untagged         1000    1001    1002    1003    1004
> vxlan0
>          1 PVID untagged         1000    1001    1002    1003    1004
>
> $bridge -j -c vlan show
> ["hostbond4","vlan":[{"vlan":1000},{"vlan":1001,"pvid":null,"untagged":null},{"vlan":1002},{"vlan":1003},{"vlan":1004}],"hostbond3","vlan":[{"vlan":1000,"pvid":null,"untagged":null},{"vlan":1001},{"vlan":1002},{"vlan":1003},{"vlan":1004}],"bridge","vlan":[{"vlan":1,"pvid":null,"untagged":null},{"vlan":1000},{"vlan":1001},{"vlan":1002},{"vlan":1003},{"vlan":1004}],"vxlan0","vlan":[{"vlan":1,"pvid":null,"untagged":null},{"vlan":1000},{"vlan":1001},{"vlan":1002},{"vlan":1003},{"vlan":1004}]]


Stephen, ping again...

I was trying to fix it ...but its not trivial enough for the time I
have right now.
If this cannot be fixed soon, I request you to please revert the patch
as it has broken the json output completely.

Thanks.

  reply	other threads:[~2018-08-29  5:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-20 19:24 [PATCH v2 iproute2-next 0/5] bridge: json and color support Stephen Hemminger
2018-02-20 19:24 ` [PATCH v2 iproute2-next 1/5] bridge: implement json pretty print flag Stephen Hemminger
2018-02-20 19:24 ` [PATCH v2 iproute2-next 2/5] bridge: colorize output and use JSON print library Stephen Hemminger
2018-07-15  1:41   ` Roopa Prabhu
2018-08-29  1:17     ` Roopa Prabhu [this message]
2018-08-29 15:04     ` Stephen Hemminger
2018-02-20 19:24 ` [PATCH v2 iproute2-next 3/5] bridge: add json support for link command Stephen Hemminger
2018-02-20 19:24 ` [PATCH v2 iproute2-next 4/5] bridge: update man page for new color and json changes Stephen Hemminger
2018-02-20 19:24 ` [PATCH v2 iproute2-next 5/5] ip: always print interface name in color Stephen Hemminger
2018-02-21 16:48 ` [PATCH v2 iproute2-next 0/5] bridge: json and color support David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJieiUhE1p-RuoauB4cae=3gomDvVVZjw3xCe7EDT9W8s7d0Dw@mail.gmail.com' \
    --to=roopa@cumulusnetworks.com \
    --cc=dsahern@gmail.com \
    --cc=julien@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).