Skip to content
Snippets Groups Projects
Commit b513faa1 authored by Iustin Pop's avatar Iustin Pop
Browse files

Make IAlloc.loadData return maps

This patch makes the format of IAlloc.loadData be similar the same as
Loader.mergeData.
parent 926c35b1
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ data RqType
| Relocate Int
deriving (Show)
data Request = Request RqType IdxNode IdxInstance NameList NameList
data Request = Request RqType NodeList InstanceList String NameList NameList
deriving (Show)
parseBaseInstance :: String
......@@ -101,8 +101,8 @@ parseData body = do
ridx <- lookupNode kti rname rname
return $ Relocate ridx
other -> fail $ ("Invalid request type '" ++ other ++ "'")
return $ Request rqtype nl il (swapPairs ktn) (swapPairs kti)
(map_n, map_i, csf, xtn, xti) <- mergeData (ktn, nl, kti, il)
return $ Request rqtype map_n map_i csf xtn xti
formatResponse :: Bool -> String -> [String] -> String
formatResponse success info nodes =
......
......@@ -9,7 +9,6 @@ module Ganeti.HTools.Loader
, checkData
, assignIndices
, lookupNode
, swapPairs
) where
import Data.List
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment