summaryrefslogtreecommitdiff
path: root/pathd
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-03-26 20:25:21 +0200
committerMark Stapp <mjs@cisco.com>2024-08-27 09:53:02 -0400
commit830972cab211a2f7ad82d7635ad9111afac8f47b (patch)
treed33c9a59f0e3fefbcd9173684bacffbf41127f63 /pathd
parent82e52e0f21c12aa5b7270032c32b38e1fa33aa28 (diff)
lib: common debug status output
Implement common code for debug status output and remove daemon-specific code that is duplicated everywhere. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'pathd')
-rw-r--r--pathd/path_cli.c4
-rw-r--r--pathd/path_pcep_cli.c22
-rw-r--r--pathd/path_ted.c11
-rw-r--r--pathd/path_ted.h1
-rw-r--r--pathd/pathd.c6
-rw-r--r--pathd/pathd.h1
6 files changed, 1 insertions, 44 deletions
diff --git a/pathd/path_cli.c b/pathd/path_cli.c
index 754fdf7a62..436883c1fd 100644
--- a/pathd/path_cli.c
+++ b/pathd/path_cli.c
@@ -1089,9 +1089,7 @@ DEFPY_NOSH(show_debugging_pathd, show_debugging_pathd_cmd,
vty_out(vty, "Path debugging status:\n");
cmd_show_lib_debugs(vty);
- /* nothing to do here */
- path_ted_show_debugging(vty);
- path_policy_show_debugging(vty);
+
return CMD_SUCCESS;
}
diff --git a/pathd/path_pcep_cli.c b/pathd/path_pcep_cli.c
index 4294b51c57..8ceadb3e60 100644
--- a/pathd/path_pcep_cli.c
+++ b/pathd/path_pcep_cli.c
@@ -1952,27 +1952,6 @@ int pcep_cli_pcep_pce_config_write(struct vty *vty)
* The param names are taken from the path_pcep_cli_clippy.c generated file.
*/
-DEFPY(show_debugging_pathd_pcep,
- show_debugging_pathd_pcep_cmd,
- "show debugging pathd-pcep",
- SHOW_STR
- "State of each debugging option\n"
- "pathd pcep module debugging\n")
-{
- vty_out(vty, "Pathd pcep debugging status:\n");
-
- if (DEBUG_MODE_CHECK(&pcep_g->dbg_basic, DEBUG_MODE_ALL))
- vty_out(vty, "PCEP basic debugging is on\n");
- if (DEBUG_MODE_CHECK(&pcep_g->dbg_path, DEBUG_MODE_ALL))
- vty_out(vty, "PCEP path debugging is on\n");
- if (DEBUG_MODE_CHECK(&pcep_g->dbg_msg, DEBUG_MODE_ALL))
- vty_out(vty, "PCEP message debugging is on\n");
- if (DEBUG_MODE_CHECK(&pcep_g->dbg_lib, DEBUG_MODE_ALL))
- vty_out(vty, "PCEP lib debugging is on\n");
-
- return CMD_SUCCESS;
-}
-
DEFPY(pcep_cli_debug,
pcep_cli_debug_cmd,
"[no] debug pathd pcep [{basic$basic|path$path|message$msg|pceplib$lib}]",
@@ -2369,7 +2348,6 @@ void pcep_cli_init(void)
/* Top commands */
install_element(CONFIG_NODE, &pcep_cli_debug_cmd);
install_element(ENABLE_NODE, &pcep_cli_debug_cmd);
- install_element(ENABLE_NODE, &show_debugging_pathd_pcep_cmd);
install_element(ENABLE_NODE, &pcep_cli_show_srte_pcep_counters_cmd);
install_element(ENABLE_NODE, &pcep_cli_show_srte_pcep_pce_config_cmd);
install_element(ENABLE_NODE, &pcep_cli_show_srte_pcep_pce_cmd);
diff --git a/pathd/path_ted.c b/pathd/path_ted.c
index 88cda79187..0f8d3827ff 100644
--- a/pathd/path_ted.c
+++ b/pathd/path_ted.c
@@ -463,17 +463,6 @@ DEFPY (show_pathd_ted_db,
return CMD_SUCCESS;
}
-/*
- * Config Write functions
- */
-
-
-void path_ted_show_debugging(struct vty *vty)
-{
- if (DEBUG_MODE_CHECK(&ted_state_g.dbg, DEBUG_MODE_ALL))
- vty_out(vty, " Path TED debugging is on\n");
-}
-
/**
* Help fn to show ted related configuration
*
diff --git a/pathd/path_ted.h b/pathd/path_ted.h
index 449e62f84f..7f3b3f590f 100644
--- a/pathd/path_ted.h
+++ b/pathd/path_ted.h
@@ -81,7 +81,6 @@ int path_ted_segment_list_refresh(void);
/* TED configuration functions */
uint32_t path_ted_config_write(struct vty *vty);
-void path_ted_show_debugging(struct vty *vty);
/* TED util functions */
/* clang-format off */
diff --git a/pathd/pathd.c b/pathd/pathd.c
index 5df0e9c2de..431fe4d1e3 100644
--- a/pathd/pathd.c
+++ b/pathd/pathd.c
@@ -1279,12 +1279,6 @@ const char *srte_origin2str(enum srte_protocol_origin origin)
assert(!"Reached end of function we should never hit");
}
-void path_policy_show_debugging(struct vty *vty)
-{
- if (DEBUG_MODE_CHECK(&path_policy_debug, DEBUG_MODE_ALL))
- vty_out(vty, " Path policy debugging is on\n");
-}
-
void pathd_shutdown(void)
{
path_ted_teardown();
diff --git a/pathd/pathd.h b/pathd/pathd.h
index c8cde33a16..75e7eff920 100644
--- a/pathd/pathd.h
+++ b/pathd/pathd.h
@@ -435,7 +435,6 @@ void srte_candidate_status_update(struct srte_candidate *candidate, int status);
void srte_candidate_unset_segment_list(const char *originator, bool force);
const char *srte_origin2str(enum srte_protocol_origin origin);
void pathd_shutdown(void);
-void path_policy_show_debugging(struct vty *vty);
/* path_cli.c */
void path_cli_init(void);