From 8479914b2b830c09c666573ea3dc37538aabcd34 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Fri, 22 Dec 2017 23:44:36 +0000 Subject: [PATCH 1/2] Alter order of snmp_auth and device_auth config build --- Changes | 6 ++++++ lib/App/Netdisco/Configuration.pm | 5 ++--- lib/App/Netdisco/Util/SNMP.pm | 2 +- share/config.yml | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index 9c0ddee2..f662bf1c 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +2.037005 - 2017-12-22 + + [BUG FIXES] + + * Alter order of snmp_auth and device_auth config build + 2.037004 - 2017-12-21 [BUG FIXES] diff --git a/lib/App/Netdisco/Configuration.pm b/lib/App/Netdisco/Configuration.pm index ec7e2fb2..25f8e034 100644 --- a/lib/App/Netdisco/Configuration.pm +++ b/lib/App/Netdisco/Configuration.pm @@ -53,13 +53,12 @@ if (ref {} eq ref setting('database')) { # always set this $ENV{DBIC_TRACE_PROFILE} = 'console'; -# if snmp_auth or device_auth not set, add defaults to community{_rw} +# if snmp_auth and 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') })) { + and (setting('device_auth') and 0 == scalar @{ setting('device_auth') })) { config->{'community'} = [ @{setting('community')}, 'public' ]; 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() ]; diff --git a/lib/App/Netdisco/Util/SNMP.pm b/lib/App/Netdisco/Util/SNMP.pm index f75dcf73..3fa6c0a6 100644 --- a/lib/App/Netdisco/Util/SNMP.pm +++ b/lib/App/Netdisco/Util/SNMP.pm @@ -32,7 +32,7 @@ config changes over time. Returns a list which can replace C. =cut sub fixup_device_auth { - my $config = (setting('device_auth') || setting('snmp_auth') || []); + my $config = (setting('snmp_auth') || setting('device_auth')); my @new_stanzas = (); # new style snmp config diff --git a/share/config.yml b/share/config.yml index 07d0d387..cc0c9bde 100644 --- a/share/config.yml +++ b/share/config.yml @@ -179,7 +179,7 @@ host_groups: device_identity: [] community: [] community_rw: [] -snmp_auth: [] +device_auth: [] get_community: "" bulkwalk_off: false bulkwalk_no: [] From 07446ed7d68a3230b2023ef1122036e3632a31a7 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Fri, 22 Dec 2017 23:45:53 +0000 Subject: [PATCH 2/2] release 2.037005 --- META.json | 6 +++--- META.yml | 6 +++--- lib/App/Netdisco.pm | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/META.json b/META.json index bbed67f0..e598752b 100644 --- a/META.json +++ b/META.json @@ -105,7 +105,7 @@ "provides" : { "App::Netdisco" : { "file" : "lib/App/Netdisco.pm", - "version" : "2.037004" + "version" : "2.037005" }, "App::Netdisco::AnyEvent::Nbtstat" : { "file" : "lib/App/Netdisco/AnyEvent/Nbtstat.pm" @@ -752,7 +752,7 @@ }, "homepage" : "http://netdisco.org/", "license" : [ - "http://opensource.org/licenses/bsd-license.php" + "http://opensource.org/licenses/BSD-3-Clause" ], "repository" : { "url" : "https://github.com/netdisco/netdisco" @@ -760,6 +760,6 @@ "x_IRC" : "irc://irc.freenode.org/#netdisco", "x_MailingList" : "https://lists.sourceforge.net/lists/listinfo/netdisco-users" }, - "version" : "2.037004", + "version" : "2.037005", "x_serialization_backend" : "JSON::PP version 2.94" } diff --git a/META.yml b/META.yml index 8933f20e..9cae4421 100644 --- a/META.yml +++ b/META.yml @@ -18,7 +18,7 @@ name: App-Netdisco provides: App::Netdisco: file: lib/App/Netdisco.pm - version: '2.037004' + version: '2.037005' App::Netdisco::AnyEvent::Nbtstat: file: lib/App/Netdisco/AnyEvent/Nbtstat.pm App::Netdisco::Backend::Job: @@ -520,7 +520,7 @@ resources: MailingList: https://lists.sourceforge.net/lists/listinfo/netdisco-users bugtracker: https://github.com/netdisco/netdisco/issues homepage: http://netdisco.org/ - license: http://opensource.org/licenses/bsd-license.php + license: http://opensource.org/licenses/BSD-3-Clause repository: https://github.com/netdisco/netdisco -version: '2.037004' +version: '2.037005' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff --git a/lib/App/Netdisco.pm b/lib/App/Netdisco.pm index 8e36679f..fc829e75 100644 --- a/lib/App/Netdisco.pm +++ b/lib/App/Netdisco.pm @@ -4,7 +4,7 @@ use strict; use warnings; use 5.010_000; -our $VERSION = '2.037004'; +our $VERSION = '2.037005'; use App::Netdisco::Configuration; =head1 NAME