09-27-2017 01:52 PM
We have a scripted configuration generator (for access layer switches) which I'm trying to move into NetMRI and use it's builtin constructs, so that our operations staff can run the template and output to a text file.
I've defined a configuration template and the variables within the template, and I know that I can leverage a list to fill in the variables, but we generate the VLAN IDs based upon the IP address that we would be assigning to the switch.
Where should I include the VLAN ID calculations? I could write a python module to run the calculations, but I'm not sure how I can tie the script and the template together.
10-09-2017 08:35 AM
I have used external CGI scripts for this function. It pulls the template, then runs it through a routine to replace variables based on inputs given in the url.
Allows me to 'copy http://path/to/cgi/script/var=value/var2=value running-config' and build consistently.
You will need to convert the script to use something other than '?' before defining variables, as shown above. Cisco sees that as help regardless of how you try to escape it.