Revision 5449685e lib/rpc_defs.py

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

  

Also available in: Unified diff