ganeti

Safe HaskellNone

Ganeti.OpCodes

Contents

Description

Implementation of the opcodes.

Synopsis

Documentation

data OpCode Source #

OpCode representation.

We only implement a subset of Ganeti opcodes: those which are actually used in the htools codebase.

Constructors

OpClusterPostInit 
OpClusterDestroy 
OpClusterQuery 
OpClusterVerify 
OpClusterVerifyConfig 
OpClusterVerifyGroup 
OpClusterVerifyDisks 

Fields

OpGroupVerifyDisks 
OpClusterRepairDiskSizes 
OpClusterConfigQuery 
OpClusterRename 
OpClusterSetParams 

Fields

OpClusterRedistConf 
OpClusterActivateMasterIp 
OpClusterDeactivateMasterIp 
OpClusterRenewCrypto 

Fields

OpQuery 

Fields

OpQueryFields 
OpOobCommand 
OpRestrictedCommand 
OpNodeRemove 
OpNodeAdd 

Fields

OpNodeQueryvols 
OpNodeQueryStorage 
OpNodeModifyStorage 
OpRepairNodeStorage 
OpNodeSetParams 

Fields

OpNodePowercycle 
OpNodeMigrate 
OpNodeEvacuate 
OpInstanceCreate 

Fields

OpInstanceMultiAlloc 

Fields

OpInstanceReinstall 

Fields

OpInstanceRemove 
OpInstanceRename 

Fields

OpInstanceStartup 

Fields

OpInstanceShutdown 
OpInstanceReboot 
OpInstanceReplaceDisks 
OpInstanceFailover 
OpInstanceMigrate 
OpInstanceMove 
OpInstanceConsole 

Fields

OpInstanceActivateDisks 

Fields

OpInstanceDeactivateDisks 

Fields

OpInstanceRecreateDisks 
OpInstanceQueryData 

Fields

OpInstanceSetParams 

Fields

OpInstanceGrowDisk 
OpInstanceChangeGroup 
OpGroupAdd 

Fields

OpGroupAssignNodes 
OpGroupSetParams 

Fields

OpGroupRemove 
OpGroupRename 
OpGroupEvacuate 
OpOsDiagnose 
OpExtStorageDiagnose 
OpBackupPrepare 
OpBackupExport 
OpBackupRemove 

Fields

OpTagsGet 

Fields

OpTagsSearch 
OpTagsSet 

Fields

OpTagsDel 

Fields

OpTestDelay 
OpTestAllocator 
OpTestJqueue 

Fields

OpTestOsParams 

Fields

OpTestDummy 

Fields

OpNetworkAdd 
OpNetworkRemove 
OpNetworkSetParams 
OpNetworkConnect 
OpNetworkDisconnect 
Instances
Eq OpCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

(==) :: OpCode -> OpCode -> Bool

(/=) :: OpCode -> OpCode -> Bool

Ord OpCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

compare :: OpCode -> OpCode -> Ordering

(<) :: OpCode -> OpCode -> Bool

(<=) :: OpCode -> OpCode -> Bool

(>) :: OpCode -> OpCode -> Bool

(>=) :: OpCode -> OpCode -> Bool

max :: OpCode -> OpCode -> OpCode

min :: OpCode -> OpCode -> OpCode

Show OpCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

showsPrec :: Int -> OpCode -> ShowS

show :: OpCode -> String

showList :: [OpCode] -> ShowS

JSON OpCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

readJSON :: JSValue -> Result OpCode

showJSON :: OpCode -> JSValue

readJSONs :: JSValue -> Result [OpCode]

showJSONs :: [OpCode] -> JSValue

DictObject OpCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

toDict :: OpCode -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result OpCode Source #

fromDict :: [(String, JSValue)] -> Result OpCode Source #

Arbitrary OpCode 
Instance details

Defined in Test.Ganeti.OpCodes

Methods

arbitrary :: Gen OpCode

shrink :: OpCode -> [OpCode]

allOpFields :: String -> [String] Source #

opID :: OpCode -> String Source #

Returns the OP_ID for a given opcode value.

allOpIDs :: [String] Source #

A list of all defined/supported opcode IDs.

opReasonSrcID :: OpCode -> String Source #

Convert the opcode name to lowercase with underscores and strip the Op prefix.

opSummary :: OpCode -> String Source #

Computes the summary of the opcode.

data CommonOpParams Source #

Generic/common opcode parameters.

Constructors

CommonOpParams 

Fields

Instances
Eq CommonOpParams # 
Instance details

Defined in Ganeti.OpCodes

Ord CommonOpParams # 
Instance details

Defined in Ganeti.OpCodes

Show CommonOpParams # 
Instance details

Defined in Ganeti.OpCodes

Methods

showsPrec :: Int -> CommonOpParams -> ShowS

show :: CommonOpParams -> String

showList :: [CommonOpParams] -> ShowS

JSON CommonOpParams # 
Instance details

Defined in Ganeti.OpCodes

Methods

readJSON :: JSValue -> Result CommonOpParams

showJSON :: CommonOpParams -> JSValue

readJSONs :: JSValue -> Result [CommonOpParams]

showJSONs :: [CommonOpParams] -> JSValue

ArrayObject CommonOpParams # 
Instance details

Defined in Ganeti.OpCodes

Methods

toJSArray :: CommonOpParams -> [JSValue] Source #

fromJSArray :: [JSValue] -> Result CommonOpParams Source #

DictObject CommonOpParams # 
Instance details

Defined in Ganeti.OpCodes

Methods

toDict :: CommonOpParams -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result CommonOpParams Source #

fromDict :: [(String, JSValue)] -> Result CommonOpParams Source #

Arbitrary CommonOpParams 
Instance details

Defined in Test.Ganeti.OpCodes

defOpParams :: CommonOpParams Source #

Default common parameter values.

data MetaOpCode Source #

The top-level opcode type.

Instances
Eq MetaOpCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

(==) :: MetaOpCode -> MetaOpCode -> Bool

(/=) :: MetaOpCode -> MetaOpCode -> Bool

Ord MetaOpCode # 
Instance details

Defined in Ganeti.OpCodes

Show MetaOpCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

showsPrec :: Int -> MetaOpCode -> ShowS

show :: MetaOpCode -> String

showList :: [MetaOpCode] -> ShowS

JSON MetaOpCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

readJSON :: JSValue -> Result MetaOpCode

showJSON :: MetaOpCode -> JSValue

readJSONs :: JSValue -> Result [MetaOpCode]

showJSONs :: [MetaOpCode] -> JSValue

DictObject MetaOpCode # 
Instance details

Defined in Ganeti.OpCodes

Methods

toDict :: MetaOpCode -> [(String, JSValue)] Source #

fromDictWKeys :: [(String, JSValue)] -> WriterT UsedKeys Result MetaOpCode Source #

fromDict :: [(String, JSValue)] -> Result MetaOpCode Source #

Arbitrary MetaOpCode

Arbitrary instance for MetaOpCode, defined here due to TH ordering.

Instance details

Defined in Test.Ganeti.OpCodes

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.

Orphan instances

PyValue JSValue # 
Instance details

Methods

showValue :: JSValue -> String Source #

showValueList :: [JSValue] -> String Source #

PyValue VerifyOptionalChecks # 
Instance details

PyValue CVErrorCode # 
Instance details

Methods

showValue :: CVErrorCode -> String Source #

showValueList :: [CVErrorCode] -> String Source #

PyValue ExportMode # 
Instance details

Methods

showValue :: ExportMode -> String Source #

showValueList :: [ExportMode] -> String Source #

PyValue DiskIndex # 
Instance details

Methods

showValue :: DiskIndex -> String Source #

showValueList :: [DiskIndex] -> String Source #

PyValue INicParams # 
Instance details

Methods

showValue :: INicParams -> String Source #

showValueList :: [INicParams] -> String Source #

PyValue RecreateDisksInfo # 
Instance details

PyValue IDiskParams # 
Instance details

Methods

showValue :: IDiskParams -> String Source #

showValueList :: [IDiskParams] -> String Source #

PyValue a => PyValue (JSObject a) # 
Instance details

Methods

showValue :: JSObject a -> String Source #

showValueList :: [JSObject a] -> String Source #

PyValue a => PyValue (NonEmpty a) # 
Instance details

Methods

showValue :: NonEmpty a -> String Source #

showValueList :: [NonEmpty a] -> String Source #

PyValue a => PyValue (NonNegative a) # 
Instance details

Methods

showValue :: NonNegative a -> String Source #

showValueList :: [NonNegative a] -> String Source #

PyValue a => PyValue (SetParamsMods a) # 
Instance details

Methods

showValue :: SetParamsMods a -> String Source #

showValueList :: [SetParamsMods a] -> String Source #