Generating VLAN ID with NetMRI Configuration Templates

Posts: 23
3616     0



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.




Re: Generating VLAN ID with NetMRI Configuration Templates

Posts: 66
3617     0

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.


Showing results for 
Search instead for 
Did you mean: 

Recommended for You