Skip to content

Commit 2b24f17

Browse files
committed
feat: Add Pantum printer support
1 parent 34829f6 commit 2b24f17

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

Changes

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ netdiscovery/netinventory:
3232
* Enhanced Brother devices support
3333
* When looking for privateoid rule in MibSupport search, the rule must match on
3434
defined value, even if the private oid returns zero.
35+
* fix #590: Add Pantum printer support
3536

3637
deploy:
3738
* Force agent to run a partial software inventory after the deploy task is done
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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.

0 commit comments

Comments
 (0)