Ignore smmp_ver in DB when reconnecting to a device
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
* Make "Not" option work for vlan number search in Device Ports
|
* Make "Not" option work for vlan number search in Device Ports
|
||||||
* [#48] Fix for netmap links when domain_suffix is set (R. Kerr)
|
* [#48] Fix for netmap links when domain_suffix is set (R. Kerr)
|
||||||
* [#57] Port sort order for Extreme switches "1:10" format
|
* [#57] Port sort order for Extreme switches "1:10" format
|
||||||
|
* [#65] Ignore smmp_ver in DB when reconnecting to a device.
|
||||||
|
|
||||||
2.020002 - 2013-12-11
|
2.020002 - 2013-12-11
|
||||||
|
|
||||||
|
|||||||
@@ -404,9 +404,10 @@ Net-SNMP 5.3 or higher.
|
|||||||
|
|
||||||
=head3 C<snmpver>
|
=head3 C<snmpver>
|
||||||
|
|
||||||
Value: C<1|2|3>. Default: 2.
|
Value: C<1|2|3>. Default: 3.
|
||||||
|
|
||||||
Version of the SNMP protocol used when connecting to devices.
|
Highest version of the SNMP protocol used when connecting to devices. Use this
|
||||||
|
setting to disable SNMP v3 globally. Usually you don't need to configure this.
|
||||||
|
|
||||||
=head3 C<snmptimeout>
|
=head3 C<snmptimeout>
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ sub _snmp_connect_generic {
|
|||||||
|
|
||||||
# TODO: add version force support
|
# TODO: add version force support
|
||||||
# use existing SNMP version or try 3, 2, 1
|
# use existing SNMP version or try 3, 2, 1
|
||||||
my @versions = reverse (1 .. ($device->snmp_ver || setting('snmpver') || 3));
|
my @versions = reverse (1 .. (setting('snmpver') || 3));
|
||||||
|
|
||||||
# get the community string(s)
|
# get the community string(s)
|
||||||
my @communities = _build_communities($device, $mode);
|
my @communities = _build_communities($device, $mode);
|
||||||
@@ -169,6 +169,10 @@ sub _try_read {
|
|||||||
and $info->class
|
and $info->class
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$device->in_storage
|
||||||
|
? $device->update({snmp_ver => $info->snmp_ver})
|
||||||
|
: $device->set_column(snmp_ver => $info->snmp_ver);
|
||||||
|
|
||||||
if ($comm->{community}) {
|
if ($comm->{community}) {
|
||||||
$device->in_storage
|
$device->in_storage
|
||||||
? $device->update({snmp_comm => $comm->{community}})
|
? $device->update({snmp_comm => $comm->{community}})
|
||||||
@@ -189,6 +193,10 @@ sub _try_write {
|
|||||||
$info->set_location($loc) or return undef;
|
$info->set_location($loc) or return undef;
|
||||||
return undef unless ($loc eq $info->load_location);
|
return undef unless ($loc eq $info->load_location);
|
||||||
|
|
||||||
|
$device->in_storage
|
||||||
|
? $device->update({snmp_ver => $info->snmp_ver})
|
||||||
|
: $device->set_column(snmp_ver => $info->snmp_ver);
|
||||||
|
|
||||||
# one of these two cols must be set
|
# one of these two cols must be set
|
||||||
$device->update_or_create_related('community', {
|
$device->update_or_create_related('community', {
|
||||||
($comm->{tag} ? (snmp_auth_tag => $comm->{tag}) : ()),
|
($comm->{tag} ? (snmp_auth_tag => $comm->{tag}) : ()),
|
||||||
|
|||||||
Reference in New Issue
Block a user