Enable partial table fetches in overridden methods - Justin Hunter SF Patch ID 1542883.

This commit is contained in:
Eric Miller
2006-08-22 19:32:00 +00:00
parent c130b9a49e
commit 9d530e2a62

View File

@@ -30,7 +30,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package SNMP::Info::Layer3; package SNMP::Info::Layer3;
$VERSION = '1.04'; $VERSION = '1.05';
# $Id$ # $Id$
use strict; use strict;
@@ -74,8 +74,6 @@ use vars qw/$VERSION $DEBUG %GLOBALS %FUNCS $INIT %MIBS %MUNGE/;
%SNMP::Info::Bridge::FUNCS, %SNMP::Info::Bridge::FUNCS,
%SNMP::Info::EtherLike::FUNCS, %SNMP::Info::EtherLike::FUNCS,
%SNMP::Info::Entity::FUNCS, %SNMP::Info::Entity::FUNCS,
# IFMIB
'i_name2' => 'ifName',
# Obsolete Address Translation Table (ARP Cache) # Obsolete Address Translation Table (ARP Cache)
'old_at_index' => 'atIfIndex', 'old_at_index' => 'atIfIndex',
'old_at_paddr' => 'atPhysAddress', 'old_at_paddr' => 'atPhysAddress',
@@ -191,9 +189,11 @@ sub model {
sub i_name { sub i_name {
my $l3 = shift; my $l3 = shift;
my $i_index = $l3->i_index(); my $partial = shift;
my $i_alias = $l3->i_alias();
my $i_name2 = $l3->i_name2(); my $i_index = $l3->i_index($partial);
my $i_alias = $l3->i_alias($partial);
my $i_name2 = $l3->orig_i_name($partial);
my %i_name; my %i_name;
foreach my $iid (keys %$i_name2){ foreach my $iid (keys %$i_name2){
@@ -209,9 +209,10 @@ sub i_name {
sub i_duplex { sub i_duplex {
my $l3 = shift; my $l3 = shift;
my $partial = shift;
my $el_index = $l3->el_index();
my $el_duplex = $l3->el_duplex(); my $el_index = $l3->el_index($partial);
my $el_duplex = $l3->el_duplex($partial);
my %i_index; my %i_index;
foreach my $el_port (keys %$el_duplex){ foreach my $el_port (keys %$el_duplex){
@@ -231,8 +232,10 @@ sub i_duplex {
# $l3->interfaces() - Map the Interfaces to their physical names # $l3->interfaces() - Map the Interfaces to their physical names
sub interfaces { sub interfaces {
my $l3 = shift; my $l3 = shift;
my $interfaces = $l3->i_index(); my $partial = shift;
my $descriptions = $l3->i_description();
my $interfaces = $l3->i_index($partial);
my $descriptions = $l3->i_description($partial);
my %interfaces = (); my %interfaces = ();
foreach my $iid (keys %$interfaces){ foreach my $iid (keys %$interfaces){
@@ -257,20 +260,23 @@ sub vendor {
sub at_index { sub at_index {
my $l3 = shift; my $l3 = shift;
my $partial = shift;
return $l3->orig_at_index() || $l3->old_at_index(); return $l3->orig_at_index($partial) || $l3->old_at_index($partial);
} }
sub at_paddr { sub at_paddr {
my $l3 = shift; my $l3 = shift;
my $partial = shift;
return $l3->orig_at_paddr() || $l3->old_at_paddr(); return $l3->orig_at_paddr($partial) || $l3->old_at_paddr($partial);
} }
sub at_netaddr { sub at_netaddr {
my $l3 = shift; my $l3 = shift;
my $partial = shift;
return $l3->orig_at_netaddr() || $l3->old_at_netaddr(); return $l3->orig_at_netaddr($partial) || $l3->old_at_netaddr($partial);
} }