mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Fix junos modules check_mode issue (#37311)
Fixes #37208 If check_mode is enabled instead of committing th config need to discard all the chnages to cnadidate db In case of cli to discard changes issue `rollback 0` command and for netconf execute `discard-changes` rpc call
This commit is contained in:
parent
7cd3d9cc1a
commit
8eaa9cc938
3 changed files with 18 additions and 6 deletions
|
@ -84,10 +84,8 @@ class Cliconf(CliconfBase):
|
|||
command += b' and-quit'
|
||||
return self.send_command(command)
|
||||
|
||||
def discard_changes(self, rollback_id=None):
|
||||
command = b'rollback'
|
||||
if rollback_id is not None:
|
||||
command += b' %s' % int(rollback_id)
|
||||
def discard_changes(self):
|
||||
command = b'rollback 0'
|
||||
for cmd in chain(to_list(command), b'exit'):
|
||||
self.send_command(cmd)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue