yp-client Introduction
Program Components
The yp-client library is designed to build NETCONF and RESTCONF client applications to connect and exchange YANG data with NETCONF and RESTCONF servers. It facilitates applications written in C++ and a C wrapper provides C and other programming languages such as Python, Java, etc. to use the library.
The yp-client client has the following features:
C++ YANG client library plus a C wrapper to allow other languages to use it
Provides session classes to create, save and load session information
Support for multiple sessions to multiple servers
Support for SSH & TLS
Provides device classes to create, save, and load device information
Provides a user class to create, save, and load user information
Robust handling of errors
Session notification monitoring
Convenience functions that allow sending the server a request, capturing and displaying the response, and dealing with any errors
The code examples and the associated api-.hpp & c-api-.h files are liberally commented and contain detailed guidelines on how to uses the classes and functions contained in the library. It will be instructive to read the relevant parts of these files as you create your applications.
This document provides an outline of the functions in the example code and how to build and run the examples. Also the yp-client factory classes are described.
Program Layers
The component layers of a client application created using yp-client are shown in the diagram above and described in the table below.
yp-client component layering
Function |
Description |
user application |
the code you write |
yp-client |
the classes and functions described in this manual and the associated header files |
libycli |
NETCONF & RESTCONF client support |
libmgr |
handles all the basic NETCONF and RESTCONF details so a simple internal API can be used by applications |
libncx |
handles many of the core NETCONF and RESTCONF/YANG data structure support, including all of the YANG/YIN, XML, and XPath processing |