<?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: SNMPSet using Python in ExtremeSwitching (EXOS/Switch Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmpset-using-python/m-p/28997#M4647</link>
    <description>I used &lt;A href="http://pysnmp.sourceforge.net/examples/current/v3arch/oneliner/manager/cmdgen/set-v1-multiple-values.html" target="_blank" rel="nofollow noreferrer noopener"&gt;http://pysnmp.sourceforge.net/examples/current/v3arch/oneliner/manager/cmdgen/set-v1-multiple-values...&lt;/A&gt; as a reference.&lt;BR /&gt;
&lt;BR /&gt;
Add this if you don't already have it:&lt;BR /&gt;
&lt;BR /&gt;
from pysnmp.proto import rfc1902&lt;BR /&gt;
&lt;BR /&gt;
Try changing your last line from:&lt;BR /&gt;
((interfaceAlias, 'testsetalias')))&lt;BR /&gt;
to&lt;BR /&gt;
(interfaceAlias, rfc1902.OctetString('testsetalias')))&lt;BR /&gt;</description>
    <pubDate>Wed, 04 Mar 2015 05:41:00 GMT</pubDate>
    <dc:creator>Dave_Hammers</dc:creator>
    <dc:date>2015-03-04T05:41:00Z</dc:date>
    <item>
      <title>SNMPSet using Python</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmpset-using-python/m-p/28996#M4646</link>
      <description>I'm having trouble setting an interface alias on a K-10 using Python's pysnmp set command.&lt;BR /&gt;
&lt;BR /&gt;
interfaceName = '1.3.6.1.2.1.31.1.1.1.1.12001'  #mib for specific interface name&lt;BR /&gt;
interfaceAlias = '1.3.6.1.2.1.31.1.1.1.18.12001'  #mib for specific interface alias&lt;BR /&gt;
&lt;BR /&gt;
My snmp get command works just fine:&lt;BR /&gt;
&lt;BR /&gt;
errorIndication, errorStatus, errorIndex, varBinds = cmdGen.getCmd(&lt;BR /&gt;
    cmdgen.UsmUserData(user,auth,priv),&lt;BR /&gt;
    cmdgen.UdpTransportTarget(('10.18.152.51', 161)),&lt;BR /&gt;
    interfaceName,&lt;BR /&gt;
    interfaceAlias)&lt;BR /&gt;
&lt;BR /&gt;
However, when I try to run the following code the compiler complains about the last line:&lt;BR /&gt;
&lt;BR /&gt;
errorIndication, errorStatus, errorIndex, varBinds = cmdGen.setCmd(&lt;BR /&gt;
    cmdgen.UsmUserData (user,auth,priv),&lt;BR /&gt;
    cmdgen.UdpTransportTarget (('10.18.152.51', 161)),&lt;BR /&gt;
    ((interfaceAlias, 'testsetalias')))&lt;BR /&gt;
&lt;BR /&gt;
Here is the error I'm getting:&lt;BR /&gt;
&lt;BR /&gt;
Traceback (most recent call last):  File "getStub.py", line 28, in &lt;MODULE&gt;&lt;BR /&gt;
    ((interfaceAlias, 'testsetalias')))&lt;BR /&gt;
  File "/usr/local/lib/python2.7/dist-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 399, in setCmd&lt;BR /&gt;
    authData, transportTarget, varBinds, (__cbFun, appReturn)&lt;BR /&gt;
  File "/usr/local/lib/python2.7/dist-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 307, in setCmd&lt;BR /&gt;
    self.mibViewController, name + oid&lt;BR /&gt;
  File "/usr/local/lib/python2.7/dist-packages/pysnmp/entity/rfc3413/mibvar.py", line 58, in oidToMibName&lt;BR /&gt;
    (oid, mibNode.name)&lt;BR /&gt;
pysnmp.smi.error.NoSuchObjectError: NoSuchObjectError({'str': 'No MIB info for (1, 3, 6, 1, 2, 1, 31, 1, 1, 1, 18, 12001) (closest parent (1, 3, 6, 1, 2, 1))'})&lt;BR /&gt;
&lt;BR /&gt;
Any help would be much appreciated.&lt;BR /&gt;
&lt;BR /&gt;&lt;/MODULE&gt;</description>
      <pubDate>Wed, 04 Mar 2015 04:52:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmpset-using-python/m-p/28996#M4646</guid>
      <dc:creator>Garrett_Oswald</dc:creator>
      <dc:date>2015-03-04T04:52:00Z</dc:date>
    </item>
    <item>
      <title>RE: SNMPSet using Python</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmpset-using-python/m-p/28997#M4647</link>
      <description>I used &lt;A href="http://pysnmp.sourceforge.net/examples/current/v3arch/oneliner/manager/cmdgen/set-v1-multiple-values.html" target="_blank" rel="nofollow noreferrer noopener"&gt;http://pysnmp.sourceforge.net/examples/current/v3arch/oneliner/manager/cmdgen/set-v1-multiple-values...&lt;/A&gt; as a reference.&lt;BR /&gt;
&lt;BR /&gt;
Add this if you don't already have it:&lt;BR /&gt;
&lt;BR /&gt;
from pysnmp.proto import rfc1902&lt;BR /&gt;
&lt;BR /&gt;
Try changing your last line from:&lt;BR /&gt;
((interfaceAlias, 'testsetalias')))&lt;BR /&gt;
to&lt;BR /&gt;
(interfaceAlias, rfc1902.OctetString('testsetalias')))&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Mar 2015 05:41:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmpset-using-python/m-p/28997#M4647</guid>
      <dc:creator>Dave_Hammers</dc:creator>
      <dc:date>2015-03-04T05:41:00Z</dc:date>
    </item>
    <item>
      <title>RE: SNMPSet using Python</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmpset-using-python/m-p/28998#M4648</link>
      <description>Works great! Thanks for the help.</description>
      <pubDate>Wed, 04 Mar 2015 05:41:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-exos-switch/snmpset-using-python/m-p/28998#M4648</guid>
      <dc:creator>Garrett_Oswald</dc:creator>
      <dc:date>2015-03-04T05:41:00Z</dc:date>
    </item>
  </channel>
</rss>

