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.

You can find the scripts and code for this lesson within the Pytest repo under the directory: 005_integrations/002_nornir.

Integration Overview

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

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

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.

Key Points

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.
Ready to Master Network Automation? Start Your Journey Today!
Our membership provides:
  • Full deep-dive course library (inc. Batfish, pyATS, Netmiko)
  • Code repositories inc. full course code, scripts and examples
  • 24x7 multi-vendor labs (Arista, Cisco, Juniper)
  • Private online community
  • Live monthly tech sessions
  • Access to tech session library

Join Now ➜
Close You've successfully subscribed to Packet Coders.
Close Success! Your account is fully activated, you now have access to all content.
Close Welcome back! You've successfully signed in.
Close Nearly there! To activate your account, please click the link in the email we just sent you.