SSO Login is being implemented on this site. Existing users: Your existing password must be reset the first time you login using SSO. Click here to reset your password first before login. Your new username will be your email.

Automation Scripts


Hit enter after a send_command in python/netmri

Posts: 1
1652     0

Hi Team,


I'm trying to write a python script in netmri to copy dap.xml file from ASA to my FTP server but once I issue copy it will ask for multiple prompt (we need just press 'enter' for 4 to 5 times) but I couldn't do this, could you please help? I've tried /r,/n and combination but no luck Smiley Sad


# Script-Filter:
# true


from python_helper import send_multiline
from python_helper import init_helper
from pprint import pprint
import re

# initiate API connector
cli = init_helper(api_url, http_username, http_password, job_id, device_id, batch_id)


#get current dap xml file
sh_disk = cli.send_command('sh disk0: | include dap.xml')

#Copy dap file to ftp

#cli.send_command('copy disk0:dap.xml ftp://ftpuser:ftppw@$device_dap.xml\n\n\n')




vpn-rnd-1# sh disk0: | include dap.xml
352 59869 Mar 24 2020 04:28:20 dap.xml
290 9468 Jun 21 2018 11:47:16 original_dap.xml


vpn-rnd-1# copy disk0:dap.xml ftp://ftpuser:ftppw@$device_dap.xml

Source filename [dap.xml]?

*** Job Failed Due to Timeout ***

Re: Hit enter after a send_command in python/netmri

Posts: 113
1653     0

Change the "\n" to "\r"

Follow me on LinkedIn:
Showing results for 
Search instead for 
Did you mean: 

Recommended for You