diff options
author | Sumit Jaiswal <sjaiswal@redhat.com> | 2018-06-22 04:50:46 +0530 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2018-06-21 16:20:46 -0700 |
commit | 273fb57ea8576e68850e5f5c3e0120e52ff0bcaa (patch) | |
tree | 680e9ff49980ee7da1890cf31e982f24e8d8f792 | |
parent | 5e10424f316adfa02e34779fb1822fbbb105819a (diff) | |
download | ansible-273fb57ea8576e68850e5f5c3e0120e52ff0bcaa.tar.gz |
To fix eos_vrf failure when transport method is eapi (#41470) (#41771)
* To fix eos_vrf failure when transport method is eapi (#41470)
* resolve bug 40930
* resolve bug 40930
* to fix review comments
* to fix review comments
* reverting the changes based on review
(cherry picked from commit c989b62eefd58c33bd8d620c7bce1ebfa9766c7c)
* adding changelog for backport
-rw-r--r-- | changelogs/fragments/eos_vrf_failure-fix.yml | 4 | ||||
-rw-r--r-- | lib/ansible/modules/network/eos/eos_vrf.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/changelogs/fragments/eos_vrf_failure-fix.yml b/changelogs/fragments/eos_vrf_failure-fix.yml new file mode 100644 index 0000000000..f2e0fbc5fc --- /dev/null +++ b/changelogs/fragments/eos_vrf_failure-fix.yml @@ -0,0 +1,4 @@ +--- +bugfixes: + - Changed the output to "text" for "show vrf" command as default "json" output format + with respect to "eapi" transport was failing (https://github.com/ansible/ansible/pull/41470) diff --git a/lib/ansible/modules/network/eos/eos_vrf.py b/lib/ansible/modules/network/eos/eos_vrf.py index c773355c3a..d8c4da85bd 100644 --- a/lib/ansible/modules/network/eos/eos_vrf.py +++ b/lib/ansible/modules/network/eos/eos_vrf.py @@ -189,7 +189,7 @@ def map_obj_to_commands(updates, module): def map_config_to_obj(module): objs = [] - output = run_commands(module, ['show vrf']) + output = run_commands(module, {'command': 'show vrf', 'output': 'text'}) lines = output[0].strip().splitlines()[3:] |