cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
602
Views
0
Helpful
1
Replies

Prime Infrastructure : Advance Templates

scvvuuren
Level 1
Level 1

Good Day

I need to create a template which identified interfaces with certain descriptions.

For this to work I see 2 possible scenarios.

Create a Database Query to get the information. (no db expert so moving on)

Create an interactive template which populates the variables as the script continues.

So the idea is that one could set a variable to output from a device. Thinking about this I found that doing a show run interface | i description to work best for my needs. But this is where it gets tricky. When one sets the variable to the command the actual string is populated into the variable instead of the output expected from the device. Not sure if anybody knows how to do this.

Template below refers to current status, I need to add more if statements etc but taking baby steps to understand the process first.

#foreach ($interfaceName in $interfaceNameList)
  #set ($description = 'show run interface f0/1 | i description')
interface f0/1
description $description
#end

Thanks in advance

1 Reply 1

GuillaumeCisco
Level 1
Level 1

Hi,

I found your way to deal with the problem very interesting and I tried to make a template but it seems that it's not possible to execute a "show" command in Prime Infrastructure, nor to get an output from the device, maybe someone could help us with this.

I'm looking for a way to get the interfaces' description from an sql query, I'll let you know if i manage to do it.

 

Review Cisco Networking for a $25 gift card