My first Python module: nornir_ipfabric
A journey from writing a script to publishing my first Python module.
Network automation has been one of my favorite topics for a long time.
The main reason is to save time, delegating to IP Fabric the creation of the inventory and collecting information from the network devices.
For a small team this means having more time to focus on the automation scripts instead of scraping CLI output and maintaining RegExp in discovery scripts. Note that this is just a small part of the product features.
But no plan survives contact with the enemy and #486 happened:
RFC separating plugins from nornir core. Plugins will live in their own repo.
With this new unplanned obstacle on the path I had two options:
- give up
- learn how to write and publish a Python module
That’s the story about how I started a new challenge and spent nights and weekends
having no idea of what I was doing reading documentation and learning from other people's code
how to create a proper Python module starting from a script.
The use of the module is described in the README with some examples.
Some people say
The journey is more important than the destination.
That’s true in most cases but at the same time the destination is the reason we take the first step and hit the road, a journey without a destination is wandering.
I really enjoyed the journey, it forced me out of my comfort zone, I had to learn new tools and to read a lot of source code. The former is a very effective way to learn but beware of the dark side of copy-paste programming.
Every destination is just another dot on a bigger diagram.
Creating nornir_ipfabric I’ve slightly experienced the daily work of coders and I must admit I really enjoyed it.
I have no plans to give up my career as Network Engineer to work as a full-time dev, but now the two worlds are colliding so a mix of the two roles is very likely to happen.
Feel free to open an issue if you find any bugs.