diff --git a/test/test_snmp_ifmib.sh b/test/test_snmp_ifmib.sh index cb6dce51..9b4a17c3 100755 --- a/test/test_snmp_ifmib.sh +++ b/test/test_snmp_ifmib.sh @@ -15,6 +15,7 @@ fi snmpd=$(type -p snmpd) snmpget="$(type -p snmpget) -On -c public -v2c localhost " snmpgetnext="$(type -p snmpgetnext) -On -c public -v2c localhost " +snmptable="$(type -p snmptable) -c public -v2c localhost " cfg=$dir/conf_startup.xml fyang=$dir/clixon-example.yang @@ -74,14 +75,14 @@ cat < $fstate aa:bb:cc:dd:ee:ff testing up - 0 - 123 + 0 + 123 124 124 125 - 126 + 126 127 - 128 + 128 129 129 130 @@ -92,6 +93,26 @@ cat < $fstate 2 Test 2 + ethernetCsmacd + 1400 + 1000 + 11:22:33:44:55:66 + down + down + 0 + 111 + 222 + 333 + 444 + 555 + 666 + 777 + 888 + 999 + 101010 + 111111 + 111 + SNMPv2-SMI::zeroDotZero @@ -163,7 +184,7 @@ testinit # IF-MIB::interfaces MIB=".1.3.6.1.2.1" -for (( i=1; i<23; i++ )); do +for (( i=1; i<23; i++ )); do eval OID${i}="${MIB}.2.2.1.$i.1" done @@ -237,6 +258,9 @@ expectpart "$($snmpget $OID21)" 0 "$OID21 = Gauge32: 132" new "Test $OID22 ifSpecific" expectpart "$($snmpget $OID22)" 0 "$OID22 = OID: .0.0" +new "Test ifTable" +expectpart "$($snmptable IF-MIB::ifTable)" 0 "Test 2" "1400" "1000" "11:22:33:44:55:66" "down" "111" "222" "333" "444" "555" "666" "777" "888" "999" "101010" "111111" "111" + new "Cleaning up" testexit