Hello all, is it possible to create a CCT that adds information to the description of the interfaces based on LLDP?
Also, doing the same with CDP results with the FQDN and the full interface name.
Is it possible to have just the name of the device and the interface abbreviation meaning
instead of "mydevice1.domain.com GigabitEthernet1/1" to have "mydevice1 Gi1/1"
Here is the script I am using for adding interfaces description based on CDP information.
/*
.CHANGE_TEMPLATE_DESCRIPTION
This CCT adds information from CDP to interface description.
.CHANGE_TEMPLATE_TAGS
Cisco, CDP
.PLATFORM_DESCRIPTION
Cisco IOS
.PARAMETER_LABEL @ContextNode
NCM node
.PARAMETER_DESCRIPTION @ContextNode
The node the template will operate on. All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining values of variables.
*/
script ConfigureCDPInterfacesDescription (NCM.Nodes @ContextNode)
{
CLI
{
configure terminal
}
foreach (@cdpItem in @ContextNode.CiscoCdp)
{
foreach (@interfaceItem in @ContextNode.Interfaces)
{
if (@interfaceItem.InterfaceIndex== @cdpItem.IfIndex)
{
CLI
{
interface @interfaceItem.InterfaceDescription
description @cdpItem.RemoteDevice @cdpItem.RemotePort
exit
}
}
}
}
CLI
{
end
}
}