>  -- | Gets all logical volumes in the cluster
> @@ -148,16 +163,85 @@ addInstanceChecks inst replace cs = do
>      (show $ instName inst) (show macsInUse)
>    if replace
>      then do
> -      let check = checkUUIDpresent cs inst
> -      unless check . Bad . ConfigurationError $ printf
> +      unless (checkUUIDpresent cs inst) . Bad . ConfigurationError $ printf
>               "Cannot add %s: UUID %s already in use"
>               (show $ instName inst) (instUuid inst)
>      else do
> -      let check = checkUniqueUUID cs inst
> -      unless check . Bad . ConfigurationError $ printf
> +      unless (checkUniqueUUID cs inst) . Bad . ConfigurationError $ printf
>               "Cannot replace %s: UUID %s not present"
>               (show $ instName inst) (instUuid inst)
>

These two changes seem to be unrelated to the rest of the patch.
So, if at all (usually we fix bad style only when we change that
function anyway to avoid merge conflicts), it should go in a separate
patch.


> +  if replace
> +    then do
> +      unless (checkUUIDpresent cs disk) . Bad . ConfigurationError $ printf
> +             "Cannot add %s: UUID %s already in use"
> +             (show $ diskName disk) (diskUuid disk)
> +    else [...]

Please fix the lint error (e.g., here "redundant do").


Rest looks good.

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to