Replies: 3 comments 2 replies
-
@sagarCCIE Usually, you just add a try/except statement and keep going if one device fails. You could then add some Python logging indicating information about the failing device. Regards, Kirk |
Beta Was this translation helpful? Give feedback.
-
Hi. |
Beta Was this translation helpful? Give feedback.
-
In Netmiko 4.x (currently develop branch), I would do the following: import logging
from netmiko import ConnLogOnly
from devices import cisco3, cisco4, arista1, arista2
log_level = logging.INFO
log_file = "my_output.log"
for device in (cisco3, cisco4, arista1, arista2):
net_connect = ConnLogOnly(log_file=log_file, log_level=log_level, **device)
if net_connect:
print(net_connect.find_prompt())
|
Beta Was this translation helpful? Give feedback.
-
Hello Kirk, Team
I have list of 10 devices and if 1 from center fails, Netmiko scripts stop.
Any workaround to skip the failed one and keep continuing till the end.
Please assist
Beta Was this translation helpful? Give feedback.
All reactions