Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOSDriver should catch "Rollback aborted" case when using configure replace #1701

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
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