Commit graph

60 commits

Author SHA1 Message Date
Peter Sprygada
e927fa73d5 Merge pull request #4798 from gundalow/docs_backup
Document `backup` option in eos_config and nxos_config
2016-09-16 07:45:50 -04:00
Peter Sprygada
a391dd952e Merge pull request #4830 from privateip/ios_config
ios_config: rename the argument default to defaults
2016-09-16 07:44:53 -04:00
John Barker
f1ad1d0d64 RETURNS doesn't support markup, so remove it 2016-09-14 12:58:53 +01:00
Peter Sprygada
9794087aa7 rename the argument default to defaults
The argument_spec incorrectly had the argument default and it should have
been defaults.  This corrects the problem.
2016-09-14 07:34:55 -04:00
John Barker
9c42d72375 Docs improvements to _config 2016-09-14 12:06:18 +01:00
John Barker
b76b3de28e Document backup options
To make future diffing easier, use consistent ordering
2016-09-12 16:16:07 +01:00
Peter Sprygada
9b5e6bbfa1 roll up of updates to ios_config module
* 'before' and 'after' are now only applied to 'lines'
* remove update argument
* update doc strings
* add path argument when performing config difference
2016-09-11 23:11:59 -04:00
Andrew Gaffney
0c05f0dfa4 Fix missing colons in network module examples (#4778) 2016-09-10 14:46:30 +01:00
Peter Sprygada
c716744f3c minor bug fix to pass path to difference() in ios_config
The ios_config module needs to pass the path kwarg to difference when
specifying match=exact or strict.
2016-09-08 19:44:32 -04:00
Peter Sprygada
81aa3a760c Merge pull request #4730 from privateip/ios_template
fix bug in ios_template when include_defaults is set to true
2016-09-07 21:48:21 -04:00
Peter Sprygada
c3c964475c fix bug in ios_template when include_defaults is set to true
Module was ignoring  include_defaults argument.  This fixes the issue
such that the correct configuration is returned
2016-09-07 19:56:27 -04:00
Peter Sprygada
05887b8f86 adds path kwarg when performing config diff checks in ios_config 2016-09-07 19:42:59 -04:00
Peter Sprygada
e5419a2738 fixes issue where the configobjs are not deserialized to a list
When the configuration is compared and the results deserialized, the
dumps() function returns a string.  This cohereces the return to a list
in case before and/or after needs to be applied

fixes 4707
2016-09-05 15:44:21 -04:00
Peter Sprygada
eae87e21d9 Merge pull request #4698 from privateip/ios_config
removes state argument from ios_config
2016-09-04 09:23:24 -04:00
Peter Sprygada
e0f7912e37 removes state argument from ios_config
The state argument should not be in ios_config.  This change removes the
state argument
2016-09-04 09:16:31 -04:00
Peter Sprygada
4c8bbae415 bugfix that adds missing itertools import to ios_facts
fixes #4647
2016-09-02 08:15:07 -04:00
Peter Sprygada
a6ffe2e7be removes output keyword from command in ios_command
IOS devices only support a single command output which is structured
text.  This removes the ability to specify the command output format
when providing complex arguments to the commands
2016-08-30 17:14:33 -04:00
Peter Sprygada
9acf4ea417 update ios_template module using refactored network shared modules
This updates the ios_template module to work with the network shared
modules introduced in Ansible 2.2

Tested in IOS 15.6(1)T
2016-08-26 16:05:46 -04:00
Peter Sprygada
e3b7bf0bf9 update RETURNS doc string in ios_facts
updates the doc string for consistency and completeness
2016-08-25 20:01:07 -04:00
Peter Sprygada
c23f57c0ef Merge pull request #4482 from privateip/ios_config
merge functions from ios into ios_config
2016-08-22 15:43:36 -04:00
Peter Sprygada
9e241129fe Merge pull request #4481 from privateip/ios_facts
fixes issue with duplicated commands in CommandRunner
2016-08-22 12:33:29 -04:00
Peter Sprygada
4d79b7fa00 fixes issue with duplicated commands in CommandRunner
The CommandRunner will not allow duplicate commands to be added to the
command stack.  This fix will now catch the exception and continue if
a duplicate command is attempting to be added to the runner instance.
2016-08-22 11:58:36 -04:00
Peter Sprygada
2961087f26 added new functionality to ios_command
* commands argument now accepts a dict arguments[1]
* waitfor has been renamed to wait_for with an alias to waitfor
* only show commands are allowd when check mode is specified
* config mode is no longer allowed in the command stack
* add argument match with valid values any, all

[1] The commands argument will now accept a dict argument that can
specifiy the output format of the command.  To specify a dict argument
use the form of { command: <str>, output: <str>, prompt: <str>,
response: <str> }.  Command and output are required arguments. Output
accepts valid values text and json.
2016-08-22 11:46:27 -04:00
Peter Sprygada
f6dab64bc5 merge functions from ios into ios_config
* merge changes from ios shared module functions into ios_config.
* add src argument to provide path to config file
* add new choice to match used to ignore current running config
* add update argument with choices merge or check
* add backup argument to backup current running config to control host
* add defaults argument to control collection of config with or withoutdefaults
* add save argument to save current running config to startup config
* add state argument to control state of config file
* deprecated force argument, use match=none instead
2016-08-20 08:11:20 -04:00
Peter Sprygada
0bb0c1b2d8 Merge pull request #4323 from Qalthos/ios_config_bugfix
Fix ios_config broken logic
2016-08-09 07:38:38 -04:00
Alvaro Aleman
12b579f92d Make ios_command example working 2016-08-08 14:42:39 +02:00
John R Barker
d05ed8e2d8 ios & iosxr Documentation improvements (#4321) 2016-08-05 19:26:09 -04:00
Nathaniel Case
8bb4b9818c Fix ios_config broken logic 2016-08-04 11:24:28 -04:00
Rob Phoenix
aedf21b285 various typo corrections to ios network modules 2016-07-27 09:14:06 +01:00
Peter Sprygada
fb3916f002 adds update_config argument to ios_config
New argument controls whether or not configuration is applied to the
remote device.
2016-07-15 17:56:34 -04:00
Peter Sprygada
1240529613 Merge pull request #4180 from privateip/ios_command
removes unneeded check_args function from ios_command
2016-07-13 14:54:04 -07:00
Peter Sprygada
6a8750fe4b Merge pull request #4181 from privateip/ios_config
bug fix in ios_config module for handling config contents
2016-07-13 14:51:32 -07:00
Peter Sprygada
601bb9fad3 bug fix in ios_config module for handling config contents
Config contents when passed via argument were returning a string but
the module expects an instance of NetworkConfig.  This fixes that
problem.
2016-07-13 14:45:26 -07:00
Peter Sprygada
daaafb68ab removes unneeded check_args function from ios_command
The module would raise a KeyError trying to find the save_config key
which is not present in the argument_spec.  This was caused by the
check_args() function.  Since the ios shared argument spec isn't used
the check_args function is not needed and has been removed.
2016-07-13 14:44:03 -07:00
Peter Sprygada
d8d69904a7 fixup ios_template module to use NetworkModule
This removes the get_module() factory function and directly creates
an instance of NetworkModule.  This commit includes some minor clean
up to transition to the ios shared module for 2.2
2016-07-11 07:25:04 -07:00
Peter Sprygada
359f1747be Merge pull request #4153 from privateip/ios_command
fix up ios_command to use NetworkModule
2016-07-11 09:57:39 -04:00
Peter Sprygada
ebc9f092ad fix up ios_command to use NetworkModule
* using check mode will now block all commands except show commands
* module will no longer allow config mode commands
* check args for unused values and issue warning
2016-07-11 06:01:32 -07:00
Peter Sprygada
5f08277eb4 refactor ios_config for network module
This refactors the ios_config module to use the network module added
in 2.2 to simplify common network functions

new features

* add src, dest arguments for working with config
* results now return flag if the config was saved or not
* adds append argument for updating the dest file (when dest is used)
2016-07-11 05:58:12 -07:00
Peter Sprygada
b2202c6da8 update ios_facts module to use NetworkModule
minor update to ios_facts to remove get_module() in favor of NetworkModule
2016-07-10 12:38:08 -04:00
Peter Sprygada
25e98e869f Merge pull request #4124 from privateip/ios_facts
initial add of ios_facts module
2016-07-07 17:10:29 -04:00
Peter Sprygada
4f8f8f1998 initial add of ios_facts module
This adds the new module ios_facts for collect fact information from
ios devices
2016-07-06 21:30:55 -04:00
Peter Sprygada
2be917851d refactor ios_command to use CommandRunner class
* fixes running commands in check mode.  now only show commands are allowd
* renamed waitfor to wait_for with alias to waitfor for consistency
2016-07-06 15:24:46 -04:00
Michael Scherer
cc99fe24fc Convert the network subfolder to py3/py2.4 syntax (#3690) 2016-05-18 09:08:30 -07:00
Johannes Meixner
24549ee80a network/*/*_config.py: Correct typo.
- Replace syntanx with syntax in all things network.
2016-05-10 10:30:28 +03:00
Brian Coca
c64b7a71fb removed usless default doc 2016-04-19 17:48:11 -04:00
Justin Kennedy
7a2b00b625 Updating examples to include required fields (#3242)
Updated examples to include required fields (host, username).  Also updated src option to be listed as required.
2016-04-19 17:46:34 -04:00
Patrick Ogenstad
5409ed1b28 Fix documentation example, missing ")" 2016-04-14 23:01:59 +02:00
John Barker
531eed80b3 Replace BOOLEANS with true/false 2016-04-05 16:31:15 +01:00
Peter Sprygada
c500b2ff99 refactors the ios_template module to use netcfg diff
removes the functions for performing configuration diffs to use the
netcfg shared lib
2016-04-04 07:02:58 -04:00
Peter Sprygada
df32f64898 refactor ios_config to use netcfg diff shared lib
Move the configuration diff code from the module to the shared lib
2016-04-04 07:02:48 -04:00