On Tue, Dec 21, 2010 at 16:35, Iustin Pop <ius...@google.com> wrote:

> This will be used to hold all the disparate uses of the cluster data:
> we have either tuples with these four elements, or functions taking
> these four arguments, etc.
> ---
>  Ganeti/HTools/Loader.hs |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
>
> diff --git a/Ganeti/HTools/Loader.hs b/Ganeti/HTools/Loader.hs
> index b7c74a0..81ccbfe 100644
> --- a/Ganeti/HTools/Loader.hs
> +++ b/Ganeti/HTools/Loader.hs
> @@ -36,6 +36,8 @@ module Ganeti.HTools.Loader
>     , commonSuffix
>     , RqType(..)
>     , Request(..)
> +    , ClusterData(..)
> +    , emptyCluster
>     ) where
>
>  import Data.List
> @@ -74,6 +76,18 @@ data RqType
>  data Request = Request RqType Group.List Node.List Instance.List [String]
>     deriving (Show)
>
> +-- | The cluster state.
> +data ClusterData = ClusterData
> +    { cdGroups    :: Group.List    -- ^ The node group list
> +    , cdNodes     :: Node.List     -- ^ The node list
> +    , cdInstances :: Instance.List -- ^ The instance list
> +    , cdTags      :: [String]      -- ^ The cluster tags
> +    } deriving (Show)
> +
> +-- | An empty cluster.
> +emptyCluster :: ClusterData
> +emptyCluster = ClusterData Container.empty Container.empty Container.empty
> []
> +
>  -- * Functions
>
>  -- | Lookups a node into an assoc list.
> --
> 1.7.3.1
>
>
LGTM

Reply via email to