mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
mib_dir consistency (#7700)
* mib_dir consistency also, all the snmpget mib_dir lines were unneeded. * re-add mib_dir for now, can remove the redundancy later if I come up with something. * fix tests
This commit is contained in:
committed by
Neil Lathwood
parent
c36c80f486
commit
29fc07f018
@@ -16,7 +16,7 @@ discovery:
|
||||
snmpget:
|
||||
oid: systemStatus.0
|
||||
mib: SYNOLOGY-SYSTEM-MIB
|
||||
mibdir: synology
|
||||
mib_dir: synology
|
||||
op: '!=='
|
||||
value: false
|
||||
-
|
||||
|
@@ -15,6 +15,6 @@ discovery:
|
||||
snmpget:
|
||||
oid: extrahopInfoVersionString
|
||||
mib: EXTRAHOP-MIB
|
||||
mibdir: extrahop
|
||||
mib_dir: extrahop
|
||||
op: '!=='
|
||||
value: false
|
||||
|
@@ -16,6 +16,6 @@ discovery:
|
||||
snmpget:
|
||||
oid: roomTemp.0
|
||||
mib: CAREL-ug40cdz-MIB
|
||||
mibdir: carel
|
||||
mib_dir: carel
|
||||
op: '!=='
|
||||
value: false
|
||||
|
@@ -182,7 +182,7 @@ function checkDiscovery($device, $array, $sysObjectId, $sysDescr)
|
||||
} elseif ($key == 'snmpget') {
|
||||
$options = isset($value['options']) ? $value['options'] : '-Oqv';
|
||||
$mib = isset($value['mib']) ? $value['mib'] : null;
|
||||
$mib_dir = isset($value['mibdir']) ? $value['mibdir'] : null;
|
||||
$mib_dir = isset($value['mib_dir']) ? $value['mib_dir'] : null;
|
||||
$op = isset($value['op']) ? $value['op'] : 'contains';
|
||||
|
||||
$get_value = snmp_get($device, $value['oid'], $options, $mib, $mib_dir);
|
||||
|
@@ -49,7 +49,7 @@ class YamlTest extends \PHPUnit_Framework_TestCase
|
||||
'oid',
|
||||
'options',
|
||||
'mib',
|
||||
'mibdir',
|
||||
'mib_dir',
|
||||
'op',
|
||||
'value',
|
||||
);
|
||||
|
Reference in New Issue
Block a user