LGTM, Thanks

On Thu, Dec 12, 2013 at 5:20 PM, Klaus Aehlig <[email protected]> wrote:

> Make luxid handle SetWatcherPause correctly.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  src/Ganeti/Query/Server.hs | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/src/Ganeti/Query/Server.hs b/src/Ganeti/Query/Server.hs
> index e8993eb..e44ed88 100644
> --- a/src/Ganeti/Query/Server.hs
> +++ b/src/Ganeti/Query/Server.hs
> @@ -56,6 +56,7 @@ import Ganeti.Luxi
>  import qualified Ganeti.Query.Language as Qlang
>  import qualified Ganeti.Query.Cluster as QCluster
>  import Ganeti.Path (queueDir, jobQueueLockFile)
> +import Ganeti.Rpc
>  import Ganeti.Query.Query
>  import Ganeti.Query.Filter (makeSimpleFilter)
>  import Ganeti.Types
> @@ -268,6 +269,14 @@ handleCall _ _ cfg (WaitForJobChange jid fields
> prev_job prev_log tmout) = do
>        return . Ok $ showJSON answer
>      _ -> liftM (Ok . showJSON) compute_fn
>
> +handleCall _ _ cfg (SetWatcherPause time) = do
> +  let mcs = Config.getMasterCandidates cfg
> +      masters = genericResult (const []) return
> +                  . Config.getNode cfg . clusterMasterNode
> +                  $ configCluster cfg
> +  _ <- executeRpcCall (masters ++ mcs) $ RpcCallSetWatcherPause time
> +  return . Ok . maybe JSNull showJSON $ time
> +
>  handleCall _ _ _ op =
>    return . Bad $
>      GenericError ("Luxi call '" ++ strOfOp op ++ "' not implemented")
> --
> 1.8.5.1
>
>

Reply via email to