summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-06-09 17:40:52 +0200
committerHarald Welte <laforge@gnumonks.org>2018-06-09 17:43:33 +0200
commit23a299f0961ac7d9d798dcd86f80e7166763338d (patch)
treecc83e5d3ecd3d3f774b09cbc8aa64827e6b64bbc
parent3385e4b0c491ddd914ce3c7c22c8cb6bef89fc9d (diff)
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
-rw-r--r--src/vty/command.c6
1 files changed, 4 insertions, 2 deletions
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, " </node>%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, " </node>%s", VTY_NEWLINE);