Just figured I would throw this out there, all the code I have posted to date has used
output = net_connect.send_command(command)
Which seems to always take ~30 seconds
Today I learned about
output = net_connect.send_command_expect(command)
which cuts the time down quite abit on average.
thanks for the tip. Whats the difference other than speed? Why bother with the first at all then?
Haven't looked much @ Netmiko directly TBH, its just easier to leverage jedelmen's work and go straight to ansible core modules or NAPLAM etc.
I think the diffrence is that the 1st one just waits ~30 seconds, the 2ed one waits till it gets a command prompt i think.
Not 100% sure
I haven't looked at ansible, I'll take a look at it. Thank you :-D
Quote from: dlots on January 26, 2017, 12:46:34 PM
I think the diffrence is that the 1st one just waits ~30 seconds, the 2ed one waits till it gets a command prompt i think.
Not 100% sure
I haven't looked at ansible, I'll take a look at it. Thank you :-D
Interesting. Didnt know this myself either. Thanks!
Drop the question in NTC netmiko channel Im sure Kirk Byers will be the first response. Or hit him up on twitter. BTW he is the creator of netmiko.