No longer use default i_ignore() subs in L2/L3/L7 base classes
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
SNMP::Info - Friendly OO-style interface to Network devices using SNMP.
|
||||
|
||||
version 3.21 ()
|
||||
|
||||
[ENHANCEMENTS]
|
||||
|
||||
* No longer ignore interfaces based on name, in base L2/L3/L7 device
|
||||
classes. For several device classes SNMP::Info will now return tunnel
|
||||
interfaces and/or loopbacks, if present.
|
||||
|
||||
version 3.20 (2014-09-08)
|
||||
|
||||
[NEW FEATURES]
|
||||
|
||||
@@ -133,23 +133,6 @@ sub serial {
|
||||
return;
|
||||
}
|
||||
|
||||
sub i_ignore {
|
||||
my $l2 = shift;
|
||||
my $partial = shift;
|
||||
|
||||
my $i_type = $l2->i_type($partial) || {};
|
||||
|
||||
my %i_ignore = ();
|
||||
|
||||
foreach my $if ( keys %$i_type ) {
|
||||
my $type = $i_type->{$if};
|
||||
$i_ignore{$if}++
|
||||
if $type =~ /(loopback|other|cpu)/i;
|
||||
}
|
||||
|
||||
return \%i_ignore;
|
||||
}
|
||||
|
||||
sub interfaces {
|
||||
my $l2 = shift;
|
||||
my $partial = shift;
|
||||
@@ -304,12 +287,6 @@ name.
|
||||
|
||||
Defaults to C<ifDescr> but checks and overrides with C<ifName>
|
||||
|
||||
=item $l2->i_ignore()
|
||||
|
||||
Returns reference to hash. Increments value of IID if port is to be ignored.
|
||||
|
||||
Ignores ports with C<ifType> of loopback, propvirtual, other, and cpu
|
||||
|
||||
=back
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info
|
||||
|
||||
@@ -185,23 +185,6 @@ sub root_ip {
|
||||
return;
|
||||
}
|
||||
|
||||
sub i_ignore {
|
||||
my $l3 = shift;
|
||||
my $partial = shift;
|
||||
|
||||
my $interfaces = $l3->interfaces($partial) || {};
|
||||
|
||||
my %i_ignore;
|
||||
foreach my $if ( keys %$interfaces ) {
|
||||
|
||||
# lo -> cisco aironet 350 loopback
|
||||
if ( $interfaces->{$if} =~ /(tunnel|loopback|\blo\b|null)/i ) {
|
||||
$i_ignore{$if}++;
|
||||
}
|
||||
}
|
||||
return \%i_ignore;
|
||||
}
|
||||
|
||||
sub serial {
|
||||
my $l3 = shift;
|
||||
|
||||
@@ -544,12 +527,6 @@ name.
|
||||
|
||||
Only returns those iids that have a description listed in $l3->i_description()
|
||||
|
||||
=item $l3->i_ignore()
|
||||
|
||||
Returns reference to hash. Creates a key for each IID that should be ignored.
|
||||
|
||||
Currently looks for tunnel,loopback,lo,null from $l3->interfaces()
|
||||
|
||||
=item $l3->i_name()
|
||||
|
||||
Returns reference to hash of iid to human set name.
|
||||
|
||||
@@ -100,23 +100,6 @@ sub interfaces {
|
||||
return $interfaces;
|
||||
}
|
||||
|
||||
sub i_ignore {
|
||||
my $l7 = shift;
|
||||
my $partial = shift;
|
||||
|
||||
my $i_type = $l7->i_type($partial) || {};
|
||||
|
||||
my %i_ignore = ();
|
||||
|
||||
foreach my $if ( keys %$i_type ) {
|
||||
my $type = $i_type->{$if};
|
||||
$i_ignore{$if}++
|
||||
if $type =~ /(loopback|other|cpu)/i;
|
||||
}
|
||||
|
||||
return \%i_ignore;
|
||||
}
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
||||
@@ -229,12 +212,6 @@ to a hash.
|
||||
|
||||
Returns reference to the map between IID and physical Port.
|
||||
|
||||
=item $l7->i_ignore()
|
||||
|
||||
Returns reference to hash. Increments value of IID if port is to be ignored.
|
||||
|
||||
Ignores loopback, other, and cpu
|
||||
|
||||
=back
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info
|
||||
|
||||
Reference in New Issue
Block a user