summaryrefslogtreecommitdiff
path: root/lib/ansible/cli/scripts/ansible_connection_cli_stub.py
Commit message (Collapse)AuthorAgeFilesLines
* Use ansible.module_utils.common.text.converters (#80704)Matt Clay2023-05-031-1/+1
| | | Replace use of old `ansible.module_utils._text` and add a unit test to maintain backwards compatibility.
* Clean up unused imports in core (#79900)Matt Clay2023-02-031-1/+0
| | | | | * Clean up unused imports in core * Add changelog fragment
* Add support for importlib.resources (#78915)Matt Martz2023-01-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add support for importlib.resources * Remove the importlib.resources imports * return the correct data * Some code comments, and re-order for consistency * Disallow traversing packages below an individual collection * Add a traversable class for namespaces * Re-use variable * Utilize itertools.chain.from_iterable Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> * Simplify logic to check for packages from ansible loaders Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> * Just a generator expression, instead of a generator * docstrings * Add comment about find_spec for our namespaces * Add some initial unit tests for importlib.resources * normalize * Utilize importlib.resources for listing collections * collections_path is already in config, just use config * install uses a different default for collections_path * Remove unused import * Remove duplicate __truediv__ * Bring back TraversableResources * Apply some small suggestions from code review Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com> * Remove cross contamination between plugin loader code and CLI code * Remove unused import Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua> Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
* Replace get_persistent_connection_options in task_executor with get_options ↵Kate Case2022-08-171-6/+6
| | | | | | | | | | (#74446) Replace get_persistent_connection_options with get_options Remove special case for network sub_plugin in _set_plugin_options Try to avoid mock connection pretending to be persistent Rename variables->options to reflect what they actually are Gather options for ssh_type_conn on network_cli Drop reliance on sub_plugin["type"]
* Fix variable use before definition. (#78500)Matt Clay2022-08-111-3/+3
| | | | | | | * Fix variable use before definition. * Include mkstemp in exception handler. Also remove two pointless variable assignments.
* ansible-connection verboistery (#77509)Brian Coca2022-04-141-4/+7
| | | | | | | | | * ansible-connection verboistery for cli, just use normal parser creation this also adds --help, but that seems fine also some error cleanup Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
* Start of moving away from six (#75863)Martin Krizek2021-10-211-13/+6
| | | ci_complete
* Modernize install (#76021)Matt Martz2021-10-191-4/+13
| | | | | Co-authored-by: Matt Clay <matt@mystile.com> Co-authored-by: Matt Davis <mrd@redhat.com> Co-authored-by: Sviatoslav Sydorenko <wk.cvs.github@sydorenko.org.ua>
* Don't show params when there is an issue with `set_option(s)` (#75805)Matt Martz2021-09-281-2/+10
|
* force version on deprecation (#74338)Brian Coca2021-04-261-1/+1
|
* Remove __requires__ attribute for pkg_resources (#74294)Matt Martz2021-04-151-1/+0
|
* Address additional ansible_core rename issues (#72906)Matt Martz2020-12-081-1/+1
| | | | | * Update __requires__ to reference the correct ansible_core package name * ansible-test updates to handle the correct egg_info for ansible_core
* Revert "Fix missing persistent connection messages (#68496)" (#69147)Daniel Mellado2020-04-271-21/+3
| | | | | This reverts commit 5f6427b1fc7449a5c42212013d3f628665701c3d. as it breaks netconf connection. This will be a temporary measure for unlocking CI until a proper fix is shipped.
* Fix references to old egg-info directory.Matt Clay2020-03-301-1/+1
|
* Fix missing persistent connection messages (#68496)Nathaniel Case2020-03-301-3/+21
| | | | | * Be more proactive about returning module messages * Move message display to a function, and replace handling already in shutdown()
* Add test for reboot & wait_for_connection on EOS & IOS (#63014)Nathaniel Case2020-01-071-2/+2
| | | | | | | | | | | | | | * Add test for reboot & wait_for_connection * Add test for ios * Collection-proof block test * Add junos test * Don't try to evaluate cli context unless using the connection * Prevent infinite recursion
* Fix cli context check for network_cli connection (#64697)Ganesh Nalawade2019-11-261-5/+6
| | | | | | | | | | | | | * Fix cli context check for network_cli connection Fixes #64575 * Check cli context for network_cli connection at the start of new task run only. * Pass task_uuid around to identify start of new task run * Handle for local connection
* Refactor CLI prompt mode check for network plugins (#63945)Ganesh Nalawade2019-11-031-1/+2
| | | | | | | | | | | | | * Refactor CLI prompt mode check for network plugins * Move the CLI prompt mode check logic from action plugin to the controller side with the cliconf plugins. * This refactor also allows the network modules to initialise the persistent connection with remote device only when it is required. * Fix review comments
* Display leftover messages when shutting down. (#62431)Nathaniel Case2019-09-191-0/+3
|
* Fix network_cli exec_command connection init (#62344)Ganesh Nalawade2019-09-171-0/+4
| | | | | | | | | | | | | * Fix network_cli exec_command connection init Fixes https://github.com/ansible/ansible/issues/61596 * If `exec_command` method is invoked from module side on connection object to execute the command on target host check if connection is created if not create the connection. * Fix review comment
* Fix ansible-connection persist after playbook run complete issue (#61591)Ganesh Nalawade2019-09-061-1/+1
| | | | | | | | | | | | | | * Fix ansible-connection persist after playbook run issue * PR https://github.com/ansible/ansible/pull/59153 to add support for delaying the ansible-connection added an old issue of ansible-connection persisting even after playbook run is finished till either command timeout or connect timeout is triggered. ansible-connection persist after playbook execution is done and also delays the connection initilization untill a method in invoked from module side on the connection object. * Add chanegelog
* Add support for network_cli connection retry (#61103)Ganesh Nalawade2019-08-281-0/+1
| | | | | | | | | | | | | | * Add support for network_cli connection retry * Add network_cli connection configuration option to allow retrying the connection initialization with remote host. * Add docs * Fix test failures * Fix review comments
* Delay persistent connection until needed (#59153)Nathaniel Case2019-08-141-4/+1
| | | | | | | | | | | | | | * Delay calling connect() until absolutely necessary * Implement transport_test to enable wait_for_connection * plugin might be connected already for some reason? * ensure_connect for httpapi There's some become shenanigans still needing to be ironed out * Fix tests for network_cli
* move CLI entrypoints under ansible package (#60004)Matt Davis2019-08-021-0/+335
* needed so ansible-test can always find the right ones to copy to a target * renamed the underlying scripts to be properly accessible as Python modules