Skip to content

Commit e761496

Browse files
committed
fix: Add Hitachi Vantara storage devices support
Closes #1034
1 parent 42e096f commit e761496

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ netdiscovery/netinventory:
5555
Mikrotik and TP-Link devices
5656
* Add Tiesse devices support
5757
* fix #1001: Add HTek phones support
58+
* fix #1034: Add Hitachi Vantara storage devices support
5859

5960
injector:
6061
* Add support for --ca-cert-file and --ssl-fingerprint options
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
package GLPI::Agent::SNMP::MibSupport::HitachiVantara;
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 hitachi => '.1.3.6.1.4.1.116';
12+
13+
use constant hitachiVslSysObjectID => hitachi . '.3.11.4.1.1';
14+
15+
use constant raidExMibRaidListEntry => hitachi . '.5.11.4.1.1.5.1';
16+
use constant raidlistSerialNumber => raidExMibRaidListEntry . '.1';
17+
18+
our $mibSupport = [
19+
{
20+
name => "hitachi-vantara",
21+
sysobjectid => getRegexpOidMatch(hitachiVslSysObjectID)
22+
}
23+
];
24+
25+
sub _getPrivate {
26+
my ($self, $index) = @_;
27+
28+
my $key = $self->{_deviceKey};
29+
30+
unless ($key) {
31+
my $walk = $self->walk(raidlistSerialNumber);
32+
($key) = sort keys(%{$walk});
33+
$self->{_deviceKey} = $key;
34+
}
35+
36+
return $self->get(raidExMibRaidListEntry . $index . "." . $key);
37+
}
38+
39+
sub getType {
40+
my ($self) = @_;
41+
42+
return "STORAGE" if $self->getModel() =~ /^VSP/;
43+
return 'NETWORKING';
44+
}
45+
46+
sub getManufacturer {
47+
my ($self) = @_;
48+
49+
return 'Hitachi Vantara';
50+
}
51+
52+
sub getSerial {
53+
my ($self) = @_;
54+
55+
return getCanonicalString($self->_getPrivate(".1"));
56+
}
57+
58+
sub getFirmware {
59+
my ($self) = @_;
60+
61+
return getCanonicalString($self->_getPrivate(".3"));
62+
}
63+
64+
sub getModel {
65+
my ($self) = @_;
66+
67+
return getCanonicalString($self->_getPrivate(".4"));
68+
}
69+
70+
1;
71+
72+
__END__
73+
74+
=head1 NAME
75+
76+
GLPI::Agent::SNMP::MibSupport::HitachiVantara - Inventory module for Hitachi Vantara devices
77+
78+
=head1 DESCRIPTION
79+
80+
This module enhances Hitachi Vantara devices support.

0 commit comments

Comments
 (0)