Updated: Jan 7, 2020
We are now in a brand-new decade. This new era of information technology will bring along many new changes. Some of those changes are already here.
Lately, I have been asked one question repeatedly by new engineers in the field, all the way up to CCIE’s.
And that question is…
“Do Network Engineers Really Need to Learn Python?”
YES, if your goal is to standout! End post......
Now in all seriousness. Almost every piece of technology that is being released today has some sort of API.
To give you a quick summary of what Application Programming Interfaces are. They are the glue that allows two or more applications to communicate with each other. Kind of like a middle man. You use python, postman or some other tool to send a northbound HTTP request to an API and it communicates with the Southbound device or application to perform your request. Pretty cool stuff once you get the hang of it.
REST, NETCONF and other tools will make the CLI a thing of the past. And this is for good reasons.
The data in API calls are structured. This gives you more flexibility to write custom applications and tools. When you write programs to send configs to a router using something like Netmiko, the data is returned unstructured and you have to parse through it. This can be a real pain. And you may not always return the data you expect.
So what programming language should you start with?
Hands down if you are in a Cisco environment your first language should be Python. They have written many of their tools in Python. Like the ACITool kit and Cobra and also their certification tracks cover Python. This is the number one reason I recommend focusing on Python at first.
Quick note. You do not need to become an expert programmer right away. The more you code, the more you grow. Be consistent in your learning and challenge yourself. Programming is about solving problems efficiently.
How and what to automate?
Think about the process you go through to close a ticket. Everyone goes through a series of steps from open to close.
Some of those steps can be automated. Maybe even the entire process.
But that’s exactly what DevOps is about..
An example of process for network engineers, would be your work plan and back out plan. In many cases we do this process over and over. Whether it be NAT and ACL requests or standing up a new WAN circuit. We have a process that we follow. Rather than going through the manual labor of creating a new work plan each time you do this task. You could write a python script that takes the source and destination ip, checks the existing ACLs and then creates your work and back out plan. All while adding it to your Remedy ticket by leveraging its API.
This is what automation is all about!
And if you are really ready for the next level. You could automate the entire workplan all the way down to the implementation and validation.
Freeing up, you, the engineer! Giving you time to focus. And the energy to push the infrastructure forward. Long gone will be the days of just putting out fires. We are Network Engineers that write clean, reusable, unit tested, and version controlled
Now the example I mentioned has many moving pieces. I don’t recommend automating a list of tasks this long right away. Start with a small task. Maybe create a ping script that’s checks to see if a list of devices are up or down and then returns the results.
I have an example here on my GitHub. Feel free to follow me and subscribe to our blog. If you have questions drop me a message below.
Automation is a skill we need to embrace. Just like our journey in IT. The more you understand your job and it’s processes the more you will find to automate.
Good luck! You awesome Hybrid Network Automation Developer Engineer in the making!