On Sat, Jul 14, 2018 at 6:41 PM, Roopa Prabhu <ro...@cumulusnetworks.com> wrote: > On Tue, Feb 20, 2018 at 11:24 AM, Stephen Hemminger > <step...@networkplumber.org> wrote: >> From: Stephen Hemminger <sthem...@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 <step...@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.