Commit 96c002ce authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Minor bug fix.

parent 64af9119
...@@ -386,13 +386,14 @@ sub GetTicket($) ...@@ -386,13 +386,14 @@ sub GetTicket($)
foreach my $ref (@{$rspec->{'node'}}) { foreach my $ref (@{$rspec->{'node'}}) {
my $resource_uuid = $ref->{'uuid'}; my $resource_uuid = $ref->{'uuid'};
my $node_nickname = $ref->{'nickname'}; my $node_nickname = $ref->{'nickname'};
my $virtualization_type = $ref->{'virtualization_type'};
my $node; my $node;
# #
# Mostly for debugging right now, allow a wildcard. # Mostly for debugging right now, allow a wildcard.
# #
if ($resource_uuid eq "*") { if ($resource_uuid eq "*") {
$node = FindFreeNode(@nodeids); $node = FindFreeNode($virtualization_type, @nodeids);
if (!defined($node)) { if (!defined($node)) {
$response = GeniResponse->Create(GENIRESPONSE_UNAVAILABLE, $response = GeniResponse->Create(GENIRESPONSE_UNAVAILABLE,
...@@ -803,7 +804,8 @@ sub ModifySliver($$$$$$) ...@@ -803,7 +804,8 @@ sub ModifySliver($$$$$$)
if (ref($s) eq "GeniSliver::Node") { if (ref($s) eq "GeniSliver::Node") {
$nodelist{$s->resource_uuid()} = $s; $nodelist{$s->resource_uuid()} = $s;
} }
elsif (ref($s) eq "GeniAggregate::Link") { elsif (ref($s) eq "GeniAggregate::Link" ||
ref($s) eq "GeniAggregate::Tunnel") {
$linklist{$s->uuid()} = $s; $linklist{$s->uuid()} = $s;
} }
else { else {
...@@ -989,8 +991,6 @@ sub ModifySliver($$$$$$) ...@@ -989,8 +991,6 @@ sub ModifySliver($$$$$$)
# have changed. # have changed.
# #
foreach my $s (values(%linklist)) { foreach my $s (values(%linklist)) {
my $needfree = 1;
if (! exists($rspec->{'link'}->{$s->hrn()})) { if (! exists($rspec->{'link'}->{$s->hrn()})) {
$s->UnProvision(); $s->UnProvision();
$s->Delete(); $s->Delete();
...@@ -2045,10 +2045,17 @@ sub GeniExperiment($) ...@@ -2045,10 +2045,17 @@ sub GeniExperiment($)
# #
# #
# #
sub FindFreeNode(@) sub FindFreeNode($@)
{ {
# Already going to allocate these. # Already going to allocate these.
my $vtype = shift(@_);
my $type = "pc";
my @nodeids = @_; my @nodeids = @_;
if (defined($vtype)) {
# XXX Need to implement this.
;
}
my $query_result = my $query_result =
DBQueryWarn("select uuid from geni_components"); DBQueryWarn("select uuid from geni_components");
......
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