question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Huawei SmartAX 5800 - How to get around no terminal width

See original GitHub issue

Hey, 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:closed
  • Created 4 years ago
  • Comments:20 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
BSpendlovecommented, Mar 25, 2020

Apologies! Iā€™ve managed to get it working now šŸ˜„ Same issue as in the HuaweiBase class with the strip_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 šŸ‘

1reaction
stvnkemcommented, Mar 23, 2020

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SmartAX EA5800 Series OLT Huawei Enterprise
SmartAX EA5800 is a full-service distributed Optical Line Terminal (OLT) for building green, ultra-broadband, and intelligent aggregation access networks.
Read more >
Basic Interface Configuration Commands - Huawei Support
The display interface brief command displays brief information about interfaces, including the physical status, link-layer protocol status, inbound and outboundĀ ...
Read more >
Ethernet Interface Configuration Commands - Huawei Support
To avoid the extra system load caused by frequent interface status changes, run the carrier command to configure the delay in reporting interface...
Read more >
VLAN Configuration Commands - Huawei Support
If no VLAN is associated with any IP subnet by using the ip-subnet-vlan command, the display ip-subnet-vlan vlan command does not display any...
Read more >
UI Configuration Commands - Huawei Support
Console interface does not support this command. ... To check detailed configuration information about all user interfaces or a specified user interface,Ā ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found