newdevice: Added os Discovery for Brocade NOS V4.X and below. (#5158)

This commit is contained in:
Matt Schwen 2016-12-14 13:46:11 -07:00 committed by Neil Lathwood
parent 6a414498fb
commit de87fc8a74
3 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,13 @@
<?php
$nos_objectid = array(
'.1.3.6.1.4.1.1588.2.2.1.1',
);
if (str_contains($sysDescr, array('Brocade VDX', 'BR-VDX', 'VDX67'))) {
$os = 'nos';
} elseif (starts_with($sysObjectId, $nos_objectid)) {
$os = 'nos';
}
unset($nos_objectid);

View File

@ -962,6 +962,7 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('nos');
$this->checkOS('nos', 'nos1');
$this->checkOS('nos', 'nos2');
$this->checkOS('nos', 'nos3');
}
public function testNrg()

View File

@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Brocade-VDX-VCS 1
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.1588.2.2.1.1