Persistent connection timer changes (#27272)

*  Add command_timeout timer that defines the amount
   of time to wait for a command or RPC call before
   timing out.
*  Remove connect_retries and connect_interval configuration
   varaible and replace it with connect_retry_timeout to control
   the timeout value of connection to local scoket.
*  Make required changes to netowrk action plugins and relevant
   network files in module_utils.
*  Required documentation changes.
This commit is contained in:
Ganesh Nalawade 2017-08-01 23:15:45 +05:30 committed by Chris Alfonso
parent 4dd8f281d6
commit 70ce394840
23 changed files with 154 additions and 73 deletions

View file

@ -22,6 +22,7 @@ __metaclass__ = type
import sys
import copy
from ansible import constants as C
from ansible.plugins.action.normal import ActionModule as _ActionModule
from ansible.module_utils.basic import AnsibleFallbackNotFound
from ansible.module_utils.aireos import aireos_argument_spec
@ -54,7 +55,7 @@ class ActionModule(_ActionModule):
pc.port = provider['port'] or self._play_context.port or 22
pc.remote_user = provider['username'] or self._play_context.connection_user
pc.password = provider['password'] or self._play_context.password
pc.timeout = provider['timeout'] or self._play_context.timeout
pc.timeout = provider['timeout'] or C.PERSISTENT_COMMAND_TIMEOUT
display.vvv('using connection plugin %s' % pc.connection, pc.remote_addr)
connection = self._shared_loader_obj.connection_loader.get('persistent', pc, sys.stdin)