Skip to content
Snippets Groups Projects
Commit d57800c6 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

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

parent ded43b13
No related branches found
No related tags found
No related merge requests found
......@@ -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) = @_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment