Revision 83ad1f3c Ganeti/HTools/Instance.hs

b/Ganeti/HTools/Instance.hs
36 36
    , setPri
37 37
    , setSec
38 38
    , setBoth
39
    , specOf
39 40
    , shrinkByType
40 41
    ) where
41 42

  
......
152 153
                                 then T.Bad "out of vcpus"
153 154
                                 else T.Ok inst { vcpus = v }
154 155
shrinkByType _ f = T.Bad $ "Unhandled failure mode " ++ show f
156

  
157
-- | Return the spec of an instance.
158
specOf :: Instance -> T.RSpec
159
specOf Instance { mem = m, dsk = d, vcpus = c } =
160
    T.RSpec { T.rspecCpu = c, T.rspecMem = m, T.rspecDsk = d }

Also available in: Unified diff