ollyg / Net-Appliance-Session

Development of Net::Appliance::Session Perl distribution
https://metacpan.org/pod/Net::Appliance::Session
12 stars 6 forks source link

timeout does not work for "wait for output" #24

Open whitedolphin opened 6 years ago

whitedolphin commented 6 years ago

Hello, i've been trying to figure a way to get script wait for an output (not for a prompt) but i was unable to find a way. Usual 'timeout' helps to wait for a prompt while we are receiving a large output from a device, but has no use for output. What i mean by that is: I have a few routers (multi-chassis Cisco NCS-6k) that have a lot of interfaces (around 700-1000 physical and logical interfaces). when i request 'show interfaces' , the router thinks for a bout 20-30sec (nothing happening to command prompt) before starting to produce the output for the command. when using the module and sending "s->cmd(show interfaces)", script waits for about 10 seconds and then gives the error: "read timed-out at /usr/share/perl5/vendor_perl/Net/CLI/Interact/Transport/Base/Unix.pm line 41"

Could you please help with a way to "ignore the emptiness" while "waiting for prompt"? thank you in advance!