mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Update junos cliconf plugin (#43643)
* Update junos cliconf plugin Fixes #39056 Refactor junos cliconf plugin api and other minor changes * Fix CI issue * Fix CI failure
This commit is contained in:
parent
2aaa1694ab
commit
35adc12c38
6 changed files with 146 additions and 28 deletions
|
@ -149,11 +149,11 @@ def map_params_to_obj(module):
|
|||
def load_config(module, config, commit=False):
|
||||
conn = get_connection(module)
|
||||
try:
|
||||
conn.edit_config(to_list(config) + ['top'])
|
||||
diff = conn.compare_configuration()
|
||||
resp = conn.edit_config(to_list(config) + ['top'])
|
||||
except ConnectionError as exc:
|
||||
module.fail_json(msg=to_text(exc, errors='surrogate_then_replace'))
|
||||
|
||||
diff = resp.get('diff', '')
|
||||
if diff:
|
||||
if commit:
|
||||
commit_configuration(module)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue