Polling cleanup, fix PHP warnings (#13460)

* Fix warnings up to Arbos

* fixes a-c

* a-r

* a-vrp

* There and back again

* Update test data, couple fixes

* PHPSStan fixes

* style fixes, and fix Asyncos, whoops

* flip serial back.......

* less bogus data

* Poweralert sysName during polling too

* make sure things are calculated in the correct order

* fix style and bad nullables

* update test data

* A comple more conversions

* cambium ptp, misc, and hardware_mib

* remaining except vmware-esxi

* Fixes

* Update baseline

* fixes and fix up baseline

* adjust SnmpQueryMock to upstream options change

* data corrections

* restore slashes

* correctly handle all options input in SnmpQueryMock

* undo ftos changes

* restore vccodec sysDescr
This commit is contained in:
Tony Murray
2021-11-14 14:58:13 -06:00
committed by GitHub
parent bef021b158
commit 7e98e03338
374 changed files with 2313 additions and 3638 deletions

View File

@@ -41,10 +41,10 @@ class Boss extends OS implements OSDiscovery, ProcessorDiscovery
$version = $version_matches[1] ?? null;
if (empty($version)) {
$version = explode(' on', snmp_get($this->getDeviceArray(), '.1.3.6.1.4.1.2272.1.1.7.0', '-Oqvn'))[0] ?? null;
$version = explode(' on', snmp_get($this->getDeviceArray(), '.1.3.6.1.4.1.2272.1.1.7.0', '-Oqvn'))[0] ?: null;
}
if (empty($version)) {
$version = snmp_get($this->getDeviceArray(), '.1.3.6.1.4.1.45.1.6.4.2.1.10.0', '-Oqvn') ?? null;
$version = snmp_get($this->getDeviceArray(), '.1.3.6.1.4.1.45.1.6.4.2.1.10.0', '-Oqvn') ?: null;
}
$device->version = $version;
@@ -54,7 +54,7 @@ class Boss extends OS implements OSDiscovery, ProcessorDiscovery
// Make boss devices hardware string compact
$details = str_replace('Ethernet Routing Switch ', 'ERS-', $details);
$details = str_replace('Virtual Services Platform ', 'VSP-', $details);
$device->hardware = explode(' ', $details, 2)[0] ?? null;
$device->hardware = explode(' ', $details, 2)[0] ?: null;
// Is this a 5500 series or 5600 series stack?
$stack = snmp_walk($this->getDeviceArray(), '.1.3.6.1.4.1.45.1.6.3.3.1.1.6.8', '-OsqnU');