When I run the below code getting the read timeout error, need expert advice
Things you might try to fix this:
- Adjust the regex pattern to better identify the terminating string. Note, in
many situations the pattern is automatically based on the network device's prompt. - Increase the read_timeout to a larger value.
from netmiko import ConnectHandler
device = { 'device_type': 'cisco_ios', "ip": "10.154.12.11", "username": "johor", "password": "MA1776",}
net_connect = ConnectHandler(**device)
ntp_config = ['clock timezone UTC 0',]
output = net_connect.send_config_set(ntp_config, read_timeout=90.0)
print(output)
net_connect.disconnect()