-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package GLPI::Agent::SNMP::MibSupport::Raritan; | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use parent 'GLPI::Agent::SNMP::MibSupportTemplate'; | ||
|
||
use GLPI::Agent::Tools; | ||
use GLPI::Agent::Tools::SNMP; | ||
|
||
use constant raritan => '.1.3.6.1.4.1.13742' ; | ||
use constant pdu2 => raritan . '.6' ; | ||
|
||
use constant nameplateEntry => pdu2 . '.3.2.1.1'; | ||
use constant pduManufacturer => nameplateEntry . '.2.1'; | ||
use constant pduModel => nameplateEntry . '.3.1'; | ||
use constant pduSerialNumber => nameplateEntry . '.4.1'; | ||
|
||
use constant unitConfigurationEntry => pdu2 . '.3.2.2.1'; | ||
use constant pduName => unitConfigurationEntry . '.13.1'; | ||
|
||
our $mibSupport = [ | ||
{ | ||
name => "raritan-pdu2", | ||
sysobjectid => getRegexpOidMatch(pdu2) | ||
} | ||
]; | ||
|
||
sub getManufacturer { | ||
my ($self) = @_; | ||
|
||
return getCanonicalString($self->get(pduManufacturer)) || 'Raritan'; | ||
} | ||
|
||
sub getSerial { | ||
my ($self) = @_; | ||
|
||
return getCanonicalString($self->get(pduSerialNumber)); | ||
} | ||
|
||
sub getModel { | ||
my ($self) = @_; | ||
|
||
return getCanonicalString($self->get(pduModel)); | ||
} | ||
|
||
sub getSnmpHostname { | ||
my ($self) = @_; | ||
|
||
return getCanonicalString($self->get(pduName)); | ||
} | ||
|
||
1; | ||
|
||
__END__ | ||
=head1 NAME | ||
GLPI::Agent::SNMP::MibSupport::Raritan - Inventory module for Raritan Pdu devices | ||
=head1 DESCRIPTION | ||
The module enhances Raritan Pdu devices support. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters