Device auto detect

Netmiko provides a mechanism that can guess the device type and detect it. It uses a combination of SNMP discovery OIDS and executes several show commands on the remote console to detect the router operating system and type, based on the output string. Then netmiko will load the appropriate driver into the ConnectHandler() class:

#!/usr/local/bin/python__author__ = "Bassim Aly"__EMAIL__ = "basim.alyy@gmail.com"from netmiko import SSHDetect, Netmikodevice = {    'device_type': 'autodetect',    'host': '10.10.88.110',    'username': 'admin',    'password': "access123",}detect_device = SSHDetect(**device)device_type = detect_device.autodetect()print(device_type)                   print(detect_device.potential_matches)device['device_type'] = device_type ...

Get Hands-On Enterprise Automation with Python. now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.