mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add OS tests and use sysObjectId for device recognition
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$genEquipInventoryCardName = snmp_get($device, 'MWRM-UNIT-MIB::genEquipInventoryCardName.127', '-Osqnv');
|
if (starts_with($sysObjectId, '.1.3.6.1.4.1.2281')) {
|
||||||
|
|
||||||
if (preg_match('/IP-[1,2]0/', $genEquipInventoryCardName)) {
|
|
||||||
$os = 'ceraos';
|
$os = 'ceraos';
|
||||||
}
|
}
|
||||||
|
@@ -310,6 +310,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->checkOS('catos');
|
$this->checkOS('catos');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testCeraos()
|
||||||
|
{
|
||||||
|
$this->checkOS('ceraos');
|
||||||
|
}
|
||||||
|
|
||||||
public function testCimc()
|
public function testCimc()
|
||||||
{
|
{
|
||||||
$this->checkOS('cimc');
|
$this->checkOS('cimc');
|
||||||
|
1
tests/snmpsim/ceragon.snmprec
Normal file
1
tests/snmpsim/ceragon.snmprec
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1.3.6.1.4.1.2281.10.1.2.10.1.1.2.127|4|IP-20
|
Reference in New Issue
Block a user