Reply

How to fill the variables of a config templates when calling the API via python

New Member
Posts: 1
3274     0

Hello all, 

 

I am working on automating the configuration and the changes with netmri through external python scripting. 

 

I try top update the description for a particular interface based on an external csv file, I use the fllowing API: 

 

"api_request('config_templates/run', {
'id':template_id,'device_ids':device_id,
# 'template_variables':template_variables,
'template_variables': '$ifdesc==test'," 

 

I created a config template with the variable $ifdesc  and i populate it from the csv file when calling the API 

 

I'm unable to use the template_variables and the descritpion goes empty ones i execute the script. 

does someone has an idea please how to use this ? 

Thx a lot for your help 

Have a good day 

Re: How to fill the variables of a config templates when calling the API via python

Superuser
Posts: 115
3275     0

Take a look here

 

https://github.com/infobloxopen/netmri-toolkit/blob/master/Python/NetMRI_GUI_Python/Run%20Template%2...

 

Let me know if you have any questions

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com
Showing results for 
Search instead for 
Did you mean: 

Recommended for You