mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
OSPF port module (#13498)
* OSPF to module * Update mock * lint and style fixes * enums as strings
This commit is contained in:
@@ -58,6 +58,10 @@ class SnmpQueryMock implements SnmpQueryInterface
|
||||
* @var bool
|
||||
*/
|
||||
private $numeric = false;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
private $hideMib = false;
|
||||
/**
|
||||
* @var array|mixed
|
||||
*/
|
||||
@@ -99,6 +103,9 @@ class SnmpQueryMock implements SnmpQueryInterface
|
||||
if ($this->numeric) {
|
||||
$options[] = '-On';
|
||||
}
|
||||
if ($this->hideMib) {
|
||||
$options[] = '-Os';
|
||||
}
|
||||
|
||||
return NetSnmpQuery::make()
|
||||
->mibDir($this->mibDir)
|
||||
@@ -118,6 +125,21 @@ class SnmpQueryMock implements SnmpQueryInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function hideMib(): SnmpQueryInterface
|
||||
{
|
||||
$this->hideMib = true;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function enumStrings(): SnmpQueryInterface
|
||||
{
|
||||
// TODO: Implement enumStrings() method, no idea how
|
||||
Log::error('enumStrings not implemented in SnmpQueryMock');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function options($options = []): SnmpQueryInterface
|
||||
{
|
||||
$this->options = $options;
|
||||
|
Reference in New Issue
Block a user