Revision 5449685e
b/lib/rpc_defs.py | ||
---|---|---|
105 | 105 |
return result |
106 | 106 |
|
107 | 107 |
|
108 |
def _BlockdevGetMirrorStatusMultiPreProc(node, args): |
|
109 |
"""Prepares the appropriate node values for blockdev_getmirrorstatus_multi. |
|
110 |
|
|
111 |
""" |
|
112 |
# there should be only one argument to this RPC, already holding a |
|
113 |
# node->disks dictionary, we just need to extract the value for the |
|
114 |
# current node |
|
115 |
assert len(args) == 1 |
|
116 |
return [args[0][node]] |
|
117 |
|
|
118 |
|
|
108 | 119 |
def _BlockdevGetMirrorStatusMultiPostProc(result): |
109 | 120 |
"""Post-processor for L{rpc.RpcRunner.call_blockdev_getmirrorstatus_multi}. |
110 | 121 |
|
... | ... | |
396 | 407 |
"Request status of a (mirroring) device"), |
397 | 408 |
("blockdev_getmirrorstatus_multi", MULTI, TMO_NORMAL, [ |
398 | 409 |
("node_disks", ED_NODE_TO_DISK_DICT, None), |
399 |
], None, _BlockdevGetMirrorStatusMultiPostProc, |
|
410 |
], _BlockdevGetMirrorStatusMultiPreProc, |
|
411 |
_BlockdevGetMirrorStatusMultiPostProc, |
|
400 | 412 |
"Request status of (mirroring) devices from multiple nodes"), |
401 | 413 |
] |
402 | 414 |
|
b/lib/server/noded.py | ||
---|---|---|
288 | 288 |
""" |
289 | 289 |
(node_disks, ) = params |
290 | 290 |
|
291 |
node_name = netutils.Hostname.GetSysName() |
|
292 |
|
|
293 |
disks = [objects.Disk.FromDict(dsk_s) |
|
294 |
for dsk_s in node_disks.get(node_name, [])] |
|
291 |
disks = [objects.Disk.FromDict(dsk_s) for dsk_s in node_disks] |
|
295 | 292 |
|
296 | 293 |
result = [] |
297 | 294 |
|
Also available in: Unified diff