community.general/lib/ansible/plugins/cliconf
Ricardo Carrillo Cruz a56de25df5
Fix persistent command timeout handling (#34791)
* Fix persistent command timeout handling

We were using play context timeout on ansible-connect to set
the persistent command timeout handler. Thus, we were ignoring
the persistent_command_timeout setting.
Moreover, even by changing that on ansible-connection, were again
overriding it on cliconf send_command, since in a same process we can
just set a single alarm and cliconf send_command alarm setup is executed
after ansible-connection alarm setup.

* Remove alarm setting on cliconf send_command

The alarm is set regardless before it is executed by ansible-connection.
Setting an alarm again, overrides/disables the previous ones as a single
process can just have a single alarm set.

* Move the setting of persistent command timeout to network_cli

We do also use ansible-connection for connection local, so if a
user provides a timeout via provider that would be ignored if we
set the value on ansible-connection.
Moving that logic to network_cli plugin constructor makes both
connections to work.

* Remove debug statements

* Set the persistent command timeout on task_executor

We can't set the timeout on ansible-connection nor network_cli,
otherwise tasks using provider timeout won't work.
2018-01-13 15:54:44 +01:00
..
__init__.py Fix persistent command timeout handling (#34791) 2018-01-13 15:54:44 +01:00
aireos.py Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
aruba.py Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
asa.py Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
enos.py Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
eos.py Refactor EOS code to use cliconf (#34426) 2018-01-11 13:33:33 +01:00
ios.py Refactor IOS libs to use cliconf (#34136) 2018-01-11 11:50:01 +01:00
iosxr.py IOS XR cli tests move to network_cli (#34007) 2017-12-20 11:26:09 -05:00
ironware.py Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
junos.py Refactor common network shared and platform utils code into package (#33452) 2017-12-03 21:42:30 +05:30
nxos.py nxos tests to use network_cli (#34474) 2018-01-05 12:39:04 -05:00
onyx.py Mellanox OS name change: MLNXOS changed to ONYX (#34753) 2018-01-11 22:21:17 +00:00
vyos.py Fix vyos sending `'None'` to device (#33889) 2017-12-15 11:20:53 -05:00