Revision da5f09ef src/Ganeti/HTools/Instance.hs

b/src/Ganeti/HTools/Instance.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
......
280 280
-- | Checks if an instance matches a policy.
281 281
instMatchesPolicy :: Instance -> T.IPolicy -> T.OpResult ()
282 282
instMatchesPolicy inst ipol = do
283
  instAboveISpec inst (T.iPolicyMinSpec ipol)
284
  instBelowISpec inst (T.iPolicyMaxSpec ipol)
283
  let minmax = T.iPolicyMinMaxISpecs ipol
284
  instAboveISpec inst (T.minMaxISpecsMinSpec minmax)
285
  instBelowISpec inst (T.minMaxISpecsMaxSpec minmax)
285 286
  if diskTemplate inst `elem` T.iPolicyDiskTemplates ipol
286 287
    then Ok ()
287 288
    else Bad T.FailDisk

Also available in: Unified diff