You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some nodes can have multiple values, like "address" in interfaces. Your parser confuses them with tag nodes.
A useful rule of thumb is presence of a left curly brace on the same line. Leaf nodes never have them, tag nodes always do.
For the record, there's now built-in, fully "anatomically correct" parser and Python3 bindings for it that power the migration scripts and in the latest rolling release, the vyos.config library, and it can manipulate the trees in memory (it's a part of the future config backend to replace libvyattacfg).
Installing it on random machine is not quite easy since it has native code dependencies (https://github.com/vyos/libvyosconfig/), so an independent pure Python "config to a dict" parser retains its value.
The text was updated successfully, but these errors were encountered:
Some nodes can have multiple values, like "address" in interfaces. Your parser confuses them with tag nodes.
A useful rule of thumb is presence of a left curly brace on the same line. Leaf nodes never have them, tag nodes always do.
For the record, there's now built-in, fully "anatomically correct" parser and Python3 bindings for it that power the migration scripts and in the latest rolling release, the
vyos.config
library, and it can manipulate the trees in memory (it's a part of the future config backend to replace libvyattacfg).Installing it on random machine is not quite easy since it has native code dependencies (https://github.com/vyos/libvyosconfig/), so an independent pure Python "config to a dict" parser retains its value.
The text was updated successfully, but these errors were encountered: