This repository contains GNMI plugin for Nornir leveraging pyGNMI library
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)
pip install nornir_pygnmi
Release 0.2.1:
- Amended documentation to show possibility to use
port
key in theconnection_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 theonce
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 singleGet()
RPC implemented innornir_pygnmi
asgnmi_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