<?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: EXOS CLI script - handover arguments in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/exos-cli-script-handover-arguments/m-p/87461#M20854</link>
    <description>Looking at the vars after running a script it seems you need to use variable CLI.ARGC or CLI.ARGV1.&lt;BR /&gt;
&lt;BR /&gt;
X460-48t.3 # run script test 1&lt;BR /&gt;
X460-48t.4 # &lt;BR /&gt;
X460-48t.4 # &lt;BR /&gt;
X460-48t.4 # show var&lt;BR /&gt;
----------------------------------------&lt;BR /&gt;
Count : 7                &lt;BR /&gt;
----------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
------------------------------------------------------------------&lt;BR /&gt;
variableName           variableValue          &lt;BR /&gt;
-------------------------------- --------------------------------&lt;BR /&gt;
CLI.ARGC             1                &lt;BR /&gt;
CLI.ARGV0             test               &lt;BR /&gt;
CLI.ARGV1             1                &lt;BR /&gt;
CLI.SCRIPT_TIME_REMAINING     0                &lt;BR /&gt;
CLI.SESSION_TYPE         serial              &lt;BR /&gt;
CLI.USER             admin              &lt;BR /&gt;
STATUS              0                &lt;BR /&gt;
-------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
enable cli scripting&lt;BR /&gt;
show var CLI.ARGV1&lt;BR /&gt;
&lt;BR /&gt;
X460-48t.10 # run script test var1&lt;BR /&gt;
var1               &lt;BR /&gt;
X460-48t.11 #</description>
    <pubDate>Thu, 07 Feb 2019 21:57:43 GMT</pubDate>
    <dc:creator>OscarK</dc:creator>
    <dc:date>2019-02-07T21:57:43Z</dc:date>
    <item>
      <title>EXOS CLI script - handover arguments</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/exos-cli-script-handover-arguments/m-p/87460#M20853</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
i want to create a simple script that restart poe power on a specific port:&lt;BR /&gt;
&lt;BR /&gt;
&lt;DIV class="threadCode"&gt;&lt;B&gt;code:&lt;/B&gt;&lt;PRE spellcheck="false"&gt;# restart inline-power via CLI&lt;BR /&gt;# usage: run script restart-poe ARG1 #=Port-Number &lt;BR /&gt;enable cli scripting&lt;BR /&gt;disable inline-power port $ARG1&lt;BR /&gt;enable inline-power port $ARG1&lt;BR /&gt;save config &lt;BR /&gt;yes&lt;BR /&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BR /&gt;
If i run the script on EXOS 22.6 i get this error:&lt;BR /&gt;
&lt;BR /&gt;
&lt;DIV class="threadCode"&gt;&lt;B&gt;code:&lt;/B&gt;&lt;PRE spellcheck="false"&gt;TEST-SW.2 # run script restart-poe.xsf 1&lt;BR /&gt;Error in script "restart-poe.xsf", line 4&lt;BR /&gt;%% Unrecognized command: "disable inline-power port $ARG1"&lt;BR /&gt;%% Invalid port number detected.&lt;BR /&gt;Error in script "restart-poe.xsf", line 5&lt;BR /&gt;%% Unrecognized command: "enable inline-power port $ARG1"&lt;BR /&gt;%% Invalid port number detected.&lt;BR /&gt;Error in script "restart-poe.xsf", line 7&lt;BR /&gt;%% Unrecognized command: "yes"&lt;BR /&gt;%% Invalid input detected.&lt;BR /&gt;TEST-SW.3 #&lt;BR /&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BR /&gt;
How can i hand over the argument of the script (which is the port number) correctly to my script ?!&lt;BR /&gt;
&lt;BR /&gt;
Thanks.</description>
      <pubDate>Thu, 07 Feb 2019 21:51:28 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/exos-cli-script-handover-arguments/m-p/87460#M20853</guid>
      <dc:creator>M_Nees</dc:creator>
      <dc:date>2019-02-07T21:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: EXOS CLI script - handover arguments</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/exos-cli-script-handover-arguments/m-p/87461#M20854</link>
      <description>Looking at the vars after running a script it seems you need to use variable CLI.ARGC or CLI.ARGV1.&lt;BR /&gt;
&lt;BR /&gt;
X460-48t.3 # run script test 1&lt;BR /&gt;
X460-48t.4 # &lt;BR /&gt;
X460-48t.4 # &lt;BR /&gt;
X460-48t.4 # show var&lt;BR /&gt;
----------------------------------------&lt;BR /&gt;
Count : 7                &lt;BR /&gt;
----------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
------------------------------------------------------------------&lt;BR /&gt;
variableName           variableValue          &lt;BR /&gt;
-------------------------------- --------------------------------&lt;BR /&gt;
CLI.ARGC             1                &lt;BR /&gt;
CLI.ARGV0             test               &lt;BR /&gt;
CLI.ARGV1             1                &lt;BR /&gt;
CLI.SCRIPT_TIME_REMAINING     0                &lt;BR /&gt;
CLI.SESSION_TYPE         serial              &lt;BR /&gt;
CLI.USER             admin              &lt;BR /&gt;
STATUS              0                &lt;BR /&gt;
-------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
enable cli scripting&lt;BR /&gt;
show var CLI.ARGV1&lt;BR /&gt;
&lt;BR /&gt;
X460-48t.10 # run script test var1&lt;BR /&gt;
var1               &lt;BR /&gt;
X460-48t.11 #</description>
      <pubDate>Thu, 07 Feb 2019 21:57:43 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/exos-cli-script-handover-arguments/m-p/87461#M20854</guid>
      <dc:creator>OscarK</dc:creator>
      <dc:date>2019-02-07T21:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: EXOS CLI script - handover arguments</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/exos-cli-script-handover-arguments/m-p/87462#M20855</link>
      <description>Thanks Oscar - i modify - seems to work - but not reliable.&lt;BR /&gt;
&lt;BR /&gt;
Is there a command to hold or sleep for 2 seconds between disable and enable?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;DIV class="threadCode"&gt;&lt;B&gt;code:&lt;/B&gt;&lt;PRE spellcheck="false"&gt;# restart inline-power via CLI&lt;BR /&gt;# usage: run script restart-poe X or Y:X&lt;BR /&gt;enable cli scripting&lt;BR /&gt;disable inline-power port $CLI.ARGV1&lt;BR /&gt;enable inline-power port $CLI.ARGV1&lt;BR /&gt;save config&lt;BR /&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Feb 2019 22:38:19 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/exos-cli-script-handover-arguments/m-p/87462#M20855</guid>
      <dc:creator>M_Nees</dc:creator>
      <dc:date>2019-02-07T22:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: EXOS CLI script - handover arguments</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/exos-cli-script-handover-arguments/m-p/87463#M20856</link>
      <description>Yes, just add a var that executes the TCL wait.&lt;BR /&gt;
&lt;BR /&gt;
set var wait $TCL(wait 10000) &lt;BR /&gt;
&lt;BR /&gt;
Above line will wait 10 seconds (10000 msec).</description>
      <pubDate>Thu, 07 Feb 2019 22:54:10 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/exos-cli-script-handover-arguments/m-p/87463#M20856</guid>
      <dc:creator>OscarK</dc:creator>
      <dc:date>2019-02-07T22:54:10Z</dc:date>
    </item>
  </channel>
</rss>

