mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Disable test devices to block normal poller (#9131)
Still could happen, but much less likely.
This commit is contained in:
committed by
Neil Lathwood
parent
7778e2d66c
commit
ade409c4ec
@@ -509,6 +509,10 @@ class ModuleTestHelper
|
||||
try {
|
||||
Config::set('snmp.community', [$this->file_name]);
|
||||
$device_id = addHost($snmpsim->getIp(), 'v2c', $snmpsim->getPort());
|
||||
|
||||
// disable to block normal pollers
|
||||
dbUpdate(['disabled' => 1], 'devices', 'device_id=?', [$device_id]);
|
||||
|
||||
$this->qPrint("Added device: $device_id\n");
|
||||
} catch (\Exception $e) {
|
||||
echo $this->file_name . ': ' . $e->getMessage() . PHP_EOL;
|
||||
|
Reference in New Issue
Block a user