]> git.puffer.fish Git - matthieu/frr.git/commitdiff
vtysh: fix `find` and `list` commands
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 22 Oct 2024 18:41:32 +0000 (20:41 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Tue, 22 Oct 2024 18:43:59 +0000 (20:43 +0200)
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 <sharpd@nvidia.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
python/xref2vtysh.py

index 0cfb11e721116a8b41ba6c7e5541e9e2ad60df1a..0e6cdcd6a7e464639fadaa3671279d961b1e7c44 100644 (file)
@@ -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]