Replies: 3 comments
-
Hi, the "context" feature can be used to "remember" nested configurations. The best example is likely interface context. From memory:
Typically, exec and config commands don't overlap, but sure, you could use "if (cmd = /^configure terminal/) set context = ..." the very same way. Vendors could easily provide the nested configuration path (plus the exec/config mode) as additional arguments for evaluation, that would avoid that hack (and wouldn't even require single-connection). Alas, nowadays the focus has shifted away from CLI configuration towards OpenConfig/REST/Cloud, so I wouldn't expect anything. Cheers, Marc |
Beta Was this translation helpful? Give feedback.
-
Hi, Tried to use this approach but it doesn't seem to be working. According to debug log
Relevant configuration bit:
Relevant logging messages when running
Relevant logging messages when running
|
Beta Was this translation helpful? Give feedback.
-
Hi Jakub, single-connection mode is required for the context feature to work. I just did a quick test, it's working just fine:
Cheers, Marc |
Beta Was this translation helpful? Give feedback.
-
Hi,
According to documentation tac_plus-ng is "CLI context aware". My understanding is that it can perform command authorization based on what section of configuration user currently is changing i.e. user in (config) after previously typing "config t"
I'm unable to achieve this in configuration, tried using following code in script:
but DEBUG logs don't show that context == "config" condition is even evaluated.
I'm using version 990f07d
Beta Was this translation helpful? Give feedback.
All reactions