Nornir 3 Filtering Demo
This repository contains a set of examples and use-cases using nornir filtering.
Table of Contents
Installation
In order to use the demo, please follow the installation instructions below:
- Create the virtual environment to run the application in:
virtualenv --python=`which python3` venv
source venv/bin/activate
- Install the requirements:
pip install -r requirements.txt
Structure
The demos provided in this repository are provided as "canned demos".
That is, all commands, requirements and dependencies are contained inside each folder.
The demos work their way up in terms of complexity and depth of use-cases and are intended to be followed in the order that is shown below:
Level |
Description |
001-basic |
Basic nornir filtering using one-dimensional filters |
002-intermediate |
Intermediate nornir filtering using multi-dimensional filters |
003-advanced |
Advanced filtering using the F filter, filter functions and "chained" filters |
In addition to this, each demo contains all the code of the previous demo, so you can compare functions and see the differences.
For example, 003-advanced
will contain all code from the 001-basic
and 002-intermediate
demos.
Videos
To watch all three demos, including explanations, please watch the video below:
nornir - Filtering Deep Dive
Reference Documentation
Below are some links to other resources which you might find of assistance:
Nornir - Offical Documentation - Filtering the inventory
Filtering Cheatsheet
See the CHEATSHEET