Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

Cisco Prime Infrastructure - Configuration Templates - detect interfaces

Let’s say we have a scenario where we want to add a command to all access ports in 10 switches. How do I make the configuration template go through every interface in each switch and detect if it’s an access port and then add a command to those ports?

In LMS we used to do something like:


Interface [#.*Ethernet.*#]

+ switchport access


#same interface as above#

+ switchport port-security


In the Configuration Templates the closest thing I found was this:

#set($valueOfChar= "-")

#if($interfaceName.indexOf($valueOfChar)== -1)

interface $interfaceName


interface range $interfaceName


#if($configureInterfacesAs == "access")

switchport mode access

switchport access vlan $vlanId


switchport mode trunk


But that requires that input about the interfaces.

Also does anyone know if there is a website that describes the variables / language used? Or a guide or something that can be downloaded / bought that will explain "everything" we need to know to be able to make "advanced" configuration templates.

In Advance:

Thank you very much to anyone out there who has input/help on this one.

New Member

To those it might interest.

To those it might interest. We've learned that "compliance" isn't a feature that available on Prime yet. Seems like other features are more important to Cisco... sadly.

We went back to LMS 4.2.2 for this issue. Alternatively I made a Linux script with expect that does the same thing so that might also be an option for people without LMS.

CreatePlease to create content