<?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: Does the X435 support phyton scripting? in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91276#M21329</link>
    <description>Hi Anton,&lt;BR /&gt;&lt;BR /&gt;Also, there is a decent repo here of Python scripts for EXOS:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python" target="_blank" rel="noopener" title="https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python"&gt;https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chris Thompson</description>
    <pubDate>Mon, 08 Aug 2022 16:20:46 GMT</pubDate>
    <dc:creator>CThompsonEXOS</dc:creator>
    <dc:date>2022-08-08T16:20:46Z</dc:date>
    <item>
      <title>Does the X435 support phyton scripting?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91272#M21325</link>
      <description>Hello,&lt;BR /&gt;I have an X435 switch and try to run a phyton script according to &lt;A href="https://extremeportal.force.com/ExtrArticleDetail?an=000079734&amp;amp;q=python%20script" target="_blank" rel="noopener"&gt;https://extremeportal.force.com/ExtrArticleDetail?an=000079734&amp;amp;q=python%20script&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;P&gt;xxxx-SW1.8 # cat test.py&lt;/P&gt;
&lt;P&gt;print ("Script Start!")&lt;/P&gt;
&lt;P&gt;for number in range(1,11):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print ("The number count is {0}").format(number)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;showvlan = exsh.clicmd("show vlan", True)&lt;/P&gt;
&lt;P&gt;print showvlan&lt;/P&gt;
&lt;P&gt;xxxx-SW1.9 # load script test.py&lt;/P&gt;
&lt;P&gt;Script Start!&lt;/P&gt;
&lt;P&gt;The number count is 1&lt;/P&gt;
&lt;P&gt;The number count is 2&lt;/P&gt;
&lt;P&gt;The number count is 3&lt;/P&gt;
&lt;P&gt;The number count is 4&lt;/P&gt;
&lt;P&gt;The number count is 5&lt;/P&gt;
&lt;P&gt;The number count is 6&lt;/P&gt;
&lt;P&gt;The number count is 7&lt;/P&gt;
&lt;P&gt;The number count is 8&lt;/P&gt;
&lt;P&gt;The number count is 9&lt;/P&gt;
&lt;P&gt;The number count is 10&lt;/P&gt;
&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;
&lt;P&gt;&amp;nbsp; File "/usr/local/cfg/test.py", line 5, in &amp;lt;module&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; showvlan = exsh.clicmd("show vlan", True)&lt;/P&gt;
&lt;P&gt;NameError: name 'exsh' is not defined&lt;BR /&gt;&lt;BR /&gt;Does the X435 support Phyton scripting?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 16:42:07 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91272#M21325</guid>
      <dc:creator>AntonS</dc:creator>
      <dc:date>2022-08-04T16:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Does the X435 support phyton scripting?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91273#M21326</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You have to import the exsh module as your first line like below:&lt;BR /&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;import exsh​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;From there you should get the following:&lt;BR /&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;#before importing the module
X435-8P-2T-W.8 # run script test
Script Start!
The number count is 1
The number count is 2
The number count is 3
The number count is 4
The number count is 5
The number count is 6
The number count is 7
The number count is 8
The number count is 9
The number count is 10
Traceback (most recent call last):
  File "/usr/local/cfg/test.py", line 5, in &amp;lt;module&amp;gt;
    showvlan = exsh.clicmd("show vlan", True)
NameError: name 'exsh' is not defined


#after importing the module
* X435-8P-2T-W.9 # vi test.py
* X435-8P-2T-W.10 # run script test
Script Start!
The number count is 1
The number count is 2
The number count is 3
The number count is 4
The number count is 5
The number count is 6
The number count is 7
The number count is 8
The number count is 9
The number count is 10
Untagged ports auto-move: Inform
-----------------------------------------------------------------------------------------------
Name            VID  Protocol Addr       Flags                         Proto  Ports  Virtual
                                                                              Active router
                                                                              /Total
-----------------------------------------------------------------------------------------------
Default         1    10.67.72.83    /24  ------------T-------------    ANY    2 /10  VR-Default
-----------------------------------------------------------------------------------------------
Flags : (B) BFD Enabled, (c) 802.1ad customer VLAN, (C) EAPS Control VLAN,
        (d) Dynamically created VLAN, (D) VLAN Admin Disabled,
        (E) ESRP Enabled, (f) IP Forwarding Enabled,
        (F) Learning Disabled, (i) ISIS Enabled,
        (I) Inter-Switch Connection VLAN for MLAG, (k) PTP Configured,
        (l) MPLS Enabled, (L) Loopback Enabled, (m) IPmc Forwarding Enabled,
        (M) Translation Member VLAN or Subscriber VLAN, (n) IP Multinetting Enabled,
        (N) Network Login VLAN, (o) OSPF Enabled, (O) Virtual Network Overlay,
        (p) PIM Enabled, (P) EAPS protected VLAN, (r) RIP Enabled,
        (R) Sub-VLAN IP Range Configured, (s) Sub-VLAN, (S) Super-VLAN,
        (t) Translation VLAN or Network VLAN, (T) Member of STP Domain,
        (v) VRRP Enabled, (V) VPLS Enabled, (W) VPWS Enabled,
        (Y) Policy Enabled

Total number of VLAN(s) : 1
​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Below is more information on Python and EXOS:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.extremenetworks.com/pdfs/exos/Python_Getting_Started_Guide.pdf" target="_blank" rel="noopener" title="https://documentation.extremenetworks.com/pdfs/exos/Python_Getting_Started_Guide.pdf"&gt;https://documentation.extremenetworks.com/pdfs/exos/Python_Getting_Started_Guide.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="766fa748ae0a45f8a2904db85e627675.png"&gt;&lt;img src="https://community.extremenetworks.com/t5/image/serverpage/image-id/4058i3E4448AD4203FAC5/image-size/large?v=v2&amp;amp;px=999" role="button" title="766fa748ae0a45f8a2904db85e627675.png" alt="766fa748ae0a45f8a2904db85e627675.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;BR /&gt;Thanks,&lt;BR /&gt;Chris Thompson</description>
      <pubDate>Thu, 04 Aug 2022 18:52:26 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91273#M21326</guid>
      <dc:creator>CThompsonEXOS</dc:creator>
      <dc:date>2022-08-04T18:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Does the X435 support phyton scripting?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91274#M21327</link>
      <description>I also edited the original article to include the line of importing the module.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chris Thompson</description>
      <pubDate>Thu, 04 Aug 2022 19:00:15 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91274#M21327</guid>
      <dc:creator>CThompsonEXOS</dc:creator>
      <dc:date>2022-08-04T19:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: Does the X435 support phyton scripting?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91275#M21328</link>
      <description>&lt;P&gt;Hello Christopher, Thank you for your reply. It works now.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Python Getting Started Guide - that guide is awesome!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 10:49:44 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91275#M21328</guid>
      <dc:creator>AntonS</dc:creator>
      <dc:date>2022-08-05T10:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Does the X435 support phyton scripting?</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91276#M21329</link>
      <description>Hi Anton,&lt;BR /&gt;&lt;BR /&gt;Also, there is a decent repo here of Python scripts for EXOS:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python" target="_blank" rel="noopener" title="https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python"&gt;https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Chris Thompson</description>
      <pubDate>Mon, 08 Aug 2022 16:20:46 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/does-the-x435-support-phyton-scripting/m-p/91276#M21329</guid>
      <dc:creator>CThompsonEXOS</dc:creator>
      <dc:date>2022-08-08T16:20:46Z</dc:date>
    </item>
  </channel>
</rss>

