Commit 2b70f372 authored by Leigh B Stoller's avatar Leigh B Stoller

Add lookup by uuid.

parent 82e608e9
#!/usr/bin/perl -wT #!/usr/bin/perl -wT
# #
# Copyright (c) 2007-2013 University of Utah and the Flux Group. # Copyright (c) 2007-2014 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -83,6 +83,16 @@ sub Lookup($$;$) ...@@ -83,6 +83,16 @@ sub Lookup($$;$)
$arg1 = $1; $arg1 = $1;
$arg2 = $2; $arg2 = $2;
} }
elsif ($arg1 =~ /^\w+\-\w+\-\w+\-\w+\-\w+$/) {
my $result =
DBQueryWarn("select imageid from images ".
"where uuid='$arg1'");
return undef
if (! $result || !$result->numrows);
($imageid) = $result->fetchrow_array();
}
else { else {
return undef; return undef;
} }
......
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