summaryrefslogtreecommitdiff
path: root/mgmtd
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 /mgmtd
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 'mgmtd')
-rw-r--r--mgmtd/mgmt_vty.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/mgmtd/mgmt_vty.c b/mgmtd/mgmt_vty.c
index 07ea7b4bda..876f703560 100644
--- a/mgmtd/mgmt_vty.c
+++ b/mgmtd/mgmt_vty.c
@@ -557,39 +557,11 @@ DEFPY(mgmt_rollback,
return CMD_SUCCESS;
}
-static int write_mgmt_debug_helper(struct vty *vty, bool config)
-{
- uint32_t mode = config ? DEBUG_MODE_CONF : DEBUG_MODE_ALL;
- bool be = DEBUG_MODE_CHECK(&mgmt_debug_be, mode);
- bool ds = DEBUG_MODE_CHECK(&mgmt_debug_ds, mode);
- bool fe = DEBUG_MODE_CHECK(&mgmt_debug_fe, mode);
- bool txn = DEBUG_MODE_CHECK(&mgmt_debug_txn, mode);
-
- if (!(be || ds || fe || txn))
- return 0;
-
- vty_out(vty, "debug mgmt");
- if (be)
- vty_out(vty, " backend");
- if (ds)
- vty_out(vty, " datastore");
- if (fe)
- vty_out(vty, " frontend");
- if (txn)
- vty_out(vty, " transaction");
-
- vty_out(vty, "\n");
-
- return 0;
-}
-
DEFPY_NOSH(show_debugging_mgmt, show_debugging_mgmt_cmd,
"show debugging [mgmt]", SHOW_STR DEBUG_STR "MGMT Information\n")
{
vty_out(vty, "MGMT debugging status:\n");
- write_mgmt_debug_helper(vty, false);
-
cmd_show_lib_debugs(vty);
return CMD_SUCCESS;