newdevice: Added support for Eaton 5P units #3508 (#4376)

* newdevice: Added support for Eaton 5P units #3508

* Small fix

* Keep OSDiscoveryTest.php alphebetized
This commit is contained in:
Neil Lathwood
2016-09-09 17:57:05 +01:00
committed by Tony Murray
parent 6bc67b421e
commit f76f0f7b96
2 changed files with 7 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
<?php
if (!$os) {
// Eaton UPS
if (strstr($sysDescr, 'Eaton 5PX')) {
if (str_contains($sysDescr, 'Eaton 5P')) {
$os = 'eatonups';
}
}

View File

@@ -101,6 +101,12 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('dsm', 'Linux', '', $mockSnmp);
}
public function testEatonups()
{
$this->checkOS('eatonups', 'Eaton 5P 2200');
$this->checkOS('eatonups', 'Eaton 5PX 2000');
}
public function testEndian()
{
$this->checkOS('endian', 'Linux endian');