Revision 786c514c htools/Ganeti/HTools/IAlloc.hs
b/htools/Ganeti/HTools/IAlloc.hs | ||
---|---|---|
27 | 27 |
( readRequest |
28 | 28 |
, runIAllocator |
29 | 29 |
, processRelocate |
30 |
, loadData |
|
30 | 31 |
) where |
31 | 32 |
|
32 | 33 |
import Data.Either () |
... | ... | |
343 | 344 |
Bad msg -> (False, "Request failed: " ++ msg, JSArray [], Nothing) |
344 | 345 |
rstring = formatResponse ok info result |
345 | 346 |
in (cdata, rstring) |
347 |
|
|
348 |
-- | Load the data from an iallocation request file |
|
349 |
loadData :: FilePath -- ^ The path to the file |
|
350 |
-> IO (Result ClusterData) |
|
351 |
loadData fp = do |
|
352 |
Request _ cdata <- readRequest fp |
|
353 |
return $ Ok cdata |
Also available in: Unified diff