community.general/lib/ansible/plugins/connection
Toshio Kuratomi d834412ead Fix for persistent connection plugin on Python3 (#24431)
Fix for persistent connection plugin on Python3.  Note that fixes are also needed to each terminal plugin.  This PR only fixes the ios terminal (as proof that this approach is workable.)  Future PRs can address the other terminal types.

* On Python3, pickle needs to work with byte strings, not text strings.
* Set the pickle protocol version to 0 because we're using a pty to feed data to the connection plugin.  A pty can't have control characters.  So we have to send ascii only.  That means
only using protocol=0 for pickling the data.
* ansible-connection isn't being used with py3 in the bug but it needs
several changes to work with python3.
* In python3, closing the pty too early causes no data to be sent.  So
leave stdin open until after we finish with the ansible-connection
process.
* Fix typo using traceback.format_exc()
* Cleanup unnecessary StringIO, BytesIO, and to_bytes calls
* Modify the network_cli and terminal plugins for py3 compat.  Lots of mixing of text and byte strings that needs to be straightened out to be compatible with python3
* Documentation for the bytes<=>text strategy for terminal plugins
* Update unittests for more bytes-oriented internals

Fixes #24355
2017-05-12 09:13:51 -07:00
..
__init__.py Fix password prompt matching (#24081) 2017-05-01 11:18:15 -04:00
accelerate.py E501 fixes (#22879) 2017-03-22 20:50:28 -05:00
chroot.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
docker.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
funcd.py Fix funcd to at least import without errors. (#16288) 2016-07-29 16:19:38 -04:00
iocage.py PEP 8 whitespace cleanup. (#20783) 2017-01-27 15:45:23 -08:00
jail.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
libvirt_lxc.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
local.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00
lxc.py Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423) 2016-09-06 22:54:17 -07:00
lxd.py Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423) 2016-09-06 22:54:17 -07:00
netconf.py Remove ununsed Connection.log method (#22837) 2017-03-23 12:24:39 -04:00
network_cli.py Fix for persistent connection plugin on Python3 (#24431) 2017-05-12 09:13:51 -07:00
paramiko_ssh.py Print specific error for BadHostKeyException (#24120) 2017-04-28 13:57:32 -04:00
persistent.py Fix for persistent connection plugin on Python3 (#24431) 2017-05-12 09:13:51 -07:00
ssh.py Ignores ControlPersist broken pipe errors. Fixes #16731 2017-04-07 09:06:28 -07:00
winrm.py fix spurious warnings with ansible_winrm_kinit_X args (#24380) 2017-05-08 11:27:25 -07:00
zone.py Update module_utils.six to latest (#22855) 2017-03-23 13:35:05 -07:00