Fix SNMP::Info::IEEE802dot3ad when more than 1 LAG
This commit is contained in:
6
Changes
6
Changes
@@ -1,3 +1,9 @@
|
||||
version 3.50
|
||||
|
||||
[BUG FIXES]
|
||||
|
||||
* Fix SNMP::Info::IEEE802dot3ad when more than 1 LAG
|
||||
|
||||
version 3.49 (2018-03-03)
|
||||
|
||||
[ENHANCEMENTS]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SNMP::Info::CiscoAgg
|
||||
#
|
||||
# Copyright (c) 2014 SNMP::Info Developers
|
||||
# Copyright (c) 2018 SNMP::Info Developers
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -52,9 +52,13 @@ $VERSION = '3.49';
|
||||
|
||||
%GLOBALS = ();
|
||||
|
||||
%FUNCS = ();
|
||||
%FUNCS = (
|
||||
%SNMP::Info::IEEE802dot3ad::FUNCS,
|
||||
);
|
||||
|
||||
%MUNGE = ();
|
||||
%MUNGE = (
|
||||
%SNMP::Info::IEEE802dot3ad::MUNGE,
|
||||
);
|
||||
|
||||
sub agg_ports_pagp {
|
||||
my $dev = shift;
|
||||
@@ -147,4 +151,8 @@ automatically.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::IEEE802dot3ad
|
||||
|
||||
See documentation in L<SNMP::Info::IEEE802dot3ad> for details.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SNMP::Info::IEEE802dot3ad
|
||||
#
|
||||
# Copyright (c) 2014 SNMP::Info Developers
|
||||
# Copyright (c) 2018 SNMP::Info Developers
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -52,29 +52,30 @@ $VERSION = '3.49';
|
||||
|
||||
%GLOBALS = ();
|
||||
|
||||
%FUNCS = ();
|
||||
%FUNCS = (
|
||||
'ad_lag_ports' => 'dot3adAggPortListPorts',
|
||||
);
|
||||
|
||||
%MUNGE = ();
|
||||
%MUNGE = (
|
||||
'ad_lag_ports' => \&SNMP::Info::munge_port_list,
|
||||
);
|
||||
|
||||
sub agg_ports_lag {
|
||||
my $dev = shift;
|
||||
|
||||
# TODO: implement partial
|
||||
my $masters = $dev->dot3adAggActorOperKey;
|
||||
my $slaves = $dev->dot3adAggPortActorOperKey;
|
||||
my $ports = $dev->ad_lag_ports;
|
||||
|
||||
return {} unless
|
||||
ref {} eq ref $masters and scalar keys %$masters
|
||||
and ref {} eq ref $slaves and scalar keys %$slaves;
|
||||
return {} unless ref {} eq ref $ports and scalar keys %$ports;
|
||||
|
||||
my $ret = {};
|
||||
foreach my $s (keys %$slaves) {
|
||||
next if $slaves->{$s} == 0;
|
||||
foreach my $m (keys %$masters) {
|
||||
next unless $masters->{$m} == $slaves->{$s};
|
||||
$ret->{$s} = $m;
|
||||
last;
|
||||
}
|
||||
foreach my $m ( keys %$ports ) {
|
||||
my $idx = $m;
|
||||
my $portlist = $ports->{$m};
|
||||
next unless $portlist;
|
||||
for ( my $i = 0; $i <= scalar(@$portlist); $i++ ) {
|
||||
$ret->{$i+1} = $idx if ( @$portlist[$i] );
|
||||
}
|
||||
}
|
||||
|
||||
return $ret;
|
||||
|
||||
@@ -68,11 +68,13 @@ $VERSION = '3.49';
|
||||
%FUNCS = (
|
||||
%SNMP::Info::Layer3::FUNCS,
|
||||
%SNMP::Info::LLDP::FUNCS,
|
||||
%SNMP::Info::IEEE802dot3ad::FUNCS,
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
%SNMP::Info::Layer3::MUNGE,
|
||||
%SNMP::Info::LLDP::MUNGE,
|
||||
%SNMP::Info::IEEE802dot3ad::MUNGE,
|
||||
);
|
||||
|
||||
sub vendor { return 'Cumulus Networks' }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SNMP::Info::Layer3::H3C
|
||||
#
|
||||
# Copyright (c) 2012 Jeroen van Ingen
|
||||
# Copyright (c) 2018 Jeroen van Ingen
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -71,12 +71,14 @@ $VERSION = '3.49';
|
||||
%FUNCS = (
|
||||
%SNMP::Info::Layer3::FUNCS,
|
||||
%SNMP::Info::LLDP::FUNCS,
|
||||
%SNMP::Info::IEEE802dot3ad::FUNCS,
|
||||
i_duplex_admin => 'hh3cifEthernetDuplex',
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
%SNMP::Info::Layer3::MUNGE,
|
||||
%SNMP::Info::LLDP::MUNGE,
|
||||
%SNMP::Info::IEEE802dot3ad::MUNGE,
|
||||
);
|
||||
|
||||
sub vendor {
|
||||
@@ -265,4 +267,8 @@ See documentation in L<SNMP::Info::Layer3> for details.
|
||||
|
||||
See documentation in L<SNMP::Info::LLDP> for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::IEEE802dot3ad
|
||||
|
||||
See documentation in L<SNMP::Info::IEEE802dot3ad> for details.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# SNMP::Info::Layer3::Huawei
|
||||
#
|
||||
# Copyright (c) 2015 Jeroen van Ingen
|
||||
# Copyright (c) 2018 Jeroen van Ingen
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -64,11 +64,13 @@ $VERSION = '3.49';
|
||||
%FUNCS = (
|
||||
%SNMP::Info::Layer3::FUNCS,
|
||||
%SNMP::Info::LLDP::FUNCS,
|
||||
%SNMP::Info::IEEE802dot3ad::FUNCS,
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
%SNMP::Info::Layer3::MUNGE,
|
||||
%SNMP::Info::LLDP::MUNGE,
|
||||
%SNMP::Info::IEEE802dot3ad::MUNGE,
|
||||
);
|
||||
|
||||
sub vendor {
|
||||
@@ -229,4 +231,8 @@ See documentation in L<SNMP::Info::Layer3> for details.
|
||||
|
||||
See documentation in L<SNMP::Info::LLDP> for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::IEEE802dot3ad
|
||||
|
||||
See documentation in L<SNMP::Info::IEEE802dot3ad> for details.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -60,10 +60,12 @@ $VERSION = '3.49';
|
||||
|
||||
%FUNCS = (
|
||||
%SNMP::Info::Layer3::FUNCS,
|
||||
%SNMP::Info::IEEE802dot3ad::FUNCS,
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
%SNMP::Info::Layer3::MUNGE,
|
||||
%SNMP::Info::IEEE802dot3ad::MUNGE,
|
||||
);
|
||||
|
||||
sub vendor {
|
||||
@@ -191,5 +193,8 @@ ifIndex of the corresponding master ports.
|
||||
|
||||
See documentation in L<SNMP::Info::Layer3> for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::IEEE802dot3ad
|
||||
|
||||
See documentation in L<SNMP::Info::IEEE802dot3ad> for details.
|
||||
|
||||
=cut
|
||||
|
||||
Reference in New Issue
Block a user