mirror of
https://github.com/librenms/librenms.git
synced 2024-09-22 02:48:37 +00:00
Add OS tests and use sysObjectId for device recognition
This commit is contained in:
parent
2f7244a852
commit
3b4377b7ae
@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
$genEquipInventoryCardName = snmp_get($device, 'MWRM-UNIT-MIB::genEquipInventoryCardName.127', '-Osqnv');
|
||||
|
||||
if (preg_match('/IP-[1,2]0/', $genEquipInventoryCardName)) {
|
||||
if (starts_with($sysObjectId, '.1.3.6.1.4.1.2281')) {
|
||||
$os = 'ceraos';
|
||||
}
|
||||
|
@ -310,6 +310,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
$this->checkOS('catos');
|
||||
}
|
||||
|
||||
public function testCeraos()
|
||||
{
|
||||
$this->checkOS('ceraos');
|
||||
}
|
||||
|
||||
public function testCimc()
|
||||
{
|
||||
$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
|
Loading…
Reference in New Issue
Block a user