netmiko cannot handle "admin display-config" output
See original GitHub issueGot the problem to run netmiko to “admin display-config” (like Cisco IOS “show run”). Anyway to work around? As you can see below, “show time” and “show version” can get the support no problem.
>>> r1 = {'ip':'7750sr12-2','device_type':'alcatel_sros', 'username':'test', 'password':'test'}
>>> import netmiko
>>> nc = netmiko.ConnectHandler(**r1)
>>> nc.send_command('show time')
'\nMon Mar 12 21:58:05 UTC 2018'
>>> nc.send_command('show version')
'\nTiMOS-C-14.0.R5-1 cpm/hops64 Nokia 7750 SR Copyright (c) 2000-2017 Nokia.\nAll rights reserved. All use subject to applicable license agreements.\nBuilt on Thu Aug 10 09:10:28 PDT 2017 by builder in /rel14.0/b1/R5-1/panos/main'
>>> nc.send_command('admin display-config')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/cctsay/miniconda3/lib/python3.6/site-packages/netmiko-2.0.1-py3.6.egg/netmiko/base_connection.py", line 967, in send_command
OSError: Search pattern never detected in send_command_expect: \*B\:alu7750sr12\-2\#
>>>
Thanks! C.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Search pattern never detected in send_command_expect ...
The issue I am facing occurs when running the following code : import netmiko connection = netmiko.ConnectHandler(ip=".
Read more >Show commands that prompt for more information | netmiko
Enable Netmiko logging of all reads and writes of the communications channel. This will create a file named 'test. log' in the current...
Read more >Release Notes - eNMS - Read the Docs
Make all results in the Results table link to the workflow builder. ... A non-admin user cannot save a service if it is...
Read more >Solved: Python netmiko error - Cisco Community
As per the logs, it seems that it is trying use your file as part of the Netmiko library and is failing. ImportError:...
Read more >Interacting with IOS XE and IOS XR using Netmiko
What is Netmiko · Successfully establish an SSH connection to the device · Simplify the execution of show commands and the retrieval of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep it’s working now:)
Thanks! C.
Fri Mar 16 12:57 cctsay@kenny:~]tail -10 alu7750sr12-1.cfg exit no shutdown exit exit
exit all
Finished FRI MAR 16 18:56:59 2018 UTC
Fri Mar 16 12:57 cctsay@kenny:~]head -10 alu7750sr12-1.cfg
TiMOS-C-14.0.R5 cpm/hops64 Nokia 7750 SR Copyright © 2000-2016 Nokia.
All rights reserved. All use subject to applicable license agreements.
Built on Wed Sep 28 15:57:18 PDT 2016 by builder in
/rel14.0/b1/R5/panos/main
Generated FRI MAR 16 18:55:59 2018 UTC
exit all configure #-------------------------------------------------- Fri Mar 16 12:57 cctsay@kenny:~]ls -l alu7750sr12-1.cfg -rw-r–r-- 1 cctsay users 16270344 Mar 16 2018 alu7750sr12-1.cfg Fri Mar 16 12:58 cctsay@kenny:~] Fri Mar 16 12:58 cctsay@kenny:~] Fri Mar 16 12:58 cctsay@kenny:~]ls -l alu7750sr12-2.cfg -rw-r–r-- 1 cctsay users 0 Mar 16 2018 alu7750sr12-2.cfg Fri Mar 16 12:58 cctsay@kenny:~]ls -l alu7750sr12-2.cfg -rw-r–r-- 1 cctsay users 26221796 Mar 16 2018 alu7750sr12-2.cfg Fri Mar 16 12:59 cctsay@kenny:~]
On Fri, Mar 16, 2018 at 11:41 AM, Kirk Byers notifications@github.com wrote:
@cctsay Okay, try this:
That should allow for roughly 800 seconds for it to complete.
If that fails please post the stack trace.