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

@ -166,7 +166,8 @@ def load_config(module, commands):
connection = get_connection(module)
try:
diff, response = connection.edit_config(commands)
return response
resp = connection.edit_config(commands)
resp = json.loads(resp)
return resp.get('response')
except ConnectionError as exc:
module.fail_json(msg=to_text(exc))