Skip to content

Target can be used as package and configuration changes are processed by PathHandlers

Malte Bauch requested to merge package into develop

This MR changes the default use case of the target to a package that can be used within other projects. This will allow us to integrate the basic behavior of a target into other projects more easily in the future.

To address configuration changes a first prototypical approach of handlers have been added. The behavior might change in the future, since the current approach is not very sophisticated.

A so called PathHandler has to provide a map of gnmi.Paths in string form. E.g,

  • "/system/config"
  • "/system/config/hostname"

Changes that address these specific paths will be routed to the all the PathHandlers that are registered to handle those paths and will be addressed from there on. PathHandlers have to be implemented on their own for each specific use case (check examples/example01/handlers/system to get an idea).

Additionally the subscribe mechanism has been extended and works now for all paths. Since we currently only aim for the ON_CHANGE mode, an initial set of updates for all paths that match the subscription path is created and sent with the the first response (as stated in 3.5.1.5.2).

TLS has been extended to allow mutual TLS. Therfore an additional CA file has to be provided.

Edited by Malte Bauch

Merge request reports

Loading