Commit 89c758c6 authored by Iustin Pop's avatar Iustin Pop
Browse files

Move DiskTemplate definition around



This is needed since we'll need the DiskTemplate definition in the
IPolicy one.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 2cc673a3
......@@ -111,6 +111,17 @@ type GroupID = String
defaultGroupID :: GroupID
defaultGroupID = "00000000-0000-0000-0000-000000000000"
-- | Instance disk template type.
$(THH.declareSADT "DiskTemplate"
[ ("DTDiskless", 'C.dtDiskless)
, ("DTFile", 'C.dtFile)
, ("DTSharedFile", 'C.dtSharedFile)
, ("DTPlain", 'C.dtPlain)
, ("DTBlock", 'C.dtBlock)
, ("DTDrbd8", 'C.dtDrbd8)
])
$(THH.makeJSONInstance ''DiskTemplate)
-- | The Group allocation policy type.
--
-- Note that the order of constructors is important as the automatic
......@@ -245,17 +256,6 @@ data IMove = Failover -- ^ Failover the instance (f)
| FailoverAndReplace Ndx -- ^ Failover, replace secondary (f, r:ns)
deriving (Show, Read)
-- | Instance disk template type.
$(THH.declareSADT "DiskTemplate"
[ ("DTDiskless", 'C.dtDiskless)
, ("DTFile", 'C.dtFile)
, ("DTSharedFile", 'C.dtSharedFile)
, ("DTPlain", 'C.dtPlain)
, ("DTBlock", 'C.dtBlock)
, ("DTDrbd8", 'C.dtDrbd8)
])
$(THH.makeJSONInstance ''DiskTemplate)
-- | Formatted solution output for one move (involved nodes and
-- commands.
type MoveJob = ([Ndx], Idx, IMove, [String])
......
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