diff options
Diffstat (limited to 'examples/v3arch/oneliner/agent/ntforg/inform-v2c-with-mib-lookup.py')
-rw-r--r-- | examples/v3arch/oneliner/agent/ntforg/inform-v2c-with-mib-lookup.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/v3arch/oneliner/agent/ntforg/inform-v2c-with-mib-lookup.py b/examples/v3arch/oneliner/agent/ntforg/inform-v2c-with-mib-lookup.py index ca51d28..330b6b2 100644 --- a/examples/v3arch/oneliner/agent/ntforg/inform-v2c-with-mib-lookup.py +++ b/examples/v3arch/oneliner/agent/ntforg/inform-v2c-with-mib-lookup.py @@ -19,8 +19,11 @@ errorIndication, errorStatus, errorIndex, varBinds = ntfOrg.sendNotification( ntforg.CommunityData('public'), ntforg.UdpTransportTarget(('localhost', 162)), 'inform', - ntforg.MibVariable('SNMPv2-MIB', 'coldStart'), - ( ntforg.MibVariable('SNMPv2-MIB', 'sysName', 0), 'my system' ), + ntforg.NotificationType( + ntforg.ObjectIdentity('SNMPv2-MIB', 'coldStart') + ).addVarBinds( + ( ntforg.ObjectIdentity('SNMPv2-MIB', 'sysName', 0), 'my system' ) + ), lookupNames=True, lookupValues=True ) |