Proto commits in holo-routing/holo

These 13 commits are when the Protocol Buffers files have changed:

Commit:04e56e5
Author:Kyle McClammy
Committer:KyleM

daemon: limit the rollback log size and allow disabling it Every commit stores its full candidate configuration in holo.db, and nothing ever removed old entries, so the database grew without bound (e.g. 10.5 MiB after ~1,800 commits). Since the database uses the AutoDump policy, the whole file is also rewritten on every commit, making commits progressively slower as it grows. This became visible in v0.9.0, when 01ec9bd3 moved holo.db from /var/run (a tmpfs wiped on reboot) to /var/opt, so the rollback log now persists indefinitely. Add a `[rollback_log]` section to holod.toml with two settings: * `max_entries` (default 100, 0 means unlimited): after each commit, the oldest transactions beyond this limit are removed. On startup, an existing oversized rollback log is trimmed in a single pass, with one write to disk instead of one per removed transaction. If that write fails, holod logs an error and starts anyway, and pruning is retried on the next commit. FRR's northbound similarly keeps only its last 20 transactions. * `enabled` (default true): restores the on/off setting removed in efc26366, when holo.db became shared storage for protocol state. When the rollback log is disabled, commits are applied as usual but not recorded, and return transaction ID zero, as they already do when the configuration didn't change. ListTransactions and GetTransaction fail with FAILED_PRECONDITION. Transactions recorded earlier stay in the database, still subject to `max_entries`, and become available again if the log is re-enabled. Transaction IDs remain monotonically increasing; only old entries are dropped. Other keys stored in holo.db by the protocol instances are left untouched. Both settings are described in the holod.toml(5) man page.

The documentation is generated from this commit.

Commit:981e54b
Author:Renato Westphal
Committer:Renato Westphal

daemon: record the author of each configuration transaction The rollback log said what changed and when, but not who made the change, so the identities the northbound authenticates were used to admit a request and then discarded. Record an author alongside each transaction and return it from ListTransactions. A commit arriving over a Unix socket is attributed to the peer's user, taken from the socket credentials rather than from anything the client sends, while a remote one is attributed to the user it authenticated as, qualified by the address it came from. Signed-off-by: Renato Westphal <renatowestphal@gmail.com>

Commit:1aef440
Author:Renato Westphal
Committer:Renato Westphal

daemon-grpc: separate state and configuration retrieval into dedicated RPCs Split the Get RPC from the native gRPC service into two specialized RPCs: GetState for state data and GetConfig for configuration data. This prepares the ground for adding streaming support for state data, which does not apply to configuration retrieval. Signed-off-by: Renato Westphal <renatowestphal@gmail.com>

Commit:6760112
Author:Renato Westphal
Committer:Renato Westphal

northbound: use structured path elements for state retrieval Previously, the northbound layer represented data paths in state requests as plain strings. This commit replaces string-based path handling with structured path elements, defined as a sequence of names with associated key-value pairs. The gRPC protobuf definition has also been updated to align with the gNMI specification, which uses the same structured path format. This change enables subtree filtering by allowing list keys to be omitted or partially specified. It also lays the groundwork for more advanced filtering capabilities, such as depth limits and regex matching on list keys, for example selecting only interfaces whose names match a given pattern. Signed-off-by: Renato Westphal <renatowestphal@gmail.com>

Commit:7f37bf5
Author:Renato Westphal

daemon-grpc: add Subscribe RPC for YANG notification streaming While many protocol crates implement YANG-modeled notifications, they were not exposed to northbound clients. This commit introduces a streaming Subscribe() RPC to the holo.proto northbound interface for receiving YANG-modeled notifications (e.g. adjacency state changes, LSP events). Clients can optionally filter by YANG schema path prefix to receive only notifications of interest. This RPC should not be confused with the gNMI Subscribe() RPC, which is used for telemetry streaming of state data nodes. That functionality will be implemented separately in a future commit. Signed-off-by: Renato Westphal <renatowestphal@gmail.com>

Commit:f9dbb2a
Author:Renato Westphal
Committer:Renato Westphal

daemon-grpc: introduce the `GetSchema` RPC This RPC mirrors NETCONF's get-schema operation but offers more flexibility, as it can fetch YANG submodules in addition to YANG modules. The primary use case is for a CLI program to retrieve the list of supported YANG modules at startup, then use this RPC to fetch any missing modules. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>

Commit:277809b
Author:Renato Westphal
Committer:Renato Westphal

daemon-grpc: update `Capabilities` RPC to return supported features per module It's important to know which features are enabled or disabled, as this determines which parts of the YANG module are implemented. gNMI's `Capabilities` RPC doesn't provide this information, since OpenConfig modules typically don't use "feature" and "if-feature" statements, unlike IETF models. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>

Commit:79fb0d7
Author:Renato Westphal
Committer:Renato Westphal

grpc: add support for LYB binary YANG data format This commit updates the .proto file to allow instance data to be represented as either a string or binary data. This change is necessary because, in Rust, the `String` type cannot contain invalid UTF-8, which might be the case for LYB binary data. The introduction of the "oneof data" field increases complexity, as it introduces two possible fields to hold the data. However, this is necessary to support binary data. An alternative approach would be to use the "bytes" type exclusively for both text and binary data, but this would require clients to convert bytes to text (for XML and JSON), which can incur significant overhead in some languages. Performance tests indicate that using the LYB data format improves the holo-cli "show" commands' performance by approximately 30%. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>

Commit:bbeaa7e
Author:Renato Westphal
Committer:Renato Westphal

grpc: add `with_defaults` parameter to the `Get` RPC Signed-off-by: Renato Westphal <renato@opensourcerouting.org>

Commit:5bb16e0
Author:Renato Westphal
Committer:Renato Westphal

daemon-grpc: introduce the Validate() RPC This RPC enables users to fully validate a candidate configuration without committing it. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>

Commit:5d2cc0e
Author:Renato Westphal
Committer:Renato Westphal

daemon, cli: add support for commit comments Commit comments can be used to describe the configuration changes being pushed to the device, making the rollback log more informative. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>

Commit:1676c1e
Author:Renato Westphal
Committer:Renato Westphal

daemon: introduce rollback log feature This commit adds a new rollback log feature to holod, which enables network administrators to restore a previous configuration in the event of problems caused by recent changes. The feature is optional but enabled by default, and uses the lightweight PickleDB key-value store to store transactions. Currently, access to the rollback log is only available through gRPC. However, CLI rollback commands should come soon. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>

Commit:bff4e28
Author:Renato Westphal

Initial import. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>