LGTM, thanks

On Tue, 16 Jun 2015 at 18:11 'Klaus Aehlig' via ganeti-devel <
[email protected]> wrote:

> The corresponding optional values in python are encoded in
> the poor-man's-Maybe way, i.e., null for Nothing and unmodified
> for Just.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  src/Ganeti/WConfd/ConfigModifications.hs | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/Ganeti/WConfd/ConfigModifications.hs
> b/src/Ganeti/WConfd/ConfigModifications.hs
> index 1aa05e2..f724c2e 100644
> --- a/src/Ganeti/WConfd/ConfigModifications.hs
> +++ b/src/Ganeti/WConfd/ConfigModifications.hs
> @@ -533,15 +533,15 @@ addTcpUdpPort port =
>
>  -- | Set the instances' status to a given value.
>  setInstanceStatus :: InstanceUUID
> -                  -> Maybe AdminState
> -                  -> Maybe Bool
> -                  -> Maybe AdminStateSource
> +                  -> MaybeForJSON AdminState
> +                  -> MaybeForJSON Bool
> +                  -> MaybeForJSON AdminStateSource
>                    -> WConfdMonad (MaybeForJSON Instance)
>  setInstanceStatus iUuid m1 m2 m3 = do
>    ct <- liftIO getClockTime
> -  let modifyInstance = maybe id (instAdminStateL .~) m1
> -                     . maybe id (instDisksActiveL .~) m2
> -                     . maybe id (instAdminStateSourceL .~) m3
> +  let modifyInstance = maybe id (instAdminStateL .~) (unMaybeForJSON m1)
> +                     . maybe id (instDisksActiveL .~) (unMaybeForJSON m2)
> +                     . maybe id (instAdminStateSourceL .~)
> (unMaybeForJSON m3)
>        reviseInstance = (instSerialL %~ (+1))
>                       . (instMtimeL .~ ct)
>
> --
> 2.2.0.rc0.207.ga3a616c
>
>

Reply via email to