Is it possible to mark a container as “cd’ed”.
I mean, in the CLI when I’m in config mode and editing an element of a list it’s auto cd’ing (changing dir) into the element’s id.
Is it possible to mark a container so it will change directory into the container when editing?
If I am understanding your question correctly, you would like to add a custom mode for a container. You can do that by using the following YANG annotation in your data model:
tailf:cli-add-mode
Creates a mode of the container.
Can be used in config nodes only.
Used in I- and C-style CLIs.
The cli-add-mode statement can be used in: container, tailf:symlink, and refine.
The same thing can also be achieved using the clispec as follows:
/clispec/$MODE/modifications/addMode
The "addMode" element makes it possible to create a mode at a non-list element.
Only applicable in C- and I- style CLI.
Attributes:
src (pathType) The "src" attribute is mandatory. It specifies for which path
to create the mode. pathType is a space-separated list of elements, pointing
out a specific non-list, non-leaf element.