diff options
author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-01-31 14:17:03 +0100 |
---|---|---|
committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-02-03 09:48:06 +0100 |
commit | 08d79bce3df0028f3db56010a49b57ca908c1f25 (patch) | |
tree | 7d6d9288503efcf654a73bc70af4fbe425972ef5 /ospf6d/ospf6_top.c | |
parent | tools: Catch JSON keys with whitespaces (diff) | |
download | frr-08d79bce3df0028f3db56010a49b57ca908c1f25.tar.xz frr-08d79bce3df0028f3db56010a49b57ca908c1f25.zip |
ospfd,ospf6d: Add JSON additional keys with no whitespaces inside
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'ospf6d/ospf6_top.c')
-rw-r--r-- | ospf6d/ospf6_top.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 57a55a6ef..6c707e355 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -1999,6 +1999,9 @@ ospf6_show_vrf_name(struct vty *vty, struct ospf6 *ospf6, } } +#if CONFDATE > 20230131 +CPP_NOTICE("Remove JSON object commands with keys containing whitespaces") +#endif static int ospf6_show_summary_address(struct vty *vty, struct ospf6 *ospf6, json_object *json, @@ -2019,7 +2022,9 @@ ospf6_show_summary_address(struct vty *vty, struct ospf6 *ospf6, ospf6_show_vrf_name(vty, ospf6, json_vrf); json_object_int_add(json_vrf, "aggregation delay interval", - ospf6->aggr_delay_interval); + ospf6->aggr_delay_interval); + json_object_int_add(json_vrf, "aggregationDelayInterval", + ospf6->aggr_delay_interval); } @@ -2044,12 +2049,18 @@ ospf6_show_summary_address(struct vty *vty, struct ospf6 *ospf6, json_object_string_add(json_aggr, "Summary address", buf); + json_object_string_add(json_aggr, "summaryAddress", + buf); json_object_string_add( json_aggr, "Metric-type", (aggr->mtype == DEFAULT_METRIC_TYPE) ? "E2" : "E1"); + json_object_string_add( + json_aggr, "metricType", + (aggr->mtype == DEFAULT_METRIC_TYPE) ? "E2" + : "E1"); json_object_int_add(json_aggr, "Metric", (aggr->metric != -1) @@ -2062,6 +2073,8 @@ ospf6_show_summary_address(struct vty *vty, struct ospf6 *ospf6, json_object_int_add(json_aggr, "External route count", OSPF6_EXTERNAL_RT_COUNT(aggr)); + json_object_int_add(json_aggr, "externalRouteCount", + OSPF6_EXTERNAL_RT_COUNT(aggr)); if (OSPF6_EXTERNAL_RT_COUNT(aggr) && detail) { json_object_int_add(json_aggr, "ID", |