The demo contains all types of feasible nornir filters, but focuses on:
- nornir
F
filtering filter_func
- Filter functions- "Chaining" filters to highlight the full flexibility on offer
To see the demo in action, there are two options available.
This option uses motherstarter to convert the inventory.json and groups.json files into the equivalent nornir inventory data, ready to be used by the demo.
- Convert the inventory/groups.json files into nornir inventory files
motherstarter convert -sd inputs -td templates -st json -o nornir
- Execute the demo, which will printout the results of all the functions:
python code/003-advanced-filtering.py
This option just runs the demo only and does not use motherstarter.
- Execute the demo, which will printout the results of all the functions:
python code/003-advanced-filtering.py