Cisco Support Community
cancel
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:

precedence:

Interface [#.*Ethernet.*#]

+ switchport access

command:

#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

#else

interface range $interfaceName

#end

#if($configureInterfacesAs == "access")

switchport mode access

switchport access vlan $vlanId

#else

switchport mode trunk

#end

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.

1 REPLY
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.

423
Views
0
Helpful
1
Replies
CreatePlease to create content