diff options
author | Ganesh Nalawade <ganesh634@gmail.com> | 2019-01-21 12:21:09 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-21 12:21:09 +0530 |
commit | f547c88adec71b8822cfd30df1a5850bdc778c02 (patch) | |
tree | c431c9035106614899f7d361de6d17bf06c5c1a2 /lib/ansible/plugins/netconf | |
parent | 1b6228fa10f98f279102cef6076bd021c889acde (diff) | |
download | ansible-f547c88adec71b8822cfd30df1a5850bdc778c02.tar.gz |
Fix connect_timeout config varaible in netconf connection (#51055)
* Fetch connect_timeout value from get_options()
instead of play_context
Diffstat (limited to 'lib/ansible/plugins/netconf')
-rw-r--r-- | lib/ansible/plugins/netconf/ce.py | 2 | ||||
-rw-r--r-- | lib/ansible/plugins/netconf/iosxr.py | 2 | ||||
-rw-r--r-- | lib/ansible/plugins/netconf/junos.py | 2 | ||||
-rw-r--r-- | lib/ansible/plugins/netconf/sros.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/ansible/plugins/netconf/ce.py b/lib/ansible/plugins/netconf/ce.py index 1191811aba..ef41b54994 100644 --- a/lib/ansible/plugins/netconf/ce.py +++ b/lib/ansible/plugins/netconf/ce.py @@ -107,7 +107,7 @@ class Netconf(NetconfBase): hostkey_verify=obj.get_option('host_key_checking'), look_for_keys=obj.get_option('look_for_keys'), allow_agent=obj._play_context.allow_agent, - timeout=obj._play_context.timeout + timeout=obj.get_option('persistent_connect_timeout') ) except SSHUnknownHostError as exc: raise AnsibleConnectionFailure(to_native(exc)) diff --git a/lib/ansible/plugins/netconf/iosxr.py b/lib/ansible/plugins/netconf/iosxr.py index 8e641aa4a2..d80f0dbeea 100644 --- a/lib/ansible/plugins/netconf/iosxr.py +++ b/lib/ansible/plugins/netconf/iosxr.py @@ -109,7 +109,7 @@ class Netconf(NetconfBase): hostkey_verify=obj.get_option('host_key_checking'), look_for_keys=obj.get_option('look_for_keys'), allow_agent=obj._play_context.allow_agent, - timeout=obj._play_context.timeout + timeout=obj.get_option('persistent_connect_timeout') ) except SSHUnknownHostError as exc: raise AnsibleConnectionFailure(to_native(exc)) diff --git a/lib/ansible/plugins/netconf/junos.py b/lib/ansible/plugins/netconf/junos.py index f0b2a266d6..55ca60fb99 100644 --- a/lib/ansible/plugins/netconf/junos.py +++ b/lib/ansible/plugins/netconf/junos.py @@ -117,7 +117,7 @@ class Netconf(NetconfBase): hostkey_verify=obj.get_option('host_key_checking'), look_for_keys=obj.get_option('look_for_keys'), allow_agent=obj._play_context.allow_agent, - timeout=obj._play_context.timeout + timeout=obj.get_option('persistent_connect_timeout') ) except SSHUnknownHostError as exc: raise AnsibleConnectionFailure(to_native(exc)) diff --git a/lib/ansible/plugins/netconf/sros.py b/lib/ansible/plugins/netconf/sros.py index 910b92e2d6..c4504ca398 100644 --- a/lib/ansible/plugins/netconf/sros.py +++ b/lib/ansible/plugins/netconf/sros.py @@ -86,7 +86,7 @@ class Netconf(NetconfBase): hostkey_verify=obj.get_option('host_key_checking'), look_for_keys=obj.get_option('look_for_keys'), allow_agent=obj._play_context.allow_agent, - timeout=obj._play_context.timeout + timeout=obj.get_option('persistent_connect_timeout') ) except SSHUnknownHostError as exc: raise AnsibleConnectionFailure(to_native(exc)) |