clicon / clixon

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

"autocli:hide-show" extension cause bug in xmldb_put method #343

Closed vvsosed closed 2 years ago

vvsosed commented 2 years ago

Hi I've used the snmp branch and encountered a possible bug when I tried to use int xmldb_put(...) API call. Some of the used YANG models contain autocli:hide-show extension. I've found that when we try to store data with xmldb_put(...) call the created database file doesn't contain data that was declared as autocli:hide-show in YANG model. Probably, the root of this issue in xml2file_recurse(...) implementation. The call sequence is int xmldb_put(...) -> clixon_xml2file(...) -> xml2file_recurse(...).

olofhagsand commented 2 years ago

Error is recreated

olofhagsand commented 2 years ago

A previous rewrite of xml/json/text function (in June) made CLI hide commands effective also in backend which had datastore side-effects. Now fixed, but note changed API of:

Please verify fix

vvsosed commented 2 years ago

Successfully fixed