summaryrefslogtreecommitdiff
path: root/bgpd/rfapi/vnc_debug.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-11-29 13:32:34 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2016-11-29 14:15:05 +0100
commitaed3273f38be072c50cbb376aa534cab765bed3f (patch)
tree45f6b627d2965d9fffe286e3b38613351d2b1b44 /bgpd/rfapi/vnc_debug.c
parent236dbdac0674f45540f6dc71910683af0a3fd51c (diff)
bgpd/rfpapi: update for new CLI
May contain bugs/mistakes. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'bgpd/rfapi/vnc_debug.c')
-rw-r--r--bgpd/rfapi/vnc_debug.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/bgpd/rfapi/vnc_debug.c b/bgpd/rfapi/vnc_debug.c
index 05b2951b4f..f66be85c25 100644
--- a/bgpd/rfapi/vnc_debug.c
+++ b/bgpd/rfapi/vnc_debug.c
@@ -68,7 +68,7 @@ DEFUN (debug_bgp_vnc,
for (i = 0; i < (sizeof(vncdebug) / sizeof(struct vnc_debug)); ++i)
{
- if (!strcmp(argv[0], vncdebug[i].name))
+ if (!strcmp(argv[3]->arg, vncdebug[i].name))
{
if (vty->node == CONFIG_NODE)
{
@@ -84,13 +84,13 @@ DEFUN (debug_bgp_vnc,
return CMD_SUCCESS;
}
}
- vty_out (vty, "Unknown debug flag: %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "Unknown debug flag: %s%s", argv[3]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
DEFUN (no_debug_bgp_vnc,
no_debug_bgp_vnc_cmd,
- "no debug bgp vnc <rfapi-query|import-bi-attach|import-del-remote>",
+ "<no debug|undebug> bgp vnc <rfapi-query|import-bi-attach|import-del-remote>",
NO_STR
DEBUG_STR
BGP_STR
@@ -101,9 +101,11 @@ DEFUN (no_debug_bgp_vnc,
{
size_t i;
+ if (!strcmp(argv[0]->arg, "no"))
+ argc--, argv++;
for (i = 0; i < (sizeof(vncdebug) / sizeof(struct vnc_debug)); ++i)
{
- if (!strcmp(argv[0], vncdebug[i].name))
+ if (!strcmp(argv[3]->arg, vncdebug[i].name))
{
if (vty->node == CONFIG_NODE)
{
@@ -119,20 +121,10 @@ DEFUN (no_debug_bgp_vnc,
return CMD_SUCCESS;
}
}
- vty_out (vty, "Unknown debug flag: %s%s", argv[0], VTY_NEWLINE);
+ vty_out (vty, "Unknown debug flag: %s%s", argv[3]->arg, VTY_NEWLINE);
return CMD_WARNING;
}
-ALIAS (no_debug_bgp_vnc,
- undebug_bgp_vnc_cmd,
- "undebug bgp vnc (rfapi-query|import-bi-attach|import-del-remote)",
- UNDEBUG_STR
- BGP_STR
- VNC_STR
- "rfapi query handling\n"
- "import BI atachment\n"
- "import delete remote routes\n")
-
/***********************************************************************
* no debug bgp vnc all
@@ -140,7 +132,7 @@ ALIAS (no_debug_bgp_vnc,
DEFUN (no_debug_bgp_vnc_all,
no_debug_bgp_vnc_all_cmd,
- "no debug all bgp vnc",
+ "<no debug|undebug> all bgp vnc",
NO_STR
DEBUG_STR
"Disable all VNC debugging\n"
@@ -153,14 +145,6 @@ DEFUN (no_debug_bgp_vnc_all,
return CMD_SUCCESS;
}
-ALIAS (no_debug_bgp_vnc_all,
- undebug_bgp_vnc_all_cmd,
- "undebug all bgp vnc",
- UNDEBUG_STR
- "Disable all VNC debugging\n"
- BGP_STR
- VNC_STR)
-
/***********************************************************************
* show/save
***********************************************************************/
@@ -222,8 +206,6 @@ vnc_debug_init (void)
install_element (ENABLE_NODE, &debug_bgp_vnc_cmd);
install_element (CONFIG_NODE, &debug_bgp_vnc_cmd);
install_element (ENABLE_NODE, &no_debug_bgp_vnc_cmd);
- install_element (ENABLE_NODE, &undebug_bgp_vnc_cmd);
install_element (ENABLE_NODE, &no_debug_bgp_vnc_all_cmd);
- install_element (ENABLE_NODE, &undebug_bgp_vnc_all_cmd);
}