Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions pkgs/clean-pkg/src/genie/libs/clean/stages/iosxr/stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,13 @@ def update_install_repository(self, steps, device, image,
error_pattern=self.error_patterns)

out = device.expect(
[self.successful_operation_string],
[self.successful_operation_string, self.install_operation_aborted_pattern],
trim_buffer=False,
timeout=install_timeout)
error = re.search(self.install_operation_aborted_pattern, out.match_output)
if error:
device.execute("show install log " + error.groupdict()['id'])
step.failed("The command '{cmd}' aborted ".format(cmd=cmd))
except Exception as e:
step.failed("The command '{cmd}' failed. Error: {e}"
.format(cmd=cmd, e=str(e)))
Expand Down Expand Up @@ -538,9 +542,14 @@ def install_activate(self, steps, device, install_timeout=INSTALL_TIMEOUT):
device.spawn, timeout=install_timeout)

# Wait for successful output
device.expect(
[self.successful_operation_string],
out = device.expect(
[self.successful_operation_string, self.install_operation_aborted_pattern],
trim_buffer=False,
timeout=install_timeout)
error = re.search(self.install_operation_aborted_pattern, out.match_output)
if error:
device.execute("show install log " + error.groupdict()['id'])
step.failed("The command '{cmd}' aborted ".format(cmd=cmd))
except Exception as e:
step.failed("Attempting to activate install id '{id}' "
"failed. Error: {e}"
Expand Down