Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

Automation Scripts

Reply
Highlighted

How to pass long lines of code via NetMRI WAPI?

Authority
Posts: 43
271     0

Hi Everyone,

 

My name is Nidhi and I have a question for NetMRI wapi for Network Automation. I'm creating a scheduled job in netMRi using python WAPI, I have successfully created a Job which I see in NetMRI with exact lines of codes 

Here is my wapi which I used

 

net_mri_job = 'XXXX//job_specifications/create.json?name=TEST_JOB&script_id=XX&device_ids='+str(dev_id)+'&schedule=0 0 1 1 2&$commands_to_be_executed='+data;

 

data = "One bing sting of commands"

 

When this Job is pushed to the device it failed with the below error message.

 

*** Error evaluation line($commnad_to_be_executed = 'edit line1 line2 line 3...')

 

can someone advise how to preserver a new line within wapi call?

 

 

 

I posted a similar question couple of years ago when I was using Perl API. Smiley Happy

 

I would appreciate an early response.

 

Thanks

Nidhi Srivastava

 

 

Showing results for 
Search instead for 
Do you mean 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin