summaryrefslogtreecommitdiff
path: root/lib/mgmt_be_client.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-03-26 19:24:45 +0200
committerMark Stapp <mjs@cisco.com>2024-08-27 09:53:02 -0400
commit82e52e0f21c12aa5b7270032c32b38e1fa33aa28 (patch)
tree6a771925348869c500ab278fd54fb30b267bc7bf /lib/mgmt_be_client.c
parent5dac6961540422a1ca139fae8c5ea9e5a437c4ba (diff)
lib: common debug config output
Implement common code for debug config output and remove daemon-specific code that is duplicated everywhere. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/mgmt_be_client.c')
-rw-r--r--lib/mgmt_be_client.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/mgmt_be_client.c b/lib/mgmt_be_client.c
index ef87b023a1..ad57a887f9 100644
--- a/lib/mgmt_be_client.c
+++ b/lib/mgmt_be_client.c
@@ -116,6 +116,7 @@ struct mgmt_be_client {
frr_each_safe (mgmt_be_txns, &(client_ctx)->txn_head, (txn))
struct debug mgmt_dbg_be_client = {
+ .conf = "debug mgmt client backend",
.desc = "Management backend client operations"
};
@@ -1258,27 +1259,12 @@ DEFPY(debug_mgmt_client_be, debug_mgmt_client_be_cmd,
return CMD_SUCCESS;
}
-static int mgmt_debug_be_client_config_write(struct vty *vty)
-{
- if (DEBUG_MODE_CHECK(&mgmt_dbg_be_client, DEBUG_MODE_CONF))
- vty_out(vty, "debug mgmt client backend\n");
-
- return 1;
-}
-
void mgmt_debug_be_client_show_debug(struct vty *vty)
{
if (debug_check_be_client())
vty_out(vty, "debug mgmt client backend\n");
}
-static struct cmd_node mgmt_dbg_node = {
- .name = "debug mgmt client backend",
- .node = MGMT_BE_DEBUG_NODE,
- .prompt = "",
- .config_write = mgmt_debug_be_client_config_write,
-};
-
struct mgmt_be_client *mgmt_be_client_create(const char *client_name,
struct mgmt_be_client_cbs *cbs,
uintptr_t user_data,
@@ -1326,7 +1312,6 @@ void mgmt_be_client_lib_vty_init(void)
{
debug_install(&mgmt_dbg_be_client);
- install_node(&mgmt_dbg_node);
install_element(ENABLE_NODE, &debug_mgmt_client_be_cmd);
install_element(CONFIG_NODE, &debug_mgmt_client_be_cmd);
}