summaryrefslogtreecommitdiffstats
path: root/pbrd/pbr_nht.c
diff options
context:
space:
mode:
authorWesley Coakley <wcoakley@cumulusnetworks.com>2020-05-21 21:18:34 +0200
committerWesley Coakley <wcoakley@cumulusnetworks.com>2020-05-27 16:28:02 +0200
commit81c0078ef4d0bb6471447e6eecd28663e0620cb3 (patch)
tree90f6166e7ffb1a15a542e35eb050d82b64a819df /pbrd/pbr_nht.c
parentpbrd, lib: opt. json for `show pbr nexthop-group` (diff)
downloadfrr-81c0078ef4d0bb6471447e6eecd28663e0620cb3.tar.xz
frr-81c0078ef4d0bb6471447e6eecd28663e0620cb3.zip
pbrd, lib: verbosity++ for json `show` directives
Increased the verbosity of the json keys and flattened the returned structure by removing superfluous keys. Signed-off-by: Wesley Coakley <wcoakley@cumulusnetworks.com>
Diffstat (limited to 'pbrd/pbr_nht.c')
-rw-r--r--pbrd/pbr_nht.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c
index ae7a8017c..30135dd9a 100644
--- a/pbrd/pbr_nht.c
+++ b/pbrd/pbr_nht.c
@@ -1037,8 +1037,8 @@ static void pbr_nht_json_nhg_nexthops(struct hash_bucket *b, void *data)
json_object *this_hop;
this_hop = json_object_new_object();
- json_object_boolean_add(this_hop, "valid", pnhc->valid);
nexthop_group_json_nexthop(this_hop, pnhc->nexthop);
+ json_object_boolean_add(this_hop, "isValid", pnhc->valid);
json_object_array_add(all_hops, this_hop);
}
@@ -1080,10 +1080,10 @@ static void pbr_nht_json_nhg(struct hash_bucket *b, void *data)
if (!j || !this_group)
return;
- json_object_string_add(this_group, "name", pnhgc->name);
json_object_int_add(this_group, "id", pnhgc->table_id);
- json_object_boolean_add(this_group, "valid", pnhgc->valid);
- json_object_boolean_add(this_group, "installed", pnhgc->installed);
+ json_object_string_add(this_group, "name", pnhgc->name);
+ json_object_boolean_add(this_group, "isValid", pnhgc->valid);
+ json_object_boolean_add(this_group, "isInstalled", pnhgc->installed);
group_hops = json_object_new_array();