Revision da5f09ef src/Ganeti/HTools/Backend/Text.hs

b/src/Ganeti/HTools/Backend/Text.hs
7 7

  
8 8
{-
9 9

  
10
Copyright (C) 2009, 2010, 2011, 2012 Google Inc.
10
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
11 11

  
12 12
This program is free software; you can redistribute it and/or modify
13 13
it under the terms of the GNU General Public License as published by
......
132 132
-- | Generate policy data from a given policy object.
133 133
serializeIPolicy :: String -> IPolicy -> String
134 134
serializeIPolicy owner ipol =
135
  let IPolicy stdspec minspec maxspec dts vcpu_ratio spindle_ratio = ipol
135
  let IPolicy minmax stdspec dts vcpu_ratio spindle_ratio = ipol
136
      MinMaxISpecs minspec maxspec = minmax
136 137
      strings = [ owner
137 138
                , serializeISpec stdspec
138 139
                , serializeISpec minspec
......
263 264
  xvcpu_ratio <- tryRead (owner ++ "/vcpu_ratio") vcpu_ratio
264 265
  xspindle_ratio <- tryRead (owner ++ "/spindle_ratio") spindle_ratio
265 266
  return (owner,
266
          IPolicy xstdspec xminspec xmaxspec xdts xvcpu_ratio xspindle_ratio)
267
          IPolicy (MinMaxISpecs xminspec xmaxspec) xstdspec
268
                xdts xvcpu_ratio xspindle_ratio)
267 269
loadIPolicy s = fail $ "Invalid ipolicy data: '" ++ show s ++ "'"
268 270

  
269 271
loadOnePolicy :: (IPolicy, Group.List) -> String

Also available in: Unified diff