Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
2b70f372
Commit
2b70f372
authored
Jan 24, 2014
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add lookup by uuid.
parent
82e608e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
db/Image.pm.in
db/Image.pm.in
+11
-1
No files found.
db/Image.pm.in
View file @
2b70f372
#
!/usr/bin/perl -wT
#
#
Copyright
(
c
)
2007
-
201
3
University
of
Utah
and
the
Flux
Group
.
#
Copyright
(
c
)
2007
-
201
4
University
of
Utah
and
the
Flux
Group
.
#
#
{{{
EMULAB
-
LICENSE
#
...
...
@@ -83,6 +83,16 @@ sub Lookup($$;$)
$
arg1
=
$
1
;
$
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
{
return
undef
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment