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:
Ganesh Nalawade 2018-06-26 14:21:12 +05:30 committed by GitHub
parent e60da3feaf
commit 9acb5780bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 29 deletions

View file

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