summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_gr_helper.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 /ospf6d/ospf6_gr_helper.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 'ospf6d/ospf6_gr_helper.c')
-rw-r--r--ospf6d/ospf6_gr_helper.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/ospf6d/ospf6_gr_helper.c b/ospf6d/ospf6_gr_helper.c
index 84ee35a3e..dff6849e9 100644
--- a/ospf6d/ospf6_gr_helper.c
+++ b/ospf6d/ospf6_gr_helper.c
@@ -961,13 +961,22 @@ static void show_ospf6_gr_helper_details(struct vty *vty, struct ospf6 *ospf6,
json, "supportedGracePeriod",
ospf6->ospf6_helper_cfg.supported_grace_time);
- if (ospf6->ospf6_helper_cfg.last_exit_reason
- != OSPF6_GR_HELPER_EXIT_NONE)
+#if CONFDATE > 20230131
+CPP_NOTICE("Remove JSON object commands with keys starting with capital")
+#endif
+ if (ospf6->ospf6_helper_cfg.last_exit_reason !=
+ OSPF6_GR_HELPER_EXIT_NONE) {
json_object_string_add(
json, "LastExitReason",
ospf6_exit_reason_desc
[ospf6->ospf6_helper_cfg
.last_exit_reason]);
+ json_object_string_add(
+ json, "lastExitReason",
+ ospf6_exit_reason_desc
+ [ospf6->ospf6_helper_cfg
+ .last_exit_reason]);
+ }
if (OSPF6_HELPER_ENABLE_RTR_COUNT(ospf6)) {
struct json_object *json_rid_array =
@@ -996,12 +1005,18 @@ static void show_ospf6_gr_helper_details(struct vty *vty, struct ospf6 *ospf6,
json_object_object_get_ex(
json, "Neighbors",
&json_neighbors);
+ json_object_object_get_ex(
+ json, "neighbors",
+ &json_neighbors);
if (!json_neighbors) {
json_neighbors =
json_object_new_object();
json_object_object_add(
json, "Neighbors",
json_neighbors);
+ json_object_object_add(
+ json, "neighbors",
+ json_neighbors);
}
}