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

Error if no backend clusters support reservations.

parent 31c49de7
......@@ -65,6 +65,10 @@ else {
$amlist[$aggregate->nickname()] = $aggregate->urn();
}
}
if (!count($amlist)) {
SPITUSERERROR("No clusters support reservations.");
exit();
}
echo "<script type='text/plain' id='amlist-json'>\n";
echo htmlentities(json_encode($amlist));
echo "</script>\n";
......
......@@ -105,6 +105,10 @@ elseif (isset($debug) && $debug) {
else {
$ams = Aggregate::SupportsReservations();
}
if (!count($ams)) {
SPITUSERERROR("No clusters support reservations.");
exit();
}
$amlist = array();
while (list($index, $aggregate) = each($ams)) {
$urn = $aggregate->urn();
......
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