nautobot / nornir-nautobot

Nornir inventory and plugins for Nautobot.
https://docs.nautobot.com/projects/nornir-nautobot/en/latest/
31 stars 25 forks source link

revert_in with napalm_configure #155

Open milan2655 opened 4 months ago

milan2655 commented 4 months ago

Hallo!

if revert_in is used in next method : https://github.com/nautobot/nornir-nautobot/blob/3bbc968c1bb9ec33459d5a8b495fb265c44b3c4a/nornir_nautobot/plugins/tasks/dispatcher/default.py#L368

napalm_confirm_commit needs to be used to actually confirm the commit:

from nornir_napalm.plugins.tasks import napalm_confirm_commit
if revert_in is not None:
    confirm_result = task.run(task= napalm_confirm_commit)

otherwise, the system will rollback to the backup config every time.