summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/terminal
Commit message (Collapse)AuthorAgeFilesLines
* Add eos changes for Python3 (#24600)Ganesh Nalawade2017-05-242-27/+26
| | | | | | | | | | | | | | | | * eos python3 changes * changes to convert response from byte to text * Add dellos6 python3 changes Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 * Fix py3 prompt issue for invalid show command * Fix review comments * Add generic fix for error prompt in py3 * Fix CI issue * Fix network_cli unit test failure
* Python3 chokes on casting int to bytes (#24952)Nathaniel Case2017-05-231-1/+1
| | | But if we tell the formatter that the var is a number, it works
* Add nxos changes for Python3 (#24602)Ganesh Nalawade2017-05-201-15/+14
| | | | | | | | | | | | | | | | * Add nxos changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 * Fix CI issues * Fix review comment Replace surrogate_or_strict with surrogate_then_replace as per review comment os PR #24601
* Contributing new lib/ansible/plugins/terminal/ce.py module to manage HUAWEI ↵QijunPan2017-05-191-0/+54
| | | | | | | | | | | | | | data center CloudEngine switch (#21653) * commit plugins terminal ce.py module commit plugins terminal ce.py module * update plugins/terminal/ce.py update plugins/terminal/ce.py * deal with pep8 error
* Add ios changes for Python3 (#24601)Ganesh Nalawade2017-05-171-2/+2
| | | | | | | | | | | | | * Add ios changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 pep8 fixes * Fix CI issues * Fix review comment
* Add dellos9 changes for Python3 (#24607)Ganesh Nalawade2017-05-171-19/+20
| | | | | | | | | | * Add dellos9 changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 * Minor changes
* Add dellos6 changes for Python3 (#24606)Ganesh Nalawade2017-05-171-17/+18
| | | | | Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431
* Add dellos10 changes for python3 (#24608)Ganesh Nalawade2017-05-171-21/+22
| | | | | Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431
* Add sros changes for Python3 (#24604)Ganesh Nalawade2017-05-171-5/+4
| | | | | | | | | | | | | * Add sros changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 Code cleanup pep8 fixes * Fix CI issue
* Add vyos changes for Python3 (#24603)Ganesh Nalawade2017-05-171-8/+7
| | | | | | | | | | | * Add vyos changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 pep8 fixes * Fix CI issues
* Add iosxr changes for Python3 (#24605)Ganesh Nalawade2017-05-171-11/+12
| | | | | | | | | | * Add iosxr changes for Python3 Make `execute_command` arguments and its return value complaint to PY3 changes made in PR #24431 * Fix CI issue
* Fix for persistent connection plugin on Python3 (#24431)Toshio Kuratomi2017-05-122-34/+58
| | | | | | | | | | | | | | | | | | | 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
* Set terminal width for network *_command modules to avoid paging (#23728)Trishna Guha2017-04-256-6/+10
| | | Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* Remove catch-all regex on IOS terminal plugin (#23858)Ricardo Carrillo Cruz2017-04-211-1/+1
| | | | | | | | | | We have a list of specific messages that we scree-scrape and flag them as legit errors. However, we also have a catch-all regex that matches everything starting with %. That can cause issues on commands that return lines with that character, like for example the 'crypto key generate'. Fixes #23770
* Error string:Regular expression updates (#23426)Senthil Kumar Ganesan2017-04-131-1/+3
|
* Updated the Regex for promt matching (#23186)Senthil Kumar Ganesan2017-03-311-1/+1
|
* Ansible 2.3 feature support for dellos6. (#23084)Senthil Kumar Ganesan2017-03-301-0/+73
| | | | | | | | | | | | | | * Ansible 2.3 feature support for dellos6. - With the new Ansible 2.3 infra changes, the dellos modules doesn't work (the new infra changes are not backward compatible), so added the below changes support it. - Added the new terminal plugin for DellOS6 - Added the new action plugin for DellOS6 - Modified the modules to work with the new infra. - with that it adds support for DellOS6 Persistent Connection support. * Remove pep8 confirming files from dellos6.py and dellos6_config legacy-files
* minor updates to network connection plugins (#23043)Peter Sprygada2017-03-281-0/+31
| | | | * removes unused log() function in network_cli * adds method comments to terminal plugin base
* Ansible 2.3 feature support for dellos9 and dellos10 (#22856)Senthil Kumar Ganesan2017-03-272-0/+156
| | | | | | | | | | | * Ansible 2.3 feature support for dellos9 and dellos10 * Use Persistent Connection Manager * Fix CI issue, revert the doc and metadata changes * Reverted the meta_info (supported_by) to community from core * Fixed the CI issues, use module_utisl.six and updated legacy-files
* roll up of fixes for sros modules (#22972)Peter Sprygada2017-03-251-1/+1
| | | | | | * fixes action handlers for sros * fixes sros_config module execution to use AnsibleModule * fixes sros_command module to use socket connection * adds sros to constants
* Update module_utils.six to latest (#22855)Toshio Kuratomi2017-03-231-1/+1
| | | | | | | | * Update module_utils.six to latest We've been held back on the version of six we could use on the module side to 1.4.x because of python-2.4 compatibility. Now that our minimum is Python-2.6, we can update to the latest version of six in module_utils and get rid of the second copy in lib/ansible/compat.
* Fix junos prompt issue (#22536)Ganesh Nalawade2017-03-131-1/+1
| | | | Need to handle junos shell prompt that end's with '%'
* returns xml as a display option to junos_command (#21833)Peter Sprygada2017-03-021-1/+0
| | | | | | The display option xml as accidentially removed from the display argument. This patch adds xml back as an option. fixes #21823
* clean up of terminal plugins (#21549)Peter Sprygada2017-02-179-38/+19
| | | | | | * removes unneeded supports_multiplexing var * refactors terminal_prompts_re to terminal_stdout_re * refactors terminal_errors_re to terminal_stderr_re * updates network_cli unit test cases
* refactors junos modules to support persistent socket connections (#21365)Peter Sprygada2017-02-161-7/+0
| | | | | | | | * updates junos_netconf module * updates junos_command module * updates junos_config module * updates _junos_template module * adds junos_rpc module * adds junos_user module
* refactors nxos module to use persistent connections (#21470)Peter Sprygada2017-02-151-8/+0
| | | | | This completes the refactor of the nxos modules to use the persistent connection. It also updates all of the nxos modules to use the new connection module and preserves use of nxapi as well.
* updates eos modules to use socket (#21197)Peter Sprygada2017-02-131-5/+0
| | | | | | * updates eos modules to use persistent connection socket * removes split eos shared module and combines into one * adds singular eos doc frag (eos_local to be removed after module updates) * updates unit test cases
* starts cli if root user login is used for junos terminal (#20761)Peter Sprygada2017-02-071-1/+11
| | | fixes #20131
* Detect VyOS based on /etc/issue (support 1.0.5) (#20221)John R Barker2017-01-251-2/+2
| | | | | | | | * Detect VyOS based on /etc/issue (support 1.0.5) VyOS didn't contain `vyos` in `/proc/version` * Update vyos.py
* vyos_command 2.3 (#18994)Nathaniel Case2017-01-231-0/+4
| | | | | | | | * Peter's new module_utils/vyos * Update vyos_command * Restore `set terminal length $ANSIBLE_VYOS_TERMINAL_LENGTH` in vyos * vyos_command tests * Remove provider mentions from vyos_command * Extend get_config to take (and cache) various `show configuration` commands
* removes network os guess static method (#19467)Peter Sprygada2016-12-192-15/+2
| | | | | | For devices that do not support mutliplexing, we cannot automatically determine the network os. This removes the os guess static method from the terminal plugin. For this devices, the network_os value must be configured
* adds feature to try to auto determine network_os (#18674)Peter Sprygada2016-11-307-0/+37
| | | | | This updates the network_cli connection plugin to attempt to automatically determine the remote device os. The device network os discovery can be overridden by setting the ansible_network_os value.
* adds two new plugins that use ansible-connection for persistence (#18572)Peter Sprygada2016-11-289-0/+561
* adds new connection plugin `network_cli` which builds on paramiko * adds new plugin `terminal` used for manipulating network_cli terminals * adds new field to play_context `network_os` settable as ansible_network_os This commit adds the plugins necesary to establish a persistent cli connection to network devices of ssh. It builds on the paramiko connection plugin to create a shell environment that will persistent through ansible-connection. The `newtork_cli` plugin then uses the network_os in the instance of PlayContext to load the appropriate network OS environment plugin for handling opening and closing of shells as well as privilege escalation.