summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2022-01-31 21:42:17 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2022-02-03 10:48:06 +0200
commit77a2f8e59297601a2382efc8da67009a2addc6ad (patch)
treef48969477dbe00c2ccb804732cb9a68628fb31ef /ospfd
parentbcd464bb34706e125424a694a06a2781e0ad409e (diff)
*: Add camelCase JSON keys in addition to PascalCase
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_ldp_sync.c7
-rw-r--r--ospfd/ospf_vty.c25
2 files changed, 30 insertions, 2 deletions
diff --git a/ospfd/ospf_ldp_sync.c b/ospfd/ospf_ldp_sync.c
index 247ceb0a08..df691bf4da 100644
--- a/ospfd/ospf_ldp_sync.c
+++ b/ospfd/ospf_ldp_sync.c
@@ -509,10 +509,17 @@ void ospf_ldp_sync_show_info(struct vty *vty, struct ospf *ospf,
if (CHECK_FLAG(ospf->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE)) {
if (use_json) {
+#if CONFDATE > 20230131
+CPP_NOTICE("Remove JSON object commands with keys starting with capital")
+#endif
json_object_boolean_true_add(json_vrf,
"MplsLdpIgpSyncEnabled");
+ json_object_boolean_true_add(json_vrf,
+ "mplsLdpIgpSyncEnabled");
json_object_int_add(json_vrf, "MplsLdpIgpSyncHolddown",
ospf->ldp_sync_cmd.holddown);
+ json_object_int_add(json_vrf, "mplsLdpIgpSyncHolddown",
+ ospf->ldp_sync_cmd.holddown);
} else {
vty_out(vty, " MPLS LDP-IGP Sync is enabled\n");
if (ospf->ldp_sync_cmd.holddown == 0)
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index ac87c0805f..97b581dae9 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -10205,10 +10205,17 @@ static int ospf_show_gr_helper_details(struct vty *vty, struct ospf *ospf,
json_object_int_add(json_vrf, "supportedGracePeriod",
ospf->supported_grace_time);
- if (ospf->last_exit_reason != OSPF_GR_HELPER_EXIT_NONE)
+#if CONFDATE > 20230131
+CPP_NOTICE("Remove JSON object commands with keys starting with capital")
+#endif
+ if (ospf->last_exit_reason != OSPF_GR_HELPER_EXIT_NONE) {
json_object_string_add(
json_vrf, "LastExitReason",
ospf_exit_reason2str(ospf->last_exit_reason));
+ json_object_string_add(
+ json_vrf, "lastExitReason",
+ ospf_exit_reason2str(ospf->last_exit_reason));
+ }
if (ospf->active_restarter_cnt)
json_object_int_add(json_vrf, "activeRestarterCnt",
@@ -10231,12 +10238,17 @@ static int ospf_show_gr_helper_details(struct vty *vty, struct ospf *ospf,
if (uj) {
json_object_object_get_ex(json_vrf, "Neighbors",
&json_neighbors);
+ json_object_object_get_ex(json_vrf, "neighbors",
+ &json_neighbors);
if (!json_neighbors) {
json_neighbors =
json_object_new_object();
json_object_object_add(json_vrf,
"Neighbors",
json_neighbors);
+ json_object_object_add(json_vrf,
+ "neighbors",
+ json_neighbors);
}
}
@@ -10735,9 +10747,12 @@ static void show_ip_ospf_route_router(struct vty *vty, struct ospf *ospf,
json_object_string_addf(json_route, "area",
"%pI4",
&or->u.std.area_id);
- if (or->path_type == OSPF_PATH_INTER_AREA)
+ if (or->path_type == OSPF_PATH_INTER_AREA) {
json_object_boolean_true_add(json_route,
"IA");
+ json_object_boolean_true_add(json_route,
+ "ia");
+ }
if (or->u.std.flags & ROUTER_LSA_BORDER)
json_object_string_add(json_route,
"routerType",
@@ -11490,10 +11505,16 @@ static int ospf_show_summary_address(struct vty *vty, struct ospf *ospf,
? "E1"
: "E2");
+#if CONFDATE > 20230131
+CPP_NOTICE("Remove JSON object commands with keys starting with capital")
+#endif
json_object_int_add(json_aggr, "Metric", mval);
+ json_object_int_add(json_aggr, "metric", mval);
json_object_int_add(json_aggr, "Tag",
aggr->tag);
+ json_object_int_add(json_aggr, "tag",
+ aggr->tag);
json_object_int_add(
json_aggr, "External route count",