Age | Commit message (Collapse) | Author |
|
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.
|
|
basepath.
|
|
I have no idea where TomlLenses module is gone but frankly the whole thing
is a lot less pretty without it.
|
|
|
|
|
|
|
|
|
|
the appliance config.
|
|
|
|
|
|
|
|
|
|
|
|
* Add stand-alone config_tree renderer
* Add tests for stand-alone config_tree renderer
* Add renderer with reference tree
* Add tests for Config_tree renderer with reftree
* Update config files
* Add refactoring functions and correct tests
|
|
|
|
|
|
Basepath is better be a command line option, since when it's really needed,
having it in the config is pretty much useless.
This reverts commit 377de9472716266bb932813a8f7a7ba9aa1630fb.
|
|
Right now the primary motivation is ease of testing without installing
any appliance on a real system, but in real appliances, this may be handy
for those who want things in /opt, even if I'm not a fan of /opt
|
|
If we are going to use batteries for numeric_compare, why not take
advantage of the rest.
|
|
|
|
* T231: Load directory of interface definitions
* T231: Add ounit package to merlin config
* T231: Add tests for loading dir of definitions
* squash! T231: Load directory of interface definitions
* squash! T231: Add tests for loading dir of definitions
|
|
Right now it uses a SHA-1 sum of 30 random bits. I hope that's secure enough.
|
|
I wonder if the user field should be an UID rather than name.
|
|
|
|
|
|
a default.
|
|
|
|
The Message module contains read and write functions that take care of
the wire protocol, which sends a 4 byte length header before every message.
They take a bytes buffer and don't care about its contents.
The Vyconf_client module has high level functions for interfacing with vyconfd.
Functions for creating a socket and creating a server loop are in Startup.
The rest is, for now at least, right in vyconfd.
Notes:
Message.read/write probably should be wrapped in Lwt_io.atomic
We need to find out if it's safe to reuse Pbrt.Encoder.t or we really
should create it every time.
|
|
|
|
instead of home-grown equivalents.
|
|
|
|
(whitespace, braces, square brackets, quotes, and hash).
|
|
Allow single quoted strings.
Allow \r's as whitespace.
Set line numbers on \n to enable better error reporting.
Allow any non-reserved characters ([^\s\{\}\[\]\"\']) in identifiers and unquoted values.
|
|
Two tag nodes with the same name ("ethernet eth0 {...} ethernet eth0 {...}")
is an error.
Two leaf nodes with the same name, however, are not an error. Values of the
next nodes are merged into the first one, while all other data (comment and
inactive and ephemeral properties are inherited from the first node.
This mimics the old syntax of multi nodes, so a person who uses the old syntax
out of habit in a handwritten config will get the result they expect.
|
|
|
|
|
|
|
|
identifiers.
|
|
as opposed to "ethernet { eth0".
Note that "new syntax" for tag nodes, i.e. not using any special syntax
for them is automatically support too, configs will load correctly
since node name/value validation only occurs after parsing is complete.
|