clicon / clixon

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

Duplicate config files in configdir causes merge problems -> set ? = NULL #510

Open olofhagsand opened 5 months ago

olofhagsand commented 5 months ago

If CLICON_CONFIGDIR is set, multiple config files are read, not just the main. But if the same content are in two files the merge algorithm is broken. In particular two autocli.xml files make no clispec generated. Example, suppose CLICON_CONFIGDIR=/usr/local/etc/clixon/example/ and the dir contains:

  autocli.xml
  autocli.xml~

Then both files will be read. But the merge algorithm will make the autocli structure (in-mem) to be broken, and the cli generating code will genererate no code. Ultimately, there will be no sub.menu to set for example