diff options
author | Miroslav Miklus <mmiklus@cisco.com> | 2016-09-21 16:59:57 +0200 |
---|---|---|
committer | Miroslav Miklus <mmiklus@cisco.com> | 2016-09-29 13:29:02 +0000 |
commit | 14085cfc14bdd3213083b4488e2cd7a15c09a7d9 (patch) | |
tree | b334b80f691e2fe8cf1e65eb5493b8f670a18716 | |
parent | bff480ceb6e7dd9f624f3c8e39f7d7ece1f9248e (diff) |
Enable paramiko ssh keepalive (10s)
Change-Id: I1e46ad76f033d239ad29d3b6fe00011a4444453d
Signed-off-by: Miroslav Miklus <mmiklus@cisco.com>
-rw-r--r-- | resources/libraries/python/ssh.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/resources/libraries/python/ssh.py b/resources/libraries/python/ssh.py index f35b925d10..298c93ee8e 100644 --- a/resources/libraries/python/ssh.py +++ b/resources/libraries/python/ssh.py @@ -65,6 +65,8 @@ class SSH(object): password=node.get('password'), pkey=pkey, port=node['port']) + self._ssh.get_transport().set_keepalive(10) + SSH.__existing_connections[node_hash] = self._ssh logger.trace('connect took {} seconds'.format(time() - start)) |