From: Julien Fortin <julien@cumulusnetworks.com>
To: David Ahern <dsahern@gmail.com>
Cc: netdev@vger.kernel.org, Roopa Prabhu <roopa@cumulusnetworks.com>
Subject: Re: [PATCH iproute2(-next) v2 1/1] ip: fix ip route show json output for multipath nexthops
Date: Tue, 1 Oct 2019 17:16:07 +0200 [thread overview]
Message-ID: <CAM_1_Kz_xHSODDa51=_GyPuTMoyXZDM-idpQc9-dmCsjJYj_7A@mail.gmail.com> (raw)
In-Reply-To: <ba5f6b14-1740-b9ba-c100-5272765fbef4@gmail.com>
Thanks David!
On Tue, Oct 1, 2019 at 5:14 PM David Ahern <dsahern@gmail.com> wrote:
>
> On 9/26/19 9:29 AM, Julien Fortin wrote:
> > From: Julien Fortin <julien@cumulusnetworks.com>
> >
> > print_rta_multipath doesn't support JSON output:
> >
> > {
> > "dst":"27.0.0.13",
> > "protocol":"bgp",
> > "metric":20,
> > "flags":[],
> > "gateway":"169.254.0.1"dev uplink-1 weight 1 ,
> > "flags":["onlink"],
> > "gateway":"169.254.0.1"dev uplink-2 weight 1 ,
> > "flags":["onlink"]
> > },
> >
> > since RTA_MULTIPATH has nested objects we should print them
> > in a json array.
> >
> > With the path we have the following output:
> >
> > {
> > "flags": [],
> > "dst": "36.0.0.13",
> > "protocol": "bgp",
> > "metric": 20,
> > "nexthops": [
> > {
> > "weight": 1,
> > "flags": [
> > "onlink"
> > ],
> > "gateway": "169.254.0.1",
> > "dev": "uplink-1"
> > },
> > {
> > "weight": 1,
> > "flags": [
> > "onlink"
> > ],
> > "gateway": "169.254.0.1",
> > "dev": "uplink-2"
> > }
> > ]
> > }
> >
> > Fixes: 663c3cb23103f4 ("iproute: implement JSON and color output")
> >
> > Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
> > ---
> > ip/iproute.c | 46 ++++++++++++++++++++++++++++------------------
> > 1 file changed, 28 insertions(+), 18 deletions(-)
> >
>
> applied to iproute2-next. Thanks
>
> Stephen: I see only 1 place (mdb) that prints devices with color, so
> that can be done across all of the commands by a follow up.
>
prev parent reply other threads:[~2019-10-01 15:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 15:29 [PATCH iproute2(-next) v2 1/1] ip: fix ip route show json output for multipath nexthops Julien Fortin
2019-09-26 16:07 ` Stephen Hemminger
2019-09-26 18:16 ` Julien Fortin
2019-10-01 15:14 ` David Ahern
2019-10-01 15:16 ` Julien Fortin [this message]
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='CAM_1_Kz_xHSODDa51=_GyPuTMoyXZDM-idpQc9-dmCsjJYj_7A@mail.gmail.com' \
--to=julien@cumulusnetworks.com \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.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).