Huawei SmartAX 5800 - How to get around no terminal width
See original GitHub issueHey, firstly: Thanks so much for your time and investment into Netmiko, did you wonder if it would be used this much? š
Unfortunately, Huawei SmartAX (not so smart) do not support to disable paging and I always run into issues because I need to send a space (enter will only output another line of config). Iāve managed to easily figure out how to overcome this issue and get around it manually but would like to implement it in my base class that Iāve created for the SmartAX.
The problem also occurs sometimes when sending a command, I might get an output like this:
mydevice.test.lab#display current-configuration
{ <cr>|ont<K>|port<K>|section<K>|service-port<K>|simple<K>||<K> }:
So I have to manually send an enter. Iām looking how to implement this possibly in the send_command function, would you recommend that? or in the find_prompt function? Mainly to match ā{ <crā because this output also shows a lot on things like ACL entries each time you configure an ACL before it appliesā¦
When I hit the paging limit (I know, they should just be able to properly implement SSH with no paging, but Iām trying my best here to work around it haha), I see things like:
"---- More ( Press 'Q' to break ) ----"
Which I need to send a space (not return because it only shows 1 line at a time with return)ā¦ Iāve got round this all by simply using the read_channel and catching if these appear in the output, then send enter/or space depending on which one appearsā¦
Iāve looked a little into it myself but hope you donāt mind me posting this to point me in the right direction so I can figure out the rest? Thanks again for all your fantastic work
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (17 by maintainers)
Top GitHub Comments
Apologies! Iāve managed to get it working now š Same issue as in the
HuaweiBase
class with thestrip_ansi_escape_codes
. After fixing some of the pattern/check_string for the different modes, it works as expected. Going to do some intensive testing šThe smart command is used to enable interactive operation. After that, if you input a command and press Enter, the system determines whether the keywords and parameters of the command are complete. If not, the system prompts you to enter the complete parameters. Meanwhile, the system displays the value range of the current parameters. If yes, the system runs the command. The āundo smartā command is used to disable the interactive operation. After that, the system runs the command instantly after you input a command and press Enter.
@BSpendlove Please have a try!