Added edgeos hardware info (#9867)

* added hardware info
cleanup os version

* allow minor revision to be larger than 9

* Update edgeos.inc.php

* snmprec

* Create edgeos.json
This commit is contained in:
crcro
2019-03-01 02:00:01 +02:00
committed by PipoCanaja
parent 3c0d0c9fba
commit 3ad698ff98
3 changed files with 5990 additions and 2 deletions

View File

@@ -1,6 +1,14 @@
<?php
// Version is second word in sysDescr
list(,$version) = explode(' ', $device['sysDescr']);
list(, $version) = explode(' ', $device['sysDescr']);
preg_match('/v[0-9]+.[0-9]+.[0-9]+/', $version, $matches);
$version = $matches[0];
$hw = snmp_get($device, '.1.3.6.1.2.1.25.4.2.1.5.3818', '-Ovq');
if (strpos('running on', $hw) === false) {
$hw = snmp_get($device, '.1.3.6.1.2.1.25.4.2.1.5.3819', '-Ovq');
}
preg_match('/(?<=UBNT )(.*)(?= running on)/', $hw, $matches);
$hardware = $matches[0];
$features = '';

3865
tests/data/edgeos.json Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff