Pull persistent connection parameters via get_option (#39367)

* WIP Pull persistent connection parameters via get_option

* Fix pep8

* Add use_persistent_connection setting to paramiko_ssh plugin

* Add vars section to persistent_command_timeout setting and prevail provider values over config manager

* Use persistent_command_timeout on network_cli instead of timeout

* Fix unit tests

If we don't call loader to get network_cli, then _load_name is never
set and we get KeyError.

* Pull persistent_command_timeout via config  manager for ios connection local

* Pull persistent_command_timeout via config manager on connection local
This commit is contained in:
Ricardo Carrillo Cruz 2018-05-16 14:59:01 +02:00 committed by GitHub
parent 865f2c5990
commit 62e1c14edc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 64 additions and 22 deletions

View file

@ -151,8 +151,8 @@ options:
close
default: 10
ini:
section: persistent_connection
key: persistent_command_timeout
- section: persistent_connection
key: command_timeout
env:
- name: ANSIBLE_PERSISTENT_COMMAND_TIMEOUT
"""
@ -298,7 +298,7 @@ class Connection(ConnectionBase):
display.vvvv('ssh connection done, setting terminal', host=self._play_context.remote_addr)
self._ssh_shell = ssh.ssh.invoke_shell()
self._ssh_shell.settimeout(self._play_context.timeout)
self._ssh_shell.settimeout(self.get_option('persistent_command_timeout'))
network_os = self._play_context.network_os
if not network_os: