<?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: Python Scripting Guide in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40136#M8993</link>
    <description>I'd love to see your scripts, and everybody's scripts.&lt;BR /&gt;
If you are ok to share your creation, can you pass links to them? I'm trying to find, internally, a way to share all of it, for the community.&lt;BR /&gt;</description>
    <pubDate>Fri, 06 Feb 2015 21:41:00 GMT</pubDate>
    <dc:creator>Stephane_Grosj1</dc:creator>
    <dc:date>2015-02-06T21:41:00Z</dc:date>
    <item>
      <title>Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40127#M8984</link>
      <description>Hi everybody!&lt;BR /&gt;
&lt;BR /&gt;
I've recently update EXOS to 15.6. and I really would love to write some python scripts. Honestly, I'm not into programming actually. I just write python scripts sometimes.&lt;BR /&gt;
&lt;BR /&gt;
So, I've read EXOS 15.6 User Guide, but there are few information about python scripting. Аt least for me) Does anybody give me some examples or maybe guides, articles, posts or something about it?&lt;BR /&gt;
&lt;BR /&gt;
Thanks for help!&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 13:06:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40127#M8984</guid>
      <dc:creator>eyeV</dc:creator>
      <dc:date>2015-02-06T13:06:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40128#M8985</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
A guide will be posted soon here. It'll give a brief introduction to python, how you can use the scripting capability with EXOS, and some other features we are introducing in 15.7 (you sense the teasing here ;)).&lt;BR /&gt;
&lt;BR /&gt;
In the meantime, I'd encourage you to start learning Python 2.7 and the standard library. That's very easy and powerful. There're so many books, article, it's difficult to point to one specific.&lt;BR /&gt;
&lt;BR /&gt;
With EXOS 15.6, you can use exsh library to interact with EXOS.&lt;BR /&gt;
&lt;BR /&gt;
import exsh&lt;BR /&gt;
&lt;BR /&gt;
exsh.clicmd(cmd, capture=False, xml=False, args=None)&lt;BR /&gt;
&lt;BR /&gt;
cmd is a valid EXOS CLI cmd.&lt;BR /&gt;
optional:&lt;BR /&gt;
capture can be True or False, if True it will return the command output in text.&lt;BR /&gt;
xml can be True or False. if True it will return the command output in xml.&lt;BR /&gt;
args are whatever parameter needed for the command&lt;BR /&gt;
&lt;BR /&gt;
I'll see how we can manage to share on a specific space some little scripts for learning purposes.&lt;BR /&gt;
&lt;BR /&gt;
So stay tuned for the Guide, it's coming.&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 14:44:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40128#M8985</guid>
      <dc:creator>Stephane_Grosj1</dc:creator>
      <dc:date>2015-02-06T14:44:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40129#M8986</link>
      <description>Hi eyeV, &lt;BR /&gt;
&lt;BR /&gt;
One of my findings which you might come and nice to know: &lt;BR /&gt;
&lt;BR /&gt;
If you want to combine python scripting with Universal Port triggers you can do the following trick which worked for me. Example creating a python script which will run every minute.&lt;BR /&gt;
&lt;BR /&gt;
1) Create the python script HelloWorld.py&lt;BR /&gt;
&lt;BR /&gt;
Switch # &lt;B&gt;vi HelloWorld.py&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
2) Because profile can trigger only CLI, you need to create a profile and just insert the following command (assuming you saved the python file to HelloWorld.py)&lt;BR /&gt;
&lt;BR /&gt;
Switch # &lt;B&gt;create upm profile HelloWorld&lt;/B&gt;&lt;BR /&gt;
Start typing the profile and end with a . as the first and the only character on a line.&lt;BR /&gt;
Use - edit upm profile &lt;NAME&gt; - for block mode capability&lt;BR /&gt;
&lt;B&gt;run script HelloWorld.py&lt;/B&gt;&lt;BR /&gt;
&lt;B&gt;.&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
( Note the dot in the end)&lt;BR /&gt;
&lt;BR /&gt;
3) Add the trigger to run the profile every minute starting from the next minute&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;create upm timer HelloTimer&lt;/B&gt;&lt;BR /&gt;
&lt;B&gt;configure upm timer "HelloTimer" after 60 every 60&lt;/B&gt;&lt;BR /&gt;
&lt;B&gt;configure upm timer "HelloTimer" profile "HelloWorld"&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
4) You can delete the timer &lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;delete upm timer "HelloTimer"&lt;BR /&gt;
&lt;/B&gt;&lt;BR /&gt;
Hope it helps &lt;BR /&gt;
&lt;BR /&gt;
Sotiris&lt;/NAME&gt;</description>
      <pubDate>Fri, 06 Feb 2015 18:42:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40129#M8986</guid>
      <dc:creator>Sotiris_Salloum</dc:creator>
      <dc:date>2015-02-06T18:42:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40130#M8987</link>
      <description>Thanks guys! I'm going to dive in! &lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 19:28:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40130#M8987</guid>
      <dc:creator>eyeV</dc:creator>
      <dc:date>2015-02-06T19:28:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40131#M8988</link>
      <description>ah, all these spoilers before the release of the guide... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
of course, you can use UPM with Python scripting.&lt;BR /&gt;
UPM provides environmental variables (for example the port where the event has occurred) and a Python script can use it. Just pass the variable(s) as argument(s) to the python script.&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 19:44:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40131#M8988</guid>
      <dc:creator>Stephane_Grosj1</dc:creator>
      <dc:date>2015-02-06T19:44:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40132#M8989</link>
      <description>What library I can use in python scripting on Extreme switches?&lt;BR /&gt;
&lt;BR /&gt;
standard library&lt;BR /&gt;
sys&lt;BR /&gt;
pexpect&lt;BR /&gt;
exshexpect&lt;BR /&gt;
exsh&lt;BR /&gt;
what else?&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 19:53:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40132#M8989</guid>
      <dc:creator>eyeV</dc:creator>
      <dc:date>2015-02-06T19:53:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40133#M8990</link>
      <description>The standard library is HUGE. You have a lot of modules included. As an example, sys is part of the standard library.&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 20:02:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40133#M8990</guid>
      <dc:creator>Stephane_Grosj1</dc:creator>
      <dc:date>2015-02-06T20:02:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40134#M8991</link>
      <description>eyeV,&lt;BR /&gt;
&lt;BR /&gt;
code academy is a great place to start learning python.  It's free and very thorough. &lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www.codecademy.com/" target="_blank" rel="nofollow noreferrer noopener"&gt;http://www.codecademy.com/&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
I have a few script i made that make some task's very easy.  Like running ELRP on every created vlan.&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 21:37:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40134#M8991</guid>
      <dc:creator>StephenW</dc:creator>
      <dc:date>2015-02-06T21:37:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40135#M8992</link>
      <description>Thanks. I'm going to start right now. )&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 21:37:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40135#M8992</guid>
      <dc:creator>eyeV</dc:creator>
      <dc:date>2015-02-06T21:37:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40136#M8993</link>
      <description>I'd love to see your scripts, and everybody's scripts.&lt;BR /&gt;
If you are ok to share your creation, can you pass links to them? I'm trying to find, internally, a way to share all of it, for the community.&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 21:41:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40136#M8993</guid>
      <dc:creator>Stephane_Grosj1</dc:creator>
      <dc:date>2015-02-06T21:41:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40137#M8994</link>
      <description>Pretty good idea! For me, especially. )&lt;BR /&gt;</description>
      <pubDate>Fri, 06 Feb 2015 21:41:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40137#M8994</guid>
      <dc:creator>eyeV</dc:creator>
      <dc:date>2015-02-06T21:41:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40138#M8995</link>
      <description>Hi all, the new Python Scripting Guide has been posted at: &lt;A href="http://www.extremenetworks.com/wp-content/uploads/2015/02/Python_Getting_Started_Guide.pdf" target="_blank" rel="nofollow noreferrer noopener"&gt;http://www.extremenetworks.com/wp-content/uploads/2015/02/Python_Getting_Started_Guide.pdf&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 21:58:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40138#M8995</guid>
      <dc:creator>Christina_M</dc:creator>
      <dc:date>2015-02-11T21:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40139#M8996</link>
      <description>It's exactly what I need! Thank you!&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 21:58:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40139#M8996</guid>
      <dc:creator>eyeV</dc:creator>
      <dc:date>2015-02-11T21:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40140#M8997</link>
      <description>Christina M your link now produces:&lt;BR /&gt;
&lt;BR /&gt;
404 Not Found&lt;BR /&gt;
&lt;BR /&gt;
As does the same link on your "how to use python with EXOS" page:&lt;BR /&gt;
&lt;A href="https://gtacknowledge.extremenetworks.com/articles/How_To/How-to-use-Python-on-EXOS" target="_blank" rel="nofollow noreferrer noopener"&gt;https://gtacknowledge.extremenetworks.com/articles/How_To/How-to-use-Python-on-EXOS&lt;/A&gt; &lt;BR /&gt;
&lt;BR /&gt;
What I'm trying to do is to control EXOS from python application running on a remote machine, so I can quickly enact config changes on the switch at my application runtime. To this end I do not see the value in this Python on EXOS feature, since it's much more cumbersome to have to tftp a script to the switch, telnet in, and "load" it, vs simply telnetting in and executing the commands via CLI as needed.&lt;BR /&gt;
&lt;BR /&gt;
Given what I'm triyng to do (control exos switch remotely from python code), is the easiest and fastest way to accomplish this via telnet/CLI? Or is there some CLIENT python support I can use?&lt;BR /&gt;
&lt;BR /&gt;
Someone on another thread mentioned a thing called XMC,which can completely control the switch, and has a REST API, and I was wondering if this would be useful in my case, but I'm having trouble finding documentation on it. Any links or advice would be appreciated. Thanks!</description>
      <pubDate>Wed, 11 Feb 2015 21:58:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40140#M8997</guid>
      <dc:creator>Tim_Black</dc:creator>
      <dc:date>2015-02-11T21:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40141#M8998</link>
      <description>I did find &lt;A href="https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/rmtscript" target="_blank" rel="nofollow noreferrer noopener"&gt;this&lt;/A&gt;, which is helpfui for running python remotely. I'll look deeper into this.</description>
      <pubDate>Wed, 11 Feb 2015 21:58:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40141#M8998</guid>
      <dc:creator>Tim_Black</dc:creator>
      <dc:date>2015-02-11T21:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40142#M8999</link>
      <description>If you want to use python remotely, you can either use jsonrpc or RESTConf (openconfig).&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://github.com/extremenetworks/EXOS_Apps/tree/master/JSONRPC" target="_blank" rel="nofollow noreferrer noopener"&gt;https://github.com/extremenetworks/EXOS_Apps/tree/master/JSONRPC&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://github.com/extremenetworks/EXOS_Apps/tree/master/REST" target="_blank" rel="nofollow noreferrer noopener"&gt;https://github.com/extremenetworks/EXOS_Apps/tree/master/REST&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 21:58:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40142#M8999</guid>
      <dc:creator>Stephane_Grosj1</dc:creator>
      <dc:date>2015-02-11T21:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40143#M9000</link>
      <description>Python Guide Has been re-uploaded here: &lt;A href="https://documentation.extremenetworks.com/pdfs/exos/Python_Getting_Started_Guide.pdf" target="_blank" rel="nofollow noreferrer noopener"&gt;https://documentation.extremenetworks.com/pdfs/exos/Python_Getting_Started_Guide.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
You can also view our Python and RESTConf documentation here: &lt;A href="https://www.extremenetworks.com/support/api-app/" target="_blank" rel="nofollow noreferrer noopener"&gt;https://www.extremenetworks.com/support/api-app/&lt;/A&gt; &lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 21:58:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40143#M9000</guid>
      <dc:creator>Christina_M</dc:creator>
      <dc:date>2015-02-11T21:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40144#M9001</link>
      <description>Thanks Stephane, Christina. Thanks for all the pointers to the info I was looking for!&lt;BR /&gt;
&lt;BR /&gt;
Christina, fyi:&lt;BR /&gt;
1. your link to the "python getting started" doc is broken over at &lt;A href="https://www.extremenetworks.com/support/api-app" target="_blank" rel="nofollow noreferrer noopener"&gt;the EXOS API Doc Root&lt;/A&gt;, on the "How-to Guides" tab, and also broken on this page.&lt;BR /&gt;
2. your link to the "&lt;A href="http://api.extremenetworks.com/EXOS/ProgramInterfaces/RESTCONF/RESTCONF.html?_ga=2.129908297.477422756.1539015445-1617289114.1533937563" target="_blank" rel="nofollow noreferrer noopener"&gt;EXOS JSONRPC Interface Reference&lt;/A&gt;" is broken over at &lt;A href="https://www.extremenetworks.com/support/api-app" target="_blank" rel="nofollow noreferrer noopener"&gt;the EXOS API Doc Root&lt;/A&gt;, on the API tab. Is looks like a copy-paste err as it links to the RESTAPI docs.&lt;BR /&gt;
&lt;BR /&gt;
Also, over on this thread, I've been discussing all these option, in case you wanted to review and comment. Thanks.&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 21:58:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40144#M9001</guid>
      <dc:creator>Tim_Black</dc:creator>
      <dc:date>2015-02-11T21:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40145#M9002</link>
      <description>Hi, Tim. Thanks for the heads up. The former has been fixed and our API writer removed the latter from the table. Please let us know if you see any other issues on the website.</description>
      <pubDate>Wed, 11 Feb 2015 21:58:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40145#M9002</guid>
      <dc:creator>Christina_M</dc:creator>
      <dc:date>2015-02-11T21:58:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python Scripting Guide</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40146#M9003</link>
      <description>I have a mysterious problem with that guide. All pages except the first one are simply the gradient... But I can CTRL+C all text. Does anybody has the same problem?&lt;BR /&gt;
&lt;BR /&gt;
I can read it on iPad for example, but I can't with the standard MacOS PDF viewer. Pretty strange.&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2015 23:42:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-scripting-guide/m-p/40146#M9003</guid>
      <dc:creator>eyeV</dc:creator>
      <dc:date>2015-02-11T23:42:00Z</dc:date>
    </item>
  </channel>
</rss>

