move discover and discoverall to worker plugins
This commit is contained in:
@@ -4,6 +4,7 @@ use Dancer ':syntax';
|
||||
use App::Netdisco::Worker::Plugin;
|
||||
use aliased 'App::Netdisco::Worker::Status';
|
||||
|
||||
use App::Netdisco::Transport::SNMP ();
|
||||
use App::Netdisco::Util::Permission 'check_acl_no';
|
||||
use Dancer::Plugin::DBIC 'schema';
|
||||
use NetAddr::IP::Lite ':lower';
|
||||
@@ -14,9 +15,9 @@ register_worker({ primary => false, driver => 'snmp' }, sub {
|
||||
|
||||
my $device = $job->device;
|
||||
my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
|
||||
or return Status->defer("arpnip failed: could not SNMP connect to $host");
|
||||
or return Status->defer("arpnip failed: could not SNMP connect to $device");
|
||||
|
||||
return Status->defer("Skipped arpnip for device $host without layer 3 capability")
|
||||
return Status->defer("Skipped arpnip for device $device without layer 3 capability")
|
||||
unless $snmp->has_layer(3);
|
||||
|
||||
# get directly connected networks
|
||||
|
||||
Reference in New Issue
Block a user