#728 store SNMP Engine ID
This commit is contained in:
4
Changes
4
Changes
@@ -1,5 +1,9 @@
|
|||||||
2.046000 - 2020-06-29
|
2.046000 - 2020-06-29
|
||||||
|
|
||||||
|
[ENHANCEMENTS]
|
||||||
|
|
||||||
|
* #728 store SNMP Engine ID
|
||||||
|
|
||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
* #729 Discovery partially fails on invalid indexes
|
* #729 Discovery partially fails on invalid indexes
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ __PACKAGE__->load_namespaces(
|
|||||||
);
|
);
|
||||||
|
|
||||||
our # try to hide from kwalitee
|
our # try to hide from kwalitee
|
||||||
$VERSION = 62; # schema version used for upgrades, keep as integer
|
$VERSION = 63; # schema version used for upgrades, keep as integer
|
||||||
|
|
||||||
use Path::Class;
|
use Path::Class;
|
||||||
use File::ShareDir 'dist_dir';
|
use File::ShareDir 'dist_dir';
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ __PACKAGE__->add_columns(
|
|||||||
{ data_type => "text", is_nullable => 1 },
|
{ data_type => "text", is_nullable => 1 },
|
||||||
"snmp_class",
|
"snmp_class",
|
||||||
{ data_type => "text", is_nullable => 1 },
|
{ data_type => "text", is_nullable => 1 },
|
||||||
|
"snmp_engineid",
|
||||||
|
{ data_type => "text", is_nullable => 1 },
|
||||||
"vtp_domain",
|
"vtp_domain",
|
||||||
{ data_type => "text", is_nullable => 1 },
|
{ data_type => "text", is_nullable => 1 },
|
||||||
"last_discover",
|
"last_discover",
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ register_worker({ phase => 'early', driver => 'snmp' }, sub {
|
|||||||
|
|
||||||
$device->set_column( num_ports => $snmp->ports );
|
$device->set_column( num_ports => $snmp->ports );
|
||||||
$device->set_column( snmp_class => $snmp->class );
|
$device->set_column( snmp_class => $snmp->class );
|
||||||
|
$device->set_column( snmp_engineid => unpack('H*', $snmp->snmpEngineID) );
|
||||||
|
|
||||||
$device->set_column( last_discover => \'now()' );
|
$device->set_column( last_discover => \'now()' );
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
BEGIN;
|
||||||
|
|
||||||
|
ALTER TABLE device ADD snmp_engineid text;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
Reference in New Issue
Block a user