Open DeekshaBhandary opened 3 years ago
Please supply clispec syntax of "show config set", it is not part of main example.
set("Show configuration as CLI commands"), cli_show_config("running", "cli", "/", 0, "set ");{ @datamodelshow, cli_show_auto("running", "cli", "set "); }
Two things:
1) On my system the first show command shows the l1 test
:
olof@alarik /> show configuration set
set l1 test
set l1 test cont1 host host-type typeA
2) The second case I would claim that the show is made in the context of the l1 test cont1
context and thus only the commands from that part of the config tree is shown:
olof@alarik /> show configuration set l1 test cont1
set cont1 host host-type typeA
Same thing with XML: (using @datamodelshow, cli_show_auto("running", "xml");
):
olof@alarik /> show configuration xml l1 test cont1
<cont1>
<host>
<host-type>typeA</host-type>
</host>
</cont1>
This is somewhat complicated by the cli_auto API, where these relations are somewhat different and needs to be better documented.
If this is the expected behaviour, maybe we can have flag that helps in displaying either the entire configuration or part of it accordingly . Can this be treated as a feature request?
Please change the title also to reflect this.
consider below yang spec: list l1{ leaf name { } container cont1{
container host{ leaf host-type{ } } } }
prefix is just 'set' in all cases. Might need to set the prefix dynamically