UPM - Configure port dispay-string based on LLDP device system name

  • 0
  • 2
  • Question
  • Updated 8 months ago
  • Answered

We have a UPM device-detect profile in place and would like to configure the port display-string based on the device connected system name.

If we use the following to configure a generic name it works -

Configure port $EVENT.USER_PORT display-string "UPM-Moto-AP"

I would have thought the we would use $EVENT.SYSNAME however that didn't work

Also, are there any guides where we can better understand what variables we can use?


Photo of Mark Bayliss

Mark Bayliss

  • 100 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 2
Photo of Sumit Tokle

Sumit Tokle, Alum

  • 5,738 Points 5k badge 2x thumb
Official Response
I am not sure if there is a direct event for sysName, but you can use some logic to retrieve the switch name.

One of the logic is

Execute the command "show switch" and search for "SysName", push the o/p  in variable.

Below is the syntax for the same,

enable cli scripting per
set var CLI.OUT 0
show switch
set var input $TCL(split ${CLI.OUT} " ")
set var x $TCL(lsearch -glob $input "*SysName*")
set var x $TCL(lindex $input $x)
set var x $TCL(split $x " ")
set var switchname $TCL(lindex ${x} 10)