Revision abbf2cd9 lib/rpc.py

b/lib/rpc.py
374 374
                                        headers=_RPC_CLIENT_HEADERS,
375 375
                                        post_data=body,
376 376
                                        read_timeout=read_timeout,
377
                                        nicename="%s/%s" % (name, procedure))
377
                                        nicename="%s/%s" % (name, procedure),
378
                                        curl_config_fn=_ConfigRpcCurl)
378 379

  
379 380
    return (results, requests)
380 381

  
......
402 403

  
403 404
    return results
404 405

  
405
  def __call__(self, hosts, procedure, body, read_timeout=None, http_pool=None):
406
  def __call__(self, hosts, procedure, body, read_timeout=None,
407
               _req_process_fn=http.client.ProcessRequests):
406 408
    """Makes an RPC request to a number of nodes.
407 409

  
408 410
    @type hosts: sequence
......
417 419
    """
418 420
    assert procedure in _TIMEOUTS, "RPC call not declared in the timeouts table"
419 421

  
420
    if not http_pool:
421
      http_pool = http.client.HttpClientPool(_ConfigRpcCurl)
422

  
423 422
    if read_timeout is None:
424 423
      read_timeout = _TIMEOUTS[procedure]
425 424

  
......
427 426
      self._PrepareRequests(self._resolver(hosts), self._port, procedure,
428 427
                            str(body), read_timeout)
429 428

  
430
    http_pool.ProcessRequests(requests.values(),
431
                              lock_monitor_cb=self._lock_monitor_cb)
429
    _req_process_fn(requests.values(), lock_monitor_cb=self._lock_monitor_cb)
432 430

  
433 431
    assert not frozenset(results).intersection(requests)
434 432

  

Also available in: Unified diff