class OpCode(opcodes_base.BaseOpCode):
Known subclasses: ganeti.opcodes.OpBackupExport
, ganeti.opcodes.OpBackupPrepare
, ganeti.opcodes.OpBackupRemove
, ganeti.opcodes.OpClusterActivateMasterIp
, ganeti.opcodes.OpClusterConfigQuery
, ganeti.opcodes.OpClusterDeactivateMasterIp
, ganeti.opcodes.OpClusterDestroy
, ganeti.opcodes.OpClusterPostInit
, ganeti.opcodes.OpClusterQuery
, ganeti.opcodes.OpClusterRedistConf
, ganeti.opcodes.OpClusterRename
, ganeti.opcodes.OpClusterRenewCrypto
, ganeti.opcodes.OpClusterRepairDiskSizes
, ganeti.opcodes.OpClusterSetParams
, ganeti.opcodes.OpClusterVerify
, ganeti.opcodes.OpClusterVerifyConfig
, ganeti.opcodes.OpClusterVerifyDisks
, ganeti.opcodes.OpClusterVerifyGroup
, ganeti.opcodes.OpExtStorageDiagnose
, ganeti.opcodes.OpGroupAdd
, ganeti.opcodes.OpGroupAssignNodes
, ganeti.opcodes.OpGroupEvacuate
, ganeti.opcodes.OpGroupRemove
, ganeti.opcodes.OpGroupRename
, ganeti.opcodes.OpGroupSetParams
, ganeti.opcodes.OpGroupVerifyDisks
, ganeti.opcodes.OpInstanceActivateDisks
, ganeti.opcodes.OpInstanceChangeGroup
, ganeti.opcodes.OpInstanceConsole
, ganeti.opcodes.OpInstanceCreate
, ganeti.opcodes.OpInstanceDeactivateDisks
, ganeti.opcodes.OpInstanceFailover
, ganeti.opcodes.OpInstanceGrowDisk
, ganeti.opcodes.OpInstanceMigrate
, ganeti.opcodes.OpInstanceMove
, ganeti.opcodes.OpInstanceMultiAllocBase
, ganeti.opcodes.OpInstanceQueryData
, ganeti.opcodes.OpInstanceReboot
, ganeti.opcodes.OpInstanceRecreateDisks
, ganeti.opcodes.OpInstanceReinstall
, ganeti.opcodes.OpInstanceRemove
, ganeti.opcodes.OpInstanceRename
, ganeti.opcodes.OpInstanceReplaceDisks
, ganeti.opcodes.OpInstanceSetParams
, ganeti.opcodes.OpInstanceShutdown
, ganeti.opcodes.OpInstanceStartup
, ganeti.opcodes.OpNetworkAdd
, ganeti.opcodes.OpNetworkConnect
, ganeti.opcodes.OpNetworkDisconnect
, ganeti.opcodes.OpNetworkRemove
, ganeti.opcodes.OpNetworkRename
, ganeti.opcodes.OpNetworkSetParams
, ganeti.opcodes.OpNodeAdd
, ganeti.opcodes.OpNodeEvacuate
, ganeti.opcodes.OpNodeMigrate
, ganeti.opcodes.OpNodeModifyStorage
, ganeti.opcodes.OpNodePowercycle
, ganeti.opcodes.OpNodeQueryStorage
, ganeti.opcodes.OpNodeQueryvols
, ganeti.opcodes.OpNodeRemove
, ganeti.opcodes.OpNodeSetParams
, ganeti.opcodes.OpOobCommand
, ganeti.opcodes.OpOsDiagnose
, ganeti.opcodes.OpQuery
, ganeti.opcodes.OpQueryFields
, ganeti.opcodes.OpRepairNodeStorage
, ganeti.opcodes.OpRestrictedCommand
, ganeti.opcodes.OpTagsDel
, ganeti.opcodes.OpTagsGet
, ganeti.opcodes.OpTagsSearch
, ganeti.opcodes.OpTagsSet
, ganeti.opcodes.OpTestAllocator
, ganeti.opcodes.OpTestDelay
, ganeti.opcodes.OpTestDummy
, ganeti.opcodes.OpTestJqueue
, ganeti.opcodes.OpTestOsParams
Abstract OpCode.
This is the root of the actual OpCode hierarchy. All clases derived from this class should override OP_ID.
Class Method |
|
Generic load opcode method. |
Method | __getstate__ |
Specialized getstate for opcodes. |
Method |
|
Generates a summary description of this opcode. |
Method |
|
Generates a compact summary description of the opcode. |
Constant | OP |
List of opcode attributes, the default values they should get if not already defined, and types they must match. |
Constant | OP |
Callable to verify opcode result |
Constant | WITH |
Boolean that specifies whether this should be included in mcpu's dispatch table |
Class Variable | OP |
The name of a field whose value will be included in the string returned by Summary(); see the docstring of that method for details). |
Class Variable | OP |
A callable that should format the OP_DSC_FIELD; if not present, then the field will be simply converted to string |
Class Variable | OP |
The ID of this opcode. This should be unique amongst all children of this class. |
Instance Variable | dry |
Whether the LU should be run in dry-run mode, i.e. just the check steps |
Instance Variable | priority |
Opcode priority for queue |
Inherited from BaseOpCode
:
Class Method |
|
Compute list of all parameters for an opcode. |
Method | __init__ |
Constructor for BaseOpCode. |
Method | __setstate__ |
Generic unserializer. |
Method |
|
Validate opcode parameters, optionally setting default values. |
Inherited from ValidatedSlots
(via BaseOpCode
):
Class Method |
|
Compute the list of all declared slots for a class. |
Class Variable | __slots__ |
Undocumented |
Generic load opcode method.
The method identifies the correct opcode class from the dict-form by looking for a OP_ID key, if this is not found, or its value is not available in this module as a child of this class, we fail.
Parameters | |
data:dict | the serialized opcode |
ganeti.opcodes.OpInstanceMultiAllocBase
Specialized getstate for opcodes.
This method adds to the state dictionary the OP_ID of the class, so that on unload we can identify the correct class for instantiating the opcode.
Returns | |
dict | the state as a dictionary |
Generates a summary description of this opcode.
The summary is the value of the OP_ID attribute (without the "OP_" prefix), plus the value of the OP_DSC_FIELD attribute, if one was defined; this field should allow to easily identify the operation (for an instance creation job, e.g., it would be the instance name).
ganeti.opcodes.OpBackupExport
, ganeti.opcodes.OpBackupPrepare
, ganeti.opcodes.OpBackupRemove
, ganeti.opcodes.OpClusterActivateMasterIp
, ganeti.opcodes.OpClusterConfigQuery
, ganeti.opcodes.OpClusterDeactivateMasterIp
, ganeti.opcodes.OpClusterDestroy
, ganeti.opcodes.OpClusterPostInit
, ganeti.opcodes.OpClusterQuery
, ganeti.opcodes.OpClusterRedistConf
, ganeti.opcodes.OpClusterRename
, ganeti.opcodes.OpClusterRenewCrypto
, ganeti.opcodes.OpClusterRepairDiskSizes
, ganeti.opcodes.OpClusterSetParams
, ganeti.opcodes.OpClusterVerify
, ganeti.opcodes.OpClusterVerifyConfig
, ganeti.opcodes.OpClusterVerifyDisks
, ganeti.opcodes.OpClusterVerifyGroup
, ganeti.opcodes.OpExtStorageDiagnose
, ganeti.opcodes.OpGroupAdd
, ganeti.opcodes.OpGroupAssignNodes
, ganeti.opcodes.OpGroupEvacuate
, ganeti.opcodes.OpGroupRemove
, ganeti.opcodes.OpGroupRename
, ganeti.opcodes.OpGroupSetParams
, ganeti.opcodes.OpGroupVerifyDisks
, ganeti.opcodes.OpInstanceActivateDisks
, ganeti.opcodes.OpInstanceChangeGroup
, ganeti.opcodes.OpInstanceConsole
, ganeti.opcodes.OpInstanceCreate
, ganeti.opcodes.OpInstanceDeactivateDisks
, ganeti.opcodes.OpInstanceFailover
, ganeti.opcodes.OpInstanceGrowDisk
, ganeti.opcodes.OpInstanceMigrate
, ganeti.opcodes.OpInstanceMove
, ganeti.opcodes.OpInstanceMultiAlloc
, ganeti.opcodes.OpInstanceQueryData
, ganeti.opcodes.OpInstanceReboot
, ganeti.opcodes.OpInstanceRecreateDisks
, ganeti.opcodes.OpInstanceReinstall
, ganeti.opcodes.OpInstanceRemove
, ganeti.opcodes.OpInstanceRename
, ganeti.opcodes.OpInstanceReplaceDisks
, ganeti.opcodes.OpInstanceSetParams
, ganeti.opcodes.OpInstanceShutdown
, ganeti.opcodes.OpInstanceStartup
, ganeti.opcodes.OpNetworkAdd
, ganeti.opcodes.OpNetworkConnect
, ganeti.opcodes.OpNetworkDisconnect
, ganeti.opcodes.OpNetworkRemove
, ganeti.opcodes.OpNetworkRename
, ganeti.opcodes.OpNetworkSetParams
, ganeti.opcodes.OpNodeAdd
, ganeti.opcodes.OpNodeEvacuate
, ganeti.opcodes.OpNodeMigrate
, ganeti.opcodes.OpNodeModifyStorage
, ganeti.opcodes.OpNodePowercycle
, ganeti.opcodes.OpNodeQueryStorage
, ganeti.opcodes.OpNodeQueryvols
, ganeti.opcodes.OpNodeRemove
, ganeti.opcodes.OpNodeSetParams
, ganeti.opcodes.OpOobCommand
, ganeti.opcodes.OpOsDiagnose
, ganeti.opcodes.OpQuery
, ganeti.opcodes.OpQueryFields
, ganeti.opcodes.OpRepairNodeStorage
, ganeti.opcodes.OpRestrictedCommand
, ganeti.opcodes.OpTagsDel
, ganeti.opcodes.OpTagsGet
, ganeti.opcodes.OpTagsSearch
, ganeti.opcodes.OpTagsSet
, ganeti.opcodes.OpTestAllocator
, ganeti.opcodes.OpTestDelay
, ganeti.opcodes.OpTestDummy
, ganeti.opcodes.OpTestJqueue
, ganeti.opcodes.OpTestOsParams
List of opcode attributes, the default values they should get if not already defined, and types they must match.
Value |
|
ganeti.opcodes.OpBackupExport
, ganeti.opcodes.OpBackupPrepare
, ganeti.opcodes.OpClusterConfigQuery
, ganeti.opcodes.OpClusterQuery
, ganeti.opcodes.OpClusterRepairDiskSizes
, ganeti.opcodes.OpClusterSetParams
, ganeti.opcodes.OpExtStorageDiagnose
, ganeti.opcodes.OpGroupAdd
, ganeti.opcodes.OpGroupSetParams
, ganeti.opcodes.OpGroupVerifyDisks
, ganeti.opcodes.OpInstanceActivateDisks
, ganeti.opcodes.OpInstanceConsole
, ganeti.opcodes.OpInstanceCreate
, ganeti.opcodes.OpInstanceQueryData
, ganeti.opcodes.OpInstanceSetParams
, ganeti.opcodes.OpNodePowercycle
, ganeti.opcodes.OpNodeQueryStorage
, ganeti.opcodes.OpNodeQueryvols
, ganeti.opcodes.OpNodeSetParams
, ganeti.opcodes.OpOobCommand
, ganeti.opcodes.OpOsDiagnose
, ganeti.opcodes.OpRestrictedCommand
, ganeti.opcodes.OpTagsGet
, ganeti.opcodes.OpTagsSearch
Callable to verify opcode result
Value |
|
ganeti.opcodes.OpTestDummy
Boolean that specifies whether this should be included in mcpu's dispatch table
Value |
|
ganeti.opcodes.OpBackupExport
, ganeti.opcodes.OpBackupPrepare
, ganeti.opcodes.OpBackupRemove
, ganeti.opcodes.OpClusterRename
, ganeti.opcodes.OpClusterVerifyGroup
, ganeti.opcodes.OpGroupAdd
, ganeti.opcodes.OpGroupAssignNodes
, ganeti.opcodes.OpGroupEvacuate
, ganeti.opcodes.OpGroupRemove
, ganeti.opcodes.OpGroupSetParams
, ganeti.opcodes.OpGroupVerifyDisks
, ganeti.opcodes.OpInstanceActivateDisks
, ganeti.opcodes.OpInstanceChangeGroup
, ganeti.opcodes.OpInstanceConsole
, ganeti.opcodes.OpInstanceCreate
, ganeti.opcodes.OpInstanceDeactivateDisks
, ganeti.opcodes.OpInstanceFailover
, ganeti.opcodes.OpInstanceGrowDisk
, ganeti.opcodes.OpInstanceMigrate
, ganeti.opcodes.OpInstanceMove
, ganeti.opcodes.OpInstanceReboot
, ganeti.opcodes.OpInstanceRecreateDisks
, ganeti.opcodes.OpInstanceReinstall
, ganeti.opcodes.OpInstanceRemove
, ganeti.opcodes.OpInstanceReplaceDisks
, ganeti.opcodes.OpInstanceSetParams
, ganeti.opcodes.OpInstanceShutdown
, ganeti.opcodes.OpInstanceStartup
, ganeti.opcodes.OpNetworkAdd
, ganeti.opcodes.OpNetworkConnect
, ganeti.opcodes.OpNetworkDisconnect
, ganeti.opcodes.OpNetworkRemove
, ganeti.opcodes.OpNetworkSetParams
, ganeti.opcodes.OpNodeAdd
, ganeti.opcodes.OpNodeEvacuate
, ganeti.opcodes.OpNodeMigrate
, ganeti.opcodes.OpNodeModifyStorage
, ganeti.opcodes.OpNodePowercycle
, ganeti.opcodes.OpNodeRemove
, ganeti.opcodes.OpNodeSetParams
, ganeti.opcodes.OpQuery
, ganeti.opcodes.OpQueryFields
, ganeti.opcodes.OpRepairNodeStorage
, ganeti.opcodes.OpTagsGet
, ganeti.opcodes.OpTagsSearch
, ganeti.opcodes.OpTestAllocator
, ganeti.opcodes.OpTestDelay
The name of a field whose value will be included in the string returned by Summary(); see the docstring of that method for details).
A callable that should format the OP_DSC_FIELD; if not present, then the field will be simply converted to string