<?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: Creating upm profile with script in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51249#M13919</link>
    <description>You could use a subprocess shell to send commands that need CLI interaction:&lt;BR /&gt;
&lt;BR /&gt;
This example creates a upm profile named 'test':&lt;BR /&gt;
&lt;BR /&gt;
import subprocess&lt;BR /&gt;
&lt;BR /&gt;
p = subprocess.Popen(['/exos/bin/exsh','-n0', '-b', '-e','remote_serial'],&lt;BR /&gt;
    stdin = subprocess.PIPE,&lt;BR /&gt;
    stdout = subprocess.PIPE,&lt;BR /&gt;
    stderr = subprocess.PIPE)&lt;BR /&gt;
&lt;BR /&gt;
print &amp;gt;&amp;gt; p.stdin, 'create upm profile test'&lt;BR /&gt;
print &amp;gt;&amp;gt; p.stdin, '.'&lt;BR /&gt;
&lt;BR /&gt;</description>
    <pubDate>Thu, 05 Jan 2017 02:47:00 GMT</pubDate>
    <dc:creator>Matthew_Helm1</dc:creator>
    <dc:date>2017-01-05T02:47:00Z</dc:date>
    <item>
      <title>Python: Creating upm profile with script</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51248#M13918</link>
      <description>I'm trying to write a python script to configure new switches and right now I'm struggling with creating UPM profiles through the script as running create upm profile [profilename] opens an interactive session, are there ways to make the python interpreter direct its output into this session or alternatively other ways to creating / editing upm profiles  without calling this interactive session?</description>
      <pubDate>Wed, 04 Jan 2017 23:09:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51248#M13918</guid>
      <dc:creator>Nikolai_Andre_E</dc:creator>
      <dc:date>2017-01-04T23:09:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python: Creating upm profile with script</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51249#M13919</link>
      <description>You could use a subprocess shell to send commands that need CLI interaction:&lt;BR /&gt;
&lt;BR /&gt;
This example creates a upm profile named 'test':&lt;BR /&gt;
&lt;BR /&gt;
import subprocess&lt;BR /&gt;
&lt;BR /&gt;
p = subprocess.Popen(['/exos/bin/exsh','-n0', '-b', '-e','remote_serial'],&lt;BR /&gt;
    stdin = subprocess.PIPE,&lt;BR /&gt;
    stdout = subprocess.PIPE,&lt;BR /&gt;
    stderr = subprocess.PIPE)&lt;BR /&gt;
&lt;BR /&gt;
print &amp;gt;&amp;gt; p.stdin, 'create upm profile test'&lt;BR /&gt;
print &amp;gt;&amp;gt; p.stdin, '.'&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Thu, 05 Jan 2017 02:47:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51249#M13919</guid>
      <dc:creator>Matthew_Helm1</dc:creator>
      <dc:date>2017-01-05T02:47:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python: Creating upm profile with script</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51250#M13920</link>
      <description>Doesn't seem to run on my end, I'm testing on a summit x440-24t running15.7.4.2 patch1-2&lt;BR /&gt;
&lt;BR /&gt;
Getting the following error message when trying to run the script.&lt;BR /&gt;
&lt;BR /&gt;
Traceback (most recent call last):    File "/config/upmTest.py", line 3, in &lt;MODULE&gt;      p = subprocess.Popen(['/exos/bin/exsh','-n0', '-b', '-e','remote_serial'], stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE)    File "/exos/tools/lib/python2.7/subprocess.py", line 679, in __init__      errread, errwrite)    File "/exos/tools/lib/python2.7/subprocess.py", line 1245, in _execute_child      child_exception = pickle.loads(data)    File "/exos/tools/lib/python2.7/pickle.py", line 1382, in loads      return Unpickler(file).load()    File "/exos/tools/lib/python2.7/pickle.py", line 858, in load      dispatch[key](self)    File "/exos/tools/lib/python2.7/pickle.py", line 971, in load_string      self.append(rep.decode("string-escape"))  LookupError: unknown encoding: string-escape  &lt;BR /&gt;
&lt;BR /&gt;&lt;/MODULE&gt;</description>
      <pubDate>Thu, 05 Jan 2017 17:01:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51250#M13920</guid>
      <dc:creator>Nikolai_Andre_E</dc:creator>
      <dc:date>2017-01-05T17:01:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python: Creating upm profile with script</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51251#M13921</link>
      <description>That method is only available in the later 16.x code. I actually have been using it in 22.x. I can revert to confirm, but you may want to upgrade to 16.1.x or 16.2.x.</description>
      <pubDate>Fri, 06 Jan 2017 00:29:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51251#M13921</guid>
      <dc:creator>Matthew_Helm1</dc:creator>
      <dc:date>2017-01-06T00:29:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python: Creating upm profile with script</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51252#M13922</link>
      <description>I take it back. This method is only available in 22.x. I tested it in 16.2.x and it failed similarly. Unfortunately, the X440 cannot use 22.x . Is this the ultimate platform on which you plan to use this script?</description>
      <pubDate>Fri, 06 Jan 2017 06:02:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51252#M13922</guid>
      <dc:creator>Matthew_Helm1</dc:creator>
      <dc:date>2017-01-06T06:02:00Z</dc:date>
    </item>
    <item>
      <title>RE: Python: Creating upm profile with script</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51253#M13923</link>
      <description>wherever we deploy new equipment we use x440-g2 switches with 21.x as well as x460-g2 where we are still using 15.7.x, we also re-deploy a significant amount of first generation x440 and x460 switches.&lt;BR /&gt;
&lt;BR /&gt;
Due to the scale of our network ~1000 switches we're rather cautious with deploying newer firmware in production.&lt;BR /&gt;
&lt;BR /&gt;
Unless there is some method to do this in 15.7.x I guess I'll just develop this script for 16.x and keep using our old solution until whenever we're rolling out 16.x or higher in prod.&lt;BR /&gt;
&lt;BR /&gt;
Edit: I mean 22.x not 16.x</description>
      <pubDate>Fri, 06 Jan 2017 23:00:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/python-creating-upm-profile-with-script/m-p/51253#M13923</guid>
      <dc:creator>Nikolai_Andre_E</dc:creator>
      <dc:date>2017-01-06T23:00:00Z</dc:date>
    </item>
  </channel>
</rss>

