@@ -207,7 +207,6 @@ def _snmpwalk_origin():
207
207
# bgp4V2NlriOrigin
208
208
# tgen.mininet_cli()
209
209
output , _ = snmp .walk (".1.3.6.1.3.5.1.1.9.1.9" )
210
- logger .info (output )
211
210
return output == expected
212
211
213
212
_ , result = topotest .run_and_expect (_snmpwalk_origin , True , count = 10 , wait = 1 )
@@ -284,13 +283,35 @@ def _snmptrap_ipv6():
284
283
("1.3.6.1.3.5.1.1.2.1.6.1.2.32.1.13.184.0.0.0.0.0.0.0.0.0.18.0.1" , "179" ),
285
284
]
286
285
286
+ expected2 = [
287
+ ("1.3.6.1.3.5.1.1.2.1.13.1.2.32.1.13.184.0.0.0.0.0.0.0.0.0.18.0.1" , "7" ),
288
+ ("1.3.6.1.3.5.1.1.2.1.6.1.2.32.1.13.184.0.0.0.0.0.0.0.0.0.18.0.1" , "179" ),
289
+ ("1.3.6.1.3.5.1.1.3.1.1.1.2.32.1.13.184.0.0.0.0.0.0.0.0.0.18.0.1" , "6" ),
290
+ ("1.3.6.1.3.5.1.1.3.1.2.1.2.32.1.13.184.0.0.0.0.0.0.0.0.0.18.0.1" , "4" ),
291
+ (
292
+ "1.3.6.1.3.5.1.1.3.1.4.1.2.32.1.13.184.0.0.0.0.0.0.0.0.0.18.0.1" ,
293
+ '"00 "' ,
294
+ ),
295
+ ("1.3.6.1.3.5.1.1.2.1.13.1.1.192.168.12.1" , "7" ),
296
+ ("1.3.6.1.3.5.1.1.2.1.6.1.1.192.168.12.1" , "179" ),
297
+ ("1.3.6.1.3.5.1.1.3.1.1.1.1.192.168.12.1" , "6" ),
298
+ ("1.3.6.1.3.5.1.1.3.1.2.1.1.192.168.12.1" , "4" ),
299
+ ("1.3.6.1.3.5.1.1.3.1.4.1.1.192.168.12.1" , '"00 "' ),
300
+ ("1.3.6.1.3.5.1.1.2.1.13.1.1.192.168.12.1" , "6" ),
301
+ ("1.3.6.1.3.5.1.1.2.1.6.1.1.192.168.12.1" , "179" ),
302
+ ("1.3.6.1.3.5.1.1.2.1.13.1.2.32.1.13.184.0.0.0.0.0.0.0.0.0.18.0.1" , "6" ),
303
+ ("1.3.6.1.3.5.1.1.2.1.6.1.2.32.1.13.184.0.0.0.0.0.0.0.0.0.18.0.1" , "179" ),
304
+ ]
305
+
287
306
# load trapd resulting file
288
307
# tgen.mininet_cli()
289
308
290
309
snmptrapfile = "{}/{}/snmptrapd.log" .format (r2 .logdir , r2 .name )
291
310
outputfile = open (snmptrapfile ).read ()
292
311
output = snmp .trap (outputfile )
293
- return output == expected
312
+ logger .info (output )
313
+ output_cut = output [:14 ]
314
+ return output_cut == expected or output_cut == expected2
294
315
295
316
snmptrapfile = "{}/{}/snmptrapd.log" .format (r2 .logdir , r2 .name )
296
317
trap_file = open (snmptrapfile , "w" )
0 commit comments