Commit f3baf5ef authored by Iustin Pop's avatar Iustin Pop
Browse files

Move JSON.hs and Compat.hs out from under HTools/



These two files are not htools-specific, so let's move them out of the
HTools subdirectory/module hierarchy and directly under Ganeti.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent e1ee7d5a
......@@ -387,13 +387,11 @@ HPCEXCL = --exclude Main \
HS_LIB_SRCS = \
htools/Ganeti/HTools/CLI.hs \
htools/Ganeti/HTools/Cluster.hs \
htools/Ganeti/HTools/Compat.hs \
htools/Ganeti/HTools/Container.hs \
htools/Ganeti/HTools/ExtLoader.hs \
htools/Ganeti/HTools/Group.hs \
htools/Ganeti/HTools/IAlloc.hs \
htools/Ganeti/HTools/Instance.hs \
htools/Ganeti/HTools/JSON.hs \
htools/Ganeti/HTools/Loader.hs \
htools/Ganeti/HTools/Luxi.hs \
htools/Ganeti/HTools/Node.hs \
......@@ -412,6 +410,7 @@ HS_LIB_SRCS = \
htools/Ganeti/HTools/Program/Hscan.hs \
htools/Ganeti/HTools/Program/Hspace.hs \
htools/Ganeti/BasicTypes.hs \
htools/Ganeti/Compat.hs \
htools/Ganeti/Confd.hs \
htools/Ganeti/Confd/Server.hs \
htools/Ganeti/Confd/Utils.hs \
......@@ -419,6 +418,7 @@ HS_LIB_SRCS = \
htools/Ganeti/Daemon.hs \
htools/Ganeti/Hash.hs \
htools/Ganeti/Jobs.hs \
htools/Ganeti/JSON.hs \
htools/Ganeti/Logging.hs \
htools/Ganeti/Luxi.hs \
htools/Ganeti/Objects.hs \
......
......@@ -35,7 +35,7 @@ import qualified Text.JSON as J
import Test.Ganeti.TestHelper
import Test.Ganeti.TestCommon
import qualified Ganeti.HTools.JSON as JSON
import qualified Ganeti.JSON as JSON
import qualified Ganeti.HTools.Types as Types
import qualified Ganeti.HTools.Utils as Utils
......
......@@ -9,7 +9,7 @@ library versions or transitions between versions.
{-
Copyright (C) 2011 Google Inc.
Copyright (C) 2011, 2012 Google Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Ganeti.HTools.Compat
module Ganeti.Compat
( rwhnf
, Control.Parallel.Strategies.parMap
) where
......
......@@ -50,7 +50,7 @@ import Text.JSON
import qualified Ganeti.Constants as C
import Ganeti.THH
import Ganeti.HTools.JSON
import Ganeti.JSON
{-
Note that we re-export as is from Constants the following simple items:
......
......@@ -45,7 +45,7 @@ import qualified Text.JSON as J
import System.INotify
import Ganeti.Daemon
import Ganeti.HTools.JSON
import Ganeti.JSON
import Ganeti.HTools.Types
import Ganeti.HTools.Utils
import Ganeti.Objects
......
......@@ -40,7 +40,7 @@ import Ganeti.BasicTypes
import Ganeti.Confd
import Ganeti.Hash
import qualified Ganeti.Constants as C
import Ganeti.HTools.JSON
import Ganeti.JSON
import Ganeti.HTools.Utils
-- | Returns the HMAC key.
......
......@@ -49,7 +49,7 @@ import qualified Data.Map as M
import qualified Data.Set as S
import qualified Text.JSON as J
import Ganeti.HTools.JSON
import Ganeti.JSON
import Ganeti.BasicTypes
import qualified Ganeti.Constants as C
......
......@@ -87,7 +87,7 @@ import qualified Ganeti.HTools.Node as Node
import qualified Ganeti.HTools.Group as Group
import Ganeti.HTools.Types
import Ganeti.HTools.Utils
import Ganeti.HTools.Compat
import Ganeti.Compat
import qualified Ganeti.OpCodes as OpCodes
-- * Types
......
......@@ -47,8 +47,8 @@ import qualified Ganeti.HTools.Instance as Instance
import qualified Ganeti.Constants as C
import Ganeti.HTools.CLI
import Ganeti.HTools.Loader
import Ganeti.HTools.JSON
import Ganeti.HTools.Types
import Ganeti.JSON
{-# ANN module "HLint: ignore Eta reduce" #-}
......
......@@ -39,7 +39,7 @@ import Ganeti.HTools.Types
import qualified Ganeti.HTools.Group as Group
import qualified Ganeti.HTools.Node as Node
import qualified Ganeti.HTools.Instance as Instance
import Ganeti.HTools.JSON
import Ganeti.JSON
{-# ANN module "HLint: ignore Eta reduce" #-}
......
......@@ -79,7 +79,7 @@ import qualified Ganeti.HTools.ExtLoader
import qualified Ganeti.HTools.Group as Group
import qualified Ganeti.HTools.IAlloc as IAlloc
import qualified Ganeti.HTools.Instance as Instance
import qualified Ganeti.HTools.JSON as JSON
import qualified Ganeti.JSON as JSON
import qualified Ganeti.HTools.Loader as Loader
import qualified Ganeti.HTools.Luxi as HTools.Luxi
import qualified Ganeti.HTools.Node as Node
......
......@@ -46,7 +46,7 @@ import System.FilePath
import Ganeti.HTools.Loader
import Ganeti.HTools.Types
import Ganeti.HTools.JSON
import Ganeti.JSON
import qualified Ganeti.HTools.Group as Group
import qualified Ganeti.HTools.Node as Node
import qualified Ganeti.HTools.Instance as Instance
......
......@@ -87,7 +87,7 @@ import Text.JSON (makeObj, readJSON, showJSON)
import qualified Ganeti.Constants as C
import qualified Ganeti.THH as THH
import Ganeti.BasicTypes
import Ganeti.HTools.JSON
import Ganeti.JSON
-- | The instance index type.
type Idx = Int
......
......@@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Ganeti.HTools.JSON
module Ganeti.JSON
( fromJResult
, readEitherString
, JSRecord
......
......@@ -67,7 +67,7 @@ import System.IO.Error (isEOFError)
import System.Timeout
import qualified Network.Socket as S
import Ganeti.HTools.JSON
import Ganeti.JSON
import Ganeti.HTools.Types
import Ganeti.HTools.Utils
......
......@@ -96,7 +96,7 @@ import Text.JSON (makeObj, showJSON, readJSON, JSON, JSValue(..))
import qualified Text.JSON as J
import qualified Ganeti.Constants as C
import Ganeti.HTools.JSON
import Ganeti.JSON
import Ganeti.THH
......
......@@ -40,7 +40,7 @@ import Text.JSON (readJSON, showJSON, makeObj, JSON)
import qualified Ganeti.Constants as C
import Ganeti.THH
import Ganeti.HTools.JSON
import Ganeti.JSON
-- | Replace disks type.
$(declareSADT "ReplaceDisksMode"
......
......@@ -60,7 +60,7 @@ import Ganeti.BasicTypes
import Ganeti.Objects
import Ganeti.Query.Language
import Ganeti.Query.Types
import Ganeti.HTools.JSON
import Ganeti.JSON
-- | Compiles a filter based on field names to one based on getters.
compileFilter :: FieldMap a b
......
......@@ -61,7 +61,7 @@ import qualified Text.Regex.PCRE as PCRE
import qualified Ganeti.Constants as C
import Ganeti.THH
import Ganeti.HTools.JSON
import Ganeti.JSON
-- * THH declarations, that require ordering.
......
......@@ -55,7 +55,7 @@ import Data.Maybe (fromMaybe)
import qualified Data.Map as Map
import Ganeti.BasicTypes
import Ganeti.HTools.JSON
import Ganeti.JSON
import Ganeti.Query.Language
import Ganeti.Query.Common
import Ganeti.Query.Filter
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment