Commit 879d9290 authored by Iustin Pop's avatar Iustin Pop
Browse files

Move htools backends to a separate directory



Five modules under the HTools/ directories are backend
implementations, so let's move them to a separate directory, to more
clearly show the hierarchy. I wanted to do this for a while, but
merging between branches is always an issue, so let's do it know since
we have an opportunity.

This patch contains the actual renames, the required changed module
names, imports, etc., but no other changes.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 5c03bcea
......@@ -59,6 +59,7 @@ HTOOLS_DIRS = \
htools/Ganeti \
htools/Ganeti/Confd \
htools/Ganeti/HTools \
htools/Ganeti/HTools/Backend \
htools/Ganeti/HTools/Program \
htools/Ganeti/Query \
htest \
......@@ -66,6 +67,7 @@ HTOOLS_DIRS = \
htest/Test/Ganeti \
htest/Test/Ganeti/Confd \
htest/Test/Ganeti/HTools \
htest/Test/Ganeti/HTools/Backend \
htest/Test/Ganeti/Query
DIRS = \
......@@ -108,6 +110,7 @@ BUILDTIME_DIR_AUTOCREATE = \
$(APIDOC_HS_DIR)/Ganeti \
$(APIDOC_HS_DIR)/Ganeti/Confd \
$(APIDOC_HS_DIR)/Ganeti/HTools \
$(APIDOC_HS_DIR)/Ganeti/HTools/Backend \
$(APIDOC_HS_DIR)/Ganeti/HTools/Program \
$(APIDOC_HS_DIR)/Ganeti/Query \
$(APIDOC_PY_DIR) \
......@@ -426,15 +429,18 @@ HS_LIB_SRCS = \
htools/Ganeti/Config.hs \
htools/Ganeti/Daemon.hs \
htools/Ganeti/Errors.hs \
htools/Ganeti/HTools/Backend/IAlloc.hs \
htools/Ganeti/HTools/Backend/Luxi.hs \
htools/Ganeti/HTools/Backend/Rapi.hs \
htools/Ganeti/HTools/Backend/Simu.hs \
htools/Ganeti/HTools/Backend/Text.hs \
htools/Ganeti/HTools/CLI.hs \
htools/Ganeti/HTools/Cluster.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/Loader.hs \
htools/Ganeti/HTools/Luxi.hs \
htools/Ganeti/HTools/Node.hs \
htools/Ganeti/HTools/PeerMap.hs \
htools/Ganeti/HTools/Program.hs \
......@@ -444,9 +450,6 @@ HS_LIB_SRCS = \
htools/Ganeti/HTools/Program/Hinfo.hs \
htools/Ganeti/HTools/Program/Hscan.hs \
htools/Ganeti/HTools/Program/Hspace.hs \
htools/Ganeti/HTools/Rapi.hs \
htools/Ganeti/HTools/Simu.hs \
htools/Ganeti/HTools/Text.hs \
htools/Ganeti/HTools/Types.hs \
htools/Ganeti/Hash.hs \
htools/Ganeti/JSON.hs \
......@@ -476,6 +479,8 @@ HS_TEST_SRCS = \
htest/Test/Ganeti/Confd/Utils.hs \
htest/Test/Ganeti/Daemon.hs \
htest/Test/Ganeti/Errors.hs \
htest/Test/Ganeti/HTools/Backend/Simu.hs \
htest/Test/Ganeti/HTools/Backend/Text.hs \
htest/Test/Ganeti/HTools/CLI.hs \
htest/Test/Ganeti/HTools/Cluster.hs \
htest/Test/Ganeti/HTools/Container.hs \
......@@ -483,8 +488,6 @@ HS_TEST_SRCS = \
htest/Test/Ganeti/HTools/Loader.hs \
htest/Test/Ganeti/HTools/Node.hs \
htest/Test/Ganeti/HTools/PeerMap.hs \
htest/Test/Ganeti/HTools/Simu.hs \
htest/Test/Ganeti/HTools/Text.hs \
htest/Test/Ganeti/HTools/Types.hs \
htest/Test/Ganeti/JSON.hs \
htest/Test/Ganeti/Jobs.hs \
......@@ -1600,6 +1603,7 @@ hs-apidoc: $(HS_BUILT_SRCS)
@test -n "$(HADDOCK)" || \
{ echo 'haddock' not found during configure; exit 1; }
rm -rf $(APIDOC_HS_DIR)/*
@mkdir_p@ $(APIDOC_HS_DIR)/Ganeti/HTools/Backend
@mkdir_p@ $(APIDOC_HS_DIR)/Ganeti/HTools/Program
@mkdir_p@ $(APIDOC_HS_DIR)/Ganeti/Confd
@mkdir_p@ $(APIDOC_HS_DIR)/Ganeti/Query
......
......@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Test.Ganeti.HTools.Simu (testHTools_Simu) where
module Test.Ganeti.HTools.Backend.Simu (testHTools_Backend_Simu) where
import Test.QuickCheck hiding (Result)
......@@ -39,11 +39,11 @@ import Test.Ganeti.TestCommon
import Ganeti.BasicTypes
import qualified Ganeti.Constants as C
import qualified Ganeti.HTools.Backend.Simu as Simu
import qualified Ganeti.HTools.Container as Container
import qualified Ganeti.HTools.Group as Group
import qualified Ganeti.HTools.Loader as Loader
import qualified Ganeti.HTools.Node as Node
import qualified Ganeti.HTools.Simu as Simu
import qualified Ganeti.HTools.Types as Types
-- | Generates a tuple of specs for simulation.
......@@ -93,6 +93,6 @@ prop_Load =
replicate ngroups Types.defIPolicy
]
testSuite "HTools/Simu"
testSuite "HTools/Backend/Simu"
[ 'prop_Load
]
......@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Test.Ganeti.HTools.Text (testHTools_Text) where
module Test.Ganeti.HTools.Backend.Text (testHTools_Backend_Text) where
import Test.QuickCheck
......@@ -41,13 +41,13 @@ import Test.Ganeti.HTools.Instance (genInstanceSmallerThanNode)
import Test.Ganeti.HTools.Node (genNode, genOnlineNode)
import Ganeti.BasicTypes
import qualified Ganeti.HTools.Backend.Text as Text
import qualified Ganeti.HTools.Cluster as Cluster
import qualified Ganeti.HTools.Container as Container
import qualified Ganeti.HTools.Group as Group
import qualified Ganeti.HTools.Instance as Instance
import qualified Ganeti.HTools.Loader as Loader
import qualified Ganeti.HTools.Node as Node
import qualified Ganeti.HTools.Text as Text
import qualified Ganeti.HTools.Types as Types
import qualified Ganeti.Utils as Utils
......@@ -201,7 +201,7 @@ prop_CreateSerialise =
, nl' ==? nl2
]
testSuite "HTools/Text"
testSuite "HTools/Backend/Text"
[ 'prop_Load_Instance
, 'prop_Load_InstanceFail
, 'prop_Load_Node
......
......@@ -41,10 +41,10 @@ import Test.Ganeti.HTools.Instance ( genInstanceSmallerThanNode
import Test.Ganeti.HTools.Node (genOnlineNode, genNode)
import Ganeti.BasicTypes
import qualified Ganeti.HTools.Backend.IAlloc as IAlloc
import qualified Ganeti.HTools.Cluster as Cluster
import qualified Ganeti.HTools.Container as Container
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.Node as Node
import qualified Ganeti.HTools.Types as Types
......
......@@ -35,6 +35,8 @@ import Test.Ganeti.Common
import Test.Ganeti.Confd.Utils
import Test.Ganeti.Daemon
import Test.Ganeti.Errors
import Test.Ganeti.HTools.Backend.Simu
import Test.Ganeti.HTools.Backend.Text
import Test.Ganeti.HTools.CLI
import Test.Ganeti.HTools.Cluster
import Test.Ganeti.HTools.Container
......@@ -42,8 +44,6 @@ import Test.Ganeti.HTools.Instance
import Test.Ganeti.HTools.Loader
import Test.Ganeti.HTools.Node
import Test.Ganeti.HTools.PeerMap
import Test.Ganeti.HTools.Simu
import Test.Ganeti.HTools.Text
import Test.Ganeti.HTools.Types
import Test.Ganeti.JSON
import Test.Ganeti.Jobs
......@@ -78,6 +78,8 @@ allTests =
, testConfd_Utils
, testDaemon
, testErrors
, testHTools_Backend_Simu
, testHTools_Backend_Text
, testHTools_CLI
, testHTools_Cluster
, testHTools_Container
......@@ -85,8 +87,6 @@ allTests =
, testHTools_Loader
, testHTools_Node
, testHTools_PeerMap
, testHTools_Simu
, testHTools_Text
, testHTools_Types
, testJSON
, testJobs
......
......@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Ganeti.HTools.IAlloc
module Ganeti.HTools.Backend.IAlloc
( readRequest
, runIAllocator
, processRelocate
......
......@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Ganeti.HTools.Luxi
module Ganeti.HTools.Backend.Luxi
( loadData
, parseData
) where
......
......@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
{-# LANGUAGE BangPatterns, CPP #-}
module Ganeti.HTools.Rapi
module Ganeti.HTools.Backend.Rapi
( loadData
, parseData
) where
......
......@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Ganeti.HTools.Simu
module Ganeti.HTools.Backend.Simu
( loadData
, parseData
) where
......
......@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-}
module Ganeti.HTools.Text
module Ganeti.HTools.Backend.Text
( loadData
, parseData
, loadInst
......
......@@ -41,11 +41,11 @@ import System.FilePath
import System.IO
import Text.Printf (hPrintf)
import qualified Ganeti.HTools.Luxi as Luxi
import qualified Ganeti.HTools.Rapi as Rapi
import qualified Ganeti.HTools.Simu as Simu
import qualified Ganeti.HTools.Text as Text
import qualified Ganeti.HTools.IAlloc as IAlloc
import qualified Ganeti.HTools.Backend.Luxi as Luxi
import qualified Ganeti.HTools.Backend.Rapi as Rapi
import qualified Ganeti.HTools.Backend.Simu as Simu
import qualified Ganeti.HTools.Backend.Text as Text
import qualified Ganeti.HTools.Backend.IAlloc as IAlloc
import Ganeti.HTools.Loader (mergeData, checkData, ClusterData(..)
, commonSuffix)
......
......@@ -37,7 +37,7 @@ import qualified Ganeti.HTools.Cluster as Cluster
import Ganeti.Common
import Ganeti.HTools.CLI
import Ganeti.HTools.IAlloc
import Ganeti.HTools.Backend.IAlloc
import Ganeti.HTools.Loader (Request(..), ClusterData(..))
import Ganeti.HTools.ExtLoader (maybeSaveData, loadExternalData)
import Ganeti.Utils
......
......@@ -42,11 +42,11 @@ import qualified Ganeti.HTools.Container as Container
import qualified Ganeti.HTools.Cluster as Cluster
import qualified Ganeti.HTools.Node as Node
import qualified Ganeti.HTools.Instance as Instance
import qualified Ganeti.HTools.Rapi as Rapi
import qualified Ganeti.HTools.Luxi as Luxi
import qualified Ganeti.HTools.Backend.Rapi as Rapi
import qualified Ganeti.HTools.Backend.Luxi as Luxi
import qualified Ganeti.Path as Path
import Ganeti.HTools.Loader (checkData, mergeData, ClusterData(..))
import Ganeti.HTools.Text (serializeCluster)
import Ganeti.HTools.Backend.Text (serializeCluster)
import Ganeti.Common
import Ganeti.HTools.CLI
......
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