Revision 2cdaf225 htools/Ganeti/Config.hs
b/htools/Ganeti/Config.hs | ||
---|---|---|
37 | 37 |
, instNodes |
38 | 38 |
) where |
39 | 39 |
|
40 |
import Control.Monad (liftM) |
|
40 | 41 |
import Data.List (foldl') |
41 | 42 |
import qualified Data.Map as M |
42 | 43 |
import qualified Data.Set as S |
... | ... | |
134 | 135 |
-- | Looks up an instance's primary node. |
135 | 136 |
getInstPrimaryNode :: ConfigData -> String -> Result Node |
136 | 137 |
getInstPrimaryNode cfg name = |
137 |
getInstance cfg name >>= return . instPrimaryNode >>= getNode cfg
|
|
138 |
liftM instPrimaryNode (getInstance cfg name) >>= getNode cfg
|
|
138 | 139 |
|
139 | 140 |
-- | Filters DRBD minors for a given node. |
140 | 141 |
getDrbdMinorsForNode :: String -> Disk -> [(Int, String)] |
Also available in: Unified diff