../_images/logo.png

yangcli-gw Introduction

../_images/yangcli-gw-1.png

The yangcli-gw program is a variant of yangcli-pro that supports distributed client application development. It provides an network management gateway to NETCONF/YANG-based systems using simple ZeroMQ-based messages.

  • There are no APIs to learn

  • There are no special libraries to link

  • There are only a few simple messages to learn using high-performance industry-standard ZeroMQ library APIs

The ZeroMQ messaging library is used by your application in almost any programming language to easily access the features of the yangcli-pro application.

Access all yangcli-pro built-in features from your application:

  • NETCONF session management

  • yangcli-pro command set

  • CallHome session management

  • User and Device Management

  • yangcli-pro and Bash scripting

  • Notification subscription service

  • YANG Push management and subscription service

The yangcli-gw program is an application server. It is intended to run standalone all the time. Your application programs (using industry-standard ZeroMQ APIs) can connect to one or more gateways at any time to access NETCONF sessions and other yangcli-pro features.

There are separate control plane and data plane sockets used. This allows your applications to be combined or be separate. If combined, a simple ZeroMQ 'Poller' can be used to monitor both sockets for responses and events. Since the yangcli-gw program is completely separate from your application, there are no implementation restrictions other than sending and receiving the yangcli-gw messages.

Multiple sessions are supported the same way as in yangcli-pro:

  • Named sessions must be used since the 'default' session can connect to one server at a time

  • The 'session set-current' command is used to switch between sessions

ZMQAPI Protocol

The ZMQAPI Protocol is defined in this document. It specifies the ZeroMQ message flows and message structure used by yangcli-gw.

  • Support for ZeroMQ Multipart messages is required

  • Support for JSON message decoding is recommended

Separate Command and Event Channels are used. These are not real channels like SSH. They are implemented with separate ZeroMQ sockets. The ZeroMQ endpoints and socket types used are configurable.

MultiPart Messages Using JSON, XML, or Text Payloads

ZeroMQ multipart messages are used to provide simple headers and flexible message components. Your application can request response payloads in multiple formats

  • none (return status only)

  • plain (yangcli-pro log format)

  • JSON

  • IETF-JSON (RFC 7951 JSON with module prefixes)

  • XML

Command Channel

The ZMQAPI Command Channel is a simple ZeroMQ Request/Response (REQ/REP) socket and message pattern. It is used for accessing the yangcli-pro command line. Almost all command line features can be used.

  • Complete commands are sent from your application

  • The gateway executes the command as if the --batch-mode CLI parameter is set to 'true'

  • A REP response is sent when the command is completed

Event Channel

The ZMQAPI Event Channel is a simple ZeroMQ Publish/Subscribe (PUB/SUB) socket and message pattern. It is used for accessing server notifications from NETCONF event streams and (YANG Push) datastores.

  • Simplified Event Stream configuration

  • Simplified YANG Push configuration

  • Data Node subscriptions

  • Unpacking of YANG 1.1 nested notifications and Schema Mount notifications