Commit d71be483 authored by Leigh B Stoller's avatar Leigh B Stoller

Return busy if the sliver has not been created yet. Fixes a bug that Max

spotted when his client would disconnect before Createsliver returned.
parent b7aa93ca
......@@ -279,15 +279,21 @@ sub ListResources()
}
# Get the hash out of the response
my $slice_hash = GeniResponse::value($response);
my $sliver = $slice_hash->{'sliver_urn'};
# Resolve the sliver to get the manifest RSpec
$resolve_args->{'urn'} = $sliver;
$response = GeniCMV2::Resolve($resolve_args);
if (GeniResponse::IsError($response)) {
return $response;
}
$xml = GeniResponse::value($response)->{'manifest'};
if (! exists($slice_hash->{'sliver_urn'}) ||
! defined($slice_hash->{'sliver_urn'})) {
#
# Hmm, see if its busy. In the middle of creating.
#
return GeniResponse->BusyResponse();
}
my $sliver = $slice_hash->{'sliver_urn'};
$resolve_args->{'urn'} = $sliver;
$response = GeniCMV2::Resolve($resolve_args);
if (GeniResponse::IsError($response)) {
return $response;
}
$xml = GeniResponse::value($response)->{'manifest'};
} else {
my $pgversion = undef;
if (! defined($version)) {
......
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