fix namespace snmp_connect_ip()
This commit is contained in:
@@ -117,13 +117,13 @@ sub root_ip {
|
|||||||
foreach my $key (keys %$ospf_ip){
|
foreach my $key (keys %$ospf_ip){
|
||||||
my $ip = $ospf_ip->{$key};
|
my $ip = $ospf_ip->{$key};
|
||||||
next if $ip eq '0.0.0.0';
|
next if $ip eq '0.0.0.0';
|
||||||
next unless $l3->_snmp_connect_ip($ip);
|
next unless $l3->snmp_connect_ip($ip);
|
||||||
print " SNMP::Layer3::root_ip() using $ip\n" if $l3->debug();
|
print " SNMP::Layer3::root_ip() using $ip\n" if $l3->debug();
|
||||||
return $ip;
|
return $ip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $router_ip if ( (defined $router_ip) and ($router_ip ne '0.0.0.0') and ($l3->_snmp_connect_ip($router_ip)) );
|
return $router_ip if ( (defined $router_ip) and ($router_ip ne '0.0.0.0') and ($l3->snmp_connect_ip($router_ip)) );
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -410,12 +410,12 @@ sub root_ip {
|
|||||||
my $ip = $rc_ip_addr->{$iid};
|
my $ip = $rc_ip_addr->{$iid};
|
||||||
next unless defined $ip;
|
next unless defined $ip;
|
||||||
|
|
||||||
return $ip if $passport->_snmp_connect_ip($ip);
|
return $ip if $passport->snmp_connect_ip($ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Return Management Virtual IP address
|
# Return Management Virtual IP address
|
||||||
if ( (defined $virt_ip) and ($virt_ip ne '0.0.0.0') ) {
|
if ( (defined $virt_ip) and ($virt_ip ne '0.0.0.0') ) {
|
||||||
return $virt_ip if $passport->_snmp_connect_ip($virt_ip);
|
return $virt_ip if $passport->snmp_connect_ip($virt_ip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,7 +424,7 @@ sub root_ip {
|
|||||||
foreach my $iid (keys %$rc_ip_addr){
|
foreach my $iid (keys %$rc_ip_addr){
|
||||||
my $ip = $rc_ip_addr->{$iid};
|
my $ip = $rc_ip_addr->{$iid};
|
||||||
next unless $router_ip eq $ip;
|
next unless $router_ip eq $ip;
|
||||||
return $router_ip if $passport->_snmp_connect_ip($router_ip);
|
return $router_ip if $passport->snmp_connect_ip($router_ip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -433,7 +433,7 @@ sub root_ip {
|
|||||||
my $port = $sonmp_topo_port->{$entry};
|
my $port = $sonmp_topo_port->{$entry};
|
||||||
next unless $port == 0;
|
next unless $port == 0;
|
||||||
my $ip = $sonmp_topo_ip->{$entry};
|
my $ip = $sonmp_topo_ip->{$entry};
|
||||||
return $ip if ( (defined $ip) and ($ip ne '0.0.0.0') and ($passport->_snmp_connect_ip($ip)) );
|
return $ip if ( (defined $ip) and ($ip ne '0.0.0.0') and ($passport->snmp_connect_ip($ip)) );
|
||||||
}
|
}
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user