With the introduction of forthcoming objects we also want to support queries for the property of being forthcoming.
Signed-off-by: Klaus Aehlig <[email protected]> --- src/Ganeti/Query/Common.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Ganeti/Query/Common.hs b/src/Ganeti/Query/Common.hs index 378e6b0..133fcf3 100644 --- a/src/Ganeti/Query/Common.hs +++ b/src/Ganeti/Query/Common.hs @@ -47,6 +47,7 @@ module Ganeti.Query.Common , timeStampFields , uuidFields , serialFields + , forthcomingFields , tagsFields , dictFieldGetter , buildNdParamField @@ -161,6 +162,15 @@ timeStampFields = FieldSimple (rsNormal . TimeAsDoubleJSON . mTimeOf), QffNormal) ] +-- | The list of the field for the property of being forthcoming. +forthcomingFields :: (ForthcomingObject a) => String -> FieldList a b +forthcomingFields name = + [ ( FieldDefinition "forthcoming" "Forthcoming" QFTBool + $ "whether the " ++ name ++ " is forthcoming" + , FieldSimple (rsNormal . isForthcoming), QffNormal + ) + ] + -- | The list of UUID fields. uuidFields :: (UuidObject a) => String -> FieldList a b uuidFields name = -- 2.2.0.rc0.207.ga3a616c
