mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (preg_match('/^EdgeOS/', $sysDescr)) {
|
||||
$os = 'edgeos';
|
||||
}
|
||||
if (starts_with($sysDescr, 'EdgeOS')) {
|
||||
$os = 'edgeos';
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os) {
|
||||
if (preg_match('/^Vyatta/', $sysDescr)) {
|
||||
$os = 'vyatta';
|
||||
}
|
||||
if (starts_with($sysDescr, 'Vyatta') && !str_contains($sysDescr, 'VyOS')) {
|
||||
$os = 'vyatta';
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
if (!$os || $os == 'vyatta') {
|
||||
if (preg_match('/^Vyatta VyOS/', $sysDescr) || preg_match('/^VyOS/i', $sysDescr)) {
|
||||
$os = 'vyos';
|
||||
}
|
||||
if (starts_with($sysDescr, 'Vyatta VyOS') || starts_with($sysDescr, 'VyOS', true)) {
|
||||
$os = 'vyos';
|
||||
}
|
||||
|
||||
@@ -126,6 +126,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
$this->checkOS('eatonups', 'Eaton 5PX 2000');
|
||||
}
|
||||
|
||||
public function testEdgeos()
|
||||
{
|
||||
$this->checkOS('edgeos', 'EdgeOS');
|
||||
}
|
||||
|
||||
public function testEndian()
|
||||
{
|
||||
$this->checkOS('endian', 'Linux endian');
|
||||
@@ -210,6 +215,18 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
$this->checkOS('unifi', 'Linux', '.1.3.6.1.4.1.10002.1', $mockSnmp);
|
||||
}
|
||||
|
||||
public function testVyatta()
|
||||
{
|
||||
$this->checkOS('vyatta', 'Vyatta');
|
||||
}
|
||||
|
||||
public function testVyos()
|
||||
{
|
||||
$this->checkOS('vyos', 'Vyatta VyOS');
|
||||
$this->checkOS('vyos', 'VyOS');
|
||||
$this->checkOS('vyos', 'vyos');
|
||||
}
|
||||
|
||||
public function testZxr10()
|
||||
{
|
||||
$this->checkOS('zxr10', 'ZTE Ethernet Switch ZXR10 5250-52TM-H, Version: V2.05.11B23');
|
||||
|
||||
Reference in New Issue
Block a user