the worlds gone mad

we've lost the hope we had

Posted on 2 March 2022   4 min read

Pynetbox API calls using variables

using variables for netbox api urls and filters

Recently whilst using pynetbox to create NetBox environment objects I had a need to use variables in the URL of the API calls to allow for reusable functions to perform API calls based on the URL and data fed in as arguments. The reason the URL needs to be fed in as an argument when calling the function is because each NetBox element uses a different API URL.


Posted on 9 October 2021   13 min read

Nornir: Tasks, Plugins and Templates

building and running tasks

Nornir tasks are run against all or a subset of inventory members with the result formatted into a framework structured to show what was run against whom and the results. Tasks can be custom built python code or pre-built plugins that have been installed and imported.


Posted on 3 October 2021   10 min read

Nornir: Inventory Structure and Filtering

updating and filtering the inventory

The inventory is at the core of Nornir holding all the hosts that tasks will be run against and the variables that will be used by those tasks. Before any tasks can be run by Nornir the inventory has to be initialised.


Posted on 28 September 2021   12 min read

Nornir - The Basics

general nornir information to get started

If you have an understanding of Python and have been working with Ansible it is likely at some point you will get to the stage where you ask yourself ‘there has to be something better’. For network automation that better could well be Nornir.


Posted on 23 March 2021   14 min read

Automate Leaf and Spine Deployment - Part6

post validation

The 6th post in the ‘Automate Leaf and Spine Deployment’ series goes through the validation of the fabric once deployment has been completed. A desired state validation file is built from the contents of the variable files and compared against the devices actual state to determine whether the fabric and all the services that run on top of it comply.


Posted on 20 March 2021   25 min read

Automate Leaf and Spine Deployment - Part5

fabric services: tenant, interface, route

The 5th post in the ‘Automate Leaf and Spine Deployment’ series goes through the deployment of the services that run on top of the fabric. These services are grouped into 3 categories, tenant, interface and routing. Services are configured only on the leaf and border switches, the spines have no need for them as they just route the VXLAN encapsulated packets with no knowledge or care of what is within them.


Posted on 23 February 2021   9 min read

Automate Leaf and Spine Deployment - Part4

deploying the fabric with ansible

The 4th post in the ‘Automate Leaf and Spine Deployment’ series goes through the creation of the base and fabric config snippets and their deployment to devices. Loopbacks, NVE and intra-fabric interfaces are configured and both the underlay and overlay routing protocol peerings formed leaving the fabric in a state ready for services to be added.