Skip to content

Conversation

@ipspace
Copy link
Owner

@ipspace ipspace commented Dec 28, 2025

This commit uses the device quirks to check the version of the 'ansible-pylibssh' library, decide whether to use paramiko as network_cli connection with Cisco IOS/IOS-XE devices, and modifies the device group vars, allowing users to override this behavior on device-, device+provider, or node level.

Resolves #2966

This commit uses the device quirks to check the version of the
'ansible-pylibssh' library, decide whether to use paramiko as
network_cli connection with Cisco IOS/IOS-XE devices, and modifies
the device group vars, allowing users to override this behavior
on device-, device+provider, or node level.

Resolves #2966
@ipspace
Copy link
Owner Author

ipspace commented Dec 28, 2025

Integration tests passed, and the code has been tested (see #2966).

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements automatic detection of ansible-pylibssh version 1.3.0+ and switches Cisco IOS/IOS-XE devices to use paramiko for network_cli connections when the problematic version is detected.

  • Adds version detection logic for ansible-pylibssh library and automatically configures paramiko as the SSH connection type when version >= 1.3.0
  • Implements device quirk infrastructure to apply this behavior across Cisco IOS, IOS-XE (CSR), and Catalyst 8000v devices
  • Adds paramiko connection configuration to Ansible config template and warning suppression capability

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
netsim/devices/iosv.py Implements core use_paramiko() function with version detection logic and adds it to common IOS quirks
netsim/devices/csr.py Extends CSR (IOS-XE) device quirks to include paramiko detection
netsim/devices/cat8000v.py Renames class from IOSL2 to C8KV (cosmetic) and adds paramiko detection for Catalyst 8000v
netsim/templates/ansible.cfg.j2 Adds paramiko connection configuration section to disable host key checking
tests/integration/warnings.yml Adds configuration to suppress paramiko warning for IOS devices in tests

@DanPartelly DanPartelly self-requested a review December 28, 2025 10:56
@ipspace ipspace merged commit 77cf8de into dev Dec 28, 2025
19 checks passed
@ipspace ipspace deleted the ios-paramiko branch December 28, 2025 15:10
ipspace added a commit that referenced this pull request Dec 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ansible-pylibssh release 1.3.0 no longer works with Cisco IOS

2 participants