#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

@@ -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 || {};