Fix Eltex a lot model.

Add Telindus
Add serial to Zixel
This commit is contained in:
Andrey Pazychev
2020-05-17 15:18:08 +03:00
parent aa44871f83
commit 272b56d625
5 changed files with 205 additions and 61 deletions

View File

@@ -25,7 +25,7 @@ our
($VERSION, %FUNCS, %GLOBALS, %MIBS, %MUNGE, $AUTOLOAD, $INIT, $DEBUG, %SPEED_MAP,
$NOSUCH, $BIGINT, $REPEATERS);
$VERSION = '3.70-135.20.5.1';
$VERSION = '3.70-135.20.5.2';
=head1 NAME
@@ -1350,7 +1350,7 @@ sub new {
delete $sess_args{Offline};
}
if ( defined $args{Cache} and ref {} eq ref $args{Cache} ) {
if ( defined $args{Cache} and ref({}) eq ref $args{Cache} ) {
$new_obj->{$_} = $args{Cache}->{$_} for keys %{$args{Cache}};
delete $sess_args{Cache};
}
@@ -1571,7 +1571,7 @@ sub cache {
my $self = shift;
my $data = shift;
if ( defined $data and ref {} eq ref $data ) {
if ( defined $data and ref({}) eq ref $data ) {
$self->{$_} = $data->{$_} for keys %$data;
}
@@ -1676,6 +1676,7 @@ sub device_type {
655 => 'SNMP::Info::Layer2::Carelink',
664 => 'SNMP::Info::Layer2::Adtran',
674 => 'SNMP::Info::Layer3::Dell',
776 => 'SNMP::Info::Layer2::Telindus',
890 => 'SNMP::Info::Layer2::Zyxel',
1588 => 'SNMP::Info::Layer3::Foundry',
1872 => 'SNMP::Info::Layer3::AlteonAD',
@@ -1743,6 +1744,7 @@ sub device_type {
655 => 'SNMP::Info::Layer2::Carelink',
664 => 'SNMP::Info::Layer2::Adtran',
674 => 'SNMP::Info::Layer3::Dell',
776 => 'SNMP::Info::Layer2::Telindus',
890 => 'SNMP::Info::Layer2::Zyxel',
1872 => 'SNMP::Info::Layer3::AlteonAD',
1890 => 'SNMP::Info::Layer3::Redlion',
@@ -2883,7 +2885,7 @@ sub ip_index {
my $o_ip_idx = $self->old_ip_index();
return $o_ip_idx
if ( ref {} eq ref $o_ip_idx and scalar keys %$o_ip_idx );
if ( ref({}) eq ref $o_ip_idx and scalar keys %$o_ip_idx );
# Since callers may be using the old iid to get the IP, strip protocol
# and length from the index
@@ -2909,7 +2911,7 @@ sub ip_table {
my $o_ip_table = $self->old_ip_table();
return $o_ip_table
if ( ref {} eq ref $o_ip_table and scalar keys %$o_ip_table );
if ( ref({}) eq ref $o_ip_table and scalar keys %$o_ip_table );
my $n_ip_idx = $self->new_ip_index() || {};
my $n_ip_type = $self->new_ip_type() || {};
@@ -2933,7 +2935,7 @@ sub ip_netmask {
my $o_ip_mask = $self->old_ip_netmask();
return $o_ip_mask
if ( ref {} eq ref $o_ip_mask and scalar keys %$o_ip_mask );
if ( ref({}) eq ref $o_ip_mask and scalar keys %$o_ip_mask );
my $n_ip_pfx = $self->new_ip_prefix() || {};
my $n_ip_type = $self->new_ip_type() || {};
@@ -4814,7 +4816,7 @@ sub _cache {
my ($attr, $data) = @_;
my $store = $self->store();
if (ref {} eq ref $data) {
if (ref({}) eq ref $data) {
$self->{"_${attr}"}++;
$store->{$attr} = $data;
}
@@ -4842,7 +4844,7 @@ sub _munge {
return $data unless defined $munge->{$attr};
if (ref {} eq ref $data) {
if (ref({}) eq ref $data) {
my $subref = $munge->{$attr};
my %munged;
foreach my $key ( keys %$data ) {