Trees | Indices | Help |
|
---|
|
OpCodes module
This module implements the data structures which define the cluster operations - the so-called opcodes.
Every operation which modifies the cluster state is expressed via opcodes.
|
|||
_AutoOpParamSlots Meta class for opcode definitions. |
|||
BaseOpCode A simple serializable object. |
|||
OpCode Abstract OpCode. |
|||
OpClusterPostInit Post cluster initialization. |
|||
OpClusterDestroy Destroy the cluster. |
|||
OpClusterQuery Query cluster information. |
|||
OpClusterVerify Submits all jobs necessary to verify the cluster. |
|||
OpClusterVerifyConfig Verify the cluster config. |
|||
OpClusterVerifyGroup Run verify on a node group from the cluster. |
|||
OpClusterVerifyDisks Verify the cluster disks. |
|||
OpGroupVerifyDisks Verifies the status of all disks in a node group. |
|||
OpClusterRepairDiskSizes Verify the disk sizes of the instances and fixes configuration mimatches. |
|||
OpClusterConfigQuery Query cluster configuration values. |
|||
OpClusterRename Rename the cluster. |
|||
OpClusterSetParams Change the parameters of the cluster. |
|||
OpClusterRedistConf Force a full push of the cluster configuration. |
|||
OpClusterActivateMasterIp Activate the master IP on the master node. |
|||
OpClusterDeactivateMasterIp Deactivate the master IP on the master node. |
|||
OpQuery Query for resources/items. |
|||
OpQueryFields Query for available resource/item fields. |
|||
OpOobCommand Interact with OOB. |
|||
OpRestrictedCommand Runs a restricted command on node(s). |
|||
OpNodeRemove Remove a node. |
|||
OpNodeAdd Add a node to the cluster. |
|||
OpNodeQuery Compute the list of nodes. |
|||
OpNodeQueryvols Get list of volumes on node. |
|||
OpNodeQueryStorage Get information on storage for node(s). |
|||
OpNodeModifyStorage Modifies the properies of a storage unit |
|||
OpRepairNodeStorage Repairs the volume group on a node. |
|||
OpNodeSetParams Change the parameters of a node. |
|||
OpNodePowercycle Tries to powercycle a node. |
|||
OpNodeMigrate Migrate all instances from a node. |
|||
OpNodeEvacuate Evacuate instances off a number of nodes. |
|||
OpInstanceCreate Create an instance. |
|||
OpInstanceMultiAlloc Allocates multiple instances. |
|||
OpInstanceReinstall Reinstall an instance's OS. |
|||
OpInstanceRemove Remove an instance. |
|||
OpInstanceRename Rename an instance. |
|||
OpInstanceStartup Startup an instance. |
|||
OpInstanceShutdown Shutdown an instance. |
|||
OpInstanceReboot Reboot an instance. |
|||
OpInstanceReplaceDisks Replace the disks of an instance. |
|||
OpInstanceFailover Failover an instance. |
|||
OpInstanceMigrate Migrate an instance. |
|||
OpInstanceMove Move an instance. |
|||
OpInstanceConsole Connect to an instance's console. |
|||
OpInstanceActivateDisks Activate an instance's disks. |
|||
OpInstanceDeactivateDisks Deactivate an instance's disks. |
|||
OpInstanceRecreateDisks Recreate an instance's disks. |
|||
OpInstanceQuery Compute the list of instances. |
|||
OpInstanceQueryData Compute the run-time status of instances. |
|||
OpInstanceSetParams Change the parameters of an instance. |
|||
OpInstanceGrowDisk Grow a disk of an instance. |
|||
OpInstanceChangeGroup Moves an instance to another node group. |
|||
OpGroupAdd Add a node group to the cluster. |
|||
OpGroupAssignNodes Assign nodes to a node group. |
|||
OpGroupQuery Compute the list of node groups. |
|||
OpGroupSetParams Change the parameters of a node group. |
|||
OpGroupRemove Remove a node group from the cluster. |
|||
OpGroupRename Rename a node group in the cluster. |
|||
OpGroupEvacuate Evacuate a node group in the cluster. |
|||
OpOsDiagnose Compute the list of guest operating systems. |
|||
OpExtStorageDiagnose Compute the list of external storage providers. |
|||
OpBackupQuery Compute the list of exported images. |
|||
OpBackupPrepare Prepares an instance export. |
|||
OpBackupExport Export an instance. |
|||
OpBackupRemove Remove an instance's export. |
|||
OpTagsGet Returns the tags of the given object. |
|||
OpTagsSearch Searches the tags in the cluster for a given pattern. |
|||
OpTagsSet Add a list of tags on a given object. |
|||
OpTagsDel Remove a list of tags from a given object. |
|||
OpTestDelay Sleeps for a configured amount of time. |
|||
OpTestAllocator Allocator framework testing. |
|||
OpTestJqueue Utility opcode to test some aspects of the job queue. |
|||
OpTestDummy Utility opcode used by unittests. |
|||
OpNetworkAdd Add an IP network to the cluster. |
|||
OpNetworkRemove Remove an existing network from the cluster. |
|||
OpNetworkSetParams Modify Network's parameters except for IPv4 subnet |
|||
OpNetworkConnect Connect a Network to a specific Nodegroup with the defined netparams (mode, link). |
|||
OpNetworkDisconnect Disconnect a Network from a Nodegroup. |
|||
OpNetworkQuery Compute the list of networks. |
|
|||
array of strings |
|
||
string |
|
||
string |
|
||
|
|||
|
|||
|
|||
|
|||
callable |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
callable |
|
||
|
|||
|
|
|||
_POutputFields = "output_fields", ht.NoDefault, ht.TListOf(ht. output fields for a query operation |
|||
_PShutdownTimeout = "shutdown_timeout", constants.DEFAULT_SHUT the shutdown timeout |
|||
_PForce = "force", False, ht.TBool, "Whether to force the oper the force parameter |
|||
_PInstanceName = "instance_name", ht.NoDefault, ht.TNonEmptySt a required instance name (for single-instance LUs) |
|||
_PIgnoreOfflineNodes = "ignore_offline_nodes", False, ht.TBool Whether to ignore offline nodes |
|||
_PNodeName = "node_name", ht.NoDefault, ht.TNonEmptyString, "N a required node name (for single-node LUs) |
|||
_PGroupName = "group_name", ht.NoDefault, ht.TNonEmptyString, a required node group name (for single-group LUs) |
|||
_PMigrationMode = "mode", None, ht.TMaybe(ht.TElemOf(constants Migration type (live/non-live) |
|||
_PMigrationLive = "live", None, ht.TMaybeBool, "Legacy setting Obsolete 'live' migration mode (boolean) |
|||
_PTagKind = "kind", ht.NoDefault, ht.TElemOf(constants.VALID_T Tag type |
|||
_PTags = "tags", ht.NoDefault, ht.TListOf(ht.TNonEmptyString), List of tag strings |
|||
_PForceVariant = "force_variant", False, ht.TBool, "Whether to
|
|||
_PWaitForSync = "wait_for_sync", True, ht.TBool, "Whether to w
|
|||
_PWaitForSyncFalse = "wait_for_sync", False, ht.TBool, "Whethe
|
|||
_PIgnoreConsistency = "ignore_consistency", False, ht.TBool, "
|
|||
_PStorageName = "name", ht.NoDefault, ht.TMaybeString, "Storag
|
|||
_PUseLocking = "use_locking", False, ht.TBool, "Whether to use
|
|||
_PNameCheck = "name_check", True, ht.TBool, "Whether to check
|
|||
_PNodeGroupAllocPolicy = "alloc_policy", None, ht.TMaybe(ht.TE
|
|||
_PGroupNodeParams = "ndparams", None, ht.TMaybeDict, "Default
|
|||
_PQueryWhat = "what", ht.NoDefault, ht.TElemOf(constants.QR_VI
|
|||
_PEarlyRelease = "early_release", False, ht.TBool, "Whether to
|
|||
_PIpCheckDoc = "Whether to ensure instance's IP address is ina
|
|||
_PNoRemember = "no_remember", False, ht.TBool, "Do not remembe Do not remember instance state changes |
|||
_PMigrationTargetNode = "target_node", None, ht.TMaybeString, Target node for instance migration/failover |
|||
_PStartupPaused = "startup_paused", False, ht.TBool, "Pause in
|
|||
_PVerbose = "verbose", False, ht.TBool, "Verbose mode"
|
|||
_PDebugSimulateErrors = "debug_simulate_errors", False, ht.TBo
|
|||
_PErrorCodes = "error_codes", False, ht.TBool, "Error codes"
|
|||
_PSkipChecks = "skip_checks", ht.EmptyList, ht.TListOf(ht.TEle
|
|||
_PIgnoreErrors = "ignore_errors", ht.EmptyList, ht.TListOf(ht.
|
|||
_PDiskParams = "diskparams", None, ht.TMaybe(ht.TDictOf(ht.TEl
|
|||
_PHvState = "hv_state", None, ht.TMaybeDict, "Set hypervisor s
|
|||
_PDiskState = "disk_state", None, ht.TMaybeDict, "Set disk sta
|
|||
_POpportunisticLocking = "opportunistic_locking", False, ht.TB Opportunistic locking |
|||
_PIgnoreIpolicy = "ignore_ipolicy", False, ht.TBool, "Whether
|
|||
_PAllowRuntimeChgs = "allow_runtime_changes", True, ht.TBool,
|
|||
_PIAllocFromDesc = lambda desc: IAllocator field builder |
|||
_PNetworkName = "network_name", ht.NoDefault, ht.TNonEmptyStri a required network name |
|||
_PTargetGroups = "target_groups", None, ht.TMaybeListOf(ht.TNo
|
|||
_OPID_RE = re.compile("([a-z])([A-Z])") OP_ID conversion regular expression |
|||
_TestClusterOsListItem = ht.TAnd(ht.TIsLength(2), ht.TItems([h Utility function for OpClusterSetParams |
|||
_TestClusterOsList = ht.TMaybeListOf(_TestClusterOsListItem)
|
|||
_TestNicDef = ht.Comment("NIC parameters")(ht.TDictOf(ht.TElem Utility function for testing NIC definitions |
|||
_TSetParamsResultItemItems = [ht.Comment("name of changed para
|
|||
_TSetParamsResult = ht.TListOf(ht.TAnd(ht.TIsLength(len(_TSetP
|
|||
_TDiskParams = ht.Comment("Disk parameters")(ht.TDictOf(ht.TNo
|
|||
_TQueryRow = ht.TListOf(ht.TAnd(ht.TIsLength(2), ht.TItems([ht
|
|||
_TQueryResult = ht.TListOf(_TQueryRow)
|
|||
_TOldQueryRow = ht.TListOf(ht.TAny)
|
|||
_TOldQueryResult = ht.TListOf(_TOldQueryRow)
|
|||
_SUMMARY_PREFIX = {"CLUSTER_": "C_", "GROUP_": "G_", "NODE_":
|
|||
DEPEND_ATTR = "depends" Attribute name for dependencies |
|||
COMMENT_ATTR = "comment" Attribute name for comment |
|||
_TQueryFieldDef = _GenerateObjectTypeCheck(objects.QueryFieldD
|
|||
_PStorageType = "storage_type", ht.NoDefault, _CheckStorageTyp Storage type parameter |
|||
_TIpAddress4 = ht.TAnd(ht.TString, _CheckCIDRAddrNotation)
|
|||
_TIpAddress6 = ht.TAnd(ht.TString, _CheckCIDR6AddrNotation)
|
|||
_TIpNetwork4 = ht.TAnd(ht.TString, _CheckCIDRNetNotation)
|
|||
_TIpNetwork6 = ht.TAnd(ht.TString, _CheckCIDR6NetNotation)
|
|||
_TMaybeAddr4List = ht.TMaybe(ht.TListOf(_TIpAddress4))
|
|||
TNoRelativeJobDependencies = _BuildJobDepCheck(False)
|
|||
_TJobIdListItem = ht.TAnd(ht.TIsLength(2), ht.TItems([ht.Comme List of submission status and job ID as returned by SubmitManyJobs
|
|||
TJobIdList = ht.TListOf(_TJobIdListItem)
|
|||
TJobIdListOnly = ht.TStrictDict(True, True, {constants.JOB_IDS Result containing only list of submitted jobs |
|||
OP_MAPPING = dict((v.OP_ID, v) for v in _GetOpList())
|
Imports: logging, re, ipaddr, constants, errors, ht, objects, outils
|
Split an opcode class name into its components
|
Convert an opcode class name to an OP_ID.
|
Convert an opcode class name to a source string for the reason trail
|
Helper to generate type checks for objects.
|
Checks that file storage is enabled. While it doesn't really fit into this module, utils was deemed too large of a dependency to be imported for just one or two functions.
|
Checks that shared file storage is enabled. While it doesn't really fit into this module, utils was deemed too large of a dependency to be imported for just one or two functions.
|
Ensures file storage is enabled if used.
|
Builds check for disk template.
|
Ensure a given CIDR notation type is valid.
|
Ensure a given CIDR notation type is valid.
|
Ensure a given CIDR notation type is valid.
|
Ensure a given CIDR notation type is valid.
|
Builds check for job dependencies (DEPEND_ATTR).
|
Returns list of all defined opcodes. Does not eliminate duplicates by |
|
_POutputFieldsoutput fields for a query operation
|
_PShutdownTimeoutthe shutdown timeout
|
_PForcethe force parameter
|
_PInstanceNamea required instance name (for single-instance LUs)
|
_PIgnoreOfflineNodesWhether to ignore offline nodes
|
_PNodeNamea required node name (for single-node LUs)
|
_PGroupNamea required node group name (for single-group LUs)
|
_PMigrationModeMigration type (live/non-live)
|
_PMigrationLiveObsolete 'live' migration mode (boolean)
|
_PTagKindTag type
|
_PTagsList of tag strings
|
_PForceVariant
|
_PWaitForSync
|
_PWaitForSyncFalse
|
_PIgnoreConsistency
|
_PStorageName
|
_PUseLocking
|
_PNameCheck
|
_PNodeGroupAllocPolicy
|
_PGroupNodeParams
|
_PQueryWhat
|
_PEarlyRelease
|
_PIpCheckDoc
|
_PNoRememberDo not remember instance state changes
|
_PMigrationTargetNodeTarget node for instance migration/failover
|
_PStartupPaused
|
_PDebugSimulateErrors
|
_PSkipChecks
|
_PIgnoreErrors
|
_PDiskParams
|
_PHvState
|
_PDiskState
|
_POpportunisticLockingOpportunistic locking
|
_PIgnoreIpolicy
|
_PAllowRuntimeChgs
|
_PNetworkNamea required network name
|
_PTargetGroups
|
_TestClusterOsListItemUtility function for OpClusterSetParams
|
_TestNicDefUtility function for testing NIC definitions
|
_TSetParamsResultItemItems
|
_TSetParamsResult
|
_TDiskParams
|
_TQueryRow
|
_SUMMARY_PREFIX
|
_TQueryFieldDef
|
_PStorageTypeStorage type parameter
|
_TJobIdListItemList of submission status and job ID as returned by
|
TJobIdListOnlyResult containing only list of submitted jobs
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jul 4 09:38:35 2014 | http://epydoc.sourceforge.net |