Commit Graph

16 Commits (a4cddac368976f7fd7f97f5af0cf59d7fd032dfd)

Author SHA1 Message Date
bdowling 933f508cfa ios_mods - added stdout to exception output. Removed to_lines() (#5428)
stdout lines are now available when certain exceptions occur
(Ref ansible/ansible#18241)

Also noticed that to_lines was essentially handled in
lib/ansible/plugins/action/__init__.py -- only difference was
it didn't handle a list.  to_lines() could be removed across
network modules now, but this commit is only for ios_command.

Also adds disconnect() to ios_command that was added
to ios_config in #5247
9 years ago
Nathaniel Case 9a0add286f Network module code cleanup (#5061)
* Fix imports in junos_template

* Python 3 compatibility in eos_command

* Python 3 compatibility for ios_command

* Clean up issues with ios_facts

* Python 3 compatibility for ios_facts

* Import shuffle in ios_template

* Python 3 compatibility for iosxr_command

* Clean up iosxr_facts.py

* Python 3 compatibility for iosxr_facts

* Python 3 compatibility for junos_command

* Python 3 compatibility for ops_command

* Cleanup issues with ops_facts

* Python 3 compatibility for ops_facts

* Cleanup issues with ops_template

* Python 3 compatibility for vyos_command

* Cleanup issues with vyos_facts

* Python 3 compatibility for vyos_facts
9 years ago
Andrew Gaffney 0c05f0dfa4 Fix missing colons in network module examples (#4778) 9 years ago
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
10 years ago
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.
10 years ago
Alvaro Aleman 12b579f92d Make ios_command example working 10 years ago
John R Barker d05ed8e2d8 ios & iosxr Documentation improvements (#4321) 10 years ago
Rob Phoenix aedf21b285 various typo corrections to ios network modules 10 years ago
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.
10 years ago
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
10 years ago
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
10 years ago
Michael Scherer cc99fe24fc Convert the network subfolder to py3/py2.4 syntax (#3690) 10 years ago
moyashiki e851e91b49 Fix ios_command fix
This is not valid YAML commands. So fix it.
10 years ago
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
10 years ago
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
10 years ago
chouseknecht a4f67a4ef2 Add ios_commnand module. 10 years ago