1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-04-17 13:28:27 +00:00

ssh_netmiko.py: Add read_timeout to send_command()

When a command runs for more than 10 seconds (for example traceroute), then the web UI shows "Something went wrong.".
This happens because the default timeout for send_command() is 10 seconds: https://github.com/ktbyers/netmiko/blob/develop/netmiko/base_connection.py#L1664-L1668
This commit is contained in:
Paul Tobias 2026-03-11 17:25:20 +07:00 committed by GitHub
parent fd34bda03f
commit 8b051291f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,10 @@ class NetmikoConnection(SSHConnection):
global_args = netmiko_device_globals.get(self.device.platform, {})
send_args = netmiko_device_send_args.get(self.device.platform, {})
send_args = {
"read_timeout": params.request_timeout,
**netmiko_device_send_args.get(self.device.platform, {}),
}
driver_kwargs = {
"host": host or self.device._target,