Commit graph

45 commits

Author SHA1 Message Date
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
jrk07
3cc277bc08 Doc Update: ios_template.py title and example
ios_template.py was named ios_config when viewing docs.  The examples also had net_config still.  Updated those here.
2016-03-10 12:54:41 -08:00
Peter Sprygada
e3ca92e97d bugfix for ios_config module
This commit address a bug in the ios_config module when using the
match: strict argument.  When the argument is used, the module will
compare the configuration block same as match: exact which is not the
intended behavior.  This commit updates the behavior to propertly handle
the strict argument.
2016-03-10 13:34:04 -05:00
moyashiki
e851e91b49 Fix ios_command fix
This is not valid YAML commands. So fix it.
2016-03-02 22:13:03 +09:00
Peter Sprygada
567e09c933 bugfix for missing function name in ios_command
This provides a minor bugfix for a missing function name in the ios_command
network module
2016-02-17 13:49:08 +00:00
Peter Sprygada
b7114cc783 update ios_command module return values
This minor change updates the return values and doc string for the
ios_command module to be consistent with other network modules
2016-02-12 16:42:14 -05:00
chouseknecht
a4f67a4ef2 Add ios_commnand module. 2016-02-11 01:17:52 -05:00
Peter Sprygada
e010a7b240 update ios_template doc strings and return values
Sets the return values from ios_template to be consistent with the rest
of the network modules.  Return values are now updates and responses
2016-02-09 14:38:42 -05:00
Peter Sprygada
ca2ae67794 update ios_config doc strings and return values
This changes the return values to be consistent across all network
config modules. The return values are now updates and responses
2016-02-09 14:37:16 -05:00
Peter Sprygada
23f1d20a5c initial add of ios_template module
This adds a new module for working with IOS devices and building configurations
using templates.
2016-02-06 08:19:01 -05:00
Peter Sprygada
d05ceb9e28 initial add of ios_config module
This adds a new module ios_config that can be used for configuring
IOS devices.
2016-02-06 08:16:32 -05:00