Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Latest commit

 

History

History
111 lines (71 loc) · 3.84 KB

README.md

File metadata and controls

111 lines (71 loc) · 3.84 KB

Table of Contents

About gNMI

gNMI stands for gRPC Network Management Interface.

gNMI specifications are defined in this repository

The gNMI proto file is here

gNMI is the gRPC service. The Remote Procedure Calls (RPC) methods of the gNMI service are:

  • CAPABILITIES: to discover the capabilities of the target
  • SET: to modify the state of the target
  • GET: to retrieve snapshots from the target for a specified set of paths
  • SUBSCRIBE: to subscribe to updates from the target for a specified set of paths.

gNMI and EOS Switches

EOS supports the 4 gNMI RPCs described above.

The target is a network device. The gNMI server runs on the target.

The gNMI client, typically in a collector or in a network management system, sends the RPCs to the targets to modify and collect data.

Examples:

gNMI and CVP

About gNMI and CVP

CVP is the gNMI server.

Once we configured the devices to stream OpenConfig data to CVP, we can use gNMI to access to OpenConfig data on CVP.

CVP supports 2 gNMI RPCs:

  • CAPABILITIES
  • SUBSCRIBE

SUBSCRIBE has two modes:

  • ONCE: Equivalent of a GET RPC. Returns all data matching the subscription path at the specified time
  • STREAM: Returns the same as ONCE + subsequent updates until the client closes the subscription

This document describes how to access OpenConfig data streamed by the devices to CVP using gNMI.

Note: This is not yet fully supported by Arista so do not use it on production

Requirements

Configure the devices to stream OpenConfig data to CVP

Refer to the OpenConfig directory

Token based authentication

To use gNMI with CVP, token based authentication is required. To enable token based authentication, refer to this directory and copy the token into an environment variable.

token=xxxxx
echo $token

We can now use gNMI to access device OpenConfig data on CVP.

Origin and target

  • The default arista-origin is arista
    • arista-origin is arista for CVP data (inventory ...)
    • arista-origin is openconfig for the data streamed by devices to CVP
  • The default arista-target is CVP.
    • To get the states of a device, arista-target must be the deviceID (SN of the switch).

DeviceID

The deviceID is the device SN.
on CVP GUI, go to Devices > Inventory to get the device SN.

OpenConfig paths

Use the telemetry browser on CVP GUI (Settings and Tools > Developper Tools > Telemetry Browser) to view the OpenConfig data stored in CloudVision telemetry database. The paths in CVP are not exactly the OpenConfig paths. You will need to manipulate them to be able to use them with a gNMI client.

Refer to the YANG lab to understand how to generate paths and trees from YANG modules.

Examples

You will find in this directory examples using:

  • The gNMI command-line client:
    • gNMIc
    • gnmi
    • pygnmicli
  • The pyGNMI Python library
  • The gRPCurl command line tool
  • Postman using gPRC