In Part I of the Ansible series, we looked at how to backup the configuration of network devices like cisco, juniper, arista, etc to the local disk of the ansible control node. However, in this post, we will see how we can take the backup of the configuration directly to the TFTP server using Ansible….
Category: Network Automation
How to backup network devices using Ansible – Part I
After a lot of procrastination and apprehension to learn Ansible for reasons that network industry folks are well aware of, I finally have to learn Ansible because the job demands it now. Of course, one of the primary tasks is to learn how to back up the configuration of network devices using Ansible. In this…
Netmiko SSH Proxy/JumpServer
This post is going to talk about the ways you could use to access the end devices through the jump server or a proxy server. I am going to use Netmiko which is my all-time favorite tool whenever I need to programmatically interact with network devices. Let’s see how we can leverage Netmiko SSH proxy…
Netmiko SSH Proxy via JumpHost
Off late I have been required to access the network devices through a JumpHost. One of the easiest methods to do this was using python’s netmiko module. My setup looks like this Windows Machine ——- SSH tunnel ——- Linux JumpHost ——-SSH to ——- Network Devices Here are the basic steps that I followed to get…
What is Pydantic?
While reading about FASTAPI, it became more imperative to understand a little more about Pydantic to be able to build a better and more robust self-made API. In this post, I will try to answer the questions I had on my journey to understand more about FASTAPI. What is Pydantic and What is it used…
Python API Using FASTAPI – UPDATE – PUT – PATCH – Part V
To continue our journey to build a python API using FASTAPI, we will see how to update a record in the database either fully or partially. These operations are called PUT or PATCH. The fundamental difference between a PUT and PATCH operation is that PUT indicates updating the entire record while PATCH means updating a…
Python API Using FASTAPI – POST – CREATE – Part IV
Up until now, we have seen various techniques of dealing with GET requests but this post will deal with the next operation of POST which means creating a new object or resource on the server/database. The table below gives the mapping of the HTTP request methods to CRUD operations. Let’s see how to use POST…
Python API Using FASTAPI – For Network Engineers – Path and Query Parameters – Part III
To make a properly documented Python API Using FastAPI, we can use fastapi’s Path and Query module to pass in more parameters that give more context to that the path and query variables that we use. For example from previous posts if we consider this little excerpt PATH PARAMETERS And now if we go to…
Python API Using FASTAPI – For Network Engineers – Dynamic Routes – Part II
In Part 1 we saw how to get started with FASTAPI and writing simple GET endpoints. In this post, we will see how we can configure dynamic routes to accept variables in the get request. Please note I am not referring to passing query parameters here. We will see how to use query parameters in…
Python API Using FASTAPI – For Network Engineers – Part I
There are multiple frameworks one could leverage to write a simple API but in this post, we are going to talk about a relatively newer framework called FASTAPI for writing your own quick and simple python API using FASTAPI for network automation. Step1:- Create a virtual environment and install the required libraries. Step2:- Download database.csv…