summaryrefslogtreecommitdiff
path: root/examples/v3arch/oneliner/agent/ntforg/trap-v1-with-default-values.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/v3arch/oneliner/agent/ntforg/trap-v1-with-default-values.py')
-rw-r--r--examples/v3arch/oneliner/agent/ntforg/trap-v1-with-default-values.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/v3arch/oneliner/agent/ntforg/trap-v1-with-default-values.py b/examples/v3arch/oneliner/agent/ntforg/trap-v1-with-default-values.py
index 4a845f4..beab6e7 100644
--- a/examples/v3arch/oneliner/agent/ntforg/trap-v1-with-default-values.py
+++ b/examples/v3arch/oneliner/agent/ntforg/trap-v1-with-default-values.py
@@ -22,9 +22,12 @@ errorIndication = ntfOrg.sendNotification(
ntforg.CommunityData('public', mpModel=0),
ntforg.UdpTransportTarget(('localhost', 162)),
'trap',
- '1.3.6.1.6.3.1.1.5.2',
- ('1.3.6.1.6.3.1.1.4.3.0', '1.3.6.1.4.1.20408.4.1.1.2'),
- ('1.3.6.1.2.1.1.1.0', rfc1902.OctetString('my system'))
+ ntforg.NotificationType(
+ ntforg.ObjectIdentity('1.3.6.1.6.3.1.1.5.2')
+ ).addVarBinds(
+ ('1.3.6.1.6.3.1.1.4.3.0', '1.3.6.1.4.1.20408.4.1.1.2'),
+ ('1.3.6.1.2.1.1.1.0', rfc1902.OctetString('my system'))
+ )
)
if errorIndication: