Commit 42176a9d authored by Leigh B Stoller's avatar Leigh B Stoller

Minor cleanup.

parent 282c5114
...@@ -290,8 +290,14 @@ sub MapToLocalImage($$$$@) ...@@ -290,8 +290,14 @@ sub MapToLocalImage($$$$@)
my $hrn = GeniHRN->new($urn); my $hrn = GeniHRN->new($urn);
my $ospid = $hrn->ospid(); my $ospid = $hrn->ospid();
my $osname = $hrn->osname(); my $osname = $hrn->osname();
my $osvers = $hrn->osvers();
my ($blob, $url); my ($blob, $url);
# The image might be version specific.
if (defined($osvers) && $osvers !~ /^\d+$/) {
return GeniResponse->BadArgsResponse("Bad version number in $urn");
}
# #
# Short circuit some local cases. Permission checks will be handled later. # Short circuit some local cases. Permission checks will be handled later.
# #
...@@ -332,12 +338,6 @@ sub MapToLocalImage($$$$@) ...@@ -332,12 +338,6 @@ sub MapToLocalImage($$$$@)
$url =~ s/\/image/\/dev\/stoller\/image/ if ($usemydevtree); $url =~ s/\/image/\/dev\/stoller\/image/ if ($usemydevtree);
} }
# The image might be version specific.
my $osvers = $hrn->osvers();
if (defined($osvers) && $osvers !~ /^\d+$/) {
return GeniResponse->BadArgsResponse("Bad version number in $urn");
}
# #
# Some images cannot be transferred without a credential from the # Some images cannot be transferred without a credential from the
# cluster where it lives. The Portal will have sent that along. A # cluster where it lives. The Portal will have sent that along. A
......
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