This is a multi-part message in MIME format.
--===============0730863971==
Content-Type: multipart/alternative;
boundary="------------090007090708070306040504"

This is a multi-part message in MIME format.
--------------090007090708070306040504
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Okay, the python works to degree, but after a while it quits. Here's a
sample of running the same test script (source code after transcipt)
over and over. It worked 4 times, then no longer functions. I can
still run it just fine from the cygwin prompt using normal netsnmp commands.

In [1]: run testscript.py
adGenEasyBridgeIndexNext.0
7
adGenEasyBridgeRowStatus.7
adGenEasyBridgeStatusString.7
('Not Activated',)

In [2]: run testscript.py
adGenEasyBridgeIndexNext.0
8
adGenEasyBridgeRowStatus.8
adGenEasyBridgeStatusString.8
('Not Activated',)

In [3]: run testscript.py
adGenEasyBridgeIndexNext.0
9
adGenEasyBridgeRowStatus.9
adGenEasyBridgeStatusString.9
('Not Activated',)

In [4]: run testscript.py
adGenEasyBridgeIndexNext.0
10
adGenEasyBridgeRowStatus.10
error: set: unknown object ID
(adGenEasyBridgeRowStatus.10)adGenEasyBridgeStatu
String.10
error: get: unknown object ID (adGenEasyBridgeStatusString.10)None

In [5]: run testscript.py
adGenEasyBridgeIndexNext.0
11
adGenEasyBridgeRowStatus.11
error: set: unknown object ID
(adGenEasyBridgeRowStatus.11)adGenEasyBridgeStatu
String.11
error: get: unknown object ID (adGenEasyBridgeStatusString.11)None

Source code:

#!/usr/bin/python

from netsnmp import *

#setup the varbinds for gen easy bridge
#'.iso.org.dod.internet.private.enterprises.adtran .adShared.adGenTa5k.adGenTa5kMgmt.adGenBridge.adGe nEasyBridgeMIBObjects'
host = '192.168.15.254'
ver = 2
comm = 'private'



def SnmpGetType(label,index,dataType):
print label + index
var = Varbind(label+index,None,None, dataType)
return snmpget(var,Version=ver,DestHost=host,Community = comm)

def SnmpGet(label,index):
print label + index
var = Varbind(label+index)
return snmpget(var,Version=ver,DestHost=host,Community = comm)

def SnmpSet(label,index,val,dataType):
print label + index
var = Varbind(label+index,None,val,dataType)
return snmpset(var,Version=ver,DestHost=host,Community = comm)


genEasyBridgeIndexNext = 'adGenEasyBridgeIndexNext.'
genEasyBridgeName = 'adGenEasyBridgeName.'
genEasyBridgeRowStatus = 'adGenEasyBridgeRowStatus.'
genEasyBridgeType = 'adGenEasyBridgeType.'
genEasyBridgeUpstreamRate = 'adGenEasyBridgeUpstreamRate.'
genEasyBridgeDownstreamRate = 'adGenEasyBridgeDownstreamRate.'
genEasyBridgeMemberPhyls = 'adGenEasyBridgeMemberPhyls.'
genEasyBridgeMinNumActPhyls = 'adGenEasyBridgeMinNumActPhyls.'
genEasyBridgeStatusString = 'adGenEasyBridgeStatusString.'
genEasyBridgeRateControl = 'adGenEasyBridgeRateControl.'

#get the next index

res = SnmpGet(genEasyBridgeIndexNext,'0')
print res[0]
#Create Row
SnmpSet(genEasyBridgeRowStatus,res[0],5,'INTEGER')
#Retrieve status
result = SnmpGet(genEasyBridgeStatusString,res[0])
print result



Mike Ayers wrote:
>> From: Jack G Atkinson Jr [mailto:jgatkinsn@gmail.com]
>> Sent: Wednesday, January 02, 2008 10:03 PM
>>

>
>
>> Sorry, I forgot to put in the row number in my email. It it's there.
>>
>> Also, It has no trouble finding the adGenEasyBridgeIndexNext
>> object ID, but it can't find the adGenEasyBridgeRowStatus
>> object Id or the adGenEasyBridgeStatusString object ID. So,
>> it is somehow partially recognizing the ADTRAN-GENERIC-BRIDGE-MIB.
>>

>
> ...or the row that you expect to find is not there. When creating rows, it is imperative to read the documentation for the specific MIB (usually put into the MIB itself) to find out what the proper order of operations is for row creation, and any prerequisites.
>
> In the future, please post actual transcripts. Guessing helps noone.
>
>
> Thanks,
>
> Mike
>
>



--
------------------------------------------------------------------
Jack G. Atkinson Jr.
jgatkinsn@gmail.com
Romans 5:6-10 - God loved us while we were unlovable!
Luke 12:36-47 - Be ready!
------------------------------------------------------------------


--------------090007090708070306040504
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit







Okay, the python works to degree, but after a while it quits.  Here's a
sample of running the same test script (source code after transcipt)
over and over.  It worked 4 times, then no longer functions.  I can
still run it just fine from the cygwin prompt using normal netsnmp
commands.



In [1]: run testscript.py

adGenEasyBridgeIndexNext.0

7

adGenEasyBridgeRowStatus.7

adGenEasyBridgeStatusString.7

('Not Activated',)



In [2]: run testscript.py

adGenEasyBridgeIndexNext.0

8

adGenEasyBridgeRowStatus.8

adGenEasyBridgeStatusString.8

('Not Activated',)



In [3]: run testscript.py

adGenEasyBridgeIndexNext.0

9

adGenEasyBridgeRowStatus.9

adGenEasyBridgeStatusString.9

('Not Activated',)



In [4]: run testscript.py

adGenEasyBridgeIndexNext.0

10

adGenEasyBridgeRowStatus.10

error: set: unknown object ID
(adGenEasyBridgeRowStatus.10)adGenEasyBridgeStatu

String.10

error: get: unknown object ID (adGenEasyBridgeStatusString.10)None



In [5]: run testscript.py

adGenEasyBridgeIndexNext.0

11

adGenEasyBridgeRowStatus.11

error: set: unknown object ID
(adGenEasyBridgeRowStatus.11)adGenEasyBridgeStatu

String.11

error: get: unknown object ID (adGenEasyBridgeStatusString.11)None



Source code:

#!/usr/bin/python

from netsnmp import *

#setup the varbinds for gen easy bridge
#'.iso.org.dod.internet.private.enterprises.adtran .adShared.adGenTa5k.adGenTa5kMgmt.adGenBridge.adGe nEasyBridgeMIBObjects'
host = '192.168.15.254'
ver = 2
comm = 'private'



def SnmpGetType(label,index,dataType):
print label + index
var = Varbind(label+index,None,None, dataType)
return snmpget(var,Version=ver,DestHost=host,Community = comm)

def SnmpGet(label,index):
print label + index
var = Varbind(label+index)
return snmpget(var,Version=ver,DestHost=host,Community = comm)

def SnmpSet(label,index,val,dataType):
print label + index
var = Varbind(label+index,None,val,dataType)
return snmpset(var,Version=ver,DestHost=host,Community = comm)


genEasyBridgeIndexNext = 'adGenEasyBridgeIndexNext.'
genEasyBridgeName = 'adGenEasyBridgeName.'
genEasyBridgeRowStatus = 'adGenEasyBridgeRowStatus.'
genEasyBridgeType = 'adGenEasyBridgeType.'
genEasyBridgeUpstreamRate = 'adGenEasyBridgeUpstreamRate.'
genEasyBridgeDownstreamRate = 'adGenEasyBridgeDownstreamRate.'
genEasyBridgeMemberPhyls = 'adGenEasyBridgeMemberPhyls.'
genEasyBridgeMinNumActPhyls = 'adGenEasyBridgeMinNumActPhyls.'
genEasyBridgeStatusString = 'adGenEasyBridgeStatusString.'
genEasyBridgeRateControl = 'adGenEasyBridgeRateControl.'

#get the next index

res = SnmpGet(genEasyBridgeIndexNext,'0')
print res[0]
#Create Row
SnmpSet(genEasyBridgeRowStatus,res[0],5,'INTEGER')
#Retrieve status
result = SnmpGet(genEasyBridgeStatusString,res[0])
print result





Mike Ayers wrote:
cite="mid:83E753BE7B6A324ABB336245BAF1DAAC07B4493E@mails erver.metatv-ds.metatv.com"
type="cite">

From: Jack G Atkinson Jr [mailto:jgatkinsn@gmail.com]
Sent: Wednesday, January 02, 2008 10:03 PM





Sorry, I forgot to put in the row number in my email.  It it's there.

Also, It has no trouble finding the adGenEasyBridgeIndexNext
object ID, but it can't find the adGenEasyBridgeRowStatus
object Id or the adGenEasyBridgeStatusString object ID. So,
it is somehow partially recognizing the ADTRAN-GENERIC-BRIDGE-MIB.



...or the row that you expect to find is not there. When creating rows, it is imperative to read the documentation for the specific MIB (usually put into the MIB itself) to find out what the proper order of operations is for row creation, and any prerequisites.

In the future, please post actual transcripts. Guessing helps noone.


Thanks,

Mike