Safe Haskell | None |
---|
- 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
- | CvENODEFILESTORAGEPATHUNUSABLE
- | CvENODESHAREDFILESTORAGEPATHUNUSABLE
- 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
- type StorageKey = String
- type SPExclusiveStorage = Bool
- data StorageUnitRaw = SURaw StorageType StorageKey
- data StorageUnit
- showSUSimple :: StorageType -> StorageKey -> String
- showSULvm :: StorageType -> StorageKey -> SPExclusiveStorage -> String
- diskTemplateToStorageType :: DiskTemplate -> StorageType
- addParamsToStorageUnit :: SPExclusiveStorage -> StorageUnitRaw -> StorageUnit
- 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.
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.
Positive | |
|
mkPositive :: (Monad m, Num a, Ord a, Show a) => a -> m (Positive a)Source
Smart constructor for Positive
.
Type that holds a negative value.
Negative | |
|
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.
NonEmpty | |
|
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.
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.
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.
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.
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.
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.
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.
ddmSimpleFromRaw :: forall m. Monad m => String -> m DdmSimpleSource
ddmSimpleToRaw :: DdmSimple -> StringSource
Dynamic device modification, all operations version.
ddmFullFromRaw :: forall m. Monad m => String -> m DdmFullSource
ddmFullToRaw :: DdmFull -> StringSource
data Hypervisor Source
Hypervisor type definitions.
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.
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.
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
type StorageKey = StringSource
Storage keys are identifiers for storage units. Their content varies depending on the storage type, for example a storage key for LVM storage is the volume group name.
type SPExclusiveStorage = BoolSource
data StorageUnitRaw Source
Storage units without storage-type-specific parameters
data StorageUnit Source
Full storage unit with storage-type-specific parameters
SUFile StorageKey | |
SULvmPv StorageKey SPExclusiveStorage | |
SULvmVg StorageKey SPExclusiveStorage | |
SUDiskless StorageKey | |
SUBlock StorageKey | |
SURados StorageKey | |
SUExt StorageKey |
Eq StorageUnit | |
Show StorageUnit | |
JSON StorageUnit |
showSUSimple :: StorageType -> StorageKey -> StringSource
showSULvm :: StorageType -> StorageKey -> SPExclusiveStorage -> StringSource
diskTemplateToStorageType :: DiskTemplate -> StorageTypeSource
Mapping fo disk templates to storage type FIXME: This is semantically the same as the constant C.diskTemplatesStorageType, remove this when python constants are generated from haskell constants
addParamsToStorageUnit :: SPExclusiveStorage -> StorageUnitRaw -> StorageUnitSource
Equips a raw storage unit with its parameters
data NodeEvacMode Source
Node evac modes.
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.
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.
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.
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.
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).
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.
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.
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.
data JobDependency Source
Job Dependency type.
Eq JobDependency | |
Show JobDependency | |
Arbitrary JobDependency | |
JSON JobDependency |
data OpSubmitPriority Source
Valid opcode priorities for submit.
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.
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.