Commit 203cafa4 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Revert "Apply changes from snmpit.in that were not applied to snmpit_new.in."

This reverts commit d3fa306b.
parent d3fa306b
......@@ -19,7 +19,6 @@ my $ELABINELAB = @ELABINELAB@;
my $NOSTACKMIB = @NOSTACKMIB@;
my $MAINSITE = @TBMAINSITE@;
my $TB = '@prefix@';
my $SWITCH_NODE_STACK = "Switch-Node";
use libdb;
use User;
......@@ -667,8 +666,6 @@ if ($TESTMODE) {
}
my $exitval = 0;
my @pathlinksbyl1 = ();
COMMAND: foreach my $command (@commands) {
#
......@@ -763,18 +760,6 @@ COMMAND: foreach my $command (@commands) {
next COMMAND;
}
} else {
for (my $idx = 0; $idx < scalar(@vlans); $idx++)
{
my %ifaces = ();
if (getPathVlanIfaces($vlans[$idx], \%ifaces) != -1) {
map { print "$_=>$ifaces{$_} " } keys %ifaces;
push @pathlinksbyl1, $vlans[$idx];
print "path: $vlans[$idx] \n";
}
}
@vlans = arraySub(\@vlans, \@pathlinksbyl1);
@devicenames = mapVlansToSwitches(@vlans);
debug("Tables: list from database: " . join(",",@devicenames) .
"\n");
......@@ -1706,10 +1691,8 @@ sub doVlansFromTables($$@) {
my $vlan_number;
if (@$stacks > 1) {
if (!(@$stacks == 2 && @pathlinksbyl1 > 0)) {
die "VLAN creation across multiple stacks is not yet supported\n" .
"Stacks are " . join(", ",map {$_->{STACKID}} @$stacks) . "\n";
}
die "VLAN creation across multiple stacks is not yet supported\n" .
"Stacks are " . join(", ",map {$_->{STACKID}} @$stacks) . "\n";
}
#
......@@ -1861,17 +1844,6 @@ sub doVlansFromTables($$@) {
$vlan->Refresh();
}
}
foreach my $vlanid (@pathlinksbyl1) {
my @ports = ();
my %ifaces = ();
if (getPathVlanIfaces($vlanid, \%ifaces) != -1) {
my @ifs = keys %ifaces;
@ports = map { ifacemodport{$_} } @ifs;
$errors += CreateOneVlan($stacks, $vlanid, @ports);
}
}
return $errors;
}
......@@ -1920,7 +1892,7 @@ sub CreateOneVlan($$$@)
# Set the speed and duplex of each interface depending on the
# value in the database
#
if ((!$NOSTACKMIB) && !($stack->{STACKID} eq $SWITCH_NODE_STACK)) {
if (!$NOSTACKMIB) {
foreach my $port (@ports) {
my ($speed,$duplex) = getInterfaceSettings($port);
#
......
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