Rotek added.

Rotek and Raisercom used the same vendor id -(
This commit is contained in:
Andrey Pazychev
2020-05-18 02:57:20 +03:00
parent cda629bf39
commit cae9878c60
3 changed files with 140 additions and 7 deletions

View File

@@ -8,6 +8,7 @@ use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer3;
use SNMP::Info::Layer3::Rotek;
@SNMP::Info::Layer3::Raisecom::ISA = qw/SNMP::Info::Layer3 Exporter/;
@SNMP::Info::Layer3::Raisecom::EXPORT_OK = qw//;
@@ -36,6 +37,7 @@ $VERSION = '3.70-135';
'hw_oid_41752' => 'enterprises.41752.6.1.1.1.2.0',
'hw_oid_8886_6_140' => 'enterprises.8886.6.1.1.1.2.0',
'model_rotek' => 'enterprises.41752.3.1.1.1.3.0',
'model_41752' => 'enterprises.41752.3.1.1.1.3.0',
);
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, );
@@ -44,8 +46,9 @@ $VERSION = '3.70-135';
sub vendor {
my $obj = shift;
if ($obj->id() =~ /41752$/) {
return 'rotek';
my $id = $obj->id();
if ($id =~ /41752$/) {
return SNMP::Info::Layer3::Rotek::vendor($obj);
}
return 'raisecom';
}
@@ -57,7 +60,7 @@ sub os {
return 'ros';
}
elsif ($id =~ /41752$/) {
return 'rotek';
return SNMP::Info::Layer3::Rotek::os($obj);
}
return 'rcios';
}
@@ -91,9 +94,7 @@ sub os_ver {
$brom = $obj->brom_oid_8886_6_140;
}
elsif ($id =~ /41752$/) {
my $os_ver_oid = $obj->description();
$os_ver_oid =~ /\,\s(.*)/;
$os_ver = $1;
return SNMP::Info::Layer3::Rotek::os_ver($obj);
}
else {
$os_ver = $obj->os_ver_oid || undef;
@@ -126,7 +127,7 @@ sub model {
return $obj->model_oid_8886_6_140 . ' HW:' . $obj->hvver;
}
elsif ($id =~ /41752$/) {
return $obj->model_rotek;
return SNMP::Info::Layer3::Rotek::model($obj);
}
return $obj->SUPER::model();
}