ktbyers / netmiko

Multi-vendor library to simplify Paramiko SSH connections to network devices
MIT License
3.6k stars 1.31k forks source link

A10 long command have horizontal scroll, for some models #3356

Open LFR65 opened 10 months ago

LFR65 commented 10 months ago

Hi,

I'm new at netmiko and I'm trying to use it at A10 network devices. With some A10 it works ok, when I issue a command I get the right response. With other devices models (with same ACOS version) do not work. The command is sh running-config partition-config HOSTPART | sec slb virtual-server

What I see at the A10 is for no working one (model TH3040S, version 5.2.1-P7): PCHOST-Active-affinity-def-vMaster[5/1]#$PART | sec slb virtual-server

What I see at the working one (model TH5440S, version 5.2.1-P9): CVHOST-Active-affinity-def-vMaster[1/1]#sh running-config partition-config HOSTPART | sec slb virtual-server

From the netmiko log I think the no working one never get the prompt after de command:

DEBUG:netmiko:write_channel: b'sh running-config partition-config HOSTPART | sec slb virtual-server\n'
DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: sh running-config partition-conf$-config partition-confi          $-config partition-config         $-config partition-config         $-config partition-config H       $-config partition-config HO      $-config partition-config HOS     $-config partition-config HOST    $-config partition-config HOSTP   $-config partition-config HOSTPA  $-config partition-config HOSTPAR $rtition-config HOSTPART          $rtition-config HOSTPART00         $rtition-config HOSTPART0000        $rtition-config PCHOST       $rtition-config PCHOST       $rtition-config PCHOST |     $rtition-config PCHOST |     $rtition-config PCHOST | s   $rtition-config PCHOST | se  $rtition-config PCHOST | sec $nfig PCHOST | sec           $nfig PCHOST | sec s         $nfig PCHOST | sec sl        $nfig PCHOST | sec slb       $nfig PCHOST | sec slb       $nfig PCHOST | sec slb v     $nfig PCHOST | sec slb vi    $nfig PCHOST | sec slb vir   $nfig PCHOST | sec slb virt  $nfig PCHOST | sec slb virtu $PART | sec slb virtua          $PART | sec slb virtual         $PART | sec slb virtual-        $PART | sec slb virtual-s       $PART | sec slb virtual-se      $PART | sec slb virtual-ser     $PART | sec slb virtual-serv    $PART | sec slb virtual-serve   $PART | sec slb virtual-server  

DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: slb virtual-server HOSTPART 10.1.1.1 
...
PCHOST-Active-affinity-def-vMaster[5/1]#
DEBUG:netmiko:read_channel: 
DEBUG:netmiko:read_channel: 
...
DEBUG:netmiko:read_channel: 
DEBUG:paramiko.transport:EOF in transport thread

The real names are not "PCHOST", "CVHOST", "HOSTPART...".

The working one send "\n" after the command, for the no working one I do not see the "\n", at the log.

How can I handle this, device with the command not show completely at the command prompt? Is this the problem?

Thanks,

Best Regards. Luis

ktbyers commented 9 months ago

Does the A10 have a way to set the terminal width?

You could maybe try adding the argument of cmd_verify=False to your send_command() call (where you are executing your sh running-config partition-config HOSTPART | sec slb virtual-server command).