From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roopa Prabhu 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 Message-ID: References: <20180220192408.19763-1-stephen@networkplumber.org> <20180220192408.19763-3-stephen@networkplumber.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: netdev , Stephen Hemminger , Julien Fortin , David Ahern To: Stephen Hemminger Return-path: Received: from mail-ed1-f65.google.com ([209.85.208.65]:35791 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725723AbeH2FL6 (ORCPT ); Wed, 29 Aug 2018 01:11:58 -0400 Received: by mail-ed1-f65.google.com with SMTP id y20-v6so2712925edq.2 for ; Tue, 28 Aug 2018 18:17:38 -0700 (PDT) In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Sat, Jul 14, 2018 at 6:41 PM, Roopa Prabhu w= rote: > On Tue, Feb 20, 2018 at 11:24 AM, Stephen Hemminger > wrote: >> From: Stephen Hemminger >> >> 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 >> --- [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: > =3D=3D=3D=3D > > $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":nu= ll},{"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},{"v= lan":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.