From a9ad228be444e1b5d1b8040e431f9d50fc8e2dcb Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Sat, 4 Mar 2017 22:40:23 +0000 Subject: [PATCH] Update PlanetOS detection (#6090) * Add new Planet switch * changed definition + added more tests --- includes/definitions/planetos.yaml | 3 +-- tests/OSDiscoveryTest.php | 2 ++ tests/snmpsim/planetos-gs-5220-16s8c.snmprec | 2 ++ tests/snmpsim/planetos-sgsw-24240.snmprec | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 tests/snmpsim/planetos-gs-5220-16s8c.snmprec create mode 100644 tests/snmpsim/planetos-sgsw-24240.snmprec diff --git a/includes/definitions/planetos.yaml b/includes/definitions/planetos.yaml index ab853b25c3..b19c281e72 100644 --- a/includes/definitions/planetos.yaml +++ b/includes/definitions/planetos.yaml @@ -8,5 +8,4 @@ over: - { graph: device_mempool, text: 'Memory Usage' } discovery: - sysObjectId: - - .1.3.6.1.4.1.10456.1.1516 - - .1.3.6.1.4.1.10456.1.1566 + - .1.3.6.1.4.1.10456.1. \ No newline at end of file diff --git a/tests/OSDiscoveryTest.php b/tests/OSDiscoveryTest.php index 73ac523415..e3b418a1be 100644 --- a/tests/OSDiscoveryTest.php +++ b/tests/OSDiscoveryTest.php @@ -1327,6 +1327,8 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase { $this->checkOS('planetos'); $this->checkOS('planetos', 'planetos1'); + $this->checkOS('planetos', 'planetos-gs-5220-16s8c'); + $this->checkOS('planetos', 'planetos-sgsw-24240'); } public function testPoweralert() diff --git a/tests/snmpsim/planetos-gs-5220-16s8c.snmprec b/tests/snmpsim/planetos-gs-5220-16s8c.snmprec new file mode 100644 index 0000000000..c97724b3b5 --- /dev/null +++ b/tests/snmpsim/planetos-gs-5220-16s8c.snmprec @@ -0,0 +1,2 @@ +1.3.6.1.2.1.1.1.0|4|PLANET GS-5220-16S8C Managed Switch +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.10456.1.1494 diff --git a/tests/snmpsim/planetos-sgsw-24240.snmprec b/tests/snmpsim/planetos-sgsw-24240.snmprec new file mode 100644 index 0000000000..7fe0eec608 --- /dev/null +++ b/tests/snmpsim/planetos-sgsw-24240.snmprec @@ -0,0 +1,2 @@ +1.3.6.1.2.1.1.1.0|4|PLANET SGSW-24240 Managed Switch +1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.10456.1.1495