Revision d067f40b src/Ganeti/Types.hs
b/src/Ganeti/Types.hs | ||
---|---|---|
82 | 82 |
, oobStatusToRaw |
83 | 83 |
, StorageType(..) |
84 | 84 |
, storageTypeToRaw |
85 |
, NodeEvacMode(..)
|
|
86 |
, nodeEvacModeToRaw
|
|
85 |
, EvacMode(..) |
|
86 |
, evacModeToRaw
|
|
87 | 87 |
, FileDriver(..) |
88 | 88 |
, fileDriverToRaw |
89 | 89 |
, InstCreateMode(..) |
... | ... | |
512 | 512 |
addParamsToStorageUnit _ (SURaw StorageRados key) = SURados key |
513 | 513 |
|
514 | 514 |
-- | Node evac modes. |
515 |
$(THH.declareLADT ''String "NodeEvacMode" |
|
516 |
[ ("NEvacPrimary", "primary-only") |
|
517 |
, ("NEvacSecondary", "secondary-only") |
|
518 |
, ("NEvacAll", "all") |
|
515 |
-- |
|
516 |
-- This is part of the 'IAllocator' interface and it is used, for |
|
517 |
-- example, in 'Ganeti.HTools.Loader.RqType'. However, it must reside |
|
518 |
-- in this module, and not in 'Ganeti.HTools.Types', because it is |
|
519 |
-- also used by 'Ganeti.HsConstants'. |
|
520 |
$(THH.declareLADT ''String "EvacMode" |
|
521 |
[ ("ChangePrimary", "primary-only") |
|
522 |
, ("ChangeSecondary", "secondary-only") |
|
523 |
, ("ChangeAll", "all") |
|
519 | 524 |
]) |
520 |
$(THH.makeJSONInstance ''NodeEvacMode)
|
|
525 |
$(THH.makeJSONInstance ''EvacMode) |
|
521 | 526 |
|
522 | 527 |
-- | The file driver type. |
523 | 528 |
$(THH.declareLADT ''String "FileDriver" |
Also available in: Unified diff