Remove unused functions (#15371)

* Remove unused functions
inline other legacy functions

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
Tony Murray
2023-10-04 10:17:34 -05:00
committed by GitHub
parent 3366ecad39
commit 4211b1c46f
24 changed files with 78 additions and 282 deletions

View File

@@ -29,6 +29,7 @@ use App\Models\Device;
use LibreNMS\Enum\Severity;
use LibreNMS\Interfaces\SnmptrapHandler;
use LibreNMS\Snmptrap\Trap;
use LibreNMS\Util\AutonomousSystem;
use Log;
class BgpBackwardTransition implements SnmptrapHandler
@@ -57,7 +58,7 @@ class BgpBackwardTransition implements SnmptrapHandler
$bgpPeer->bgpPeerState = $trap->getOidData($state_oid);
if ($bgpPeer->isDirty('bgpPeerState')) {
$trap->log('SNMP Trap: BGP Down ' . $bgpPeer->bgpPeerIdentifier . ' ' . get_astext($bgpPeer->bgpPeerRemoteAs) . ' is now ' . $bgpPeer->bgpPeerState, severity: Severity::Error, type: 'bgpPeer',
$trap->log('SNMP Trap: BGP Down ' . $bgpPeer->bgpPeerIdentifier . ' ' . AutonomousSystem::get($bgpPeer->bgpPeerRemoteAs)->name() . ' is now ' . $bgpPeer->bgpPeerState, severity: Severity::Error, type: 'bgpPeer',
reference: $bgpPeerIp);
}