Skip to content

Commit beacb3c

Browse files
committed
fix: Add Avocent KVM support
Closes #959
1 parent 289d707 commit beacb3c

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ netdiscovery/netinventory:
3737
as static for connected device discovery
3838
* fix #900: Add Veritas NetBackup linux Appliance support
3939
* fix #995: Update Sindoh printers support
40+
* fix #959: Add Avocent KVM support
4041

4142
injector:
4243
* Add support for --ca-cert-file and --ssl-fingerprint options
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
package GLPI::Agent::SNMP::MibSupport::Avocent;
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+
# ACS8000-MIB
12+
use constant avocent => ".1.3.6.1.4.1.10418" ;
13+
14+
use constant acsAppliance => avocent . ".26.2.1";
15+
16+
use constant acsHostName => acsAppliance . ".1.0";
17+
use constant acsProductModel => acsAppliance . ".2.0";
18+
use constant acsSerialNumber => acsAppliance . ".4.0";
19+
use constant acsBootcodeVersion => acsAppliance . ".6.0";
20+
use constant acsFirmwareVersion => acsAppliance . ".7.0";
21+
22+
our $mibSupport = [
23+
{
24+
name => "avocent",
25+
sysobjectid => getRegexpOidMatch(avocent)
26+
}
27+
];
28+
29+
sub getFirmware {
30+
my ($self) = @_;
31+
32+
return getCanonicalString($self->get(acsFirmwareVersion));
33+
}
34+
35+
sub getModel {
36+
my ($self) = @_;
37+
38+
return getCanonicalString($self->get(acsProductModel));
39+
}
40+
41+
sub getSnmpHostname {
42+
my ($self) = @_;
43+
44+
return getCanonicalString($self->get(acsHostName));
45+
}
46+
47+
sub getSerial {
48+
my ($self) = @_;
49+
50+
return getCanonicalString($self->get(acsSerialNumber));
51+
}
52+
53+
sub run {
54+
my ($self) = @_;
55+
56+
my $device = $self->device
57+
or return;
58+
59+
# Handle bootcode version if found
60+
my $bootcodeVersion = getCanonicalString($self->get(acsBootcodeVersion));
61+
unless (empty($bootcodeVersion)) {
62+
my $model = $device->{MODEL} ? $device->{MODEL}." " : "";
63+
my $bootcodeFirmware = {
64+
NAME => $model."bootcode",
65+
DESCRIPTION => "bootcode firmware version",
66+
TYPE => "device",
67+
VERSION => $bootcodeVersion,
68+
MANUFACTURER => "Avocent"
69+
};
70+
71+
$device->addFirmware($bootcodeFirmware);
72+
}
73+
}
74+
75+
1;
76+
77+
__END__
78+
79+
=head1 NAME
80+
81+
GLPI::Agent::SNMP::MibSupport::Avocent - Inventory module for Avocent devices
82+
83+
=head1 DESCRIPTION
84+
85+
The module enhances support for Avocent devices

0 commit comments

Comments
 (0)