From: Renato Westphal Date: Mon, 23 Sep 2019 12:38:02 +0000 (-0300) Subject: vtysh: add the "debug northbound" command X-Git-Tag: base_7.3~322^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4ad771401e18fef1d85de2df73b41fa512162b54;p=matthieu%2Ffrr.git vtysh: add the "debug northbound" command This command is defined in the lib/northbound_cli.c file, which is not being parsed by vtysh since most commands from there need special handling in the context of vtysh. The "debug northbound" command, however, can be made available to vtysh without problems. Introduce a new DEFUNSH to do that. Signed-off-by: Renato Westphal --- diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index a762e9555c..ea079d8b18 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -2422,6 +2422,28 @@ DEFUN (vtysh_show_error_code, return CMD_SUCCESS; } +/* Northbound. */ +DEFUNSH(VTYSH_ALL, debug_nb, + debug_nb_cmd, + "[no] debug northbound\ + [<\ + callbacks$cbs [{configuration$cbs_cfg|state$cbs_state|rpc$cbs_rpc}]\ + |notifications$notifications\ + |events$events\ + >]", + NO_STR + DEBUG_STR + "Northbound debugging\n" + "Callbacks\n" + "Configuration\n" + "State\n" + "RPC\n" + "Notifications\n" + "Events\n") +{ + return CMD_SUCCESS; +} + /* Memory */ DEFUN (vtysh_show_memory, vtysh_show_memory_cmd, @@ -4017,6 +4039,10 @@ void vtysh_init_vty(void) install_element(ENABLE_NODE, &vtysh_debug_memstats_cmd); install_element(CONFIG_NODE, &vtysh_debug_memstats_cmd); + /* northbound */ + install_element(ENABLE_NODE, &debug_nb_cmd); + install_element(CONFIG_NODE, &debug_nb_cmd); + /* misc lib show commands */ install_element(VIEW_NODE, &vtysh_show_memory_cmd); install_element(VIEW_NODE, &vtysh_show_modules_cmd);