Commit 4aa63b4f authored by Leigh B Stoller's avatar Leigh B Stoller

Bug Fix: pass rspec_version all the way through (DiscoverResources).

parent 86621372
......@@ -106,6 +106,7 @@ sub ListResources()
my $available = $options->{'geni_available'};
my $compress = $options->{'geni_compressed'};
my $slice_urn = $options->{'geni_slice_urn'};
my $version = $options->{'rspec_version'} || undef;
my $xml = undef;
if ($slice_urn) {
......@@ -138,7 +139,8 @@ sub ListResources()
# No slice was specified, so get the advertisement RSpec.
my $discover_args = {
'credentials' => $credentials,
'available' => $available
'available' => $available,
'rspec_version' => $version,
};
my $response = GeniCMV2::DiscoverResources($discover_args);
if (GeniResponse::IsError($response)) {
......
......@@ -192,18 +192,19 @@ sub DiscoverResources($)
return $credential
if (GeniResponse::IsResponse($credential));
return DiscoverResourcesAux($available, $compress, [$credential]);
return DiscoverResourcesAux($available,
$compress, $version, [$credential]);
}
# Helper function for V2.
sub DiscoverResourcesAux($$$;$)
sub DiscoverResourcesAux($$$$)
{
my ($available, $compress, $credentials, $version) = @_;
my ($available, $compress, $version, $credentials) = @_;
my $user_urn = $ENV{'GENIRN'};
$version = "0.2"
if (!defined($version));
# Sanity check since this can come from client.
if (! ($version eq "0.1" || $version eq "0.2" ||$version eq "2.0")) {
if (! ($version eq "0.1" || $version eq "0.2" ||$version eq "2")) {
return GeniResponse->Create(GENIRESPONSE_BADARGS, undef,
"Improper version request");
}
......
......@@ -299,7 +299,7 @@ sub DiscoverResources($)
if(!GeniResponse::IsResponse($cred));
}
return GeniCM::DiscoverResourcesAux($available, $compress,
$credential_objects);
$version, $credential_objects);
}
#
......
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