Commit bebe7a73 authored by Iustin Pop's avatar Iustin Pop
Browse files

Add a simple type alias for nicer type signatures


Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent c6e8fb9c
......@@ -172,6 +172,10 @@ type AllocMethod = Node.List -- ^ Node list
-> [CStats] -- ^ Running cluster stats
-> Result AllocResult -- ^ Allocation result
-- | A simple type for the running solution of evacuations.
type EvacInnerState =
Either String (Node.List, Instance.Instance, Score, Ndx)
-- * Utility functions
-- | Verifies the N+1 status and return the affected nodes.
......@@ -952,15 +956,9 @@ nodeEvacInstance nl il ChangeAll
evacDrbdSecondaryInner :: Node.List -- ^ Cluster node list
-> Instance.Instance -- ^ Instance being evacuated
-> Gdx -- ^ The group index of the instance
-> Either String ( Node.List
, Instance.Instance
, Score
, Ndx) -- ^ Current best solution
-> EvacInnerState -- ^ Current best solution
-> Ndx -- ^ Node we're evaluating as new secondary
-> Either String ( Node.List
, Instance.Instance
, Score
, Ndx) -- ^ New best solution
-> EvacInnerState -- ^ New best solution
evacDrbdSecondaryInner nl inst gdx accu ndx =
case applyMove nl inst (ReplaceSecondary ndx) of
OpFail fm ->
......
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