mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -85,4 +85,17 @@ class Oid
|
||||
|
||||
return $numeric_oid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a string to an oid encoded string
|
||||
*/
|
||||
public static function ofString(string $string): string
|
||||
{
|
||||
$oid = strlen($string);
|
||||
for ($i = 0; $i != strlen($string); $i++) {
|
||||
$oid .= '.' . ord($string[$i]);
|
||||
}
|
||||
|
||||
return $oid;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user