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:
Ganesh Nalawade 2018-06-25 15:35:39 +05:30 committed by GitHub
parent d4b9105c9c
commit b84adfd885
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 8 deletions

View file

@ -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))