Skip to content
7 changes: 7 additions & 0 deletions napalm/ios/ios.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,13 @@ def commit_config(self, message="", revert_in=None):
):
msg = "Candidate config could not be applied\n{}".format(output)
raise ReplaceConfigException(msg)
elif "rollback aborted" in output.lower():
msg = (
"Candidate config could not be applied, "
"attempting rollback\n{}".format(output)
)
self.rollback()
raise ReplaceConfigException(msg)
elif "%Please turn config archive on" in output:
if revert_in_min:
raise CommitConfirmException(ARCHIVE_DISABLED_MESSAGE)
Expand Down