Revision a3f02317 htools/Ganeti/Types.hs

b/htools/Ganeti/Types.hs
64 64
  , InstCreateMode(..)
65 65
  , RebootType(..)
66 66
  , ExportMode(..)
67
  , IAllocatorTestDir(..)
68
  , IAllocatorMode(..)
69
  , iAllocatorModeToRaw
67 70
  ) where
68 71

  
69 72
import qualified Text.JSON as JSON
......
294 297
  , ("ExportModeRemove", 'C.exportModeRemote)
295 298
  ])
296 299
$(THH.makeJSONInstance ''ExportMode)
300

  
301
-- | IAllocator run types (OpTestIAllocator).
302
$(THH.declareSADT "IAllocatorTestDir"
303
  [ ("IAllocatorDirIn",  'C.iallocatorDirIn)
304
  , ("IAllocatorDirOut", 'C.iallocatorDirOut)
305
  ])
306
$(THH.makeJSONInstance ''IAllocatorTestDir)
307

  
308
-- | IAllocator mode. FIXME: use this in "HTools.Backend.IAlloc".
309
$(THH.declareSADT "IAllocatorMode"
310
  [ ("IAllocatorAlloc",       'C.iallocatorModeAlloc)
311
  , ("IAllocatorMultiAlloc",  'C.iallocatorModeMultiAlloc)
312
  , ("IAllocatorReloc",       'C.iallocatorModeReloc)
313
  , ("IAllocatorNodeEvac",    'C.iallocatorModeNodeEvac)
314
  , ("IAllocatorChangeGroup", 'C.iallocatorModeChgGroup)
315
  ])
316
$(THH.makeJSONInstance ''IAllocatorMode)

Also available in: Unified diff