mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-11 03:31:29 -07:00
Fix ios and vyos cliconf edit_config return type (#41896)
* Fix ios and vyos cliconf edit_config return type Modify cliconf edit_config api to return a json string with diff and response received from remote host for ios and vyos. * Doc change
This commit is contained in:
parent
d4b9105c9c
commit
b84adfd885
5 changed files with 21 additions and 8 deletions
|
@ -133,7 +133,9 @@ def load_config(module, commands, commit=False, comment=None):
|
|||
connection = get_connection(module)
|
||||
|
||||
try:
|
||||
diff_config, resp = connection.edit_config(candidate=commands, commit=commit, diff=module._diff, comment=comment)
|
||||
resp = connection.edit_config(candidate=commands, commit=commit, diff=module._diff, comment=comment)
|
||||
resp = json.loads(resp)
|
||||
diff_config = resp.get('diff')
|
||||
except ConnectionError as exc:
|
||||
module.fail_json(msg=to_text(exc))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue