In CLI, cd'ing into a container

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:


  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:


  The "addMode" element makes it possible to create a mode at a non-list element.
  Only applicable in C- and I- style CLI.


  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.
1 Like

Is there a way to do: do show ... inside this container?
I must exit from the container in order to do show.

– edit –
Looks liks do show works, but it just doesn’t auto complere…