enhance behaviour when no peer matching filter

This commit is contained in:
Sims24 2017-04-24 19:18:24 +02:00
parent 3d0f8580f2
commit 7f2f8b1da2
1 changed files with 5 additions and 0 deletions

View File

@ -199,6 +199,11 @@ sub manage_selection {
seconds => $mapped_value->{bgpPeerInUpdateElpasedTime}, as => $mapped_value->{bgpPeerRemoteAs},
display => $instance };
}
if (scalar(keys %{$self->{peers}}) <= 0) {
$self->{output}->add_option_msg(short_msg => 'No peers detected, check your filter ? ');
$self->{output}->option_exit();
}
}
1;