Commit graph

399 commits

Author SHA1 Message Date
Peter Sprygada
23f067a0ec Merge pull request #4484 from privateip/nxos_command
added new functionality to nxos_command
2016-08-22 15:43:26 -04:00
codyrat
50133f1ed6 re.match for numeric only for kwargs[key] = int(value) (#4495) 2016-08-22 15:00:33 -04:00
Peter Sprygada
85b0bbc5c0 added new functionality to nxos_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 14:01:06 -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
73352bb9a3 update nxos_config with new arguments
* 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 without defaults
* 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-21 08:50:59 -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
Jason Edelman
5dc29dbc8b added a period 2016-08-18 07:21:32 -04:00
Jason Edelman
d49d61784f make aliases a list in the docstring 2016-08-18 07:00:19 -04:00
Jason Edelman
164021a6a8 remove commented out code, add alias, and doc 2016-08-18 06:53:04 -04:00
Jason Edelman
c009fe7e66 updated version_added for new param 2016-08-17 19:43:32 -04:00
Jason Edelman
996a34fbf7 fixed error handling 2016-08-17 19:19:07 -04:00
Jason Edelman
b8f6e130ed fixed docs 2016-08-17 19:15:25 -04:00
Jason Edelman
160fd0126f improve functionality for vlan trunks based on #4082 2016-08-17 19:11:50 -04:00
Roman
78adaf2116 get_url headers param values parsing (#4245) 2016-08-10 23:49:58 +02:00
Peter Sprygada
3480561254 Merge pull request #4319 from gundalow/docs-cumulus
Cumulus - consistent docs formatting
2016-08-09 07:52:59 -04:00
Peter Sprygada
4c5ad987ce Merge pull request #4303 from gundalow/docs-eos
General EOS documentation improvements
2016-08-09 07:52:26 -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
Peter Sprygada
1a71fff02b Merge pull request #4341 from gundalow/docs-vyos
vyos: Docs fixes
2016-08-09 07:38:08 -04:00
Peter Sprygada
3d37d5c835 Merge pull request #4338 from gundalow/docs-openswitch
openswitch: Docs fixes
2016-08-09 07:37:22 -04:00
Peter Sprygada
56a59824b2 Merge pull request #4336 from gundalow/docs-nxos
NXOS Docs update
2016-08-09 07:36:21 -04:00
Peter Sprygada
04b200059d Merge pull request #4326 from gundalow/docs-junos
junos: Docs update
2016-08-09 07:35:26 -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
John R Barker
4148b74433 Update junos_config.py 2016-08-05 17:01:52 +01:00
John R Barker
5f02f54ff9 Update junos_config.py 2016-08-05 16:38:58 +01:00
John Barker
4d0f5cc3f5 vyos: Docs fixes 2016-08-05 15:14:04 +01:00
John Barker
d45a75bc01 openswitch: Docs fixes 2016-08-05 14:40:52 +01:00
John Barker
d319328d03 NXOS Docs update 2016-08-05 13:01:13 +01:00
John Barker
bd08631e58 junos: Docs update 2016-08-04 17:16:38 +01:00
Nathaniel Case
8bb4b9818c Fix ios_config broken logic 2016-08-04 11:24:28 -04:00
John Barker
5599ab14f6 Cumulus - consistent docs formatting 2016-08-04 12:18:06 +01:00
Nathaniel Case
104d753730 Quick fix to nxos_command and minify imports 2016-08-03 18:06:33 -04:00
John R Barker
4ebcdf3efd Merge pull request #4115 from bordeltabernacle/fix/network_module_typos
Fix/network module typos
2016-08-03 10:15:05 -07:00
Kevin Kirsche
9a369b3f1f Update junos_config.py 2016-08-02 17:35:02 -04:00
Kevin Kirsche
9f8bc0158c Fix typo in "ssantaize" typo
ssantaize to santaize
2016-08-02 17:32:52 -04:00
John Barker
79c55534fc General EOS documentation improvements
Typos, formatting, choices.
2016-08-02 21:46:08 +01:00
John R Barker
280522914c State runnng v running
Fix typo
2016-08-02 18:20:13 +01:00
Rob Phoenix
aedf21b285 various typo corrections to ios network modules 2016-07-27 09:14:06 +01:00
Peter Sprygada
3d65c82d7c Merge pull request #4196 from privateip/ios_config
adds update_config argument to ios_config
2016-07-15 18:03:25 -04: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
fe76a74e8c initial add of new module vyos_config
New module for sending configuration commands to remote devices running
the VyOS operating system.
2016-07-15 16:11:44 -04:00
Peter Sprygada
800bd92026 Merge pull request #4187 from privateip/vyos_facts
WIP initial add of new module vyos_facts
2016-07-15 05:25:53 -07:00
Peter Sprygada
77f6c34ee4 initial add of new module vyos_facts
* adds collection of default facts
* adds collection of configuration facts
* adds collection of lldp neighbors
2016-07-15 07:59:49 -04:00
Peter Sprygada
f7bd0f4dfb initial commit of vyos_command module
This adds a new module, vyos_command for sending CLI commands to remote
devices running VyOS operating system.
2016-07-14 07:14:30 -07: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
8655dc4aaf Merge pull request #4123 from privateip/ios_command
refactor ios_command to use CommandRunner class
2016-07-07 17:10:04 -04:00
Peter Sprygada
1ba45c1d03 Merge pull request #4065 from privateip/eos_command
refactor the eos_command module to use the CommandRunner
2016-07-07 17:06: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
11efe33730 refactor the eos_command module to use the CommandRunner
* This adds support the CommandRunner to handle executing commands on
the remote device.
* It also changes the waitfor argument to wait_for to remain compatable
with other modules and adds an alias for waitfor.
* Restricts commands to show commands only when check mode is specified.
* add version_added to wait_for doc string
2016-07-06 21:28:48 -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
Stian Vikan
1e74d4c9a6 Fixed delete statement for juniper_config.py #4007 #3984 2016-06-24 16:06:25 +02:00
Gary Rybak
dc21c211e3 Move call to filter_exit out of command execution block
to prevent setting 'changed' on a command list that is
completely filtered (empty).
2016-06-14 10:09:23 -06:00
Brian Coca
46d6bead71 document that get_url also takes file params
has for a long time, but was never documented, mode,group, owner can all be set here
2016-06-13 15:52:57 -04:00
Brian Coca
172bd21f41 Revert "Add mode option to the list" (#3946) 2016-06-13 15:48:43 -04:00
Victor Bocharsky
3573223aeb Add mode option to docstring for get_url (#3630)
Add mode option to the list
2016-06-13 15:36:23 -04:00
jctanner
4a3916bd46 Use the six import for urlsplit instead of importing directly. (#3902)
Fixes https://github.com/ansible/ansible/issues/16191
2016-06-09 13:25:17 -04:00
Peter Sprygada
e7e295b693 removes requirement for config argument to be specified in junos_facts
The config argument is optional and should not be required.  This
removes the required attribute from the config argument.

fixes #3878
2016-06-07 21:43:17 -04:00
Toshio Kuratomi
cb1093e085 Fix the six import 2016-06-04 10:49:13 -07:00
Toshio Kuratomi
469169f654 Be sure to import urllib.parse from somewhere 2016-06-04 08:49:24 -07:00
Gabriele
8cb463d250 Fixing bug, added missing param (#3737) 2016-05-27 06:56:03 +02:00
Wolfgang Powisch
061555cefb Update junos_facts.py (#3759) 2016-05-26 19:19:04 -04:00
Peter Sprygada
39693305cf Merge pull request #3623 from ocadotechnology/wip-3621
junos_template: Simplify arguments. Fixes #3621
2016-05-23 09:22:55 -04:00
Michael Scherer
cc99fe24fc Convert the network subfolder to py3/py2.4 syntax (#3690) 2016-05-18 09:08:30 -07:00
Kei Nohguchi
14e13f68a5 ops_template.py: Change integer key into stirng
This fix passing the update variable to the str()
so that it avoids the exception when ops.dc.read()
returns a dictionary which contains non-string keys.

This is due to the fact that some of the key types in
OpenSwitch schema are actually defined as integer
and ops.dc declerative config module encode those
in integer inside the dictionary.  This could be
the right encoding from the schema point of view
but someone needs to convert it to the string
somewhere, as JSON key should be string.
2016-05-18 07:01:38 -07:00
Peter Sprygada
1ab2c3a737 Merge pull request #3627 from xmj/devel
network/*/*_config.py: Correct typo.
2016-05-18 07:03:39 -04:00
Peter Sprygada
f71e00f0bf Merge pull request #3612 from dharmabumstead/devel
Fixed typos
2016-05-18 06:59:09 -04:00
Michael Scherer
4c569fd535 Add a test on jnpr.junos.utils.sw presence (#3666) 2016-05-17 10:04:16 -07:00
Toshio Kuratomi
298fd0ae56 Docs fixes 2016-05-13 11:01:19 -07:00
Brian Coca
9ae898c902 made note about slurp memory consumption 2016-05-12 14:44:21 -04: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
Mike Bryant
46957b167e junos_template: Simplify arguments. Fixes #3621
Simplify the arguments to junos_template, such that
merge/overwrite/replace can be selected easily.
2016-05-09 23:31:11 +01:00
Scott Butler
7d09339d31 Fixed typos 2016-05-06 14:34:31 -07:00
John R Barker
bb9572ca86 ansible-validate-modules part 4: Enable check on ansible-modules-core (#3526)
* Call ansible-validate-modules

* Correct quotes + add newline
2016-05-03 07:51:12 -07:00
Peter Sprygada
f7baff4688 fixes docstring issue for junos_config arguments
The docstring was incorrectly merged with some old entries that will
cause the documentation not to build correclty.  It is now fixed.
2016-04-27 10:39:51 -04:00
jedelman8
3ebb693777 add nxos_interface 2016-04-26 05:25:48 -07:00
James Cammarata
b1641ec486 Remove extraneous debug stuff from uri module left over from testing 2016-04-25 14:34:27 -04:00
James Cammarata
84ee00bb42 Make sure uri output contains json output when a non-200 status is returned
Prior to the switch to the urls.py code, non-200 responses contained
a 'json' value when the content-type was JSON. This fix restores that
field upon a non-2xx response.

Fixes ansible/ansible#15555
2016-04-25 14:19:03 -04:00
Nathaniel Case
b466f7bbe2 Remove unnecessary exception from nxos_command (#3521) 2016-04-25 13:26:06 -04:00
Peter Sprygada
426e9a357d Merge pull request #3473 from networktocode/nxos_ping
nxos_ping
2016-04-25 12:34:22 -04:00
Peter Sprygada
7a475d06f0 Merge pull request #3477 from networktocode/nxos_vrrp
nxos_vrrp
2016-04-25 12:00:44 -04:00
Peter Sprygada
d526770ca9 Merge pull request #3475 from networktocode/nxos_vrf_interface
nxos_vrf_interface
2016-04-25 11:57:37 -04:00
Peter Sprygada
0cb22ea123 Merge pull request #3476 from networktocode/nxos_vrf
nxos_vrf
2016-04-25 11:56:15 -04:00
Peter Sprygada
b66766bf19 Merge pull request #3516 from networktocode/nxos_ip_interface
nxos_ip_interface
2016-04-25 11:54:06 -04:00
Peter Sprygada
66a43b0695 Merge pull request #3468 from networktocode/nxos_switchport
add nxos_switchport module
2016-04-25 11:51:21 -04:00
Peter Sprygada
2a6173feef Merge pull request #3470 from networktocode/nxos_feature
nxos_feature
2016-04-25 11:50:13 -04:00
Peter Sprygada
0cdd12cf22 Merge pull request #3467 from networktocode/nxos_vlan
add nxos_vlan module
2016-04-25 11:47:57 -04:00
Peter Sprygada
ea3c4a9466 Merge pull request #3471 from networktocode/nxos_get_facts
nxos_get_facts
2016-04-25 11:43:45 -04:00
Peter Sprygada
b80929bf0b adds new module junos_package
the new module allows playbook designers to manage packages on remote
devices running junos.
2016-04-24 22:04:33 -04:00
Peter Sprygada
d7b6289539 adds new module ops_facts
This adds a new module for collect device facts from remote devices
running OpenSwitch.  This module is useful when collecting fact information
over CLI transport.
2016-04-24 21:37:29 -04:00