Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This will simplify updates of the reference_tree in case of supplemental
contributions, say, addon packages.
|
|
The world data structure is fixed in the main loop, however, it will
need updates for dynamic loading of reference tree in the presence of
addons, respectively, the running config at completion of commit.
|
|
An artifact of development was the use of lib name libvyatta-cfg.so for
dlopen instead of libyatta-cfg.so.1. The former exists when the
libvyatta-cfg-dev package is installed, as it is when vyatta-cfg is
built locally. As the dev package is not needed nor used by default
builds, correct to the latter lib name, as installed by libvyatta-cfg.
|
|
|
|
The standard package Arg is understandably confused by paths such as:
interfaces openvpn vtun0 openvpn-option --persist-tun
Collect args from Sys.argv and use env vars for debug options.
|
|
|
|
|
|
The vyos1x-adapter provides access to the legacy CStore set/delete
functions using ctypes. Developed as a separate package, include as a
subdir, to be retired when full replacements are available.
|
|
|
|
An empty protobuf message does not correctly generate encode/decode
functions. This appears to be fixed upstream, but for now, use
workaround of adding a reasonable field.
|
|
|
|
For convenience and to avoid dune build conflict, all util functions now
reside in vyos1x-config.util.
|
|
|
|
|
|
|
|
|
|
The root node name was changed in vyos1x-config (T4491) so as not to
conflict with actual nodes named "root".
|
|
|
|
|
|
|
|
Regenerate protobuf files:
ocaml-protoc --ml_out src/ data/vyconf.proto
The generated files vyconf.* are renamed vyconf_pbt.* instead of the
split into vyconf_pb/vyconf_types as in the original implementation.
|
|
|
|
Update as needed for use with contemporary vyos1x-config:
. update build system to use dune
. drop use of batteries
. update for protoc breaking changes in versions >= 3.0
. remove files now in vyos1x-config (config_tree et. al.; parsing)
|
|
|
|
|
|
commands.
|
|
|
|
|
|
sorting set commands.
|
|
|
|
|
|
The canonical format for valueless nodes is "foo;".
There are two cases: when it's known from the reference tree that
a node is valueless, we should render it the canonical way.
However, a valueless node is not the same as a normal node with no children,
semantically, so nodes that are note valueless should be rendered as "foo {}".
If the reference tree is not present, resort to rendering all nodes
without values as if they were normal nodes with no children
rather than as if they were valueless.
The parser is unaware of the distinction, so there are no implications for it.
|
|
|
|
|
|
|
|
i.e. if they don't contain whitespace or characters of special significance
to the parser (;[]{}#).
|
|
for human consumption.
The idea of the correct (for subsequent parsing) and familiar for all other purposes rendering:
* When rendering the entire config, do not render the invisible "root" node, only render its children.
* When rendering config at specified path, do not include any nodes that are within the path
(e.g. if path "system login" exists, "show system" request output should start with "login {",
not "system { login { ...").
|
|
Since there's no REUSEADDR semantic for UNIX domain sockets,
that's best we can do.
|
|
using them.
Yes, I hate oversized commits too, but this is hard to avoid sometimes.
Adjustments to the Session functions logic required to make it work:
Do not try to validate the path. The validation function is geared towards
validating _set_ paths, so when path lacks a value, it doesn't work right.
We assume that the path has been through set at some point, so if a path
currently exists in the config tree, it is also a valid path that can be used for
Reference_tree.is_leaf etc.
|
|
Move the high level load_interface_definitions function from Reference_tree
to Startup.
|
|
|
|
|
|
Seems lenses are back.
This reverts commit 8938e627c04c01f8f30a854be6903a9abcd2fa5b.
|
|
|
|
not just config tree paths.
Add analogous function for converting a list of strings to JSON.
|
|
|
|
mode functions.
Re-generate the protobuf-derived modules.
NB: Newer versions of ocaml-protoc moved types to a separate module, needs to be accounted for in other
files.
|