<?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: Script synax that waits on user input before committing changes? in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22157#M1787</link>
    <description>Hi Stephen,&lt;BR /&gt;
&lt;BR /&gt;
I think you may be looking for the Built-In Function: $READ(prompt)&lt;BR /&gt;
&lt;BR /&gt;
#Example:&lt;BR /&gt;
set var CLI.OUT " "&lt;BR /&gt;
show port 5:2, 6:1 information&lt;BR /&gt;
show var CLI.OUT&lt;BR /&gt;
&lt;BR /&gt;
set var answer $READ(Are these the correct ports to be disabled?)&lt;BR /&gt;
&lt;BR /&gt;
#logic based on input&lt;BR /&gt;
&lt;BR /&gt;</description>
    <pubDate>Fri, 05 Feb 2016 23:03:00 GMT</pubDate>
    <dc:creator>Dorian_Perry</dc:creator>
    <dc:date>2016-02-05T23:03:00Z</dc:date>
    <item>
      <title>Script synax that waits on user input before committing changes?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22156#M1786</link>
      <description>We want to create a script that will do the following:&lt;BR /&gt;
&lt;BR /&gt;
show port 5:2,6:1 info&lt;BR /&gt;
Wait for user to answer if the ports shown are the correct ports to be disabled&lt;BR /&gt;
If yes execute "disable port 5:2,6:1", then execute "save config"&lt;BR /&gt;
If no abort&lt;BR /&gt;
&lt;BR /&gt;
I haven't been able to find a tcl example that incorporates waiting for user input with a if/then.&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Feb 2016 22:36:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22156#M1786</guid>
      <dc:creator>Stephen_Stormon</dc:creator>
      <dc:date>2016-02-05T22:36:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script synax that waits on user input before committing changes?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22157#M1787</link>
      <description>Hi Stephen,&lt;BR /&gt;
&lt;BR /&gt;
I think you may be looking for the Built-In Function: $READ(prompt)&lt;BR /&gt;
&lt;BR /&gt;
#Example:&lt;BR /&gt;
set var CLI.OUT " "&lt;BR /&gt;
show port 5:2, 6:1 information&lt;BR /&gt;
show var CLI.OUT&lt;BR /&gt;
&lt;BR /&gt;
set var answer $READ(Are these the correct ports to be disabled?)&lt;BR /&gt;
&lt;BR /&gt;
#logic based on input&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Feb 2016 23:03:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22157#M1787</guid>
      <dc:creator>Dorian_Perry</dc:creator>
      <dc:date>2016-02-05T23:03:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script synax that waits on user input before committing changes?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22158#M1788</link>
      <description>or something like:&lt;BR /&gt;
&lt;BR /&gt;
disable clip&lt;BR /&gt;
set var ports "1,2"&lt;BR /&gt;
set var cli.out 0&lt;BR /&gt;
show ports $ports info detail&lt;BR /&gt;
show var cli.out&lt;BR /&gt;
set var ok $TCL(concat "Disable ports" $ports "?")&lt;BR /&gt;
show var ok&lt;BR /&gt;
set var ok $READ(yes or no?)&lt;BR /&gt;
set var t $TCL(string equal $ok "yes")&lt;BR /&gt;
if $t then&lt;BR /&gt;
   disable port $ports&lt;BR /&gt;
   save&lt;BR /&gt;
endif&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Feb 2016 00:30:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22158#M1788</guid>
      <dc:creator>Matthew_Helm1</dc:creator>
      <dc:date>2016-02-06T00:30:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script synax that waits on user input before committing changes?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22159#M1789</link>
      <description>Thanks!  Any way we can also echo the saving progress without showing the rest of the code?&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Feb 2016 03:59:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22159#M1789</guid>
      <dc:creator>Stephen_Stormon</dc:creator>
      <dc:date>2016-02-06T03:59:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script synax that waits on user input before committing changes?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22160#M1790</link>
      <description>Well, not really the saving process... but I added the "show var cli.out" after the "save" line and below is that is the output.&lt;BR /&gt;
&lt;BR /&gt;
disable clipset var ports "1,2"&lt;BR /&gt;
set var cli.out 0&lt;BR /&gt;
show ports $ports info detail&lt;BR /&gt;
show var cli.out&lt;BR /&gt;
set var ok $TCL(concat "Disable ports" $ports "?")&lt;BR /&gt;
show var ok&lt;BR /&gt;
set var ok $READ(yes or no?)&lt;BR /&gt;
set var t $TCL(string equal $ok "yes")&lt;BR /&gt;
if $t then&lt;BR /&gt;
   disable port $ports&lt;BR /&gt;
   save&lt;BR /&gt;
   show var cli.out&lt;BR /&gt;
endif&lt;BR /&gt;
&lt;BR /&gt;
....&lt;BR /&gt;
&lt;BR /&gt;
Disable ports 1,2 ?             yes or no?&lt;BR /&gt;
 yes&lt;BR /&gt;
The configuration file primary.cfg already exists.&lt;BR /&gt;
Saving configuration on master Node .. done!&lt;BR /&gt;
Configuration saved to primary.cfg successfully.&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Sat, 06 Feb 2016 09:14:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22160#M1790</guid>
      <dc:creator>Matthew_Helm1</dc:creator>
      <dc:date>2016-02-06T09:14:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script synax that waits on user input before committing changes?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22161#M1791</link>
      <description>Perfect!  Thanks a lot!&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Feb 2016 04:48:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/script-synax-that-waits-on-user-input-before-committing-changes/m-p/22161#M1791</guid>
      <dc:creator>Stephen_Stormon</dc:creator>
      <dc:date>2016-02-08T04:48:00Z</dc:date>
    </item>
  </channel>
</rss>

