Revision 1a3c5d4e lib/rpc_defs.py

b/lib/rpc_defs.py
131 131
  return result
132 132

  
133 133

  
134
def _NodeInfoPreProc(node, args):
135
  """Prepare the exclusive_storage argument for node_info calls."""
136
  assert len(args) == 3
137
  # The third argument is either a dictionary with one value for each node, or
138
  # a fixed value to be used for all the nodes
139
  if type(args[2]) is dict:
140
    return [args[0], args[1], args[2][node]]
141
  else:
142
    return args
143

  
144

  
134 145
def _OsGetPostProc(result):
135 146
  """Post-processor for L{rpc.RpcRunner.call_os_get}.
136 147

  
......
449 460
     "Names of the volume groups to ask for disk space information"),
450 461
    ("hv_names", None,
451 462
     "Names of the hypervisors to ask for node information"),
452
    ], None, None, "Return node information"),
463
    ("exclusive_storage", None,
464
     "Whether exclusive storage is enabled"),
465
    ], _NodeInfoPreProc, None, "Return node information"),
453 466
  ("node_verify", MULTI, None, constants.RPC_TMO_NORMAL, [
454 467
    ("checkdict", None, None),
455 468
    ("cluster_name", None, None),

Also available in: Unified diff