ospfd: remove deprecated json attrs for neighbor show

The date for removing some deprecated json attributes from
'show neighbor' has arrived, so remove the attrs (and the
CPP_NOTICE block).

Signed-off-by: Mark Stapp <mjs@labn.net>
This commit is contained in:
Mark Stapp 2023-03-29 12:24:19 -04:00
parent d5243675f2
commit f5419bf927

View File

@ -4414,15 +4414,10 @@ static void show_ip_ospf_neighbour_brief(struct vty *vty,
json_neighbor = json_object_new_object(); json_neighbor = json_object_new_object();
ospf_nbr_ism_state_message(nbr, msgbuf, sizeof(msgbuf)); ospf_nbr_ism_state_message(nbr, msgbuf, sizeof(msgbuf));
#if CONFDATE > 20230321 json_object_string_add(json_neighbor, "nbrState", msgbuf);
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", json_object_int_add(json_neighbor, "nbrPriority",
nbr->priority); nbr->priority);
json_object_string_add(json_neighbor, "nbrState", msgbuf);
json_object_string_add( json_object_string_add(
json_neighbor, "converged", json_neighbor, "converged",
@ -4439,8 +4434,6 @@ static void show_ip_ospf_neighbour_brief(struct vty *vty,
1000LL; 1000LL;
json_object_int_add(json_neighbor, "upTimeInMsec", json_object_int_add(json_neighbor, "upTimeInMsec",
time_val); time_val);
json_object_int_add(json_neighbor, "deadTimeMsecs",
time_store);
json_object_int_add(json_neighbor, json_object_int_add(json_neighbor,
"routerDeadIntervalTimerDueMsec", "routerDeadIntervalTimerDueMsec",
time_store); time_store);
@ -4459,24 +4452,16 @@ static void show_ip_ospf_neighbour_brief(struct vty *vty,
"routerDeadIntervalTimerDueMsec", "routerDeadIntervalTimerDueMsec",
"inactive"); "inactive");
} }
json_object_string_addf(json_neighbor, "address", "%pI4",
&nbr->src);
json_object_string_addf(json_neighbor, "ifaceAddress", "%pI4", json_object_string_addf(json_neighbor, "ifaceAddress", "%pI4",
&nbr->src); &nbr->src);
json_object_string_add(json_neighbor, "ifaceName", json_object_string_add(json_neighbor, "ifaceName",
IF_NAME(nbr->oi)); IF_NAME(nbr->oi));
json_object_int_add(json_neighbor, "retransmitCounter",
ospf_ls_retransmit_count(nbr));
json_object_int_add(json_neighbor, json_object_int_add(json_neighbor,
"linkStateRetransmissionListCounter", "linkStateRetransmissionListCounter",
ospf_ls_retransmit_count(nbr)); ospf_ls_retransmit_count(nbr));
json_object_int_add(json_neighbor, "requestCounter",
ospf_ls_request_count(nbr));
json_object_int_add(json_neighbor, json_object_int_add(json_neighbor,
"linkStateRequestListCounter", "linkStateRequestListCounter",
ospf_ls_request_count(nbr)); ospf_ls_request_count(nbr));
json_object_int_add(json_neighbor, "dbSummaryCounter",
ospf_db_summary_count(nbr));
json_object_int_add(json_neighbor, "databaseSummaryListCounter", json_object_int_add(json_neighbor, "databaseSummaryListCounter",
ospf_db_summary_count(nbr)); ospf_db_summary_count(nbr));