Commit 4ef69763 authored by Mike Hibler's avatar Mike Hibler
Browse files

Make "snmpit -o" work again in elabinelab.

This allows swap modify to work once more.
parent 62821c75
......@@ -2260,9 +2260,6 @@ sub doDeleteVlan($@) {
$vlan_ids{$vlan_name} = $vlan->id();
}
}
elsif ($ELABINELAB) {
die("Must provide an experiment for this operation\n");
}
else {
foreach my $vlan_name (@vlan_names) {
$vlan_ids{$vlan_name} = $vlan_name;
......@@ -2271,17 +2268,28 @@ sub doDeleteVlan($@) {
#
# Hand over to outer boss.
# If experiment was not specified then list is vlan IDs (tbswap).
# If experiment was specified, list is vlan names (manual invocation).
#
if ($ELABINELAB) {
foreach my $vlan (values(%vlans)) {
if (RemoteDeleteVlan($vlan) == 0) {
if ($vlan->Destroy() != 0) {
print STDERR "*** Could not destroy $vlan\n";
if (defined($experiment)) {
foreach my $vlan (values(%vlans)) {
if (RemoteDeleteVlan($vlan) == 0) {
if ($vlan->Destroy() != 0) {
print STDERR "*** Could not destroy $vlan\n";
}
}
else {
$errors++;
}
}
else {
$errors++;
}
else {
my @vidlist = ();
foreach my $vid (values(%vlan_ids)) {
push(@vidlist, $vid);
}
$errors = RemoteDoReset(undef, 0, @vidlist);
}
return $errors;
}
......
......@@ -227,7 +227,7 @@ sub RemoteDeleteVlan($)
{
my $vlan = shift();
return RemoteDoReset($vlan->id(), 0);
return RemoteDoReset(undef, 0, ($vlan->id()));
}
#
......
Supports Markdown
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