return args
+def _DrbdCallsPreProc(node, args):
+ """Add the target node UUID as additional field for DRBD related calls."""
+ return args + [node]
+
+
def _OsGetPostProc(result):
"""Post-processor for L{rpc.RpcRunner.call_os_get}.
("instance_info", SINGLE, None, constants.RPC_TMO_URGENT, [
("instance", None, "Instance name"),
("hname", None, "Hypervisor type"),
+ ("hvparams", None, "Hypervisor parameters"),
], None, None, "Returns information about a single instance"),
("all_instances_info", MULTI, None, constants.RPC_TMO_URGENT, [
("hypervisor_list", None, "Hypervisors to query for instances"),
+ ("all_hvparams", None, "Dictionary mapping hypervisor names to hvparams"),
], None, None,
"Returns information about all instances on the given nodes"),
("instance_list", MULTI, None, constants.RPC_TMO_URGENT, [
("success", None, "Whether the migration was a success or failure"),
], None, None, "Finalize any target-node migration specific operation"),
("instance_migrate", SINGLE, None, constants.RPC_TMO_SLOW, [
+ ("cluster_name", None, "Cluster name"),
("instance", ED_INST_DICT, "Instance object"),
("target", None, "Target node name"),
("live", None, "Whether the migration should be done live or not"),
("drbd_disconnect_net", MULTI, None, constants.RPC_TMO_NORMAL, [
("nodes_ip", None, None),
("disks", ED_OBJECT_DICT_LIST, None),
- ], None, None, "Disconnects the network of the given drbd devices"),
+ ], _DrbdCallsPreProc, None,
+ "Disconnects the network of the given drbd devices"),
("drbd_attach_net", MULTI, None, constants.RPC_TMO_NORMAL, [
("nodes_ip", None, None),
("disks", ED_DISKS_DICT_DP, None),
("instance_name", None, None),
("multimaster", None, None),
- ], None, None, "Connects the given DRBD devices"),
+ ], _DrbdCallsPreProc, None, "Connects the given DRBD devices"),
("drbd_wait_sync", MULTI, None, constants.RPC_TMO_SLOW, [
("nodes_ip", None, None),
("disks", ED_DISKS_DICT_DP, None),
- ], None, None,
+ ], _DrbdCallsPreProc, None,
"Waits for the synchronization of drbd devices is complete"),
("blockdev_grow", SINGLE, None, constants.RPC_TMO_NORMAL, [
("cf_bdev", ED_SINGLE_DISK_DICT_DP, None),
("storage_units", None,
"List of tuples '<storage_type>,<key>' to ask for disk space"
" information"),
- ("hv_names", None,
- "Names of the hypervisors to ask for node information"),
+ ("hv_specs", None,
+ "List of hypervisor specification (name, hvparams) to ask for node "
+ "information"),
("exclusive_storage", None,
"Whether exclusive storage is enabled"),
], _NodeInfoPreProc, None, "Return node information"),
("node_verify", MULTI, None, constants.RPC_TMO_NORMAL, [
- ("checkdict", None, None),
- ("cluster_name", None, None),
+ ("checkdict", None, "What to verify"),
+ ("cluster_name", None, "Cluster name"),
+ ("all_hvparams", None, "Dictionary mapping hypervisor names to hvparams"),
], None, None, "Request verification of given parameters"),
("node_volumes", MULTI, None, constants.RPC_TMO_FAST, [], None, None,
"Gets all volumes on node(s)"),
"Demote a node from the master candidate role"),
("node_powercycle", SINGLE, ACCEPT_OFFLINE_NODE, constants.RPC_TMO_NORMAL, [
("hypervisor", None, "Hypervisor type"),
+ ("hvparams", None, "Hypervisor parameters"),
], None, None, "Tries to powercycle a node"),
]
("version", MULTI, ACCEPT_OFFLINE_NODE, constants.RPC_TMO_URGENT, [], None,
None, "Query node version"),
("node_verify_light", MULTI, None, constants.RPC_TMO_NORMAL, [
- ("checkdict", None, None),
- ("cluster_name", None, None),
+ ("checkdict", None, "What to verify"),
+ ("cluster_name", None, "Cluster name"),
+ ("hvparams", None, "Dictionary mapping hypervisor names to hvparams"),
], None, None, "Request verification of given parameters"),
]),
"RpcClientConfig": _Prepare([