Environment
- Python version: 3.11
- pyntc version: 3.2.3a1
Expected Behavior
EOSDevice.close() releases the Netmiko SSH session that EOSDevice.open() creates.
Observed Behavior
EOSDevice.close() is a no-op (pass).
EOSDevice is a hybrid driver — show and config go over eAPI, but the file-transfer paths go over SSH. file_copy, check_file_exists, get_remote_checksum and remote_file_copy each call open(), which builds a real Netmiko session (native_ssh). Nothing ever disconnects it, so a caller holding many device objects accumulates one open socket per device.
eAPI itself is stateless HTTP and needs no teardown, so the no-op was reasonable before file copy was added over SSH. The leak is only that SSH session.
Steps to Reproduce
device = EOSDevice(host, user, password)
device.file_copy("EOS-4.28.5M.swi") — open() creates the SSH session
device.close() — returns without disconnecting; the socket stays open
Environment
Expected Behavior
EOSDevice.close()releases the Netmiko SSH session thatEOSDevice.open()creates.Observed Behavior
EOSDevice.close()is a no-op (pass).EOSDeviceis a hybrid driver —showandconfiggo over eAPI, but the file-transfer paths go over SSH.file_copy,check_file_exists,get_remote_checksumandremote_file_copyeach callopen(), which builds a real Netmiko session (native_ssh). Nothing ever disconnects it, so a caller holding many device objects accumulates one open socket per device.eAPI itself is stateless HTTP and needs no teardown, so the no-op was reasonable before file copy was added over SSH. The leak is only that SSH session.
Steps to Reproduce
device = EOSDevice(host, user, password)device.file_copy("EOS-4.28.5M.swi")—open()creates the SSH sessiondevice.close()— returns without disconnecting; the socket stays open