rename snmp_auth to device_auth and include a little doc on transports

This commit is contained in:
Oliver Gorwits
2017-07-22 08:11:36 +01:00
parent d61556e1cf
commit f65ef90b86
4 changed files with 42 additions and 25 deletions

View File

@@ -264,7 +264,7 @@ sub _build_communities {
$mode ||= 'read';
my $seen_tags = {}; # for cleaning community table
my $config = (setting('snmp_auth') || []);
my $config = (setting('device_auth') || []);
my $tag_name = 'snmp_auth_tag_'. $mode;
my $stored_tag = eval { $device->community->$tag_name };
my $snmp_comm_rw = eval { $device->community->snmp_comm_rw };
@@ -302,10 +302,10 @@ sub _build_communities {
$stanza->{no} = [$stanza->{no}] if ref '' eq ref $stanza->{no};
$stanza->{only} = [$stanza->{only}] if ref '' eq ref $stanza->{only};
die "error: config: snmpv2 community in snmp_auth must be single item, not list\n"
die "error: config: snmpv2 community in device_auth must be single item, not list\n"
if ref $stanza->{community};
die "error: config: snmpv3 stanza in snmp_auth must have a tag\n"
die "error: config: snmpv3 stanza in device_auth must have a tag\n"
if not $stanza->{tag}
and !exists $stanza->{community};