sysrepo  1.4.58
YANG datastore
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages

This application is a simple daemon that groups all available Sysrepo plugins into a single process. What is a plugin from an abstract perspective is explained on the introductory page. This daemon loads plugins from plugins path directory and supports a few options, --verbosity for logging and --debug to not go into daemon mode and keep printing all messages to stderr.

Sysrepo 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 plusing example.

Plugin API

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.