Skip to content

Commit 1ea424d

Browse files
committed
fix: Update Dell networking devices support for os10 based products
1 parent 676721d commit 1ea424d

File tree

1 file changed

+40
-5
lines changed
  • lib/GLPI/Agent/SNMP/MibSupport

1 file changed

+40
-5
lines changed

Diff for: lib/GLPI/Agent/SNMP/MibSupport/Dell.pm

+40-5
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,37 @@ use constant productIdentificationSerialNumber => productIdentification . ".8.1
2323
use constant productIdentificationAssetTag => productIdentification . ".8.1.3.1" ;
2424
use constant productIdentificationServiceTag => productIdentification . ".8.1.4.1" ;
2525

26+
# Constant extracted from DELLEMC-OS10-SMI-MIB
27+
use constant os10 => dell . '.11000.5000.100';
28+
29+
# Constant extracted from DELLEMC-OS10-PRODUCTS-MIB
30+
use constant os10Products => os10 . '.2';
31+
32+
# Constant extracted from DELLEMC-OS10-CHASSIS-MIB
33+
use constant os10ChassisMib => os10 . '.4';
34+
use constant os10ChassisObject => os10ChassisMib . '.1.1';
35+
use constant os10ChassisMacAddr => os10ChassisObject . '.3.1.3.1';
36+
use constant os10ChassisPPID => os10ChassisObject . '.3.1.5.1';
37+
use constant os10ChassisServiceTag => os10ChassisObject . '.3.1.7.1';
38+
2639
use English qw(-no_match_vars);
2740
use UNIVERSAL::require;
2841

2942
our $mibSupport = [
3043
{
3144
name => "dell-powerconnect",
3245
oid => powerConnectVendorMIB
46+
},
47+
{
48+
name => "dell-os10-product",
49+
sysobjectid => getRegexpOidMatch(os10Products)
3350
}
3451
];
3552

53+
sub getType {
54+
return 'NETWORKING';
55+
}
56+
3657
sub getFirmware {
3758
my ($self) = @_;
3859

@@ -53,7 +74,19 @@ sub getManufacturer {
5374
sub getSerial {
5475
my ($self) = @_;
5576

56-
return getCanonicalString($self->get(productIdentificationSerialNumber));
77+
return getCanonicalString($self->get(productIdentificationSerialNumber))
78+
|| getCanonicalString($self->get(os10ChassisPPID));
79+
}
80+
81+
sub getMacAddress {
82+
my ($self) = @_;
83+
84+
my $device = $self->device
85+
or return;
86+
87+
return if $device->{MAC};
88+
89+
return getCanonicalMacAddress($self->get(os10ChassisMacAddr));
5790
}
5891

5992
sub getModel {
@@ -75,12 +108,14 @@ sub run {
75108

76109
my $assettag = getCanonicalString($self->get(productIdentificationAssetTag));
77110
if (empty($assettag) || $assettag =~ /^none$/i) {
78-
my $servicetag = getCanonicalString($self->get(productIdentificationServiceTag));
79-
$device->{INFO}->{ASSETTAG} = $servicetag
111+
my $servicetag = getCanonicalString($self->get(productIdentificationServiceTag))
112+
|| getCanonicalString($self->get(os10ChassisServiceTag));
113+
$assettag = $servicetag
80114
unless empty($servicetag) || $servicetag =~ /^none$/i;
81-
} else {
82-
$device->{INFO}->{ASSETTAG} = $assettag;
83115
}
116+
117+
$device->{INFO}->{ASSETTAG} = $assettag
118+
unless empty($assettag);
84119
}
85120

86121
1;

0 commit comments

Comments
 (0)