remove die() calls
This commit is contained in:
@@ -34,7 +34,7 @@ sub gather_subnets {
|
|||||||
my @subnets = ();
|
my @subnets = ();
|
||||||
|
|
||||||
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
||||||
or die "arpnip failed: could not SNMP connect to $device";
|
or return (); # already checked!
|
||||||
|
|
||||||
my $ip_netmask = $snmp->ip_netmask;
|
my $ip_netmask = $snmp->ip_netmask;
|
||||||
foreach my $entry (keys %$ip_netmask) {
|
foreach my $entry (keys %$ip_netmask) {
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ sub store_neighbors {
|
|||||||
my @to_discover = ();
|
my @to_discover = ();
|
||||||
|
|
||||||
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
||||||
or die "discover failed: could not SNMP connect to $device";
|
or return (); # already checked!
|
||||||
|
|
||||||
# first allow any manually configured topology to be set
|
# first allow any manually configured topology to be set
|
||||||
set_manual_topology($device);
|
set_manual_topology($device);
|
||||||
@@ -287,9 +287,7 @@ sub store_neighbors {
|
|||||||
# in the devices table. only use root_ips and skip any bad topo entries.
|
# in the devices table. only use root_ips and skip any bad topo entries.
|
||||||
sub set_manual_topology {
|
sub set_manual_topology {
|
||||||
my $device = shift;
|
my $device = shift;
|
||||||
|
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device) or return;
|
||||||
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
|
||||||
or die "discover failed: could not SNMP connect to $device";
|
|
||||||
|
|
||||||
schema('netdisco')->txn_do(sub {
|
schema('netdisco')->txn_do(sub {
|
||||||
# clear manual topology flags
|
# clear manual topology flags
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ sub get_vlan_list {
|
|||||||
my $device = shift;
|
my $device = shift;
|
||||||
|
|
||||||
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
||||||
or die "macsuck failed: could not SNMP connect to $device";
|
or return (); # already checked!
|
||||||
|
|
||||||
return () unless $snmp->cisco_comm_indexing;
|
return () unless $snmp->cisco_comm_indexing;
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ sub walk_fwtable {
|
|||||||
my $cache = {};
|
my $cache = {};
|
||||||
|
|
||||||
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
||||||
or die "macsuck failed: could not SNMP connect to $device";
|
or return $cache; # already checked!
|
||||||
|
|
||||||
my $fw_mac = $snmp->fw_mac;
|
my $fw_mac = $snmp->fw_mac;
|
||||||
my $fw_port = $snmp->fw_port;
|
my $fw_port = $snmp->fw_port;
|
||||||
|
|||||||
Reference in New Issue
Block a user