X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/53c776b5b9204d16d0f1ae15c8e2bc9805d88e45..ac061be9ee8e66e0e93e86b607f19593bca8ee4a:/lib/opcodes.py diff --git a/lib/opcodes.py b/lib/opcodes.py index 6848c4e..f49bfb7 100644 --- a/lib/opcodes.py +++ b/lib/opcodes.py @@ -319,7 +319,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): @@ -337,6 +337,17 @@ class OpSetNodeParams(OpCode): "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 @@ -381,7 +392,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): @@ -395,8 +406,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): @@ -419,10 +429,11 @@ class OpMigrateInstance(OpCode): This migrates (without shutting down an instance) to its secondary node. - @var instance_name: the name of the instance + @ivar instance_name: the name of the instance """ OP_ID = "OP_INSTANCE_MIGRATE" + OP_DSC_FIELD = "instance_name" __slots__ = ["instance_name", "live", "cleanup"] @@ -450,7 +461,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): @@ -488,7 +499,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):