Safe Haskell | None |
---|
Implementation of the opcodes.
Synopsis
- type JobIdListOnly = Map String [(Bool, Either String JobId)]
- type InstanceMultiAllocResponse = ([(Bool, Either String JobId)], NonEmptyString)
- type QueryFieldDef = (NonEmptyString, NonEmptyString, TagKind, NonEmptyString)
- type QueryResponse = ([QueryFieldDef], [[(QueryResultCode, JSValue)]])
- type QueryFieldsResponse = [QueryFieldDef]
- data OpCode
- = OpClusterPostInit {
- | OpClusterDestroy {
- | OpClusterQuery {
- | OpClusterVerify {
- opDebugSimulateErrors :: Bool
- opErrorCodes :: Bool
- opSkipChecks :: (ListSet VerifyOptionalChecks)
- opIgnoreErrors :: (ListSet CVErrorCode)
- opVerbose :: Bool
- opOptGroupName :: (Maybe NonEmptyString)
- opVerifyClutter :: Bool
- | OpClusterVerifyConfig {
- opDebugSimulateErrors :: Bool
- opErrorCodes :: Bool
- opIgnoreErrors :: (ListSet CVErrorCode)
- opVerbose :: Bool
- | OpClusterVerifyGroup {
- opGroupName :: NonEmptyString
- opDebugSimulateErrors :: Bool
- opErrorCodes :: Bool
- opSkipChecks :: (ListSet VerifyOptionalChecks)
- opIgnoreErrors :: (ListSet CVErrorCode)
- opVerbose :: Bool
- opVerifyClutter :: Bool
- | OpClusterVerifyDisks {
- opOptGroupName :: (Maybe NonEmptyString)
- | OpGroupVerifyDisks { }
- | OpClusterRepairDiskSizes { }
- | OpClusterConfigQuery { }
- | OpClusterRename { }
- | OpClusterSetParams {
- opForce :: Bool
- opHvState :: (Maybe (JSObject JSValue))
- opDiskState :: (Maybe (JSObject JSValue))
- opVgName :: (Maybe String)
- opEnabledHypervisors :: (Maybe [Hypervisor])
- opClusterHvParams :: (Maybe (GenericContainer String (JSObject JSValue)))
- opClusterBeParams :: (Maybe (JSObject JSValue))
- opOsHvp :: (Maybe (GenericContainer String (JSObject JSValue)))
- opClusterOsParams :: (Maybe (GenericContainer String (JSObject JSValue)))
- opClusterOsParamsPrivate :: (Maybe (GenericContainer String (JSObject (Private JSValue))))
- opDiskparams :: (Maybe (GenericContainer DiskTemplate (JSObject JSValue)))
- opCandidatePoolSize :: (Maybe (Positive Int))
- opMaxRunningJobs :: (Maybe (Positive Int))
- opMaxTrackedJobs :: (Maybe (Positive Int))
- opUidPool :: (Maybe [(Int, Int)])
- opAddUids :: (Maybe [(Int, Int)])
- opRemoveUids :: (Maybe [(Int, Int)])
- opMaintainNodeHealth :: (Maybe Bool)
- opPreallocWipeDisks :: (Maybe Bool)
- opNicparams :: (Maybe INicParams)
- opgenericNdParams :: (Maybe (JSObject JSValue))
- opIpolicy :: (Maybe (JSObject JSValue))
- opDrbdHelper :: (Maybe String)
- opDefaultIallocator :: (Maybe String)
- opDefaultIallocatorParams :: (Maybe (JSObject JSValue))
- opNetMacPrefix :: (Maybe NonEmptyString)
- opMasterNetdev :: (Maybe String)
- opMasterNetmask :: (Maybe (NonNegative Int))
- opReservedLvs :: (Maybe [NonEmptyString])
- opHiddenOs :: (Maybe [(DdmSimple, NonEmptyString)])
- opBlacklistedOs :: (Maybe [(DdmSimple, NonEmptyString)])
- opUseExternalMipScript :: (Maybe Bool)
- opEnabledDiskTemplates :: (Maybe [DiskTemplate])
- opModifyEtcHosts :: (Maybe Bool)
- opClusterFileStorageDir :: (Maybe String)
- opClusterSharedFileStorageDir :: (Maybe String)
- opClusterGlusterStorageDir :: (Maybe String)
- opInstallImage :: (Maybe String)
- opInstanceCommunicationNetwork :: (Maybe String)
- opZeroingImage :: (Maybe String)
- opCompressionTools :: (Maybe [NonEmptyString])
- opEnabledUserShutdown :: (Maybe Bool)
- opEnabledDataCollectors :: (Maybe (GenericContainer String Bool))
- opDataCollectorInterval :: (Maybe (GenericContainer String Int))
- | OpClusterRedistConf {
- | OpClusterActivateMasterIp {
- | OpClusterDeactivateMasterIp {
- | OpClusterRenewCrypto {
- opNodeCertificates :: Bool
- opRenewSshKeys :: Bool
- opSshKeyType :: (Maybe SshKeyType)
- opSshKeyBits :: (Maybe (Positive Int))
- opVerbose :: Bool
- opDebug :: Bool
- | OpQuery {
- opWhat :: QueryTypeOp
- opUseLocking :: Bool
- opFields :: [NonEmptyString]
- opQfilter :: (Maybe [JSValue])
- | OpQueryFields {
- opWhat :: QueryTypeOp
- opQueryFieldsFields :: (Maybe [NonEmptyString])
- | OpOobCommand {
- opNodeNames :: [NonEmptyString]
- opNodeUuids :: (Maybe [NonEmptyString])
- opOobCommand :: OobCommand
- opOobTimeout :: Int
- opIgnoreStatus :: Bool
- opPowerDelay :: Double
- | OpRestrictedCommand {
- opUseLocking :: Bool
- opReqNodes :: [NonEmptyString]
- opReqNodeUuids :: (Maybe [NonEmptyString])
- opRestrictedCommand :: NonEmptyString
- | OpNodeRemove {
- opNodeName :: NonEmptyString
- opNodeUuid :: (Maybe NonEmptyString)
- | OpNodeAdd {
- opNodeName :: NonEmptyString
- opHvState :: (Maybe (JSObject JSValue))
- opDiskState :: (Maybe (JSObject JSValue))
- opPrimaryIp :: (Maybe NonEmptyString)
- opSecondaryIp :: (Maybe NonEmptyString)
- opReadd :: Bool
- opGroup :: (Maybe NonEmptyString)
- opMasterCapable :: (Maybe Bool)
- opVmCapable :: (Maybe Bool)
- opgenericNdParams :: (Maybe (JSObject JSValue))
- opNodeSetup :: Bool
- | OpNodeQueryvols { }
- | OpNodeQueryStorage {
- opOutputFields :: [NonEmptyString]
- opOptStorageType :: (Maybe StorageType)
- opNodes :: [NonEmptyString]
- opStorageName :: (Maybe NonEmptyString)
- | OpNodeModifyStorage {
- opNodeName :: NonEmptyString
- opNodeUuid :: (Maybe NonEmptyString)
- opStorageType :: StorageType
- opStorageName :: (Maybe NonEmptyString)
- opChanges :: (JSObject JSValue)
- | OpRepairNodeStorage {
- opNodeName :: NonEmptyString
- opNodeUuid :: (Maybe NonEmptyString)
- opStorageType :: StorageType
- opStorageName :: (Maybe NonEmptyString)
- opIgnoreConsistency :: Bool
- | OpNodeSetParams {
- opNodeName :: NonEmptyString
- opNodeUuid :: (Maybe NonEmptyString)
- opForce :: Bool
- opHvState :: (Maybe (JSObject JSValue))
- opDiskState :: (Maybe (JSObject JSValue))
- opMasterCandidate :: (Maybe Bool)
- opOffline :: (Maybe Bool)
- opDrained :: (Maybe Bool)
- opAutoPromote :: Bool
- opMasterCapable :: (Maybe Bool)
- opVmCapable :: (Maybe Bool)
- opSecondaryIp :: (Maybe NonEmptyString)
- opgenericNdParams :: (Maybe (JSObject JSValue))
- opPowered :: (Maybe Bool)
- | OpNodePowercycle {
- opNodeName :: NonEmptyString
- opNodeUuid :: (Maybe NonEmptyString)
- opForce :: Bool
- | OpNodeMigrate {
- opNodeName :: NonEmptyString
- opNodeUuid :: (Maybe NonEmptyString)
- opMigrationMode :: (Maybe MigrationMode)
- opOldLiveMode :: (Maybe Bool)
- opTargetNode :: (Maybe NonEmptyString)
- opTargetNodeUuid :: (Maybe NonEmptyString)
- opAllowRuntimeChanges :: Bool
- opIgnoreIpolicy :: Bool
- opIallocator :: (Maybe NonEmptyString)
- | OpNodeEvacuate {
- opEarlyRelease :: Bool
- opNodeName :: NonEmptyString
- opNodeUuid :: (Maybe NonEmptyString)
- opRemoteNode :: (Maybe NonEmptyString)
- opRemoteNodeUuid :: (Maybe NonEmptyString)
- opIallocator :: (Maybe NonEmptyString)
- opEvacMode :: EvacMode
- opIgnoreSoftErrors :: (Maybe Bool)
- | OpInstanceCreate {
- opInstanceName :: String
- opForceVariant :: Bool
- opWaitForSync :: Bool
- opNameCheck :: Bool
- opIgnoreIpolicy :: Bool
- opOpportunisticLocking :: Bool
- opInstBeParams :: (JSObject JSValue)
- opinstDisks :: [IDiskParams]
- opOptDiskTemplate :: (Maybe DiskTemplate)
- opOptGroupName :: (Maybe NonEmptyString)
- opFileDriver :: (Maybe FileDriver)
- opFileStorageDir :: (Maybe NonEmptyString)
- opInstHvParams :: (JSObject JSValue)
- opHypervisor :: (Maybe Hypervisor)
- opIallocator :: (Maybe NonEmptyString)
- opIdentifyDefaults :: Bool
- opIpCheck :: Bool
- opConflictsCheck :: Bool
- opInstCreateMode :: InstCreateMode
- opNics :: [INicParams]
- opNoInstall :: (Maybe Bool)
- opInstOsParams :: (JSObject JSValue)
- opOsparamsPrivate :: (Maybe (JSObject (Private JSValue)))
- opOsparamsSecret :: (Maybe (JSObject (Secret JSValue)))
- opOsType :: (Maybe NonEmptyString)
- opPnode :: (Maybe NonEmptyString)
- opPnodeUuid :: (Maybe NonEmptyString)
- opSnode :: (Maybe NonEmptyString)
- opSnodeUuid :: (Maybe NonEmptyString)
- opSourceHandshake :: (Maybe [JSValue])
- opSourceInstanceName :: (Maybe NonEmptyString)
- opSourceShutdownTimeout :: (NonNegative Int)
- opSourceX509Ca :: (Maybe NonEmptyString)
- opSrcNode :: (Maybe NonEmptyString)
- opSrcNodeUuid :: (Maybe NonEmptyString)
- opSrcPath :: (Maybe NonEmptyString)
- opCompress :: String
- opStart :: Bool
- opForthcoming :: Bool
- opCommit :: Bool
- opInstTags :: [NonEmptyString]
- opInstanceCommunication :: Bool
- opHelperStartupTimeout :: (Maybe Int)
- opHelperShutdownTimeout :: (Maybe Int)
- | OpInstanceMultiAlloc {
- opOpportunisticLocking :: Bool
- opIallocator :: (Maybe NonEmptyString)
- opInstMultiAlloc :: [JSValue]
- | OpInstanceReinstall {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opForceVariant :: Bool
- opOsType :: (Maybe NonEmptyString)
- opTempOsParams :: (Maybe (JSObject JSValue))
- opOsparamsPrivate :: (Maybe (JSObject (Private JSValue)))
- opOsparamsSecret :: (Maybe (JSObject (Secret JSValue)))
- | OpInstanceRemove {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opShutdownTimeout :: (NonNegative Int)
- opIgnoreFailures :: Bool
- | OpInstanceRename {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opNewName :: NonEmptyString
- opNameCheck :: Bool
- opIpCheck :: Bool
- | OpInstanceStartup {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opForce :: Bool
- opIgnoreOfflineNodes :: Bool
- opTempHvParams :: (JSObject JSValue)
- opTempBeParams :: (JSObject JSValue)
- opNoRemember :: Bool
- opStartupPaused :: Bool
- opShutdownTimeout :: (NonNegative Int)
- | OpInstanceShutdown {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opForce :: Bool
- opIgnoreOfflineNodes :: Bool
- opInstShutdownTimeout :: (NonNegative Int)
- opNoRemember :: Bool
- opAdminStateSource :: (Maybe AdminStateSource)
- | OpInstanceReboot {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opShutdownTimeout :: (NonNegative Int)
- opIgnoreSecondaries :: Bool
- opRebootType :: RebootType
- | OpInstanceReplaceDisks {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opEarlyRelease :: Bool
- opIgnoreIpolicy :: Bool
- opReplaceDisksMode :: ReplaceDisksMode
- opReplaceDisksList :: [DiskIndex]
- opRemoteNode :: (Maybe NonEmptyString)
- opRemoteNodeUuid :: (Maybe NonEmptyString)
- opIallocator :: (Maybe NonEmptyString)
- | OpInstanceFailover {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opShutdownTimeout :: (NonNegative Int)
- opIgnoreConsistency :: Bool
- opTargetNode :: (Maybe NonEmptyString)
- opTargetNodeUuid :: (Maybe NonEmptyString)
- opIgnoreIpolicy :: Bool
- opMigrationCleanup :: Bool
- opIallocator :: (Maybe NonEmptyString)
- | OpInstanceMigrate {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opMigrationMode :: (Maybe MigrationMode)
- opOldLiveMode :: (Maybe Bool)
- opTargetNode :: (Maybe NonEmptyString)
- opTargetNodeUuid :: (Maybe NonEmptyString)
- opAllowRuntimeChanges :: Bool
- opIgnoreIpolicy :: Bool
- opMigrationCleanup :: Bool
- opIallocator :: (Maybe NonEmptyString)
- opAllowFailover :: Bool
- opIgnoreHvversions :: Bool
- | OpInstanceMove {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opShutdownTimeout :: (NonNegative Int)
- opIgnoreIpolicy :: Bool
- opMoveTargetNode :: NonEmptyString
- opMoveTargetNodeUuid :: (Maybe NonEmptyString)
- opCompress :: String
- opIgnoreConsistency :: Bool
- | OpInstanceConsole {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- | OpInstanceActivateDisks {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opIgnoreSize :: Bool
- opWaitForSync :: Bool
- | OpInstanceDeactivateDisks {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opForce :: Bool
- | OpInstanceRecreateDisks {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opRecreateDisksInfo :: RecreateDisksInfo
- opNodes :: [NonEmptyString]
- opNodeUuids :: (Maybe [NonEmptyString])
- opIallocator :: (Maybe NonEmptyString)
- | OpInstanceQueryData {
- opUseLocking :: Bool
- opInstances :: [NonEmptyString]
- opStatic :: Bool
- | OpInstanceSetParams {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opForce :: Bool
- opForceVariant :: Bool
- opIgnoreIpolicy :: Bool
- opInstNicChanges :: (SetParamsMods INicParams)
- opInstDiskChanges :: (SetParamsMods IDiskParams)
- opInstBeParams :: (JSObject JSValue)
- opRuntimeMem :: (Maybe (Positive Int))
- opInstHvParams :: (JSObject JSValue)
- opOptDiskTemplate :: (Maybe DiskTemplate)
- opInstExtParams :: (JSObject JSValue)
- opFileDriver :: (Maybe FileDriver)
- opFileStorageDir :: (Maybe NonEmptyString)
- opPnode :: (Maybe NonEmptyString)
- opPnodeUuid :: (Maybe NonEmptyString)
- opRemoteNode :: (Maybe NonEmptyString)
- opRemoteNodeUuid :: (Maybe NonEmptyString)
- opIallocator :: (Maybe NonEmptyString)
- opOsName :: (Maybe NonEmptyString)
- opInstOsParams :: (JSObject JSValue)
- opOsparamsPrivate :: (Maybe (JSObject (Private JSValue)))
- opWaitForSync :: Bool
- opOffline :: (Maybe Bool)
- opConflictsCheck :: Bool
- opHotplug :: Bool
- opHotplugIfPossible :: Bool
- opOptInstanceCommunication :: (Maybe Bool)
- | OpInstanceGrowDisk {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opWaitForSync :: Bool
- opDiskIndex :: DiskIndex
- opDiskChgAmount :: (NonNegative Int)
- opDiskChkAbsolute :: Bool
- opIgnoreIpolicy :: Bool
- | OpInstanceChangeGroup {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opEarlyRelease :: Bool
- opIallocator :: (Maybe NonEmptyString)
- opTargetGroups :: (Maybe [NonEmptyString])
- | OpGroupAdd {
- opGroupName :: NonEmptyString
- opAllocPolicy :: (Maybe AllocPolicy)
- opNdparams :: (Maybe (JSObject JSValue))
- opDiskparams :: (Maybe (GenericContainer DiskTemplate (JSObject JSValue)))
- opHvState :: (Maybe (JSObject JSValue))
- opDiskState :: (Maybe (JSObject JSValue))
- opIpolicy :: (Maybe (JSObject JSValue))
- | OpGroupAssignNodes {
- opGroupName :: NonEmptyString
- opForce :: Bool
- opReqNodes :: [NonEmptyString]
- opReqNodeUuids :: (Maybe [NonEmptyString])
- | OpGroupSetParams {
- opGroupName :: NonEmptyString
- opAllocPolicy :: (Maybe AllocPolicy)
- opNdparams :: (Maybe (JSObject JSValue))
- opDiskparams :: (Maybe (GenericContainer DiskTemplate (JSObject JSValue)))
- opHvState :: (Maybe (JSObject JSValue))
- opDiskState :: (Maybe (JSObject JSValue))
- opIpolicy :: (Maybe (JSObject JSValue))
- | OpGroupRemove { }
- | OpGroupRename { }
- | OpGroupEvacuate {
- opGroupName :: NonEmptyString
- opEarlyRelease :: Bool
- opIallocator :: (Maybe NonEmptyString)
- opTargetGroups :: (Maybe [NonEmptyString])
- opSequential :: Bool
- opForceFailover :: Bool
- | OpOsDiagnose { }
- | OpExtStorageDiagnose { }
- | OpBackupPrepare {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opExportMode :: ExportMode
- | OpBackupExport {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- opCompress :: String
- opShutdownTimeout :: (NonNegative Int)
- opExportTarget :: ExportTarget
- opExportTargetNodeUuid :: (Maybe NonEmptyString)
- opShutdown :: Bool
- opRemoveInstance :: Bool
- opIgnoreRemoveFailures :: Bool
- opExportMode :: ExportMode
- opX509KeyName :: (Maybe [JSValue])
- opDestinationX509Ca :: (Maybe NonEmptyString)
- opZeroFreeSpace :: Bool
- opZeroingTimeoutFixed :: (Maybe Int)
- opZeroingTimeoutPerMib :: (Maybe Double)
- opLongSleep :: Bool
- | OpBackupRemove {
- opInstanceName :: String
- opInstanceUuid :: (Maybe NonEmptyString)
- | OpTagsGet {
- opKind :: TagKind
- opUseLocking :: Bool
- opTagsGetName :: (Maybe String)
- | OpTagsSearch { }
- | OpTagsSet {
- opKind :: TagKind
- opTagsList :: [String]
- opTagsGetName :: (Maybe String)
- | OpTagsDel {
- opKind :: TagKind
- opTagsList :: [String]
- opTagsGetName :: (Maybe String)
- | OpTestDelay {
- opDelayDuration :: Double
- opDelayOnMaster :: Bool
- opDelayOnNodes :: [NonEmptyString]
- opDelayOnNodeUuids :: (Maybe [NonEmptyString])
- opDelayRepeat :: (NonNegative Int)
- opDelayInterruptible :: Bool
- opDelayNoLocks :: Bool
- | OpTestAllocator {
- opIAllocatorDirection :: IAllocatorTestDir
- opIAllocatorMode :: IAllocatorMode
- opIAllocatorReqName :: NonEmptyString
- opIAllocatorNics :: (Maybe [INicParams])
- opIAllocatorDisks :: (Maybe [JSValue])
- opHypervisor :: (Maybe Hypervisor)
- opIallocator :: (Maybe NonEmptyString)
- opInstTags :: [NonEmptyString]
- opIAllocatorMem :: (Maybe (NonNegative Int))
- opIAllocatorVCpus :: (Maybe (NonNegative Int))
- opIAllocatorOs :: (Maybe NonEmptyString)
- opOptDiskTemplate :: (Maybe DiskTemplate)
- opIAllocatorInstances :: (Maybe [NonEmptyString])
- opIAllocatorEvacMode :: (Maybe EvacMode)
- opTargetGroups :: (Maybe [NonEmptyString])
- opIAllocatorSpindleUse :: (NonNegative Int)
- opIAllocatorCount :: (NonNegative Int)
- opOptGroupName :: (Maybe NonEmptyString)
- | OpTestJqueue {
- opNotifyWaitlock :: Bool
- opNotifyExec :: Bool
- opLogMessages :: [String]
- opJQueueFail :: Bool
- | OpTestOsParams {
- opOsparamsSecret :: (Maybe (JSObject (Secret JSValue)))
- | OpTestDummy {
- opTestDummyResult :: JSValue
- opTestDummyMessages :: JSValue
- opTestDummyFail :: JSValue
- opTestDummySubmitJobs :: JSValue
- | OpNetworkAdd {
- opNetworkName :: NonEmptyString
- opNetworkAddress4 :: IPv4Network
- opNetworkGateway4 :: (Maybe IPv4Address)
- opNetworkAddress6 :: (Maybe IPv6Network)
- opNetworkGateway6 :: (Maybe IPv6Address)
- opNetMacPrefix :: (Maybe NonEmptyString)
- opNetworkAddRsvdIps :: (Maybe [IPv4Address])
- opConflictsCheck :: Bool
- opInstTags :: [NonEmptyString]
- | OpNetworkRemove {
- opNetworkName :: NonEmptyString
- opForce :: Bool
- | OpNetworkSetParams {
- opNetworkName :: NonEmptyString
- opNetworkGateway4 :: (Maybe IPv4Address)
- opNetworkAddress6 :: (Maybe IPv6Network)
- opNetworkGateway6 :: (Maybe IPv6Address)
- opNetMacPrefix :: (Maybe NonEmptyString)
- opNetworkAddRsvdIps :: (Maybe [IPv4Address])
- opNetworkRemoveRsvdIps :: (Maybe [IPv4Address])
- | OpNetworkConnect {
- opGroupName :: NonEmptyString
- opNetworkName :: NonEmptyString
- opNetworkMode :: NICMode
- opNetworkLink :: NonEmptyString
- opNetworkVlan :: String
- opConflictsCheck :: Bool
- | OpNetworkDisconnect { }
- = OpClusterPostInit {
- pyClasses :: [OpCodeDescriptor]
- allOpFields :: String -> [String]
- opID :: OpCode -> String
- allOpIDs :: [String]
- opReasonSrcID :: OpCode -> String
- opSummaryVal :: OpCode -> Maybe String
- opSummary :: OpCode -> String
- data CommonOpParams = CommonOpParams {
- opDryRun :: (Maybe Bool)
- opDebugLevel :: (Maybe (NonNegative Int))
- opPriority :: OpSubmitPriority
- opDepends :: (Maybe [JobDependency])
- opComment :: (Maybe String)
- opReason :: ReasonTrail
- loadCommonOpParams :: JSValue -> Result CommonOpParams
- saveCommonOpParams :: CommonOpParams -> JSValue
- defOpParams :: CommonOpParams
- resolveDependsCommon :: MonadFail m => CommonOpParams -> JobId -> m CommonOpParams
- data MetaOpCode = MetaOpCode {}
- resolveDependencies :: MonadFail m => MetaOpCode -> JobId -> m MetaOpCode
- wrapOpCode :: OpCode -> MetaOpCode
- setOpComment :: String -> MetaOpCode -> MetaOpCode
- setOpPriority :: OpSubmitPriority -> MetaOpCode -> MetaOpCode
Documentation
type JobIdListOnly = Map String [(Bool, Either String JobId)] Source #
type InstanceMultiAllocResponse = ([(Bool, Either String JobId)], NonEmptyString) Source #
type QueryFieldDef = (NonEmptyString, NonEmptyString, TagKind, NonEmptyString) Source #
type QueryResponse = ([QueryFieldDef], [[(QueryResultCode, JSValue)]]) Source #
type QueryFieldsResponse = [QueryFieldDef] Source #
OpCode representation.
We only implement a subset of Ganeti opcodes: those which are actually used in the htools codebase.
pyClasses :: [OpCodeDescriptor] Source #
allOpFields :: String -> [String] Source #
opReasonSrcID :: OpCode -> String Source #
Convert the opcode name to lowercase with underscores and strip
the Op
prefix.
opSummaryVal :: OpCode -> Maybe String Source #
Generates the summary value for an opcode.
data CommonOpParams Source #
Generic/common opcode parameters.
CommonOpParams | |
|
Instances
loadCommonOpParams :: JSValue -> Result CommonOpParams Source #
saveCommonOpParams :: CommonOpParams -> JSValue Source #
defOpParams :: CommonOpParams Source #
Default common parameter values.
resolveDependsCommon :: MonadFail m => CommonOpParams -> JobId -> m CommonOpParams Source #
Resolve relative dependencies to absolute ones, given the job ID.
data MetaOpCode Source #
The top-level opcode type.
Instances
resolveDependencies :: MonadFail m => MetaOpCode -> JobId -> m MetaOpCode Source #
Resolve relative dependencies to absolute ones, given the job Id.
wrapOpCode :: OpCode -> MetaOpCode Source #
Wraps an OpCode
with the default parameters to build a
MetaOpCode
.
setOpComment :: String -> MetaOpCode -> MetaOpCode Source #
Sets the comment on a meta opcode.
setOpPriority :: OpSubmitPriority -> MetaOpCode -> MetaOpCode Source #
Sets the priority on a meta opcode.