remove root_ip()

This commit is contained in:
Eric Miller
2005-09-29 02:48:45 +00:00
parent bf040dffa9
commit 9b2229e3eb

View File

@@ -146,31 +146,17 @@ sub i_name {
my %i_name; my %i_name;
foreach my $iid (keys %$i_name2){ foreach my $iid (keys %$i_name2){
my $name = $i_name2->{$iid}; my $name = $i_name2->{$iid};
#Skip everything except Ethernet interfaces #Skip everything except Ethernet interfaces
next unless (defined $name and $name =~ /fe/i); next unless (defined $name and $name =~ /fe/i);
$name = $1 if $name =~ /(fei\.\d+\.\d+)/; $name = $1 if $name =~ /(fei\.\d+\.\d+)/;
$i_name{$iid} = $name; $i_name{$iid} = $name;
} }
return \%i_name; return \%i_name;
} }
sub root_ip {
my $contivity = shift;
my $ip_table = $contivity->ip_table();
# Return First IP Address
foreach my $entry (keys %$ip_table){
my $router_ip = $ip_table->{$entry};
print " SNMP::Layer3::Contivity::root_ip() using $router_ip\n" if $contivity->debug();
next unless $router_ip;
return $router_ip if ($router_ip ne '0.0.0.0');
}
return undef;
}
1; 1;
__END__ __END__
@@ -264,11 +250,6 @@ Returns the chassis serial number.
Returns the MAC address of the first Ethernet Interface. Returns the MAC address of the first Ethernet Interface.
=item $contivity->root_ip()
Returns the primary IP used to communicate with the router. Returns the first
IP interface.
=back =back
=head2 Overrides =head2 Overrides