#12 store Cisco PortFast status in device_port_properties:faststart

This commit is contained in:
Oliver Gorwits
2018-03-21 10:53:09 +00:00
parent ea9ac1c1a1
commit 3ae4eabd39
6 changed files with 17 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ Module::Build->new(
'Starman' => '0.4008',
'Storable' => '0',
'Sys::SigAction' => '0',
'SNMP::Info' => '3.52',
'SNMP::Info' => '3.53',
'SQL::Abstract' => '1.85',
'SQL::Translator' => '0.11024',
'Template' => '2.24',

View File

@@ -3,6 +3,7 @@
[ENHANCEMENTS]
* #371 usernames are case insensitive but case preserving
* #12 store Cisco PortFast status in device_port_properties:faststart
2.039017 - 2018-03-20

View File

@@ -11,7 +11,7 @@ __PACKAGE__->load_namespaces(
);
our # try to hide from kwalitee
$VERSION = 51; # schema version used for upgrades, keep as integer
$VERSION = 52; # schema version used for upgrades, keep as integer
use Path::Class;
use File::ShareDir 'dist_dir';

View File

@@ -27,6 +27,8 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 1 },
"raw_speed",
{ data_type => "bigint", is_nullable => 1 },
"faststart",
{ data_type => "boolean", is_nullable => 1 },
);
__PACKAGE__->set_primary_key("port", "ip");

View File

@@ -35,6 +35,13 @@ register_worker({ phase => 'main', driver => 'snmp' }, sub {
$properties{ $port }->{error_disable_cause} = $err_cause->{$idx};
}
my $faststart = $snmp->i_faststart_enabled || {};
foreach my $idx (keys %$faststart) {
my $port = $interfaces->{$idx} or next;
$properties{ $port }->{faststart} = $faststart->{$idx};
}
my $c_if = $snmp->c_if || {};
my $c_cap = $snmp->c_cap || {};
my $c_platform = $snmp->c_platform || {};

View File

@@ -0,0 +1,5 @@
BEGIN;
ALTER TABLE device_port_properties ADD COLUMN "faststart" bool DEFAULT false;
COMMIT;