Remove snmp functions that are barely used (#15377)

* Remove snmp functions that are barely used
Replace them with SnmpQuery calls

* Apply fixes from StyleCI

* Fix missing namespace

* Import Oid

* No more variables left may be repeated multiple times at the end with snmpsim, remove them all

* update data fixed by SnmpResponse bugfix

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
Tony Murray
2023-10-05 01:29:22 -05:00
committed by GitHub
parent e0444bffcf
commit be24993cbb
15 changed files with 101 additions and 229 deletions

View File

@@ -147,7 +147,7 @@ if (! isset($options['S'])) {
// Output snmprec data for snmpsim for use with testing.
if (isset($options['s'])) {
$oid = string_to_oid($options['S']);
$oid = \LibreNMS\Util\Oid::ofString($options['S']);
echo "1.3.6.1.2.1.1.1.0|4|Linux server 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017 x86_64\n" .
"1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10\n" .
"1.3.6.1.2.1.1.3.0|67|77550514\n" .