Commit 5bfa77e9b8 for frr
commit 5bfa77e9b823f6930bd9f0e355ed2b64915836cf
Author: Christian Hopps <chopps@labn.net>
Date: Mon Jun 8 10:45:33 2026 +0000
lib, et al: use 3 new common help strings
Signed-off-by: Christian Hopps <chopps@labn.net>
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 7b74da4ab7..c4277d0e38 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -19546,7 +19546,7 @@ DEFUN (bgp_distance_source,
bgp_distance_source_cmd,
"distance (1-255) A.B.C.D/M",
"Define an administrative distance\n"
- "Administrative distance\n"
+ DISTANCE_STR
"IP source prefix\n")
{
int idx_number = 1;
@@ -19561,7 +19561,7 @@ DEFUN (no_bgp_distance_source,
"no distance (1-255) A.B.C.D/M",
NO_STR
"Define an administrative distance\n"
- "Administrative distance\n"
+ DISTANCE_STR
"IP source prefix\n")
{
int idx_number = 2;
@@ -19575,7 +19575,7 @@ DEFUN (bgp_distance_source_access_list,
bgp_distance_source_access_list_cmd,
"distance (1-255) A.B.C.D/M WORD",
"Define an administrative distance\n"
- "Administrative distance\n"
+ DISTANCE_STR
"IP source prefix\n"
"Access list name\n")
{
@@ -19592,7 +19592,7 @@ DEFUN (no_bgp_distance_source_access_list,
"no distance (1-255) A.B.C.D/M WORD",
NO_STR
"Define an administrative distance\n"
- "Administrative distance\n"
+ DISTANCE_STR
"IP source prefix\n"
"Access list name\n")
{
@@ -19608,7 +19608,7 @@ DEFUN (ipv6_bgp_distance_source,
ipv6_bgp_distance_source_cmd,
"distance (1-255) X:X::X:X/M",
"Define an administrative distance\n"
- "Administrative distance\n"
+ DISTANCE_STR
"IP source prefix\n")
{
bgp_distance_set(vty, argv[1]->arg, argv[2]->arg, NULL);
@@ -19620,7 +19620,7 @@ DEFUN (no_ipv6_bgp_distance_source,
"no distance (1-255) X:X::X:X/M",
NO_STR
"Define an administrative distance\n"
- "Administrative distance\n"
+ DISTANCE_STR
"IP source prefix\n")
{
bgp_distance_unset(vty, argv[2]->arg, argv[3]->arg, NULL);
@@ -19631,7 +19631,7 @@ DEFUN (ipv6_bgp_distance_source_access_list,
ipv6_bgp_distance_source_access_list_cmd,
"distance (1-255) X:X::X:X/M WORD",
"Define an administrative distance\n"
- "Administrative distance\n"
+ DISTANCE_STR
"IP source prefix\n"
"Access list name\n")
{
@@ -19644,7 +19644,7 @@ DEFUN (no_ipv6_bgp_distance_source_access_list,
"no distance (1-255) X:X::X:X/M WORD",
NO_STR
"Define an administrative distance\n"
- "Administrative distance\n"
+ DISTANCE_STR
"IP source prefix\n"
"Access list name\n")
{
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 9544032312..c31733be2a 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -3266,7 +3266,7 @@ DEFPY_YANG(isis_ti_lfa, isis_ti_lfa_cmd,
* XPath: /frr-isisd:isis/instance/log-adjacency-changes
*/
DEFPY_YANG(log_adj_changes, log_adj_changes_cmd, "[no] log-adjacency-changes",
- NO_STR "Log changes in adjacency state\n")
+ NO_STR LOG_ADJ_CHANGES_STR)
{
nb_cli_enqueue_change(vty, "./log-adjacency-changes", NB_OP_MODIFY, no ? "false" : "true");
diff --git a/isisd/isisd.c b/isisd/isisd.c
index 4d202acc24..826e6ce99b 100644
--- a/isisd/isisd.c
+++ b/isisd/isisd.c
@@ -3499,7 +3499,7 @@ void isis_area_lsp_refresh_set(struct isis_area *area, int level,
DEFUN (log_adj_changes,
log_adj_changes_cmd,
"log-adjacency-changes",
- "Log changes in adjacency state\n")
+ LOG_ADJ_CHANGES_STR)
{
VTY_DECLVAR_CONTEXT(isis_area, area);
diff --git a/lib/log_cli.c b/lib/log_cli.c
index b60a550c3d..44694d0584 100644
--- a/lib/log_cli.c
+++ b/lib/log_cli.c
@@ -24,7 +24,7 @@ DEFPY_YANG (config_log_stdout,
config_log_stdout_cmd,
"[no] log stdout [<emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>$levelarg]",
NO_STR
- "Logging control\n"
+ LOG_STR
"Set stdout logging level\n"
LOG_LEVEL_DESC)
{
@@ -46,7 +46,7 @@ DEFPY_HIDDEN (config_log_monitor,
config_log_monitor_cmd,
"[no] log monitor [<emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>]",
NO_STR
- "Logging control\n"
+ LOG_STR
"Set terminal line (monitor) logging level\n"
LOG_LEVEL_DESC)
{
@@ -75,7 +75,7 @@ DEFPY_YANG_NOSH (debug_uid_backtrace,
DEFUN_YANG (config_log_dmn_file,
config_log_dmn_file_cmd,
"log daemon " DAEMONS_LIST " file FILENAME [<emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>$levelarg]",
- "Logging control\n"
+ LOG_STR
"Specific daemon\n"
DAEMONS_STR
"Logging to file\n"
@@ -101,7 +101,7 @@ DEFUN_YANG (no_config_log_dmn_file,
no_config_log_dmn_file_cmd,
"no log daemon " DAEMONS_LIST " file [FILENAME [LEVEL]]",
NO_STR
- "Logging control\n"
+ LOG_STR
"Specific daemon\n"
DAEMONS_STR
"Cancel logging to file\n"
@@ -120,7 +120,7 @@ DEFPY_YANG (config_log_file,
config_log_file_cmd,
"[no] log file ![FILENAME [<emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>$levelarg]]",
NO_STR
- "Logging control\n"
+ LOG_STR
"Logging to file\n"
"Logging filename\n"
LOG_LEVEL_DESC)
@@ -143,7 +143,7 @@ DEFPY_YANG (config_log_file,
DEFPY_YANG (config_log_syslog,
config_log_syslog_cmd,
"log syslog [<emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>$levelarg]",
- "Logging control\n"
+ LOG_STR
"Set syslog logging level\n"
LOG_LEVEL_DESC)
{
@@ -161,7 +161,7 @@ DEFPY_YANG (no_config_log_syslog,
no_config_log_syslog_cmd,
"no log syslog [<emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>]",
NO_STR
- "Logging control\n"
+ LOG_STR
"Cancel logging to syslog\n"
LOG_LEVEL_DESC)
{
@@ -172,7 +172,7 @@ DEFPY_YANG (no_config_log_syslog,
DEFPY_YANG (config_log_facility,
config_log_facility_cmd,
"log facility <kern|user|mail|daemon|auth|syslog|lpr|news|uucp|cron|local0|local1|local2|local3|local4|local5|local6|local7>$facilityarg",
- "Logging control\n"
+ LOG_STR
"Facility parameter for syslog messages\n"
LOG_FACILITY_DESC)
{
@@ -187,7 +187,7 @@ DEFPY_YANG (no_config_log_facility,
no_config_log_facility_cmd,
"no log facility [<kern|user|mail|daemon|auth|syslog|lpr|news|uucp|cron|local0|local1|local2|local3|local4|local5|local6|local7>] [<emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>]",
NO_STR
- "Logging control\n"
+ LOG_STR
"Reset syslog facility to default (daemon)\n"
LOG_FACILITY_DESC
LOG_LEVEL_DESC)
@@ -200,7 +200,7 @@ DEFPY_YANG (config_log_record_priority,
config_log_record_priority_cmd,
"[no] log record-priority",
NO_STR
- "Logging control\n"
+ LOG_STR
"Log the priority of the message within the message\n")
{
nb_cli_enqueue_change(vty, "/frr-logging:logging/record-priority", NB_OP_MODIFY,
@@ -212,7 +212,7 @@ DEFPY_YANG (config_log_record_severity,
config_log_record_severity_cmd,
"[no] log record-severity",
NO_STR
- "Logging control\n"
+ LOG_STR
"Log the severity of the message within the message\n")
{
nb_cli_enqueue_change(vty, "/frr-logging:logging/record-severity", NB_OP_MODIFY,
@@ -223,7 +223,7 @@ DEFPY_YANG (config_log_record_severity,
DEFPY_YANG (config_log_timestamp_precision,
config_log_timestamp_precision_cmd,
"log timestamp precision (0-6)",
- "Logging control\n"
+ LOG_STR
"Timestamp configuration\n"
"Set the timestamp precision\n"
"Number of subsecond digits\n")
@@ -239,7 +239,7 @@ DEFPY_YANG (no_config_log_timestamp_precision,
no_config_log_timestamp_precision_cmd,
"no log timestamp precision [(0-6)]",
NO_STR
- "Logging control\n"
+ LOG_STR
"Timestamp configuration\n"
"Reset the timestamp precision to the default value of 0\n"
"Number of subsecond digits\n")
@@ -252,7 +252,7 @@ DEFPY_YANG (config_log_ec,
config_log_ec_cmd,
"[no] log error-category",
NO_STR
- "Logging control\n"
+ LOG_STR
"Prefix log message text with [EC 9999] code\n")
{
nb_cli_enqueue_change(vty, "/frr-logging:logging/error-category", NB_OP_MODIFY,
@@ -264,7 +264,7 @@ DEFPY_YANG (config_log_xid,
config_log_xid_cmd,
"[no] log unique-id",
NO_STR
- "Logging control\n"
+ LOG_STR
"Prefix log message text with [XXXXX-XXXXX] identifier\n")
{
nb_cli_enqueue_change(vty, "/frr-logging:logging/unique-id", NB_OP_MODIFY,
@@ -275,7 +275,7 @@ DEFPY_YANG (config_log_xid,
DEFPY_YANG (config_log_filterfile,
config_log_filterfile_cmd,
"log filtered-file FILENAME [<emergencies|alerts|critical|errors|warnings|notifications|informational|debugging>$levelarg]",
- "Logging control\n"
+ LOG_STR
"Logging to file with string filter\n"
"Logging filename\n"
LOG_LEVEL_DESC)
@@ -296,7 +296,7 @@ DEFPY_YANG (no_config_log_filterfile,
no_config_log_filterfile_cmd,
"no log filtered-file [FILENAME [LEVEL]]",
NO_STR
- "Logging control\n"
+ LOG_STR
"Cancel logging to file with string filter\n"
"Logging file name\n"
"Logging level\n")
@@ -309,7 +309,7 @@ DEFPY_YANG (log_filter,
log_filter_cmd,
"[no] log filter-text WORD$filter",
NO_STR
- "Logging control\n"
+ LOG_STR
FILTER_LOG_STR
"String to filter by\n")
{
@@ -323,7 +323,7 @@ DEFPY_YANG (log_filter_clear,
log_filter_clear_cmd,
"clear log filter-text",
CLEAR_STR
- "Logging control\n"
+ LOG_STR
FILTER_LOG_STR)
{
nb_cli_enqueue_change(vty, "/frr-logging:logging/filter-text", NB_OP_DESTROY, NULL);
@@ -337,7 +337,7 @@ DEFPY_YANG (log_immediate_mode,
log_immediate_mode_cmd,
"[no] log immediate-mode",
NO_STR
- "Logging control\n"
+ LOG_STR
"Output immediately, without buffering\n")
{
nb_cli_enqueue_change(vty, "/frr-logging:logging/immediate-mode", NB_OP_MODIFY,
@@ -350,7 +350,7 @@ DEFPY_YANG (clear_log_cmdline,
clear_log_cmdline_cmd,
"clear log cmdline-targets",
CLEAR_STR
- "Logging control\n"
+ LOG_STR
"Disable log targets specified at startup by --log option\n")
{
return nb_cli_rpc(vty, "/frr-logging:clear-cmdline-targets", NULL);
diff --git a/lib/vty.c b/lib/vty.c
index 7b4d04efd2..35e48590fb 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -3260,7 +3260,7 @@ DEFPY (log_commands,
log_commands_cmd,
"[no] log commands",
NO_STR
- "Logging control\n"
+ LOG_STR
"Log all commands\n")
{
if (no) {
diff --git a/lib/zlog_5424_cli.c b/lib/zlog_5424_cli.c
index f97c426463..2277330eb8 100644
--- a/lib/zlog_5424_cli.c
+++ b/lib/zlog_5424_cli.c
@@ -150,7 +150,7 @@ static int reconf_clear_dst(struct zlog_cfg_5424_user *cfg, struct vty *vty)
DEFPY_NOSH(log_5424_target,
log_5424_target_cmd,
"log extended-syslog EXTLOGNAME",
- "Logging control\n"
+ LOG_STR
"Extended RFC5424 syslog (including file targets)\n"
"Name identifying this syslog target\n")
{
@@ -170,7 +170,7 @@ DEFPY(no_log_5424_target,
no_log_5424_target_cmd,
"no log extended-syslog EXTLOGNAME",
NO_STR
- "Logging control\n"
+ LOG_STR
"Extended RFC5424 syslog (including file targets)\n"
"Name identifying this syslog target\n")
{
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 7f93a6147b..3fdd89906b 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -932,7 +932,7 @@ DEFUN(no_ospf6_router_id,
DEFUN (ospf6_log_adjacency_changes,
ospf6_log_adjacency_changes_cmd,
"log-adjacency-changes",
- "Log changes in adjacency state\n")
+ LOG_ADJ_CHANGES_STR)
{
VTY_DECLVAR_CONTEXT(ospf6, ospf6);
@@ -944,7 +944,7 @@ DEFUN (ospf6_log_adjacency_changes,
DEFUN (ospf6_log_adjacency_changes_detail,
ospf6_log_adjacency_changes_detail_cmd,
"log-adjacency-changes detail",
- "Log changes in adjacency state\n"
+ LOG_ADJ_CHANGES_STR
"Log all state changes\n")
{
VTY_DECLVAR_CONTEXT(ospf6, ospf6);
@@ -958,7 +958,7 @@ DEFUN (no_ospf6_log_adjacency_changes,
no_ospf6_log_adjacency_changes_cmd,
"no log-adjacency-changes",
NO_STR
- "Log changes in adjacency state\n")
+ LOG_ADJ_CHANGES_STR)
{
VTY_DECLVAR_CONTEXT(ospf6, ospf6);
@@ -971,7 +971,7 @@ DEFUN (no_ospf6_log_adjacency_changes_detail,
no_ospf6_log_adjacency_changes_detail_cmd,
"no log-adjacency-changes detail",
NO_STR
- "Log changes in adjacency state\n"
+ LOG_ADJ_CHANGES_STR
"Log all state changes\n")
{
VTY_DECLVAR_CONTEXT(ospf6, ospf6);
@@ -1061,7 +1061,7 @@ DEFUN (no_ospf6_timers_lsa,
DEFUN (ospf6_distance,
ospf6_distance_cmd,
"distance (1-255)",
- "Administrative distance\n"
+ DISTANCE_STR
"OSPF6 Administrative distance\n")
{
VTY_DECLVAR_CONTEXT(ospf6, o);
@@ -1080,7 +1080,7 @@ DEFUN (no_ospf6_distance,
no_ospf6_distance_cmd,
"no distance (1-255)",
NO_STR
- "Administrative distance\n"
+ DISTANCE_STR
"OSPF6 Administrative distance\n")
{
VTY_DECLVAR_CONTEXT(ospf6, o);
@@ -1095,7 +1095,7 @@ DEFUN (no_ospf6_distance,
DEFUN (ospf6_distance_ospf6,
ospf6_distance_ospf6_cmd,
"distance ospf6 {intra-area (1-255)|inter-area (1-255)|external (1-255)}",
- "Administrative distance\n"
+ DISTANCE_STR
"OSPF6 administrative distance\n"
"Intra-area routes\n"
"Distance for intra-area routes\n"
@@ -1127,7 +1127,7 @@ DEFUN (no_ospf6_distance_ospf6,
no_ospf6_distance_ospf6_cmd,
"no distance ospf6 [{intra-area [(1-255)]|inter-area [(1-255)]|external [(1-255)]}]",
NO_STR
- "Administrative distance\n"
+ DISTANCE_STR
"OSPF6 distance\n"
"Intra-area routes\n"
"Distance for intra-area routes\n"
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c
index 2ba575e6fa..ecfd67e6e3 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -2417,7 +2417,7 @@ DEFUN (no_ospf_abr_type,
DEFUN (ospf_log_adjacency_changes,
ospf_log_adjacency_changes_cmd,
"log-adjacency-changes",
- "Log changes in adjacency state\n")
+ LOG_ADJ_CHANGES_STR)
{
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
@@ -2429,7 +2429,7 @@ DEFUN (ospf_log_adjacency_changes,
DEFUN (ospf_log_adjacency_changes_detail,
ospf_log_adjacency_changes_detail_cmd,
"log-adjacency-changes detail",
- "Log changes in adjacency state\n"
+ LOG_ADJ_CHANGES_STR
"Log all state changes\n")
{
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
@@ -2443,7 +2443,7 @@ DEFUN (no_ospf_log_adjacency_changes,
no_ospf_log_adjacency_changes_cmd,
"no log-adjacency-changes",
NO_STR
- "Log changes in adjacency state\n")
+ LOG_ADJ_CHANGES_STR)
{
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
@@ -2456,7 +2456,7 @@ DEFUN (no_ospf_log_adjacency_changes_detail,
no_ospf_log_adjacency_changes_detail_cmd,
"no log-adjacency-changes detail",
NO_STR
- "Log changes in adjacency state\n"
+ LOG_ADJ_CHANGES_STR
"Log all state changes\n")
{
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
@@ -10330,7 +10330,7 @@ DEFPY (ospf_forwarding_address_self,
DEFUN (ospf_distance,
ospf_distance_cmd,
"distance (1-255)",
- "Administrative distance\n"
+ DISTANCE_STR
"OSPF Administrative distance\n")
{
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
@@ -10350,7 +10350,7 @@ DEFUN (no_ospf_distance,
no_ospf_distance_cmd,
"no distance [(1-255)]",
NO_STR
- "Administrative distance\n"
+ DISTANCE_STR
"OSPF Administrative distance\n")
{
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
@@ -10367,7 +10367,7 @@ DEFUN (no_ospf_distance_ospf,
no_ospf_distance_ospf_cmd,
"no distance ospf [{intra-area [(1-255)]|inter-area [(1-255)]|external [(1-255)]}]",
NO_STR
- "Administrative distance\n"
+ DISTANCE_STR
"OSPF administrative distance\n"
"Intra-area routes\n"
"Distance for intra-area routes\n"
@@ -10392,7 +10392,7 @@ DEFUN (no_ospf_distance_ospf,
DEFUN (ospf_distance_ospf,
ospf_distance_ospf_cmd,
"distance ospf {intra-area (1-255)|inter-area (1-255)|external (1-255)}",
- "Administrative distance\n"
+ DISTANCE_STR
"OSPF administrative distance\n"
"Intra-area routes\n"
"Distance for intra-area routes\n"
diff --git a/ripd/rip_cli.c b/ripd/rip_cli.c
index 2a343bf7c0..cc1764c58d 100644
--- a/ripd/rip_cli.c
+++ b/ripd/rip_cli.c
@@ -223,7 +223,7 @@ static void cli_show_rip_log_neighbor_changes(struct vty *vty, const struct lyd_
DEFPY_YANG (rip_distance,
rip_distance_cmd,
"distance (1-255)",
- "Administrative distance\n"
+ DISTANCE_STR
"Distance value\n")
{
nb_cli_enqueue_change(vty, "./distance/default", NB_OP_MODIFY,
@@ -236,7 +236,7 @@ DEFPY_YANG (no_rip_distance,
no_rip_distance_cmd,
"no distance [(1-255)]",
NO_STR
- "Administrative distance\n"
+ DISTANCE_STR
"Distance value\n")
{
nb_cli_enqueue_change(vty, "./distance/default", NB_OP_MODIFY, NULL);
@@ -261,7 +261,7 @@ DEFPY_YANG (rip_distance_source,
rip_distance_source_cmd,
"[no] distance (1-255) A.B.C.D/M$prefix [WORD$acl]",
NO_STR
- "Administrative distance\n"
+ DISTANCE_STR
"Distance value\n"
"IP source prefix\n"
"Access list name\n")