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