summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_labelpool.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2022-01-31 20:42:17 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2022-02-03 09:48:06 +0100
commit77a2f8e59297601a2382efc8da67009a2addc6ad (patch)
treef48969477dbe00c2ccb804732cb9a68628fb31ef /bgpd/bgp_labelpool.c
parenttools: Check against capital first in JSON keys (diff)
downloadfrr-77a2f8e59297601a2382efc8da67009a2addc6ad.tar.xz
frr-77a2f8e59297601a2382efc8da67009a2addc6ad.zip
*: Add camelCase JSON keys in addition to PascalCase
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_labelpool.c')
-rw-r--r--bgpd/bgp_labelpool.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bgpd/bgp_labelpool.c b/bgpd/bgp_labelpool.c
index 1bc7b6230..8772afd73 100644
--- a/bgpd/bgp_labelpool.c
+++ b/bgpd/bgp_labelpool.c
@@ -631,13 +631,23 @@ DEFUN(show_bgp_labelpool_summary, show_bgp_labelpool_summary_cmd,
if (uj) {
json = json_object_new_object();
+#if CONFDATE > 20230131
+CPP_NOTICE("Remove JSON object commands with keys starting with capital")
+#endif
json_object_int_add(json, "Ledger", skiplist_count(lp->ledger));
+ json_object_int_add(json, "ledger", skiplist_count(lp->ledger));
json_object_int_add(json, "InUse", skiplist_count(lp->inuse));
+ json_object_int_add(json, "inUse", skiplist_count(lp->inuse));
json_object_int_add(json, "Requests",
lp_fifo_count(&lp->requests));
+ json_object_int_add(json, "requests",
+ lp_fifo_count(&lp->requests));
json_object_int_add(json, "LabelChunks", listcount(lp->chunks));
+ json_object_int_add(json, "labelChunks", listcount(lp->chunks));
json_object_int_add(json, "Pending", lp->pending_count);
+ json_object_int_add(json, "pending", lp->pending_count);
json_object_int_add(json, "Reconnects", lp->reconnect_count);
+ json_object_int_add(json, "reconnects", lp->reconnect_count);
vty_json(vty, json);
} else {
vty_out(vty, "Labelpool Summary\n");