diff options
author | Wesley Coakley <wcoakley@cumulusnetworks.com> | 2020-05-26 22:44:46 +0200 |
---|---|---|
committer | Wesley Coakley <wcoakley@cumulusnetworks.com> | 2020-05-27 16:28:02 +0200 |
commit | 3e81618d0ce5140978462a63827bc28c76d47e4a (patch) | |
tree | 494bbcfbb584ebe779bcbae15e71565892854637 /lib/nexthop_group.c | |
parent | pbrd, doc: pbr map json `sequences` -> `policies` (diff) | |
download | frr-3e81618d0ce5140978462a63827bc28c76d47e4a.tar.xz frr-3e81618d0ce5140978462a63827bc28c76d47e4a.zip |
pbrd, lib, doc: fix new `show` json key semantics
Revise new `show pbr` keys to be consistent with existing
json in other daemons
target->nexthop
id->tableId (where relevant)
isValid->valid
isInstalled->installed
Signed-off-by: Wesley Coakley <wcoakley@cumulusnetworks.com>
Diffstat (limited to 'lib/nexthop_group.c')
-rw-r--r-- | lib/nexthop_group.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index ab04fb904..c62096a12 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -1003,25 +1003,25 @@ void nexthop_group_json_nexthop(json_object *j, struct nexthop *nh) switch (nh->type) { case NEXTHOP_TYPE_IFINDEX: - json_object_string_add(j, "target", + json_object_string_add(j, "nexthop", ifindex2ifname(nh->ifindex, nh->vrf_id)); break; case NEXTHOP_TYPE_IPV4: - json_object_string_add(j, "target", inet_ntoa(nh->gate.ipv4)); + json_object_string_add(j, "nexthop", inet_ntoa(nh->gate.ipv4)); break; case NEXTHOP_TYPE_IPV4_IFINDEX: - json_object_string_add(j, "target", inet_ntoa(nh->gate.ipv4)); + json_object_string_add(j, "nexthop", inet_ntoa(nh->gate.ipv4)); json_object_string_add(j, "vrfId", ifindex2ifname(nh->ifindex, nh->vrf_id)); break; case NEXTHOP_TYPE_IPV6: json_object_string_add( - j, "target", + j, "nexthop", inet_ntop(AF_INET6, &nh->gate.ipv6, buf, sizeof(buf))); break; case NEXTHOP_TYPE_IPV6_IFINDEX: json_object_string_add( - j, "target", + j, "nexthop", inet_ntop(AF_INET6, &nh->gate.ipv6, buf, sizeof(buf))); json_object_string_add(j, "vrfId", ifindex2ifname(nh->ifindex, nh->vrf_id)); |