Has anyone ever got the following doc example to work? I have changed it from shutdown a port to change the description as otherwise I would lose access to my switch (high quality example there Cisco) but nothing is deployed. I have created an interface.properties file as stated. What isn't clear is how exactly that interface.properties file gets invoked by that CLI template. This section of the manual is poor to say the least. Anybody been successful with this 'feature' ?
where $interfaceNameList is the database variable type whose value will be retrieved from the database. $interfaceNameList has a default value of IntfName. You need to create the interfaceNameList variable as DB data type (using the managed variable dialog box) and add set the default to IntfName. If you have not specified a default value, you can specify it when you deploy the CLI template.
To populate interfaceNameList with the value from the database, you must create a properties file to capture the query string and save it in the /opt/CSCOlumos/conf/ifm/template/inventoryTagsInTemplate folder. This is a sample of a property file called interface.properties:
After you create the CLI template and the property file and deploy the CLI template, the following CLI is configured on the devices. This output assumes that the device has two interfaces (Gigabitethernet0/1 and Gigabitethernet0/0):
What is missing from the example is the fact that you need to create a Variable in the Manage Variable List for the $interfaceNameList object. Here is what I did:
#foreach ($interfaceName in $interfaceNameList)
Next hightlight the interfaceNameList name and then click on the Manage Variables icon (upper right corner of the dialog). This will create a new variable of type String called interfaceNameList. Edit this new variable and change it to:
Default Value: IntfName
Note: IntfName was retrieved from the list of predefined variables listed in /opt/CSCOlumos/conf/ifm/template/inventoryTagsInTemplate mentioned above.
Thank you MARIO POIER
it worked fine with me but it only apply the commands under the physical interfaces
can we make any modification to apply the commands also under tunnel interfaces?