From 9615254d708ee0e2b6a8cf9fc5c34c006d451a74 Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Tue, 31 May 2022 21:03:04 +0200 Subject: [PATCH] Some variables and functions now live in lib.sh --- test/test_snmp_entity.sh | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/test/test_snmp_entity.sh b/test/test_snmp_entity.sh index 91810704..0459df15 100755 --- a/test/test_snmp_entity.sh +++ b/test/test_snmp_entity.sh @@ -12,14 +12,6 @@ if [ ${ENABLE_NETSNMP} != "yes" ]; then if [ "$s" = $0 ]; then exit 0; else return 0; fi fi -snmpd=$(type -p snmpd) -snmpget="$(type -p snmpget) -On -c public -v2c localhost " -snmpgetstr="$(type -p snmpget) -c public -v2c localhost " -snmpgetnext="$(type -p snmpgetnext) -On -c public -v2c localhost " -snmpgetnextstr="$(type -p snmpgetnext) -c public -v2c localhost " -snmptable="$(type -p snmptable) -c public -v2c localhost " -snmptranslate="$(type -p snmptranslate) " - cfg=$dir/conf_startup.xml fyang=$dir/clixon-example.yang fstate=$dir/state.xml @@ -119,30 +111,6 @@ cat < $fstate EOF -function validate_oid(){ - oid=$1 - oid2=$2 - type=$3 - value=$4 - - name="$($snmptranslate $oid)" - name2="$($snmptranslate $oid2)" - - if [ $oid == $oid2 ]; then - new "Validating numerical OID: $oid2 = $type: $value" - expectpart "$($snmpget $oid)" 0 "$oid2 = $type: $value" - - new "Validating textual OID: $name2 = $type: $value" - expectpart "$($snmpgetstr $name)" 0 "$name2 = $type: $value" - else - new "Validating numerical next OID: $oid2 = $type: $value" - expectpart "$($snmpgetnext $oid)" 0 "$oid2 = $type: $value" - - new "Validating textual next OID: $name2 = $type: $value" - expectpart "$($snmpgetnextstr $name)" 0 "$name2 = $type: $value" - fi -} - function testinit(){ new "test params: -f $cfg -- -sS $fstate" if [ $BE -ne 0 ]; then