X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/4b7735f913d2c5ca556098f5a33f849e667f4f16..9dce4771fe3c21e063d5ef4e2523f2433d850474:/lib/opcodes.py diff --git a/lib/opcodes.py b/lib/opcodes.py index 958ee42..c40d51b 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -171,6 +171,8 @@ class OpCode(BaseOpCode): return txt +# cluster opcodes + class OpDestroyCluster(OpCode): """Destroy the cluster. @@ -260,10 +262,19 @@ class OpSetClusterParams(OpCode): "enabled_hypervisors", "hvparams", "beparams", + "nicparams", "candidate_pool_size", ] +class OpRedistributeConfig(OpCode): + """Force a full push of the cluster configuration. + + """ + OP_ID = "OP_CLUSTER_REDIST_CONF" + __slots__ = [ + ] + # node opcodes class OpRemoveNode(OpCode): @@ -309,7 +320,7 @@ class OpAddNode(OpCode): class OpQueryNodes(OpCode): """Compute the list of nodes.""" OP_ID = "OP_NODE_QUERY" - __slots__ = ["output_fields", "names"] + __slots__ = ["output_fields", "names", "use_locking"] class OpQueryNodeVolumes(OpCode): @@ -326,6 +337,18 @@ class OpSetNodeParams(OpCode): "node_name", "force", "master_candidate", + "offline", + "drained", + ] + + +class OpPowercycleNode(OpCode): + """Tries to powercycle a node.""" + OP_ID = "OP_NODE_POWERCYCLE" + OP_DSC_FIELD = "node_name" + __slots__ = [ + "node_name", + "force", ] # instance opcodes @@ -370,7 +393,7 @@ class OpStartupInstance(OpCode): """Startup an instance.""" OP_ID = "OP_INSTANCE_STARTUP" OP_DSC_FIELD = "instance_name" - __slots__ = ["instance_name", "force", "extra_args"] + __slots__ = ["instance_name", "force", "hvparams", "beparams"] class OpShutdownInstance(OpCode): @@ -384,8 +407,7 @@ class OpRebootInstance(OpCode): """Reboot an instance.""" OP_ID = "OP_INSTANCE_REBOOT" OP_DSC_FIELD = "instance_name" - __slots__ = ["instance_name", "reboot_type", "extra_args", - "ignore_secondaries" ] + __slots__ = ["instance_name", "reboot_type", "ignore_secondaries" ] class OpReplaceDisks(OpCode): @@ -402,6 +424,20 @@ class OpFailoverInstance(OpCode): __slots__ = ["instance_name", "ignore_consistency"] +class OpMigrateInstance(OpCode): + """Migrate an instance. + + This migrates (without shutting down an instance) to its secondary + node. + + @ivar instance_name: the name of the instance + + """ + OP_ID = "OP_INSTANCE_MIGRATE" + OP_DSC_FIELD = "instance_name" + __slots__ = ["instance_name", "live", "cleanup"] + + class OpConnectConsole(OpCode): """Connect to an instance's console.""" OP_ID = "OP_INSTANCE_CONSOLE" @@ -426,7 +462,7 @@ class OpDeactivateInstanceDisks(OpCode): class OpQueryInstances(OpCode): """Compute the list of instances.""" OP_ID = "OP_INSTANCE_QUERY" - __slots__ = ["output_fields", "names"] + __slots__ = ["output_fields", "names", "use_locking"] class OpQueryInstanceData(OpCode): @@ -464,7 +500,7 @@ class OpDiagnoseOS(OpCode): class OpQueryExports(OpCode): """Compute the list of exported images.""" OP_ID = "OP_BACKUP_QUERY" - __slots__ = ["nodes"] + __slots__ = ["nodes", "use_locking"] class OpExportInstance(OpCode):