Friday, April 23, 2021

Need help with Netmiko for Arista EOS

Hello,

I am about to lose my mind, so please help:) Trying to configure VLANS on Arista EOS switches with Netmiko but it hangs and times out. Exact same script works fine for Cisco but not Arista. Any ideas?

Thank You!

from netmiko import ConnectHandler
EOS3 = {
'device_type': 'arista_eos',
'ip': '192.168.122.83',
'username': 'cisco',
'password': 'cisco'
}
EOS4 = {
'device_type': 'arista_eos',
'ip': '192.168.122.84',
'username': 'cisco',
'password': 'cisco'
}
Arista_devices = [EOS3, EOS4]
for devices in Arista_devices:
net_connect = ConnectHandler(**devices)
for n in range (2,6):
print ("Creating VLAN " + str(n))
config_commands = ['vlan ' + str(n), 'name Netmiko_VLAN_' + str(n)]
output = net_connect.send_config_set(config_commands)
print (output)



No comments:

Post a Comment