mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Add diff capability in vyos edit_config (#41950)
* Add diff capability in vyos edit_config Fetch onbox diff within edit_config cliconf plugin and return it in response * Remove diff returned from ios edit_config * Fix CI failure * More CI fixes
This commit is contained in:
parent
e60da3feaf
commit
9acb5780bc
4 changed files with 25 additions and 29 deletions
|
@ -124,7 +124,7 @@ class Cliconf(CliconfBase):
|
|||
return json.dumps(diff)
|
||||
|
||||
@enable_mode
|
||||
def edit_config(self, candidate=None, commit=True, replace=False, diff=False, comment=None):
|
||||
def edit_config(self, candidate=None, commit=True, replace=False, comment=None):
|
||||
resp = {}
|
||||
if not candidate:
|
||||
raise ValueError("must provide a candidate config to load")
|
||||
|
@ -151,11 +151,6 @@ class Cliconf(CliconfBase):
|
|||
|
||||
results.append(self.send_command('end'))
|
||||
|
||||
diff_config = None
|
||||
if diff:
|
||||
diff_config = candidate
|
||||
|
||||
resp['diff'] = diff_config
|
||||
resp['response'] = results[1:-1]
|
||||
return json.dumps(resp)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue