sysrepo  3.3.4
YANG-based system repository for all-around configuration management.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Binaries

There are a few binaries that are strictly optional since they only use the Sysrepo API. However, they can be useful for some common tasks and by including them every user does not have to write them from scratch.

  • sysrepoctl(1) - manipulation of YANG modules (schemas)
  • sysrepocfg(1) - manipulation of YANG instance data
  • sysrepo-plugind(8) - small daemon grouping sysrepo plugins in a single process

sysrepo-plugind Plugin

Plugin is a shared object that must expose 2 functions, sr_plugin_init_cb() and sr_plugin_cleanup_cb() that are called on sysrepo-plugind start and end, respectively. The initialization function must perform all the run-time tasks because no other function will be called by the daemon. It usually involves creating various subscriptions that then handle events on their own. Cleanup usually stops these subscriptions. There is also a working detailed plugin example.

sysrepo-plugind Plugin API

sysrepo-plugind Plugins Path

This is the path where plugins should be stored and nothing else. The default one can be changed during compilation (PLUGINS_PATH option) but $SRPD_PLUGINS_PATH environment variable will always overwrite this default path, if set.

Plugins can be installed by manually copying them into this path or directly using sysrepo-plugind -P <plugin.so>.