From 1530a35423ca985b723f2f78e5aac832bc8bacd8 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 22 Oct 2024 20:41:32 +0200 Subject: [PATCH] vtysh: fix `find` and `list` commands I simply missed that `node->cmd_vector` is needed for `find` and `list` to work correctly. Fixes: #17043 Fixes: 4bc41193e810 ("vtysh, lib: preprocess CLI graphs") Reported-by: Donald Sharp Signed-off-by: David Lamparter --- python/xref2vtysh.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/xref2vtysh.py b/python/xref2vtysh.py index 0cfb11e721..0e6cdcd6a7 100644 --- a/python/xref2vtysh.py +++ b/python/xref2vtysh.py @@ -450,9 +450,11 @@ class CommandEntry: graph_delete_node(node->cmdgraph, vector_slot(node->cmdgraph->nodes, 0)); vector_free(node->cmdgraph->nodes); node->cmdgraph->nodes = &gvec_{node}; -{'}'} """ ) + for cmdel in sorted(cmdels): + ofd.write(f"\tvector_set(node->cmd_vector, &{cmdel}_vtysh);\n") + ofd.write("}\n") return [node]