Commit 36b179cc authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Allow lookup by osid:version.

parent a350d345
#!/usr/bin/perl -wT
#
# Copyright (c) 2007-2014 University of Utah and the Flux Group.
# Copyright (c) 2007-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -144,6 +144,17 @@ sub Lookup($$;$$)
return BlessRow($class, $result->fetchrow_hashref());
}
elsif ($arg1 =~ /^(\d+):(\d+)$/) {
my $result =
DBQueryWarn("select v.* from os_info as o ".
"left join os_info_versions as v on ".
" v.osid=o.osid ".
"where o.osid='$1' and v.vers='$2'");
return undef
if (! $result || !$result->numrows);
return BlessRow($class, $result->fetchrow_hashref());
}
elsif ($arg1 =~ /^([-\w]*),([-\w\.\+]*)$/ ||
$arg1 =~ /^([-\w]*)\/([-\w\.\+]*)$/) {
my $result =
......
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