summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils/netcli.py
Commit message (Collapse)AuthorAgeFilesLines
* returns xml as a display option to junos_command (#21833)Peter Sprygada2017-03-021-31/+5
| | | | | | The display option xml as accidentially removed from the display argument. This patch adds xml back as an option. fixes #21823
* Hopefully clear up some junos issues. (#17616)Nathaniel Case2016-12-151-1/+1
|
* adds new exception for adding condition statements to Conditional (#17859)Peter Sprygada2016-10-021-1/+12
| | | | | When adding condition statements, the Conditional instance will now generate an AddConditionError if is unable to map the condition to a function in the instance
* adds better error handling when conditional fails (#17839)Peter Sprygada2016-09-301-1/+1
| | | | | When the conditional cannot extract a value from the result string, an unhandled exception would be raised. This fix now gracefully handles the exception
* fixes conditional processing with junos and xml data structures (#17801)Peter Sprygada2016-09-281-6/+8
| | | | | | | | | The conditional processing was failing due for two reasons: 1) The xml to json conversion string was not happening before the runner was processing the results 2) The Conditional instance was not parsing conditionals encoded with [] This fix address both issues.
* raises ValueError exception if conditional is not parsable (#17788)Peter Sprygada2016-09-271-1/+6
| | | | | The Conditional class now raises a ValueError with message if it cannot correclty parse the passed in conditional. This makes it easier to detect issues in modules that specify conditionals.
* fixes issue where arguments for regexp search() where transposed (#17764)Peter Sprygada2016-09-261-1/+1
| | | | | | | The arguments for the regex search() function were transposed in the netcli match() method that caused conditionals to fail. Switched the arguments to fixe the bug fixes #17749
* fixes issue where netcli would cause exception with an invalid conditionalPeter Sprygada2016-09-191-1/+11
| | | | | | | | | | | The Conditional instance will cause a stack trace if the provided conditional does not map properly to the response. This fixes that issue so that the Conditional instance will now raise a FailedConditionalError with the conditional that caused the failure. Modules *_command modules (and any other modules that create an instance of Conditional) should be updated to catch the FailedConditionalError exception.
* Cleanup netcli (#17529)Nathaniel Case2016-09-121-6/+6
| | | This honestly mostly amounts to Python 3 fixes.
* Merge pull request #17425 from privateip/netcliPeter Sprygada2016-09-061-10/+3
|\ | | | | removes command caching on retrieve from netcli
| * removes command caching on retrieve from netcliPeter Sprygada2016-09-061-10/+3
| | | | | | | | | | | | The caching of commands in CommandRunner is providing no useful feature and causing problems. This removes the code and simply returns the requested command results.
* | removes unneeded code from netcliPeter Sprygada2016-09-061-3/+0
|/ | | | | | Some old remnants of code from the refactor of netcli was left over as reported in #17408. This commit removes the old code as it isn't need and in fact wasnt doing anything
* Network module cleanup (#17334)Nathaniel Case2016-09-061-1/+0
| | | | | | | | | | | | * 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
* clean up method signatures in netcliPeter Sprygada2016-09-041-8/+8
| | | | removes unneeded **kwargs from methods in netcli
* fixes issue with converting commands to an iterable was not being donePeter Sprygada2016-08-311-1/+1
| | | | | This fix will now force the commands arg in __call__ to be a list of objects which otherwise would cause netcli not process the stack
* adds new property command_string to Command objectPeter Sprygada2016-08-251-2/+3
| | | | | | | This adds a new property to the Command object that is used to hold modified command strings that could be different from the command used to create the object. This allows for seamless switch between text and json enabled commands.
* Migrate basestring to a python3 compatible type (#17199)Toshio Kuratomi2016-08-231-1/+2
|
* rename netcmd module to netcliPeter Sprygada2016-08-201-0/+299
This is part of the 2.2 refactor to extract the Cli class into a separate module. This renames netcmd to netcli which is consistent with the network shared modules implementations