Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vvsosed opened this issue Jul 14, 2022 · 3 comments
Closed

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

vvsosed opened this issue Jul 14, 2022 · 3 comments

Comments

@vvsosed
Copy link
Contributor

vvsosed commented Jul 14, 2022

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
Copy link
Member

olofhagsand commented Jul 22, 2022

Error is recreated

olofhagsand added a commit that referenced this issue Jul 22, 2022
](#343)

As a side-effect, added extra "autocliext" parameter to:
- clixon_xml2file()
- clixon_json2file()
- clixon_json2cbuf()
- clixon_txt2file()
@olofhagsand
Copy link
Member

olofhagsand commented Jul 22, 2022

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:

  • clixon_xml2file()
  • clixon_json2file()
  • clixon_json2cbuf()
  • clixon_txt2file()

Please verify fix

@vvsosed
Copy link
Contributor Author

vvsosed commented Jul 25, 2022

Successfully fixed

@vvsosed vvsosed closed this as completed Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants