Add OS tests and use sysObjectId for device recognition

This commit is contained in:
Guillem Mateos 2016-10-21 21:01:45 +02:00
parent 2f7244a852
commit 3b4377b7ae
3 changed files with 7 additions and 3 deletions

View File

@ -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';
}

View File

@ -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');

View File

@ -0,0 +1 @@
1.3.6.1.4.1.2281.10.1.2.10.1.1.2.127|4|IP-20