libyang icon indicating copy to clipboard operation
libyang copied to clipboard

Question: ability to export final config-data

Open fnchooft opened this issue 3 years ago • 3 comments

Using the yanglint-tool we can do nice things in interactive mode such as:

add a.yang data -t config a.xml add b.yang data -t edit b.xml

This will validate that:

  • a.yang is valid - and a.xml is valid
  • b.yang is valid - and b.xml is valid
  • b.yang depends correctly on a.yang ( assuming some leafrefs etc ).

However I was looking for an "export" function - to merge a.xml + b.xml - creating the final "config.xml".

Is something like this planned? This would be great for testing purposes in Makefiles for validation.

Kind regards,

Fabian

fnchooft avatar Jul 19 '22 14:07 fnchooft

Already supported, try data a.xml b.xml -m -f xml.

michalvasko avatar Jul 20 '22 12:07 michalvasko

That is great! I missed that. Thanks for the example. I will need to check the documentation with more attention.

fnchooft avatar Jul 20 '22 12:07 fnchooft

Best to just run data -h, there the parameter is mentioned.

michalvasko avatar Jul 20 '22 12:07 michalvasko