]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: remove deprecated json attrs for neighbor show
authorMark Stapp <mjs@labn.net>
Wed, 29 Mar 2023 16:24:19 +0000 (12:24 -0400)
committerMark Stapp <mjs@labn.net>
Fri, 7 Apr 2023 20:17:59 +0000 (16:17 -0400)
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>
ospfd/ospf_vty.c

index d3d67ee88446cd99fe8fb64ed2fe76fd9f63dbf8..46904ea2bf727c0e1e27c70eb4368d0caeebf8f5 100644 (file)
@@ -4414,15 +4414,10 @@ static void show_ip_ospf_neighbour_brief(struct vty *vty,
                json_neighbor = json_object_new_object();
 
                ospf_nbr_ism_state_message(nbr, msgbuf, sizeof(msgbuf));
-#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_string_add(json_neighbor, "nbrState", 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",
@@ -4439,8 +4434,6 @@ static void show_ip_ospf_neighbour_brief(struct vty *vty,
                                     1000LL;
                        json_object_int_add(json_neighbor, "upTimeInMsec",
                                            time_val);
-                       json_object_int_add(json_neighbor, "deadTimeMsecs",
-                                           time_store);
                        json_object_int_add(json_neighbor,
                                            "routerDeadIntervalTimerDueMsec",
                                            time_store);
@@ -4459,24 +4452,16 @@ static void show_ip_ospf_neighbour_brief(struct vty *vty,
                                               "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(nbr->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));