commit d3bb85f6b7790e813fba37356c9ed57f8475c729
Merge: 963eff9 21a6f27
Author: Hrvoje Ribicic <[email protected]>
Date:   Fri Jun 19 15:06:20 2015 +0000

    Merge branch 'stable-2.12' into stable-2.13

    * stable-2.12
      Fix name of filter-evaluation function
      Call the filter again with runtime data this time
      Fix user and group ordering in test

    Conflicts:
        src/Ganeti/Query/Query.hs

    Resolution:
        Query.hs: Used function that exists in 2.13

    Signed-off-by: Hrvoje Ribicic <[email protected]>

diff --cc src/Ganeti/Query/Query.hs
index 21e178b,09cadf9..6c34ebe
--- a/src/Ganeti/Query/Query.hs
+++ b/src/Ganeti/Query/Query.hs
@@@ -229,12 -228,14 +229,14 @@@ genericQuery fieldsMap collector nameF
    -- Run the first pass of the filter, without a runtime context; this
will
    -- limit the objects that we'll contact for exports
    fobjects <- toError $
 -    filterM (\n -> evaluateFilter cfg Nothing n cfilter) objects
 +    filterM (\n -> evaluateQueryFilter cfg Nothing n cfilter) objects
-   -- Gather the runtime data
-   runtimes <- case collector of
+   -- Gather the runtime data and filter the results again,
+   -- based on the gathered data
+   runtimes <- (case collector of
      CollectorSimple     collFn -> lift $ collFn live' cfg fobjects
-     CollectorFieldAware collFn -> lift $ collFn live' cfg fields fobjects
-   -- Filter the results again, based on the gathered data
+     CollectorFieldAware collFn -> lift $ collFn live' cfg fields
fobjects) >>=
+     (toError . filterM (\(obj, runtime) ->
 -      evaluateFilter cfg (Just runtime) obj cfilter))
++      evaluateQueryFilter cfg (Just runtime) obj cfilter))
    let fdata = map (\(obj, runtime) ->
                       map (execGetter cfg runtime obj) fgetters)
                runtimes

Hrvoje Ribicic
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München

Geschäftsführer: Graham Law, Christine Elizabeth Flores
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Reply via email to