mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 23:44:00 -07:00
Update iosxr cliconf plugin (#43837)
* Update iosxr cliconf plugin Fixes #39056 * Update iosxr cliconf plugin * Modify iosxr module_utils code to support refactored cliconf plugin api's * Other minor changes * Fix unit test failure * Update ios, eos, nxos plugin for diff * Fix review comment
This commit is contained in:
parent
7b1cc11685
commit
d1de1e0449
14 changed files with 217 additions and 153 deletions
|
@ -115,7 +115,7 @@ class Cliconf(CliconfBase):
|
|||
raise ValueError("'replace' value %s in invalid, valid values are %s" % (diff_replace, ', '.join(option_values['diff_replace'])))
|
||||
|
||||
# prepare candidate configuration
|
||||
candidate_obj = NetworkConfig(indent=2)
|
||||
candidate_obj = NetworkConfig(indent=2, ignore_lines=diff_ignore_lines)
|
||||
candidate_obj.load(candidate)
|
||||
|
||||
if running and diff_match != 'none' and diff_replace != 'config':
|
||||
|
@ -215,7 +215,7 @@ class Cliconf(CliconfBase):
|
|||
try:
|
||||
out = json.loads(out)
|
||||
except ValueError:
|
||||
out = to_text(out, errors='surrogate_or_strict').strip()
|
||||
pass
|
||||
|
||||
responses.append(out)
|
||||
return responses
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue