summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2022-03-29 11:14:05 -0400
committerGitHub <noreply@github.com>2022-03-29 11:14:05 -0400
commit1f1d8f03de53ffafb880fb46b98ca7e35f1ed93e (patch)
tree1344ed89eddf7b6e61e37e49913821342a87c549
parent8084c3325bf51a919b07b29b9b87394ae464ac4c (diff)
parent1c18b0d672a4b8fbfefa7cc6b6d07db789eb5779 (diff)
Merge pull request #10837 from opensourcerouting/fix/consistent_JSON_keys_for_ospf_neighbor
ospfd: Use consistent JSON keys for `show ip ospf neighbor` and detai…
-rw-r--r--ospfd/ospf_vty.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index d4245bde7f..a753340476 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -4395,11 +4395,18 @@ static void show_ip_ospf_neighbor_sub(struct vty *vty,
json_neighbor = json_object_new_object();
ospf_nbr_ism_state_message(nbr, msgbuf, 16);
-
+#if CONFDATE > 20230321
+CPP_NOTICE("Remove show_ip_ospf_neighbor_sub() JSON keys: priority, state, deadTimeMsecs, address, retransmitCounter, requestCounter, dbSummaryCounter")
+#endif
json_object_int_add(json_neighbor, "priority",
nbr->priority);
json_object_string_add(json_neighbor, "state",
msgbuf);
+ json_object_int_add(json_neighbor,
+ "nbrPriority",
+ nbr->priority);
+ json_object_string_add(json_neighbor,
+ "nbrState", msgbuf);
json_object_string_add(
json_neighbor, "converged",
@@ -4425,6 +4432,10 @@ static void show_ip_ospf_neighbor_sub(struct vty *vty,
json_object_int_add(json_neighbor,
"deadTimeMsecs",
time_store);
+ json_object_int_add(
+ json_neighbor,
+ "routerDeadIntervalTimerDueMsec",
+ time_store);
json_object_string_add(
json_neighbor, "upTime",
ospf_timeval_dump(
@@ -4440,22 +4451,41 @@ static void show_ip_ospf_neighbor_sub(struct vty *vty,
json_object_string_add(json_neighbor,
"deadTimeMsecs",
"inactive");
+ json_object_string_add(
+ json_neighbor,
+ "routerDeadIntervalTimerDueMsec",
+ "inactive");
}
json_object_string_addf(json_neighbor,
"address", "%pI4",
&nbr->src);
+ json_object_string_addf(json_neighbor,
+ "ifaceAddress", "%pI4",
+ &nbr->src);
json_object_string_add(json_neighbor,
"ifaceName",
IF_NAME(oi));
json_object_int_add(
json_neighbor, "retransmitCounter",
ospf_ls_retransmit_count(nbr));
+ json_object_int_add(
+ json_neighbor,
+ "linkStateRetransmissionListCounter",
+ ospf_ls_retransmit_count(nbr));
json_object_int_add(json_neighbor,
"requestCounter",
ospf_ls_request_count(nbr));
+ json_object_int_add(
+ json_neighbor,
+ "linkStateRequestListCounter",
+ ospf_ls_request_count(nbr));
json_object_int_add(json_neighbor,
"dbSummaryCounter",
ospf_db_summary_count(nbr));
+ json_object_int_add(
+ json_neighbor,
+ "databaseSummaryListCounter",
+ ospf_db_summary_count(nbr));
json_object_array_add(json_neigh_array,
json_neighbor);