diff options
Diffstat (limited to 'lib/mgmt_fe_client.c')
| -rw-r--r-- | lib/mgmt_fe_client.c | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/lib/mgmt_fe_client.c b/lib/mgmt_fe_client.c index 8cfb025f72..ced2f2e454 100644 --- a/lib/mgmt_fe_client.c +++ b/lib/mgmt_fe_client.c @@ -49,6 +49,7 @@ struct mgmt_fe_client { frr_each_safe (mgmt_sessions, &(client)->sessions, (session)) struct debug mgmt_dbg_fe_client = { + .conf = "debug mgmt client frontend", .desc = "Management frontend client operations" }; @@ -805,31 +806,6 @@ DEFPY(debug_mgmt_client_fe, debug_mgmt_client_fe_cmd, return CMD_SUCCESS; } -static int mgmt_debug_fe_client_config_write(struct vty *vty) -{ - if (DEBUG_MODE_CHECK(&mgmt_dbg_fe_client, DEBUG_MODE_CONF)) - vty_out(vty, "debug mgmt client frontend\n"); - - return CMD_SUCCESS; -} - -void mgmt_debug_fe_client_show_debug(struct vty *vty) -{ - if (debug_check_fe_client()) - vty_out(vty, "debug mgmt client frontend\n"); -} - -static struct debug_callbacks mgmt_dbg_fe_client_cbs = { - .debug_set_all = mgmt_debug_client_fe_set -}; - -static struct cmd_node mgmt_dbg_node = { - .name = "debug mgmt client frontend", - .node = MGMT_FE_DEBUG_NODE, - .prompt = "", - .config_write = mgmt_debug_fe_client_config_write, -}; - /* * Initialize library and try connecting with MGMTD. */ @@ -870,8 +846,8 @@ struct mgmt_fe_client *mgmt_fe_client_create(const char *client_name, void mgmt_fe_client_lib_vty_init(void) { - debug_init(&mgmt_dbg_fe_client_cbs); - install_node(&mgmt_dbg_node); + debug_install(&mgmt_dbg_fe_client); + install_element(ENABLE_NODE, &debug_mgmt_client_fe_cmd); install_element(CONFIG_NODE, &debug_mgmt_client_fe_cmd); } |
