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

Add lookup by urn (where the urn holds the internal index number).

parent ded43b13
......@@ -72,7 +72,14 @@ sub Lookup($$)
my $idx;
my $query_result;
if ($token =~ /^\d+$/) {
if (GeniHRN::IsValid($token)) {
return undef if !GeniHRN::Authoritative($token, "@OURDOMAIN@");
my ($authority, $type, $id) = GeniHRN::Parse($token);
return undef if $type ne "ticket";
$idx = $id;
}
elsif ($token =~ /^\d+$/) {
$idx = $token;
}
elsif ($token =~ /^\w+\-\w+\-\w+\-\w+\-\w+$/) {
......@@ -508,6 +515,9 @@ sub SetSlice($$)
return 0;
}
#
# Return the outstanding ticket for a slice.
#
sub SliceTicket($$)
{
my ($class, $slice) = @_;
......
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