rename snmp_auth to device_auth and include a little doc on transports
This commit is contained in:
@@ -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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user