Infoblox Exchange Cybersecurity Roadshow 2020 – Join us!
North America | Europe | Middle East/Africa | Asia-Pacific

Automation Scripts


Sending async command to wait on file transfer

[ Edited ]
Posts: 9
7129     0

Hello all,

I'm working on a python script to download a new version of IOS onto devices. The problem I'm running into is that NetMRI will say the command completed as OK while the file transfer is still ongoing. I was looking in the python library and found async command, but I can't get it to work. 



Is it possible to use this to make NetMRI wait until the device returns some specified text (seconds)?

How do I kill a long running async job? Now I can't run any more scripts on my test device because it says a command is still running?


If so, how can I make that work? Here's my command:


easy.send_async_command("copy scp://USERSmiley TongueASS@SERVER/{} {}:.format(New_Code_Version,Location_Clean), (360), (""))


Any help would be much appreciated!

Re: Sending async command to wait on file transfer

Posts: 412
7130     0

You need to use the following


import time






NetMRI has a builtin as well



This will tell it to sleep for 60 seconds 

Follow me on LinkedIn:

Re: Sending async command to wait on file transfer

Posts: 3
7130     0

Any chance you would be willing to share the rest of what you have built for your upgrade process?


I too am beginning to attempt to do use netmri to automate upgrades but I am very new to netmri and python - having a template that works would help tremendously.

Showing results for 
Search instead for 
Do you mean 

Recommended for You