summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils/ios.py
Commit message (Collapse)AuthorAgeFilesLines
* Add ios changes for Python3 (#24601)Ganesh Nalawade2017-05-171-8/+14
| | | | | | | | | | | | | * 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
* Redo #23418 (#23425)Nathaniel Case2017-04-071-1/+6
| | | | | | | | * Check for provider values inside check_args of respective network code * Partial revert of b9ee5aa The no_log change is okay, but take out the action result munging
* Fixes #23388 Network provider masks too much (#23418)Chris Alfonso2017-04-071-1/+1
| | | | | | * Fixes #23388 Network provider masks too much * Fix trailing whitespace
* Fix ios_config return on python 2.4 (#23094)Ricardo Carrillo Cruz2017-03-301-1/+4
|
* Introspect flag to use on 'show run' when using defaults in ios_config (#22903)Ricardo Carrillo Cruz2017-03-281-0/+10
| | | | | | | | When the ios_config module has 'defaults' param it runs in the device the command 'show running-config all' but 'all' may not be available in older devices. This change makes introspection by using the help command and run 'full' in case 'all' is not available. Fixes #22747
* Add no_log to all network module_utils provider argument (#22566)Ricardo Carrillo Cruz2017-03-131-1/+1
| | | | | | | The provider argument on the network modules argspec can contain credentials. Make sure we don't log it. Fixes #21892
* Fixing issue #22193 - authorize argument is not deprecated for 2.3 for ios ↵Chris Alfonso2017-03-071-1/+1
| | | | and eos (#22326)
* fixes ios_command to_command method (#21792)Peter Sprygada2017-02-221-1/+1
| | | | | Changes key from response to answer to match expected payload fixes #21791
* removes the default kwarg in ios_argument_spec for timeout (#21552)Peter Sprygada2017-02-171-1/+1
| | | | | Uses the configured timeout setting instead of the arg_spec fixes #21520
* check cli context to be sure out of config mode in ios (#21493)Peter Sprygada2017-02-161-7/+8
| | | | | | | This change will now check the cli context after a module runs and if the cli is still in config mode it will exit config mode. Also fixes a minor issue with converting list of commands to a dict fixes #21481
* fixes ios_facts that was returning no values (#21357)Peter Sprygada2017-02-131-2/+12
| | | | | | | * adds conversion to command dict into ios shared lib * fixes hardware commands in ios_facts * adds network_os value to play_context in ios action plugin fixes #21190
* updates ios modules to support persistent socket (#21258)Peter Sprygada2017-02-131-7/+27
| | | | | | | | * updates all ios modules to support persistent socket * adds ios action plugin to connect to device * adds exec_command() to ios shared module * fixes ios_config and ios_template local action * update all unit test cases * adds base test module for ios module testing
* fixes ios and eos command modules (#20989)Peter Sprygada2017-02-021-0/+1
| | | | | | * returns support for prompt/response over cli * now sends native dict instead of str command * fixes issue with run_commands() in ios to jsonify request * updates unit test cases
* removes assert and uses to_list common function (#20866)Peter Sprygada2017-02-011-3/+2
| | | | non impacting change to refactor assert statement out of ios shared module
* refactors ios shared module (#19850)Peter Sprygada2017-01-041-203/+65
| | | | | This allows the ios_* modules to take advantage of the new network_cli connection plugin by refactoring the ios shared module. Individual modules need to be udpated as well
* Network module cleanup (#17334)Nathaniel Case2016-09-061-73/+64
| | | | | | | | | | | | * Clean up EOS, IOS, IOS-XR, Junos, NX-OS, and OpenSwitch * Cleanup net* files * Re-add NetworkModule import to network module_utils files This will trick modules into importing code from module_utils code, thus including it in the final Ansiballz zipfile. * Give asa a look over, too
* fixes authorize method in ios shared modulePeter Sprygada2016-08-311-7/+8
| | | | | | The authorize method was calling run_commands() instead of execute(). This fixes that problem so that authorize() calls are made direclty on the shell object now
* minor update to the ios shared modulePeter Sprygada2016-08-211-2/+2
| | | | | This completes the refactor for the ios shared module to change the derived class from NetCli to CliBase.
* fix import statement in ios shared modulePeter Sprygada2016-08-201-4/+4
| | | | This fixes the import statement when netcmd was renamed to netcli
* removes functions from ios modulePeter Sprygada2016-08-201-73/+23
| | | | | | This removes top level functions from the ios module and moves them into the specific modules. This update also includes some clean up of the Cli transport
* Update IOS with new NetworkModuleNathaniel Case2016-08-081-20/+5
|
* add new features to ios shared modulePeter Sprygada2016-07-111-67/+109
| | | | | | | | * add load_config() for loading a set of configuration commands * add load_candidate() function for loading a candidate config * updates shared module to provide NetworKModule instead of get_module * fixes Cli transport implementation for 2.2 refactor * updates ios documentation fragments with new options
* adds restconf transport option to ios shared modulePeter Sprygada2016-07-091-2/+163
|\ | | | | | | | | | | | | | | | | | | | | includes changes from PR ansible/ansible#16636 and refactors for the NetworkModule changes new features * ios now supports transport=restcon will additional arguments * ModuleStub refactored into common network shared module * import temporary get_module() function (to be removed prior to 2.2 final)
| * Implement IOS restconfPeter Sprygada2016-07-071-2/+159
|/
* Net mod ios (#16426)Nathaniel Case2016-07-071-152/+50
| | | | | | | | | | | | | | * Update IOS with new NetworkModule * Remove redundant EOS code * `authorize` can get rolled into NetCli * Fix up IOS to where EOS is. * Update IOSXR for NetworkModule * collections is unnecessary
* fixes issues with authenticating using ssh-agent for ios devicesPeter Sprygada2016-06-061-2/+7
| | | | | | | Exception was raised when trying to use ssh-agent for authentication to ios devices. This fix enables ssh-agent and enable use of password protected ssh keys. There is one additional fix to capture authentication exceptions nicely.
* Clarify exception handling in net modules (#15507)Nathaniel Case2016-04-251-25/+22
| | | | | | | | | | | | | | | | | | | | * Clarify exception handling in EOS Also modify to EOS to standardize modules. It makes vimdiff a lot less angry * Move IOS exception handling into Cli * Move IOS-XR exception handling into Cli * Move JUNOS exception handling into Cli * Move NXOS exception handling into Cli And reorganize to make it match the other modules * Move OpenSwitch exception handling into Cli More speculative restructuring here
* Allow timeout to be configurable (#14973)Patrick Ogenstad2016-04-141-3/+4
|
* Update IOS, IOSXR, JUNOS, & OpenSwitch for environment vars.Nathaniel Case2016-04-121-8/+9
|
* Fix network modules for ziploader changesNathaniel Case2016-04-061-4/+4
|
* ZiploaderToshio Kuratomi2016-04-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ziploader proof of concept (jimi-c) * Cleanups to proof of concept ziploader branch: * python3 compatible base64 encoding * zipfile compression (still need to enable toggling this off for systems without zlib support in python) * Allow non-wildcard imports (still need to make this recusrsive so that we can have module_utils code that imports other module_utils code.) * Better tracebacks: module filename is kept and module_utils directory is kept so that tracebacks show the real filenames that the errors appear in. * Make sure we import modules that are used into the module_utils files that they are used in. * Set ansible version in a more pythonic way for ziploader than we were doing in module replacer * Make it possible to set the module compression as an inventory var This may be necessary on systems where python has been compiled without zlib compression. * Refactoring of module_common code: * module replacer only replaces values that make sense for that type of file (example: don't attempt to replace python imports if we're in a powershell module). * Implement configurable shebang support for ziploader wrapper * Implement client-side constants (for SELINUX_SPECIAL_FS and SYSLOG) via environment variable. * Remove strip_comments param as we're never going to use it (ruins line numbering) * Don't repeat ourselves about detecting REPLACER * Add an easy way to debug * Port test-module to the ziploader-aware modify_module() * strip comments and blank lines from the wrapper so we send less over the wire. * Comments cleanup * Remember to output write the module line itself in powershell modules * for line in lines strips the newlines so we have to add them back in
* enhancement to ios shared module connectionPeter Sprygada2016-04-041-3/+10
| | | | | | this enhancement will cause the module to connect to the remote ios device the first time a command wants to run instead of building a connection immediately
* adds additional details in exception handling to ios shared modulePeter Sprygada2016-04-041-0/+2
|
* feature to localize prompt search logic for ios shared modulePeter Sprygada2016-03-291-4/+20
| | | | | | Prompt search logic is now localized to the ios shared module instead of using the common regexps in the shell module. This resolves a number of problems with ios modules functioning properly
* feature in ios to tell shell not to kickstartPeter Sprygada2016-03-131-1/+1
| | | | | This commit is necessary to tell shell not to kickstart the cli session as it causes problems in IOS to recognize the prompt.
* minor bugfix that will catch connection errors in iosPeter Sprygada2016-02-171-1/+2
| | | | | | This commit fixes a situation where connection errors would be caught but no useful information display. The connection error is now caught and emitted in a call to fail_json
* Move Conditional class to netcfg. Added error handling for connect and ↵chouseknecht2016-02-111-2/+13
| | | | | | execute methods. Fix comments
* adds provider argument to ios shared modulePeter Sprygada2016-01-191-12/+13
| | | | | | | New argument `provider` added to the ios shared module that provides the ability to pass all of the common ios arguments as a dict. This commit includes some minor bugfixes and refactoring of names. It also includes udpates to the ios documentation fragment for the new argument
* bugfix in ios shared module for including defaultsPeter Sprygada2016-01-111-1/+1
|
* updates the ios shared module with new shellPeter Sprygada2016-01-081-130/+83
| | | | | | This update refactor the ios shared module to use the new shell shared library instead of issh and cli. It also adds the ios documentation fragment to be used when building ios based modules.
* bugfix for ios.py shared module argument creationPeter Sprygada2015-12-031-18/+3
| | | | | | This patch fixes a bug in module_utils/ios.py where the the wrong shared module arguments are being generated. This bug prevented the shared module from operating correctly. This patch should be generally applied.
* initial add of the ios shared modulePeter Sprygada2015-12-011-0/+195
This adds shared module support for building modules that connect to Cisco IOS devices. It builds on the module_utils/ssh.py shared module.