From 51a6ed60d7aae09ace87a4043727d5378c6bd61a Mon Sep 17 00:00:00 2001 From: Rosiak Date: Sat, 1 Oct 2016 10:24:35 +0200 Subject: [PATCH] newdevice: Add support for Mimosa Wireless #4676 --- html/images/os/mimosa.png | Bin 0 -> 1400 bytes includes/definitions.inc.php | 12 ++++++++++++ includes/discovery/os/mimosa.inc.php | 15 +++++++++++++++ includes/polling/os/mimosa.inc.php | 15 +++++++++++++++ tests/OSDiscoveryTest.php | 5 +++++ tests/snmpsim/mimosa.snmprec | 1 + 6 files changed, 48 insertions(+) create mode 100644 html/images/os/mimosa.png create mode 100644 includes/discovery/os/mimosa.inc.php create mode 100644 includes/polling/os/mimosa.inc.php create mode 100644 tests/snmpsim/mimosa.snmprec diff --git a/html/images/os/mimosa.png b/html/images/os/mimosa.png new file mode 100644 index 0000000000000000000000000000000000000000..ea4ebd40b4e5c52786cdb34b1ea0f8e157862c4a GIT binary patch literal 1400 zcmV-;1&8{HP)N3#b8Zx2_?C0vLFfC&QLyZ`7Ip3i`^Tr$(6Ky7o&L-@{Jg!t1*sT{EgwPh zvP_&+13$aR-qnuyr%lFtKn!u6gAYmU?;IqP=ba<3gH0qa+XuJ*2Z8GS21FosJ3mn8 zzRSILJ3j<@pE-wG;mpiJAHgUA0Ad;McG_RQB0>LQun7QW$ob_p%!~tYd%lv!kw9$VDNX4k$spMlUNVjwA-;0W~sh~kQf4BckBe|NILGG z`m{KKBu7Bx4+nvA89V~z6eO*F&XQEC|i^mLOv_`3{#bRy_?srY;n0vbgR(05U!3BXFqvIxURB z-{7VhfExZIYZAVMY2G4=Hp+Mp+>{=^Ypi$-AQ?QGtz>3dVJfTjIdjrEuuaBJGXNQA z2kXrdWvqS`fQ+2T7X}-A!;=8i$Z-!6#aFM@oWJ7@u<4%sgduKzi~y`Ms=Xb6#Lj@V z>QUJuDxD8N`rE-djS5#ad*Q|VGTzL!YZ>V&aqYbGDHNq(B>=bYTRl0U$P$=A0BYof zZwQF4z1s_ae+wWKsNni7EcPT+T07oN8}(a23<%P3O?h^bS3R2`a*nSJbUeo zYWIP_SndW(h7G)2d7cS2g8sD6K?hDT0-`>)zKh zo3FVOiHlDAj!e0%je9&*%k-e;A4Un4*Jn>j#WbU~LKLpaLYGf!<`_R~f4vE8K{-a# z4!^~klGe09XCKD8{G-Q_de80?!+z&by=@?ZC@Qb#<&WxKG&SIr$W0r|9`??R z_4pyKzu!lvk50z4t+2UacfM~?sM@Q8a%k~A-mb_}4-$ucqvZ9;H$CP}&rv9vPhd2@ z=!F@oqR3JYTiFVu)FYcM9RP0Fs!2l>*R}AfXNuT0MVqL4O-7Dfu}sT5xX@a^3v57y z<}cTvXd^GZH)~?bp#>|qum6*iE4*AXKv^-;|<_=El7gS;BQK`M)pg-seT@ z0HOsqTASOzB}EC4{mY&na(;bN4R^}_TFOzwCqy|{_~c(toYE`$pbeD(0000 + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if (str_contains($sysDescr, 'Mimosa')) { + $os = 'mimosa'; +} diff --git a/includes/polling/os/mimosa.inc.php b/includes/polling/os/mimosa.inc.php new file mode 100644 index 0000000000..b06323fdae --- /dev/null +++ b/includes/polling/os/mimosa.inc.php @@ -0,0 +1,15 @@ + + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +$explodeddata = explode(" ", $poll_device['sysDescr']); +$hardware = $explodeddata['1']; +$version = $explodeddata['3']; diff --git a/tests/OSDiscoveryTest.php b/tests/OSDiscoveryTest.php index bba756c1ce..7187d088e7 100644 --- a/tests/OSDiscoveryTest.php +++ b/tests/OSDiscoveryTest.php @@ -821,6 +821,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase $this->checkOS('microsemitime'); } + public function testMimosa() + { + $this->checkOS('mimosa'); + } + public function testMinkelsrms() { $this->checkOS('minkelsrms'); diff --git a/tests/snmpsim/mimosa.snmprec b/tests/snmpsim/mimosa.snmprec new file mode 100644 index 0000000000..f283d8db7b --- /dev/null +++ b/tests/snmpsim/mimosa.snmprec @@ -0,0 +1 @@ +1.3.6.1.2.1.1.1.0|4|Mimosa B5c Firmware v92329ce