Safe Haskell | None |
---|
Ganeti.Types
Contents
Description
- newtype NonNegative a = NonNegative {
- fromNonNegative :: a
- mkNonNegative :: (Monad m, Num a, Ord a, Show a) => a -> m (NonNegative a)
- newtype Positive a = Positive {
- fromPositive :: a
- mkPositive :: (Monad m, Num a, Ord a, Show a) => a -> m (Positive a)
- newtype Negative a = Negative {
- fromNegative :: a
- mkNegative :: (Monad m, Num a, Ord a, Show a) => a -> m (Negative a)
- newtype NonEmpty a = NonEmpty {
- fromNonEmpty :: [a]
- mkNonEmpty :: Monad m => [a] -> m (NonEmpty a)
- type NonEmptyString = NonEmpty Char
- data DiskTemplate
- = DTDiskless
- | DTFile
- | DTSharedFile
- | DTPlain
- | DTBlock
- | DTDrbd8
- | DTRbd
- | DTExt
- diskTemplateFromRaw :: forall m. Monad m => String -> m DiskTemplate
- diskTemplateToRaw :: DiskTemplate -> String
- data AllocPolicy
- allocPolicyFromRaw :: forall m. Monad m => String -> m AllocPolicy
- allocPolicyToRaw :: AllocPolicy -> String
- data InstanceStatus
- = StatusDown
- | StatusOffline
- | ErrorDown
- | ErrorUp
- | NodeDown
- | NodeOffline
- | Running
- | WrongNode
- instanceStatusFromRaw :: forall m. Monad m => String -> m InstanceStatus
- instanceStatusToRaw :: InstanceStatus -> String
- data MigrationMode
- migrationModeFromRaw :: forall m. Monad m => String -> m MigrationMode
- migrationModeToRaw :: MigrationMode -> String
- data VerifyOptionalChecks = VerifyNPlusOneMem
- verifyOptionalChecksFromRaw :: forall m. Monad m => String -> m VerifyOptionalChecks
- verifyOptionalChecksToRaw :: VerifyOptionalChecks -> String
- data CVErrorCode
- = CvECLUSTERCFG
- | CvECLUSTERCERT
- | CvECLUSTERFILECHECK
- | CvECLUSTERDANGLINGNODES
- | CvECLUSTERDANGLINGINST
- | CvEINSTANCEBADNODE
- | CvEINSTANCEDOWN
- | CvEINSTANCELAYOUT
- | CvEINSTANCEMISSINGDISK
- | CvEINSTANCEFAULTYDISK
- | CvEINSTANCEWRONGNODE
- | CvEINSTANCESPLITGROUPS
- | CvEINSTANCEPOLICY
- | CvENODEDRBD
- | CvENODEDRBDHELPER
- | CvENODEFILECHECK
- | CvENODEHOOKS
- | CvENODEHV
- | CvENODELVM
- | CvENODEN1
- | CvENODENET
- | CvENODEOS
- | CvENODEORPHANINSTANCE
- | CvENODEORPHANLV
- | CvENODERPC
- | CvENODESSH
- | CvENODEVERSION
- | CvENODESETUP
- | CvENODETIME
- | CvENODEOOBPATH
- | CvENODEUSERSCRIPTS
- | CvENODEFILESTORAGEPATHS
- cVErrorCodeFromRaw :: forall m. Monad m => String -> m CVErrorCode
- cVErrorCodeToRaw :: CVErrorCode -> String
- data DdmSimple
- ddmSimpleFromRaw :: forall m. Monad m => String -> m DdmSimple
- ddmSimpleToRaw :: DdmSimple -> String
- data DdmFull
- ddmFullFromRaw :: forall m. Monad m => String -> m DdmFull
- ddmFullToRaw :: DdmFull -> String
- data Hypervisor
- hypervisorFromRaw :: forall m. Monad m => String -> m Hypervisor
- hypervisorToRaw :: Hypervisor -> String
- data OobCommand
- oobCommandFromRaw :: forall m. Monad m => String -> m OobCommand
- oobCommandToRaw :: OobCommand -> String
- data StorageType
- storageTypeFromRaw :: forall m. Monad m => String -> m StorageType
- storageTypeToRaw :: StorageType -> String
- data NodeEvacMode
- nodeEvacModeFromRaw :: forall m. Monad m => String -> m NodeEvacMode
- nodeEvacModeToRaw :: NodeEvacMode -> String
- data FileDriver
- = FileLoop
- | FileBlktap
- fileDriverFromRaw :: forall m. Monad m => String -> m FileDriver
- fileDriverToRaw :: FileDriver -> String
- data InstCreateMode
- instCreateModeFromRaw :: forall m. Monad m => String -> m InstCreateMode
- instCreateModeToRaw :: InstCreateMode -> String
- data RebootType
- = RebootSoft
- | RebootHard
- | RebootFull
- rebootTypeFromRaw :: forall m. Monad m => String -> m RebootType
- rebootTypeToRaw :: RebootType -> String
- data ExportMode
- exportModeFromRaw :: forall m. Monad m => String -> m ExportMode
- exportModeToRaw :: ExportMode -> String
- data IAllocatorTestDir
- iAllocatorTestDirFromRaw :: forall m. Monad m => String -> m IAllocatorTestDir
- iAllocatorTestDirToRaw :: IAllocatorTestDir -> String
- data IAllocatorMode
- iAllocatorModeFromRaw :: forall m. Monad m => String -> m IAllocatorMode
- iAllocatorModeToRaw :: IAllocatorMode -> String
- data NICMode
- nICModeFromRaw :: forall m. Monad m => String -> m NICMode
- nICModeToRaw :: NICMode -> String
- data JobStatus
- jobStatusFromRaw :: forall m. Monad m => String -> m JobStatus
- jobStatusToRaw :: JobStatus -> String
- data FinalizedJobStatus
- finalizedJobStatusFromRaw :: forall m. Monad m => String -> m FinalizedJobStatus
- finalizedJobStatusToRaw :: FinalizedJobStatus -> String
- newtype JobId = JobId {
- fromJobId :: Int
- makeJobId :: Monad m => Int -> m JobId
- makeJobIdS :: Monad m => String -> m JobId
- parseJobId :: Monad m => JSValue -> m JobId
- type RelativeJobId = Negative Int
- data JobIdDep
- data JobDependency = JobDependency JobIdDep [FinalizedJobStatus]
- data OpSubmitPriority
- = OpPrioLow
- | OpPrioNormal
- | OpPrioHigh
- opSubmitPriorityFromRaw :: forall m. Monad m => Int -> m OpSubmitPriority
- opSubmitPriorityToRaw :: OpSubmitPriority -> Int
- parseSubmitPriority :: Monad m => String -> m OpSubmitPriority
- fmtSubmitPriority :: OpSubmitPriority -> String
- data OpStatus
- opStatusFromRaw :: forall m. Monad m => String -> m OpStatus
- opStatusToRaw :: OpStatus -> String
- data ELogType
- eLogTypeFromRaw :: forall m. Monad m => String -> m ELogType
- eLogTypeToRaw :: ELogType -> String
- type ReasonElem = (String, String, Integer)
- type ReasonTrail = [ReasonElem]
Generic types
newtype NonNegative a Source
Type that holds a non-negative value.
Constructors
NonNegative | |
Fields
|
Instances
Eq a => Eq (NonNegative a) | |
Show a => Show (NonNegative a) | |
(Arbitrary a, Ord a, Num a, Show a) => Arbitrary (NonNegative a) | |
(JSON a, Num a, Ord a, Show a) => JSON (NonNegative a) |
mkNonNegative :: (Monad m, Num a, Ord a, Show a) => a -> m (NonNegative a)Source
Smart constructor for NonNegative
.
Type that holds a positive value.
Constructors
Positive | |
Fields
|
mkPositive :: (Monad m, Num a, Ord a, Show a) => a -> m (Positive a)Source
Smart constructor for Positive
.
Type that holds a negative value.
Constructors
Negative | |
Fields
|
mkNegative :: (Monad m, Num a, Ord a, Show a) => a -> m (Negative a)Source
Smart constructor for Negative
.
Type that holds a non-null list.
Constructors
NonEmpty | |
Fields
|
mkNonEmpty :: Monad m => [a] -> m (NonEmpty a)Source
Smart constructor for NonEmpty
.
type NonEmptyString = NonEmpty CharSource
A simple type alias for non-empty strings.
Ganeti types
data DiskTemplate Source
Instance disk template type.
Constructors
DTDiskless | |
DTFile | |
DTSharedFile | |
DTPlain | |
DTBlock | |
DTDrbd8 | |
DTRbd | |
DTExt |
Instances
Bounded DiskTemplate | |
Enum DiskTemplate | |
Eq DiskTemplate | |
Ord DiskTemplate | |
Show DiskTemplate | |
Arbitrary DiskTemplate | Custom |
JSON DiskTemplate | |
HasStringRepr DiskTemplate |
diskTemplateFromRaw :: forall m. Monad m => String -> m DiskTemplateSource
diskTemplateToRaw :: DiskTemplate -> StringSource
data AllocPolicy Source
The Group allocation policy type.
Note that the order of constructors is important as the automatic Ord instance will order them in the order they are defined, so when changing this data type be careful about the interaction with the desired sorting order.
Constructors
AllocPreferred | |
AllocLastResort | |
AllocUnallocable |
Instances
Bounded AllocPolicy | |
Enum AllocPolicy | |
Eq AllocPolicy | |
Ord AllocPolicy | |
Show AllocPolicy | |
Arbitrary AllocPolicy | |
JSON AllocPolicy |
allocPolicyFromRaw :: forall m. Monad m => String -> m AllocPolicySource
allocPolicyToRaw :: AllocPolicy -> StringSource
data InstanceStatus Source
The Instance real state type. FIXME: this could be improved to just wrap a NormalState AdminStatus | ErrorState ErrorCondition.
Constructors
StatusDown | |
StatusOffline | |
ErrorDown | |
ErrorUp | |
NodeDown | |
NodeOffline | |
Running | |
WrongNode |
Instances
Bounded InstanceStatus | |
Enum InstanceStatus | |
Eq InstanceStatus | |
Ord InstanceStatus | |
Show InstanceStatus | |
Arbitrary InstanceStatus | |
JSON InstanceStatus |
instanceStatusFromRaw :: forall m. Monad m => String -> m InstanceStatusSource
instanceStatusToRaw :: InstanceStatus -> StringSource
data MigrationMode Source
Migration mode.
Constructors
MigrationLive | |
MigrationNonLive |
Instances
Bounded MigrationMode | |
Enum MigrationMode | |
Eq MigrationMode | |
Ord MigrationMode | |
Show MigrationMode | |
Arbitrary MigrationMode | |
JSON MigrationMode |
migrationModeFromRaw :: forall m. Monad m => String -> m MigrationModeSource
migrationModeToRaw :: MigrationMode -> StringSource
data VerifyOptionalChecks Source
Verify optional checks.
Constructors
VerifyNPlusOneMem |
Instances
Bounded VerifyOptionalChecks | |
Enum VerifyOptionalChecks | |
Eq VerifyOptionalChecks | |
Ord VerifyOptionalChecks | |
Show VerifyOptionalChecks | |
Arbitrary VerifyOptionalChecks | |
JSON VerifyOptionalChecks |
verifyOptionalChecksFromRaw :: forall m. Monad m => String -> m VerifyOptionalChecksSource
verifyOptionalChecksToRaw :: VerifyOptionalChecks -> StringSource
data CVErrorCode Source
Cluster verify error codes.
Constructors
Instances
Bounded CVErrorCode | |
Enum CVErrorCode | |
Eq CVErrorCode | |
Ord CVErrorCode | |
Show CVErrorCode | |
Arbitrary CVErrorCode | |
JSON CVErrorCode |
cVErrorCodeFromRaw :: forall m. Monad m => String -> m CVErrorCodeSource
cVErrorCodeToRaw :: CVErrorCode -> StringSource
Dynamic device modification, just add/remove version.
Constructors
DdmSimpleAdd | |
DdmSimpleRemove |
ddmSimpleFromRaw :: forall m. Monad m => String -> m DdmSimpleSource
ddmSimpleToRaw :: DdmSimple -> StringSource
Dynamic device modification, all operations version.
Constructors
DdmFullAdd | |
DdmFullRemove | |
DdmFullModify |
ddmFullFromRaw :: forall m. Monad m => String -> m DdmFullSource
ddmFullToRaw :: DdmFull -> StringSource
data Hypervisor Source
Hypervisor type definitions.
Instances
Bounded Hypervisor | |
Enum Hypervisor | |
Eq Hypervisor | |
Ord Hypervisor | |
Show Hypervisor | |
Arbitrary Hypervisor | |
JSON Hypervisor |
hypervisorFromRaw :: forall m. Monad m => String -> m HypervisorSource
hypervisorToRaw :: Hypervisor -> StringSource
data OobCommand Source
Oob command type.
Constructors
OobHealth | |
OobPowerCycle | |
OobPowerOff | |
OobPowerOn | |
OobPowerStatus |
Instances
Bounded OobCommand | |
Enum OobCommand | |
Eq OobCommand | |
Ord OobCommand | |
Show OobCommand | |
Arbitrary OobCommand | |
JSON OobCommand |
oobCommandFromRaw :: forall m. Monad m => String -> m OobCommandSource
oobCommandToRaw :: OobCommand -> StringSource
data StorageType Source
Storage type.
Constructors
StorageFile | |
StorageLvmPv | |
StorageLvmVg | |
StorageDiskless | |
StorageBlock | |
StorageRados | |
StorageExt |
Instances
Bounded StorageType | |
Enum StorageType | |
Eq StorageType | |
Ord StorageType | |
Show StorageType | |
Arbitrary StorageType | Custom |
JSON StorageType |
storageTypeFromRaw :: forall m. Monad m => String -> m StorageTypeSource
storageTypeToRaw :: StorageType -> StringSource
data NodeEvacMode Source
Node evac modes.
Constructors
NEvacPrimary | |
NEvacSecondary | |
NEvacAll |
Instances
Bounded NodeEvacMode | |
Enum NodeEvacMode | |
Eq NodeEvacMode | |
Ord NodeEvacMode | |
Show NodeEvacMode | |
Arbitrary NodeEvacMode | |
JSON NodeEvacMode |
nodeEvacModeFromRaw :: forall m. Monad m => String -> m NodeEvacModeSource
nodeEvacModeToRaw :: NodeEvacMode -> StringSource
data FileDriver Source
The file driver type.
Constructors
FileLoop | |
FileBlktap |
Instances
Bounded FileDriver | |
Enum FileDriver | |
Eq FileDriver | |
Ord FileDriver | |
Show FileDriver | |
Arbitrary FileDriver | |
JSON FileDriver |
fileDriverFromRaw :: forall m. Monad m => String -> m FileDriverSource
fileDriverToRaw :: FileDriver -> StringSource
data InstCreateMode Source
The instance create mode.
Constructors
InstCreate | |
InstImport | |
InstRemoteImport |
Instances
Bounded InstCreateMode | |
Enum InstCreateMode | |
Eq InstCreateMode | |
Ord InstCreateMode | |
Show InstCreateMode | |
Arbitrary InstCreateMode | |
JSON InstCreateMode |
instCreateModeFromRaw :: forall m. Monad m => String -> m InstCreateModeSource
instCreateModeToRaw :: InstCreateMode -> StringSource
data RebootType Source
Reboot type.
Constructors
RebootSoft | |
RebootHard | |
RebootFull |
Instances
Bounded RebootType | |
Enum RebootType | |
Eq RebootType | |
Ord RebootType | |
Show RebootType | |
Arbitrary RebootType | |
JSON RebootType |
rebootTypeFromRaw :: forall m. Monad m => String -> m RebootTypeSource
rebootTypeToRaw :: RebootType -> StringSource
data ExportMode Source
Export modes.
Constructors
ExportModeLocal | |
ExportModeRemove |
Instances
Bounded ExportMode | |
Enum ExportMode | |
Eq ExportMode | |
Ord ExportMode | |
Show ExportMode | |
Arbitrary ExportMode | |
JSON ExportMode |
exportModeFromRaw :: forall m. Monad m => String -> m ExportModeSource
exportModeToRaw :: ExportMode -> StringSource
data IAllocatorTestDir Source
IAllocator run types (OpTestIAllocator).
Constructors
IAllocatorDirIn | |
IAllocatorDirOut |
Instances
Bounded IAllocatorTestDir | |
Enum IAllocatorTestDir | |
Eq IAllocatorTestDir | |
Ord IAllocatorTestDir | |
Show IAllocatorTestDir | |
Arbitrary IAllocatorTestDir | |
JSON IAllocatorTestDir |
iAllocatorTestDirFromRaw :: forall m. Monad m => String -> m IAllocatorTestDirSource
iAllocatorTestDirToRaw :: IAllocatorTestDir -> StringSource
data IAllocatorMode Source
IAllocator mode. FIXME: use this in HTools.Backend.IAlloc.
Constructors
IAllocatorAlloc | |
IAllocatorMultiAlloc | |
IAllocatorReloc | |
IAllocatorNodeEvac | |
IAllocatorChangeGroup |
Instances
Bounded IAllocatorMode | |
Enum IAllocatorMode | |
Eq IAllocatorMode | |
Ord IAllocatorMode | |
Show IAllocatorMode | |
Arbitrary IAllocatorMode | |
JSON IAllocatorMode |
iAllocatorModeFromRaw :: forall m. Monad m => String -> m IAllocatorModeSource
iAllocatorModeToRaw :: IAllocatorMode -> StringSource
Network mode.
nICModeFromRaw :: forall m. Monad m => String -> m NICModeSource
nICModeToRaw :: NICMode -> StringSource
The JobStatus data type. Note that this is ordered especially such that greater/lesser comparison on values of this type makes sense.
jobStatusFromRaw :: forall m. Monad m => String -> m JobStatusSource
jobStatusToRaw :: JobStatus -> StringSource
data FinalizedJobStatus Source
Finalized job status.
Constructors
JobStatusCanceled | |
JobStatusSuccessful | |
JobStatusFailed |
Instances
Bounded FinalizedJobStatus | |
Enum FinalizedJobStatus | |
Eq FinalizedJobStatus | |
Ord FinalizedJobStatus | |
Show FinalizedJobStatus | |
Arbitrary FinalizedJobStatus | |
JSON FinalizedJobStatus |
finalizedJobStatusFromRaw :: forall m. Monad m => String -> m FinalizedJobStatusSource
finalizedJobStatusToRaw :: FinalizedJobStatus -> StringSource
The Ganeti job type.
makeJobIdS :: Monad m => String -> m JobIdSource
Builds a job ID from a string.
parseJobId :: Monad m => JSValue -> m JobIdSource
type RelativeJobId = Negative IntSource
Relative job ID type alias.
Job ID dependency.
Constructors
JobDepRelative RelativeJobId | |
JobDepAbsolute JobId |
data JobDependency Source
Job Dependency type.
Constructors
JobDependency JobIdDep [FinalizedJobStatus] |
Instances
Eq JobDependency | |
Show JobDependency | |
Arbitrary JobDependency | |
JSON JobDependency |
data OpSubmitPriority Source
Valid opcode priorities for submit.
Constructors
OpPrioLow | |
OpPrioNormal | |
OpPrioHigh |
Instances
Bounded OpSubmitPriority | |
Enum OpSubmitPriority | |
Eq OpSubmitPriority | |
Ord OpSubmitPriority | |
Show OpSubmitPriority | |
Arbitrary OpSubmitPriority | |
JSON OpSubmitPriority |
opSubmitPriorityFromRaw :: forall m. Monad m => Int -> m OpSubmitPrioritySource
opSubmitPriorityToRaw :: OpSubmitPriority -> IntSource
parseSubmitPriority :: Monad m => String -> m OpSubmitPrioritySource
Parse submit priorities from a string.
fmtSubmitPriority :: OpSubmitPriority -> StringSource
Format a submit priority as string.
Our ADT for the OpCode status at runtime (while in a job).
opStatusFromRaw :: forall m. Monad m => String -> m OpStatusSource
opStatusToRaw :: OpStatus -> StringSource
Type for the job message type.
Constructors
ELogMessage | |
ELogRemoteImport | |
ELogJqueueTest |
eLogTypeFromRaw :: forall m. Monad m => String -> m ELogTypeSource
eLogTypeToRaw :: ELogType -> StringSource
type ReasonElem = (String, String, Integer)Source
Type of one element of a reason trail.
type ReasonTrail = [ReasonElem]Source
Type representing a reason trail.