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
- type QueryResultCode = Int
- newtype IPv4Address = IPv4Address {
- fromIPv4Address :: String
- mkIPv4Address :: Monad m => String -> m IPv4Address
- newtype IPv4Network = IPv4Network {
- fromIPv4Network :: String
- mkIPv4Network :: Monad m => String -> m IPv4Network
- newtype IPv6Address = IPv6Address {
- fromIPv6Address :: String
- mkIPv6Address :: Monad m => String -> m IPv6Address
- newtype IPv6Network = IPv6Network {
- fromIPv6Network :: String
- mkIPv6Network :: Monad m => String -> m IPv6Network
- data DiskTemplate
- = DTDiskless
- | DTFile
- | DTSharedFile
- | DTPlain
- | DTBlock
- | DTDrbd8
- | DTRbd
- | DTExt
- | DTGluster
- diskTemplateFromRaw :: forall m. Monad m => String -> m DiskTemplate
- diskTemplateToRaw :: DiskTemplate -> String
- diskTemplateMovable :: DiskTemplate -> Bool
- data TagKind
- tagKindFromRaw :: forall m. Monad m => String -> m TagKind
- tagKindToRaw :: TagKind -> String
- data AllocPolicy
- allocPolicyFromRaw :: forall m. Monad m => String -> m AllocPolicy
- allocPolicyToRaw :: AllocPolicy -> String
- data InstanceStatus
- = StatusDown
- | StatusOffline
- | ErrorDown
- | ErrorUp
- | NodeDown
- | NodeOffline
- | Running
- | UserDown
- | 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
- | CvECLUSTERCLIENTCERT
- | CvECLUSTERFILECHECK
- | CvECLUSTERDANGLINGNODES
- | CvECLUSTERDANGLINGINST
- | CvEINSTANCEBADNODE
- | CvEINSTANCEDOWN
- | CvEINSTANCELAYOUT
- | CvEINSTANCEMISSINGDISK
- | CvEINSTANCEFAULTYDISK
- | CvEINSTANCEWRONGNODE
- | CvEINSTANCESPLITGROUPS
- | CvEINSTANCEPOLICY
- | CvEINSTANCEUNSUITABLENODE
- | CvEINSTANCEMISSINGCFGPARAMETER
- | CvENODEDRBD
- | CvENODEDRBDVERSION
- | CvENODEDRBDHELPER
- | CvENODEFILECHECK
- | CvENODEHOOKS
- | CvENODEHV
- | CvENODELVM
- | CvENODEN1
- | CvENODENET
- | CvENODEOS
- | CvENODEORPHANINSTANCE
- | CvENODEORPHANLV
- | CvENODERPC
- | CvENODESSH
- | CvENODEVERSION
- | CvENODESETUP
- | CvENODETIME
- | CvENODEOOBPATH
- | CvENODEUSERSCRIPTS
- | CvENODEFILESTORAGEPATHS
- | CvENODEFILESTORAGEPATHUNUSABLE
- | CvENODESHAREDFILESTORAGEPATHUNUSABLE
- | CvENODEGLUSTERSTORAGEPATHUNUSABLE
- | CvEGROUPDIFFERENTPVSIZE
- | CvEEXTAGS
- 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 OobStatus
- oobStatusFromRaw :: forall m. Monad m => String -> m OobStatus
- oobStatusToRaw :: OobStatus -> 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 EvacMode
- evacModeFromRaw :: forall m. Monad m => String -> m EvacMode
- evacModeToRaw :: EvacMode -> String
- data FileDriver
- = FileLoop
- | FileBlktap
- | FileBlktap2
- 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
- absoluteJobIdDep :: Monad m => JobIdDep -> JobId -> m JobIdDep
- data JobDependency = JobDependency JobIdDep [FinalizedJobStatus]
- absoluteJobDependency :: Monad m => JobDependency -> JobId -> m JobDependency
- getJobIdFromDependency :: JobDependency -> [JobId]
- 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]
- data VType
- = VTypeString
- | VTypeMaybeString
- | VTypeBool
- | VTypeSize
- | VTypeInt
- | VTypeFloat
- vTypeFromRaw :: forall m. Monad m => String -> m VType
- vTypeToRaw :: VType -> String
- data NodeRole
- = NROffline
- | NRDrained
- | NRRegular
- | NRCandidate
- | NRMaster
- nodeRoleFromRaw :: forall m. Monad m => String -> m NodeRole
- nodeRoleToRaw :: NodeRole -> String
- roleDescription :: NodeRole -> String
- data DiskMode
- = DiskRdOnly
- | DiskRdWr
- diskModeFromRaw :: forall m. Monad m => String -> m DiskMode
- diskModeToRaw :: DiskMode -> String
- data BlockDriver = BlockDrvManual
- blockDriverFromRaw :: forall m. Monad m => String -> m BlockDriver
- blockDriverToRaw :: BlockDriver -> String
- data AdminState
- = AdminOffline
- | AdminDown
- | AdminUp
- adminStateFromRaw :: forall m. Monad m => String -> m AdminState
- adminStateToRaw :: AdminState -> String
- data AdminStateSource
- adminStateSourceFromRaw :: forall m. Monad m => String -> m AdminStateSource
- adminStateSourceToRaw :: AdminStateSource -> String
- data StorageField
- = SFUsed
- | SFName
- | SFAllocatable
- | SFFree
- | SFSize
- storageFieldFromRaw :: forall m. Monad m => String -> m StorageField
- storageFieldToRaw :: StorageField -> String
- data DiskAccessMode
- diskAccessModeFromRaw :: forall m. Monad m => String -> m DiskAccessMode
- diskAccessModeToRaw :: DiskAccessMode -> String
- data LocalDiskStatus
- localDiskStatusFromRaw :: forall m. Monad m => Int -> m LocalDiskStatus
- localDiskStatusToRaw :: LocalDiskStatus -> Int
- _DiskStatusFaulty :: Int
- _DiskStatusUnknown :: Int
- _DiskStatusSync :: Int
- _DiskStatusOk :: Int
- localDiskStatusName :: LocalDiskStatus -> String
- data ReplaceDisksMode
- replaceDisksModeFromRaw :: forall m. Monad m => String -> m ReplaceDisksMode
- replaceDisksModeToRaw :: ReplaceDisksMode -> String
- data RpcTimeout
- rpcTimeoutFromRaw :: forall m. Monad m => Int -> m RpcTimeout
- rpcTimeoutToRaw :: RpcTimeout -> Int
- _OneDay :: Int
- _FourHours :: Int
- _Slow :: Int
- _Normal :: Int
- _Fast :: Int
- _Urgent :: Int
- data HotplugAction
- hotplugActionFromRaw :: forall m. Monad m => String -> m HotplugAction
- hotplugActionToRaw :: HotplugAction -> String
- data HotplugTarget
- hotplugTargetFromRaw :: forall m. Monad m => String -> m HotplugTarget
- hotplugTargetToRaw :: HotplugTarget -> String
- data SshKeyType
- sshKeyTypeFromRaw :: forall m. Monad m => String -> m SshKeyType
- sshKeyTypeToRaw :: SshKeyType -> String
- redacted :: String
- newtype Private a = Private {
- getPrivate :: a
- showPrivateJSObject :: JSON a => [(String, a)] -> JSObject (Private JSValue)
- newtype Secret a = Secret {
- getSecret :: a
- showSecretJSObject :: JSON a => [(String, a)] -> JSObject (Secret JSValue)
- revealValInJSObject :: JSObject (Secret JSValue) -> JSObject (Private JSValue)
- type HvParams = Container JSValue
- type OsParams = Container String
- type OsParamsPrivate = Container (Private String)
- class TimeStampObject a where
- class UuidObject a where
- uuidOf :: a -> String
- class ForthcomingObject a where
- isForthcoming :: a -> Bool
- class SerialNoObject a where
- serialOf :: a -> Int
- class TagsObject a where
- tagsOf :: a -> Set String
Generic types
newtype NonNegative a Source
Type that holds a non-negative value.
Constructors
NonNegative | |
Fields
|
Instances
Eq a => Eq (NonNegative a) | |
Ord a => Ord (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) | |
PyValue a => PyValue (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.
type QueryResultCode = IntSource
newtype IPv4Address Source
Constructors
IPv4Address | |
Fields
|
Instances
Eq IPv4Address | |
Ord IPv4Address | |
Show IPv4Address | |
JSON IPv4Address |
mkIPv4Address :: Monad m => String -> m IPv4AddressSource
newtype IPv4Network Source
Constructors
IPv4Network | |
Fields
|
Instances
Eq IPv4Network | |
Ord IPv4Network | |
Show IPv4Network | |
JSON IPv4Network |
mkIPv4Network :: Monad m => String -> m IPv4NetworkSource
newtype IPv6Address Source
Constructors
IPv6Address | |
Fields
|
Instances
Eq IPv6Address | |
Ord IPv6Address | |
Show IPv6Address | |
JSON IPv6Address |
mkIPv6Address :: Monad m => String -> m IPv6AddressSource
newtype IPv6Network Source
Constructors
IPv6Network | |
Fields
|
Instances
Eq IPv6Network | |
Ord IPv6Network | |
Show IPv6Network | |
JSON IPv6Network |
mkIPv6Network :: Monad m => String -> m IPv6NetworkSource
Ganeti types
data DiskTemplate Source
Instance disk template type. The disk template is a name for the
constructor of the disk configuration DiskLogicalId
used for
serialization, configuration values, etc.
Constructors
DTDiskless | |
DTFile | |
DTSharedFile | |
DTPlain | |
DTBlock | |
DTDrbd8 | |
DTRbd | |
DTExt | |
DTGluster |
Instances
Bounded DiskTemplate | |
Enum DiskTemplate | |
Eq DiskTemplate | |
Ord DiskTemplate | |
Show DiskTemplate | |
Arbitrary DiskTemplate | Custom |
JSON DiskTemplate | |
HasStringRepr DiskTemplate | |
PyValue DiskTemplate |
diskTemplateFromRaw :: forall m. Monad m => String -> m DiskTemplateSource
diskTemplateToRaw :: DiskTemplate -> StringSource
diskTemplateMovable :: DiskTemplate -> BoolSource
Predicate on disk templates indicating if instances based on this disk template can freely be moved (to any node in the node group).
Data type representing what items the tag operations apply to.
tagKindFromRaw :: forall m. Monad m => String -> m TagKindSource
tagKindToRaw :: TagKind -> 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.
Constructors
StatusDown | |
StatusOffline | |
ErrorDown | |
ErrorUp | |
NodeDown | |
NodeOffline | |
Running | |
UserDown | |
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 | |
PyValue 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 | |
PyValue CVErrorCode |
cVErrorCodeFromRaw :: forall m. Monad m => String -> m CVErrorCodeSource
cVErrorCodeToRaw :: CVErrorCode -> StringSource
Dynamic device modification, just add/remove version.
Constructors
DdmSimpleAdd | |
DdmSimpleAttach | |
DdmSimpleRemove | |
DdmSimpleDetach |
ddmSimpleFromRaw :: forall m. Monad m => String -> m DdmSimpleSource
ddmSimpleToRaw :: DdmSimple -> StringSource
Dynamic device modification, all operations version.
TODO: DDM_SWAP, DDM_MOVE?
Constructors
DdmFullAdd | |
DdmFullAttach | |
DdmFullRemove | |
DdmFullDetach | |
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 | |
Arbitrary OsHvParams | No real arbitrary instance for |
Arbitrary ClusterHvParams | No real arbitrary instance for |
JSON Hypervisor | |
HasStringRepr Hypervisor | |
PyValue 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
Oob command status
Constructors
OobStatusCritical | |
OobStatusOk | |
OobStatusUnknown | |
OobStatusWarning |
oobStatusFromRaw :: forall m. Monad m => String -> m OobStatusSource
oobStatusToRaw :: OobStatus -> StringSource
data StorageType Source
Storage type.
Constructors
StorageFile | |
StorageSharedFile | |
StorageGluster | |
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
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
Constructors
SURaw StorageType StorageKey |
data StorageUnit Source
Full storage unit with storage-type-specific parameters
Constructors
Instances
Eq StorageUnit | |
Show StorageUnit | |
JSON StorageUnit |
showSUSimple :: StorageType -> StorageKey -> StringSource
showSULvm :: StorageType -> StorageKey -> SPExclusiveStorage -> StringSource
diskTemplateToStorageType :: DiskTemplate -> StorageTypeSource
Mapping from disk templates to storage types.
addParamsToStorageUnit :: SPExclusiveStorage -> StorageUnitRaw -> StorageUnitSource
Equips a raw storage unit with its parameters
Node evac modes.
This is part of the IAllocator
interface and it is used, for
example, in RqType
. However, it must reside
in this module, and not in Types
, because it is
also used by Constants
.
Constructors
ChangePrimary | |
ChangeSecondary | |
ChangeAll |
evacModeFromRaw :: forall m. Monad m => String -> m EvacModeSource
evacModeToRaw :: EvacMode -> StringSource
data FileDriver Source
The file driver type.
Constructors
FileLoop | |
FileBlktap | |
FileBlktap2 |
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 | |
ExportModeRemote |
Instances
Bounded ExportMode | |
Enum ExportMode | |
Eq ExportMode | |
Ord ExportMode | |
Show ExportMode | |
Arbitrary ExportMode | |
JSON ExportMode | |
PyValue 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 | |
IAllocatorAllocateSecondary | |
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 |
absoluteJobIdDep :: Monad m => JobIdDep -> JobId -> m JobIdDepSource
data JobDependency Source
Job Dependency type.
Constructors
JobDependency JobIdDep [FinalizedJobStatus] |
Instances
Eq JobDependency | |
Ord JobDependency | |
Show JobDependency | |
Arbitrary JobDependency | |
JSON JobDependency |
absoluteJobDependency :: Monad m => JobDependency -> JobId -> m JobDependencySource
From job dependency and job id compute an absolute job dependency.
getJobIdFromDependency :: JobDependency -> [JobId]Source
From a job dependency get the absolute job id it depends on, if given absolutely.
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 | |
ELogDelayTest |
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, of form
(source, reason, timestamp)
.
type ReasonTrail = [ReasonElem]Source
Type representing a reason trail.
The VTYPES, a mini-type system in Python.
Constructors
VTypeString | |
VTypeMaybeString | |
VTypeBool | |
VTypeSize | |
VTypeInt | |
VTypeFloat |
vTypeFromRaw :: forall m. Monad m => String -> m VTypeSource
vTypeToRaw :: VType -> StringSource
Node role type
Constructors
NROffline | |
NRDrained | |
NRRegular | |
NRCandidate | |
NRMaster |
nodeRoleFromRaw :: forall m. Monad m => String -> m NodeRoleSource
nodeRoleToRaw :: NodeRole -> StringSource
roleDescription :: NodeRole -> StringSource
The description of the node role.
Disk types
Constructors
DiskRdOnly | |
DiskRdWr |
diskModeFromRaw :: forall m. Monad m => String -> m DiskModeSource
diskModeToRaw :: DiskMode -> StringSource
data BlockDriver Source
The persistent block driver type. Currently only one type is allowed.
Constructors
BlockDrvManual |
Instances
Bounded BlockDriver | |
Enum BlockDriver | |
Eq BlockDriver | |
Ord BlockDriver | |
Show BlockDriver | |
Arbitrary BlockDriver | |
JSON BlockDriver |
blockDriverFromRaw :: forall m. Monad m => String -> m BlockDriverSource
blockDriverToRaw :: BlockDriver -> StringSource
Instance types
data AdminState Source
Constructors
AdminOffline | |
AdminDown | |
AdminUp |
Instances
Bounded AdminState | |
Enum AdminState | |
Eq AdminState | |
Ord AdminState | |
Show AdminState | |
Arbitrary AdminState | |
JSON AdminState |
adminStateFromRaw :: forall m. Monad m => String -> m AdminStateSource
adminStateToRaw :: AdminState -> StringSource
data AdminStateSource Source
Constructors
AdminSource | |
UserSource |
Instances
Bounded AdminStateSource | |
Enum AdminStateSource | |
Eq AdminStateSource | |
Ord AdminStateSource | |
Show AdminStateSource | |
Arbitrary AdminStateSource | |
JSON AdminStateSource | |
PyValue AdminStateSource |
adminStateSourceFromRaw :: forall m. Monad m => String -> m AdminStateSourceSource
adminStateSourceToRaw :: AdminStateSource -> StringSource
Storage field type
data StorageField Source
Constructors
SFUsed | |
SFName | |
SFAllocatable | |
SFFree | |
SFSize |
Instances
Bounded StorageField | |
Enum StorageField | |
Eq StorageField | |
Ord StorageField | |
Show StorageField | |
JSON StorageField |
storageFieldFromRaw :: forall m. Monad m => String -> m StorageFieldSource
storageFieldToRaw :: StorageField -> StringSource
Disk access protocol
data DiskAccessMode Source
Constructors
DiskUserspace | |
DiskKernelspace |
Instances
Bounded DiskAccessMode | |
Enum DiskAccessMode | |
Eq DiskAccessMode | |
Ord DiskAccessMode | |
Show DiskAccessMode | |
JSON DiskAccessMode |
diskAccessModeFromRaw :: forall m. Monad m => String -> m DiskAccessModeSource
diskAccessModeToRaw :: DiskAccessMode -> StringSource
data LocalDiskStatus Source
Local disk status
Python code depends on: DiskStatusOk < DiskStatusUnknown < DiskStatusFaulty
Constructors
DiskStatusOk | |
DiskStatusSync | |
DiskStatusUnknown | |
DiskStatusFaulty |
Instances
Bounded LocalDiskStatus | |
Enum LocalDiskStatus | |
Eq LocalDiskStatus | |
Ord LocalDiskStatus | |
Show LocalDiskStatus |
localDiskStatusFromRaw :: forall m. Monad m => Int -> m LocalDiskStatusSource
localDiskStatusToRaw :: LocalDiskStatus -> IntSource
_DiskStatusFaulty :: IntSource
_DiskStatusUnknown :: IntSource
_DiskStatusSync :: IntSource
_DiskStatusOk :: IntSource
localDiskStatusName :: LocalDiskStatus -> StringSource
data ReplaceDisksMode Source
Replace disks type.
Instances
Bounded ReplaceDisksMode | |
Enum ReplaceDisksMode | |
Eq ReplaceDisksMode | |
Ord ReplaceDisksMode | |
Show ReplaceDisksMode | |
Arbitrary ReplaceDisksMode | |
JSON ReplaceDisksMode |
replaceDisksModeFromRaw :: forall m. Monad m => String -> m ReplaceDisksModeSource
replaceDisksModeToRaw :: ReplaceDisksMode -> StringSource
data RpcTimeout Source
Basic timeouts for RPC calls.
Instances
Bounded RpcTimeout | |
Enum RpcTimeout | |
Eq RpcTimeout | |
Ord RpcTimeout | |
Show RpcTimeout |
rpcTimeoutFromRaw :: forall m. Monad m => Int -> m RpcTimeoutSource
rpcTimeoutToRaw :: RpcTimeout -> IntSource
_FourHours :: IntSource
data HotplugAction Source
Hotplug action.
Instances
Bounded HotplugAction | |
Enum HotplugAction | |
Eq HotplugAction | |
Ord HotplugAction | |
Show HotplugAction | |
JSON HotplugAction |
hotplugActionFromRaw :: forall m. Monad m => String -> m HotplugActionSource
hotplugActionToRaw :: HotplugAction -> StringSource
data HotplugTarget Source
Hotplug Device Target.
Instances
Bounded HotplugTarget | |
Enum HotplugTarget | |
Eq HotplugTarget | |
Ord HotplugTarget | |
Show HotplugTarget | |
JSON HotplugTarget |
hotplugTargetFromRaw :: forall m. Monad m => String -> m HotplugTargetSource
hotplugTargetToRaw :: HotplugTarget -> StringSource
data SshKeyType Source
SSH key type.
Instances
Bounded SshKeyType | |
Enum SshKeyType | |
Eq SshKeyType | |
Ord SshKeyType | |
Show SshKeyType | |
Arbitrary SshKeyType | |
JSON SshKeyType |
sshKeyTypeFromRaw :: forall m. Monad m => String -> m SshKeyTypeSource
sshKeyTypeToRaw :: SshKeyType -> StringSource
Private type and instances
A container for values that should be happy to be manipulated yet refuses to be shown unless explicitly requested.
Constructors
Private | |
Fields
|
Instances
Monad Private | |
Functor Private | |
Applicative Private | |
Arbitrary ClusterOsParamsPrivate | |
Eq a => Eq (Private a) | |
Ord a => Ord (Private a) | |
Show a => Show (Private a) | Show the value of the field. It would be better not to implement this at all. Alas, Show OpCode requires Show Private. |
Arbitrary a => Arbitrary (Private a) | |
(Show a, JSON a) => JSON (Private a) | |
PyValue a => PyValue (Private a) |
showPrivateJSObject :: JSON a => [(String, a)] -> JSObject (Private JSValue)Source
Secret type and instances
A container for values that behaves like Private, but doesn't leak the value through showJSON
showSecretJSObject :: JSON a => [(String, a)] -> JSObject (Secret JSValue)Source
We return <redacted> here to satisfy the idempotence of serialization and deserialization, although this will impact the meaningfulness of secret parameters within configuration tests.
revealValInJSObject :: JSObject (Secret JSValue) -> JSObject (Private JSValue)Source
type HvParams = Container JSValueSource
The hypervisor parameter type. This is currently a simple map, without type checking on key/value pairs.
type OsParams = Container StringSource
The OS parameters type. This is, and will remain, a string container, since the keys are dynamically declared by the OSes, and the values are always strings.
type OsParamsPrivate = Container (Private String)Source
class TimeStampObject a whereSource
Class of objects that have timestamps.
class UuidObject a whereSource
Class of objects that have an UUID.
class ForthcomingObject a whereSource
Class of objects that can be forthcoming.
Methods
isForthcoming :: a -> BoolSource
Instances
class SerialNoObject a whereSource
Class of object that have a serial number.
class TagsObject a whereSource
Class of objects that have tags.