As network engineers, we have seen the shift from physical hardware to virtual machines. Docker is taking the concept of virtual machines a step further and make it even better. To revisit, let’s see what is a Virtual Machine. Virtual Machines A hypervisor runs between base infrastructure, a physical server most of the time and…
Category: Network Automation
Python Scrapli AsyncIO Usage
We have seen how to achieve parallel task execution in python using multi-threading as in the below-linked post. Let’s see how we can leverage Python Scrapli AsyncIO to achieve similar results. Part1 of scrapli can be found here What is AsyncIO? asyncio is a library to write concurrent code using the async/await syntax. asyncio is used as a foundation…
[Practical] Multithreading vs Multiprocessing vs Asynchronous
We have already seen in theory how all of the above differ and where each of them is applicable and useful. In this post, I will try to demonstrate the same concept using practical examples. I could have spun up tens of devices in GNS3/Eve-ng but I figured just using manual delays to simulate the…
[Theory] Multithreading vs Multiprocessing vs AsyncIO
I have been using a multi-threaded version of the synchronous codes that we usually see to interact with devices and for over a year now and I have a network of nearly 28k devices (routers / switches / WLCs / FWs ) that I need to manage. With that multithreaded version, I was able to…
How to use Scrapli for Network Automation
Scrapli stands for scrape cli very cleverly joined together in one word. Althought he source documentation of this network devices interaction library is really wonderful and can be found here, this is my journal on my path to learning various libraries for device interactions and understand how they differ from each other and which one…
How to read write excel using python openpyxl
In the previous articles, we have seen how to leverage pandas and csv modules for reading and writing csv and excel files. This post will talk about how to read write excel using python openpyxl. Although pandas is a much more robust package to deal with excel files or tabular data, it has its own…
What is YANG For Network Engineers
As network engineers are bombarded with more and more terms like NETCONF, RESTCONF, YANG, REST APIs every day, it’s becoming increasingly important to understand the basics of these terms if not in-depth for all network engineers. To begin this series of uncovering the meaning and relevance of these terms for network engineers, let’s start by…
How to Parse data with TextFSM
TextFsm is available as a plugin to various device interaction libraries like Netmiko but what if we need to use TEXTFSM as a standalone python package, it is also available. Conditions where you don’t have access to the devices but have outputs from the device in a text file. We have already seen how to…
Python Jinja2 For Network Engineers
Jinja2 is a templating framework that is extremely versatile and its usage is not limited to any particular field like networking or web development. In this post, we will see the power of Jinja2 for network engineers. This flow chart gives the overall concept of jinja2 Let’s take an example to make this more clear….
What is Digital Twin for Network Automation
As more and more of the infrastructure becomes virtualized and the gradual shift from conventional methods to CI/CD and DevOps mindset in the field of network engineering and automation is adopted, it is going to become an absolute necessity to have digital twins of the live networks. What is Digital Twin for Network Automation? Digital…