Skip to content

rastislavs/sysrepo

 
 

Repository files navigation

Build Status Coverity Scan Build Status codecov.io GitHub license

Sysrepo

Sysrepo is an YANG-based configuration and operational state data store for Unix/Linux applications.

Applications can use sysrepo to store their configuration modeled by provided YANG model instead of using e.g. flat configuration files. Sysrepo will ensure data consistency of the data stored in the datastore and enforce data constraints defined by YANG model. Applications can currently use C language API of sysrepo Client Library to access the configuration in the datastore, but the support for other programming languages is planed for later too (since sysrepo uses Google Protocol Buffers as the interface between the datastore and client library, writing of a native client library for any programing language that supports GPB is possible).

Sysrepo can be easily integrated with management agents such as NETCONF or RESTCONF servers, using the same client library API that applications use to access their configuration. As of now, sysrepo is integrated with the Netopeer 2 NETCONF server. This means that applications that use sysrepo to store their configuration can automatically benefit from the ability to being controlled via NETCONF.

Sysrepo Architecture

Features

  • ability to store / retrieve YANG-modeled data elements adressed by XPath
  • startup, running and candidate datastore support
  • data consistency and constraints enforecment according to YANG models
  • no single point of failure design (does not require any daemon to be running)
  • full transaction and concurrency support
  • notifications of subscribed applications about the changes made in the datastore
  • commit verifiers (change verification by subscribed applications)
  • operational data support (publishing of application's state data to sysrepo)
  • plugins infrastructure for loosely-coupled integration with sysrepo
  • YANG 1.1 support
  • custom RPC, Event Notifications, YANG 1.1 Actions support
  • Python 2 & 3, Lua 5.1 & 5.2, Java bindigs
  • (TODO) notification store & notification replay
  • (TODO) confirmed commit support
  • (TODO) NACM (NETCONF Access Control Model)
  • (TODO) native client libraries / plugins for other programming languages (Python, Java, ...)

Status

  • November 2016: sysrepo version 0.5.0 realeased with many bugfixes and some minor improvements.
  • October 2016: sysrepo version 0.4.0 realeased with lots of new features such as: operational data support, commit verifiers, YANG 1.1 support, subtree-based data retrieval or RPC / event notifications support.
  • July 2016: new features added into the devel branch: experimental operational data support and event notifications support
  • June 2016: new subscription API & changeset retrieval functionality ready, sysrepocfg tool, released as sysrepo version 0.3.0
  • May 2016: RPC support and sysrepo plugins infrastructure ready, working on new subscription API & changeset retrieval functionality
  • April 2016: full concurrency and locking support ready, generated Python bindings, integrated with Netopeer 2 NETCONF server, released as sysrepo version 0.2.0
  • March 2016: syrepo daemon and data manipulation (edit-config) functionality ready, working on full concurrency and locking support
  • February 2016: working on sysrepo daemon, data manipulation (edit-config) functionality
  • January 2016: data retrieval (get-config) functionality ready, released as sysrepo version 0.1.0
  • December 2015: implementation started - building internal infrastructure, data retrieval (get-config) functionality

Performance

According to our measurements using the performance unit-test and concurrency unit-test, sysrepo is able to handle more than 100 000 of requests per second (100 requests per millisecond) by concurrent access and about a half of it by sequential access on a conventional laptop hardware. According to the API performance testing, an application is able to retrieve more that 1 000 000 data nodes per second from sysrepo, and set / update up to 50 000 data nodes per second in sysrepo.

Build & Installation Steps

See INSTALL.md file, which contains detailed build and installation steps.

Usage Examples

See examples directory, which contains an example per each data-acess API function.

Also see our fork of dnsmasq that uses sysrepo to store its configuration for short demonstration of how sysrepo can be integrated into an existing application (see the diff).

Documentation

Client Library API, as well as all internal modules of sysrepo are documented with Doxygen comments. To read the documentation, you can navigate to the nigthly build of documentation on sysrepo.org, or build your own copy of the documentation.

Contact

For bug reports, please open an issue on GitHub. For general questions and feedback, please post to our mailing lists. You are also welcome to subscribe to our mailing lists if you have interest in sysrepo:

Other Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 88.2%
  • C++ 4.1%
  • Python 3.9%
  • CMake 1.4%
  • Protocol Buffer 0.9%
  • Lua 0.6%
  • Other 0.9%