Revision a182df55

b/Ganeti/HTools/Instance.hs
36 36
    , setPri
37 37
    , setSec
38 38
    , setBoth
39
    , setMovable
39 40
    , specOf
40 41
    , shrinkByType
41 42
    ) where
......
56 57
                         , sNode :: T.Ndx    -- ^ Original secondary node
57 58
                         , idx :: T.Idx      -- ^ Internal index
58 59
                         , util :: T.DynUtil -- ^ Dynamic resource usage
60
                         , movable :: Bool   -- ^ Can the instance be moved?
59 61
                         , tags :: [String]  -- ^ List of instance tags
60 62
                         } deriving (Show)
61 63

  
......
101 103
             , idx = -1
102 104
             , util = T.baseUtil
103 105
             , tags = tags_init
106
             , movable = True
104 107
             }
105 108

  
106 109
-- | Changes the index.
......
140 143
         -> Instance -- ^ the modified instance
141 144
setBoth t p s = t { pNode = p, sNode = s }
142 145

  
146
setMovable :: Instance -- ^ The original instance
147
           -> Bool     -- ^ New movable flag
148
           -> Instance -- ^ The modified instance
149
setMovable t m = t { movable = m }
150

  
143 151
-- | Try to shrink the instance based on the reason why we can't
144 152
-- allocate it.
145 153
shrinkByType :: Instance -> T.FailMode -> T.Result Instance

Also available in: Unified diff