Connecting to devices from different vendors using NAPALM
Let's start by learning how to connect to devices from different vendors using NAPALM. In Chapter 4, Configuring Network Devices Using Netmiko, we saw the idea of passing the type of device to the library so that the background code of our library can behave differently. NAPALM takes this concept to the next level and uses drivers to abstract the different vendors and provide a common interface.
Getting ready
Open your code editor and create a file called connect_device.py
. Next, in your Terminal, navigate to the same directory that you just created the connect_device.py
file in.
How to do it…
We will use the following steps to establish a connection to our network device using NAPALM:
- Import the
napalm
module:import napalm
- From the
napalm
module, retrieve the appropriate driver for your device's vendor. Please refer to the How it works… section for a list of possible drivers:driver...