mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add feature to capture a full snmprec (#12706)
This commit is contained in:
@@ -140,9 +140,18 @@ class ModuleTestHelper
|
||||
$this->json_file = $path;
|
||||
}
|
||||
|
||||
public function captureFromDevice($device_id, $write = true, $prefer_new = false)
|
||||
public function captureFromDevice($device_id, $write = true, $prefer_new = false, $full = false)
|
||||
{
|
||||
$snmp_oids = $this->collectOids($device_id);
|
||||
if ($full) {
|
||||
$snmp_oids[] = [
|
||||
'oid' => '.',
|
||||
'method' => 'walk',
|
||||
'mib' => null,
|
||||
'mibdir' => null,
|
||||
];
|
||||
} else {
|
||||
$snmp_oids = $this->collectOids($device_id);
|
||||
}
|
||||
|
||||
$device = device_by_id_cache($device_id, true);
|
||||
DeviceCache::setPrimary($device_id);
|
||||
|
Reference in New Issue
Block a user