<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: UPM - Configure port dispay-string based on LLDP device system name in Scripting</title>
    <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20636#M262</link>
    <description>Smaller code:&lt;BR /&gt;
&lt;BR /&gt;
set var CLI.OUT " "&lt;BR /&gt;
show switch&lt;BR /&gt;
set var sysname $TCL(lrange ${CLI.OUT} 1 1)</description>
    <pubDate>Fri, 04 Apr 2014 18:24:00 GMT</pubDate>
    <dc:creator>Sumit_Tokle</dc:creator>
    <dc:date>2014-04-04T18:24:00Z</dc:date>
    <item>
      <title>UPM - Configure port dispay-string based on LLDP device system name</title>
      <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20630#M256</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
If we use the following to configure a generic name it works - &lt;BR /&gt;
&lt;BR /&gt;
&lt;I&gt;Configure port $EVENT.USER_PORT display-string "UPM-Moto-AP" &lt;/I&gt;&lt;BR /&gt;
&lt;BR /&gt;
I would have thought the we would use $EVENT.SYSNAME however that didn't work&lt;BR /&gt;
&lt;BR /&gt;
Also, are there any guides where we can better understand what variables we can use?&lt;BR /&gt;
&lt;BR /&gt;
Cheers,&lt;BR /&gt;
&lt;BR /&gt;
Mark&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Apr 2014 04:41:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20630#M256</guid>
      <dc:creator>Mark_Bayliss</dc:creator>
      <dc:date>2014-04-04T04:41:00Z</dc:date>
    </item>
    <item>
      <title>RE: UPM - Configure port dispay-string based on LLDP device system name</title>
      <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20631#M257</link>
      <description>I am not sure if there is a direct event for sysName, but you can use some logic to retrieve the switch name.&lt;BR /&gt;
&lt;BR /&gt;
One of the logic is&lt;BR /&gt;
&lt;BR /&gt;
Execute the command "show switch" and search for "SysName", push the o/p  in variable.&lt;BR /&gt;
&lt;BR /&gt;
Below is the syntax for the same,&lt;BR /&gt;
&lt;BR /&gt;
enable cli scripting per&lt;BR /&gt;
set var CLI.OUT 0&lt;BR /&gt;
show switch&lt;BR /&gt;
set var input $TCL(split ${CLI.OUT} " ")&lt;BR /&gt;
set var x $TCL(lsearch -glob $input "*SysName*")&lt;BR /&gt;
set var x $TCL(lindex $input $x)&lt;BR /&gt;
set var x $TCL(split $x " ")&lt;BR /&gt;
set var switchname $TCL(lindex ${x} 10)&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Apr 2014 16:56:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20631#M257</guid>
      <dc:creator>Sumit_Tokle</dc:creator>
      <dc:date>2014-04-04T16:56:00Z</dc:date>
    </item>
    <item>
      <title>RE: UPM - Configure port dispay-string based on LLDP device system name</title>
      <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20632#M258</link>
      <description>The case was to configure the display string of a port with the name of the device using LLDP. Is this the solution ?&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Apr 2014 16:56:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20632#M258</guid>
      <dc:creator>JohanHendrikx</dc:creator>
      <dc:date>2014-04-04T16:56:00Z</dc:date>
    </item>
    <item>
      <title>RE: UPM - Configure port dispay-string based on LLDP device system name</title>
      <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20633#M259</link>
      <description>Yes, above would be another way.</description>
      <pubDate>Fri, 04 Apr 2014 16:56:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20633#M259</guid>
      <dc:creator>Sumit_Tokle</dc:creator>
      <dc:date>2014-04-04T16:56:00Z</dc:date>
    </item>
    <item>
      <title>RE: UPM - Configure port dispay-string based on LLDP device system name</title>
      <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20634#M260</link>
      <description>Can you explain how a "show switch" can  configure the port display-string on the device connected system name.&lt;BR /&gt;</description>
      <pubDate>Fri, 04 Apr 2014 16:56:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20634#M260</guid>
      <dc:creator>JohanHendrikx</dc:creator>
      <dc:date>2014-04-04T16:56:00Z</dc:date>
    </item>
    <item>
      <title>RE: UPM - Configure port dispay-string based on LLDP device system name</title>
      <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20635#M261</link>
      <description>I misunderstood the question, LLDP, CDP (For Cisco)or EDP(For Extreme) would be the solution.</description>
      <pubDate>Fri, 04 Apr 2014 16:56:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20635#M261</guid>
      <dc:creator>Sumit_Tokle</dc:creator>
      <dc:date>2014-04-04T16:56:00Z</dc:date>
    </item>
    <item>
      <title>RE: UPM - Configure port dispay-string based on LLDP device system name</title>
      <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20636#M262</link>
      <description>Smaller code:&lt;BR /&gt;
&lt;BR /&gt;
set var CLI.OUT " "&lt;BR /&gt;
show switch&lt;BR /&gt;
set var sysname $TCL(lrange ${CLI.OUT} 1 1)</description>
      <pubDate>Fri, 04 Apr 2014 18:24:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20636#M262</guid>
      <dc:creator>Sumit_Tokle</dc:creator>
      <dc:date>2014-04-04T18:24:00Z</dc:date>
    </item>
    <item>
      <title>RE: UPM - Configure port dispay-string based on LLDP device system name</title>
      <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20637#M263</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I need to refresh this thread.&lt;BR /&gt;
I'm looking for a solution, that changes the port "display-string" &amp;amp; "description string" based on lldp remote information (in this case AP 3825i). Trigger should be a port up event and then the script should be run every 12 or maybe every 24h.&lt;BR /&gt;
&lt;BR /&gt;
The input for the script can taken from following output/show-command.&lt;BR /&gt;
&lt;BR /&gt;
show lldp ports &lt;I&gt;&lt;/I&gt; neighbors detailed | include "System Name"&lt;BR /&gt;
&lt;BR /&gt;
my problem:&lt;BR /&gt;
I came from EOS world and have no skills in XOS scripting or programming.&lt;BR /&gt;
&lt;BR /&gt;
I understand the main information of the first answer in this thread.&lt;BR /&gt;
&lt;BR /&gt;
- how can I trigger this by time?&lt;BR /&gt;
- how can I define a variable in show-command?&lt;BR /&gt;
&lt;BR /&gt;
I hope you can help me and give me some tips.&lt;BR /&gt;</description>
      <pubDate>Sun, 07 Feb 2016 04:42:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20637#M263</guid>
      <dc:creator>PeterK</dc:creator>
      <dc:date>2016-02-07T04:42:00Z</dc:date>
    </item>
    <item>
      <title>RE: UPM - Configure port dispay-string based on LLDP device system name</title>
      <link>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20638#M264</link>
      <description>Hi Peter,&lt;BR /&gt;
&lt;BR /&gt;
the UPM variables are described in the EXOS User Guide in the Universal Port Confguration Overview  chapter. To detect what kind of device is connected to the port you can use these variables:&lt;BR /&gt;
&lt;UL&gt; 
&lt;LI&gt;&lt;I&gt;$EVENT.DEVICE&lt;/I&gt; - Device identifcation string.Possible values are: AVAYA_PHONE, GEN_TEL_PHONE, ROUTER, BRIDGE, REPEATER, WLAN_ACCESS_PT, DOCSIS_CABLE_SER, STATION_ONLY and OTHER. 
&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;$EVENT.DEVICE_IP &lt;/I&gt;- The IP address of the device (if available). Blank if not available 
&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;$EVENT.DEVICE_MAC &lt;/I&gt;- The MAC address of the device (if available). Blank if not available. 
&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;$EVENT.DEVICE_POWER &lt;/I&gt;- The power of the device in milliwatts (if available). Blank if not available. 
&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;$EVENT.DEVICE_MANUFACTURER_NAME &lt;/I&gt;-The manufacturer of the device. 
&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;$EVENT.DEVICE_MODEL_NAME&lt;/I&gt; - Model name of the device. 
&lt;/LI&gt;&lt;LI&gt;&lt;I&gt;$EVENT.USER_PORT &lt;/I&gt;- Port associated with the event.&lt;/LI&gt;&lt;/UL&gt;The problem is even there are variables defined, they will not return a correct value every time even the &lt;I&gt;﻿&lt;/I&gt;&lt;I&gt;show lldp nei detail &lt;/I&gt;command returns a lots of information. I've never get the MANUFACTURER_NAME nor the MODEL_NAME value. I've tested some Grandstream IP Phones and also Extremenetworks APs.&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Sun, 07 Feb 2016 04:42:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/upm-configure-port-dispay-string-based-on-lldp-device-system/m-p/20638#M264</guid>
      <dc:creator>Gabriel_Bagita</dc:creator>
      <dc:date>2016-02-07T04:42:00Z</dc:date>
    </item>
  </channel>
</rss>

