Revision 19f38ee8 Ganeti/HTools/IAlloc.hs

b/Ganeti/HTools/IAlloc.hs
3 3
-}
4 4

  
5 5
module Ganeti.HTools.IAlloc
6
    (
7
      parseData
6
    ( parseData
8 7
    , formatResponse
9
    , RqType(..)
10
    , Request(..)
11 8
    ) where
12 9

  
13 10
import Data.Either ()
......
22 19
import Ganeti.HTools.Utils
23 20
import Ganeti.HTools.Types
24 21

  
25
-- | The request type.
26
data RqType
27
    = Allocate Instance.Instance Int -- ^ A new instance allocation
28
    | Relocate Idx Int [Ndx]         -- ^ Move an instance to a new
29
                                     -- secondary node
30
    deriving (Show)
31

  
32
-- | A complete request, as received from Ganeti.
33
data Request = Request RqType Node.List Instance.List String
34
    deriving (Show)
35

  
36 22
-- | Parse the basic specifications of an instance.
37 23
--
38 24
-- Instances in the cluster instance list and the instance in an

Also available in: Unified diff