mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Fix rollback in junos_config (#31424)
* Fix rollback in junos_config Fixes #30778 * Call `load_configuration` with rollback id in case the id is given as input * Pass rollback id to `get_diff()` to fetch diff from device * Fix unit test
This commit is contained in:
parent
2ed46e04f4
commit
88da95bb77
4 changed files with 55 additions and 8 deletions
|
@ -174,9 +174,9 @@ def locked_config(module):
|
|||
unlock_configuration(module)
|
||||
|
||||
|
||||
def get_diff(module):
|
||||
def get_diff(module, rollback='0'):
|
||||
|
||||
reply = get_configuration(module, compare=True, format='text')
|
||||
reply = get_configuration(module, compare=True, format='text', rollback=rollback)
|
||||
# if warning is received from device diff is empty.
|
||||
if isinstance(reply, list):
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue