Commit 35891d8f authored by Leigh B Stoller's avatar Leigh B Stoller

Add routine to ack all port alarms and call it after each time we

connect two ports. It appears that letting port alarms pile up causes
the CLI to hang every now and then for a really long time. Thats my
theory, I have at least two data points to prove it.
parent 20065e49
......@@ -47,7 +47,7 @@ use Port;
my $CLI_UNNAMED_PATTERN = "[Uu]nnamed";
my $CLI_UNNAMED_NAME = "unnamed";
my $CLI_NOCONNECTION = "A00";
my $CLI_TIMEOUT = 10000;
my $CLI_TIMEOUT = 180;
# commands to show something
my $CLI_SHOW_CONNECTIONS = "show connections raw\r";
......@@ -420,6 +420,19 @@ sub pairConnected($$$$)
return 0;
}
#
# Utility function to acl all of the port alarms.
#
sub AckPortAlarms($)
{
my ($self) = @_;
my $cmd = "ack port alarm all";
$self->debug("snmpit_netscout:AckPortAlarms: $cmd\n");
return $self->doCLICmd($cmd);
}
#
# Connect ports functions:
#
......@@ -692,6 +705,7 @@ sub setPortVlan($$@) {
$self->unlock();
return 1;
}
$self->AckPortAlarms();
$self->unlock();
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment