Age | Commit message (Collapse) | Author |
|
process_node() processes the XML tree in a fixed order, "node" before "tagNode"
before "leafNode". If the generator created a "node.def" file, it can no longer
be overwritten - else we would have some stale "node.def" files with an empty
help string (T2555). Without the fixed order this would resulted in a case
where we get a node and a tagNode with the same name, e.g. "show interfaces
ethernet" and "show interfaces ethernet eth0" that the node implementation
was not callable from the CLI, rendering this command useless (T3807).
This can be fixed by forcing the "node", "tagNode", "leafNode" order by sorting
the input XML file automatically (sorting from https://stackoverflow.com/a/46128043)
thus adding no additional overhead to the user.
(cherry picked from commit 7623e37c918c65418d8dfc521f976bb91f0594c0)
|
|
This is an extension to commit b4fdcebe ("T3165: prevent override of populated
node.def file with empty content") which implemented the same thing for the
configuration mode commands.
(cherry picked from commit 17b5ac143c9128ac3e187d8d8167dd8fe6cbca7d)
|
|
(cherry picked from commit 252bc820b0d130d8d81b5711586eca41287abdca)
|
|
(cherry picked from commit b4fdcebebecd8d8952211b78bce26d53fd29edb3)
|
|
|
|
|
|
Else they all are unavailable for operator level users.
|
|
|
|
Unlike conf mode tag nodes, op mode "pseudo-tag nodes" have the real
node.def inside the node.tag dir rather than at the top level.
The required node.def at the top level is populated with the help string
from the real one.
A side effect is that commands that take arguments now must have their own
words, e.g. "run show arp" and "run show arp eth0" is impossible and has to be
"run show arp" and "run show arp interface eth0", which is probably a good thing.
|
|
|
|
T420: Write op mode version of node.def generator
|