From 23a299f0961ac7d9d798dcd86f80e7166763338d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 9 Jun 2018 17:40:52 +0200 Subject: vty: Don't dump deprecated commands in XML export we don't want to include deprecated commands in our VTY reference manuals. Change-Id: I5e179c9dca297b8c4bdbdf4e0e5b1d69eecc4232 --- src/vty/command.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/vty/command.c') diff --git a/src/vty/command.c b/src/vty/command.c index 24d8ea41..66cf6a8e 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -679,7 +679,8 @@ static int vty_dump_nodes(struct vty *vty) elem = vector_slot(cnode->cmd_vector, j); if (!vty_command_is_common(elem)) continue; - vty_dump_element(elem, vty); + if (!elem->attr & CMD_ATTR_DEPRECATED) + vty_dump_element(elem, vty); } } vty_out(vty, " %s", VTY_NEWLINE); @@ -716,7 +717,8 @@ static int vty_dump_nodes(struct vty *vty) elem = vector_slot(cnode->cmd_vector, j); if (vty_command_is_common(elem)) continue; - vty_dump_element(elem, vty); + if (!elem->attr & CMD_ATTR_DEPRECATED) + vty_dump_element(elem, vty); } vty_out(vty, " %s", VTY_NEWLINE); -- cgit v1.2.3