ypgnmi-app Overview

YumaPro SDK – ypgnmi-app Integration

../_images/gNMI_diagram_WEB_01052022.png

The ypgnmi-app is a standalone Go-based YControl subsystem that acts as a bridge between gNMI clients and the netconfd-pro server.

On one side, it functions as a gNMI server, receiving requests from external gNMI clients; on the other side, it acts as a YControl subsystem (similar to db-api-app) and communicates with netconfd-pro over the internal YControl protocol.

The diagram above illustrates the overall message flow between gNMI clients, the ypgnmi-app application, and the netconfd-pro server:

  • The clients communicate to the target (netconfd-pro) with the help of the ypgnmi-app application and send gRPC request to the application.

  • The ypgnmi-app application is written in GO language and talk to the netconfd-pro server via socket with XML encoding and acts as a YControl subsystem.

  • The main role of this application is to translate clients requests to XML and contact netconfd-pro server and send the replies back to the gNMI clients.

  • The ypgnmi-app application is a YControl subsystem that communicates to the netconfd-pro server and also it is a gNMI server that communicates to the gNMI clients.

  • It is responsible for encoding conversion between gNMI messages to XML that are sent to the netconfd-pro server and vice versa.

ypgnmi-app Configuration Parameter List

The following configuration parameters are used by ypgnmi-app:

  • --bind-address

    Specifies the gNMI server binding. This is the address that the gNMI client will use top contact the gNMI server. By default the address is the local host and default port is 10161.

  • --ca

    Specifies the gNMI server CA certificate file. The path to the CA certificate should be absolute.

  • --cert

    Specifies the gNMI server certificate file. The path to the certificate should be absolute.

  • --fileloc-fhs

    Specifies whether the ypgnmi-app should use the Filesystem Hierarchy Standard (FHS) directory locations to create, store and use data and files.

  • --key

    Specifies the gNMI server private key file. The path to the key should be absolute.

  • --log

    Specifies the file path of the application log.

  • --log-level

    Controls the verbosity level of messages printed to the log file or STDOUT, if no log. There are 4 settings that can be used:

    error:  print errors
    warn:   print warnings
    info:   print generally interesting trace info
    debug:  print verbose debugging trace info
    
  • --server

    Specifies the netconfd-pro server IP address. The default is '127.0.0.1' if no value is specified.

  • --server-id

    Specifies the server identifier to use when registering with the netconfd-pro server. The default is 'server1' if no value is specified.

  • --service-id

    Specifies the service identifier to use when registering with the netconfd-pro server. The default is 'yp-gnmi' if no value is specified.

  • --subsys-id

    Specifies the subsystem identifier to use when registering with the netconfd-pro server. The default is 'yp-gnmi' if no value is specified.

ypgnmi-app Source Files

The ypgnmi-app is a standalone application and it does not install or require any source files on the target system. All functionality is contained within the precompiled binary.

The following table lists the files that are included within the netconf/src/ypgnmi directory if YumaPro SDK is installed from the source code.

Directory

Description

gnmi

gNMI server handling, utility functions and functions to deal with the messages

gnmi_connect

gNMI server code that is responsible for the gNMI client to the netconfd-pro server communication

message_handler

Auto-generated gostruct representation of the yumaworks-yp-gnmi.yang file. Used for message handling

netconfd_connect

Handler for the netconfd-pro connection with ypgnmi-app

utils

Generic utility functions

ycontrol

Generic utility functions YControl messages and connections