pyGNMI plugin for Nornir.
Project description
pyGNMI plugin for Nornir
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.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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file nornir_pygnmi-0.2.0.tar.gz.
File metadata
- Download URL: nornir_pygnmi-0.2.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cb894671c0e6ad66e1d7c314109a4f809f6df38cd6cd31b283a8df94201dee6
|
|
| MD5 |
c317c65b301052ab463d1bc5ec428679
|
|
| BLAKE2b-256 |
4a21ea4745e47166e84dac95c9dbe278d47877419c2310e97d7ee6c10df821da
|