Revision c7d249d0 htools/Ganeti/HTools/Cluster.hs
b/htools/Ganeti/HTools/Cluster.hs | ||
---|---|---|
90 | 90 |
import Ganeti.Compat |
91 | 91 |
import qualified Ganeti.OpCodes as OpCodes |
92 | 92 |
import Ganeti.Utils |
93 |
import Ganeti.Types (mkNonEmpty) |
|
93 | 94 |
|
94 | 95 |
-- * Types |
95 | 96 |
|
... | ... | |
1447 | 1448 |
iMoveToJob nl il idx move = |
1448 | 1449 |
let inst = Container.find idx il |
1449 | 1450 |
iname = Instance.name inst |
1450 |
lookNode = Just . Container.nameOf nl |
|
1451 |
lookNode n = case mkNonEmpty (Container.nameOf nl n) of |
|
1452 |
-- FIXME: convert htools codebase to non-empty strings |
|
1453 |
Bad msg -> error $ "Empty node name for idx " ++ |
|
1454 |
show n ++ ": " ++ msg ++ "??" |
|
1455 |
Ok ne -> Just ne |
|
1451 | 1456 |
opF = OpCodes.OpInstanceMigrate iname True False True Nothing |
1452 | 1457 |
opFA n = OpCodes.OpInstanceMigrate iname True False True (lookNode n) |
1453 | 1458 |
opR n = OpCodes.OpInstanceReplaceDisks iname (lookNode n) |
Also available in: Unified diff