<?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: Cannot echo a cli variable &amp;quot;VLAN&amp;quot; in XIQ script in ExtremeCloud IQ</title>
    <link>https://community.extremenetworks.com/t5/extremecloud-iq/cannot-echo-a-cli-variable-quot-vlan-quot-in-xiq-script/m-p/117966#M4553</link>
    <description>&lt;P&gt;Hi Walt,&lt;/P&gt;&lt;P&gt;I spun your TCL script through Chat GPT a few times and it came back with a version that does search VLANs for BMS. If exist it returns 1. If I delete the VLAN it returns 0.&lt;/P&gt;&lt;P&gt;* EXOS-VM.12 # show vlan&lt;BR /&gt;Untagged ports auto-move: Inform&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;Name VID Protocol Addr Flags Proto Ports Virtual&lt;BR /&gt;Active router&lt;BR /&gt;/Total&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;BMS 4091 ---------------------------------------------- ANY 0 /0 VR-Default&lt;BR /&gt;Default 1 192.168.0.26 /24 ------------T------------- ANY 1 /7 VR-Default&lt;BR /&gt;Mgmt 4095 ---------------------------------------------- ANY 0 /1 VR-Mgmt&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;Flags : (B) BFD Enabled, (c) 802.1ad customer VLAN, (C) EAPS Control VLAN,&lt;BR /&gt;(d) Dynamically created VLAN, (D) VLAN Admin Disabled,&lt;BR /&gt;(E) ESRP Enabled, (f) IP Forwarding Enabled,&lt;BR /&gt;(F) Learning Disabled, (i) ISIS Enabled,&lt;BR /&gt;(I) Inter-Switch Connection VLAN for MLAG, (k) PTP Configured,&lt;BR /&gt;(l) MPLS Enabled, (L) Loopback Enabled, (m) IPmc Forwarding Enabled,&lt;BR /&gt;(M) Translation Member VLAN or Subscriber VLAN, (n) IP Multinetting Enabled,&lt;BR /&gt;(N) Network Login VLAN, (o) OSPF Enabled, (O) Virtual Network Overlay,&lt;BR /&gt;(p) PIM Enabled, (P) EAPS protected VLAN, (r) RIP Enabled,&lt;BR /&gt;(R) Sub-VLAN IP Range Configured, (s) Sub-VLAN, (S) Super-VLAN,&lt;BR /&gt;(t) Translation VLAN or Network VLAN, (T) Member of STP Domain,&lt;BR /&gt;(v) VRRP Enabled, (V) VPLS Enabled, (W) VPWS Enabled,&lt;BR /&gt;(Y) Policy Enabled&lt;/P&gt;&lt;P&gt;Total number of VLAN(s) : 3&lt;BR /&gt;* EXOS-VM.13 #&lt;/P&gt;&lt;P&gt;TCL Script:&lt;/P&gt;&lt;P&gt;enable cli scripting&lt;BR /&gt;set var CLI.OUT ""&lt;/P&gt;&lt;P&gt;# Run the command&lt;BR /&gt;show vlan&lt;/P&gt;&lt;P&gt;# Initialize VLAN variable&lt;BR /&gt;set var VLAN 0&lt;/P&gt;&lt;P&gt;# Loop through CLI.OUT to check for "BMS"&lt;BR /&gt;foreach line $CLI.OUT {&lt;BR /&gt;echo "Checking: $line"&lt;BR /&gt;if {[regexp -nocase "BMS" $line]} {&lt;BR /&gt;set var VLAN 1&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;# Output the result&lt;BR /&gt;echo "VLAN BMS exists: $VLAN"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Feb 2025 18:46:51 GMT</pubDate>
    <dc:creator>RobertD1</dc:creator>
    <dc:date>2025-02-20T18:46:51Z</dc:date>
    <item>
      <title>Cannot echo a cli variable "VLAN" in XIQ script</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq/cannot-echo-a-cli-variable-quot-vlan-quot-in-xiq-script/m-p/117952#M4545</link>
      <description>&lt;P&gt;I AM TRYING TO CONFIRM THAT THE VARIABLE HAS BEEN CORRECTLY SET BEFORE I CONTINUE CREATING THE REST OF THE SCRIPT.&lt;/P&gt;&lt;P&gt;enable cli scripting&lt;BR /&gt;set var CLI.OUT " "&lt;/P&gt;&lt;P&gt;# Check if this is BMS vlan&lt;BR /&gt;show vlan&lt;BR /&gt;set var output $TCL(lrange ${CLI.OUT} 7 7)&lt;/P&gt;&lt;P&gt;If ($MATCH($output,"(BMS)") == 1 ) THEN&lt;BR /&gt;SET VAR VLAN (1)&lt;BR /&gt;ELSE&lt;BR /&gt;SET VAR VLAN (0)&lt;BR /&gt;&lt;BR /&gt;echo $VLAN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help Appreciated&lt;/P&gt;&lt;P&gt;Walt&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 20:09:09 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq/cannot-echo-a-cli-variable-quot-vlan-quot-in-xiq-script/m-p/117952#M4545</guid>
      <dc:creator>Walt_Witkowski</dc:creator>
      <dc:date>2025-02-19T20:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot echo a cli variable "VLAN" in XIQ script</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq/cannot-echo-a-cli-variable-quot-vlan-quot-in-xiq-script/m-p/117966#M4553</link>
      <description>&lt;P&gt;Hi Walt,&lt;/P&gt;&lt;P&gt;I spun your TCL script through Chat GPT a few times and it came back with a version that does search VLANs for BMS. If exist it returns 1. If I delete the VLAN it returns 0.&lt;/P&gt;&lt;P&gt;* EXOS-VM.12 # show vlan&lt;BR /&gt;Untagged ports auto-move: Inform&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;Name VID Protocol Addr Flags Proto Ports Virtual&lt;BR /&gt;Active router&lt;BR /&gt;/Total&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;BMS 4091 ---------------------------------------------- ANY 0 /0 VR-Default&lt;BR /&gt;Default 1 192.168.0.26 /24 ------------T------------- ANY 1 /7 VR-Default&lt;BR /&gt;Mgmt 4095 ---------------------------------------------- ANY 0 /1 VR-Mgmt&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;Flags : (B) BFD Enabled, (c) 802.1ad customer VLAN, (C) EAPS Control VLAN,&lt;BR /&gt;(d) Dynamically created VLAN, (D) VLAN Admin Disabled,&lt;BR /&gt;(E) ESRP Enabled, (f) IP Forwarding Enabled,&lt;BR /&gt;(F) Learning Disabled, (i) ISIS Enabled,&lt;BR /&gt;(I) Inter-Switch Connection VLAN for MLAG, (k) PTP Configured,&lt;BR /&gt;(l) MPLS Enabled, (L) Loopback Enabled, (m) IPmc Forwarding Enabled,&lt;BR /&gt;(M) Translation Member VLAN or Subscriber VLAN, (n) IP Multinetting Enabled,&lt;BR /&gt;(N) Network Login VLAN, (o) OSPF Enabled, (O) Virtual Network Overlay,&lt;BR /&gt;(p) PIM Enabled, (P) EAPS protected VLAN, (r) RIP Enabled,&lt;BR /&gt;(R) Sub-VLAN IP Range Configured, (s) Sub-VLAN, (S) Super-VLAN,&lt;BR /&gt;(t) Translation VLAN or Network VLAN, (T) Member of STP Domain,&lt;BR /&gt;(v) VRRP Enabled, (V) VPLS Enabled, (W) VPWS Enabled,&lt;BR /&gt;(Y) Policy Enabled&lt;/P&gt;&lt;P&gt;Total number of VLAN(s) : 3&lt;BR /&gt;* EXOS-VM.13 #&lt;/P&gt;&lt;P&gt;TCL Script:&lt;/P&gt;&lt;P&gt;enable cli scripting&lt;BR /&gt;set var CLI.OUT ""&lt;/P&gt;&lt;P&gt;# Run the command&lt;BR /&gt;show vlan&lt;/P&gt;&lt;P&gt;# Initialize VLAN variable&lt;BR /&gt;set var VLAN 0&lt;/P&gt;&lt;P&gt;# Loop through CLI.OUT to check for "BMS"&lt;BR /&gt;foreach line $CLI.OUT {&lt;BR /&gt;echo "Checking: $line"&lt;BR /&gt;if {[regexp -nocase "BMS" $line]} {&lt;BR /&gt;set var VLAN 1&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;# Output the result&lt;BR /&gt;echo "VLAN BMS exists: $VLAN"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 18:46:51 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq/cannot-echo-a-cli-variable-quot-vlan-quot-in-xiq-script/m-p/117966#M4553</guid>
      <dc:creator>RobertD1</dc:creator>
      <dc:date>2025-02-20T18:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot echo a cli variable "VLAN" in XIQ script</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq/cannot-echo-a-cli-variable-quot-vlan-quot-in-xiq-script/m-p/117967#M4554</link>
      <description>&lt;P&gt;Results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;XIQ-SE User: root&lt;BR /&gt;XIQ-SE User Domain:&lt;BR /&gt;CLI Login: admin&lt;BR /&gt;EXOS-VM 192.168.0.26 02/20/2025 06:46:38 PM at 06:46:38 PM&lt;BR /&gt;* EXOS-VM.1 # enable cli scripting&lt;BR /&gt;* EXOS-VM.2 #&lt;/P&gt;&lt;P&gt;* EXOS-VM.2 # show vlan&lt;BR /&gt;Untagged ports auto-move: Inform&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;Name VID Protocol Addr Flags Proto Ports Virtual&lt;BR /&gt;Active router&lt;BR /&gt;/Total&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;BMS 4091 ---------------------------------------------- ANY 0 /0 VR-Default&lt;BR /&gt;Default 1 192.168.0.26 /24 ------------T------------- ANY 1 /7 VR-Default&lt;BR /&gt;Mgmt 4095 ---------------------------------------------- ANY 0 /1 VR-Mgmt&lt;BR /&gt;-----------------------------------------------------------------------------------------------&lt;BR /&gt;Flags : (B) BFD Enabled, (c) 802.1ad customer VLAN, (C) EAPS Control VLAN,&lt;BR /&gt;(d) Dynamically created VLAN, (D) VLAN Admin Disabled,&lt;BR /&gt;(E) ESRP Enabled, (f) IP Forwarding Enabled,&lt;BR /&gt;(F) Learning Disabled, (i) ISIS Enabled,&lt;BR /&gt;(I) Inter-Switch Connection VLAN for MLAG, (k) PTP Configured,&lt;BR /&gt;(l) MPLS Enabled, (L) Loopback Enabled, (m) IPmc Forwarding Enabled,&lt;BR /&gt;(M) Translation Member VLAN or Subscriber VLAN, (n) IP Multinetting Enabled,&lt;BR /&gt;(N) Network Login VLAN, (o) OSPF Enabled, (O) Virtual Network Overlay,&lt;BR /&gt;(p) PIM Enabled, (P) EAPS protected VLAN, (r) RIP Enabled,&lt;BR /&gt;(R) Sub-VLAN IP Range Configured, (s) Sub-VLAN, (S) Super-VLAN,&lt;BR /&gt;(t) Translation VLAN or Network VLAN, (T) Member of STP Domain,&lt;BR /&gt;(v) VRRP Enabled, (V) VPLS Enabled, (W) VPWS Enabled,&lt;BR /&gt;(Y) Policy Enabled&lt;/P&gt;&lt;P&gt;Total number of VLAN(s) : 3&lt;BR /&gt;* EXOS-VM.3 #&lt;/P&gt;&lt;P&gt;Checking: *&lt;BR /&gt;Checking: EXOS-VM.2&lt;BR /&gt;Checking: #&lt;BR /&gt;Checking: show&lt;BR /&gt;Checking: vlan&lt;BR /&gt;Checking: Untagged&lt;BR /&gt;Checking: ports&lt;BR /&gt;Checking: auto-move:&lt;BR /&gt;Checking: Inform&lt;BR /&gt;Checking: -----------------------------------------------------------------------------------------------&lt;BR /&gt;Checking: Name&lt;BR /&gt;Checking: VID&lt;BR /&gt;Checking: Protocol&lt;BR /&gt;Checking: Addr&lt;BR /&gt;Checking: Flags&lt;BR /&gt;Checking: Proto&lt;BR /&gt;Checking: Ports&lt;BR /&gt;Checking: Virtual&lt;BR /&gt;Checking: Active&lt;BR /&gt;Checking: router&lt;BR /&gt;Checking: /Total&lt;BR /&gt;Checking: -----------------------------------------------------------------------------------------------&lt;BR /&gt;Checking: BMS&lt;BR /&gt;Checking: 4091&lt;BR /&gt;Checking: ----------------------------------------------&lt;BR /&gt;Checking: ANY&lt;BR /&gt;Checking: 0&lt;BR /&gt;Checking: /0&lt;BR /&gt;Checking: VR-Default&lt;BR /&gt;Checking: Default&lt;BR /&gt;Checking: 1&lt;BR /&gt;Checking: 192.168.0.26&lt;BR /&gt;Checking: /24&lt;BR /&gt;Checking: ------------T-------------&lt;BR /&gt;Checking: ANY&lt;BR /&gt;Checking: 1&lt;BR /&gt;Checking: /7&lt;BR /&gt;Checking: VR-Default&lt;BR /&gt;Checking: Mgmt&lt;BR /&gt;Checking: 4095&lt;BR /&gt;Checking: ----------------------------------------------&lt;BR /&gt;Checking: ANY&lt;BR /&gt;Checking: 0&lt;BR /&gt;Checking: /1&lt;BR /&gt;Checking: VR-Mgmt&lt;BR /&gt;Checking: -----------------------------------------------------------------------------------------------&lt;BR /&gt;Checking: Flags&lt;BR /&gt;Checking: :&lt;BR /&gt;Checking: (B)&lt;BR /&gt;Checking: BFD&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (c)&lt;BR /&gt;Checking: 802.1ad&lt;BR /&gt;Checking: customer&lt;BR /&gt;Checking: VLAN,&lt;BR /&gt;Checking: (C)&lt;BR /&gt;Checking: EAPS&lt;BR /&gt;Checking: Control&lt;BR /&gt;Checking: VLAN,&lt;BR /&gt;Checking: (d)&lt;BR /&gt;Checking: Dynamically&lt;BR /&gt;Checking: created&lt;BR /&gt;Checking: VLAN,&lt;BR /&gt;Checking: (D)&lt;BR /&gt;Checking: VLAN&lt;BR /&gt;Checking: Admin&lt;BR /&gt;Checking: Disabled,&lt;BR /&gt;Checking: (E)&lt;BR /&gt;Checking: ESRP&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (f)&lt;BR /&gt;Checking: IP&lt;BR /&gt;Checking: Forwarding&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (F)&lt;BR /&gt;Checking: Learning&lt;BR /&gt;Checking: Disabled,&lt;BR /&gt;Checking: (i)&lt;BR /&gt;Checking: ISIS&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (I)&lt;BR /&gt;Checking: Inter-Switch&lt;BR /&gt;Checking: Connection&lt;BR /&gt;Checking: VLAN&lt;BR /&gt;Checking: for&lt;BR /&gt;Checking: MLAG,&lt;BR /&gt;Checking: (k)&lt;BR /&gt;Checking: PTP&lt;BR /&gt;Checking: Configured,&lt;BR /&gt;Checking: (l)&lt;BR /&gt;Checking: MPLS&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (L)&lt;BR /&gt;Checking: Loopback&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (m)&lt;BR /&gt;Checking: IPmc&lt;BR /&gt;Checking: Forwarding&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (M)&lt;BR /&gt;Checking: Translation&lt;BR /&gt;Checking: Member&lt;BR /&gt;Checking: VLAN&lt;BR /&gt;Checking: or&lt;BR /&gt;Checking: Subscriber&lt;BR /&gt;Checking: VLAN,&lt;BR /&gt;Checking: (n)&lt;BR /&gt;Checking: IP&lt;BR /&gt;Checking: Multinetting&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (N)&lt;BR /&gt;Checking: Network&lt;BR /&gt;Checking: Login&lt;BR /&gt;Checking: VLAN,&lt;BR /&gt;Checking: (o)&lt;BR /&gt;Checking: OSPF&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (O)&lt;BR /&gt;Checking: Virtual&lt;BR /&gt;Checking: Network&lt;BR /&gt;Checking: Overlay,&lt;BR /&gt;Checking: (p)&lt;BR /&gt;Checking: PIM&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (P)&lt;BR /&gt;Checking: EAPS&lt;BR /&gt;Checking: protected&lt;BR /&gt;Checking: VLAN,&lt;BR /&gt;Checking: (r)&lt;BR /&gt;Checking: RIP&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (R)&lt;BR /&gt;Checking: Sub-VLAN&lt;BR /&gt;Checking: IP&lt;BR /&gt;Checking: Range&lt;BR /&gt;Checking: Configured,&lt;BR /&gt;Checking: (s)&lt;BR /&gt;Checking: Sub-VLAN,&lt;BR /&gt;Checking: (S)&lt;BR /&gt;Checking: Super-VLAN,&lt;BR /&gt;Checking: (t)&lt;BR /&gt;Checking: Translation&lt;BR /&gt;Checking: VLAN&lt;BR /&gt;Checking: or&lt;BR /&gt;Checking: Network&lt;BR /&gt;Checking: VLAN,&lt;BR /&gt;Checking: (T)&lt;BR /&gt;Checking: Member&lt;BR /&gt;Checking: of&lt;BR /&gt;Checking: STP&lt;BR /&gt;Checking: Domain,&lt;BR /&gt;Checking: (v)&lt;BR /&gt;Checking: VRRP&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (V)&lt;BR /&gt;Checking: VPLS&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (W)&lt;BR /&gt;Checking: VPWS&lt;BR /&gt;Checking: Enabled,&lt;BR /&gt;Checking: (Y)&lt;BR /&gt;Checking: Policy&lt;BR /&gt;Checking: Enabled&lt;BR /&gt;Checking: Total&lt;BR /&gt;Checking: number&lt;BR /&gt;Checking: of&lt;BR /&gt;Checking: VLAN(s)&lt;BR /&gt;Checking: :&lt;BR /&gt;Checking: 3&lt;BR /&gt;Checking: *&lt;BR /&gt;Checking: EXOS-VM.3&lt;BR /&gt;Checking: #&lt;BR /&gt;VLAN BMS exists: 1&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 18:49:33 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq/cannot-echo-a-cli-variable-quot-vlan-quot-in-xiq-script/m-p/117967#M4554</guid>
      <dc:creator>RobertD1</dc:creator>
      <dc:date>2025-02-20T18:49:33Z</dc:date>
    </item>
  </channel>
</rss>

