newdevice: Added support for Axis network video encoder #4395 (#4400)

* newdevice: Added support for Axis network video encoder #4395

* Merge the preg_match

* Add Network Camera test

Couldn't find one for "Video Server"
This commit is contained in:
Neil Lathwood
2016-09-12 18:19:24 +01:00
committed by Tony Murray
parent 9e85f24b00
commit a710c4a33c
3 changed files with 41 additions and 16 deletions

View File

@@ -29,17 +29,6 @@ include 'tests/mocks/mock.snmp.inc.php';
class DiscoveryTest extends \PHPUnit_Framework_TestCase
{
public function testAiros()
{
$this->checkOS('airos', 'Linux', '.1.3.6.1.4.1.10002.1');
$this->checkOS('airos', 'Linux', '.1.3.6.1.4.1.41112.1.4');
$mockSnmp = array(
'dot11manufacturerName.5' => 'Ubiquiti',
);
$this->checkOS('airos', 'Linux', '', $mockSnmp);
}
/**
* Set up variables and include os discovery
*
@@ -67,6 +56,17 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expectedOS, $os);
}
public function testAiros()
{
$this->checkOS('airos', 'Linux', '.1.3.6.1.4.1.10002.1');
$this->checkOS('airos', 'Linux', '.1.3.6.1.4.1.41112.1.4');
$mockSnmp = array(
'dot11manufacturerName.5' => 'Ubiquiti',
);
$this->checkOS('airos', 'Linux', '', $mockSnmp);
}
public function testAirosAf()
{
$mockSnmp = array(
@@ -75,6 +75,12 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('airos-af', 'Linux', '.1.3.6.1.4.1.10002.1', $mockSnmp);
}
public function testAxiscam()
{
$this->checkOS('axiscam', ' ; AXIS 221; Network Camera; 4.30; Nov 29 2005 11:18; 141; 1;');
$this->checkOS('axiscam', ' ; AXIS M7011; Network Video Encoder; 5.75.1; Mar 04 2015 10:10; 1FC; 1;');
}
public function testCiscosmblinux()
{
$this->checkOS('ciscosmblinux', 'Linux Cisco Small Business');