mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
SnmpQuery numeric accept a boolean (#14565)
This commit is contained in:
@@ -65,13 +65,9 @@ class SnmpFetch extends LnmsCommand
|
||||
$output = $this->option('output')
|
||||
?: ($type == 'walk' ? 'table' : 'value');
|
||||
|
||||
$query = SnmpQuery::make();
|
||||
if ($this->option('numeric')) {
|
||||
$query->numeric();
|
||||
}
|
||||
|
||||
/** @var \LibreNMS\Data\Source\SnmpResponse $res */
|
||||
$res = $query->$type($this->argument('oid'));
|
||||
$res = SnmpQuery::numeric($this->option('numeric'))
|
||||
->$type($this->argument('oid'));
|
||||
|
||||
if (! $res->isValid()) {
|
||||
$this->warn(trans('commands.snmp:fetch.failed'));
|
||||
|
Reference in New Issue
Block a user