YumaPro Programs

The YumaPro SDK contains several programs that are installed from binary packages or built from source code.

Some programs depend on the feature set level:

  • Basic: Supports NETCONF over SSH with basic client and server features

  • Core: Supports most protocols and features

  • Advanced: Supports all protocols and features

Developer Programs

Developer programs are licensed per engineer and cannot be redistributed. These programs may have a limited license:

  • The developer programs in the Basic feature set expire 100 days from the build date. They must be updated (from the monthly releases) for continued use.

The following programs are developer programs:

This also includes all build-related scripts:

The following programs may be redistributed, depending on the license:

Programs for Redistribution

Redistributed programs are licensed per platform, and can be included in products for end-users. These programs have a perpetual license that does not expire.

Server Instrumentation Code

YANG module instrumentation code (e.g., SIL, SIL-SA, PY-SIL) can be included in products for end-users. These programs have a perpetual license that does not expire.

  • Includes any server software that invokes YumaPro APIs

  • Includes any code generated by yangdump-pro

Client Instrumentation Code

YANG module instrumentation code (e.g., yp-client) can be included in products for end-users. These programs have a perpetual license that does not expire.

  • Includes any software that invokes YumaPro APIs

combo-app

This program provides an example for combining the DB-API Subsystem. and SIL-SA Subsystem in a single program. There will be a single subsystem with one subsys-id value. A YControl subsystem can register any number of services. The netconfd-pro and combo-app programs must be built with the make flag WITH_YCONTROL=1.

This is a sample YumaPro subsystem program to demonstrate how the SIL-SA, DB-API, and YControl libraries can be used together within an application. If the --getconfig and --filespec parameters are present then the <get-config> operation will be sent about once per second, which the sil-sa-app is also active and processing SIL-SA requests. Use control-C to exit the program.

PY-SIL libraries can only be used within the py-sil-app.py Currently, combo-app support is not available for PY-SIL.

Note

This program is not entirely intended to be used as a real application. The DB-API portion is for example purposes only. The SIL-SA portion can be used as a real application without modification.

SYNOPSIS

combo-app [--subsys=<subsys-id>] [--library=name] [<logging-parameters>]
   --getconfig [--withdef] --filespec=/path/to/output.xml
   [--with-state] [--xpath-filter=xpath-expression] [--retry-limit=num]

USAGE

The combo-app program does not use a YANG-based configuration file.

If combo-app is called without any parameters, it will attempt to connect to the server to register the SIL-SA and DB-API subsystems.

combo-app supports the db-api-app and sil-sa-app CLI parameters. They are not duplicated here.

db-api-app

The db-api-app program provides examples for using the DB-API Subsystem. It is a sample YumaPro subsystem program to demonstrate how the DB-API and YControl libraries can be used within an application. The netconfd-pro and db-api-app programs must be built with the make flag WITH_YCONTROL=1.

The default send_edit function will probably fail unless the server is configured with the correct YANG modules. Rewrite the send_edit request with your own parameters in db_api_app/main.c

Note

This program is not intended to be used as a real application. It is only intended to be used to provide examples for the DB-API library functions.

SYNOPSIS

send_edit:

db-api-app [--subsys=<subsys-id>] [<logging-parameters>]

getconfig:

db-api-app [--subsys=<subsys-id>] [<logging-parameters>]
   --getconfig [--withdef] --filespec=/path/to/output.xml
   [--with-state] [--xpath-filter=xpath-expression]

Maintenance Mode:

db-api-app --enter

db-api-app --enter=N

db-api-app --exit

Log Level:

db-api-app --set-log-level=dlevel

Sub RPC:

db-api-app --subrpc=name [--subrpc-modname=modname]
   --filespec=filename [--in-filespec=filename] [--user=string]

Common parameters:

db-api-app --subsys=string [--retry-limit=num]

USAGE

The db-api-app program does not use a YANG-based configuration file.

If db-api-app is called without any parameters, it will attempt to send a test edit to the server. The module "test" must be loaded into the server for this edit to succeed. This test module is usually installed as /usr/share/yumapro/modules/test/pass/test.yang.

db-api-app supports the following CLI parameters:

  • --count=N

    The --count parameter can be used to specify number of times an edit request will be sent to the server.

  • --db-lock-change-state-time=N

    This parameter can be used to change the default frequency of sending <db-lock> and <db-unlock> requests for --db-lock-test. Default value is 7 seconds.

  • --db-lock-test

    The --db-lock-test parameter can be used to start the DB-API in a special test mode. The server must be started with --with-db-lock=true flag. The server will send <db-lock> and <db-unlock> requests to the db-api subsystem.

  • --db-lock-start-wait-time=N

    This parameter can be used to change the default wait time before sending the first <db-lock> request to the server for --db-lock-test. Default value is 30 seconds.

  • --enter

    The --enter parameter will cause a <enter-maintmode> request to be sent to the server.

  • enter=N

    The --enter=N parameter will cause a <enter-maintmode> request to be sent to the server, with the <allowed> parameter set according to the value of N:

    0 = no bits set
    1 = allow client sessions for read operations that read
        datastores or operational data
    2 = allow client sessions for general operations that
        do not access any datastores
    3 = allow read and operation sessions
    
  • --exit

    The --exit parameter will cause a <exit-maintmode> request to be sent to the server.

  • --filespec=/path/to/output.xml

    The --filespec parameter is required if the --getconfig parameter is present or if the --subrpc parameter is present. This specifies the file location to save the response from the server.

  • --getconfig

    The --getconfig parameter will cause a <getconfig> request to be sent to the server.

  • --log-level

    The log-level setting for the application. Affects all usage of logging functions.

  • in-filespec=/path/to/output.xml

    The --in-filespec parameter is optional if the --subrpc parameter is present. This specifies the XML file location to read the RPC input in the same form as used in the <rpc> element for NETCONF.

  • retry-limit=num

    The --retry-limit parameter will cause the subsystem to terminate after the specified number of re-connect attempts. The default value is 5000 re-connect attempts. The parameter is a uint16 number between 1 and 65535.

  • --set-log-level=enum

    The --set-log-level parameter will cause a <set-log-level> request to be sent to the server. The enum string values are the same as the --log-level parameter.

  • --server-root=string

    The --server-root parameter is required if the server is running in Multi-Instance Mode. This identifies the server instance that this program will attempt in its server connection.

  • --subrpc=string

    The --subrpc parameter is used to send an RPC request to the server. This parameter specifies the name of the RPC operation. If any input is needed then the --in-filespec parameter must be present. The --filespec parameter must be present and specifies the name of the file to store the RPC output from the server. The --user parameter can be used to specify a user name for the RPC operation.

  • --subsys-id=string

    The --subsys-id parameter keyword is optional. It specifies the subsystem identifier to use when registering with the netconfd-pro server. The default is 'subsys1' if no value is specified.

    Warning

    The server will not function correctly if multiple subsystems register with the same name. This parameter must be used if the system has more than one subsystem.

  • --subrpc-modname=string

    The --subrpc-modname parameter is optional when the --subrpc parameter is used. It specifies the name of the module that contains the RPC. This parameter should be used when multiple RPCs with the same name exist in different modules.

  • --user=string

    The --user parameter can be used if the --subrpc parameter is present. It specifies the username for access control purposes that should be used on the server for the RPC operation. If not present then the RPC operation will be invoked as the system user without any access control at all.

  • --withdef

    The --withdef parameter will cause a <getconfig> request to be sent to the server including the <withdef> parameter set to true. If it is missing, the default is not to request YANG defaults.

  • --with-state

    The --with-state parameter will cause a <getconfig> request to be sent to the server including the <with-state> parameter set to true. This will cause all non-configuration data nodes to be returned. If it is missing, the default is not to request these data nodes.

  • xpath-filter=string

    The --xpath-filter parameter is used to add an optional XPath filter to the retrieval operation. If present, only data nodes included in the node-set result for this expression will be returned. The default is to return all data nodes.

netconfd-pro

The netconf-pro program is the main server program.

SYNOPSIS

netconfd-pro

USAGE

The netconfd-pro CLI Reference defines the server-specific CLI parameters.

netconf-subsystem-pro

The netconf-subsystem-pro program is a thin-client application that is called by the OpenSSH server to access the netconfd server, when the 'netconf' subsystem is requested.

This program is mandatory to use if the NETCONF protocol is used at all by client programs. The yp-shell program requires NETCONF access to the server. This is not a user-modifiable program. It is a complete application needed for the server to operate.

SYNOPSIS

netconf-subsystem-pro

USAGE

The location of this program needs to be configured in the /etc/ssh/sshd_config file. The following configuration needs to be present:

Port 22
Port 830
Subsystem netconf /usr/sbin/netconf-subsystem-pro

The actual filespec in the last line will depend on the location that this program is installed. The default value is shown in the example above.

There are no program options or environment variables used by this program.

Refer to the YumaPro Installation Guide for complete details on setting up the netconfd-pro server.

py-sil-app

The py-sil-app program provides a complete functioning application for implementing Python YANG object callback functions in a subsystem. It provides complete functionality for the PY-SIL Subsystem. The netconfd-pro and py-sa-app programs must be built with the make flags WITH_YCONTROL=1 and WITH_PY_SIL=1.

Note

This program is a complete application. The PY-SIL functionality will only be supported if this subsystem application is used correctly.

Refer to the PY-SIL Usage section for more details.

restconf

The restconf program is an HTTP/REST thin client application that is called by the FastCGI module in the WEB server to start a single RESTCONF request session for the specified user.

This program is mandatory to use if the RESTCONF protocol is used at all by client programs. This is not a user-modifiable program. It is a complete application needed for the server to operate. The netconfd-pro and restconf programs must be built with the make flag WITH_RESTCONF=1.

The location of this program needs to be configured in the WEB server config file. Refer to the RESTCONF Installation section for details. The default installation directory is /var/www/yang-api. The /var/www/yang-api/restconf program may need to be relocated to a different directory specific to the WEB server CGI-BIN configuration.

The '{+restconf}' entry point is configurable with the --entry-point CLI parameter. The default entry point is /restconf. Refer to RFC 8040 for details on the RESTCONF standard.

SYNOPSIS

restconf

USAGE

There are no program options or environment variables used by this program.

sil-sa-app

The sil-sa-app program provides a complete functioning application for implementing C/C++ YANG object callback functions in a subsystem. It provides complete functionality for the SIL-SA Subsystem. The netconfd-pro and sil-sa-app programs must be built with the make flag WITH_YCONTROL=1.

Note

This program is a complete application. The SIL-SA functionality will only be supported if this subsystem application is used correctly.

SYNOPSIS

sil-sa-app [--subsys=<subsys-id>] [--library=name]
    [<logging-parameters>] [--retry-limit=num]

USAGE

The sil-sa-app program does not use a YANG-based configuration file.

If sil-sa-app is called without any parameters, it will attempt to connect to the server with default settings (e.g. subsys-id=subsys1).

sil-sa-app supports the following CLI parameters:

  • --address=string

    The --address parameter is optional. It represents the IP address of the main server that will be used for the session. The default is localhost.

  • --library=string

    The --library parameter keyword is optional. It specifies a SIL-SA library (module or bundle) that should be selected by this subsystem. If any --library parameters are present, then only those SIL-SA libraries will be loaded by this subsystem, if the main server indicates that the module or bundle is loaded. This option can be used multiple times, once for each selected module or bundle.

    If no --library parameters are present then the sil-sa-app will attempt to load all SIL-SA modules and bundles reported by the server.

    If the SIL-SA library is not found in the 'runpath' (e.g. /usr/lib/yumapro directory) then it will be skipped by the subsystem.

    Example:
    
    --library=foo  (selects libfoo_sa.so)
    
  • --log-level=enum

    The --log-level, --log, and other logging parameters are also supported.

  • --port=uint16

    The --port parameter is optional. It represents the TCP port number of the main server that will be used for the session. The default is the local system, determined by the local netconf-subsystem-pro.

  • --retry-limit=num

    The --retry-limit parameter will cause the subsystem to terminate after the specified number of re-connect attempts. The default value is 5000 re-connect attempts. The parameter is a uint16 number between 1 and 65535.

  • --server-root=string

    The --server-root parameter is required if the server is running in Multi-Instance Mode. This identifies the server instance that this program will attempt in its server connection.

  • --subsys-id=string

    The --subsys-id parameter keyword is optional. It specifies the subsystem identifier to use when registering with the netconfd-pro server. The default is 'subsys1' if no value is specified.

yangcli-gw

The yangcli-gw program is a YANG-aware client application gateway. It handles protocol sessions to networking devices. The client application uses a ZeroMQ message-based interface with simple but programmatic yangcli-pro commands.

The yangcli-gw program uses the same configuration parameters as yangcli-pro, except not all parameters apply, since there is no keyboard interface. Refer to the yangcli-pro CLI Reference for details about configuring the yangcli-gw program.

yangcli-pro

The yangcli-pro program is a YANG-aware client application. It handles protocol sessions to networking devices, and can be used interactively or from other programs.

Refer to the yangcli-pro CLI Reference for details about configuring the yangcli-pro program.

yangdiff-pro

The yangdiff-pro program is used to compare different versions of a YANG module.

Refer to the yangdiff-pro CLI Reference for details about configuring the yangdiff-pro program.

yangdump-pro

The yangdump-pro program is a YANG compiler utility program that can be used for various tasks, such as YANG module validation and Server SIL and SIL-SA Code Generation.

Refer to the yangdump-pro CLI Reference for details about configuring the yangdump-pro program.

ypgnmi-app

The ypgnmi-app program is used for the gNMI protocol. Refer to the ypgnmi-app Configuration Parameter List for details about the ypgnmi-app program and its parameters.

ypgrpc-go-app

The ypgrpc-go-app program is is a YControl subsystem that communicates to the netconfd-pro server. It is also a gRPC server that communicates to the gRPC clients.

Refer to the ypgrpc-go-app Configuration Parameter List for details about this program and its parameters.

yp-ha-app

The yp-ha-app program is a sample YumaPro subsystem program to demonstrate how the DB-API service can be used to send YumaPro High Availability <yp-ha-mode> messages to the local server. The netconfd-pro and yp-ha-app programs must be built with the make flags WITH_YCONTROL=1 and WITH_YP_HA=1.

Note

This program is a complete application that can be used to set the YP-HA role for the local server.

SYNOPSIS

yp-ha-app --go-active
   [--subsys=<subsys-id>] [<logging-parameters>]

yp-ha-app --go-standby=new-active
   [--subsys=<subsys-id>] [<logging-parameters>]

yp-ha-app --go-none
   [--subsys=<subsys-id>] [<logging-parameters>]

USAGE

The yp-ha-app program does not use a YANG-based configuration file.

Exactly 1 of the following 3 CLI parameters must be present.

  • --go-active

  • --go-standby

  • --go-none

yp-ha-app supports the following CLI parameters:

  • --go-active

    The --go-active command is used to tell the local server to switch to YP-HA Active mode.

  • --go-standby=string

    The --go-standby=new-active command is used to tell the local server to switch to YP-HA Standby mode. The "new-active" parameter is the name of the YP-HA server that should be used as the new YP-HA Active server. Only 'superuser' management sessions are available in this mode.

  • --go-none

    The --go-none command is used to tell the local server to go offline and leave its YP-HA role. In this mode the server will wait for a new HA role to be set. Only 'superuser' management sessions are available in this mode.

  • subsys-id=string

    The --subsys-id parameter keyword is optional. It specifies the subsystem identifier to use when registering with the netconfd-pro server. The default is 'subsys1' if no value is specified.

  • log-level=enum

    The --log and --log-level parameters are supported.

RETURN VALUE

A return status from the application or the server is returned that represents a status code, found in ncx/status_enum.h. The value 0 (NO_ERR) indicates the server accepted the HA command. A non-zero value indicates that the application or the server rejected the request, or it failed immediately.

yp-shell

The yp-shell program is a CLI client application that is called by the login process server to start a shell for the specified user. It is usually installed as the login shell for the local user. Refer to the yp-shell – adding a CLI section for details on installing the yp-shell program. The netconfd-pro and yp-shell programs must be built with the make flag WITH_CLI=1.

The functionality in yp-shell is a subset of the features described in the YumaPro yangcli-pro Manual.

The yp-shell program is a NETCONF client that only connects 1 session to the local server. A command line interface to the server operations is provided. If the session terminates the program will exit.

Note

This program is a complete application that is required if the server CLI functionality is used.

USAGE

This program uses the 'yangcli-pro' configuration file if it is found. The default location is /etc/yumapro/yangcli-pro.conf.

Many of the yangcli-pro features are disabled in yp-shell. A subset of the CLI parameters found in the yangcli-pro CLI Reference are supported. The section for each parameter should identify if yp-shell supports the parameter.

yp-web-app

The yp-web-app is a WEB-UI application. It is also a NETCONF client that only connects 1 session to the local server. A WEB interface to the server data and notifications is provided.

The netconfd-pro and yp-web-app programs must be built with the make flag WITH_YP_WEB=1.

Refer to the :ref:YP-WEB User Manual` for more details.