From 6380176fe788293fb4cab347b52afcd91cc722c1 Mon Sep 17 00:00:00 2001 From: rockyluke Date: Tue, 7 Feb 2017 00:56:54 +0100 Subject: [PATCH] newdevice: Added support for Toshiba TEC printers (#5792) --- html/images/logos/toshiba.svg | 17 +++++++++++++++++ html/images/os/toshiba.svg | 7 +++++++ includes/definitions/toshiba-tec.yaml | 15 +++++++++++++++ tests/OSDiscoveryTest.php | 7 +++++++ tests/snmpsim/toshiba-tec-ev4.snmprec | 2 ++ tests/snmpsim/toshiba-tec-fv4.snmprec | 2 ++ tests/snmpsim/toshiba-tec-sx5t.snmprec | 2 ++ 7 files changed, 52 insertions(+) create mode 100644 html/images/logos/toshiba.svg create mode 100644 html/images/os/toshiba.svg create mode 100644 includes/definitions/toshiba-tec.yaml create mode 100644 tests/snmpsim/toshiba-tec-ev4.snmprec create mode 100644 tests/snmpsim/toshiba-tec-fv4.snmprec create mode 100644 tests/snmpsim/toshiba-tec-sx5t.snmprec diff --git a/html/images/logos/toshiba.svg b/html/images/logos/toshiba.svg new file mode 100644 index 0000000000..e161bcbc9b --- /dev/null +++ b/html/images/logos/toshiba.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/html/images/os/toshiba.svg b/html/images/os/toshiba.svg new file mode 100644 index 0000000000..2c95e9f813 --- /dev/null +++ b/html/images/os/toshiba.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/includes/definitions/toshiba-tec.yaml b/includes/definitions/toshiba-tec.yaml new file mode 100644 index 0000000000..b85c55d9ba --- /dev/null +++ b/includes/definitions/toshiba-tec.yaml @@ -0,0 +1,15 @@ +os: toshiba-tec +group: printer +text: 'Toshiba Printer' +ifname: 1 +type: printer +logo: toshiba +over: + - { graph: device_toner, text: Toner } +discovery: + - sysObjectId: + - .1.3.6.1.4.1.1129.1.2. +discovery_modules: + toner: 1 +poller_modules: + toner: 1 diff --git a/tests/OSDiscoveryTest.php b/tests/OSDiscoveryTest.php index 130ee09e4d..119cf582e8 100644 --- a/tests/OSDiscoveryTest.php +++ b/tests/OSDiscoveryTest.php @@ -1481,6 +1481,13 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase $this->checkOS('tomato'); } + public function testToshibaTec() + { + $this->checkOS('toshiba-tec', 'toshiba-tec-ev4'); + $this->checkOS('toshiba-tec', 'toshiba-tec-fv4'); + $this->checkOS('toshiba-tec', 'toshiba-tec-sx5t'); + } + public function testTpconductor() { $this->checkOS('tpconductor'); diff --git a/tests/snmpsim/toshiba-tec-ev4.snmprec b/tests/snmpsim/toshiba-tec-ev4.snmprec new file mode 100644 index 0000000000..8ef8cbcbff --- /dev/null +++ b/tests/snmpsim/toshiba-tec-ev4.snmprec @@ -0,0 +1,2 @@ +1.3.6.1.2.1.1.1.0|4|TOSHIBA TEC B-EV4 +1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.1129.1.2.1 diff --git a/tests/snmpsim/toshiba-tec-fv4.snmprec b/tests/snmpsim/toshiba-tec-fv4.snmprec new file mode 100644 index 0000000000..86c1f60ee7 --- /dev/null +++ b/tests/snmpsim/toshiba-tec-fv4.snmprec @@ -0,0 +1,2 @@ +1.3.6.1.2.1.1.1.0|4|TOSHIBA TEC B-FV4 +1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.1129.1.2.1 diff --git a/tests/snmpsim/toshiba-tec-sx5t.snmprec b/tests/snmpsim/toshiba-tec-sx5t.snmprec new file mode 100644 index 0000000000..40f58a9a45 --- /dev/null +++ b/tests/snmpsim/toshiba-tec-sx5t.snmprec @@ -0,0 +1,2 @@ +1.3.6.1.2.1.1.1.0|4|TOSHIBA TEC B-SX5T +1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.1129.1.2.1