Commit 2b24f17 1 parent 34829f6 commit 2b24f17 Copy full SHA for 2b24f17
File tree 2 files changed +57
-0
lines changed
lib/GLPI/Agent/SNMP/MibSupport
2 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ netdiscovery/netinventory:
32
32
* Enhanced Brother devices support
33
33
* When looking for privateoid rule in MibSupport search, the rule must match on
34
34
defined value, even if the private oid returns zero.
35
+ * fix #590: Add Pantum printer support
35
36
36
37
deploy:
37
38
* Force agent to run a partial software inventory after the deploy task is done
Original file line number Diff line number Diff line change
1
+ package GLPI::Agent::SNMP::MibSupport::Pantum ;
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use parent ' GLPI::Agent::SNMP::MibSupportTemplate' ;
7
+
8
+ use GLPI::Agent::Tools;
9
+ use GLPI::Agent::Tools::SNMP;
10
+
11
+ use constant mib2 => ' .1.3.6.1.2.1' ;
12
+ use constant enterprises => ' .1.3.6.1.4.1' ;
13
+
14
+ # Pantum private
15
+ use constant pantum => enterprises . ' .40093' ;
16
+
17
+ use constant pantumPrinter => pantum . ' .1.1' ;
18
+ use constant pantumSerialNumber1 => pantumPrinter . ' .1.5' ;
19
+ use constant pantumSerialNumber2 => pantum . ' .6.1.2' ;
20
+ use constant pantumSerialNumber3 => pantum . ' .10.1.1.4' ;
21
+
22
+ # Printer-MIB
23
+ use constant printmib => mib2 . ' .43' ;
24
+ use constant prtGeneralPrinterName => printmib . ' .5.1.1.16.1' ;
25
+
26
+ our $mibSupport = [
27
+ {
28
+ name => " pantum-printer" ,
29
+ sysobjectid => getRegexpOidMatch(pantumPrinter)
30
+ }
31
+ ];
32
+
33
+ sub getModel {
34
+ my ($self ) = @_ ;
35
+
36
+ return $self -> get(prtGeneralPrinterName);
37
+ }
38
+
39
+ sub getSerial {
40
+ my ($self ) = @_ ;
41
+
42
+ return $self -> get(pantumSerialNumber1) || $self -> get(pantumSerialNumber2) ||
43
+ $self -> get(pantumSerialNumber3);
44
+ }
45
+
46
+ 1;
47
+
48
+ __END__
49
+
50
+ =head1 NAME
51
+
52
+ GLPI::Agent::SNMP::MibSupport::Pantum - Inventory module for Pantum Printers
53
+
54
+ =head1 DESCRIPTION
55
+
56
+ The module enhances Pantum printers devices support.
You can’t perform that action at this time.
0 commit comments