Commit 503696e8 authored by Leigh B Stoller's avatar Leigh B Stoller

Merge branch 'wvdemeer/emulab-devel-amv3-sliver-status-bugfix'

This merges !5 ...
parents c30528fc b0cc9caf
......@@ -1373,7 +1373,9 @@ sub Cancel
sub GetOpState
{
my ($sliver) = @_;
my $result = 'geni_ready';
#NOTE: geni_ready (or geni_failed) should not be the default.
# better to return "unknown", instead of risking a wrong status.
my $result = 'unknown';
if ($sliver->status() eq 'failed') {
$result = 'geni_failed';
} elsif ($sliver->status() eq 'unknown') {
......@@ -1391,9 +1393,17 @@ sub GetOpState
} elsif ($sliver->status() eq 'created'
&& $sliver->state() eq 'new') {
$result = 'geni_notready';
} elsif ($sliver->status() eq 'changing'
&& $sliver->state() eq 'new') {
$result = 'geni_notready';
} elsif ($sliver->status() eq 'changing'
&& $sliver->state() eq 'updating_users') {
$result = 'geni_updating_users';
} else {
print STDERR "\nWARNING AMv3 Status processing: unknown status." .
" Details:\n sliver->status=".$sliver->status() .
"\n sliver->state=".$sliver->state()."\n\n";
$result = 'unknown';
}
return $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