NAPPS-1175 | Adds IOS-XR OS Upgrades Support#398
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new Cisco IOS-XR (eXR / 64-bit) device driver to PyNTC with support for staging golden ISOs, running the async install add → install activate → reload → install commit workflow, and documenting/adding unit coverage around that behavior.
Changes:
- Introduces
IOSXRDevice(cisco_iosxr_ssh) with OS upgrade orchestration and URL-basedremote_file_copy. - Registers the new driver in the device factory and documentation (MkDocs + user library overview).
- Adds unit tests for IOS-XR behavior and updates existing device-creation test to include IOS-XR.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_infra.py | Adds IOS-XR device creation coverage via factory patching. |
| tests/unit/test_devices/test_iosxr_device.py | New unit tests covering IOS-XR facts, copy flow, and upgrade workflow primitives. |
| pyntc/devices/iosxr_device.py | New IOS-XR SSH driver implementing golden-ISO upgrades and remote file copy. |
| pyntc/devices/init.py | Registers cisco_iosxr_ssh and exports IOSXRDevice. |
| mkdocs.yml | Adds IOS-XR module to generated code reference nav. |
| docs/user/lib_overview.md | Documents IOS-XR support and golden-ISO requirement/workflow. |
| changes/398.added | Towncrier entry for IOS-XR support. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| r"Host name or IP address": "", | ||
| r"Source username|Username": src.username or "", | ||
| r"Password": src.token or "", | ||
| r"yes/no|\[confirm\]|Are you sure": "", | ||
| } |
| log.debug("Host %s: File %s not found in 'dir' output on %s.", self.host, filename, file_system) | ||
| return False |
| command_args["expect_string"] = expect_string | ||
| command_args.update(kwargs) | ||
|
|
||
| response = self.native.send_command(**command_args) |
There was a problem hiding this comment.
Check for self.native.send_command and probably update to use self._send_command method we defined.
…r_device_reboot to use uptime rather than waiting for the ssh connection to drop
| raise NotImplementedError( | ||
| "IOS-XR has no standalone save; software is committed by install_os via 'install commit'." | ||
| ) |
There was a problem hiding this comment.
We're going to have to update OS upgrades to skip save on IOS-XR devices.
| command = f"{command} vrf {src.vrf}" | ||
|
|
||
| # Bypass _send_command: a copy may emit benign "%" lines that are not failures. | ||
| output = self.native.send_command(command, expect_string=expect_regex, read_timeout=src.timeout) |
There was a problem hiding this comment.
Opening a backlog story to revisit these timeouts. We probably don't want a 2 hour timeout on responding the a "Username: " prompt
Closes: NAPPS-1175
What's Changed:
Caveats
show redundancy,show platform vm)upgrade hw-module location all fpd all,show hw-module location <loc> fpd)hw-module location 0/<standby>/CPU0 reload,redundancy switchover)Integration Test