Skip to content

eqvinox/sysrepo

 
 

Repository files navigation

Build Status Coverity Scan Build Status codecov.io GitHub license

Sysrepo

Sysrepo is an YANG-based configuration datastore 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 Protol 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 to management agents such as NETCONF or RESTCONF servers, using the same client library API that applications use to access their configuration. As of now, integration to Netopeer 2 NETCONF server is in progress. This way, applications that use sysrepo to store their configuration will automatically benefit from ability to control the application via NETCONF.

Sysrepo Architecture

Status

  • 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

Features

  • ability to store / retrieve YANG-modeled data elements adressed by XPath
  • startup, running and candidate datastores
  • data consistency and constraints enforecment according to YANG model (with help of libyang library)
  • no single point of failure design (client library is able to instantiate its own sysrepo engine and prerform most of the data-access operations also by itself, whithout the need of contacting system-wide daemon)
  • full transaction and concurrency support, conforming all ACID properties (Atomicity, Consistency, Isolation, Durability)
  • custom RPC support
  • plugins infrastructure for use-cases where there is no daemon to be integrated with sysrepo
  • notifications of subscribed applications about the changes made in the datastore
  • (IN PROGRESS) operational data support (publishing of application's state data to sysrepo)
  • (TODO) ability to subscribe to notifications as a verifier and validate the changes before they are committed
  • (TODO) NACM (NETCONF Access Control Model)
  • (TODO) NETCONF Event Notifications support
  • (TODO) confirmed commit support
  • (TODO) bindings / native client libraries for other programming languages (Python, Java, ...)

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 (read operations sent in-parallel from multiple sessions / sequentially within a single session).

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

YANG-based configuration datastore for Unix/Linux applications

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 91.6%
  • Python 4.3%
  • CMake 1.8%
  • Protocol Buffer 1.4%
  • Other 0.9%