akarneliuk / nornir_pygnmi

pyGNMI plugin for Nornir

Home Page:https://training.karneliuk.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyGNMI plugin for Nornir

project_ version_ coverage_ tag_ license_

This repository contains GNMI plugin for Nornir leveraging pyGNMI library

Usage

Sample code example:

# Modules
from nornir.init_nornir import InitNornir
from nornir_utils.plugins.functions import print_result
from nornir_pygnmi.tasks import gnmi_capabilities

# Statics
NORNIR_CONFIG = "./config.yaml"

# Body
if __name__ == "__main__":
    # Initialise Nornir
    nrn = InitNornir(config_file=NORNIR_CONFIG)

    # Run task
    result1 = nrn.run(task=gnmi_capabilities)
    print_result(result1)

Installation

pip install nornir_pygnmi

Dev Log

Release 0.2.1:

  • Amended documentation to show possibility to use port key in the connection_options/pygnmi context.

Release 0.2.0:

  • Added new gnmi_subscribe() task. It supports all telemery subscription modes; however, from the Nornir perspective, the most benefitial is the once mode. In this case, the task will return a list containing output of all requested data. Such an approach is recommended by some vendors (e.g., Nokia) to collect huge data sets, which are not fitting into a single Get() RPC implemented in nornir_pygnmi as gnmi_get() task.

Release 0.1.2:

  • Added examples.
  • Modified communication of the task's status for all tasks.

Release 0.1.1:

  • Added gnmi_set() task.
  • Added placeholders for not-implemented methods.

Release 0.1.0:

  • First alpha release.

(c)2022, karneliuk.com

About

pyGNMI plugin for Nornir

https://training.karneliuk.com/

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%