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

Add SliceTicket(); given a ticket, return the slice.

parent 24a20def
...@@ -508,6 +508,24 @@ sub SetSlice($$) ...@@ -508,6 +508,24 @@ sub SetSlice($$)
return 0; return 0;
} }
sub SliceTicket($$)
{
my ($class, $slice) = @_;
my $slice_uuid = $slice->uuid();
my $query_result =
DBQueryWarn("select idx from geni_tickets ".
"where slice_uuid='$slice_uuid'");
return undef
if (!$query_result);
return undef
if ($query_result->numrows != 1);
my ($idx) = $query_result->fetchrow_array();
return GeniTicket->Lookup($idx);
}
# #
# Return the rspec in XML for the ticket. # Return the rspec in XML for the ticket.
# #
......
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