1752780 Members
6069 Online
108789 Solutions
New Discussion юеВ

Re: adding variable in configuration template

 
pnobels
Contributor

adding variable in configuration template

Hi,

i noticed you can use a variable in the configuration template.  But this variable is fixed for all switches you apply the template on.

If for example you want to add a description on a certain port on 20 switches, which contains the name of each individual switch, then it does not seem to be possible? 

3 REPLIES 3
LindsayHill
Honored Contributor

Re: adding variable in configuration template

There are some ways of using SNMP variables, which might let you do things like using sysName.

But what's the point in putting the switch name in the interface description? Seems a waste of useful real estate.

RPapaux
Valued Contributor

Re: adding variable in configuration template

Hi,

You can try the following:

1. In the script (ProCurve example)

interface 1

name ${SystemName}_YourSpecifcInterfaceDescription

exit

PS: adapt to your appropriate switch syntax.

2. in the workflow:

In the "Enter SystemName" field:   $(RFC1213-MIB|sysName|0)

then your SystemName will be added in your interface description.

Cheers

Ray

 

 

Pack3tL0ss
Valued Contributor

Re: adding variable in configuration template

I think Rpapaux probably provided the answer I think your after, but wanted to be sure.  The first time I read through the post I took it a different way.

i noticed you can use a variable in the configuration template.  But this variable is fixed for all switches you apply the template on.

If you place a variable like ${interface 1 desc} in the template, then it will always be "interface 20 desc" everytime you deploy the template, but you can obviously populate it with any value you want.

If you deploy the template to 20 switches it will give you the option to either use the same value for all switches in the deployment task, or to step through each switch so you can provide a different value.  On top of that a more recent feature gives you the ability to export a parameter file for the deployment, then import it with the values (or you can just import as long as you follow the required format of the csv).  Either way you can provide a different value for the variable on each of the 20 switches.

I'd try the system variable Rpapaux mentioned though.  If the sysname is what you're after as the int desc.  then that would be less effort than filling in the value for 20 switches.

PL