In this lesson, you will learn:
- What is Nornir and NAPALM?
- The use-case that this integration can be applied to.
- A code walkthrough of the integration.
The integration we will cover first will be based on Nornir and NAPALM. For those of you who are new to Nornir and NAPALM:
Nornir (from the creator of Napalm, David Barrasso) is a pluggable multi-threaded framework with inventory management to help operate collections of devices. Nornir is 100% Python. Whereas many automation frameworks (such as Ansible) use their own domain-specific language (DSL), Nornir lets you control everything from Python.
NAPALM (Network Automation and Programmability Abstraction Layer with Multi-vendor support) is a Python library that implements a set of functions to interact with different network device operating systems using a unified API.
Our integration will therefore be based on the following (diagram below):
- NAPALM getters will be used to collect data from our devices and return the data in a normalized/vendor-agnostic format.
- Nornir will be used to run NAPALM against our devices using a static-based inventory.
- Multi-layer parametrization will be used within Pytest to dynamically generate the required tests.
- We will perform tests to validate the CPU and memory usage, and also the interface errors across a multi-vendor (Cisco, Juniper and Arista) network.