Open msartuche opened 4 years ago
We should bump this as a Netmiko issue. The fix will be to raise an exception if this happens.
In other words, output paging has to always be disabled and if we can't at some point, then Netmiko will stop and raise an Exception.
I can open an issue on the Netmiko github if you’d like.
Sounds good.
IOS Device doesn't disable paging or set the terminal width properly when user privilege is 0
Example of what the terminal settings output should look like.
Failure example output:
test881>terminal width 511 terminal width 511 ^ % Invalid input detected at '^' marker.
test881>
test881>enable enable Password: ****
test881#
C:\Users\msartuche>python -m pip freeze | grep napalm napalm==2.5.0
Cisco IOS Software, C800 Software (C800-UNIVERSALK9-M), Version 15.4(3)M10, RELEASE SOFTWARE (fc1) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2018 by Cisco Systems, Inc. Compiled Wed 08-Aug-18 06:30 by prod_rel_team
ROM: System Bootstrap, Version 15.4(1r)T1, RELEASE SOFTWARE (fc1)
test881 uptime is 3 days, 6 hours, 52 minutes System returned to ROM by reload at 01:14:50 EDT Mon Apr 6 2020 System restarted at 01:17:24 EDT Mon Apr 6 2020 System image file is "flash:c800-universalk9-mz.SPA.154-3.M10.bin" Last reload type: Normal Reload Last reload reason: Embedded Event Manager action
This product contains cryptographic features and is subject to United States and local country laws governing import, export, transfer and use. Delivery of Cisco cryptographic products does not imply third-party authority to import, export, distribute or use encryption. Importers, exporters, distributors and users are responsible for compliance with U.S. and local country laws. By using this product you agree to comply with applicable laws and regulations. If you are unable to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at: http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to export@cisco.com.
Cisco C881-K9 (revision 1.0) with 488524K/35763K bytes of memory. Processor board ID FJC2046L0DN 5 FastEthernet interfaces 1 Virtual Private Network (VPN) Module DRAM configuration is 32 bits wide 255K bytes of non-volatile configuration memory. 250880K bytes of ATA System CompactFlash (Read/Write)
License Info:
License UDI:
Device# PID SN
*1 C881-K9 FJC2046L0DN
License Information for 'c800' License Level: advipservices Type: Permanent Next reboot license Level: advipservices
Configuration register is 0x102
2020-04-09 07:42:17,656 - nornir.core.task - ERROR - start() - Host 'test881': task 'napalm_get' failed with traceback: Traceback (most recent call last): File "C:\Users\msartuche\AppData\Local\Programs\Python\Python37\lib\site-packages\napalm\ios\ios.py", line 204, in _send_command output = self.device.send_command(command) File "C:\Users\msartuche\AppData\Local\Programs\Python\Python37\lib\site-packages\netmiko\base_connection.py", line 1337, in send_command search_pattern OSError: Search pattern never detected in send_command_expect: test881#
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\msartuche\AppData\Local\Programs\Python\Python37\lib\site-packages\nornir\core\task.py", line 85, in start r = self.task(self, self.params) File "C:\Users\msartuche\AppData\Local\Programs\Python\Python37\lib\site-packages\nornir\plugins\tasks\networking\napalm_get.py", line 61, in napalm_get result[g] = method(options) File "C:\Users\msartuche\AppData\Local\Programs\Python\Python37\lib\site-packages\napalm\ios\ios.py", line 3367, in get_config output = self._send_command(command) File "C:\Users\msartuche\AppData\Local\Programs\Python\Python37\lib\site-packages\napalm\ios\ios.py", line 207, in _send_command raise ConnectionClosedException(str(e)) napalm.base.exceptions.ConnectionClosedException: Search pattern never detected in send_command_expect: test881#