Revision 0c3d9c7c lib/rpc_defs.py
b/lib/rpc_defs.py | ||
---|---|---|
62 | 62 |
ED_OBJECT_DICT_LIST, |
63 | 63 |
ED_INST_DICT, |
64 | 64 |
ED_INST_DICT_HVP_BEP_DP, |
65 |
ED_NODE_TO_DISK_DICT, |
|
65 |
ED_NODE_TO_DISK_DICT_DP,
|
|
66 | 66 |
ED_INST_DICT_OSP_DP, |
67 | 67 |
ED_IMPEXP_IO, |
68 | 68 |
ED_FILE_DETAILS, |
... | ... | |
143 | 143 |
return args |
144 | 144 |
|
145 | 145 |
|
146 |
def _DrbdCallsPreProc(node, args): |
|
147 |
"""Add the target node UUID as additional field for DRBD related calls.""" |
|
148 |
return args + [node] |
|
149 |
|
|
150 |
|
|
151 | 146 |
def _OsGetPostProc(result): |
152 | 147 |
"""Post-processor for L{rpc.RpcRunner.call_os_get}. |
153 | 148 |
|
... | ... | |
351 | 346 |
], None, None, |
352 | 347 |
"Gets the sizes of requested block devices present on a node"), |
353 | 348 |
("blockdev_create", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
354 |
("bdev", ED_OBJECT_DICT, None),
|
|
349 |
("bdev", ED_SINGLE_DISK_DICT_DP, None),
|
|
355 | 350 |
("size", None, None), |
356 | 351 |
("owner", None, None), |
357 | 352 |
("on_primary", None, None), |
... | ... | |
365 | 360 |
], None, None, |
366 | 361 |
"Request wipe at given offset with given size of a block device"), |
367 | 362 |
("blockdev_remove", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
368 |
("bdev", ED_OBJECT_DICT, None),
|
|
363 |
("bdev", ED_SINGLE_DISK_DICT_DP, None),
|
|
369 | 364 |
], None, None, "Request removal of a given block device"), |
370 | 365 |
("blockdev_pause_resume_sync", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
371 | 366 |
("disks", ED_DISKS_DICT_DP, None), |
... | ... | |
382 | 377 |
], None, None, "Request shutdown of a given block device"), |
383 | 378 |
("blockdev_addchildren", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
384 | 379 |
("bdev", ED_SINGLE_DISK_DICT_DP, None), |
385 |
("ndevs", ED_OBJECT_DICT_LIST, None),
|
|
380 |
("ndevs", ED_DISKS_DICT_DP, None),
|
|
386 | 381 |
], None, None, |
387 | 382 |
"Request adding a list of children to a (mirroring) device"), |
388 | 383 |
("blockdev_removechildren", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
389 |
("bdev", ED_OBJECT_DICT, None),
|
|
390 |
("ndevs", ED_OBJECT_DICT_LIST, None),
|
|
384 |
("bdev", ED_SINGLE_DISK_DICT_DP, None),
|
|
385 |
("ndevs", ED_DISKS_DICT_DP, None),
|
|
391 | 386 |
], None, None, |
392 | 387 |
"Request removing a list of children from a (mirroring) device"), |
393 | 388 |
("blockdev_close", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
394 | 389 |
("instance_name", None, None), |
395 |
("disks", ED_OBJECT_DICT_LIST, None),
|
|
390 |
("disks", ED_DISKS_DICT_DP, None),
|
|
396 | 391 |
], None, None, "Closes the given block devices"), |
397 | 392 |
("blockdev_getdimensions", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
398 |
("disks", ED_OBJECT_DICT_LIST, None),
|
|
393 |
("disks", ED_MULTI_DISKS_DICT_DP, None),
|
|
399 | 394 |
], None, None, "Returns size and spindles of the given disks"), |
400 | 395 |
("drbd_disconnect_net", MULTI, None, constants.RPC_TMO_NORMAL, [ |
401 |
("nodes_ip", None, None), |
|
402 |
("disks", ED_OBJECT_DICT_LIST, None), |
|
403 |
], _DrbdCallsPreProc, None, |
|
396 |
("disks", ED_DISKS_DICT_DP, None), |
|
397 |
], None, None, |
|
404 | 398 |
"Disconnects the network of the given drbd devices"), |
405 | 399 |
("drbd_attach_net", MULTI, None, constants.RPC_TMO_NORMAL, [ |
406 |
("nodes_ip", None, None), |
|
407 | 400 |
("disks", ED_DISKS_DICT_DP, None), |
408 | 401 |
("instance_name", None, None), |
409 | 402 |
("multimaster", None, None), |
410 |
], _DrbdCallsPreProc, None, "Connects the given DRBD devices"),
|
|
403 |
], None, None, "Connects the given DRBD devices"),
|
|
411 | 404 |
("drbd_wait_sync", MULTI, None, constants.RPC_TMO_SLOW, [ |
412 |
("nodes_ip", None, None), |
|
413 | 405 |
("disks", ED_DISKS_DICT_DP, None), |
414 |
], _DrbdCallsPreProc, None,
|
|
406 |
], None, None,
|
|
415 | 407 |
"Waits for the synchronization of drbd devices is complete"), |
416 | 408 |
("drbd_needs_activation", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
417 |
("nodes_ip", None, None), |
|
418 | 409 |
("disks", ED_MULTI_DISKS_DICT_DP, None), |
419 |
], _DrbdCallsPreProc, None,
|
|
410 |
], None, None,
|
|
420 | 411 |
"Returns the drbd disks which need activation"), |
421 | 412 |
("blockdev_grow", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
422 | 413 |
("cf_bdev", ED_SINGLE_DISK_DICT_DP, None), |
... | ... | |
439 | 430 |
("devlist", ED_BLOCKDEV_RENAME, None), |
440 | 431 |
], None, None, "Request rename of the given block devices"), |
441 | 432 |
("blockdev_find", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
442 |
("disk", ED_OBJECT_DICT, None),
|
|
433 |
("disk", ED_SINGLE_DISK_DICT_DP, None),
|
|
443 | 434 |
], None, _BlockdevFindPostProc, |
444 | 435 |
"Request identification of a given block device"), |
445 | 436 |
("blockdev_getmirrorstatus", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
... | ... | |
447 | 438 |
], None, _BlockdevGetMirrorStatusPostProc, |
448 | 439 |
"Request status of a (mirroring) device"), |
449 | 440 |
("blockdev_getmirrorstatus_multi", MULTI, None, constants.RPC_TMO_NORMAL, [ |
450 |
("node_disks", ED_NODE_TO_DISK_DICT, None), |
|
441 |
("node_disks", ED_NODE_TO_DISK_DICT_DP, None),
|
|
451 | 442 |
], _BlockdevGetMirrorStatusMultiPreProc, |
452 | 443 |
_BlockdevGetMirrorStatusMultiPostProc, |
453 | 444 |
"Request status of (mirroring) devices from multiple nodes"), |
454 | 445 |
("blockdev_setinfo", SINGLE, None, constants.RPC_TMO_NORMAL, [ |
455 |
("disk", ED_OBJECT_DICT, None),
|
|
446 |
("disk", ED_SINGLE_DISK_DICT_DP, None),
|
|
456 | 447 |
("info", None, None), |
457 | 448 |
], None, None, "Sets metadata information on a given block device"), |
458 | 449 |
] |
Also available in: Unified diff