Skip to content

telekom/sysrepo-plugins

Repository files navigation

Sysrepo Plugins

DevelopmentDocumentationSupportLicensing

The goal of this project is to provide a method of configuring generic Linux systems using the Sysrepo NETCONF server implementation.

About this component

Sysrepo Plugins is a collection of plugins based on multiple YANG modules. More information about the specific YANG module can be found in each YANG model and/or RFC.

ietf-system-plugin is based on the ietf-system YANG module which provides "configuration and identification of some common system properties within a device containing a NETCONF server". More information about the specific YANG module can be found in RFC 7317: A YANG Data Model for System Management.

ietf-interfaces-plugin is based on the ietf-interfaces YANG module which provides "a collection of YANG definitions for managing network interfaces". More information about the specific YANG module can be found in RFC 7223: A YANG Data Model for Interface Management.

ietf-routing-plugin is based on the ietf-routing YANG module which provides "generic components of a routing data model" and ietf-ipv4-unicast-routing and ietf-ipv6-unicast-routing which augment ietf-routing with IPv4 and IPv6 specific data. More information about ietf-routing is available in RFC 8022: A YANG Data Model for Routing Management

Development

Besides the usual C++ development environment, the following additional dependencies are required:

The following software is additionally required on the target system:

  • systemd

Branches

The project uses 2 main branches main and devel. Other branches should not be cloned. In main there are files of the last official release. Any latest improvements and changes, which were tested at least briefly are found in devel. On every new release, devel is merged into main.

This means that when only stable official releases are to be used, either main can be used or specific releases downloaded. If all the latest bugfixes should be applied, devel branch is the one to be used. Note that whenever a new issue is created and it occurs on the main branch, the first response will likely be to use devel before any further provided support. Also, when creating a Pull Request, the target branch should always be set to devel.

Build

First clone the repository:

$ git clone https://github.com/telekom/sysrepo-plugins

Next, create a build directory and generate the build recipes using CMake:

$ mkdir build
$ cd build
$ cmake ..

If systemd is present on the system an additional cmake flag is required:

$ mkdir build
$ cd build
$ cmake -DSYSTEMD_IFINDEX=1 ..

note: SYSTEMD_IFINDEX cmake flag is the index of the interface you wish to configure DNS on (to get a list of indexes for all interfaces, use: ip link)

After configuring the build process with CMake, run the make command to build the plugin:

$ make -j

Build artifacts

Plugins will be built as a standalone applications and also as a sysrepo-plugind modules. For example, for the main ietf-system plugin there are two build artifacts:

  • ietf-system-plugin: standalone application
  • libsrplg-ietf-system.so: sysrepo-plugind module which exposes the plugin init and cleanup callbacks and can be installed by invoking the following command: sysrepo-plugind -P libsrplg-ietf-system.so

Sysrepo/YANG requirements

Each plugin requires the YANG modules from it's yang/ folder to be loaded into the Sysrepo datastore. This can be achieved, for example for the system plugin, by invoking the following commands:

$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/[email protected]

The system plugin also requires some features from ietf-system YANG module to be enabled. This can be achieved by invoking the following commands:

$ sysrepoctl --change ietf-system --enable-feature timezone-name
$ sysrepoctl --change ietf-system --enable-feature ntp
$ sysrepoctl --change ietf-system --enable-feature authentication
$ sysrepoctl --change ietf-system --enable-feature local-users

For the interfaces plugin this can be achieved by invoking the following commands:

$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/ieee802-dot1q-types.yang
$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl --change ietf-interfaces --enable-feature if-mib
$ sysrepoctl --change ietf-if-extensions --enable-feature sub-interfaces

For the routing plugin, the following models have to be installed:

$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/[email protected]
$ sysrepoctl -i ./yang/[email protected] -s ./yang

Working Language

We decided to apply English as the primary project language.

Consequently, all content will be made available primarily in English. We also ask all interested people to use English as language to create issues, in their code (comments, documentation etc.) and when you send requests to us. The application itself and all end-user facing content will be made available in other languages as needed.

Documentation

As for the documentation, the files are documented using doxygen comments:

mkdir docs
doxygen Doxyfile

Use doxygen or browse .h files for an API description.

Support and Feedback

The following channels are available for discussions, feedback, and support requests:

Type Channel
Issues
Other Requests

Code of Conduct

This project has adopted the Contributor Covenant in version 2.1 as our code of conduct. Please see the details in our CODE_OF_CONDUCT.md. All contributors must abide by the code of conduct.

By participating in this project, you agree to abide by its Code of Conduct at all times.

Licensing

This project follows the REUSE standard for software licensing.
Each file contains copyright and license information, and license texts can be found in the ./LICENSES folder. For more information visit https://reuse.software/.
You can find a guide for developers at https://telekom.github.io/reuse-template/.