summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils/eos.py
Commit message (Collapse)AuthorAgeFilesLines
* Add eos changes for Python3 (#24600)Ganesh Nalawade2017-05-241-22/+30
| | | | | | | | | | | | | | | | * 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
* Fix typos in eos module_utils (#24966)Abhijeet Kasurde2017-05-241-3/+3
| | | Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Remove deprecation for username/password eos_user, nxos_user and Doc update ↵Trishna Guha2017-05-221-3/+9
| | | | | (#24880) Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* Eos port default values (#23829)Nathaniel Case2017-04-201-1/+0
| | | | | | | | * Hook port back up for eos cli transport * The default values have moved * Why not have conditional defaults?
* EOS default transport (#23824)Nathaniel Case2017-04-201-3/+2
| | | * Give a default to eos transport
* Make warning logs consistent (#23666)Ganesh Nalawade2017-04-181-3/+17
| | | | | | | | | | | | * Make warning logs consistent Arguments outside provider with default value should not log as warning in case it is not mentioned in play. * Make nxos timeout default consistent and add comments * Make comments more verbose
* 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
* Unhardcode the port and protocol on eos EAPI (#23350)Ricardo Carrillo Cruz2017-04-061-11/+8
| | | | | We were hard-coding the protocol, port and validate_certs on eos EAPI via the action plugin. Put defaults on the eos_argument_spec and pull those values from it.
* Remove dupe supports_session method from eos module_utils (#23240)Ricardo Carrillo Cruz2017-04-041-4/+0
| | | Fixes #23237
* 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)
* roll up of eos fixes (#21987)Peter Sprygada2017-02-271-9/+1
| | | | * fixes to_command function in eos to not iterate over commands twice * fixes lots of minor issues with _eos_template
* fixes issue with config parents on eos modules (#21923)Peter Sprygada2017-02-251-11/+36
| | | | | | | eos_config module wasn't respecting config block path (parents). This patch fixes that problem. Also fixes a number of integration tests cases fixes #21903
* fixes issue that caused eapi transport setting to get lost (#21919)Peter Sprygada2017-02-251-3/+3
| | | | The eos action didn't properly set provider transport argument for the module. This patch fixes that problem
* roll up of eos fixes (#21629)Peter Sprygada2017-02-191-8/+7
| | | | | * fixes error where eos would close the cli shell * fixes network_cli connection plugin to check before calling open_shell() * fixes json commands being sent over eapi
* fixes eos action mapping of play_context values (#21614)Peter Sprygada2017-02-181-1/+1
| | | | | * adds mapping for ssh_keyfile * adds correct mappings for eapi * fixes missing no_log value for provider arg
* bug fixes and updates for eos connections (#21534)Peter Sprygada2017-02-161-9/+21
| | | | | | * refactors supports_sessions to a property * exposes supports_sessions as a toplevel function * adds open_shell() to network_cli * implements open_shell() in eos action plugin
* roll up of fixes for eos modules (#21406)Peter Sprygada2017-02-141-7/+8
| | | | | | | | * fixes issue with load_provider() not checking for an existing key * adds updates to eos_config results key * lots of minor syntax fixes in eos shared module * adds eos_argument_spec to eos_eapi fixes #21402
* updates eos modules to use socket (#21197)Peter Sprygada2017-02-131-93/+358
| | | | | | * 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
* bug fixes for shell exec command (#20988)Peter Sprygada2017-02-021-0/+1
| | | | | * fixes up eos_local to call appropriate method * fixes up ios_cli to call appropriate method * moves json conversion to eos
* PEP 8 E111 & E114 cleanup. (#20838)Matt Clay2017-01-301-1/+1
|
* reorganizes eos shared module (#20795)Peter Sprygada2017-01-281-22/+37
| | | | | * adds send_config function to handle pushing configuration commands * adds support for handling multiline banner commands * adds env var check to enable or disable config sessions
* updates eos shared modules (#20738)Peter Sprygada2017-01-261-283/+83
| | | | | | * eos module now uses network_cli connection plugin * adds unit tests for eos module * eapi support now provided by eapi module * updates doc fragment for eapi common properties
* fixes exception raised when extracting timeout value from ModuleStub in eapi ↵Peter Sprygada2016-11-281-1/+1
| | | | (#18651)
* pass module timeout value to fetch_url in eapi connection (#18633)Peter Sprygada2016-11-261-1/+3
| | | | This change causes the eapi connection to honor the module timeout value when calling fetch_url
* Exception.message gone in 3.x (#18221)Nathaniel Case2016-10-281-1/+2
| | | * Exception.message gone in 3.x
* fixes issue when checking if sessions are supported (#18013)Peter Sprygada2016-10-131-1/+1
| | | | the supports_sessions() call was sending the command as a string instead of a list which is required when transport is eapi. This fixes that bug
* fixes issue in eos shared module for earlier versions of EOS (#17980)Peter Sprygada2016-10-121-1/+18
| | | | | Earlier versions of EOS that do not support config sessions would create an exception. This fix will now check if the device supports sessions and if it doesn't, it will fall back to not using sessions
* switches the kickstart arg from True to False for eos (#17858)Peter Sprygada2016-10-021-19/+7
| | | | | | | | | The kickstart kwarg should be set to False for eos based devices and was set to True. This change cleans up problems loading json output from cli commands All eos_command test cases are now passing successfully fixes #17441
* fixes issue where config sessions where left behind (#17673)Peter Sprygada2016-09-201-1/+6
| | | | | | | | When using the Cli transport, if the session hung on a command and the socket timed out, the config session would be left behind. This change will allow the shell to try to get control back and remove the config session, assuming the channel is still open. fixes ansible/ansible-modules-core#4945
* Cleanup eos (#17548)Nathaniel Case2016-09-131-4/+3
|
* eos: cmd should be item (#17540)John R Barker2016-09-131-1/+1
| | | | | Was changed during https://github.com/ansible/ansible/commit/7fe64ef9b89428d82b5851b5d33b5bba4beb2082 however not all look variables were updated.
* cleans up load_config() in eos shared modulePeter Sprygada2016-09-111-13/+5
| | | | cleans up the load_config() method
* minor fix in eos shared module returning diffPeter Sprygada2016-09-071-0/+4
| | | | | | | The diff returned from eos when the transport was set to eapi was as a dict but is expected to be a str. This change extracts the diff string from the dict object and returns it. The behavior is now consistent between cli and eapi transports.
* Merge pull request #17431 from privateip/eosPeter Sprygada2016-09-071-32/+43
|\ | | | | minor roll up of fixes to eos shared module
| * minor roll up of fixes to eos shared modulePeter Sprygada2016-09-061-32/+43
| | | | | | | | | | | | * added back import of Command object * fixed eapi requests to handle output format correctly * get_config() now honors include_defaults kwargs
* | bug fix for AttributeError: 'str' object has no attribute 'get'Peter Sprygada2016-09-061-3/+7
|/ | | | | | | | | | Exception thrown when using cli transport in eos but piping the command through json * eos now checks for `| json` and automatically changes the output type * adds back import of Command object tested on EOS 4.15.4F
* Network module cleanup (#17334)Nathaniel Case2016-09-061-22/+21
| | | | | | | | | | | | * 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 two bugs in the eos shared modulePeter Sprygada2016-08-281-2/+2
| | | | | | * fixes issue with correctly returning the running-config over eapi when a call was made to get_config() * fixes issue the MRO in Cli transport
* updates eos shared modulePeter Sprygada2016-08-221-155/+80
| | | | | | | * adds support for netcli methods * adds support for netcfg methods * Cli class now derives from CliBase * adds eos_config action plugin
* Relicense low-hanging fruit to BSD (#17025)Nathaniel Case2016-08-101-13/+22
|
* adds restconf transport option to ios shared modulePeter Sprygada2016-07-091-4/+4
|\ | | | | | | | | | | | | | | | | | | | | 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)
| * EOS new ModuleStubNathaniel Case2016-07-071-5/+4
| | | | | | | | As per #16575
* | add helper factory function to avoid breaking network modules in develPeter Sprygada2016-07-091-2/+5
|\ \ | |/ |/| | | | | | | | | This is a temporary change to keep the get_module() function until all of the network module refactoring is completed to avoid breaking them in devel. The get_module() function should not be used and will be removed before 2.2 final.
| * Refactor network and eos module_utils to use a subclass instead of factory ↵Toshio Kuratomi2016-07-061-2/+4
| | | | | | | | function to create the NetworkModule
* | Net mod ios (#16426)Nathaniel Case2016-07-071-13/+3
|/ | | | | | | | | | | | | | * 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
* removes dependency on collections module from eos (#16485)Peter Sprygada2016-06-301-4/+4
| | | | This removes the dependency on the Python collections module to make it fully compliant with version prior to py2.7
* Network Module: EOS (#16158)Nathaniel Case2016-06-201-196/+312
| | | | | | | | | | | | | | | * add new module network * move EOS to NetworkModule * shell.py Python 3.x compatibility * implements the Command class through the connection for eos This implements a new Command class that specifies the cli command and output format. This removes the need to batch commands through the connection * initial add of netcmd module
* Clarify exception handling in net modules (#15507)Nathaniel Case2016-04-251-27/+25
| | | | | | | | | | | | | | | | | | | | * 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