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.six import iteritems
from ansible.module_utils.ce import ce_argument_spec
@ -57,7 +58,7 @@ class ActionModule(_ActionModule):
pc.port = int(provider['port']) or int(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
self._task.args['provider'] = provider.update(
host=pc.remote_addr,
port=pc.port,