clicon / clixon

YANG-based toolchain including NETCONF and RESTCONF interfaces and an interactive CLI
http://www.clicon.org/
Other
216 stars 72 forks source link

Variant of strict-autoexpand #448

Open jashmikant-m opened 1 year ago

jashmikant-m commented 1 year ago

strict-expand option for cli(set) but not for cli(delete) When strict-expand- is given it takes effect only while set , but not during delete as delete takes the options which are already present in config tree

olofhagsand commented 1 year ago

This is more problematic than I initially thought, the expand code is done early, at startup when clispec generation is made. Only at a later run time is this applied to different operations. That is, first, the clispec syntax generated with the strcit expand code. Then, the operations are applied. At the time of expansion, any operation can be applied: delete/add. One could possible solve this by a adding a new tag "strict-expand-no-delete" or something that could be investigated in runtinme and only make the strict expand during set, not for delete.