separate out generic device auth to DeviceAuth module

This commit is contained in:
Oliver Gorwits
2019-03-11 16:51:11 +00:00
parent 249f05165f
commit e78558397a
3 changed files with 155 additions and 115 deletions

View File

@@ -1,7 +1,7 @@
package App::Netdisco::Configuration;
use App::Netdisco::Environment;
use App::Netdisco::Util::SNMP ();
use App::Netdisco::Util::DeviceAuth ();
use Dancer ':script';
use Path::Class 'dir';
@@ -84,7 +84,8 @@ if ((setting('snmp_auth') and 0 == scalar @{ setting('snmp_auth') })
config->{'community_rw'} = [ @{setting('community_rw')}, 'private' ];
}
# fix up device_auth (or create it from old snmp_auth and community settings)
config->{'device_auth'} = [ App::Netdisco::Util::SNMP::fixup_device_auth() ];
config->{'device_auth'}
= [ App::Netdisco::Util::DeviceAuth::fixup_device_auth() ];
# defaults for workers
setting('workers')->{queue} ||= 'PostgreSQL';