Integrate netdisco-sshcollector into Worker::Plugin architecture (#489)
* Initial integration of sshcollector into Worker::Plugin architecture * NOT FULLY FUNCTIONAL - this is only to discuss some issues for now * add NodesBySSH.pm * update Build.PL and config.yml to integrate the new module * Further integration of sshcollector into Worker::Plugin architecture * NOT FULLY FUNCTIONAL - this is only to discuss some issues for now * added App::Netdisco::Transport::CLI loosely based on ::SNMP counterpart * switched to the more prevalent two-space tabs style * removed various TBD items, some new ones * Further steps to integration of sshcollector into Worker::Plugin architecture * cleaned up code * added various error handling * warning for bin/netdisco-sshcollector deprecation * device_auth allows passing master_opts to Net::OpenSSH * netdisco-do -D also toggles Net::OpenSSH debug * Merged NodesBySSH.pm into Nodes.pm * see https://github.com/netdisco/netdisco/pull/489#pullrequestreview-205603516 * Further integration of sshcollector into Worker::Plugin architecture * add snmp_arpnip_also option to sshcollector device_auth * cleanup code * Remove big TBD: comment from CLI.pm as doc is updated now
This commit is contained in:
committed by
Oliver Gorwits
parent
ffc06b72ff
commit
d21ab21130
@@ -78,13 +78,17 @@ if ($opensshdebug){
|
||||
$Net::OpenSSH::debug = ~0;
|
||||
}
|
||||
|
||||
|
||||
MCE::Loop::init { chunk_size => 1, max_workers => $workers };
|
||||
my %stats;
|
||||
$stats{entry} = 0;
|
||||
|
||||
deprecation_warning();
|
||||
exit main();
|
||||
|
||||
sub main {
|
||||
|
||||
|
||||
my @input = @{ setting('sshcollector') };
|
||||
|
||||
if ($device){
|
||||
@@ -176,6 +180,15 @@ sub store_arpentries {
|
||||
}
|
||||
}
|
||||
|
||||
sub deprecation_warning {
|
||||
print "\n";
|
||||
warning sprintf "DEPRECATION WARNING\n" .
|
||||
"This script and the sshcollector setting will be removed in a future release!\n".
|
||||
"See this document to migrate to the new sshcollector integrated into\n" .
|
||||
"regular netdisco-do/netdisco-daemon arpnip:\n" .
|
||||
"https://github.com/netdisco/netdisco/wiki/bin-sshcollector-deprecation\n\n";
|
||||
}
|
||||
|
||||
=head1 NAME
|
||||
|
||||
netdisco-sshcollector - Collect ARP data for Netdisco from devices without
|
||||
|
||||
Reference in New Issue
Block a user