summaryrefslogtreecommitdiff
path: root/scripts/build-command-op-templates
AgeCommit message (Collapse)Author
2021-09-07scripts: op-mode: T3807: bugfix node.def generatorChristian Poessinger
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)
2021-08-23T3165: op-mode: prevent override of populated node.def file with empty contentChristian Poessinger
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)
2021-08-23scripts: op-mode: use Python 'f'ormat strings on debug messagesChristian Poessinger
(cherry picked from commit 252bc820b0d130d8d81b5711586eca41287abdca)
2021-06-08T3165: prevent override of populated node.def file with empty contentChristian Poessinger
(cherry picked from commit b4fdcebebecd8d8952211b78bce26d53fd29edb3)
2020-07-18T2704: force newlines after listActiveNode output.Daniil Baturin
2020-03-04templates: T2099: make op-mode path completion helper workingChristian Poessinger
2018-06-23T689, T707: do not use sudo for op mode commands.Daniil Baturin
Else they all are unavailable for operator level users.
2018-05-17T646: prevent convertors from overwriting existing node.def files.Daniil Baturin
2018-05-15Correct the logic of generating tag nodes for op mode.Daniil Baturin
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.
2018-05-14T633: build integration and minor fixes in the op mode command generator.Daniil Baturin
2017-10-11T413: Make a schema for op mode;Taniadz
T420: Write op mode version of node.def generator