Commit fe872340 authored by Leigh B. Stoller's avatar Leigh B. Stoller

More fixes.

parent 0e9ba5e7
......@@ -880,7 +880,9 @@ sub ModifySliver($$$$$$)
}
elsif (ref($s) eq "GeniAggregate::Link" ||
ref($s) eq "GeniAggregate::Tunnel") {
$linklist{$s->uuid()} = $s;
# XXX See the constructor in GeniAggregate.
my ($linkname) = ($s->hrn() =~ /\.([-\w]*)$/);
$linklist{$linkname} = $s;
}
else {
return GeniResponse->Create(GENIRESPONSE_UNSUPPORTED, undef,
......@@ -1064,14 +1066,13 @@ sub ModifySliver($$$$$$)
# We need to tear down links that are no longer in the rspec or
# have changed.
#
foreach my $s (values(%linklist)) {
# XXX See the constructor in GeniAggregate.
my ($linkname) = ($s->hrn() =~ /\.([-\w]*)$/);
foreach my $linkname (keys(%linklist)) {
if (!exists($rspec->{'link'}) ||
!exists($rspec->{'link'}->{$linkname})) {
my $s = $linklist{$linkname};
$s->UnProvision();
$s->Delete(0);
delete($linklist{$linkname});
next;
}
}
......@@ -1150,6 +1151,10 @@ sub ModifySliver($$$$$$)
}
my $linkref = $rspec->{'link'}->{$linkname};
# Do not worry about modifying a link that is setup. Later.
next
if (grep {$_ eq $linkname} keys(%linklist));
#
# XXX Tunnels are a total kludge right now ...
#
......
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