clicon / clixon-controller

Clixon network controller
Apache License 2.0
13 stars 4 forks source link

Templates #4

Closed olofhagsand closed 8 months ago

olofhagsand commented 1 year ago

Add templates in the CLI. Primary approach: evaluate templates outside clixon (ie in python) so that you can apply a powerful template engine, ushc as ninja2, slax, xslt, etc. Secondary apporach: Very limited template engine inside clixon. Such as only variable substitution.

krihal commented 8 months ago

One bug. If I load an invalid XML I'm not allowed to try edit it again.

debian@khn-dev[/]# load merge xml
asdasdasdasd
Nov 13 09:48:55: clixon_xml_parseerror: 193: XML error: xml_parse: line 0: syntax error: at or before: asdasdasdasd: XML parse error
CLI command error

Trying to load valid XML after the invalid one:

debian@khn-dev[/]# load merge xml
Nov 13 09:48:56: Editing configuration: application data-missing <missing-choice xmlns="urn:ietf:params:xml:ns:yang:1">edit-content</missing-choice>: missing-choice : /rpc/edit-config
debian@khn-dev[/]#
olofhagsand commented 8 months ago

Fixed the read error ^ please test again