@@ -23,16 +23,37 @@ use constant productIdentificationSerialNumber => productIdentification . ".8.1
23
23
use constant productIdentificationAssetTag => productIdentification . " .8.1.3.1" ;
24
24
use constant productIdentificationServiceTag => productIdentification . " .8.1.4.1" ;
25
25
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
+
26
39
use English qw( -no_match_vars) ;
27
40
use UNIVERSAL::require ;
28
41
29
42
our $mibSupport = [
30
43
{
31
44
name => " dell-powerconnect" ,
32
45
oid => powerConnectVendorMIB
46
+ },
47
+ {
48
+ name => " dell-os10-product" ,
49
+ sysobjectid => getRegexpOidMatch(os10Products)
33
50
}
34
51
];
35
52
53
+ sub getType {
54
+ return ' NETWORKING' ;
55
+ }
56
+
36
57
sub getFirmware {
37
58
my ($self ) = @_ ;
38
59
@@ -53,7 +74,19 @@ sub getManufacturer {
53
74
sub getSerial {
54
75
my ($self ) = @_ ;
55
76
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));
57
90
}
58
91
59
92
sub getModel {
@@ -75,12 +108,14 @@ sub run {
75
108
76
109
my $assettag = getCanonicalString($self -> get(productIdentificationAssetTag));
77
110
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
80
114
unless empty($servicetag ) || $servicetag =~ / ^none$ /i ;
81
- } else {
82
- $device -> {INFO }-> {ASSETTAG } = $assettag ;
83
115
}
116
+
117
+ $device -> {INFO }-> {ASSETTAG } = $assettag
118
+ unless empty($assettag );
84
119
}
85
120
86
121
1;
0 commit comments