#331 do not set community{_rw} defaults

This commit is contained in:
Oliver Gorwits
2017-09-21 20:12:22 +01:00
parent 65ba93acc0
commit 8dc4b9bc0e
2 changed files with 9 additions and 2 deletions

View File

@@ -52,6 +52,13 @@ if (ref {} eq ref setting('database')) {
# always set this # always set this
$ENV{DBIC_TRACE_PROFILE} = 'console'; $ENV{DBIC_TRACE_PROFILE} = 'console';
# if snmp_auth or device_auth not set, add defaults to community{_rw}
if ((setting('snmp_auth') and 0 == scalar @{ setting('snmp_auth') })
or (setting('device_auth') and 0 == scalar @{ setting('device_auth') })) {
config->{'community'} = [ @{setting('community')}, 'public' ];
config->{'community_rw'} = [ @{setting('community_rw')}, 'private' ];
}
# defaults for workers # defaults for workers
setting('workers')->{queue} ||= 'PostgreSQL'; setting('workers')->{queue} ||= 'PostgreSQL';
if (exists setting('workers')->{interactives} if (exists setting('workers')->{interactives}

View File

@@ -124,8 +124,8 @@ host_groups:
- 'fe80::/10' - 'fe80::/10'
- '127.0.0.0/8' - '127.0.0.0/8'
device_identity: [] device_identity: []
community: ['public'] community: []
community_rw: ['private'] community_rw: []
snmp_auth: [] snmp_auth: []
get_community: "" get_community: ""
bulkwalk_off: false bulkwalk_off: false