return txt
+# cluster opcodes
+
class OpDestroyCluster(OpCode):
"""Destroy the cluster.
"""
OP_ID = "OP_CLUSTER_SET_PARAMS"
- __slots__ = ["vg_name"]
+ __slots__ = [
+ "vg_name",
+ "enabled_hypervisors",
+ "hvparams",
+ "beparams",
+ "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):
__slots__ = ["nodes", "output_fields"]
+class OpSetNodeParams(OpCode):
+ """Change the parameters of a node."""
+ OP_ID = "OP_NODE_SET_PARAMS"
+ OP_DSC_FIELD = "node_name"
+ __slots__ = [
+ "node_name",
+ "force",
+ "master_candidate",
+ "offline",
+ ]
+
# instance opcodes
class OpCreateInstance(OpCode):
OP_ID = "OP_INSTANCE_CREATE"
OP_DSC_FIELD = "instance_name"
__slots__ = [
- "instance_name", "mem_size", "disk_size", "os_type", "pnode",
- "disk_template", "snode", "swap_size", "mode",
- "vcpus", "ip", "bridge", "src_node", "src_path", "start",
- "wait_for_sync", "ip_check", "mac",
+ "instance_name", "os_type", "pnode",
+ "disk_template", "snode", "mode",
+ "disks", "nics",
+ "src_node", "src_path", "start",
+ "wait_for_sync", "ip_check",
"file_storage_dir", "file_driver",
"iallocator",
"hypervisor", "hvparams", "beparams",
__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"
+ __slots__ = ["instance_name", "live", "cleanup"]
+
+
class OpConnectConsole(OpCode):
"""Connect to an instance's console."""
OP_ID = "OP_INSTANCE_CONSOLE"
class OpQueryInstanceData(OpCode):
"""Compute the run-time status of instances."""
OP_ID = "OP_INSTANCE_QUERY_DATA"
- __slots__ = ["instances"]
+ __slots__ = ["instances", "static"]
class OpSetInstanceParams(OpCode):
OP_ID = "OP_INSTANCE_SET_PARAMS"
OP_DSC_FIELD = "instance_name"
__slots__ = [
- "instance_name", "mem", "vcpus", "ip", "bridge", "mac",
- "hvparams", "force",
+ "instance_name",
+ "hvparams", "beparams", "force",
+ "nics", "disks",
]
"""Grow a disk of an instance."""
OP_ID = "OP_INSTANCE_GROW_DISK"
OP_DSC_FIELD = "instance_name"
- __slots__ = ["instance_name", "disk", "amount"]
+ __slots__ = ["instance_name", "disk", "amount", "wait_for_sync"]
# OS opcodes
__slots__ = [
"direction", "mode", "allocator", "name",
"mem_size", "disks", "disk_template",
- "os", "tags", "nics", "vcpus",
+ "os", "tags", "nics", "vcpus", "hypervisor",
]