mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Update eos, ios, vyos cliconf plugin (#42300)
* Update eos cliconf plugin methods * Refactor eos cliconf plugin * Changes in eos module_utils as per cliconf plugin refactor * Fix unit test and sanity failures * Fix review comment
This commit is contained in:
parent
2aa81bf05d
commit
c068b88b38
14 changed files with 444 additions and 299 deletions
|
@ -130,7 +130,6 @@ backup_path:
|
|||
sample: /playbooks/ansible/backup/vyos_config.2016-07-16@22:28:34
|
||||
"""
|
||||
import re
|
||||
import json
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.network.vyos.vyos import load_config, get_config, run_commands
|
||||
|
@ -205,8 +204,7 @@ def run(module, result):
|
|||
# create loadable config that includes only the configuration updates
|
||||
connection = get_connection(module)
|
||||
response = connection.get_diff(candidate=candidate, running=config, match=module.params['match'])
|
||||
diff_obj = json.loads(response)
|
||||
commands = diff_obj.get('config_diff')
|
||||
commands = response.get('config_diff')
|
||||
sanitize_config(commands, result)
|
||||
|
||||
result['commands'] = commands
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue