diff options
Diffstat (limited to 'examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py')
-rw-r--r-- | examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py b/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py index ca51d280..330b6b24 100644 --- a/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.py +++ b/examples/hlapi/asyncore/sync/agent/ntforg/send-notification-with-additional-varbinds.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 ) |