From fbfa2ec15419e8ebdf82907e879c3e7ccef082a7 Mon Sep 17 00:00:00 2001 From: nick n <39005454+inphobia@users.noreply.github.com> Date: Thu, 7 Oct 2021 14:19:32 +0200 Subject: [PATCH] i/if_ignore cleanup (#377) * does not have an i_ignore function, don't mention it in the docs * these interfaces don't even exist on oneaccess remove i_ignore, mark tests as complete now * don't see a reason for a function, so remove it: sub i_ignore {return;} --- lib/SNMP/Info/Layer2/Baystack.pm | 4 ---- lib/SNMP/Info/Layer3/Netscreen.pm | 9 -------- lib/SNMP/Info/Layer3/OneAccess.pm | 28 ----------------------- xt/lib/Test/SNMP/Info/Layer3/OneAccess.pm | 8 ------- 4 files changed, 49 deletions(-) diff --git a/lib/SNMP/Info/Layer2/Baystack.pm b/lib/SNMP/Info/Layer2/Baystack.pm index e46a61bc..ef0e3557 100644 --- a/lib/SNMP/Info/Layer2/Baystack.pm +++ b/lib/SNMP/Info/Layer2/Baystack.pm @@ -552,10 +552,6 @@ Returns reference to the map between IID and physical Port. The physical port name is returned as slot.port. -=item $baystack->i_ignore() - -Returns reference to hash of IIDs to ignore. - =item $baystack->i_mac() Returns the C table entries. diff --git a/lib/SNMP/Info/Layer3/Netscreen.pm b/lib/SNMP/Info/Layer3/Netscreen.pm index 3f62e9b7..310bae56 100644 --- a/lib/SNMP/Info/Layer3/Netscreen.pm +++ b/lib/SNMP/Info/Layer3/Netscreen.pm @@ -312,10 +312,6 @@ sub i_mtu { return \%i_mtu; } -sub i_ignore { - return; -} - sub i_speed { my $netscreen = shift; @@ -642,10 +638,6 @@ Defaults to C if available, uses C if not. Description of the interface. Uses C if available, C if not. -=item $netscreen->i_ignore() - -Returns without defining any interfaces to ignore. - =item $netscreen->i_index() Default SNMP IID to Interface index. @@ -804,4 +796,3 @@ See L for details. See L for details. =cut - diff --git a/lib/SNMP/Info/Layer3/OneAccess.pm b/lib/SNMP/Info/Layer3/OneAccess.pm index bd2d95a4..91ae7b8e 100644 --- a/lib/SNMP/Info/Layer3/OneAccess.pm +++ b/lib/SNMP/Info/Layer3/OneAccess.pm @@ -111,22 +111,6 @@ sub os_ver { return; } -sub i_ignore { - my $l3 = shift; - my $partial = shift; - - my $interfaces = $l3->interfaces($partial) || {}; - - my %i_ignore; - foreach my $if ( keys %$interfaces ) { - # lo0 etc - if ( $interfaces->{$if} =~ /\b(inloopback|console)\d*\b/i ) { - $i_ignore{$if}++; - } - } - return \%i_ignore; -} - 1; __END__ @@ -227,18 +211,6 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. -=head2 Overrides - -=over - -=item $oneos->i_ignore() - -Returns reference to hash. Increments value of IID if port is to be ignored. - -Ignores InLoopback and Console interfaces - -=back - =head2 Table Methods imported from SNMP::Info::Layer3 See documentation in L for details. diff --git a/xt/lib/Test/SNMP/Info/Layer3/OneAccess.pm b/xt/lib/Test/SNMP/Info/Layer3/OneAccess.pm index a2a9e5f3..c421d337 100644 --- a/xt/lib/Test/SNMP/Info/Layer3/OneAccess.pm +++ b/xt/lib/Test/SNMP/Info/Layer3/OneAccess.pm @@ -33,14 +33,6 @@ use Test::Class::Most parent => 'My::Test::Class'; use SNMP::Info::Layer3::OneAccess; -# Remove this startup override once we have full method coverage -sub startup : Tests(startup => 1) { - my $test = shift; - $test->SUPER::startup(); - - $test->todo_methods(1); -} - sub setup : Tests(setup) { my $test = shift; $test->SUPER::setup;