diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2019-09-23 09:38:02 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2019-09-23 09:38:05 -0300 |
| commit | 4ad771401e18fef1d85de2df73b41fa512162b54 (patch) | |
| tree | 20486bc72c394e9140b1ec7ea751994e5917e26d | |
| parent | 7d7828cf25492a5706ccad79e22d11ef526d3fed (diff) | |
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 <renato@opensourcerouting.org>
| -rw-r--r-- | vtysh/vtysh.c | 26 |
1 files changed, 26 insertions, 0 deletions
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); |
